add a makefile

This commit is contained in:
ccppi 2024-08-09 09:33:40 +02:00
parent 5bb8126577
commit 28f2499da3
3 changed files with 33 additions and 7 deletions

View File

@ -1,2 +0,0 @@
#Works but is fucking big
pyinstaller lib/gui.py --onefile --add-data ./db/:./db

View File

@ -5,7 +5,7 @@ a = Analysis(
['lib/gui.py'], ['lib/gui.py'],
pathex=[], pathex=[],
binaries=[], binaries=[],
datas=[('./db/', './db')], datas=[],
hiddenimports=[], hiddenimports=[],
hookspath=[], hookspath=[],
hooksconfig={}, hooksconfig={},
@ -19,16 +19,13 @@ pyz = PYZ(a.pure)
exe = EXE( exe = EXE(
pyz, pyz,
a.scripts, a.scripts,
a.binaries,
a.datas,
[], [],
exclude_binaries=True,
name='gui', name='gui',
debug=False, debug=False,
bootloader_ignore_signals=False, bootloader_ignore_signals=False,
strip=False, strip=False,
upx=True, upx=True,
upx_exclude=[],
runtime_tmpdir=None,
console=True, console=True,
disable_windowed_traceback=False, disable_windowed_traceback=False,
argv_emulation=False, argv_emulation=False,
@ -36,3 +33,12 @@ exe = EXE(
codesign_identity=None, codesign_identity=None,
entitlements_file=None, entitlements_file=None,
) )
coll = COLLECT(
exe,
a.binaries,
a.datas,
strip=False,
upx=True,
upx_exclude=[],
name='gui',
)

22
makefile Normal file
View File

@ -0,0 +1,22 @@
#Works but is fucking big
#Single file version:
#pyinstaller lib/gui.py --onefile --add-data ./db/:./db
all:gui cli datafiles
gui:
pyinstaller lib/gui.py
make datafiles
cli:
pyinstaller lib/main.py
make datafiles
datafiles:
make db-dir
cp ./db/Cantons.db dist/db/
cp ./db/sqlite3.db dist/db/
cp ./lib/conf dist/gui/
db-dir:
mkdir -p dist/db
clean:
rm dist/db -r