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