From 742361087b8bf0f7630e2265dc45b15ef2c118ae Mon Sep 17 00:00:00 2001 From: rooot Date: Mon, 22 Apr 2024 23:49:12 +0200 Subject: [PATCH 1/8] feat: initial ios support Signed-off-by: rooot --- CMakeLists.txt | 8 ++++++++ mod.json | 1 + src/LevelInfoLayer.cpp | 2 ++ src/MoreOptionsLayer.cpp | 14 +++++++------- 4 files changed, 18 insertions(+), 7 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 20a3f06..bc15dfa 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -6,6 +6,14 @@ set(CMAKE_CXX_VISIBILITY_PRESET hidden) project(NodeIDs VERSION 1.0.0) +if(${GEODE_TARGET_PLATFORM} STREQUAL "iOS") + message(STATUS "building for ios :3") + unset(CMAKE_OSX_ARCHITECTURES) + set(CMAKE_OSX_ARCHITECTURES arm64) + set(CMAKE_OSX_DEPLOYMENT_TARGET "14.0") + set(CMAKE_SYSTEM_NAME "iOS") +endif() + file(GLOB SOURCES src/*.cpp ) diff --git a/mod.json b/mod.json index 1a0c8f9..500e6e4 100644 --- a/mod.json +++ b/mod.json @@ -3,6 +3,7 @@ "gd": { "win": "2.204", "android": "2.205", + "ios": "2.205", "mac": "2.200" }, "version": "v1.9.1", diff --git a/src/LevelInfoLayer.cpp b/src/LevelInfoLayer.cpp index 77933c2..5a49902 100644 --- a/src/LevelInfoLayer.cpp +++ b/src/LevelInfoLayer.cpp @@ -57,8 +57,10 @@ using namespace geode::node_ids; /*if(m_ldmLabel) m_ldmLabel->setID("ldm-label"); if(m_ldmToggler) m_ldmToggler->setID("ldm-toggler");*/ +#ifndef GEODE_IS_IOS // IOS TODO if(m_difficultySprite) m_difficultySprite->setID("difficulty-sprite"); if(m_songWidget) m_songWidget->setID("custom-songs-widget"); +#endif if(m_circle) m_circle->setID("loading-circle"); size_t coinIdx = 1; diff --git a/src/MoreOptionsLayer.cpp b/src/MoreOptionsLayer.cpp index e94be5f..ecd1cdc 100644 --- a/src/MoreOptionsLayer.cpp +++ b/src/MoreOptionsLayer.cpp @@ -31,7 +31,7 @@ using namespace geode::node_ids; "music-offset-input" ); -#ifdef GEODE_IS_ANDROID +#if defined(GEODE_IS_ANDROID) || defined(GEODE_IS_IOS) std::array gameplayMenu1NodeNames{ "auto-retry", "enable-faster-reset", "hide-attempts", "flip-pause-button", @@ -56,7 +56,7 @@ using namespace geode::node_ids; } } -#ifdef GEODE_IS_ANDROID +#if defined(GEODE_IS_ANDROID) || defined(GEODE_IS_IOS) std::array gameplayMenu2NodeNames{ "default-mini-icon", "switch-spider-teleport-color", "switch-dash-fire-color", "switch-wave-trail-color", @@ -79,7 +79,7 @@ using namespace geode::node_ids; } } -#ifdef GEODE_IS_ANDROID +#if defined(GEODE_IS_ANDROID) || defined(GEODE_IS_IOS) std::array practiceMenuNodeNames{ "hide-attempts", "enable-auto-checkpoints", "enable-quick-checkpoints", "enable-death-effect", @@ -110,7 +110,7 @@ using namespace geode::node_ids; } #endif -#ifdef GEODE_IS_ANDROID +#if defined(GEODE_IS_ANDROID) || defined(GEODE_IS_IOS) std::array performanceMenuNodeNames{ "enable-smooth-fix", "increase-draw-capacity", "enable-low-detail", "disable-high-object-alert", @@ -140,7 +140,7 @@ using namespace geode::node_ids; } } -#ifdef GEODE_IS_ANDROID +#if defined(GEODE_IS_ANDROID) || defined(GEODE_IS_IOS) std::array audioMenuNodeNames{ "disable-song-alert", "no-song-limit", "reduce-quality", "audio-fix-01" @@ -168,7 +168,7 @@ using namespace geode::node_ids; } } -#ifdef GEODE_IS_ANDROID +#if defined(GEODE_IS_ANDROID) || defined(GEODE_IS_IOS) std::array otherMenuNodeNames{ "more-comments", "load-comments", "new-completed-filter", "increase-local-levels-per-page", @@ -217,7 +217,7 @@ using namespace geode::node_ids; #endif -#ifdef GEODE_IS_ANDROID +#if defined(GEODE_IS_ANDROID) || defined(GEODE_IS_IOS) constexpr std::array, 6> pageIdxToObjectIdxStartEnd{ std::make_pair(0, 20), // 10 togglers * 2 (multiplied by 2 to account for the toggler and the info icon) std::make_pair(20, 32), // 6 * 2 From 4076572f747d121fae837f42a16fc25529712a16 Mon Sep 17 00:00:00 2001 From: rooot Date: Tue, 23 Apr 2024 02:43:27 +0200 Subject: [PATCH 2/8] m_songWidget exists now Signed-off-by: rooot --- src/LevelInfoLayer.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/LevelInfoLayer.cpp b/src/LevelInfoLayer.cpp index 5a49902..77933c2 100644 --- a/src/LevelInfoLayer.cpp +++ b/src/LevelInfoLayer.cpp @@ -57,10 +57,8 @@ using namespace geode::node_ids; /*if(m_ldmLabel) m_ldmLabel->setID("ldm-label"); if(m_ldmToggler) m_ldmToggler->setID("ldm-toggler");*/ -#ifndef GEODE_IS_IOS // IOS TODO if(m_difficultySprite) m_difficultySprite->setID("difficulty-sprite"); if(m_songWidget) m_songWidget->setID("custom-songs-widget"); -#endif if(m_circle) m_circle->setID("loading-circle"); size_t coinIdx = 1; From f7e19d3014675612f969f43fee61ec13dbd0ddc5 Mon Sep 17 00:00:00 2001 From: rooot Date: Tue, 23 Apr 2024 23:44:39 +0200 Subject: [PATCH 3/8] feat: temporarily use actions fork Signed-off-by: rooot --- .github/workflows/build.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 67050da..7a72910 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -18,6 +18,10 @@ jobs: - name: macOS os: macos-latest + - name: iOS + os: macos-latest + target: iOS + - name: Android32 os: ubuntu-latest target: Android32 @@ -33,7 +37,7 @@ jobs: - uses: actions/checkout@v4 - name: Build the mod - uses: geode-sdk/build-geode-mod@main + uses: RoootTheFox/build-geode-mod@main with: combine: true target: ${{ matrix.config.target }} @@ -44,7 +48,7 @@ jobs: needs: ['build'] steps: - - uses: geode-sdk/build-geode-mod/combine@main + - uses: RoootTheFox/build-geode-mod/combine@main id: build - uses: actions/upload-artifact@v3 From 1f0d3b78f301a07b4a11c8d15965fc6a39be1d3b Mon Sep 17 00:00:00 2001 From: Justin <52604018+hiimjustin000@users.noreply.github.com> Date: Tue, 21 May 2024 13:50:05 -0400 Subject: [PATCH 4/8] Update build.yml --- .github/workflows/build.yml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 67050da..3a6765b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -4,7 +4,7 @@ on: workflow_dispatch: push: branches: - - "**" + - "ios" jobs: build: @@ -18,6 +18,10 @@ jobs: - name: macOS os: macos-latest + - name: iOS + os: macos-latest + target: iOS + - name: Android32 os: ubuntu-latest target: Android32 @@ -33,7 +37,7 @@ jobs: - uses: actions/checkout@v4 - name: Build the mod - uses: geode-sdk/build-geode-mod@main + uses: RoootTheFox/build-geode-mod@main with: combine: true target: ${{ matrix.config.target }} @@ -44,7 +48,7 @@ jobs: needs: ['build'] steps: - - uses: geode-sdk/build-geode-mod/combine@main + - uses: RoootTheFox/build-geode-mod/combine@main id: build - uses: actions/upload-artifact@v3 From fe7808c60dacad2211b661e8118ee143631a6449 Mon Sep 17 00:00:00 2001 From: Justin <52604018+hiimjustin000@users.noreply.github.com> Date: Tue, 21 May 2024 13:53:19 -0400 Subject: [PATCH 5/8] Update MoreOptionsLayer.cpp --- src/MoreOptionsLayer.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/MoreOptionsLayer.cpp b/src/MoreOptionsLayer.cpp index e94be5f..ecd1cdc 100644 --- a/src/MoreOptionsLayer.cpp +++ b/src/MoreOptionsLayer.cpp @@ -31,7 +31,7 @@ using namespace geode::node_ids; "music-offset-input" ); -#ifdef GEODE_IS_ANDROID +#if defined(GEODE_IS_ANDROID) || defined(GEODE_IS_IOS) std::array gameplayMenu1NodeNames{ "auto-retry", "enable-faster-reset", "hide-attempts", "flip-pause-button", @@ -56,7 +56,7 @@ using namespace geode::node_ids; } } -#ifdef GEODE_IS_ANDROID +#if defined(GEODE_IS_ANDROID) || defined(GEODE_IS_IOS) std::array gameplayMenu2NodeNames{ "default-mini-icon", "switch-spider-teleport-color", "switch-dash-fire-color", "switch-wave-trail-color", @@ -79,7 +79,7 @@ using namespace geode::node_ids; } } -#ifdef GEODE_IS_ANDROID +#if defined(GEODE_IS_ANDROID) || defined(GEODE_IS_IOS) std::array practiceMenuNodeNames{ "hide-attempts", "enable-auto-checkpoints", "enable-quick-checkpoints", "enable-death-effect", @@ -110,7 +110,7 @@ using namespace geode::node_ids; } #endif -#ifdef GEODE_IS_ANDROID +#if defined(GEODE_IS_ANDROID) || defined(GEODE_IS_IOS) std::array performanceMenuNodeNames{ "enable-smooth-fix", "increase-draw-capacity", "enable-low-detail", "disable-high-object-alert", @@ -140,7 +140,7 @@ using namespace geode::node_ids; } } -#ifdef GEODE_IS_ANDROID +#if defined(GEODE_IS_ANDROID) || defined(GEODE_IS_IOS) std::array audioMenuNodeNames{ "disable-song-alert", "no-song-limit", "reduce-quality", "audio-fix-01" @@ -168,7 +168,7 @@ using namespace geode::node_ids; } } -#ifdef GEODE_IS_ANDROID +#if defined(GEODE_IS_ANDROID) || defined(GEODE_IS_IOS) std::array otherMenuNodeNames{ "more-comments", "load-comments", "new-completed-filter", "increase-local-levels-per-page", @@ -217,7 +217,7 @@ using namespace geode::node_ids; #endif -#ifdef GEODE_IS_ANDROID +#if defined(GEODE_IS_ANDROID) || defined(GEODE_IS_IOS) constexpr std::array, 6> pageIdxToObjectIdxStartEnd{ std::make_pair(0, 20), // 10 togglers * 2 (multiplied by 2 to account for the toggler and the info icon) std::make_pair(20, 32), // 6 * 2 From 6bc8ca3c77508fe785a1f8b7bab5fad7c150e550 Mon Sep 17 00:00:00 2001 From: Justin <52604018+hiimjustin000@users.noreply.github.com> Date: Tue, 21 May 2024 13:54:10 -0400 Subject: [PATCH 6/8] Update CMakeLists.txt --- CMakeLists.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 20a3f06..83dfdd6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,7 +1,11 @@ cmake_minimum_required(VERSION 3.21) set(CMAKE_CXX_STANDARD 20) set(CMAKE_CXX_STANDARD_REQUIRED ON) -set(CMAKE_OSX_ARCHITECTURES "x86_64") +if ("${GEODE_TARGET_PLATFORM}" STREQUAL "iOS" OR IOS) + set(CMAKE_OSX_ARCHITECTURES "arm64") +else() + set(CMAKE_OSX_ARCHITECTURES "x86_64") +endif() set(CMAKE_CXX_VISIBILITY_PRESET hidden) project(NodeIDs VERSION 1.0.0) From 22d5be641c9658c7574aea3359b74ddc5014cbdf Mon Sep 17 00:00:00 2001 From: Justin <52604018+hiimjustin000@users.noreply.github.com> Date: Tue, 21 May 2024 17:38:18 -0400 Subject: [PATCH 7/8] Update build.yml --- .github/workflows/build.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3a6765b..29255db 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -39,6 +39,8 @@ jobs: - name: Build the mod uses: RoootTheFox/build-geode-mod@main with: + bindings: hiimjustin000/bindings + bindings-ref: patch-2 combine: true target: ${{ matrix.config.target }} From ed92b2cee6115fb983da56ffb97929856cb30abf Mon Sep 17 00:00:00 2001 From: Justin <52604018+hiimjustin000@users.noreply.github.com> Date: Tue, 21 May 2024 17:53:03 -0400 Subject: [PATCH 8/8] Update build.yml --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 29255db..1bb00fb 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -4,7 +4,7 @@ on: workflow_dispatch: push: branches: - - "ios" + - "**" jobs: build: