repackage as CIMTechniques Service Suite (shell entry, fonts path, installer)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-06-02 12:03:28 -04:00
parent 589551cdfe
commit 603d12c52b
5 changed files with 23 additions and 23 deletions

View File

@@ -1,28 +1,28 @@
; Inno Setup script for the DA-12 Service Tool.
; Inno Setup script for the CIMTechniques Service Suite.
;
; Prerequisite: build the app first with PyInstaller (see packaging\da12_service.spec), which
; produces packaging\dist\DA12-Service\. Then compile this script with Inno Setup:
; Prerequisite: build the app first with PyInstaller (see packaging\suite.spec), which
; produces packaging\dist\CIM-Service-Suite\. Then compile this script with Inno Setup:
; "C:\Program Files (x86)\Inno Setup 6\ISCC.exe" packaging\installer.iss
; Output: packaging\Output\DA12-Service-Setup.exe
; Output: packaging\Output\CIM-Service-Suite-Setup.exe
;
; This installs the self-contained PyInstaller folder to Program Files with a
; Start-menu shortcut. No VB6 runtime / OCX registration required.
#define AppName "DA-12 Service Tool"
#define AppVersion "3.0.0"
#define AppName "CIMTechniques Service Suite"
#define AppVersion "0.1.0"
#define AppPublisher "CIMTechniques, Inc."
#define AppExeName "DA12-Service.exe"
#define AppExeName "CIM-Service-Suite.exe"
[Setup]
AppId={{B6E4A1C2-3F4D-4E8A-9B12-DA12SERVICE000}}
AppName={#AppName}
AppVersion={#AppVersion}
AppPublisher={#AppPublisher}
DefaultDirName={autopf}\DA12 Service Tool
DefaultDirName={autopf}\CIMTechniques Service Suite
DefaultGroupName={#AppName}
DisableProgramGroupPage=yes
OutputDir=Output
OutputBaseFilename=DA12-Service-Setup
OutputBaseFilename=CIM-Service-Suite-Setup
Compression=lzma2
SolidCompression=yes
WizardStyle=modern
@@ -35,7 +35,7 @@ ArchitecturesInstallIn64BitMode=x64compatible
Name: "english"; MessagesFile: "compiler:Default.isl"
[Files]
Source: "dist\DA12-Service\*"; DestDir: "{app}"; Flags: recursesubdirs createallsubdirs
Source: "dist\CIM-Service-Suite\*"; DestDir: "{app}"; Flags: recursesubdirs createallsubdirs
[Icons]
Name: "{group}\{#AppName}"; Filename: "{app}\{#AppExeName}"

View File

@@ -1,9 +1,9 @@
# PyInstaller spec for the DA-12 Service Tool.
# 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\da12_service.spec
# Output: packaging\dist\DA12-Service\DA12-Service.exe
# .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).
@@ -18,13 +18,13 @@ _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", "modules", "da12", "ui", "theme", "fonts")
_font_src = os.path.join(_repo_root, "cim_suite", "core", "ui", "theme", "fonts")
a = Analysis(
[os.path.join(SPECPATH, "da12_launcher.py")],
[os.path.join(SPECPATH, "suite_launcher.py")],
pathex=[_repo_root],
binaries=[],
datas=[(_font_src, os.path.join("cim_suite", "modules", "da12", "ui", "theme", "fonts"))],
datas=[(_font_src, os.path.join("cim_suite", "core", "ui", "theme", "fonts"))],
hiddenimports=["serial.tools.list_ports"],
hookspath=[],
runtime_hooks=[],
@@ -50,7 +50,7 @@ exe = EXE(
a.scripts,
[],
exclude_binaries=True,
name="DA12-Service",
name="CIM-Service-Suite",
debug=False,
bootloader_ignore_signals=False,
strip=False,
@@ -66,5 +66,5 @@ coll = COLLECT(
a.datas,
strip=False,
upx=False,
name="DA12-Service",
name="CIM-Service-Suite",
)

View File

@@ -1,4 +1,4 @@
"""PyInstaller entry point.
"""Suite PyInstaller entry point.
Kept separate from ``cim_suite/modules/da12/app.py`` on purpose: PyInstaller runs its
entry script as ``__main__`` with no package context, which breaks the relative imports

View File

@@ -9,7 +9,7 @@ dependencies = ["PySide6>=6.7", "pyserial>=3.5"]
dev = ["pytest>=8", "pytest-qt>=4.4", "ruff>=0.6", "pyinstaller>=6.10"]
[project.scripts]
cim-suite = "cim_suite.modules.da12.app:main"
cim-suite = "cim_suite.shell.app:main"
[build-system]
requires = ["setuptools>=68"]

View File

@@ -14,15 +14,15 @@ import sys
from pathlib import Path
REPO_ROOT = Path(__file__).resolve().parent.parent
LAUNCHER = REPO_ROOT / "packaging" / "da12_launcher.py"
LAUNCHER = REPO_ROOT / "packaging" / "suite_launcher.py"
def test_launcher_boots_as_script_without_import_error():
env = {**os.environ, "DA12_SELFTEST": "1", "QT_QPA_PLATFORM": "offscreen"}
env = {**os.environ, "SUITE_SELFTEST": "1", "QT_QPA_PLATFORM": "offscreen"}
# Run from a neutral cwd so success depends on the package being importable,
# not on the current directory.
proc = subprocess.run(
[sys.executable, str(LAUNCHER), "--simulate"],
[sys.executable, str(LAUNCHER), "--module", "da12", "--simulate"],
cwd=str(REPO_ROOT / "packaging"),
env=env,
capture_output=True,