neotalk/packaging/neotalk.spec
Andros Fenollosa 41966a4a10 Add app icon (two-bubble P2P mark) for macOS and Windows
SVG source plus generated .icns/.ico, wired into the PyInstaller spec, and a
make-icons.sh to regenerate them from the SVG.
2026-08-21 10:05:18 +02:00

80 lines
1.6 KiB
Python

# -*- mode: python ; coding: utf-8 -*-
"""Cross-platform PyInstaller spec.
Run from the repository root:
pyinstaller packaging/neotalk.spec
On macOS it produces ``dist/neotalk.app``; on Windows a single
``dist/neotalk.exe``.
"""
import sys
from pathlib import Path
ROOT = Path(SPECPATH).parent # noqa: F821 - SPECPATH is injected by PyInstaller
ENTRY = str(ROOT / "packaging" / "entry.py")
SRC = str(ROOT / "src")
IS_MACOS = sys.platform == "darwin"
a = Analysis(
[ENTRY],
pathex=[SRC],
binaries=[],
datas=[],
hiddenimports=[],
hookspath=[],
hooksconfig={},
runtime_hooks=[],
excludes=[],
noarchive=False,
optimize=0,
)
pyz = PYZ(a.pure)
ICON_MACOS = str(ROOT / "assets" / "icon.icns")
ICON_WINDOWS = str(ROOT / "assets" / "icon.ico")
if IS_MACOS:
# One-dir build wrapped in an .app bundle.
exe = EXE(
pyz,
a.scripts,
[],
exclude_binaries=True,
name="neotalk",
debug=False,
strip=False,
upx=False,
console=False,
)
coll = COLLECT(
exe,
a.binaries,
a.datas,
strip=False,
upx=False,
name="neotalk",
)
app = BUNDLE(
coll,
name="neotalk.app",
icon=ICON_MACOS,
bundle_identifier="dev.andros.neotalk",
)
else:
# Single self-contained neotalk.exe on Windows.
exe = EXE(
pyz,
a.scripts,
a.binaries,
a.datas,
[],
name="neotalk",
debug=False,
strip=False,
upx=False,
console=False,
icon=ICON_WINDOWS,
)