mirror of
https://gitlab.com/RemixDev/deemix-gui-pyweb.git
synced 2024-12-28 02:16:16 +00:00
Added support for --onefile on spec files
This commit is contained in:
parent
326ea8a112
commit
79ff9ba88e
|
@ -1,7 +1,5 @@
|
|||
# -*- mode: python ; coding: utf-8 -*-
|
||||
import deemix
|
||||
import sys
|
||||
from os.path import dirname
|
||||
|
||||
block_cipher = None
|
||||
|
||||
|
@ -31,7 +29,7 @@ if sys.platform.startswith('darwin'):
|
|||
strip=False,
|
||||
upx=True,
|
||||
console=False,
|
||||
icon=f"icon.icns")
|
||||
icon="icon.icns")
|
||||
coll = COLLECT(exe,
|
||||
a.binaries,
|
||||
a.zipfiles,
|
||||
|
@ -44,6 +42,21 @@ if sys.platform.startswith('darwin'):
|
|||
name='deemix-pyweb.app',
|
||||
icon="icon.icns",
|
||||
bundle_identifier=None)
|
||||
elif '--onefile' in sys.argv or '-F' in sys.argv:
|
||||
exe = EXE(pyz,
|
||||
a.scripts,
|
||||
a.binaries,
|
||||
a.zipfiles,
|
||||
a.datas,
|
||||
[],
|
||||
name='deemix-pyweb',
|
||||
debug=False,
|
||||
bootloader_ignore_signals=False,
|
||||
strip=False,
|
||||
upx=True,
|
||||
upx_exclude=[],
|
||||
runtime_tmpdir=None,
|
||||
console=False , icon='icon.ico')
|
||||
else:
|
||||
exe = EXE(pyz,
|
||||
a.scripts,
|
||||
|
@ -55,7 +68,7 @@ else:
|
|||
strip=False,
|
||||
upx=True,
|
||||
console=False,
|
||||
icon=f"icon.ico")
|
||||
icon="icon.ico")
|
||||
coll = COLLECT(exe,
|
||||
a.binaries,
|
||||
a.zipfiles,
|
||||
|
|
57
server.spec
57
server.spec
|
@ -1,7 +1,5 @@
|
|||
# -*- mode: python ; coding: utf-8 -*-
|
||||
import deemix
|
||||
import sys
|
||||
from os.path import dirname
|
||||
|
||||
block_cipher = None
|
||||
|
||||
|
@ -9,7 +7,7 @@ sys.modules['FixTk'] = None
|
|||
|
||||
a = Analysis(['server.py'],
|
||||
binaries=[],
|
||||
datas=[('webui/public', 'webui')],
|
||||
datas=[('webui/public', 'webui'), ('icon.ico', '.')],
|
||||
hiddenimports=['engineio.async_drivers.threading', 'pkg_resources.py2_warn'],
|
||||
hookspath=[],
|
||||
runtime_hooks=[],
|
||||
|
@ -20,21 +18,38 @@ a = Analysis(['server.py'],
|
|||
noarchive=False)
|
||||
pyz = PYZ(a.pure, a.zipped_data,
|
||||
cipher=block_cipher)
|
||||
exe = EXE(pyz,
|
||||
a.scripts,
|
||||
[],
|
||||
exclude_binaries=True,
|
||||
name='deemix_webui',
|
||||
debug=False,
|
||||
bootloader_ignore_signals=False,
|
||||
strip=False,
|
||||
upx=True,
|
||||
console=True )
|
||||
coll = COLLECT(exe,
|
||||
a.binaries,
|
||||
a.zipfiles,
|
||||
a.datas,
|
||||
strip=False,
|
||||
upx=True,
|
||||
upx_exclude=[],
|
||||
name='server')
|
||||
if '--onefile' in sys.argv or '-F' in sys.argv:
|
||||
exe = EXE(pyz,
|
||||
a.scripts,
|
||||
a.binaries,
|
||||
a.zipfiles,
|
||||
a.datas,
|
||||
[],
|
||||
name='deemix-server',
|
||||
debug=False,
|
||||
bootloader_ignore_signals=False,
|
||||
strip=False,
|
||||
upx=True,
|
||||
upx_exclude=[],
|
||||
runtime_tmpdir=None,
|
||||
console=True , icon='icon.ico')
|
||||
else:
|
||||
exe = EXE(pyz,
|
||||
a.scripts,
|
||||
[],
|
||||
exclude_binaries=True,
|
||||
name='deemix-server',
|
||||
debug=False,
|
||||
bootloader_ignore_signals=False,
|
||||
strip=False,
|
||||
upx=True,
|
||||
console=True,
|
||||
icon="icon.ico")
|
||||
coll = COLLECT(exe,
|
||||
a.binaries,
|
||||
a.zipfiles,
|
||||
a.datas,
|
||||
strip=False,
|
||||
upx=True,
|
||||
upx_exclude=[],
|
||||
name='deemix-server')
|
||||
|
|
Loading…
Reference in a new issue