Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
cc78c8775d | ||
|
|
c453e1686f | ||
|
|
b8ccd4acc0 | ||
|
|
afff9f9833 |
No files matched your search
@@ -6,7 +6,7 @@ on:
|
||||
source_version:
|
||||
description: Existing package version containing the static libraries
|
||||
required: true
|
||||
default: 3.119.4-7922.1
|
||||
default: 4.150.1-7922.1
|
||||
type: string
|
||||
publish_to_nuget:
|
||||
description: Publish package to nuget.org
|
||||
|
||||
@@ -13,7 +13,7 @@ on:
|
||||
inputs:
|
||||
skiasharp_version:
|
||||
required: true
|
||||
default: "3.119.4"
|
||||
default: "4.150.1"
|
||||
type: string
|
||||
angle_branch:
|
||||
required: true
|
||||
|
||||
@@ -13,7 +13,7 @@ on:
|
||||
inputs:
|
||||
skiasharp_version:
|
||||
required: true
|
||||
default: "3.119.4"
|
||||
default: "4.150.1"
|
||||
type: string
|
||||
angle_branch:
|
||||
required: true
|
||||
|
||||
@@ -16,7 +16,7 @@ on:
|
||||
inputs:
|
||||
skiasharp_version:
|
||||
required: true
|
||||
default: "3.119.4"
|
||||
default: "4.150.1"
|
||||
type: string
|
||||
angle_branch:
|
||||
required: true
|
||||
@@ -70,6 +70,7 @@ jobs:
|
||||
sh -lc '
|
||||
set -e
|
||||
apk add --no-cache bash ca-certificates git python3 py3-httplib2 py3-pysocks py3-six clang compiler-rt lld llvm g++ ninja pkgconf fontconfig-dev glib-dev mesa-dev libx11-dev libxcb-dev libxext-dev pciutils-dev linux-headers perl curl tar xz patch gcompat libc6-compat
|
||||
git config --global --add safe.directory "*"
|
||||
python3 - <<'"'"'PY'"'"'
|
||||
import pathlib
|
||||
import httplib2
|
||||
|
||||
@@ -13,7 +13,7 @@ on:
|
||||
inputs:
|
||||
skiasharp_version:
|
||||
required: true
|
||||
default: "3.119.4"
|
||||
default: "4.150.1"
|
||||
type: string
|
||||
angle_branch:
|
||||
required: true
|
||||
|
||||
@@ -11,7 +11,7 @@ dotnet add package StaticLink.Avalonia
|
||||
Or add it manually:
|
||||
|
||||
```xml
|
||||
<PackageReference Include="StaticLink.Avalonia" Version="3.119.4-7922.1" />
|
||||
<PackageReference Include="StaticLink.Avalonia" Version="4.150.1-7922.1" />
|
||||
```
|
||||
|
||||
For macOS, also reference `StaticLink.Avalonia.Native`. This package is macOS-only and must match your Avalonia version because it contains `libAvaloniaNative.a`.
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<IncludeBuildOutput>false</IncludeBuildOutput>
|
||||
<SuppressDependenciesWhenPacking>false</SuppressDependenciesWhenPacking>
|
||||
<PackageId>StaticLink.Avalonia</PackageId>
|
||||
<Version>3.119.4-7922.1</Version>
|
||||
<Version>4.150.1-7922.1</Version>
|
||||
<Authors>greepar</Authors>
|
||||
<Company>greepar</Company>
|
||||
<Description>Static SkiaSharp, HarfBuzzSharp, and ANGLE libraries for Avalonia NativeAOT single-file publishing.</Description>
|
||||
@@ -19,7 +19,7 @@
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="SkiaSharp" Version="3.119.4" />
|
||||
<PackageReference Include="SkiaSharp" Version="4.150.1" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@@ -11,10 +11,10 @@ dotnet add package StaticLink.Avalonia
|
||||
Or add it manually:
|
||||
|
||||
```xml
|
||||
<PackageReference Include="StaticLink.Avalonia" Version="3.119.4-7922.1" />
|
||||
<PackageReference Include="StaticLink.Avalonia" Version="4.150.1-7922.1" />
|
||||
```
|
||||
|
||||
`3.119.4-7922.1` supports Avalonia 11. If you need the SkiaSharp 2 line for an Avalonia 11 project, use this optional package variant:
|
||||
`4.150.1-7922.1` uses the latest stable SkiaSharp 4 release. If you need the SkiaSharp 2 line for an Avalonia 11 project, use this optional package variant:
|
||||
|
||||
```xml
|
||||
<PackageReference Include="StaticLink.Avalonia" Version="2.88.9-7151.10" />
|
||||
|
||||
@@ -6,7 +6,7 @@ WORK_DIR="${WORK_DIR:-$ROOT_DIR/External/NativeStatic/.work}"
|
||||
TARGET_CPU="${TARGET_CPU:-x64}"
|
||||
RID="${RID:-linux-$TARGET_CPU}"
|
||||
OUTPUT_DIR="${OUTPUT_DIR:-$ROOT_DIR/External/NativeStatic/$RID}"
|
||||
SKIASHARP_VERSION="${SKIASHARP_VERSION:-3.119.4}"
|
||||
SKIASHARP_VERSION="${SKIASHARP_VERSION:-4.150.1}"
|
||||
ANGLE_BRANCH="${ANGLE_BRANCH:-7922}"
|
||||
BUILD_JOBS="${BUILD_JOBS:-$(nproc)}"
|
||||
ANGLE_PATCH_DIR="${ANGLE_PATCH_DIR:-$ROOT_DIR/External/NativeStatic/patches}"
|
||||
@@ -20,7 +20,7 @@ Usage: scripts/build-linux-static-graphics.sh [skia|angle|all]
|
||||
Environment:
|
||||
WORK_DIR Source/build cache directory. Default: External/NativeStatic/.work
|
||||
OUTPUT_DIR Final static library directory. Default: External/NativeStatic/linux-$TARGET_CPU
|
||||
SKIASHARP_VERSION SkiaSharp release branch version. Default: 3.119.4
|
||||
SKIASHARP_VERSION SkiaSharp release branch version. Default: 4.150.1
|
||||
ANGLE_BRANCH ANGLE chromium branch. Default: 7922
|
||||
TARGET_CPU GN target_cpu. Default: x64. Supported: x64, arm64
|
||||
RID Output RID. Default: linux-$TARGET_CPU
|
||||
|
||||
@@ -6,7 +6,7 @@ WORK_DIR="${WORK_DIR:-$ROOT_DIR/External/NativeStatic/.work}"
|
||||
TARGET_CPU="${TARGET_CPU:-arm64}"
|
||||
RID="${RID:-osx-$TARGET_CPU}"
|
||||
OUTPUT_DIR="${OUTPUT_DIR:-$ROOT_DIR/External/NativeStatic/$RID}"
|
||||
SKIASHARP_VERSION="${SKIASHARP_VERSION:-3.119.4}"
|
||||
SKIASHARP_VERSION="${SKIASHARP_VERSION:-4.150.1}"
|
||||
ANGLE_BRANCH="${ANGLE_BRANCH:-7922}"
|
||||
BUILD_JOBS="${BUILD_JOBS:-$(sysctl -n hw.ncpu)}"
|
||||
ANGLE_PATCH_DIR="${ANGLE_PATCH_DIR:-$ROOT_DIR/External/NativeStatic/patches}"
|
||||
|
||||
@@ -7,7 +7,7 @@ $ErrorActionPreference = "Stop"
|
||||
|
||||
$RootDir = Split-Path -Parent $PSScriptRoot
|
||||
$WorkDir = if ($env:WORK_DIR) { $env:WORK_DIR } else { Join-Path $RootDir "External\NativeStatic\.work" }
|
||||
$SkiaSharpVersion = if ($env:SKIASHARP_VERSION) { $env:SKIASHARP_VERSION } else { "3.119.4" }
|
||||
$SkiaSharpVersion = if ($env:SKIASHARP_VERSION) { $env:SKIASHARP_VERSION } else { "4.150.1" }
|
||||
$AngleBranch = if ($env:ANGLE_BRANCH) { $env:ANGLE_BRANCH } else { "7922" }
|
||||
$TargetCpu = if ($env:TARGET_CPU) { $env:TARGET_CPU } else { "x64" }
|
||||
$Rid = if ($env:RID) { $env:RID } else { "win-$TargetCpu" }
|
||||
@@ -353,6 +353,24 @@ function Sync-SkiaSharp {
|
||||
return $src
|
||||
}
|
||||
|
||||
function Patch-WinX86SkiaLinker($SkiaDir) {
|
||||
if ($TargetCpu -ne "x86") {
|
||||
return
|
||||
}
|
||||
|
||||
$linkerPath = Join-Path $SkiaDir "src\c\sk_linker.cpp"
|
||||
$text = Get-Content -Path $linkerPath -Raw
|
||||
$pattern = '(?m)^ skjson::ObjectValue\* a = nullptr;\r?\n auto r = \(\*a\)\["tmp"\]\.getType\(\);\r?$'
|
||||
$patched = [regex]::Replace($text, $pattern, ' int r = 0;')
|
||||
if ($patched -eq $text) {
|
||||
if ($text -match '(?m)^ int r = 0;\r?$') {
|
||||
return
|
||||
}
|
||||
throw "Unable to patch win-x86 sk_linker JSON keep-alive references."
|
||||
}
|
||||
Set-Content -Path $linkerPath -Value $patched -NoNewline -Encoding UTF8
|
||||
}
|
||||
|
||||
function Prepare-SkiaGitSyncDeps($SkiaDir) {
|
||||
$syncDeps = Join-Path $SkiaDir "tools\git-sync-deps"
|
||||
$text = Get-Content -Path $syncDeps -Raw
|
||||
@@ -390,6 +408,7 @@ function Build-Skia {
|
||||
Ensure-DepotTools
|
||||
$src = Sync-SkiaSharp
|
||||
$skiaDir = Join-Path $src "externals\skia"
|
||||
Patch-WinX86SkiaLinker $skiaDir
|
||||
if (-not (Test-Path (Join-Path $skiaDir "bin\gn.exe"))) {
|
||||
Invoke-SkiaGitSyncDeps $skiaDir
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user