This procedure puts pandite in the Microsoft Store. pandite is a Win32 desktop program in an MSIX package. The build makes unsigned packages, because the Store signs every package that it accepts.
The manifest packaging/windows/AppxManifest.xml contains three
placeholder values. Partner Center gives the real values when you reserve
the app name. Do not write these values into the manifest. Give them to
the build script.
| Manifest value | Placeholder in the manifest | Name in Partner Center | Environment variable or repository variable | Script argument |
|---|---|---|---|---|
Identity Name |
REPLACE-ME.pandite |
Package/Identity/Name | PANDITE_MSIX_IDENTITY_NAME |
--identity-name |
Identity Publisher |
CN=REPLACE-ME-PUBLISHER-ID |
Package/Identity/Publisher | PANDITE_MSIX_PUBLISHER |
--publisher |
PublisherDisplayName |
REPLACE-ME publisher display name |
Package/Properties/PublisherDisplayName | PANDITE_MSIX_PUBLISHER_DISPLAY_NAME |
--publisher-display-name |
The script packaging/windows/build-msix.mjs also sets the package
version from the app version (0.1.0 becomes 0.1.0.0) and the processor
architecture (x64 or arm64).
pandite and select Check availability.packaging/windows/AppxManifest.xml in three places:
the <DisplayName> element, the DisplayName attribute of
uap:VisualElements and the ShortName attribute of uap:DefaultTile.
The Store rejects a package whose display name is not a reserved name.Use one of the two procedures.
PANDITE_MSIX_IDENTITY_NAMEPANDITE_MSIX_PUBLISHERPANDITE_MSIX_PUBLISHER_DISPLAY_NAMEpandite-<version>-windows.msixbundle. This bundle contains
the x64 and the ARM64 package.You need Node.js, Rust and the Windows SDK. See building.md.
Set the three values, and link the C runtime statically:
$env:PANDITE_MSIX_IDENTITY_NAME = "<Package/Identity/Name>"
$env:PANDITE_MSIX_PUBLISHER = "<Package/Identity/Publisher>"
$env:PANDITE_MSIX_PUBLISHER_DISPLAY_NAME = "<Package/Properties/PublisherDisplayName>"
$env:RUSTFLAGS = "-C target-feature=+crt-static"
Build the x64 package:
node packaging/windows/build-msix.mjs --build --require-identity
Build the ARM64 package:
rustup target add aarch64-pc-windows-msvc
node packaging/windows/build-msix.mjs --build --require-identity --target aarch64-pc-windows-msvc
Bundle the two packages. Replace 0.1.0 with the version:
node packaging/windows/build-msix.mjs --bundle dist/pandite-0.1.0-x86_64-windows.msix dist/pandite-0.1.0-aarch64-windows.msix
dist\pandite-0.1.0-windows.msixbundle.With --require-identity, the script stops when a value is missing or when
the program needs the Visual C++ Redistributable. Without it, the script
keeps the placeholders and prints a note. The Store rejects a package that
contains the placeholders.
An unsigned package does not install. To test the package before you submit it, sign a copy with a test certificate. The certificate subject must be equal to the Publisher value.
Make a test certificate. Replace <Publisher> with the Publisher value,
for example CN=12345678-ABCD-1234-ABCD-1234567890AB:
$cert = New-SelfSignedCertificate -Type Custom -Subject "<Publisher>" -KeyUsage DigitalSignature -FriendlyName "pandite test signing" -CertStoreLocation "Cert:\CurrentUser\My" -TextExtension @("2.5.29.37={text}1.3.6.1.5.5.7.3.3", "2.5.29.19={text}")
$password = ConvertTo-SecureString -String "<password>" -Force -AsPlainText
Export-PfxCertificate -Cert $cert -FilePath pandite-test.pfx -Password $password
Export-Certificate -Cert $cert -FilePath pandite-test.cer
Import-Certificate -FilePath pandite-test.cer -CertStoreLocation Cert:\LocalMachine\TrustedPeople
Sign a copy of the package:
Copy-Item dist\pandite-0.1.0-x86_64-windows.msix dist\pandite-test.msix
$env:PANDITE_SIGN_PASSWORD = "<password>"
node packaging/windows/sign-msix.mjs --pfx pandite-test.pfx dist\pandite-test.msix
dist\pandite-test.msix and select Install.Optional: run the Windows App Certification Kit on the signed package:
& "C:\Program Files (x86)\Windows Kits\10\App Certification Kit\appcert.exe" test -appxpackagepath dist\pandite-test.msix -reportoutputpath $env:TEMP\pandite-wack.xml
When the repository has the two secrets below, the Release workflow also
adds a signed pandite-<version>-<arch>-windows-sideload.msix for each
architecture. Users who trust your certificate can install these files
without the Store.
| Secret | Value |
|---|---|
PANDITE_SIGNING_CERT_BASE64 |
The .pfx file in base64 |
PANDITE_SIGNING_CERT_PASSWORD |
The .pfx password |
Write the base64 text of the .pfx file to a text file:
[Convert]::ToBase64String([IO.File]::ReadAllBytes((Resolve-Path pandite-test.pfx))) | Set-Content pandite-test.pfx.txt
pandite-test.pfx.txt into PANDITE_SIGNING_CERT_BASE64.pandite-test.pfx.txt.The Store packages stay unsigned. The workflow does not need these secrets.
pandite-<version>-windows.msixbundle.Cargo.toml. The fourth number of the
package version is always 0.Partner Center asks why the app uses runFullTrust. Use this text:
pandite is a desktop image viewer written in Rust. It is a native Win32 program in an MSIX package, so it needs runFullTrust to run as a desktop app. It opens the image that the user selects or double-clicks. It reads the other images in the same folder to show the next image and the thumbnail strip. It writes image files only where the user saves them. pandite declares no network capability and does not use the network.
Use this text in Submission options, Notes for certification:
pandite is an offline image viewer. No account, sign-in or network is needed. To test: start pandite, press Ctrl+O and open a JPEG or PNG image. Press the Right arrow key to show the next image in the folder. Press F1 to see all keyboard shortcuts. HEIC files open only when the HEIF Image Extensions and HEVC Video Extensions from the Microsoft Store are installed.
Use this text where a privacy statement is necessary:
pandite does not collect, store or send personal information. It has no telemetry and no advertising, and it does not use the network. pandite keeps its settings (window size and position, and similar preferences) in a settings file on your computer.
README.md.