63 lines
2.0 KiB
Python
63 lines
2.0 KiB
Python
# -*- mode: python ; coding: utf-8 -*-
|
|
|
|
# This spec file is for building the PyInstaller GUI Wrapper tool itself.
|
|
|
|
block_cipher = None
|
|
|
|
a = Analysis(
|
|
# MODIFIED: Point to the new entry point within the subpackage
|
|
scripts=['pyinstallerguiwrapper/__main__.py'],
|
|
# MODIFIED: Include the root directory '.' so PyInstaller finds the subpackage 'pyinstallerguiwrapper'
|
|
pathex=['.'],
|
|
binaries=[],
|
|
datas=[], # No data files needed for the tool itself currently
|
|
hiddenimports=[], # Add any modules PyInstaller might miss (e.g., sometimes needed for pkg_resources)
|
|
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,
|
|
# MODIFIED: Set the application name
|
|
name='PyInstallerGUIWrapper',
|
|
debug=False,
|
|
bootloader_ignore_signals=False,
|
|
strip=False,
|
|
upx=True, # Use UPX if available (optional)
|
|
runtime_tmpdir=None,
|
|
# MODIFIED: Set console=False for a GUI application
|
|
console=False,
|
|
disable_windowed_traceback=False,
|
|
target_arch=None,
|
|
codesign_identity=None,
|
|
entitlements_file=None,
|
|
# MODIFIED: Add icon if pyinstallerguiwrapper.ico exists in the root
|
|
icon='pyinstallerguiwrapper.ico' # Assumes the icon file is in the same directory as the spec file
|
|
)
|
|
|
|
# Use COLLECT for one-dir builds (recommended for GUI stability)
|
|
coll = COLLECT(
|
|
exe,
|
|
a.binaries,
|
|
a.zipfiles,
|
|
a.datas,
|
|
strip=False,
|
|
upx=True, # Match UPX setting
|
|
upx_exclude=[],
|
|
# MODIFIED: Set the output directory name
|
|
name='PyInstallerGUIWrapper' # Name of the folder in _dist/
|
|
)
|
|
|
|
# If you wanted a one-file build instead (can sometimes be less stable for Tkinter):
|
|
# Remove the 'coll = COLLECT(...)' block above
|
|
# And potentially adjust EXE options (though Analysis usually handles datas/binaries correctly now) |