Skip to content

Commit

Permalink
program builds in its own export folder now
Browse files Browse the repository at this point in the history
  • Loading branch information
BombasticTom committed Sep 11, 2024
1 parent 67e4a9c commit ed99935
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 37 deletions.
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@ pppppppp.txt
fnf-porter.log

## PyInstaller
build/
dist/
export/

## FNF Porter files
**/logs/*
Expand Down
2 changes: 1 addition & 1 deletion build.bat
Original file line number Diff line number Diff line change
@@ -1 +1 @@
pyinstaller build.spec
pyinstaller build.spec --distpath ./export/bin --workpath ./export/obj
68 changes: 34 additions & 34 deletions build.spec
Original file line number Diff line number Diff line change
Expand Up @@ -2,51 +2,51 @@


a = Analysis(
['psychtobase\\main.py'],
pathex=[],
binaries=[],
datas=[],
hiddenimports=[],
hookspath=[],
hooksconfig={},
runtime_hooks=[],
excludes=[],
noarchive=False,
optimize=0,
['psychtobase\\main.py'],
pathex=[],
binaries=[],
datas=[],
hiddenimports=[],
hookspath=[],
hooksconfig={},
runtime_hooks=[],
excludes=[],
noarchive=False,
# optimize=0, Crashes for some reason :shrug:
)
pyz = PYZ(a.pure)

import platform
iconArr = []

if platform.system() == 'Darwin':
iconArr = ['icon.icns']
iconArr = ['icon.icns']
elif platform.system() == 'Windows':
iconArr = ['icon.ico']
iconArr = ['icon.ico']

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

import shutil
if platform.system() == 'Windows':
shutil.copyfile('ffmpeg.exe', '{0}/ffmpeg.exe'.format(DISTPATH))
shutil.copyfile('FFMPEG-LICENSE', '{0}/FFMPEG_LICENSE.txt'.format(DISTPATH))
shutil.copyfile('ffmpeg.exe', '{0}/ffmpeg.exe'.format(DISTPATH))
shutil.copyfile('FFMPEG-LICENSE', '{0}/FFMPEG_LICENSE.txt'.format(DISTPATH))

0 comments on commit ed99935

Please sign in to comment.