working flatpak
Some checks failed
Linux arm64 / Build (push) Failing after 1m47s

This commit is contained in:
2025-07-24 14:54:26 +02:00
parent 161c9425ae
commit 19d953891b
14 changed files with 120 additions and 155 deletions

View File

@@ -1,8 +1,11 @@
add_rules("mode.debug", "mode.release")
includes("xmake/bin2c.lua")
set_version("1.0.0")
set_project("org.zulianc.jminos")
add_requires("sfml 3.0.0", "zlib")
includes("@builtin/xpack")
add_requires("sfml 3.0.0", "zlib", {system = false})
set_languages("c++20")
@@ -10,7 +13,7 @@ set_rundir(".")
target("core")
set_kind("$(kind)")
add_files("src/Pieces/*.cpp", "src/Core/*.cpp", "src/Common/*.cpp")
add_files("src/Pieces/*.cpp", "src/Core/*.cpp", "src/Common/*.cpp", "src/Utils/*.cpp")
add_packages("zlib")
target("text")
@@ -27,16 +30,11 @@ target("bmark")
target("graph")
set_default(true)
add_rules("bin2c", {
extensions = {".png", ".ttf"},
outputSource = {"src/Utils/AssetManager.cpp"},
outputHeader = {"src/Utils/AssetManager.h"}
})
set_kind("binary")
add_files("./src/GraphicalUI/**.cpp")
add_files("data/fonts/**.ttf", "data/images/**.png")
add_deps("core")
add_packages("sfml")
add_installfiles("(data/**)")
if is_mode("debug") then
add_defines("DEBUG")
@@ -46,6 +44,20 @@ if is_plat("mingw") then
add_ldflags("-static-libstdc++", "-static")
end
xpack("jminos")
set_formats("flatpak")
set_extension("")
set_title("jminos")
set_author("zulianc")
set_description("A test installer.")
set_homepage("https://git.ale-pri.com/TetrisNerd/jminos")
set_company("org.zulianc")
on_package(function (package)
os.cd("flatpak")
os.exec("flatpak-builder --force-clean --user --install-deps-from=flathub --repo=repo --install builddir org.zulianc.jminos.yml")
os.exec("flatpak build-bundle repo jminos.flatpak org.zulianc.jminos --runtime-repo=https://flathub.org/repo/flathub.flatpakrepo")
os.mv("jminos.flatpak", package:outputdir())
end)
--
-- If you want to known more usage about xmake, please see https://xmake.io