Fix native graphics build scripts

This commit is contained in:
greepar committed 2026-06-20 18:31:52 +08:00
1 parent eb9c503c48
commit cd88a01c1f
2 files changed
+9 -4

No files matched your search

+1 -1
View File
@@ -106,7 +106,7 @@ extra_cflags = [ "-DSKIA_C_DLL" ]
extra_cflags_cc = [ "-frtti" ]
EOF_ARGS
"$skia_dir/bin/gn" gen "$out_dir"
(cd "$skia_dir" && "$skia_dir/bin/gn" gen "$out_dir")
ninja -C "$out_dir" -j "$BUILD_JOBS" skia SkiaSharp HarfBuzzSharp
copy_first_existing "$OUTPUT_DIR/libskia.a" "$out_dir/libskia.a" "$out_dir/obj/libskia.a"
copy_first_existing "$OUTPUT_DIR/libSkiaSharp.a" "$out_dir/libSkiaSharp.a" "$out_dir/obj/libSkiaSharp.a"
+8 -3
View File
@@ -45,7 +45,7 @@ function Copy-FirstExisting($Destination, [string[]]$Candidates) {
return
}
}
throw "None of the expected files exist for $Destination: $($Candidates -join ', ')"
throw "None of the expected files exist for ${Destination}: $($Candidates -join ', ')"
}
function Sync-SkiaSharp {
@@ -100,8 +100,13 @@ extra_cflags = [ "-DSKIA_C_DLL" ]
extra_cflags_cc = [ "/GR" ]
"@ | Set-Content -Path (Join-Path $outDir "args.gn") -Encoding ASCII
& (Join-Path $skiaDir "bin\gn.exe") gen $outDir
ninja -C $outDir -j $BuildJobs skia SkiaSharp HarfBuzzSharp
Push-Location $skiaDir
try {
& (Join-Path $skiaDir "bin\gn.exe") gen $outDir
ninja -C $outDir -j $BuildJobs skia SkiaSharp HarfBuzzSharp
} finally {
Pop-Location
}
Copy-FirstExisting (Join-Path $OutputDir "skia.lib") @((Join-Path $outDir "skia.lib"), (Join-Path $outDir "obj\skia.lib"))
Copy-FirstExisting (Join-Path $OutputDir "SkiaSharp.lib") @((Join-Path $outDir "SkiaSharp.lib"), (Join-Path $outDir "obj\SkiaSharp.lib"))