fix(gpui): flatten markdown GIFs and ship the GPUI shell in 1.1.0 packages

Convert local and HTTP GIF/WebP to a still PNG before gpui's img element, which panics when a frame index is reused on a static image. Release zip and installer now rebuild nebula with gpui-shell against the local component fork.
This commit is contained in:
kuddev committed 2026-08-17 23:59:32 +08:00
1 parent 2f4d2a3b4f
commit 282d41dd5d
8 files changed
+171 -15

No files matched your search

+22 -6
View File
@@ -10,6 +10,7 @@ param(
[switch] $Force,
[switch] $ValidateOnly,
[string] $OutputDirectory,
[string] $TargetDirectory,
[string] $InnoCompiler
)
@@ -43,7 +44,13 @@ if ([string]::IsNullOrWhiteSpace($OutputDirectory)) {
$OutputDirectory = Join-Path $repo $OutputDirectory
}
$outputRoot = [System.IO.Path]::GetFullPath($OutputDirectory)
$targetRoot = Join-Path $repo "target\$Configuration"
if ([string]::IsNullOrWhiteSpace($TargetDirectory)) {
$TargetDirectory = Join-Path $repo 'target'
} elseif (-not [System.IO.Path]::IsPathRooted($TargetDirectory)) {
$TargetDirectory = Join-Path $repo $TargetDirectory
}
$cargoTargetRoot = [System.IO.Path]::GetFullPath($TargetDirectory)
$targetRoot = Join-Path $cargoTargetRoot $Configuration
$setupPath = Join-Path $outputRoot "NebulaTerminal-$Version-windows-x64-setup.exe"
$requiredFiles = @(
@@ -68,16 +75,25 @@ if (-not (Test-Path -LiteralPath $installerScript -PathType Leaf)) {
if (-not $SkipBuild) {
Push-Location $repo
$previousTargetDirectory = $env:CARGO_TARGET_DIR
try {
$cargoArgs = @('build', '--workspace')
$env:CARGO_TARGET_DIR = $cargoTargetRoot
$workspaceArgs = @('build', '--workspace')
$gpuiArgs = @('build', '-p', 'nebula', '--bin', 'nebula', '--features', 'gpui-shell')
if ($Configuration -eq 'release') {
$cargoArgs += '--release'
$workspaceArgs += '--release'
$gpuiArgs += '--release'
}
& cargo @cargoArgs
& cargo @workspaceArgs
if ($LASTEXITCODE -ne 0) {
throw "Cargo build failed with exit code $LASTEXITCODE"
throw "Cargo workspace build failed with exit code $LASTEXITCODE"
}
& cargo @gpuiArgs
if ($LASTEXITCODE -ne 0) {
throw "Cargo gpui-shell build failed with exit code $LASTEXITCODE"
}
} finally {
$env:CARGO_TARGET_DIR = $previousTargetDirectory
Pop-Location
}
}
@@ -149,7 +165,7 @@ if (-not $translationValid) {
Push-Location $PSScriptRoot
try {
& $InnoCompiler "/DAppVersion=$Version" "/DNumericVersion=$numericVersion" "/DConfiguration=$Configuration" "/O$outputRoot" $installerScript
& $InnoCompiler "/DAppVersion=$Version" "/DNumericVersion=$numericVersion" "/DConfiguration=$Configuration" "/DBuildRoot=$targetRoot" "/O$outputRoot" $installerScript
if ($LASTEXITCODE -ne 0) {
throw "Inno Setup compilation failed with exit code $LASTEXITCODE"
}
+5 -3
View File
@@ -1,9 +1,9 @@
#ifndef AppVersion
#define AppVersion "1.0.0"
#define AppVersion "1.1.0"
#endif
#ifndef NumericVersion
#define NumericVersion "1.0.0.0"
#define NumericVersion "1.1.0.0"
#endif
#ifndef Configuration
@@ -11,7 +11,9 @@
#endif
#define RepoRoot ".."
#define BuildRoot RepoRoot + "\target\" + Configuration
#ifndef BuildRoot
#define BuildRoot RepoRoot + "\target\" + Configuration
#endif
[Setup]
AppId={{61022144-7D0A-4E54-94F2-C329A8F58656}
+11 -1
View File
@@ -92,11 +92,21 @@ if (-not $SkipBuild) {
$env:CARGO_TARGET_DIR = $cargoTargetRoot
if ($Configuration -eq 'release') {
& cargo build --workspace --release
if ($LASTEXITCODE -ne 0) {
throw "Cargo workspace build failed with exit code $LASTEXITCODE"
}
# 产品主窗是 GPUI(`nebula --gpui`),链接本地 gpui-component fork。
# workspace 默认 feature 不含 gpui-shell,不补这一步装出来的是旧壳。
& cargo build -p nebula --bin nebula --release --features gpui-shell
} else {
& cargo build --workspace
if ($LASTEXITCODE -ne 0) {
throw "Cargo workspace build failed with exit code $LASTEXITCODE"
}
& cargo build -p nebula --bin nebula --features gpui-shell
}
if ($LASTEXITCODE -ne 0) {
throw "Cargo build failed with exit code $LASTEXITCODE"
throw "Cargo gpui-shell build failed with exit code $LASTEXITCODE"
}
} finally {
$env:CARGO_TARGET_DIR = $previousTargetDirectory
+5
View File
@@ -36,6 +36,11 @@ try {
throw 'Release builds must strip debuginfo before packaging'
}
$scriptBody = Get-Content -LiteralPath $packageScript -Raw -Encoding UTF8
if ($scriptBody -notmatch '--features gpui-shell') {
throw 'Release packaging must rebuild nebula with --features gpui-shell so the zip ships the GPUI shell.'
}
& $packageScript -Version 'unreleased' -SkipBuild -OutputDirectory $resolvedOutput
$zipPath = Join-Path $resolvedOutput 'NebulaTerminal-vunreleased-windows-x64.zip'
if (-not (Test-Path -LiteralPath $zipPath -PathType Leaf)) {