From c400e75d3231be51e90626ccd0e3804df1767d15 Mon Sep 17 00:00:00 2001 From: dijunkun Date: Tue, 21 Jul 2026 17:44:27 +0800 Subject: [PATCH] fix: repair Slint dependency setup --- .github/workflows/build.yml | 10 +++++++++- .../packages/s => thirdparty}/slint/xmake.lua | 18 ------------------ thirdparty/xmake.lua | 2 +- xmake.lua | 2 -- 4 files changed, 10 insertions(+), 22 deletions(-) rename {xmake/repository/packages/s => thirdparty}/slint/xmake.lua (66%) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index cbcb0e6..10bfcd5 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -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 diff --git a/xmake/repository/packages/s/slint/xmake.lua b/thirdparty/slint/xmake.lua similarity index 66% rename from xmake/repository/packages/s/slint/xmake.lua rename to thirdparty/slint/xmake.lua index 29d6acc..14ac3e1 100644 --- a/xmake/repository/packages/s/slint/xmake.lua +++ b/thirdparty/slint/xmake.lua @@ -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) diff --git a/thirdparty/xmake.lua b/thirdparty/xmake.lua index c8bf5d8..e0a8563 100644 --- a/thirdparty/xmake.lua +++ b/thirdparty/xmake.lua @@ -1 +1 @@ -includes("cpp-httplib") \ No newline at end of file +includes("cpp-httplib", "slint") diff --git a/xmake.lua b/xmake.lua index 42f8e53..2190487 100644 --- a/xmake.lua +++ b/xmake.lua @@ -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")