Skip to content

Publish a Windows build - #18

Open
mostlydev wants to merge 2 commits into
masterfrom
feat/windows-release
Open

Publish a Windows build#18
mostlydev wants to merge 2 commits into
masterfrom
feat/windows-release

Conversation

@mostlydev

Copy link
Copy Markdown
Owner

Why

gnit publishes no Windows release asset, so there is no supported way to install it on a Windows machine. install.sh rejects the platform outright and the release matrix builds only linux-x86_64 and the two darwin targets.

That matters wherever the build hosts are Windows. On our DICOM Printer 2 build host, where.exe gnit comes back empty — so the workspace pin cannot be inspected or materialized on the machine that actually compiles the product. A build gate there had to be written against plain git instead, and the remediation it prints (gnit checkout <pin>) names a command the user cannot run.

What

  • release.yml: adds windows-latest / x86_64-pc-windows-msvc to the matrix. The Package step already runs under shell: bash, which Windows runners provide, so it needed only an .exe suffix branch.
  • install.sh: recognises the MINGW* / MSYS* / CYGWIN* uname that Git Bash reports, installs gnit.exe, skips the Unix-era nit legacy cleanup, and adds a setx hint so the install directory reaches cmd.exe and PowerShell rather than just the bash session.

No source changes were needed. symlink_dir already has a #[cfg(windows)] arm using std::os::windows::fs::symlink_dir, and sigpipe::reset() compiles to a no-op off Unix. Dependencies are all cross-platform.

Notes for review

  • Windows symlink creation requires Developer Mode or elevation, so gnit skills install may fail on a default Windows box. That is pre-existing and out of scope here; worth a follow-up if skills matter on Windows.
  • Kept .tar.gz rather than .zip for consistency, so the existing checksums.txt step and install.sh download path work unchanged.
  • Verified by workflow_dispatch on this branch before opening.

gnit had no Windows release asset, so there was no supported way to install it
on a Windows machine. That matters wherever the build hosts are Windows: the
workspace pin cannot be inspected or materialized on the machine that actually
compiles.

Adds x86_64-pc-windows-msvc to the release matrix, packaging gnit.exe, and
teaches install.sh to recognise the MINGW/MSYS/CYGWIN uname that Git Bash
reports. Git Bash is the only shell present on a stock Windows dev box, so it
is how the installer gets run there at all.

The source needed no changes: symlink_dir already has a #[cfg(windows)] arm and
sigpipe::reset() is a no-op off Unix.
GITHUB_REF_NAME is the branch on workflow_dispatch, so a branch containing a
slash produced dist/gnit-feat/windows-release-... and Package failed on every
target with no such directory. Tag builds were never affected, which is why it
went unnoticed; it means workflow_dispatch could not produce artifacts from any
branch using the conventional prefix/name form.
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