Skip to content

Commit

Permalink
Merge branch 'main' into show-invalid
Browse files Browse the repository at this point in the history
  • Loading branch information
qimiko committed Sep 7, 2024
2 parents f8c7f20 + adfc942 commit 8cc7d29
Show file tree
Hide file tree
Showing 82 changed files with 1,667 additions and 389 deletions.
2 changes: 1 addition & 1 deletion .github/actions/setup-dump-sym/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ inputs:
dump_syms_version:
description: "Revision of mozilla/dump_syms repository to fetch"
required: true
default: "v2.2.2"
default: "v2.3.3"
outputs:
binary-path:
description: "Path of the dump_syms utility, including the executable."
Expand Down
24 changes: 10 additions & 14 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -154,23 +154,20 @@ jobs:
has-sccache: ${{ inputs.use-ccache }}
if: inputs.build-debug-info

- name: Setup caches
uses: ./.github/actions/setup-cache
with:
host: mac
target: mac
use-ccache: ${{ github.event_name != 'workflow_dispatch' || inputs.use-ccache }}
# due to very strange performance issues, sccache is currently disabled for macos. sorry

# - name: Setup caches
# uses: ./.github/actions/setup-cache
# with:
# host: mac
# target: mac
# use-ccache: ${{ github.event_name != 'workflow_dispatch' || inputs.use-ccache }}

- name: Setup Ninja
uses: ./.github/actions/setup-ninja
with:
host: mac

- name: Install LLVM
run: |
brew install llvm
echo "/opt/homebrew/opt/llvm/bin" >> $GITHUB_PATH
- name: Setup CLI
uses: geode-sdk/cli/.github/actions/setup@main

Expand All @@ -180,9 +177,8 @@ jobs:
-DCMAKE_C_COMPILER=clang
-DCMAKE_CXX_COMPILER=clang++
-DCMAKE_OSX_DEPLOYMENT_TARGET=10.15
-DCMAKE_AR='/usr/bin/ar'
-DCMAKE_RANLIB='/usr/bin/ranlib'
-DGEODE_DISABLE_PRECOMPILED_HEADERS=Off
-DCMAKE_OSX_ARCHITECTURES="arm64;x86_64"
-DGEODE_DISABLE_PRECOMPILED_HEADERS=OFF
${{ steps.build-debug-info.outputs.extra-configure }}
- name: Build
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ bin
# Ignore docs folders
docs/**
docs
docs-dist/

# Ignore codegenned files
loader/src/internal/about.cpp
Expand Down
26 changes: 26 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,31 @@
# Geode Changelog

## v3.4.0
* Add an API for modifying the Geode UI via events; see [the corresponding docs page](https://docs.geode-sdk.org/tutorials/modify-geode) (2a3c35f)
* Add `openInfoPopup` overload that accepts a mod ID and can open both an installed mod page or a server page (028bbf9)
* Add `LoadingSpinner` for creating loading circles easily (5c84012)
* Add `TextInput::focus` and `TextInput::unfocus` (749fdf1)
* MDTextArea changes: hex colors are now formatted as `<c-XXXXXX></c>`; added support for `<cc>`, `<cd>`, `<cf>`, and `<cs>`; fixed `mod:` links (028bbf9)
* Deprecate `cc3x` (6080fdb)
* Don't cancel subtasks on `Task` destructor (4b4bc0e)

## v3.3.1
* Move ObjectDecoder and its delegate to Cocos headers (95f9eeb, dceb91e)
* Fix weird behavior with textures, objects and more by changing en-US.utf8 locale to C (2cd1a9e)
* Change all C number parsing to use `numFromString` to further remove the risk of this happening again (006ede8)

## v3.3.0
* Update network libraries, fixing problems with old Wine versions (e26fe95)
* Fix scale on mod logos for low quality (ba7b0fa)
* Fix platform-specific dependencies by using CLI 3.2.0 (98f82ff)
* Add `GEODE_DONT_USE_CCACHE` CMake option (2edfb71)
* Remove now useless `std::hash` impl for `std::filesystem::path` on android (2b35e0e)
* Implement custom window for showing crashlog on windows (4f32197)
* Update docs version to show v3.0.0 (f86d4db)
* Check hash for downloaded mods (61e000d)
* Update chinese installer translation (#995, #997)
* Update polish installer translation (#998)

## v3.2.0
* Fix auto-updater on MacOS (d752bc2)
* Use tasks for `FileSettingNode` (f94e95e)
Expand Down
91 changes: 53 additions & 38 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -88,59 +88,74 @@ endif()

project(geode-sdk VERSION ${GEODE_VERSION} LANGUAGES CXX C)

message(STATUS "Looking for ccache/sccache")
if (DEFINED CMAKE_C_COMPILER_LAUNCHER OR DEFINED CMAKE_CXX_COMPILER_LAUNCHER)
message(STATUS "Looking for ccache/sccache - detecting variant")
if (DEFINED CMAKE_C_COMPILER_LAUNCHER AND DEFINED CMAKE_CXX_COMPILER_LAUNCHER AND
CMAKE_C_COMPILER_LAUNCHER STREQUAL CMAKE_CXX_COMPILER_LAUNCHER)
if (CMAKE_CXX_COMPILER_LAUNCHER MATCHES "sccache(|.exe)$")
message(STATUS "Looking for ccache/sccache - detected sccache")
set(GEODE_CCACHE_VARIANT "sccache")
elseif(CMAKE_CXX_COMPILER_LAUNCHER MATCHES "ccache(|.exe)$")
message(STATUS "Looking for ccache/sccache - detected ccache")
set(GEODE_CCACHE_VARIANT "ccache")
if (NOT GEODE_DONT_USE_CCACHE)
message(STATUS "Looking for ccache/sccache")
if (DEFINED CMAKE_C_COMPILER_LAUNCHER OR DEFINED CMAKE_CXX_COMPILER_LAUNCHER)
message(STATUS "Looking for ccache/sccache - detecting variant")
if (DEFINED CMAKE_C_COMPILER_LAUNCHER AND DEFINED CMAKE_CXX_COMPILER_LAUNCHER AND
CMAKE_C_COMPILER_LAUNCHER STREQUAL CMAKE_CXX_COMPILER_LAUNCHER)
if (CMAKE_CXX_COMPILER_LAUNCHER MATCHES "sccache(|.exe)$")
message(STATUS "Looking for ccache/sccache - detected sccache")
set(GEODE_CCACHE_VARIANT "sccache")
elseif(CMAKE_CXX_COMPILER_LAUNCHER MATCHES "ccache(|.exe)$")
message(STATUS "Looking for ccache/sccache - detected ccache")
set(GEODE_CCACHE_VARIANT "ccache")
else()
message(STATUS "Looking for ccache/sccache - none (custom compiler launcher: {CMAKE_C_COMPILER_LAUNCHER}, {CMAKE_CXX_COMPILER_LAUNCHER})")
endif()
else()
message(STATUS "Looking for ccache/sccache - none (custom compiler launcher: {CMAKE_C_COMPILER_LAUNCHER}, {CMAKE_CXX_COMPILER_LAUNCHER})")
message(STATUS "Looking for ccache/sccache - skipped (custom compiler launcher: {CMAKE_C_COMPILER_LAUNCHER}, {CMAKE_CXX_COMPILER_LAUNCHER})")
endif()
elseif (CMAKE_GENERATOR MATCHES "Visual Studio")
message(STATUS "Looking for ccache/sccache - skipped (Visual Studio generator)")
else()
message(STATUS "Looking for ccache/sccache - skipped (custom compiler launcher: {CMAKE_C_COMPILER_LAUNCHER}, {CMAKE_CXX_COMPILER_LAUNCHER})")
endif()
elseif (CMAKE_GENERATOR MATCHES "Visual Studio")
message(STATUS "Looking for ccache/sccache - skipped (Visual Studio generator)")
else()
find_program(GEODE_CCACHE NAMES sccache ccache)
if (GEODE_CCACHE)
if (${GEODE_CCACHE} MATCHES "sccache(|.exe)$")
set(GEODE_CCACHE_VARIANT "sccache")
find_program(GEODE_CCACHE NAMES sccache ccache)
if (GEODE_CCACHE)
if (${GEODE_CCACHE} MATCHES "sccache(|.exe)$")
set(GEODE_CCACHE_VARIANT "sccache")
else()
set(GEODE_CCACHE_VARIANT "ccache")
endif()
message(STATUS "Looking for ccache/sccache - found ${GEODE_CCACHE_VARIANT}")
message(NOTICE "Compiler launcher not set but ccache/sccache was found. "
"Setting compiler launcher to that")
set(CMAKE_C_COMPILER_LAUNCHER ${GEODE_CCACHE})
set(CMAKE_CXX_COMPILER_LAUNCHER ${GEODE_CCACHE})
else()
set(GEODE_CCACHE_VARIANT "ccache")
message(STATUS "Looking for ccache/sccache - not found")
endif()
message(STATUS "Looking for ccache/sccache - found ${GEODE_CCACHE_VARIANT}")
message(NOTICE "Compiler launcher not set but ccache/sccache was found. "
"Setting compiler launcher to that")
set(CMAKE_C_COMPILER_LAUNCHER ${GEODE_CCACHE})
set(CMAKE_CXX_COMPILER_LAUNCHER ${GEODE_CCACHE})
else()
message(STATUS "Looking for ccache/sccache - not found")
unset(GEODE_CCACHE)
endif()
unset(GEODE_CCACHE)
else()
message(STATUS "Not looking for ccache because GEODE_DONT_USE_CCACHE was ON")
endif()

if (DEFINED GEODE_CCACHE_VARIANT)
if (NOT DEFINED GEODE_DISABLE_PRECOMPILED_HEADERS)
if (${GEODE_CCACHE_VARIANT} STREQUAL "sccache" AND CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
message(NOTICE "Using ${GEODE_CCACHE_VARIANT} with ${CMAKE_CXX_COMPILER_ID}, PCH will be enabled.")
set(GEODE_DISABLE_PRECOMPILED_HEADERS OFF)
if (DEFINED CMAKE_OSX_ARCHITECTURES AND (CMAKE_OSX_ARCHITECTURES STREQUAL "arm64;x86_64" OR CMAKE_OSX_ARCHITECTURES STREQUAL "x86_64;arm64"))
message(NOTICE "Using ${GEODE_CCACHE_VARIANT} with ${CMAKE_CXX_COMPILER_ID} while building multiple architectures, PCH will be disabled due to issues with sccache.")
set(GEODE_DISABLE_PRECOMPILED_HEADERS ON)
else()
message(NOTICE "Using ${GEODE_CCACHE_VARIANT} with ${CMAKE_CXX_COMPILER_ID}, PCH will be enabled.")
set(GEODE_DISABLE_PRECOMPILED_HEADERS OFF)
endif()
else()
message(NOTICE "Using ${GEODE_CCACHE_VARIANT} with ${CMAKE_CXX_COMPILER_ID}, PCH will be disabled.")
set(GEODE_DISABLE_PRECOMPILED_HEADERS ON)
endif()
endif()
else()
message(NOTICE "Not using a caching compiler (ccache/sccache). "
"It is recommended to install one to improve build times.")
message(NOTICE "We recommend sccache, check its README for installation instructions, "
"normally you can just use your usual package manager (e.g. 'scoop install sccache').")
if (${CMAKE_SYSTEM_NAME} STREQUAL "Darwin")
# when building for multiple architectures, a caching compiler is not recommended
message(NOTICE "Not using a caching compiler (ccache/sccache).")
else()
message(NOTICE "Not using a caching compiler (ccache/sccache). "
"It is recommended to install one to improve build times.")
message(NOTICE "We recommend sccache, check its README for installation instructions, "
"normally you can just use your usual package manager (e.g. 'scoop install sccache').")
endif()

if (NOT DEFINED GEODE_DISABLE_PRECOMPILED_HEADERS)
message(NOTICE "Because of this, PCH will be enabled.")
set(GEODE_DISABLE_PRECOMPILED_HEADERS OFF)
Expand Down Expand Up @@ -209,7 +224,7 @@ if (ANDROID)
endif()

set(MAT_JSON_AS_INTERFACE ON)
CPMAddPackage("gh:geode-sdk/json#3a79c51")
CPMAddPackage("gh:geode-sdk/json#cda9807")
CPMAddPackage("gh:fmtlib/fmt#10.2.1")

target_compile_definitions(${PROJECT_NAME} INTERFACE MAT_JSON_DYNAMIC=1)
Expand Down Expand Up @@ -239,7 +254,7 @@ if (DEFINED GEODE_TULIPHOOK_REPO_PATH)
message(STATUS "Using ${GEODE_TULIPHOOK_REPO_PATH} for TulipHook")
add_subdirectory(${GEODE_TULIPHOOK_REPO_PATH} ${GEODE_TULIPHOOK_REPO_PATH}/build)
else()
CPMAddPackage("gh:geode-sdk/TulipHook#fbf79b4")
CPMAddPackage("gh:geode-sdk/TulipHook#c8a445c")
endif()
set(CMAKE_WARN_DEPRECATED ON CACHE BOOL "" FORCE)

Expand Down
94 changes: 94 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@

# Code of Conduct

## Notes

As an open source project, our policies are based on a Code of Conduct. Please
make sure you read it before using our services. We expect everyone to follow
the guidelines presented in this document.

## Our Pledge

We as members, contributors, and leaders pledge to make participation in our
community a harassment-free experience for everyone, regardless of age, body
size, visible or invisible disability, ethnicity, sex characteristics, gender
identity and expression, level of experience, education, socio-economic status,
nationality, personal appearance, race, caste, color, religion, or sexual
identity and orientation.

We pledge to act and interact in ways that contribute to an open, welcoming,
diverse, inclusive, and healthy community.

## Our Standards

Examples of behavior that contributes to a positive environment for our
community include:

* Demonstrating empathy and kindness toward other people
* Being respectful of differing opinions, viewpoints, and experiences
* Giving and gracefully accepting constructive feedback
* Accepting responsibility and apologizing to those affected by our mistakes,
and learning from the experience
* Focusing on what is best not just for us as individuals, but for the overall
community

Examples of unacceptable behavior include:

* The use of sexualized language or imagery, and sexual attention or advances of
any kind
* Trolling (antagonistic, inflammatory, insincere behaviour), insulting or
derogatory comments, and personal or political attacks
* Threats of violence or violent acts towards others
* Public or private harassment
* Intentionally dead-naming or misgendering others
* Publishing others' private information, such as a physical or email address,
without their explicit permission
* Gatekeeping others' access to mental health or accessibility tools
* Other conduct which could reasonably be considered inappropriate in a
professional setting

## Enforcement Responsibilities

Community leaders are responsible for clarifying and enforcing our standards of
acceptable behavior and will take appropriate and fair corrective action in
response to any behavior that they deem inappropriate, threatening, offensive,
or harmful. Actions may range from a warning to permanent removal from the
community.

Community leaders have the right and responsibility to remove, edit, or reject
comments, commits, code, wiki edits, issues, and other contributions that are
not aligned to this Code of Conduct, and will communicate reasons for moderation
decisions when appropriate.

## Scope

This Code of Conduct applies within all community spaces, and also applies when
an individual is officially representing the community in public spaces.
Examples of representing our community include using an official email address,
posting via an official social media account, or acting as an appointed
representative at an online or offline event.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported to the community leaders directly on Discord, or via a private message
to the official Geode X account ([@GeodeSDK](https://x.com/GeodeSDK)). If your report concerns a specific
community team member or group of community team members, please send your
report to a team member that is not part of the report, or a member of the
administrative board.

All complaints will be reviewed and investigated promptly and fairly. All
community leaders are obligated to respect the privacy and security of the
reporter of any incident.

## Changes & Feedback

Since the world is a dynamic place, this Code of Conduct may need changes. We
reserve the right to update this Code of Conduct at any time.

We welcome feedback and suggestions. Feel free to open an issue on our
[GitHub](https://github.com/geode-sdk/geode).

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant version 2.1](https://www.contributor-covenant.org/version/2/1/code_of_conduct.html), with inspirations taken from [Prism Launcher Code of Conduct](https://prismlauncher.org/wiki/overview/code-of-conduct/) and [QuiltMC Code of Conduct](https://quiltmc.org/en/community/code-of-conduct/).
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.2.0
3.4.0
11 changes: 10 additions & 1 deletion cmake/GeodeFile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,16 @@ function(setup_geode_mod proname)
endif()

# Check dependencies using CLI
if (${GEODE_CLI_VERSION} VERSION_GREATER_EQUAL "2.0.0")
if (${GEODE_CLI_VERSION} VERSION_GREATER_EQUAL "3.2.0")
execute_process(
COMMAND ${GEODE_CLI} project check ${CMAKE_CURRENT_BINARY_DIR}
--externals ${GEODE_MODS_BEING_BUILT} ${DONT_UPDATE_INDEX_ARG}
--platform ${GEODE_TARGET_PLATFORM_SHORT}
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
COMMAND_ERROR_IS_FATAL ANY
)
elseif (${GEODE_CLI_VERSION} VERSION_GREATER_EQUAL "2.0.0")
message(WARNING "If you use platform-specific dependencies, upgrade Geode CLI to version 3.2.0 or greater!")
execute_process(
COMMAND ${GEODE_CLI} project check ${CMAKE_CURRENT_BINARY_DIR}
--externals ${GEODE_MODS_BEING_BUILT} ${DONT_UPDATE_INDEX_ARG}
Expand Down
Loading

0 comments on commit 8cc7d29

Please sign in to comment.