Skip to content

Commit

Permalink
okay that sucks pyinstaller?
Browse files Browse the repository at this point in the history
  • Loading branch information
SandPoot committed Sep 18, 2021
1 parent e82d989 commit f54da81
Show file tree
Hide file tree
Showing 10 changed files with 59 additions and 38 deletions.
5 changes: 1 addition & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,4 @@
__pycache__/

# Ignore build cache
dist/install/lib/
dist/install/python*
dist/main/lib/
dist/main/python*
build/
10 changes: 2 additions & 8 deletions build.bat
Original file line number Diff line number Diff line change
@@ -1,8 +1,2 @@
@echo Building main.py
cxfreeze --base-name ss13rp -c main.py --target-dir dist/main --icon icon.ico --packages pypresence,wheel,psutil --base Win32GUI
@echo Finished building main.py
@timeout 2
@echo Building install.py
cxfreeze -c install.py --target-dir dist/install --icon icon.ico
@echo Finished building install.py
@timeout 2
pyinstaller install.py -F -i icon.ico
pyinstaller main.py -F -w -i icon.ico -n ss13rp
Binary file added dist/install.exe
Binary file not shown.
Binary file removed dist/install/install.exe
Binary file not shown.
Binary file removed dist/main/main.exe
Binary file not shown.
Binary file added dist/ss13rp.exe
Binary file not shown.
2 changes: 1 addition & 1 deletion install.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
install_path = 'C:\\Users\\'+USER_NAME+'\\AppData\\Roaming\\Microsoft\\Windows\\Start Menu\\Programs\\Startup\\'

print("Installing...\n")
url = "https://github.com/SandPoot/ss13rp/raw/master/dist/main/ss13rp.exe"
url = "https://github.com/SandPoot/ss13rp/raw/master/dist/ss13rp.exe"
response = requests.get(url, stream=True)
handle = open(install_path+"ss13rp.exe", "wb")
dur = 0
Expand Down
19 changes: 7 additions & 12 deletions install.spec
Original file line number Diff line number Diff line change
Expand Up @@ -21,25 +21,20 @@ pyz = PYZ(a.pure, a.zipped_data,
cipher=block_cipher)

exe = EXE(pyz,
a.scripts,
a.scripts,
a.binaries,
a.zipfiles,
a.datas,
[],
exclude_binaries=True,
name='install',
debug=False,
bootloader_ignore_signals=False,
strip=False,
upx=True,
upx_exclude=[],
runtime_tmpdir=None,
console=True,
disable_windowed_traceback=False,
target_arch=None,
codesign_identity=None,
entitlements_file=None )
coll = COLLECT(exe,
a.binaries,
a.zipfiles,
a.datas,
strip=False,
upx=True,
upx_exclude=[],
name='install',
icon='icon.ico')
entitlements_file=None , icon='icon.ico')
21 changes: 8 additions & 13 deletions main.spec
Original file line number Diff line number Diff line change
Expand Up @@ -21,25 +21,20 @@ pyz = PYZ(a.pure, a.zipped_data,
cipher=block_cipher)

exe = EXE(pyz,
a.scripts,
a.scripts,
a.binaries,
a.zipfiles,
a.datas,
[],
exclude_binaries=True,
name='main',
debug=False,
bootloader_ignore_signals=False,
strip=False,
upx=True,
console=True,
upx_exclude=[],
runtime_tmpdir=None,
console=False,
disable_windowed_traceback=False,
target_arch=None,
codesign_identity=None,
entitlements_file=None )
coll = COLLECT(exe,
a.binaries,
a.zipfiles,
a.datas,
strip=False,
upx=True,
upx_exclude=[],
name='main',
icon='icon.ico')
entitlements_file=None , icon='icon.ico')
40 changes: 40 additions & 0 deletions ss13rp.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# -*- mode: python ; coding: utf-8 -*-


block_cipher = None


a = Analysis(['main.py'],
pathex=['D:\\SS13-Codes\\ss13rp'],
binaries=[],
datas=[],
hiddenimports=[],
hookspath=[],
hooksconfig={},
runtime_hooks=[],
excludes=[],
win_no_prefer_redirects=False,
win_private_assemblies=False,
cipher=block_cipher,
noarchive=False)
pyz = PYZ(a.pure, a.zipped_data,
cipher=block_cipher)

exe = EXE(pyz,
a.scripts,
a.binaries,
a.zipfiles,
a.datas,
[],
name='ss13rp',
debug=False,
bootloader_ignore_signals=False,
strip=False,
upx=True,
upx_exclude=[],
runtime_tmpdir=None,
console=False,
disable_windowed_traceback=False,
target_arch=None,
codesign_identity=None,
entitlements_file=None , icon='icon.ico')

0 comments on commit f54da81

Please sign in to comment.