77 lines
1.5 KiB
Python
77 lines
1.5 KiB
Python
# -*- mode: python ; coding: utf-8 -*-
|
|
import sys
|
|
import os
|
|
|
|
|
|
# Get the current working directory
|
|
current_directory = os.getcwd()
|
|
|
|
# Build the path to the '../src' directory
|
|
src_path = os.path.abspath(os.path.join(current_directory, 'src'))
|
|
|
|
# Add the 'src' directory to the sys.path
|
|
sys.path.append(src_path)
|
|
|
|
import config
|
|
|
|
|
|
block_cipher = None
|
|
|
|
a = Analysis(
|
|
['../src/main.py'],
|
|
pathex=['../src'],
|
|
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,
|
|
[],
|
|
exclude_binaries=True,
|
|
name=config.APP_NAME,
|
|
debug=False,
|
|
bootloader_ignore_signals=False,
|
|
strip=False,
|
|
upx=True,
|
|
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=config.APP_NAME,
|
|
)
|
|
|
|
app = BUNDLE(
|
|
coll,
|
|
name=f'{config.APP_NAME}_{config.APP_VERSION}.app',
|
|
icon='../assets/icon.icns',
|
|
bundle_identifier='com.detekta.detektor',
|
|
info_plist={
|
|
'CFBundleShortVersionString': config.APP_VERSION,
|
|
'CFBundleVersion': config.APP_VERSION,
|
|
'NSHighResolutionCapable': 'True'
|
|
}
|
|
)
|