mirror of
https://github.com/kunkundi/crossdesk.git
synced 2026-07-23 07:40:11 +08:00
fix: repair Slint dependency setup
This commit is contained in:
@@ -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)
|
||||
Vendored
+1
-1
@@ -1 +1 @@
|
||||
includes("cpp-httplib")
|
||||
includes("cpp-httplib", "slint")
|
||||
|
||||
Reference in New Issue
Block a user