Conventional-Commit-driven version bumps (scripts/bump.py), a commit-msg validation hook, and a /release-notes workflow that produces a human-reviewed CHANGELOG.md. Adds an in-app version badge + 'What's new' dialog on the launcher. The version is single-sourced from pyproject.toml (cim_suite.__version__), and the deterministic bump backbone lives in scripts/release/ with tests in tests/release/. Marks the 1.0.0 baseline. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
85 lines
2.7 KiB
Python
85 lines
2.7 KiB
Python
# PyInstaller spec for the CIMTechniques Service Suite.
|
|
#
|
|
# One-folder build (more antivirus-friendly than --onefile and faster to start).
|
|
# Build from the repo root:
|
|
# .venv\Scripts\pyinstaller packaging\suite.spec
|
|
# Output: packaging\dist\CIM-Service-Suite\CIM-Service-Suite.exe
|
|
#
|
|
# To produce the installer afterwards, compile packaging\installer.iss with Inno
|
|
# Setup (ISCC.exe).
|
|
|
|
import os
|
|
|
|
block_cipher = None
|
|
|
|
# SPECPATH is the directory containing this .spec (…/packaging); the repo root is
|
|
# its parent and must be on pathex so `import cim_suite` resolves at build time.
|
|
_repo_root = os.path.dirname(SPECPATH)
|
|
|
|
# Bundled brand fonts (Lato) live in the theme package and must be copied into the
|
|
# frozen app at the same package-relative path so theme.fonts can find them.
|
|
_font_src = os.path.join(_repo_root, "cim_suite", "core", "ui", "theme", "fonts")
|
|
|
|
# IOModbus ships its device catalog (register maps) as a package resource; it must be
|
|
# copied into the frozen app at the same package-relative path so config.catalog_text
|
|
# (importlib.resources) can read it.
|
|
_iomodbus_res = os.path.join(_repo_root, "cim_suite", "modules", "iomodbus", "resources")
|
|
|
|
# Version is single-sourced from pyproject.toml and the "What's new" dialog renders
|
|
# CHANGELOG.md; both are read at runtime from the bundle root (sys._MEIPASS).
|
|
_pyproject = os.path.join(_repo_root, "pyproject.toml")
|
|
_changelog = os.path.join(_repo_root, "CHANGELOG.md")
|
|
|
|
a = Analysis(
|
|
[os.path.join(SPECPATH, "suite_launcher.py")],
|
|
pathex=[_repo_root],
|
|
binaries=[],
|
|
datas=[
|
|
(_font_src, os.path.join("cim_suite", "core", "ui", "theme", "fonts")),
|
|
(_iomodbus_res, os.path.join("cim_suite", "modules", "iomodbus", "resources")),
|
|
(_pyproject, "."),
|
|
(_changelog, "."),
|
|
],
|
|
hiddenimports=["serial.tools.list_ports", "openpyxl", "PySide6.QtCharts"],
|
|
hookspath=[],
|
|
runtime_hooks=[],
|
|
excludes=[
|
|
# Trim large PySide6 modules we don't use to keep the bundle smaller.
|
|
"PySide6.QtQml",
|
|
"PySide6.QtQuick",
|
|
"PySide6.QtNetwork",
|
|
"PySide6.Qt3DCore",
|
|
"PySide6.QtWebEngineCore",
|
|
"PySide6.QtWebEngineWidgets",
|
|
"PySide6.QtMultimedia",
|
|
"tkinter",
|
|
],
|
|
cipher=block_cipher,
|
|
noarchive=False,
|
|
)
|
|
pyz = PYZ(a.pure, a.zipped_data, cipher=block_cipher)
|
|
|
|
exe = EXE(
|
|
pyz,
|
|
a.scripts,
|
|
[],
|
|
exclude_binaries=True,
|
|
name="CIM-Service-Suite",
|
|
debug=False,
|
|
bootloader_ignore_signals=False,
|
|
strip=False,
|
|
upx=False,
|
|
console=False,
|
|
disable_windowed_traceback=False,
|
|
icon=None,
|
|
)
|
|
coll = COLLECT(
|
|
exe,
|
|
a.binaries,
|
|
a.zipfiles,
|
|
a.datas,
|
|
strip=False,
|
|
upx=False,
|
|
name="CIM-Service-Suite",
|
|
)
|