Microsoft Store package
此内容尚不支持你的语言。
本站中文版由 AI 辅助翻译。报告翻译问题
The Microsoft Store is a second way to install Keymotion, beside the installer on GitHub. Microsoft signs every package it publishes, so Windows trusts the Store copy without a warning. The program is the same in both: the Store package holds the keymotion.exe that tauri build makes, and nothing in the GitHub release changes.
What the Store build does differently
Section titled “What the Store build does differently”The app tells the two apart while it runs, by the package identity Windows gives a program installed from an MSIX (crates/kb-winsys/src/package.rs, app/src-tauri/src/channel.rs). Only a package that holds the running keymotion.exe counts, so a development build started from another packaged app never takes that app’s package for its own.
| GitHub (installer, development build) | Microsoft Store | |
|---|---|---|
| Updates | The app’s updater, from GitHub releases: Settings › About › Updates chooses update automatically, let me know or off | The Store. The updater stays off; Settings › About opens the Store’s updates page. The app registers with RegisterApplicationRestart, so it opens again, hidden, after Windows closes it to install a Store update. |
| Notification buttons | Open the app’s own keymotion: addresses (crates/kb-winsys/src/protocol.rs), registered per user at start and removed by the uninstaller |
No keymotion: address; a click starts the app the package’s way |
| Start with Windows | A value in the per-user Run key, with --hidden |
The package’s startup task (KeymotionStartup), also with --hidden. If the user turns it off in Windows’ settings, only they can turn it on again there; Settings › Background then links to that page. |
| Notification name and logo | Registered at start under the app id dev.keymotion |
The package’s own |
| Data folders | %APPDATA%\dev.keymotion, %LOCALAPPDATA%\dev.keymotion |
The same paths, as the app sees them. Where the folders were not there before, Windows keeps them in the package’s own folder (%LOCALAPPDATA%\Packages\<package family>\LocalCache\…) and removes them with the app; “Open folder” opens that folder. |
| Privacy text in Settings | Mentions the update check on GitHub | Says the Store brings updates |
keymotion-cli (the agents’ command-line tool) |
bin\keymotion-cli.exe in the installation, on PATH once agent access is on; the uninstaller removes the agents’ connections and that PATH entry |
An app execution alias of the app, keymotion-cli (Agent command line) |
Both builds share one rule: only one Keymotion runs at a time, whichever way it was installed, since two would talk to the keyboard at once.
If Keymotion from GitHub was installed before, its folders are already there, and the Store build reads and writes them as they are: the settings carry over, and both builds share them. Windows moves only folders a package makes from nothing into the package’s own place.
Both installed
Section titled “Both installed”Left alone, both copies would start with Windows and whichever came first would run: one day the GitHub copy its updater raised, the next day the Store’s. So the GitHub copy steps aside once the Store copy is installed (app/src-tauri/src/handoff.rs), as Microsoft advises for moving users to a Store-packaged app:
- When the installed GitHub copy starts (the program in the folder its installer recorded, never a development or repository build), it looks for the Store package (
GetPackagesByPackageFamily). If it is there, it starts the Store copy withIApplicationActivationManagerand ends. - If the GitHub copy was set to start with Windows, it removes its
Runvalue and passes--take-startup: the Store copy turns its startup task on, unless the user or a policy turned it off. - A start with Windows that finds a copy already running ends quietly, and a second launch with
--hiddendoes not bring the window forward. - The Store copy’s Settings › About shows a “GitHub copy” row while the GitHub copy is installed, with a button to Windows’ Installed apps, where the user can remove it. The settings stay, as both copies share them, unless Also delete my settings and saved data is ticked in the uninstaller.
GitHub copies older than this change (1.0.0) do not step aside; their next update brings it.
The package
Section titled “The package”| File | What it is |
|---|---|
app/src-tauri/store/AppxManifest.xml |
The package manifest, with places for the identity and the version. Full trust (runFullTrust): the program runs with the user’s normal rights, as it does from the installer, which HID, the gauges and the tray need. One application, Keymotion, with the app execution alias keymotion-cli.exe that runs the console program keymotion-cli.exe (as wt.exe in Windows Terminal’s package). A second application without a Start menu entry would be a “headless app”, which Partner Center refuses without a waiver. |
app/src-tauri/store/Assets/ |
The logos in every size Windows asks for, drawn from app/src-tauri/icons/icon.png by tools/store/make-assets.py. Run it again when the icon changes. |
tools/store/msix.mjs |
Fills the manifest, indexes the logos (makepri) and packs the MSIX (makeappx) with keymotion.exe and the keymotion-cli.exe beside it (or --cli). Needs the Windows SDK. Tests: node --test "tools/store/*.test.mjs". |
.github/workflows/store.yml |
Builds the package of a released version, and its Submit job sends it for certification. |
tools/store/submit.mjs |
Submits a package through the Store’s submission API: the new package in place of the old one, “What’s new” in every listing language, and publishing held until Publish now. --status only reads a version’s submission status. Tests (with a stand-in for the Store): node --test "tools/store/*.test.mjs". |
store/whats-new/ |
The Store’s “What’s new” for each version: one plain-text file per listing language (1.2.0.en.txt, 1.2.0.tr.txt), at most 1500 characters each. The languages are listed in tools/store/whats-new.mjs. |
.github/workflows/publish.yml |
Publishes the GitHub draft once the Store has certified the same version. |
The package is not signed: the Store signs what passes certification. CI packs a test package on every change, so a manifest or logo Windows’ tools would refuse shows up before a release.
Version numbers
Section titled “Version numbers”There is one version number and one changelog for both channels. A Store package has four version parts: the fourth belongs to the Store and is always 0, and the first must be above 0. Keymotion 1.2.3 becomes package 1.2.3.0, and that is the only difference users see (in Windows’ list of installed apps).
msix.mjstakes the version fromtauri.conf.json.--versionworks only for test packages, so a Store package can never carry another number than the GitHub release of the same code.store.ymlpacks only a release tag that is onmain, so the Store never gets a version that isn’t on GitHub.- The Store has no room for test versions (
1.3.0-rc.1): they stay on GitHub. - Both channels publish a version the same day: the GitHub release waits as a draft until the Store’s copy passes certification (see Making a release). The release notes describe both; a change that concerns only one channel says so.
- A number the Store has received is never used again: if the Store turns down a package, the fix comes as the next patch version in both channels.
- Diagnostics and support requests show where the copy came from:
App version: 1.0.0 (Microsoft Store),(GitHub)or(development build).
Try the package on your computer
Section titled “Try the package on your computer”A package with a made-up identity (“Keymotion (test)”) installs without a certificate when Windows’ developer mode is on (Settings › System › For developers). It never mixes with the Store’s package.
-
Build the program and pack it:
Terminal window pnpm --dir app tauri build --no-bundlecargo build --release -p keymotion-clinode tools/store/msix.mjs --exe target/release/keymotion.exe --out target/store-test --test -
Quit Keymotion if it is running (tray icon › Quit), then install the package from its folder, in PowerShell:
Terminal window Add-AppxPackage -Register target\store-test\layout\AppxManifest.xml -
Open Keymotion (test) from the Start menu.
-
Remove it when you are done. This also removes the files it created:
Terminal window Get-AppxPackage Keymotion.StoreTest | Remove-AppxPackage
Making a release
Section titled “Making a release”A version comes out on GitHub and in the Microsoft Store the same day, so that a number is either everywhere or nowhere (owner’s decision, 2026-11-16).
-
Prepare the version on a branch from
develop(release/1.2.0). See what would change first, then let it change it:Terminal window node tools/release/prepare.mjs minor --dry-runnode tools/release/prepare.mjs minorminorandpatchcount up from the current version; a number such as2.0.0works too. Without one, the script suggests a bump: minor when Unreleased has anything besides Fixed and Security, patch when it has only those. It raises the version in the three files andCargo.lock, turns the Unreleased section of every changelog (CHANGELOG.mdand its translations) into## [1.2.0] - <date>with its links, and puts a skeleton markedTODO(release)in the release notes page of every language and in a “What’s new” file for every Store listing language. If any changelog’s Unreleased section is empty, it stops and changes nothing. -
Write the text where the skeletons are: the version’s section of the release notes page and its
descriptionline, in every language, andstore/whats-new/1.2.0.<lang>.txt: plain text of at most 1500 characters, about what the Store copy gets (leave out the GitHub copy’s own update options).node tools/release/check-release.mjspasses once nothing is left. Open the pull request intodevelop. -
Merge
developintomainwith the release pull request. CI runscheck-release.mjson every pull request intomainwhose version has no tag yet, so a skeleton can’t reach the site. -
Tag
mainon your computer, aftergit switch mainandgit pull:Terminal window node tools/release/tag.mjs --dry-runnode tools/release/tag.mjsIt checks that it is on
main’s tip with a clean working tree and that the version, the changelogs, the release notes and “What’s new” agree, then makes the annotated tagv1.2.0(“Keymotion 1.2.0”), pushes it, and opens themain→developback-merge pull request. Merge that one with a merge commit once CI is green. -
The tag builds and submits.
release.ymlchecks the text in seconds, builds the installer and drafts the GitHub release. Its Microsoft Store package job (store.yml) builds the.msixfrom the same tag, and Submit to the Microsoft Store sends it for certification: a new submission with the new package in place of the old one, “What’s new” from the files, and “Don’t publish this submission until I select Publish now”. Pre-releases skip both jobs. Leave the submission alone in Partner Center while it is checked: once changed there, the API can’t change it any more. -
When it passes certification (Microsoft allows up to three working days; the Store sends an email), go to GitHub › Actions › Publish a release › Run workflow. Set “Use workflow from” to the tag (Tags ›
v1.2.0), type the same tag, untick Only check, and run it. It reads the submission’s status and publishes the GitHub draft only if the Store has certified the version. Then select Publish now in Partner Center › Keymotion: the API has no way to do it.
- A submission is already pending (one started in Partner Center, or left by an earlier run): the Submit job stops and changes nothing; it never deletes a submission. Finish or delete that submission in Partner Center, then re-run the job, or upload the package by hand (below).
- Uploading by hand (no Store secrets, or a failed Submit job): download the
.msixfrom the run’s artifacts. In Partner Center, start a new submission for Keymotion: under Packages, upload the.msixand remove the previous one; fill in “What’s new” fromstore/whats-new; under Submission options, choose “Don’t publish this submission until I select Publish now”. Submit it. - The Store turns down the package. Fix it in the next patch version and release that in both channels. The turned-down number is published nowhere; its changelog section moves to the new number. A rejection about the listing only (text, screenshots) needs no new package.
- An urgent fix (a crash, a security problem) may be published on GitHub first; its release notes say the Store follows.
- The Store job can also be run by hand: GitHub › Actions › Microsoft Store package, with the release tag (
v1.2.3). It submits only when “Use workflow from” is that same tag. - Only check: Publish a release with Only check ticked (the default) reads the status and publishes nothing.
The workflow needs three repository variables, copied exactly from Partner Center › Keymotion › Product identity: STORE_IDENTITY_NAME, STORE_PUBLISHER and STORE_PUBLISHER_DISPLAY_NAME. They are not secrets; every package shows them.
Setting up submissions from GitHub
Section titled “Setting up submissions from GitHub”The Submit job and Publish a release sign in to the Store’s submission API as a Microsoft Entra application. Until it is set up, the Submit job only says that the secrets are missing, and the package is uploaded by hand. The project’s own script is used rather than Microsoft’s msstore tool, because that tool deletes a pending submission. Setting it up is done once, by the account owner:
-
In Partner Center, open the gear › Account settings › Tenants and create a Microsoft Entra tenant (free), or associate one you have.
-
In User management › Microsoft Entra applications, create a Microsoft Entra application (or add an existing one) and give it the Manager role.
-
Open the application and select Add new key. Note the Tenant ID, Client ID and Key: the key is shown only once. It expires; add a new one before then (a Submit job with an expired key stops at sign-in and says so).
-
On GitHub, in Settings › Environments, create the environment
microsoft-store. Under Deployment branches and tags, choose Selected branches and tags and add the tag rulev*, so only release tags can use it. Add three environment secrets:STORE_TENANT_ID,STORE_CLIENT_IDandSTORE_CLIENT_SECRET(the key). -
Try it without changing anything: run Publish a release with Only check ticked, from a release tag made since the workflow was added. It only reads the status of that version’s submission.
Two things stay in Partner Center: Publish now, which has no API, and the reason for the full trust capability (runFullTrust), which has no field in the API. Partner Center doesn’t usually ask for the reason again unless the package’s capabilities change.