Compare commits
6 Commits
51ab88b1f8
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| dfae1f136b | |||
|
|
74e48aa1e5 | ||
| a6ac6ce355 | |||
|
|
9832121dbb | ||
| d0a5925652 | |||
|
|
e91c4de7ed |
@@ -160,6 +160,12 @@ function Invoke-PublishWelcome {
|
||||
Write-Stage 'Stage 3b: publish SilverOS Welcome app (win-x64 self-contained)'
|
||||
$proj = Join-Path $WindowsDir 'welcome\src\SilverOS.Welcome.App'
|
||||
$out = Join-Path $WorkDir 'welcome-publish'
|
||||
# Force a CLEAN compile. The CI runner reuses build artifacts across runs, and dotnet's
|
||||
# incremental build has shipped a STALE SilverOS.Welcome.Core.dll (old code despite fixed
|
||||
# source) -- so wipe every bin/obj under welcome/ before publishing (a clean tree forces a
|
||||
# full recompile; note `dotnet publish` does NOT accept --no-incremental).
|
||||
Get-ChildItem (Join-Path $WindowsDir 'welcome') -Recurse -Directory -EA SilentlyContinue |
|
||||
Where-Object { $_.Name -in 'bin', 'obj' } | Remove-Item -Recurse -Force -EA SilentlyContinue
|
||||
& dotnet publish $proj -c Release -f net9.0-windows10.0.19041.0 -r win-x64 --self-contained true -o $out
|
||||
if ($LASTEXITCODE -ne 0) { throw 'Welcome app dotnet publish failed' }
|
||||
Write-Host " Published to: $out"
|
||||
|
||||
@@ -79,13 +79,17 @@ public sealed class AppInstaller(IProcessRunner runner, string appsDir) : IAppIn
|
||||
Log($"winget probe (PATH): exit={p1.ExitCode} out={Snip(p1.StdOut)}");
|
||||
if (p1.ExitCode == 0) return "winget";
|
||||
|
||||
// 2) Provision App Installer via the bundled bootstrap (or registered package), then re-probe.
|
||||
// 2) Provision App Installer, then re-probe. Run the bootstrap SCRIPT FILE directly
|
||||
// (it checks for winget and installs it online if absent). Invoking the .ps1 file
|
||||
// avoids an inline -Command (a prior inline if/else had an unbalanced-brace parse bug
|
||||
// from a non-interpolated string, so the bootstrap never actually ran).
|
||||
progress.Report(new("Preparing app installer", 68));
|
||||
var bootstrap = Path.Combine(appsDir, "bootstrap-winget.ps1");
|
||||
var b = await TryRunAsync("powershell.exe",
|
||||
$"-NoProfile -ExecutionPolicy Bypass -Command \"if (Test-Path '{bootstrap}') {{ & '{bootstrap}' }} else {{ " +
|
||||
"Add-AppxPackage -RegisterByFamilyName -MainPackage Microsoft.DesktopAppInstaller_8wekyb3d8bbwe -EA SilentlyContinue }}\"",
|
||||
ct);
|
||||
var b = File.Exists(bootstrap)
|
||||
? await TryRunAsync("powershell.exe", $"-NoProfile -ExecutionPolicy Bypass -File \"{bootstrap}\"", ct)
|
||||
: await TryRunAsync("powershell.exe",
|
||||
"-NoProfile -ExecutionPolicy Bypass -Command \"Add-AppxPackage -RegisterByFamilyName -MainPackage Microsoft.DesktopAppInstaller_8wekyb3d8bbwe -EA SilentlyContinue\"",
|
||||
ct);
|
||||
Log($"bootstrap-winget: exit={b.ExitCode} out={Snip(b.StdOut)} err={Snip(b.StdErr)}");
|
||||
var p2 = await TryRunAsync("winget", "--version", ct);
|
||||
Log($"winget probe (post-bootstrap): exit={p2.ExitCode} out={Snip(p2.StdOut)}");
|
||||
|
||||
Reference in New Issue
Block a user