Build update

This commit is contained in:
BuildTools 2021-08-09 08:47:05 +02:00
parent e0fa498c7d
commit 87fc72a355
4 changed files with 26 additions and 15 deletions

View file

@ -59,6 +59,7 @@ You can install them with Python's pip or your package manager if you're on linu
### PYINSTALLER BUILDING ### PYINSTALLER BUILDING
My preferred method of generating binary releases on Windows and Linux, MacOS doesn't seem to work for me. My preferred method of generating binary releases on Windows and Linux, MacOS doesn't seem to work for me.
NOTE: pyinstaller builds seem to get flagged as malware.
``python pyinstaller.py`` ``python pyinstaller.py``
### CX_FREEZE BUILDING ### CX_FREEZE BUILDING

View file

@ -11,4 +11,4 @@
- Right click menu's color doesn't get updated on theme change in memos. - Right click menu's color doesn't get updated on theme change in memos.
- Closed windows sometimes stay open. - Closed windows sometimes stay open.
- help() causes console to crash...? - help() causes console to crash...?
- Themes sometimes don't get applied to trollslum. - Manual chumdroid sorting not working.

View file

@ -28,17 +28,25 @@ Some of the include files are specific to my instalation, so you might have to e
shutil.rmtree('build') shutil.rmtree('build')
except FileNotFoundError as e: except FileNotFoundError as e:
print(e) print(e)
print("UPX can decently reduce filesize but builds might get flagged by anti-viruses more often. (+ it sometimes breaks QT's DLLs)")
print("\nUPX corrupts DLLs when it feels like it, try disabling it if your build doesn't run.\nIf upx is on your path you don't need to include anything here.") if input("Enable UPX? [N]: ").lower() == 'y':
if is_64bit == True: upx_enabled = True
upx_dir = input("UPX directory [D:\\upx-3.96-win64]: ")
if upx_dir == '':
upx_dir = "D:\\upx-3.96-win64" # Default dir for me :)
else: else:
upx_dir = input("UPX directory [D:\\upx-3.96-win32]: ") upx_enabled = False
if upx_dir == '':
upx_dir = "D:\\upx-3.96-win32" # Default dir for me :) if upx_enabled == True:
print("upx_dir = " + upx_dir) print("If upx is on your path you don't need to include anything here.")
if is_64bit == True:
upx_dir = input("UPX directory [D:\\upx-3.96-win64]: ")
if upx_dir == '':
upx_dir = "D:\\upx-3.96-win64" # Default dir for me :)
else:
upx_dir = input("UPX directory [D:\\upx-3.96-win32]: ")
if upx_dir == '':
upx_dir = "D:\\upx-3.96-win32" # Default dir for me :)
print("upx_dir = " + upx_dir)
else:
upx_dir = ''
if sys.platform == 'win32': if sys.platform == 'win32':
print("\nUniversal CRT needs to be included if you don't want to run into compatibility issues when building on Windows 10. ( https://pyinstaller.readthedocs.io/en/stable/usage.html?highlight=sdk#windows )") print("\nUniversal CRT needs to be included if you don't want to run into compatibility issues when building on Windows 10. ( https://pyinstaller.readthedocs.io/en/stable/usage.html?highlight=sdk#windows )")
if is_64bit == True: if is_64bit == True:
@ -147,11 +155,14 @@ if sys.platform == 'win32':
'--windowed', # Hide console '--windowed', # Hide console
#'--onefile', #'--onefile',
'--icon=pesterchum.ico', '--icon=pesterchum.ico',
#'--clean', # Clear cache '--clean', # Clear cache
] ]
if os.path.isdir(upx_dir): if upx_enabled == True:
run_win32.append('--upx-dir=%s' % upx_dir) if os.path.isdir(upx_dir):
run_win32.append('--upx-dir=%s' % upx_dir)
else:
run_win32.append('--noupx')
for x in upx_exclude: for x in upx_exclude:
run_win32.append('--upx-exclude=%s' % x ) run_win32.append('--upx-exclude=%s' % x )

View file

@ -24,7 +24,6 @@ includefiles = ["quirks",
"PCskins.png", "PCskins.png",
"Pesterchum.png"] "Pesterchum.png"]
build_exe_options = { build_exe_options = {
"includes": [""],
## "includes": ["PyQt5.QtCore", ## "includes": ["PyQt5.QtCore",
## "PyQt5.QtGui", ## "PyQt5.QtGui",
## "PyQt5.QtWidgets", ## "PyQt5.QtWidgets",