-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
276 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
name: Build Geode Mod | ||
|
||
permissions: | ||
contents: write | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- '**' | ||
|
||
jobs: | ||
|
||
build: | ||
continue-on-error: true # continue even if build failed for some platform | ||
strategy: | ||
|
||
fail-fast: false | ||
matrix: | ||
config: | ||
- name: Windows | ||
os: windows-latest | ||
|
||
- name: macOS | ||
os: macos-latest | ||
|
||
- name: Android64 | ||
os: ubuntu-latest | ||
target: Android64 | ||
|
||
- name: Android32 | ||
os: ubuntu-latest | ||
target: Android32 | ||
|
||
name: ${{ matrix.config.name }} | ||
runs-on: ${{ matrix.config.os }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Build the mod | ||
uses: geode-sdk/build-geode-mod@main | ||
with: | ||
target: ${{ matrix.config.target }} | ||
combine: true | ||
|
||
upload: | ||
name: Combine and upload builds | ||
runs-on: ubuntu-latest | ||
needs: ['build'] | ||
steps: | ||
|
||
- name: "Combine builds" | ||
uses: geode-sdk/build-geode-mod/combine@main | ||
id: build | ||
|
||
- name: "Upload artifact" | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: Build Output | ||
path: ${{ steps.build.outputs.build-output }} | ||
|
||
- name: "Set up Git repository" | ||
uses: actions/checkout@v2 | ||
|
||
- name: "Development Release" | ||
uses: ncipollo/release-action@v1 | ||
with: | ||
name: "Development Release" | ||
body: | | ||
Release of success build for latest commit on `${{ github.head_ref || github.ref_name }}`. | ||
The build workflow run for this release goes in [#${{ github.run_id }}](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}) | ||
tag: "nightly" | ||
prerelease: true | ||
allowUpdates: true | ||
artifactErrorsFailBuild: true | ||
artifacts: "${{steps.build.outputs.build-output}}/*" | ||
|
||
- name: "Get mod properties" | ||
id: json_properties | ||
uses: ActionsTools/read-json-action@main | ||
with: | ||
file_path: "mod.json" | ||
|
||
- name: "Try Release Version" | ||
uses: ncipollo/release-action@v1 | ||
with: | ||
generateReleaseNotes: true | ||
tag: "${{steps.json_properties.outputs.version}}" | ||
artifacts: "${{steps.build.outputs.build-output}}/*" | ||
artifactErrorsFailBuild: true | ||
allowUpdates: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
# Prerequisites | ||
*.d | ||
|
||
# Compiled Object files | ||
*.slo | ||
*.lo | ||
*.o | ||
*.obj | ||
|
||
# Precompiled Headers | ||
*.gch | ||
*.pch | ||
|
||
# Compiled Dynamic libraries | ||
*.so | ||
*.dylib | ||
*.dll | ||
|
||
# Fortran module files | ||
*.mod | ||
*.smod | ||
|
||
# Compiled Static libraries | ||
*.lai | ||
*.la | ||
*.a | ||
*.lib | ||
|
||
# Executables | ||
*.exe | ||
*.out | ||
*.app | ||
|
||
# Macos be like | ||
**/.DS_Store | ||
|
||
# Cache files for Sublime Text | ||
*.tmlanguage.cache | ||
*.tmPreferences.cache | ||
*.stTheme.cache | ||
|
||
# Ignore build folders | ||
**/build | ||
# Ignore platform specific build folders | ||
build-*/ | ||
|
||
# Workspace files are user-specific | ||
*.sublime-workspace | ||
|
||
# ILY vscode | ||
**/.vscode | ||
|
||
# Local History for Visual Studio Code | ||
.history/ | ||
|
||
# clangd | ||
.cache/ | ||
|
||
# Visual Studio | ||
.vs/ | ||
|
||
# CLion | ||
.idea/ | ||
/cmake-build-*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
cmake_minimum_required(VERSION 3.21) | ||
set(CMAKE_CXX_STANDARD 20) | ||
set(CMAKE_CXX_STANDARD_REQUIRED ON) | ||
set(CMAKE_OSX_ARCHITECTURES "arm64;x86_64") | ||
set(CMAKE_CXX_VISIBILITY_PRESET hidden) | ||
|
||
project(NoGeodeUI VERSION 1.0.0) | ||
|
||
add_library(${PROJECT_NAME} SHARED | ||
src/main.cpp | ||
# Add any extra C++ source files here | ||
) | ||
|
||
if (NOT DEFINED ENV{GEODE_SDK}) | ||
message(FATAL_ERROR "Unable to find Geode SDK! Please define GEODE_SDK environment variable to point to Geode") | ||
else() | ||
message(STATUS "Found Geode: $ENV{GEODE_SDK}") | ||
endif() | ||
|
||
add_subdirectory($ENV{GEODE_SDK} ${CMAKE_CURRENT_BINARY_DIR}/geode) | ||
|
||
setup_geode_mod(${PROJECT_NAME}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{ | ||
"configurations": [ | ||
{ | ||
"name": "x64-Clang-Release", | ||
"generator": "Ninja", | ||
"configurationType": "RelWithDebInfo", | ||
"buildRoot": "${projectDir}\\out\\build\\${name}", | ||
"installRoot": "${projectDir}\\out\\install\\${name}", | ||
"cmakeCommandArgs": "", | ||
"buildCommandArgs": "", | ||
"ctestCommandArgs": "", | ||
"inheritEnvironments": [ "clang_cl_x64_x64" ], | ||
"variables": [] | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# NoGeodeUI | ||
This is where she makes a mod. | ||
|
||
<img src="logo.png" width="150" alt="the mod's logo" /> | ||
|
||
*Update logo.png to change your mod's icon (please)* | ||
|
||
## Getting started | ||
We recommend heading over to [the getting started section on our docs](https://docs.geode-sdk.org/getting-started/) for useful info on what to do next. | ||
|
||
## Build instructions | ||
For more info, see [our docs](https://docs.geode-sdk.org/getting-started/create-mod#build) | ||
```sh | ||
# Assuming you have the Geode CLI set up already | ||
geode build | ||
``` | ||
|
||
# Resources | ||
* [Geode SDK Documentation](https://docs.geode-sdk.org/) | ||
* [Geode SDK Source Code](https://github.com/geode-sdk/geode/) | ||
* [Geode CLI](https://github.com/geode-sdk/cli) | ||
* [Bindings](https://github.com/geode-sdk/bindings/) | ||
* [Dev Tools](https://github.com/geode-sdk/DevTools) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# No Geode UI | ||
|
||
Remove button, loading label and all other nodes about geode loader. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
"early-load": true, | ||
"geode": "3.4.0", | ||
"gd": { | ||
"win": "*", | ||
"android": "*", | ||
"mac": "*", | ||
"ios": "*" | ||
}, | ||
"id": "user95401.no_geode_ui", | ||
"name": "No Geode UI", | ||
"version": "v1.0.0", | ||
"developer": "user95401", | ||
"description": "Remove button, loading label and all other nodes about geode loader." | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
#include <Geode/Geode.hpp> | ||
|
||
using namespace geode::prelude; | ||
|
||
#include <Geode/modify/CCNode.hpp> | ||
class CCNodeGeodeExt : public CCNode { | ||
public: | ||
void customSetup() { | ||
if (string::containsAny(this->getID(), { "geode.loader/", "geode-" })) { | ||
auto parent = this->getParent(); | ||
if (parent && parent->getLayout()) { | ||
this->removeFromParentAndCleanup(0); | ||
parent->updateLayout(); | ||
} | ||
} | ||
} | ||
static void setID_det(CCNodeGeodeExt* __this, std::string const& id) { | ||
__this->setID(id); | ||
if (string::containsAny(id, { "geode.loader/", "geode-" })) { | ||
log::warn("{} \"{}\" got removed", __this, id); | ||
__this->setVisible(0); | ||
__this->setContentSize(CCSizeZero); | ||
} | ||
__this->scheduleOnce(schedule_selector(CCNodeGeodeExt::customSetup), 0.f); | ||
} | ||
static void hook() { | ||
auto hook = Mod::get()->hook( | ||
reinterpret_cast<void*>( | ||
geode::addresser::getNonVirtual(&CCNode::setID) | ||
), | ||
&CCNodeGeodeExt::setID_det, | ||
"CCNode::setID", | ||
tulip::hook::TulipConvention::Thiscall | ||
); | ||
if (hook.has_error()) log::error("hook failed: {}", hook.error_or("no error...")); | ||
if (hook.has_value()) log::debug("{}", hook.value()->getRuntimeInfo().dump(4)); | ||
} | ||
}; | ||
|
||
$on_mod(Loaded) { | ||
CCNodeGeodeExt::hook(); | ||
}; |