# -*- mode: python ; coding: utf-8 -*- # # PyInstaller spec for Better Claude Config. # # macOS → onedir build wrapped in a .app bundle (double-click native) # Windows → onefile .exe (no console window) # Linux → onefile binary (no console window) # # Build: # pip install pyinstaller # pyinstaller bcc.spec # # Output: # macOS → dist/BetterClaudeConfig.app # Windows → dist/BetterClaudeConfig.exe # Linux → dist/BetterClaudeConfig import sys APP_NAME = "BetterClaudeConfig" BUNDLE_ID = "com.betterclaude.config" if sys.platform == "darwin": icon = "icons/app.icns" elif sys.platform == "win32": icon = "icons/app.ico" else: icon = None # Linux: icon embedded via .desktop file, not the binary a = Analysis( ["bcc.py"], pathex=[], binaries=[], datas=[("icons", "icons")], hiddenimports=[], hookspath=[], hooksconfig={}, runtime_hooks=[], excludes=["_tkinter", "tkinter"], noarchive=False, ) pyz = PYZ(a.pure) if sys.platform == "darwin": # ------------------------------------------------------------------ macOS # onedir so PyInstaller produces a proper .app bundle structure. exe = EXE( pyz, a.scripts, [], exclude_binaries=True, name=APP_NAME, debug=False, bootloader_ignore_signals=False, strip=False, upx=False, console=False, argv_emulation=True, # lets macOS open files by passing argv target_arch=None, codesign_identity=None, entitlements_file=None, icon=icon, ) coll = COLLECT( exe, a.binaries, a.datas, strip=False, upx=False, upx_exclude=[], name=APP_NAME, ) app = BUNDLE( coll, name=f"{APP_NAME}.app", icon=icon, bundle_identifier=BUNDLE_ID, info_plist={ "CFBundleName": "Better Claude Config", "CFBundleDisplayName": "Better Claude Config", "CFBundleShortVersionString": "1.2.1", "CFBundleVersion": "1.2.1", "NSHighResolutionCapable": True, "NSRequiresAquaSystemAppearance": False, # supports dark mode "LSMinimumSystemVersion": "11.0", }, ) else: # ----------------------------------------------- Windows / Linux (onefile) exe = EXE( pyz, a.scripts, a.binaries, a.datas, [], name=APP_NAME, debug=False, bootloader_ignore_signals=False, strip=False, upx=False, # UPX can strip icon resources from the PE on Windows upx_exclude=[], runtime_tmpdir=None, console=False, disable_windowed_traceback=False, argv_emulation=False, target_arch=None, codesign_identity=None, entitlements_file=None, icon=icon, )