5 Commits

Author SHA1 Message Date
a836dd31e2 fix exec path
All checks were successful
Linux arm64 / Build (push) Successful in 2m13s
2025-07-29 21:36:18 +02:00
94e5450a74 fix icon path 2025-07-29 21:36:01 +02:00
7977fb976b nsis packaging
All checks were successful
Linux arm64 / Build (push) Successful in 2m16s
2025-07-29 21:13:10 +02:00
86a034a4ac update flatpak metainfo
All checks were successful
Linux arm64 / Build (push) Successful in 2m13s
2025-07-28 10:31:06 +02:00
9208a5750d zip windows packing 2025-07-28 10:29:42 +02:00
6 changed files with 73 additions and 23 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

View File

@@ -5,8 +5,8 @@
<name>jminos</name> <name>jminos</name>
<developer_name>Zulianc</developer_name> <developer_name>Zulianc</developer_name>
<summary>Amazing stacker game by the J </summary> <summary>Amazing stacker game by the J </summary>
<metadata_license>CC0-1.0</metadata_license> <!-- <metadata_license>CC0-1.0</metadata_license>
<project_license>GPL-3.0-only</project_license> <project_license>GPL-3.0-only</project_license> -->
<url type="homepage">https://git.ale-pri.com/TetrisNerd/jminos</url> <url type="homepage">https://git.ale-pri.com/TetrisNerd/jminos</url>
<description> <description>
<p> <p>
@@ -22,7 +22,7 @@
<li>IRS, IHS, infinite hold, and other leniency mechanics!</li> <li>IRS, IHS, infinite hold, and other leniency mechanics!</li>
<li>Customizable board size!</li> <li>Customizable board size!</li>
<li>Customizable keybinds!</li> <li>Customizable keybinds!</li>
<li>Very bland interface!! (i&#39;m not a designer)</li> <li>Very bland interface!! (i'm not a designer)</li>
</ul> </ul>
<p>Available gamemodes</p> <p>Available gamemodes</p>
<ul> <ul>
@@ -47,15 +47,15 @@
<image>https://git.ale-pri.com/TetrisNerd/jminos/raw/branch/main/doc/readme/big_piece.png</image> <image>https://git.ale-pri.com/TetrisNerd/jminos/raw/branch/main/doc/readme/big_piece.png</image>
</screenshot> </screenshot>
<screenshot> <screenshot>
<caption>Dark Settings</caption> <caption>Pieces selection</caption>
<image>https://git.ale-pri.com/TetrisNerd/jminos/media/branch/main/doc/readme/pieces_selection.png</image> <image>https://git.ale-pri.com/TetrisNerd/jminos/media/branch/main/doc/readme/pieces_selection.png</image>
</screenshot> </screenshot>
<screenshot> <screenshot>
<caption>Light Interface</caption> <caption>Rotations</caption>
<image>https://git.ale-pri.com/TetrisNerd/jminos/media/branch/main/doc/readme/rotations.gif</image> <image>https://git.ale-pri.com/TetrisNerd/jminos/media/branch/main/doc/readme/rotations.gif</image>
</screenshot> </screenshot>
<screenshot> <screenshot>
<caption>Light Grid View</caption> <caption>Rotation_0</caption>
<image>https://git.ale-pri.com/TetrisNerd/jminos/media/branch/main/doc/readme/rotation_0.gif</image> <image>https://git.ale-pri.com/TetrisNerd/jminos/media/branch/main/doc/readme/rotation_0.gif</image>
</screenshot> </screenshot>
</screenshots> </screenshots>

View File

@@ -10,7 +10,7 @@
[[nodiscard]] bool resetKeybindFile(int layout); [[nodiscard]] bool resetKeybindFile(int layout);
int main() { int main(int arc, char** args) {
std::srand(std::time(NULL)); std::srand(std::time(NULL));
bool everythingIsOK = true; bool everythingIsOK = true;

View File

@@ -1,10 +1,36 @@
#include "AssetManager.h" #include "AssetManager.h"
#ifdef _WIN32
#include <windows.h> //GetModuleFileNameW
#else
#include <limits.h>
#include <unistd.h> //readlink
#endif
namespace fs = std::filesystem; namespace fs = std::filesystem;
static std::string getEnv(const std::string& var) { static fs::path getExeDirectory(){
#ifdef _WIN32
wchar_t path[MAX_PATH] = { 0 };
GetModuleFileNameW(NULL, path, MAX_PATH);
return path;
#else
char result[PATH_MAX];
ssize_t count = readlink("/proc/self/exe", result, PATH_MAX);
return std::string(result, (count > 0) ? count : 0);
#endif
}
static fs::path getEnv(const std::string& var) {
char* env = std::getenv(var.c_str()); char* env = std::getenv(var.c_str());
return env ? env : ""; return env ? env :
#ifdef JMINOS_IGNORE_WORKDIR
getExeDirectory().parent_path().parent_path();
#else
"";
#endif
} }
fs::path AssetManager::getResourcePath(const std::string& resource) { fs::path AssetManager::getResourcePath(const std::string& resource) {

View File

@@ -11,6 +11,7 @@ option_end()
if has_config("external_build") then if has_config("external_build") then
add_requires("sfml 3.0.0", "zlib", {system = false}) add_requires("sfml 3.0.0", "zlib", {system = false})
add_defines("JMINOS_IGNORE_WORKDIR")
else else
add_requires("sfml 3.0.0", "zlib") add_requires("sfml 3.0.0", "zlib")
end end
@@ -52,20 +53,7 @@ if is_plat("mingw") then
add_ldflags("-static-libstdc++", "-static") add_ldflags("-static-libstdc++", "-static")
end end
xpack("jminos") includes("xmake/xpack.lua")
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 -- If you want to known more usage about xmake, please see https://xmake.io

36
xmake/xpack.lua Normal file
View File

@@ -0,0 +1,36 @@
if is_os("linux") then
xpack("jminos")
set_formats("flatpak")
set_extension("flatpak")
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 install org.flatpak.Builder --user -y")
os.exec("flatpak run org.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)
on_load(function (package)
package:set("basename", package:name() .. "-v" .. package:version() .. "-" .. package:arch())
end)
else
xpack("jminos")
set_formats("zip", "nsis")
add_targets("graph")
add_installfiles("(data/**.png)")
set_iconfile("../flatpak/org.zulianc.jminos.ico")
on_load(function (package)
package:set("basename", package:name() .. "-v" .. package:version() .. "-" .. package:arch())
end)
after_installcmd(function (package, batchcmds)
batchcmds:rm(package:installdir("**/.gitkeep"))
end)
end