Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 59 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,65 @@ jobs:
- name: Build Windows Store package
run: npm run build:win:store -- --publish never

# Store certification rejected 1.9.0 under 10.1.1.11 "On Device Tiles" because
# the package carried electron-builder's vendored placeholder tiles: it reads
# them from build/appx/ and, when a name is missing there, silently substitutes
# a blank SampleAppx.*.png instead of failing. Nothing in the build output says
# so — the only way to know is to look inside the package.
#
# The expected filenames come from the generator (`--list`), NOT from build/appx/.
# Deriving them from the directory would defeat the check at the exact moment it
# matters: delete an asset there and it drops out of the expected set too, so the
# loop passes while electron-builder quietly packages a placeholder under that
# name. The generator is the authority; build/appx/ is the artifact being checked.
- name: Verify Store tiles are in the package
shell: pwsh
run: |
$expected = @(node scripts/generate-appx-assets.mjs --list)
if ($LASTEXITCODE -ne 0 -or $expected.Count -eq 0) { throw "generator produced no asset list" }

$problems = @()

# First: the committed directory must match the generator exactly. A deleted or
# hand-added PNG is caught here, before it can reach the package.
$committed = @(Get-ChildItem build/appx -Filter *.png | ForEach-Object { $_.Name })
foreach ($name in $expected) {
if ($committed -notcontains $name) { $problems += "missing from build/appx: $name" }
}
foreach ($name in $committed) {
if ($expected -notcontains $name) { $problems += "unexpected file in build/appx (run npm run assets:appx): $name" }
}

# Then: every expected asset must be in the package, byte-identical.
$appx = Get-ChildItem release -Recurse -Filter *.appx | Select-Object -First 1
if (-not $appx) { throw "no .appx found under release/" }
Add-Type -AssemblyName System.IO.Compression.FileSystem
$archive = [System.IO.Compression.ZipFile]::OpenRead($appx.FullName)
try {
# OPC parts are "/" separated, but normalise anyway rather than trust it.
$entries = @{}
foreach ($e in $archive.Entries) { $entries[$e.FullName.Replace("\", "/")] = $e }
$sha = [System.Security.Cryptography.SHA256]::Create()
foreach ($name in $expected) {
$entry = $entries["assets/$name"]
if (-not $entry) { $problems += "missing from package: $name"; continue }
$stream = $entry.Open()
try { $packaged = [BitConverter]::ToString($sha.ComputeHash($stream)) }
finally { $stream.Dispose() }
$sourceFile = "build/appx/$name"
if (-not (Test-Path $sourceFile)) { continue }
$source = [BitConverter]::ToString($sha.ComputeHash([IO.File]::ReadAllBytes((Resolve-Path $sourceFile))))
if ($packaged -ne $source) { $problems += "packaged copy differs from build/appx: $name" }
}
}
finally { $archive.Dispose() }

if ($problems) {
$problems | ForEach-Object { Write-Output "::error::$_" }
throw "$($problems.Count) tile asset problem(s) in $($appx.Name)"
}
Write-Output "$($expected.Count) tile assets present in $($appx.Name), byte-identical to build/appx/"

- name: Upload Windows Store package
uses: actions/upload-artifact@v4
with:
Expand Down
Binary file added build/appx/LargeTile.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added build/appx/LargeTile.scale-125.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added build/appx/LargeTile.scale-150.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added build/appx/LargeTile.scale-200.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added build/appx/SmallTile.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added build/appx/SmallTile.scale-125.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added build/appx/SmallTile.scale-150.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added build/appx/SmallTile.scale-200.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added build/appx/SmallTile.scale-400.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added build/appx/SplashScreen.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added build/appx/SplashScreen.scale-125.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added build/appx/SplashScreen.scale-150.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added build/appx/SplashScreen.scale-200.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added build/appx/Square150x150Logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added build/appx/Square150x150Logo.scale-125.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added build/appx/Square150x150Logo.scale-150.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added build/appx/Square150x150Logo.scale-200.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added build/appx/Square44x44Logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added build/appx/Square44x44Logo.scale-125.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added build/appx/Square44x44Logo.scale-150.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added build/appx/Square44x44Logo.scale-200.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added build/appx/Square44x44Logo.scale-400.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added build/appx/Square44x44Logo.targetsize-16.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added build/appx/Square44x44Logo.targetsize-24.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added build/appx/Square44x44Logo.targetsize-256.png
Binary file added build/appx/Square44x44Logo.targetsize-32.png
Binary file added build/appx/Square44x44Logo.targetsize-48.png
Binary file added build/appx/StoreLogo.png
Binary file added build/appx/StoreLogo.scale-125.png
Binary file added build/appx/StoreLogo.scale-150.png
Binary file added build/appx/StoreLogo.scale-200.png
Binary file added build/appx/StoreLogo.scale-400.png
Binary file added build/appx/Wide310x150Logo.png
Binary file added build/appx/Wide310x150Logo.scale-125.png
Binary file added build/appx/Wide310x150Logo.scale-150.png
Binary file added build/appx/Wide310x150Logo.scale-200.png
9 changes: 8 additions & 1 deletion electron-builder.json5
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,14 @@
"buildDependenciesFromSource": false,
"compression": "normal",
"directories": {
"output": "release/${version}"
"output": "release/${version}",
// Electron-builder's default, spelled out because the appx target depends on it:
// it looks for Store tile assets in `<buildResources>/appx/` and, when that
// directory is absent, silently packages its own vendored placeholders instead
// (winCodeSign's SampleAppx.*.png — blank white squares). Shipping those failed
// Store certification 10.1.1.11 "On Device Tiles". `build/appx/` is committed and
// regenerated by `npm run assets:appx`.
"buildResources": "build"
},
"files": [
"dist",
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
"format": "biome format --write .",
"i18n:check": "node scripts/i18n-check.mjs",
"docs:check": "node scripts/check-docs.mjs",
"assets:appx": "node scripts/generate-appx-assets.mjs",
"preview": "vite preview",
"build:native:mac": "node scripts/build-macos-screencapturekit-helper.mjs",
"build:mac": "npm run build:native:mac && npm run fetch:ffmpeg:mac && npm run build:native:compositor:mac && tsc && vite build && electron-builder --mac",
Expand Down
Loading
Loading