Skip to content

Commit adcd9b3

Browse files
committed
fix: windows release CI workflow
1 parent 6f7647c commit adcd9b3

3 files changed

Lines changed: 21 additions & 5 deletions

File tree

.github/workflows/_release.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,11 @@ jobs:
289289
uses: actions/upload-artifact@v4
290290
with:
291291
name: werdumps-${{ matrix.arch }}
292-
path: ${{ env.WER_DUMP_DIR }}
292+
# Spelled out rather than ${{ env.WER_DUMP_DIR }}: that var is exported by
293+
# the enable-WER step, which is SKIPPED when an earlier step fails -- and
294+
# this step runs precisely on failure. An empty path is a hard error that
295+
# masks the real one.
296+
path: ${{ runner.temp }}\werdumps
293297
if-no-files-found: ignore
294298

295299
- name: Uninstall MSIX

scripts/package_windows_msix.ps1

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,19 @@ $manifest = (Get-Content -Raw $manifestTemplate).
227227
Replace('@PUBLISHER_DISPLAY_NAME@', $PublisherDisplayName).
228228
Replace('@VERSION@', $Version).
229229
Replace('@ARCH@', $msixArch)
230-
Set-Content -Path (Join-Path $layout 'AppxManifest.xml') -Value $manifest -Encoding UTF8
230+
$manifestPath = Join-Path $layout 'AppxManifest.xml'
231+
Set-Content -Path $manifestPath -Value $manifest -Encoding UTF8
232+
# makepri reports a malformed manifest as PRI191 buried mid-scroll in a UTF-16-mangled
233+
# usage dump (first hit: '--' inside an XML comment, which the XML spec forbids).
234+
# Validate here so the failure is one readable line instead.
235+
try {
236+
$probe = New-Object System.Xml.XmlDocument
237+
$probe.LoadXml((Get-Content -Raw $manifestPath))
238+
}
239+
catch {
240+
$reason = if ($_.Exception.InnerException) { $_.Exception.InnerException.Message } else { $_.Exception.Message }
241+
throw "Substituted AppxManifest.xml is not well-formed XML: $reason"
242+
}
231243

232244
# --- index resources (resources.pri) -----------------------------------------
233245
# Without this, Windows ignores the scale/targetsize/unplated qualifier files and the
@@ -236,7 +248,7 @@ New-Item -ItemType Directory -Force -Path $OutDir | Out-Null
236248
$priConfig = Join-Path $OutDir 'priconfig.xml'
237249
& $makepri createconfig /cf $priConfig /dq en-US /o
238250
if ($LASTEXITCODE -ne 0) { throw "makepri createconfig failed ($LASTEXITCODE)." }
239-
& $makepri new /pr $layout /cf $priConfig /mn (Join-Path $layout 'AppxManifest.xml') /of (Join-Path $layout 'resources.pri') /o
251+
& $makepri new /pr $layout /cf $priConfig /mn $manifestPath /of (Join-Path $layout 'resources.pri') /o
240252
if ($LASTEXITCODE -ne 0) { throw "makepri new failed ($LASTEXITCODE)." }
241253

242254
# --- pack --------------------------------------------------------------------

src/platform/win32/msix/AppxManifest.xml.in

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,12 +65,12 @@
6565
<Logo>Images\StoreLogo.png</Logo>
6666
<!-- File writes land in the REAL file system, not the per-package overlay.
6767
Needed by the Explorer SendTo integration: the Clipp.lnk must land in the
68-
real shell:SendTo folder (under %APPDATA%) or Explorer never shows it -- the
68+
real shell:SendTo folder (under %APPDATA%) or Explorer never shows it the
6969
file-side twin of the copy-on-write registry trap above. Pairs with the
7070
unvirtualizedResources capability below. Consequences: (a) app state files
7171
(%LOCALAPPDATA%\Clipp: register snapshot, logs, crashdumps) now land in the
7272
real location, shared with an unpackaged install and left behind on
73-
uninstall -- settings/key/host id are REGISTRY and stay virtualized, and a
73+
uninstall settings/key/host id are REGISTRY and stay virtualized, and a
7474
once-virtualized register snapshot is re-synced from the mesh, so no file
7575
migration is needed on upgrade; (b) desktop6 is ignorable, so pre-2004
7676
Windows keeps virtualization on and SendTo registration is silently inert

0 commit comments

Comments
 (0)