Skip to content

Commit ec88305

Browse files
committed
Update Skia Bindings
This allows reverting 18db321 and Fixes slint-ui#6615
1 parent f355536 commit ec88305

File tree

9 files changed

+40
-36
lines changed

9 files changed

+40
-36
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Copyright © SixtyFPS GmbH <[email protected]>
2+
# SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-Slint-Royalty-free-2.0 OR LicenseRef-Slint-Software-3.0
3+
4+
---
5+
name: Install Skia dependencies
6+
description: Set up dependencies needed to build Skia
7+
8+
runs:
9+
using: composite
10+
steps:
11+
- name: Install Ninja
12+
if: runner.os == 'macOS'
13+
run: brew install ninja
14+
shell: bash
15+
- name: Upgrade LLVM for Skia build on Windows
16+
if: runner.os == 'Windows'
17+
run: choco upgrade llvm
18+
shell: bash
19+
# See https://github.com/ilammy/msvc-dev-cmd?tab=readme-ov-file#caveats
20+
- name: Remove GNU link.exe from GH actions
21+
if: runner.os == 'Windows'
22+
run: rm /usr/bin/link
23+
shell: bash

.github/actions/setup-rust/action.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,10 @@ runs:
4040
run: |
4141
git config --system core.longpaths true
4242
shell: powershell
43-
- name: Move cargo home to the same drive as the build, so that relative paths from build to cargo source are without drive letter
43+
- name: Move cargo home close to the target/$profile directory, so that relative paths from build to cargo source are without drive letter
4444
if: runner.os == 'Windows'
4545
run: |
46-
echo "CARGO_HOME=\cargo" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
46+
echo "CARGO_HOME=${{ runner.workspace }}\cargo" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
4747
shell: powershell
4848
- name: Install Rust ${{ inputs.toolchain }}
4949
uses: dtolnay/rust-toolchain@stable

.github/workflows/ci.yaml

+3-6
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,8 @@ jobs:
5353
steps:
5454
- uses: actions/checkout@v4
5555
- uses: ./.github/actions/install-linux-dependencies
56+
- uses: ./.github/actions/install-skia-dependencies
57+
- uses: ilammy/msvc-dev-cmd@v1
5658
- uses: actions/setup-python@v5
5759
with:
5860
python-version: '3.10'
@@ -69,9 +71,6 @@ jobs:
6971
- name: Install gstreamer and libunwind (Linux)
7072
if: runner.os == 'Linux'
7173
run: sudo apt-get install libunwind-dev libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev gstreamer1.0-plugins-base gstreamer1.0-plugins-good
72-
- name: Upgrade LLVM for Skia build on Windows
73-
if: runner.os == 'Windows'
74-
run: choco upgrade llvm
7574
- name: Setup headless display
7675
uses: pyvista/setup-headless-display-action@v3
7776
- uses: ./.github/actions/setup-rust
@@ -116,9 +115,7 @@ jobs:
116115
steps:
117116
- uses: actions/checkout@v4
118117
- uses: ./.github/actions/install-linux-dependencies
119-
- name: Upgrade LLVM for Skia build on Windows
120-
if: runner.os == 'Windows'
121-
run: choco upgrade llvm
118+
- uses: ./.github/actions/install-skia-dependencies
122119
- name: Setup headless display
123120
uses: pyvista/setup-headless-display-action@v3
124121
- uses: actions/setup-node@v4

.github/workflows/cpp_package.yaml

-4
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,6 @@ jobs:
5858
- name: Prepare licenses
5959
run: bash -x ../../scripts/prepare_binary_package.sh ${{ runner.workspace }}/cppbuild
6060
working-directory: api/cpp/
61-
# Pin Python version until https://github.com/slint-ui/slint/issues/6615 is fixed.
62-
- uses: actions/setup-python@v5
63-
with:
64-
python-version: '3.12'
6561
- uses: ilammy/msvc-dev-cmd@v1
6662
- name: Select MSVC (windows)
6763
run: |

.github/workflows/nightly_snapshot.yaml

-8
Original file line numberDiff line numberDiff line change
@@ -124,10 +124,6 @@ jobs:
124124
target: x86_64-apple-darwin
125125
- name: Install cargo-bundle
126126
run: cargo install --version=0.6.0 cargo-bundle
127-
# Pin Python version until https://github.com/slint-ui/slint/issues/6615 is fixed.
128-
- uses: actions/setup-python@v5
129-
with:
130-
python-version: '3.12'
131127
- name: Build Main LSP Bundle
132128
working-directory: tools/lsp
133129
run: cargo bundle --release --features ${{ env.SLINT_BINARY_FEATURES }}
@@ -151,10 +147,6 @@ jobs:
151147
- uses: ./.github/actions/setup-rust
152148
with:
153149
target: aarch64-apple-darwin
154-
# Pin Python version until https://github.com/slint-ui/slint/issues/6615 is fixed.
155-
- uses: actions/setup-python@v5
156-
with:
157-
python-version: '3.12'
158150
- name: Build AArch64 LSP
159151
run: cargo build --target aarch64-apple-darwin --features ${{ env.SLINT_BINARY_FEATURES }} --release -p slint-lsp
160152
- name: Create artifact directory

.github/workflows/publish_npm_package.yaml

+7-7
Original file line numberDiff line numberDiff line change
@@ -69,26 +69,26 @@ jobs:
6969
- os: windows-2022
7070
rust-target: x86_64-pc-windows-msvc
7171
napi-rs-target: win32-x64-msvc
72+
msvc-arch: x64
7273
- os: windows-2022
7374
rust-target: i686-pc-windows-msvc
7475
napi-rs-target: win32-ia32-msvc
76+
msvc-arch: x86
7577
needs: determine_version
7678
runs-on: ${{ matrix.os }}
7779
steps:
7880
- uses: actions/checkout@v4
7981
- uses: ./.github/actions/install-linux-dependencies
8082
with:
8183
old-ubuntu: true
84+
- uses: ./.github/actions/install-skia-dependencies
85+
- uses: ilammy/msvc-dev-cmd@v1
86+
if: runner.os == 'Windows'
87+
with:
88+
arch: ${{ matrix.msvc-arch }}
8289
- uses: ./.github/actions/setup-rust
8390
with:
8491
target: ${{ matrix.rust-target }}
85-
- name: Upgrade LLVM for Skia build on Windows
86-
if: runner.os == 'Windows'
87-
run: choco upgrade llvm
88-
# Pin Python version until https://github.com/slint-ui/slint/issues/6615 is fixed.
89-
- uses: actions/setup-python@v5
90-
with:
91-
python-version: '3.12'
9292
# Setup .npmrc file to publish to npm
9393
- uses: actions/setup-node@v4
9494
with:

.github/workflows/slint_tool_binary.yaml

-4
Original file line numberDiff line numberDiff line change
@@ -158,10 +158,6 @@ jobs:
158158
- uses: ./.github/actions/setup-rust
159159
with:
160160
target: aarch64-apple-darwin
161-
# Pin Python version until https://github.com/slint-ui/slint/issues/6615 is fixed.
162-
- uses: actions/setup-python@v5
163-
with:
164-
python-version: '3.12'
165161
- uses: baptiste0928/cargo-install@v3
166162
with:
167163
crate: cargo-about

docker/Dockerfile.torizon-demos

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ ENV CARGO_TARGET_ARMV7_UNKNOWN_LINUX_GNUEABIHF_LINKER=arm-linux-gnueabihf-gcc
2626

2727
# Install Slint build dependencies (libxcb, etc.)
2828
RUN apt-get update && \
29-
DEBIAN_FRONTEND=noninteractive apt-get install --assume-yes --allow-change-held-packages pkg-config libfontconfig1-dev:$TOOLCHAIN_ARCH libxcb1-dev:$TOOLCHAIN_ARCH libxcb-render0-dev:$TOOLCHAIN_ARCH libxcb-shape0-dev:$TOOLCHAIN_ARCH libxcb-xfixes0-dev:$TOOLCHAIN_ARCH libxkbcommon-dev:$TOOLCHAIN_ARCH libinput-dev:$TOOLCHAIN_ARCH libudev-dev:$TOOLCHAIN_ARCH libgbm-dev:$TOOLCHAIN_ARCH libdrm2:$TOOLCHAIN_ARCH libdrm2- libdrm-amdgpu1- python3 clang libstdc++-11-dev:$TOOLCHAIN_ARCH && \
29+
DEBIAN_FRONTEND=noninteractive apt-get install --assume-yes --allow-change-held-packages pkg-config libfontconfig1-dev:$TOOLCHAIN_ARCH libxcb1-dev:$TOOLCHAIN_ARCH libxcb-render0-dev:$TOOLCHAIN_ARCH libxcb-shape0-dev:$TOOLCHAIN_ARCH libxcb-xfixes0-dev:$TOOLCHAIN_ARCH libxkbcommon-dev:$TOOLCHAIN_ARCH libinput-dev:$TOOLCHAIN_ARCH libudev-dev:$TOOLCHAIN_ARCH libgbm-dev:$TOOLCHAIN_ARCH libdrm2:$TOOLCHAIN_ARCH libdrm2- libdrm-amdgpu1- python3 clang libstdc++-11-dev:$TOOLCHAIN_ARCH ninja-build && \
3030
rm -rf /var/lib/apt/lists/*
3131

3232
# Don't require font-config when the compiler runs

internal/renderers/skia/Cargo.toml

+4-4
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ pin-weak = "1"
4141
scoped-tls-hkt = "0.1"
4242
raw-window-handle = { version = "0.6", features = ["std"] }
4343

44-
skia-safe = { version = "0.78.0", features = ["textlayout", "gl"] }
44+
skia-safe = { version = "0.82.0", features = ["textlayout", "gl"] }
4545
glow = { workspace = true }
4646
unicode-segmentation = { workspace = true }
4747

@@ -58,7 +58,7 @@ bytemuck = { workspace = true }
5858

5959
[target.'cfg(target_family = "windows")'.dependencies]
6060
windows = { version = "0.58.0", features = ["Win32", "Win32_System_Com", "Win32_Graphics", "Win32_Graphics_Dxgi", "Win32_Graphics_Direct3D12", "Win32_Graphics_Direct3D", "Win32_Foundation", "Win32_Graphics_Dxgi_Common", "Win32_System_Threading", "Win32_Security"] }
61-
skia-safe = { version = "0.78.0", features = ["d3d"] }
61+
skia-safe = { version = "0.82.0", features = ["d3d"] }
6262

6363
[target.'cfg(target_vendor = "apple")'.dependencies]
6464
objc2 = { version = "0.6.0" }
@@ -89,11 +89,11 @@ objc2-app-kit = { version = "0.3.0", default-features = false, features = [
8989
objc2-core-foundation = { version = "0.3.0", default-features = false, features = [
9090
"CFCGTypes"
9191
] }
92-
skia-safe = { version = "0.78.0", features = ["metal"] }
92+
skia-safe = { version = "0.82.0", features = ["metal"] }
9393
raw-window-metal = "1.0"
9494

9595
[target.'cfg(not(any(target_vendor = "apple", target_family = "windows")))'.dependencies]
96-
skia-safe = { version = "0.78.0", features = ["gl"] }
96+
skia-safe = { version = "0.82.0", features = ["gl"] }
9797

9898
[build-dependencies]
9999
cfg_aliases = { workspace = true }

0 commit comments

Comments
 (0)