Skip to content

Commit b411446

Browse files
committed
ios!
1 parent 75266c4 commit b411446

File tree

13 files changed

+57
-22
lines changed

13 files changed

+57
-22
lines changed

.github/workflows/build.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ jobs:
2323
- name: Android64
2424
os: ubuntu-latest
2525
target: Android64
26+
- name: iOS
27+
os: macos-latest
28+
target: iOS
2629

2730

2831
name: ${{ matrix.config.name }}
@@ -34,19 +37,20 @@ jobs:
3437
submodules: 'recursive'
3538

3639
- name: Build the mod
37-
uses: geode-sdk/build-geode-mod@main
40+
#uses: geode-sdk/build-geode-mod@main
41+
uses: RoootTheFox/build-geode-mod@main
3842
with:
3943
#sdk: nightly
4044
combine: true
41-
configure-args: '-DGEODE_DISABLE_FMT_CONSTEVAL=1'
4245
target: ${{ matrix.config.target }}
4346

4447
package:
4548
name: Package builds
4649
runs-on: ubuntu-latest
4750
needs: ['build']
4851
steps:
49-
- uses: geode-sdk/build-geode-mod@combine
52+
#- uses: geode-sdk/build-geode-mod@combine
53+
- uses: RoootTheFox/build-geode-mod/combine@main
5054
id: build
5155

5256
- uses: actions/upload-artifact@v3

CMakeLists.txt

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,18 @@
11
cmake_minimum_required(VERSION 3.5.0)
22
set(CMAKE_CXX_STANDARD 20)
33
set(CMAKE_CXX_STANDARD_REQUIRED ON)
4-
set(CMAKE_OSX_ARCHITECTURES "x86_64")
4+
if (${GEODE_TARGET_PLATFORM} STREQUAL "iOS" OR IOS)
5+
set(CMAKE_OSX_ARCHITECTURES "arm64")
6+
else()
7+
set(CMAKE_OSX_ARCHITECTURES "x86_64")
8+
endif()
59
set(CMAKE_CXX_VISIBILITY_PRESET hidden)
610

7-
set(GEODE_COMPILER "clang-cl")
8-
set(GEODE_CCACHE_VARIANT "sccache")
9-
set(GEODE_TRIPLE "i686-unknown-windows-msvc")
11+
if (WIN32)
12+
set(GEODE_COMPILER "clang-cl")
13+
set(GEODE_CCACHE_VARIANT "sccache")
14+
set(GEODE_TRIPLE "i686-unknown-windows-msvc")
15+
endif()
1016

1117
set(PROJECT_NAME GDUtils)
1218
project(${PROJECT_NAME} VERSION 1.0.0)
@@ -44,7 +50,7 @@ endif()
4450
add_subdirectory($ENV{GEODE_SDK} ${CMAKE_CURRENT_BINARY_DIR}/geode)
4551

4652
add_subdirectory(libs/socket.io-client-cpp)
47-
if (APPLE)
53+
if (APPLE AND NOT (${GEODE_TARGET_PLATFORM} STREQUAL "iOS" OR IOS))
4854
target_link_libraries(${PROJECT_NAME} sioclient "-framework OpenGL")
4955
#${CMAKE_CURRENT_SOURCE_DIR}/libs/link-libs/discord-rpc/libdiscord-rpc.a
5056
else()

about.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# GDUtils (Geode Port)
22
**by [Jouca](user:7026949) and [Firee](user:6253758)**
33
A Geometry Dash Mod for adding more tools such as Notifications, auto-song mute, game fixes & more!
4+
45
![Mod Example](gdutilsdevs.gdutils/Screenshot_1.png)
56

67
# Need help?

build-ios.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
export GEODE_SDK=~/geodeiosreal
2+
export GEODE_BINDINGS_REPO_PATH=~/geodeiosbindings
3+
cmake -B build-ios -DGEODE_TARGET_PLATFORM=iOS \
4+
-DCMAKE_SYSTEM_NAME=iOS \
5+
-DCMAKE_BUILD_TYPE=RelWithDebInfo
6+
cd build-ios
7+
gmake -j8

changelog.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# v1.2.20
2+
- Added iOS support (Only BG and notifications currently work)
13
# v1.2.19
24
- Fix performance issues with the bg color (Thanks camila!)
35
# v1.2.18

mod.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
{
2-
"geode": "2.0.0-beta.23",
3-
"version": "v1.2.19",
2+
"geode": "2.0.0-beta.25",
3+
"version": "v1.2.20",
44
"gd": {
55
"win": "2.204",
6-
"android": "2.205"
6+
"android": "2.205",
7+
"ios": "2.205"
78
},
89
"id": "gdutilsdevs.gdutils",
910
"name": "GDUtils",

src/MoreLeaderboards/MoreLeaderboards.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,14 +154,20 @@ bool MoreLeaderboards::init(std::string type) {
154154
m_menu->addChild(m_creatorsTabBtn);
155155

156156
// tabs gradient
157+
#ifndef GEODE_IS_IOS
157158
m_tabsGradientNode = CCClippingNode::create();
159+
#else
160+
m_tabsGradientNode = CCNode::create();
161+
#endif
158162
m_tabsGradientNode->setContentSize(this->getContentSize());
159163
m_tabsGradientNode->setAnchorPoint({0.5f, 0.5f});
160164
m_tabsGradientNode->ignoreAnchorPointForPosition(true);
161165
m_tabsGradientNode->setZOrder(0);
162166
m_tabsGradientNode->setScale(0.8f);
167+
#ifndef GEODE_IS_IOS
163168
m_tabsGradientNode->setInverted(false);
164169
m_tabsGradientNode->setAlphaThreshold(0.7f);
170+
#endif
165171

166172
m_tabsGradientSprite = CCSprite::create("tab-gradient.png"_spr);
167173
m_tabsGradientNode->addChild(m_tabsGradientSprite);
@@ -171,7 +177,10 @@ bool MoreLeaderboards::init(std::string type) {
171177
m_tabsGradientStencil->setColor({172, 255, 67});
172178
m_tabsGradientStencil->setZOrder(1);
173179
m_tabsGradientStencil->setScale(0.8f);
180+
181+
#ifndef GEODE_IS_IOS
174182
m_tabsGradientNode->setStencil(m_tabsGradientStencil);
183+
#endif
175184

176185
// add menus
177186
m_menu->setZOrder(1);

src/MoreLeaderboards/MoreLeaderboards.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,11 @@ class MoreLeaderboards : public CCLayer {
3030
CCMenuItemToggler* m_demonsTabBtn;
3131
CCMenuItemToggler* m_moonsTabBtn;
3232
CCMenuItemToggler* m_creatorsTabBtn;
33+
#ifndef GEODE_IS_IOS
3334
CCClippingNode* m_tabsGradientNode = nullptr;
35+
#else
36+
CCNode* m_tabsGradientNode = nullptr;
37+
#endif
3438
CCSprite* m_tabsGradientSprite = nullptr;
3539
CCSprite* m_tabsGradientStencil = nullptr;
3640

src/Notifications/EventsPush.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ std::vector<std::string> split_str(std::string &string, char separator) {
109109
GJGameLevel* EventsPush::convertLevelToJSON(std::string& data) {
110110
// Robtop to JSON
111111
GJGameLevel* level = GJGameLevel::create();
112-
#ifndef GEODE_IS_ANDROID64 // for some reason a field isnt known
112+
#ifdef GEODE_IS_WINDOWS
113113
auto gamelevelmanager = GameLevelManager::sharedState();
114114
auto gamestatslevel = GameStatsManager::sharedState();
115115

src/Secret/BadApple.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
// SPOILERSSS
22
#include "BadApple.h"
3-
#ifndef GEODE_IS_MACOS
3+
#ifdef GEODE_IS_WINDOWS
44
#include "../Utils/DownloadManager.h"
55
#else // mac
66
#include <ctime>
77
#include <cxxabi.h>
88
#endif
9-
#include <filesystem>
109
BadApple* BadApple::create() {
1110
auto pRet = new BadApple();
1211
if (pRet && pRet->BadApple::init()) {
@@ -105,7 +104,9 @@ class $modify(SecretVault, SecretLayer2) {
105104
SecretVault::launchBadApple(node);
106105
} else {
107106
log::info("wait for bad apple");
107+
#ifdef GEODE_IS_WINDOWS
108108
DownloadManager::create("https://clarifygdps.com/videos/bad_apple.mpg", "gdutils/bad_apple.mpg", menu_selector(SecretVault::launchBadApple))->show();
109+
#endif
109110
}
110111
}
111112

0 commit comments

Comments
 (0)