Add cross-platform packaging, icons, and Claude Code config discovery
- Auto-discovers Claude Code (~/.claude/settings.json) alongside Claude Desktop - Generated icons/app.icns (macOS) and icons/app.ico (Windows) from rounded PNGs - bcc.spec: PyInstaller spec for all platforms (.app on macOS, onefile on Windows/Linux) - .github/workflows/release.yml: builds and publishes GitHub Release on version tags - scripts/build_icons.py: regenerates icon files from source PNGs - requirements-dev.txt: adds pyinstaller and pillow for building - CLAUDE.md: initial repo guidance for Claude Code Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,111 @@
|
||||
# -*- 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=[],
|
||||
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.0.0",
|
||||
"CFBundleVersion": "1.0.0",
|
||||
"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=True,
|
||||
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,
|
||||
)
|
||||
Reference in New Issue
Block a user