Skip to content

Windows MSI installer, uploaded by release.sh (0.9.16) - #158

Open
jacques-pr wants to merge 2 commits into
mainfrom
claude/project-thread-6fjjfj
Open

jacques-pr wants to merge 2 commits into
mainfrom
claude/project-thread-6fjjfj

Conversation

@jacques-pr

@jacques-pr jacques-pr commented Dec 1, 2026 •

Copy link
Copy Markdown
Collaborator

What changes

A Windows installer built on Windows, so it can be copied to the release machine's dist and uploaded with the other packages.

  • Windows\build.ps1 -Msi builds the service and then runs the new Windows\package.ps1, which writes dist\Tokenmeter-<version>-windows-x64.msi (-arm64 on an Arm PC) with WiX Toolset 5 (dotnet tool install --global wix --version 5.0.2; the Util extension is added on first run). The version comes from App\StatusJSON.swift (what the service reports) unless -Version is given.
  • What the MSI holds: tokenmeter.exe, the DLLs the build left beside it, every DLL of the Swift runtime the build used (the folder of swiftCore.dll in PATH), Microsoft's C++ runtime from the VS build tools, and install.ps1. So the target PC needs neither Swift nor the VC++ redistributable.
  • Windows\Tokenmeter.wxs: per-user (Scope="perUser", no admin) into %LOCALAPPDATA%\Tokenmeter, fixed UpgradeCode, MajorUpgrade (same version reinstalls too), Add/Remove Programs entry "Tokenmeter Service". Custom actions via WiX's WixQuietExec (no console window): stop the running service before files are replaced/removed; after install run install.ps1 -Msi (logon scheduled task, or Startup shortcut fallback, then start it); on a real uninstall run install.ps1 -Msi -Uninstall. LOCALONLY=1 maps to -LocalOnly. Usage history is untouched.
  • install.ps1 -Msi: skips copying (files are already there), registers + starts, doesn't wait for the answer; with -Uninstall it leaves the files to the installer. The shortcut fallback starts the service through WMI so it doesn't hold the installer's output handles. Plain install.ps1 behaves as before.
  • scripts/release.sh: already uploaded any Tokenmeter-<version>-* file; now it also lists the Windows installer when it's missing, and the help names it.
  • Docs: docs/wiki/Windows.md (install from a release, making the MSI, optional signing), Development.md Releases, README Windows line.
  • Version 0.9.16.

Checks

  • scripts/release.sh --dry-run on a stand-in dist (sh, dash, bash): picks up Tokenmeter-0.9.16-windows-x64.msi, and lists it as missing when absent.
  • Tokenmeter.wxs is well-formed XML (xmllint).
  • Not checked: nothing here ran on Windows. package.ps1, the WiX build and the MSI's install/upgrade/uninstall need a first run on J's Windows VM (Windows\build.ps1 -Msi, then msiexec /i dist\Tokenmeter-0.9.16-windows-x64.msi /l*v install.log). scripts/check.sh not run (the only Swift change is the version string).

Generated by Claude Code

claude and others added 2 commits December 1, 2026 17:20
Windows\build.ps1 -Msi (or Windows\package.ps1 after a build) packs the
service as dist\Tokenmeter-<version>-windows-x64.msi with WiX Toolset 5:
a per-user MSI into %LOCALAPPDATA%\Tokenmeter with tokenmeter.exe, the
build's DLLs, the Swift runtime and the MSVC C++ runtime. install.ps1 -Msi,
installed beside it, sets up the logon task (or Startup shortcut) and
starts the service; on uninstall it stops it and removes the start at
login. Fixed UpgradeCode, version from App/StatusJSON.swift, LOCALONLY=1
for -LocalOnly. scripts/release.sh lists the MSI as missing when absent
(it already uploads Tokenmeter-<version>-* files). Docs: Windows.md,
Development.md, README.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EE8zWAHw1r9vF2poUMU2hD
Co-Authored-By: tokenmeter1 <358883051+tokenmeter1@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EE8zWAHw1r9vF2poUMU2hD
Co-Authored-By: tokenmeter1 <358883051+tokenmeter1@users.noreply.github.com>
@jacques-pr jacques-pr changed the title Windows MSI installer, uploaded by release.sh (0.9.15) Windows MSI installer, uploaded by release.sh (0.9.16) Dec 1, 2026

Copy link
Copy Markdown
Collaborator Author

The android job fails in "Pairing and signing against the service": the POST /mesh {"viewerCode":true} curl returns an HTTP error (exit 22), after the service build succeeded. This PR doesn't touch the service, the mesh or Android (only Windows scripts, release.sh, docs and the version string). The same step fails the same way on #156 (exit 22, 10 s after the build), and passes on main at 6c0fdb2 and on #157, so it looks like a timing problem in that step rather than this change. I'll re-run the job once when the rest of the workflow finishes.


Generated by Claude Code

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.

2 participants