[fix] bundle the matching Slint runtime in Linux packages

This commit is contained in:
dijunkun committed 2026-11-12 14:05:45 +08:00
1 parent 5f526cd70e
commit ac8eff5099
2 files changed
+38 -36

No files matched your search

+10 -2
View File
@@ -20,7 +20,7 @@ function setup_targets()
"CROSSDESK_VERSION_NUMERIC=" .. table.concat(version_parts, ","))
local function copy_slint_runtime(target)
if not target:is_plat("windows") then
if not target:is_plat("windows", "linux") then
return
end
@@ -28,8 +28,16 @@ function setup_targets()
if not slint and target:dep("gui") then
slint = target:dep("gui"):pkg("slint")
end
assert(slint, "the Slint package is required to copy its Windows runtime")
assert(slint, "the Slint package is required to copy its runtime")
local runtime_dir = path.join(slint:installdir(), "lib")
if target:is_plat("linux") then
-- Package the runtime selected for this build. Multiple Slint builds
-- with the same version/SONAME can have different patched APIs.
local runtime_so = path.join(runtime_dir, "libslint_cpp.so")
assert(os.isfile(runtime_so), "Slint runtime not found: " .. runtime_so)
os.cp(runtime_so, target:targetdir())
return
end
local runtime_dll = path.join(runtime_dir, "slint_cpp.dll")
assert(os.isfile(runtime_dll), "Slint runtime not found: " .. runtime_dll)
import("utils.binary.deplibs")