Skip to content

win: Fix standalone installer MSVC runtime and build the installer in CI#12

Open
wenzeslaus wants to merge 5 commits into
mainfrom
fix-msvc-runtime-dll-sizes
Open

win: Fix standalone installer MSVC runtime and build the installer in CI#12
wenzeslaus wants to merge 5 commits into
mainfrom
fix-msvc-runtime-dll-sizes

Conversation

@wenzeslaus

Copy link
Copy Markdown
Owner

This fixes the standalone Windows installer and adds a CI workflow that builds it, so the fix (and future installer changes) can be tested from CI artifacts.

Installer fix (mswindows/GRASS-Installer.nsi.tmpl)

  • Update the MSVC runtime archive to msvcrt2019-14.2-2.tar.bz2 as published on download.osgeo.org, and correct the download size (920 KB, verified against the server) and unpacked size shown by the installer.
  • Run g.mkfontcap in a new hidden -RunMkFontCap section placed after the Microsoft runtime section, so the runtime DLLs it needs are already installed when it runs. Previously it ran at the end of the GRASS section, before the runtime download, which is part of [Bug] install of WinGRASS-8.5dev-a277d8547c-18-Setup VCRUNTIME140.dll not found error OSGeo/grass#5663.

CI workflow (.github/workflows/windows-installer.yml)

New workflow that builds the NSIS standalone installer and uploads WinGRASS-*-Setup.exe as an artifact (7-day retention). It mirrors the production flow of wingrass-maintenance-scripts:

  1. Same MSYS2/OSGeo4W setup as the OSGeo4W workflow, but calling mswindows/osgeo4w/build_osgeo4w.sh directly to skip the UNITTEST additions that would otherwise end up in the package.
  2. make install into C:\OSGeo4W\apps\grass\grassXY plus the packaging fixups from mswindows/osgeo4w/package.sh (config.h switch, etc/grass.py -> etc/grassXY.py rename that the generated launcher depends on, MinGW runtime DLLs copied into the package bin). The MSVC .lib generation is skipped as it is only needed for the OSGeo4W package.
  3. GRASS-Packager.bat, followed by a content sanity check (xcopy failures do not stop the batch file).
  4. makensis with the AccessControl and untgz plugins (not bundled with NSIS; downloaded with pinned SHA256 checksums, unicode DLLs installed into Plugins\x86-unicode as described in the Trac wiki).

The workflow triggers on changes under mswindows/**, changes to the workflow itself, and manual dispatch. Note that the makensis step uses the solid LZMA compression from the installer script and may take a while on a hosted runner.

The CI workflow was written with the assistance of Claude Code.

🤖 Generated with Claude Code

wenzeslaus and others added 4 commits July 12, 2026 05:15
…stall

The msvcrt2019 archive published on download.osgeo.org changed to
msvcrt2019-14.2-2.tar.bz2; update the archive name and the download and
unpacked sizes reported by the installer to match it.

Run g.mkfontcap in a hidden section placed after the Microsoft runtime
section so that the runtime DLLs it needs are already installed when it
runs (OSGeo#5663).
Build the NSIS-based standalone installer and upload it as an artifact
so that changes to the installer can be tested without a local
MSYS2/OSGeo4W setup. The job mirrors the flow used by
wingrass-maintenance-scripts: build with the OSGeo4W scripts, make
install into the OSGeo4W tree with the packaging fixups from
mswindows/osgeo4w/package.sh, run GRASS-Packager.bat, and compile
GRASS-Installer.nsi with the AccessControl and untgz NSIS plugins.

The workflow runs only for changes under mswindows or to the workflow
itself, and on manual dispatch.

Written with the assistance of Claude Code.
Add g.md2man, a Markdown to groff converter reusing the g.html2man
groff formatter, and switch the Autotools man page build from the
HTML sources to the generated markdown. Man pages no longer depend
on the HTML build.

The converter code was generated with AI assistance (Claude Fable)
and reviewed with several rounds of AI-assisted review.
The OSGeo4W CI build script removes etc/fontcap from the dist tree so
that the test tree regenerates it on first run, but make install
requires the file and has no rule to rebuild it from the top-level
Makefile. Rebuild it with the g.mkfontcap Makefile before make install.

Also set PYTHONHOME like the build script does so the OSGeo4W Python
used by make install finds its standard library.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants