From 9bdc8b510a9bd8ee8d32ae13d7a7637c688b61e2 Mon Sep 17 00:00:00 2001 From: matcool <26722564+matcool@users.noreply.github.com> Date: Fri, 19 Jan 2024 00:34:16 -0300 Subject: [PATCH] update yet again --- .github/workflows/build.yml | 19 +++++++++++++++---- mod.json | 6 +++++- src/Pack.cpp | 12 ++++++------ src/Pack.hpp | 10 +++++----- 4 files changed, 31 insertions(+), 16 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 5f02a16..d17369d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -9,13 +9,22 @@ on: jobs: build: strategy: + fail-fast: false matrix: config: - name: Windows os: windows-latest - - name: macOS - os: macos-latest + # - name: macOS + # os: macos-latest + + - name: Android32 + os: ubuntu-latest + target: Android32 + + - name: Android64 + os: ubuntu-latest + target: Android64 name: ${{ matrix.config.name }} runs-on: ${{ matrix.config.os }} @@ -27,6 +36,8 @@ jobs: uses: geode-sdk/build-geode-mod@main with: combine: true + sdk: nightly + target: ${{ matrix.config.target }} package: name: Package builds @@ -34,10 +45,10 @@ jobs: needs: ['build'] steps: - - uses: geode-sdk/build-geode-mod@combine + - uses: geode-sdk/build-geode-mod/combine@main id: build - uses: actions/upload-artifact@v3 with: name: Build Output - path: ${{ steps.build.outputs.build-output }} + path: ${{ steps.build.outputs.build-output }} \ No newline at end of file diff --git a/mod.json b/mod.json index 7ab32d2..79e97cd 100644 --- a/mod.json +++ b/mod.json @@ -1,6 +1,10 @@ { "geode": "v2.0.0", - "version": "v1.3.0", + "version": "v1.4.0", + "gd": { + "win": "2.204", + "android": "2.200" + }, "id": "geode.texture-loader", "name": "Texture Loader", "developer": "Geode Team", diff --git a/src/Pack.cpp b/src/Pack.cpp index f0a9957..70c20db 100644 --- a/src/Pack.cpp +++ b/src/Pack.cpp @@ -3,7 +3,7 @@ #include #include -Result PackInfo::from(json::Value const& json) { +Result PackInfo::from(matjson::Value const& json) { auto info = PackInfo(); auto copyJson = json; @@ -24,7 +24,7 @@ Result PackInfo::from(json::Value const& json) { root.needs("version").into(info.m_version); // has single "creator" key? - if (auto creator = root.has("creator").as()) { + if (auto creator = root.has("creator").as()) { info.m_creators = { creator.get() }; } // otherwise use "creators" key @@ -96,7 +96,7 @@ Result<> Pack::parsePackJson() { if (!data) { return Err(data.error()); } - auto res = PackInfo::from(json::Value::from_str(data.value())); + auto res = PackInfo::from(matjson::Value::from_str(data.value())); if (!res) { return Err(res.unwrapErr()); } @@ -123,12 +123,12 @@ Result> Pack::from(ghc::filesystem::path const& dir) { return Ok(pack); } -json::Value json::Serialize>::to_json(std::shared_ptr const& pack) { - return json::Object({ +matjson::Value matjson::Serialize>::to_json(std::shared_ptr const& pack) { + return matjson::Object({ { "path", pack->getPath() } }); } -std::shared_ptr json::Serialize>::from_json(json::Value const& value) { +std::shared_ptr matjson::Serialize>::from_json(matjson::Value const& value) { return Pack::from(value["path"].as()).unwrap(); } diff --git a/src/Pack.hpp b/src/Pack.hpp index ab96e77..0821831 100644 --- a/src/Pack.hpp +++ b/src/Pack.hpp @@ -8,7 +8,7 @@ #include #include #include "Edit.hpp" -#include +#include using namespace geode::prelude; @@ -20,7 +20,7 @@ struct PackInfo { std::vector m_creators; std::vector m_edits; - static Result from(json::Value const& json); + static Result from(matjson::Value const& json); }; class Pack { @@ -45,7 +45,7 @@ class Pack { }; template <> -struct json::Serialize> { - static json::Value to_json(std::shared_ptr const& pack); - static std::shared_ptr from_json(json::Value const& value); +struct matjson::Serialize> { + static matjson::Value to_json(std::shared_ptr const& pack); + static std::shared_ptr from_json(matjson::Value const& value); };