pyinstaller.py minor linux&mac changes
This commit is contained in:
parent
8114feccac
commit
d4a7c1eb3b
3 changed files with 34 additions and 52 deletions
|
@ -1,5 +1,6 @@
|
||||||
# PESTERCHUM
|
# PESTERCHUM
|
||||||
Maintained repository of ghostDunk's Pesterchum. Connects to irc.pesterchum.xyz by defaults since the official server shut down (custom servers can be configured in server.json!!). Pesterchum is an instant messaging client copying the look and feel of clients from Andrew Hussie's webcomic Homestuck.
|
Pesterchum is an instant messaging client copying the look and feel of clients from Andrew Hussie's webcomic Homestuck.
|
||||||
|
Maintained repository of ghostDunk's Pesterchum. Prompts the user to choose a server at launch (irc.pesterchum.xyz by default).
|
||||||
|
|
||||||
This repository builds on (and was mirrored from!) from pesterchum-karxi + Hydrothermal's nickserv fix.
|
This repository builds on (and was mirrored from!) from pesterchum-karxi + Hydrothermal's nickserv fix.
|
||||||
|
|
||||||
|
@ -57,7 +58,7 @@ You can install them with Python's pip or your package manager if you're on linu
|
||||||
[requests]: https://pypi.org/project/requests/
|
[requests]: https://pypi.org/project/requests/
|
||||||
|
|
||||||
### PYINSTALLER BUILDING
|
### PYINSTALLER BUILDING
|
||||||
My preferred method of generating binary releases.
|
My preferred method of generating binary releases on Windows and Linux, MacOS doesn't seem to work for me.
|
||||||
``python pyinstaller.py``
|
``python pyinstaller.py``
|
||||||
|
|
||||||
### CX_FREEZE BUILDING
|
### CX_FREEZE BUILDING
|
||||||
|
|
7
TODO.md
7
TODO.md
|
@ -5,15 +5,10 @@
|
||||||
- (Re-add) update checking.
|
- (Re-add) update checking.
|
||||||
|
|
||||||
## FIX
|
## FIX
|
||||||
- Any remaining unicode-related crashes.
|
|
||||||
- Exclude unnecessary imports for builds.
|
|
||||||
- Mask & target not being passed to ``_max_msg_len``.
|
- Mask & target not being passed to ``_max_msg_len``.
|
||||||
- No error message when Pesterchum fails to join a channel. (For example, when the channel name length is over CHANNELLEN)
|
- No error message when Pesterchum fails to join a channel. (For example, when the channel name length is over CHANNELLEN)
|
||||||
- Choose memo window doesn't get updated on theme change.
|
- Choose memo window doesn't get updated on theme change.
|
||||||
- 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.
|
- Themes sometimes don't get applied to trollslum.
|
||||||
|
|
||||||
## ???
|
|
||||||
- Figure out why convo/tabwindow has the effect is seems to- :/
|
|
|
@ -28,7 +28,7 @@ is a lot more useable than having to include all command line arguments every ti
|
||||||
except FileNotFoundError as e:
|
except FileNotFoundError as e:
|
||||||
print(e)
|
print(e)
|
||||||
|
|
||||||
print("\nUPX corrupts DLLs when it feels like it, try disabling it if your build doesn't run.")
|
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 is_64bit == True:
|
if is_64bit == True:
|
||||||
upx_dir = input("UPX directory [D:\\upx-3.96-win64]: ")
|
upx_dir = input("UPX directory [D:\\upx-3.96-win64]: ")
|
||||||
if upx_dir == '':
|
if upx_dir == '':
|
||||||
|
@ -38,16 +38,17 @@ is a lot more useable than having to include all command line arguments every ti
|
||||||
if upx_dir == '':
|
if upx_dir == '':
|
||||||
upx_dir = "D:\\upx-3.96-win32" # Default dir for me :)
|
upx_dir = "D:\\upx-3.96-win32" # Default dir for me :)
|
||||||
print("upx_dir = " + upx_dir)
|
print("upx_dir = " + upx_dir)
|
||||||
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 sys.platform == 'win32':
|
||||||
if is_64bit == True:
|
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 )")
|
||||||
crt_path = input("Universal CRT: [C:\\Program Files (x86)\\Windows Kits\\10\\Redist\\10.0.19041.0\\ucrt\\DLLs\\x64]: ")
|
if is_64bit == True:
|
||||||
if crt_path == '':
|
crt_path = input("Universal CRT: [C:\\Program Files (x86)\\Windows Kits\\10\\Redist\\10.0.19041.0\\ucrt\\DLLs\\x64]: ")
|
||||||
crt_path = "C:\\Program Files (x86)\\Windows Kits\\10\\Redist\\10.0.19041.0\\ucrt\\DLLs\\x64" # Default directory.
|
if crt_path == '':
|
||||||
else:
|
crt_path = "C:\\Program Files (x86)\\Windows Kits\\10\\Redist\\10.0.19041.0\\ucrt\\DLLs\\x64" # Default directory.
|
||||||
crt_path = input("Extra path: [C:\\Program Files (x86)\\Windows Kits\\10\\Redist\\10.0.19041.0\\ucrt\\DLLs\\x86]: ")
|
else:
|
||||||
if crt_path == '':
|
crt_path = input("Extra path: [C:\\Program Files (x86)\\Windows Kits\\10\\Redist\\10.0.19041.0\\ucrt\\DLLs\\x86]: ")
|
||||||
crt_path = "C:\\Program Files (x86)\\Windows Kits\\10\\Redist\\10.0.19041.0\\ucrt\\DLLs\\x86" # Default directory.
|
if crt_path == '':
|
||||||
print("crt_path = " + crt_path)
|
crt_path = "C:\\Program Files (x86)\\Windows Kits\\10\\Redist\\10.0.19041.0\\ucrt\\DLLs\\x86" # Default directory.
|
||||||
|
print("crt_path = " + crt_path)
|
||||||
except KeyboardInterrupt as e:
|
except KeyboardInterrupt as e:
|
||||||
sys.exit("KeyboardInterrupt")
|
sys.exit("KeyboardInterrupt")
|
||||||
|
|
||||||
|
@ -142,39 +143,15 @@ if sys.platform == 'win32':
|
||||||
'--name=Pesterchum',
|
'--name=Pesterchum',
|
||||||
'--paths=%s' % crt_path,
|
'--paths=%s' % crt_path,
|
||||||
#'--noconfirm', # Overwrite output directory.
|
#'--noconfirm', # Overwrite output directory.
|
||||||
'--upx-dir=%s' % upx_dir, # Set Upx directory. (I think it also works from path.)
|
|
||||||
'--windowed', # Hide console
|
'--windowed', # Hide console
|
||||||
#'--onefile',
|
#'--onefile',
|
||||||
'--icon=pesterchum.ico',
|
'--icon=pesterchum.ico',
|
||||||
#'--clean', # Clear cache
|
#'--clean', # Clear cache
|
||||||
|
|
||||||
#'--hidden-import=pkg_resources.py2_warn',
|
|
||||||
#'--hidden-import=PyQt5.sip',
|
|
||||||
|
|
||||||
#'--add-data=quirks;quirks',
|
|
||||||
#'--add-data=smilies;smilies',
|
|
||||||
#'--add-data=themes;themes',
|
|
||||||
#'--add-data=docs;docs',
|
|
||||||
#'--add-data=README.md;.',
|
|
||||||
#'--add-data=LICENSE;.',
|
|
||||||
#'--add-data=CHANGELOG.md;.',
|
|
||||||
#'--add-data=PCskins.png;.',
|
|
||||||
#'--add-data=Pesterchum.png;.',
|
|
||||||
|
|
||||||
#'--upx-exclude=qwindows.dll',
|
|
||||||
#'--upx-exclude=Qt5Multimedia.dll',
|
|
||||||
#'--upx-exclude=Qt5Gui.dll',
|
|
||||||
#'--upx-exclude=Qt5Core.dll',
|
|
||||||
#'--upx-exclude=vcruntime140.dll',
|
|
||||||
#'--upx-exclude=MSVCP140.dll',
|
|
||||||
#'--upx-exclude=MSVCP140_1.dll',
|
|
||||||
#'--upx-exclude=' + 'Qt5Multimedia.dll'.lower(),
|
|
||||||
#'--upx-exclude=' + 'Qt5Gui.dll'.lower(),
|
|
||||||
#'--upx-exclude=' + 'Qt5Core.dll'.lower(),
|
|
||||||
#'--upx-exclude=' + 'vcruntime140.dll'.lower(),
|
|
||||||
#'--upx-exclude=' + 'MSVCP140.dll'.lower()
|
|
||||||
]
|
]
|
||||||
|
|
||||||
|
if os.path.isdir(upx_dir):
|
||||||
|
run_win32.append('--upx-dir=%s' % upx_dir)
|
||||||
|
|
||||||
for x in upx_exclude:
|
for x in upx_exclude:
|
||||||
run_win32.append('--upx-exclude=%s' % x )
|
run_win32.append('--upx-exclude=%s' % x )
|
||||||
# Lower case variants are required.
|
# Lower case variants are required.
|
||||||
|
@ -235,14 +212,19 @@ if sys.platform == 'win32':
|
||||||
PyInstaller.__main__.run(run_win32)
|
PyInstaller.__main__.run(run_win32)
|
||||||
#MacOS
|
#MacOS
|
||||||
elif sys.platform == 'darwin' :
|
elif sys.platform == 'darwin' :
|
||||||
|
input("NOTE: Building with pyinstaller on MacOS doesn't seem to work for me.")
|
||||||
run_darwin =[
|
run_darwin =[
|
||||||
'pesterchum.py',
|
'pesterchum.py',
|
||||||
|
'--name=Pesterchum',
|
||||||
'--windowed', # Hide console
|
'--windowed', # Hide console
|
||||||
#'--noconfirm', # Overwrite output directory.
|
#'--noconfirm', # Overwrite output directory.
|
||||||
'--icon=trayicon32.icns', # Icon
|
'--icon=trayicon32.icns', # Icon
|
||||||
|
'--onedir',
|
||||||
'--upx-dir=%s' % upx_dir # Set Upx directory. (I think it also works from path.)
|
#'--noupx'
|
||||||
]
|
]
|
||||||
|
|
||||||
|
if os.path.isdir(upx_dir):
|
||||||
|
run_darwin.append('--upx-dir=%s' % upx_dir)
|
||||||
|
|
||||||
for x in upx_exclude:
|
for x in upx_exclude:
|
||||||
run_darwin.append('--upx-exclude=%s' % x )
|
run_darwin.append('--upx-exclude=%s' % x )
|
||||||
|
@ -257,16 +239,19 @@ elif sys.platform == 'darwin' :
|
||||||
|
|
||||||
PyInstaller.__main__.run(run_darwin)
|
PyInstaller.__main__.run(run_darwin)
|
||||||
#Linux
|
#Linux
|
||||||
elif sys.platform == 'linux' :
|
elif sys.platform == 'linux':
|
||||||
run_linux =[
|
run_linux =[
|
||||||
'pesterchum.py',
|
'pesterchum.py',
|
||||||
'--onedir', # Hide console
|
'--name=Pesterchum',
|
||||||
|
#'--windowed', # Hide console
|
||||||
#'--noconfirm', # Overwrite output directory.
|
#'--noconfirm', # Overwrite output directory.
|
||||||
'--icon=trayicon32.icns', # Icon
|
'--icon=trayicon32.icns', # Icon
|
||||||
|
|
||||||
'--upx-dir=%s' % upx_dir # Set Upx directory. (I think it also works from path.)
|
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
|
if os.path.isdir(upx_dir):
|
||||||
|
run_linux.append('--upx-dir=%s' % upx_dir)
|
||||||
|
|
||||||
for x in upx_exclude:
|
for x in upx_exclude:
|
||||||
run_linux.append('--upx-exclude=%s' % x )
|
run_linux.append('--upx-exclude=%s' % x )
|
||||||
# Lower case variants are required.
|
# Lower case variants are required.
|
||||||
|
@ -284,6 +269,7 @@ else:
|
||||||
|
|
||||||
run_generic =[
|
run_generic =[
|
||||||
'pesterchum.py',
|
'pesterchum.py',
|
||||||
|
'--name=Pesterchum',
|
||||||
'--upx-dir=%s' % upx_dir # Set Upx directory. (I think it also works from path.)
|
'--upx-dir=%s' % upx_dir # Set Upx directory. (I think it also works from path.)
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue