59 lines
1.2 KiB
Python
59 lines
1.2 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)
|
|
|
|
# Now you can import config
|
|
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,
|
|
a.binaries,
|
|
a.zipfiles,
|
|
a.datas,
|
|
[],
|
|
name=f'{config.APP_NAME}_{config.APP_VERSION}',
|
|
debug=False,
|
|
bootloader_ignore_signals=False,
|
|
strip=False,
|
|
upx=True,
|
|
upx_exclude=[],
|
|
runtime_tmpdir=None,
|
|
console=False,
|
|
disable_windowed_traceback=False,
|
|
target_arch=None,
|
|
codesign_identity=None,
|
|
entitlements_file=None
|
|
# icon='../assets/app_icon.ico'
|
|
)
|