fix: repair Slint dependency setup

This commit is contained in:
dijunkun
2026-07-21 17:44:27 +08:00
parent 59f77c2820
commit c400e75d32
4 changed files with 10 additions and 22 deletions
+9 -1
View File
@@ -99,12 +99,20 @@ jobs:
with:
submodules: recursive
- name: Install Linux build dependencies
run: apt install -y curl libxft-dev
- name: Install Rust
shell: bash
run: |
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile minimal --default-toolchain 1.92.0
echo "${HOME}/.cargo/bin" >> "${GITHUB_PATH}"
- name: Build CrossDesk
env:
CUDA_PATH: /usr/local/cuda
XMAKE_GLOBALDIR: /data
run: |
apt install -y libxft-dev
xmake f --CROSSDESK_VERSION=${LEGAL_VERSION} --USE_CUDA=true --root -y
xmake b -vy --root crossdesk
@@ -20,7 +20,6 @@ package("slint")
local configs = {
"-DSLINT_BUILD_TESTING=OFF",
"-DSLINT_BUILD_EXAMPLES=OFF",
"-DSLINT_COMPILER=download",
"-DSLINT_FEATURE_INTERPRETER=OFF",
"-DSLINT_FEATURE_LIVE_PREVIEW=OFF",
"-DSLINT_FEATURE_TESTING=OFF",
@@ -36,23 +35,6 @@ package("slint")
"-DBUILD_SHARED_LIBS=ON"
}
import("package.tools.cmake").install(package, configs)
-- SLINT_COMPILER=download only configures downstream CMake projects.
-- xmake's native Slint rule needs the matching host executable here.
import("net.http")
import("utils.archive")
local host_system = is_host("windows") and "windows" or (is_host("macosx") and "Darwin" or "Linux")
local host_arch = os.arch()
if host_arch == "x64" then
host_arch = "x86_64"
end
local suffix = host_system .. "-" .. host_arch
local archive_name = "slint-compiler-" .. suffix .. ".tar.gz"
local archive_file = path.join(package:builddir(), archive_name)
local download_url = "https://github.com/slint-ui/slint/releases/download/v" .. package:version_str() .. "/" .. archive_name
http.download(download_url, archive_file)
os.mkdir(path.join(package:installdir(), "bin"))
archive.extract(archive_file, package:installdir())
end)
on_test(function(package)
+1 -1
View File
@@ -1 +1 @@
includes("cpp-httplib")
includes("cpp-httplib", "slint")
-2
View File
@@ -1,8 +1,6 @@
set_project("crossdesk")
set_license("GPL-3.0-only")
add_repositories("crossdesk-packages " .. path.join(os.scriptdir(), "xmake", "repository"))
includes("xmake/options.lua")
includes("xmake/platform.lua")
includes("xmake/rules/slint.lua")