Skip to content

Commit

Permalink
Merge pull request #382 from geode-sdk/2.0.0-dev
Browse files Browse the repository at this point in the history
2.0.0 dev
  • Loading branch information
matcool authored Dec 20, 2023
2 parents 0387314 + 1d57eb5 commit 44d773a
Show file tree
Hide file tree
Showing 99 changed files with 2,873 additions and 10,020 deletions.
46 changes: 43 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ jobs:
- name: Windows
os: windows-latest
id: win
cli_id: win
extra_flags: -T host=x64 -A win32 -DCMAKE_BUILD_TYPE=RelWithDebInfo -DGEODE_DEBUG=On
# uncomment to use vs clang-cl and ninja
#extra_flags: >
Expand All @@ -35,6 +36,7 @@ jobs:
- name: macOS
os: macos-latest
id: mac
cli_id: mac
extra_flags: >
-DCMAKE_C_COMPILER=clang
-DCMAKE_CXX_COMPILER=clang++
Expand All @@ -44,6 +46,21 @@ jobs:
cli_cmd: 'chmod +x $GITHUB_WORKSPACE/cli/geode'
package_cmd: './installer/mac/package.sh ./bin/nightly ./installer/mac/geode-installer-mac.pkg'
installer_path: './installer/mac/geode-installer-mac.pkg'

- name: Android
os: ubuntu-latest
id: android
cli_id: linux
extra_flags: >
-DCMAKE_TOOLCHAIN_FILE=$NDK_HOME/build/cmake/android.toolchain.cmake
-DANDROID_ABI=armeabi-v7a
-DANDROID_PLATFORM=android-23
-DGEODE_DONT_BUILD_TEST_MODS=1
-G Ninja
cli_cmd: 'chmod +x $GITHUB_WORKSPACE/cli/geode'
package_cmd: ''
installer_path: ''


name: Build ${{ matrix.config.name }}
runs-on: ${{ matrix.config.os }}
Expand All @@ -58,30 +75,44 @@ jobs:
uses: hendrikmuhs/ccache-action@v1
with:
key: ${{ matrix.config.os }}
if: matrix.config.id == 'mac'
if: matrix.config.id != 'win'

- name: Setup MSVC
uses: ilammy/[email protected]
with:
arch: amd64_x86
if: matrix.config.id == 'win'

- name: Setup NDK
uses: nttld/setup-ndk@v1
id: setup-ndk
with:
ndk-version: r26b
add-to-path: false
if: matrix.config.id == 'android'

- name: Download CLI
uses: robinraju/[email protected]
with:
repository: geode-sdk/cli
latest: true
fileName: '*-${{ matrix.config.id }}.zip'
fileName: '*-${{ matrix.config.cli_id }}.zip'
tarBall: false
zipBall: false
out-file-path: "cli"

- name: Setup CLI
run: |
7z x "${{ github.workspace }}/cli/*-${{ matrix.config.id }}.zip" -o"${{ github.workspace }}/cli"
7z x "${{ github.workspace }}/cli/*-${{ matrix.config.cli_id }}.zip" -o"${{ github.workspace }}/cli"
${{ matrix.config.cli_cmd }}
echo "${{ github.workspace }}/cli" >> $GITHUB_PATH
- name: Setup Android Env
run: |
echo "NDK_HOME=${{ steps.setup-ndk.outputs.ndk-path }}" >> "$GITHUB_ENV"
sudo apt install ninja-build
if: matrix.config.id == 'android'

- name: Configure
run: >
cmake -B ${{ github.workspace }}/build
Expand All @@ -102,12 +133,14 @@ jobs:

- name: Package Installer
run: ${{ matrix.config.package_cmd }}
if: matrix.config.id != 'android'

- name: Upload Installer
uses: actions/upload-artifact@v3
with:
name: geode-installer-${{ matrix.config.id }}
path: ${{ matrix.config.installer_path }}
if: matrix.config.id != 'android'

publish:
name: Publish
Expand Down Expand Up @@ -147,6 +180,12 @@ jobs:
files: geode-win/XInput9_1_0.dll geode-win/Geode.dll geode-win/GeodeUpdater.exe geode-win/Geode.lib geode-win/Geode.pdb
dest: geode-${{ steps.ref.outputs.hash }}-win.zip

- name: Zip Android Artifacts
uses: vimtor/[email protected]
with:
files: geode-android/Geode.so
dest: geode-${{ steps.ref.outputs.hash }}-android.zip

- name: Zip Resources
uses: vimtor/[email protected]
with:
Expand All @@ -167,4 +206,5 @@ jobs:
./geode-installer-${{ steps.ref.outputs.hash }}-win.exe
./geode-${{ steps.ref.outputs.hash }}-mac.zip
./geode-${{ steps.ref.outputs.hash }}-win.zip
./geode-${{ steps.ref.outputs.hash }}-android.zip
./resources.zip
2 changes: 2 additions & 0 deletions .github/workflows/draft.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ jobs:
mv dev/geode-installer-*-win.exe geode-installer-v${{ steps.ref.outputs.version }}-win.exe
mv dev/geode-*-mac.zip geode-v${{ steps.ref.outputs.version }}-mac.zip
mv dev/geode-*-win.zip geode-v${{ steps.ref.outputs.version }}-win.zip
mv dev/geode-*-android.zip geode-v${{ steps.ref.outputs.version }}-android.zip
mv dev/resources.zip resources.zip
- name: Create Draft Release
Expand All @@ -48,4 +49,5 @@ jobs:
./geode-installer-v${{ steps.ref.outputs.version }}-win.exe
./geode-v${{ steps.ref.outputs.version }}-mac.zip
./geode-v${{ steps.ref.outputs.version }}-win.zip
./geode-v${{ steps.ref.outputs.version }}-android.zip
./resources.zip
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
**/*.tmlanguage.cache
**/*.tmPreferences.cache
**/*.stTheme.cache
.cache

# Workspace files are user-specific
**/*.sublime-workspace
Expand Down
31 changes: 29 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,32 @@
# Geode Changelog

## v1.4.0
* Add Android support !!!!
* Implement every Geode functionality except `utils::file::openFolder`
* Requires the Geode launcher in order to be used
* Fixes the text input node allowing typing for 1 less character
* Uses `logcat` in order to get crash reports, so reopening the game is required to generate them
* Broma requires classes to be added `[[link(android)]]` in order to be linked
* All Geode and GD files are stored in `Android/data/com.geode.launcher/files`
* Game files in `game`, save files in `save`
* Allow logging to be disabled per mod (6d599a5)
* Mod cells use layouts (114fa46)
* MacOS console is now separate (182984d)
* Add uninstall button to Geode mod (Only functional in Windows currently) (a738320)
* Make new version label invisible on download (0f179da)
* Fix the toggling of disabled dependencies (cd89ef1)
* Fix spritesheet issues (ef47647)
* Change `LoadingLayer` (ef47647)
* Make mod info popup top a layout (dd806e0)
* Add `GEODE_HIDDEN` to inline unique functions (71a79ab)
* Fix big mod icons (26a6c7e)
* Fix `CCNode::removeChildByID` export (23cd456)
* Make `MDTextArea` fit its size (140f38b)
* Enable ESC/Back to go back in Geode mod list (2847bee)
* Add `SimpleTextArea` (7f277a7)
* Check modified date when unzipping `.geode` files (5c765c6)
* Only hash markdown files on resource checking (f563c46)

## v1.3.10
* Panic if decompressString2 fails, to prevent data loss (0787b8f4)

Expand Down Expand Up @@ -253,7 +280,7 @@ Thank you to [Fleeym](https://github.com/Fleeym/Fleeym) for contributing to this
* Fix recursive comparison in VersionTag
* `geode/unzipped` is now deleted on startup if it exists

## v1.0.0-beta.9
## v1.0.0-beta.9
* Fix multiple modifiers not being able to have fields on same class due to having same field index
* Add `Result::ok` and `Result::err` for converting the `Result` into `std::optional`

Expand Down Expand Up @@ -321,7 +348,7 @@ Thank you to [Fleeym](https://github.com/Fleeym/Fleeym) for contributing to this
- Something related to codegen and addresser? I have no clue what it does, so you probably won't have either
- MacOS minimum version bumped to 10.14

## v1.0.0-beta.2
## v1.0.0-beta.2
* Fixed bug where `Mod::getSavedValue` would cause a crash due to trying operator on a null JSON value
* Fixed bug where loading would crash if one of the mods' binaries failed to load

Expand Down
31 changes: 24 additions & 7 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@ set(GEODE_BIN_PATH ${CMAKE_CURRENT_SOURCE_DIR}/bin)
set(GEODE_LOADER_PATH ${CMAKE_CURRENT_SOURCE_DIR}/loader)
set(GEODE_ROOT_PATH ${CMAKE_CURRENT_SOURCE_DIR})

include(cmake/GeodeFile.cmake)
include(cmake/Platform.cmake)
include(cmake/GeodeFile.cmake)
include(cmake/CPM.cmake)

if (PROJECT_IS_TOP_LEVEL AND NOT GEODE_BUILDING_DOCS)
Expand All @@ -96,7 +96,7 @@ if (PROJECT_IS_TOP_LEVEL AND NOT GEODE_BUILDING_DOCS)
set(TULIP_LINK_SOURCE ON)
endif()
set(CMAKE_WARN_DEPRECATED OFF CACHE BOOL "" FORCE)
CPMAddPackage("gh:geode-sdk/TulipHook#3423a29")
CPMAddPackage("gh:geode-sdk/TulipHook#d2132de")
set(CMAKE_WARN_DEPRECATED ON CACHE BOOL "" FORCE)

# Silence warnings from dependencies
Expand All @@ -115,11 +115,25 @@ add_library(GeodeFilesystemImpl ${CMAKE_CURRENT_SOURCE_DIR}/FilesystemImpl.cpp)
target_compile_features(GeodeFilesystemImpl PUBLIC cxx_std_20)
target_link_libraries(GeodeFilesystemImpl PUBLIC ghc_filesystem)

# Allow users to have their own copy of bindings that can be overwritten with a CMake option.
# If the option is not provided, by default just clone bindings with CPM and use that
if (NOT GEODE_BINDINGS_REPO_PATH)
message(STATUS
"No override path for bindings provided, using CPM to clone default. "
"If you would like to use a separate clone of the bindings repo "
"(for example in order to be able to efficiently change and "
"contribute new bindings) then set GEODE_BINDINGS_REPO_PATH to where you have "
"cloned the repository."
)
CPMAddPackage("gh:geode-sdk/bindings#2c4e7b9")
set(GEODE_BINDINGS_REPO_PATH ${GeodeBindings_SOURCE_DIR})
endif()

include(ExternalProject)
set(GEODE_CODEGEN_BINARY_OUT ${CMAKE_CURRENT_BINARY_DIR}/codegen)
ExternalProject_Add(CodegenProject
BUILD_ALWAYS ON
SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/codegen
SOURCE_DIR ${GEODE_BINDINGS_REPO_PATH}
# manually set configure command as to not inherit generator used by geode,
# this should hopefully fix generator cache mismatch between different projects, however
# it causes a warning to be shown every time. if you know a better solution please tell us ok thx
Expand All @@ -133,13 +147,13 @@ ExternalProject_Add(CodegenProject


file(GLOB CODEGEN_DEPENDS CONFIGURE_DEPENDS
${CMAKE_CURRENT_SOURCE_DIR}/bindings/*.bro
${CMAKE_CURRENT_SOURCE_DIR}/codegen/src/*.cpp
${CMAKE_CURRENT_SOURCE_DIR}/codegen/src/*.hpp
${GEODE_BINDINGS_REPO_PATH}/bindings/*.bro
${GEODE_BINDINGS_REPO_PATH}/codegen/src/*.cpp
${GEODE_BINDINGS_REPO_PATH}/codegen/src/*.hpp
)

if (NOT GEODE_BINDINGS_PATH)
set(GEODE_BINDINGS_PATH ${CMAKE_CURRENT_SOURCE_DIR}/bindings)
set(GEODE_BINDINGS_PATH ${GEODE_BINDINGS_REPO_PATH}/bindings)
endif()

file(GLOB CODEGEN_OUTPUTS CONFIGURE_DEPENDS
Expand Down Expand Up @@ -191,6 +205,9 @@ target_compile_features(GeodeCodegenSources PUBLIC cxx_std_20)
if (APPLE)
target_compile_options(GeodeCodegenSources PUBLIC -ffunction-sections -fdata-sections)
target_link_options(GeodeCodegenSources PUBLIC -dead_strip)
elseif(ANDROID)
target_compile_options(GeodeCodegenSources PUBLIC -ffunction-sections -fdata-sections)
target_link_options(GeodeCodegenSources PUBLIC -Wl,--gc-sections)
endif()

if (NOT GEODE_DISABLE_PRECOMPILED_HEADERS)
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.3.10
2.0.0
Loading

0 comments on commit 44d773a

Please sign in to comment.