Skip to content

feat(packaging): add a portable Windows build - #633

Open
jsschwrz wants to merge 1 commit into
Cephla-Lab:masterfrom
jsschwrz:feat/packaging-portable-windows
Open

feat(packaging): add a portable Windows build#633
jsschwrz wants to merge 1 commit into
Cephla-Lab:masterfrom
jsschwrz:feat/packaging-portable-windows

Conversation

@jsschwrz

@jsschwrz jsschwrz commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Copying this folder to another Windows machine has never worked: there is no
venv and no lockfile, so every dependency lives in a user-scoped Python 3.12
install outside the repo. Re-pointing a shortcut at main_hcs.py fails on the
first third-party import.

Add a build script that produces a relocatable bundle (~287 MB zipped) carrying
the interpreter, all 150 dependencies and the app, launched by a Squid.cmd that
pins the bundled interpreter and sets CWD to software/ -- both of which the app
requires and neither of which a bare shortcut provides.

The script copies the known-good 3.12 tree rather than resolving a fresh
environment, because the live dependency set has drifted from setup_22.04.sh
(which still pins numpy<2 and napari==0.5.4). requirements-windows.txt records
what actually runs; it sits at the repo root because software/.gitignore
ignores *.txt.

Also rewrite default_saving_path to a bare "Downloads" in the bundle. The guard
in control/_def.py strips slashes but not a "C:" drive prefix, so a foreign
absolute path is concatenated into garbage rather than falling back.

check_drivers.py verifies interpreter, dependencies, both camera libraries and
the serial port, which separates a driver problem from a Python problem on a
freshly copied bundle where pythonw.exe would otherwise fail silently.

The Daheng Galaxy SDK stays a target-machine prerequisite: gxipy loads
GxIAPI.dll by bare name off the system PATH and ships a kernel-mode USB driver,
so it cannot travel in a zip. The Toupcam DLL loads file-relative and does.

Co-Authored-By: Claude Opus 5 (1M context) noreply@anthropic.com

Copying this folder to another Windows machine has never worked: there is no
venv and no lockfile, so every dependency lives in a user-scoped Python 3.12
install outside the repo. Re-pointing a shortcut at main_hcs.py fails on the
first third-party import.

Add a build script that produces a relocatable bundle (~287 MB zipped) carrying
the interpreter, all 150 dependencies and the app, launched by a Squid.cmd that
pins the bundled interpreter and sets CWD to software/ -- both of which the app
requires and neither of which a bare shortcut provides.

The script copies the known-good 3.12 tree rather than resolving a fresh
environment, because the live dependency set has drifted from setup_22.04.sh
(which still pins numpy<2 and napari==0.5.4). requirements-windows.txt records
what actually runs; it sits at the repo root because software/.gitignore
ignores *.txt.

Also rewrite default_saving_path to a bare "Downloads" in the bundle. The guard
in control/_def.py strips slashes but not a "C:" drive prefix, so a foreign
absolute path is concatenated into garbage rather than falling back.

check_drivers.py verifies interpreter, dependencies, both camera libraries and
the serial port, which separates a driver problem from a Python problem on a
freshly copied bundle where pythonw.exe would otherwise fail silently.

The Daheng Galaxy SDK stays a target-machine prerequisite: gxipy loads
GxIAPI.dll by bare name off the system PATH and ships a kernel-mode USB driver,
so it cannot travel in a zip. The Toupcam DLL loads __file__-relative and does.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant