Repository navigation
Windows MSI installer, uploaded by release.sh (0.9.16) - #158
Open
jacques-pr wants to merge 2 commits into
Open
jacques-pr wants to merge 2 commits into
jacques-pr wants to merge 2 commits into
Conversation
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>
Collaborator
Author
|
The Generated by Claude Code |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes
A Windows installer built on Windows, so it can be copied to the release machine's
distand uploaded with the other packages.Windows\build.ps1 -Msibuilds the service and then runs the newWindows\package.ps1, which writesdist\Tokenmeter-<version>-windows-x64.msi(-arm64on 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 fromApp\StatusJSON.swift(what the service reports) unless-Versionis given.tokenmeter.exe, the DLLs the build left beside it, every DLL of the Swift runtime the build used (the folder ofswiftCore.dllin PATH), Microsoft's C++ runtime from the VS build tools, andinstall.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'sWixQuietExec(no console window): stop the running service before files are replaced/removed; after install runinstall.ps1 -Msi(logon scheduled task, or Startup shortcut fallback, then start it); on a real uninstall runinstall.ps1 -Msi -Uninstall.LOCALONLY=1maps to-LocalOnly. Usage history is untouched.install.ps1 -Msi: skips copying (files are already there), registers + starts, doesn't wait for the answer; with-Uninstallit leaves the files to the installer. The shortcut fallback starts the service through WMI so it doesn't hold the installer's output handles. Plaininstall.ps1behaves as before.scripts/release.sh: already uploaded anyTokenmeter-<version>-*file; now it also lists the Windows installer when it's missing, and the help names it.docs/wiki/Windows.md(install from a release, making the MSI, optional signing),Development.mdReleases, README Windows line.Checks
scripts/release.sh --dry-runon a stand-in dist (sh, dash, bash): picks upTokenmeter-0.9.16-windows-x64.msi, and lists it as missing when absent.Tokenmeter.wxsis well-formed XML (xmllint).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, thenmsiexec /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