Skip to content

Create the installer exe

The installer is an Inno Setup package (GitM.Installer/GitM.iss) that bundles the add-in DLLs, registers the COM add-in with SolidWorks, and ships the offline documentation. The output is the single GitM-Setup-<version>.exe that customers run.


Prerequisites

Requirement Notes
Inno Setup 6.x The compiler (ISCC.exe)
A clean Release build Build the GitM add-in first
MkDocs (optional) To bundle the offline docs — pip install mkdocs-material

Steps

1. Build the add-in (Release)

The installer's [Files] section reads from GitM.SolidWorks/bin/Release/net48/. Build it first:

dotnet build GitM.SolidWorks/GitM.SolidWorks.csproj -c Release --no-incremental

The installer bundles the built MkDocs site into {app}\docs so the ? → Help button works when the live site is unreachable. From the repo root:

mkdocs build        # outputs to ./site

If you skip this, the installer still compiles (the docs source is flagged skipifsourcedoesntexist), but no offline docs are bundled.

3. Bump the version — one place

To cut a new release, change the single <Version> line in Directory.Build.props at the repo root. That value flows into the add-in assemblies and the ? version, and GitM.iss reads it straight back off the built GitM.Core.dll (AppVersion, AppVerName, OutputBaseFilename, and the welcome text all derive from it). You do not edit GitM.iss for a version bump.

The version bump is a deliberate, explicit action — it is never auto-incremented on a build. Build identity (git hash + date) is stamped automatically into the assembly and shown under ? → Version, so individual builds are still uniquely traceable without touching the SemVer number.

4. Compile

Open GitM.iss in the Inno Setup IDE and Build → Compile, or from the CLI:

ISCC.exe GitM.Installer\GitM.iss

The output is written to GitM.Installer/Output/GitM-Setup-<version>.exe.


What the installer does at runtime

  • Checks prerequisites and aborts with a clear message if any are missing: .NET Framework 4.8, Git for Windows, Git LFS.
  • Installs the DLLs to {autopf}\GitM (Program Files) — requires admin.
  • Registers the COM add-in with RegAsm.exe /codebase and writes the SolidWorks add-in registry keys (both HKCU and HKLM) so SolidWorks loads GitM on next launch.
  • Bundles offline docs to {app}\docs.
  • On uninstall, unregisters the add-in and removes the bundled docs.

If COM registration is incomplete (e.g. the installer wasn't run elevated), SolidWorks won't load GitM. The installer warns about this at the end; the fix is to re-run as Administrator.


Distribute

Publish the .exe to the GitM repository's GitHub Releases (the installer's AppUpdatesURL points customers there). Customers install it per Installation; IT admins roll it out per Deploy GitM across machines.

The publisher URLs baked into the installer (AppPublisherURL, AppSupportURL, AppUpdatesURL) point at github.com/suchahit/GitM. If you move to a new account, update these — see Migrate the publisher account.