52 lines
1.1 KiB
Python
52 lines
1.1 KiB
Python
# -*- mode: python ; coding: utf-8 -*-
|
|
import sys
|
|
from PyInstaller.utils.hooks import collect_submodules
|
|
|
|
# Project name and entry script
|
|
app_name = "ChromaPreviewer"
|
|
entry_script = "main.py"
|
|
|
|
# Gather hidden imports for PyQt6 and OpenCV
|
|
hidden_imports = collect_submodules("cv2") + collect_submodules("PyQt6")
|
|
|
|
a = Analysis(
|
|
[entry_script],
|
|
pathex=["."], # Current directory
|
|
binaries=[],
|
|
datas=[],
|
|
hiddenimports=hidden_imports,
|
|
hookspath=[],
|
|
runtime_hooks=[],
|
|
excludes=[],
|
|
win_no_prefer_redirects=False,
|
|
win_private_assemblies=False,
|
|
cipher=None,
|
|
noarchive=False,
|
|
)
|
|
|
|
pyz = PYZ(a.pure, a.zipped_data, cipher=None)
|
|
|
|
exe = EXE(
|
|
pyz,
|
|
a.scripts,
|
|
a.binaries,
|
|
a.zipfiles,
|
|
a.datas,
|
|
[],
|
|
name=app_name,
|
|
debug=False,
|
|
bootloader_ignore_signals=False,
|
|
strip=False,
|
|
upx=True,
|
|
console=False
|
|
)
|
|
|
|
app = BUNDLE(
|
|
exe,
|
|
name=app_name + ".app",
|
|
bundle_identifier="com.1060studios.chromapreviewer",
|
|
info_plist={
|
|
"NSCameraUsageDescription": "This app requires access to the camera for live chroma keying."
|
|
},
|
|
entitlements="entitlements.plist"
|
|
) |