From 39a955578dec2729b4c2b2c75755193d62e3fe2a Mon Sep 17 00:00:00 2001 From: SuperDude88 <82904174+SuperDude88@users.noreply.github.com> Date: Sun, 22 Mar 2026 19:55:37 -0400 Subject: [PATCH 1/5] Checkout Version Test --- .github/workflows/build_windows.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_windows.yml b/.github/workflows/build_windows.yml index fa1e005f..ed5e0ca8 100644 --- a/.github/workflows/build_windows.yml +++ b/.github/workflows/build_windows.yml @@ -45,7 +45,7 @@ jobs: disk-root: "C:" - name: Checkout Repository - uses: actions/checkout@v6 + uses: actions/checkout@v6.0.2 with: submodules: recursive fetch-tags: true From d47167bee379ef16759d9ed8403c974ad43a948b Mon Sep 17 00:00:00 2001 From: SuperDude88 <82904174+SuperDude88@users.noreply.github.com> Date: Sun, 22 Mar 2026 20:15:33 -0400 Subject: [PATCH 2/5] Try Something Different I'm sure there's a drawback to fetch-depth: 0 that this will stumble into at some point --- .github/workflows/build_mac.yml | 1 + .github/workflows/build_wiiu.yml | 1 + .github/workflows/build_windows.yml | 3 ++- 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build_mac.yml b/.github/workflows/build_mac.yml index 2d2adadc..1b955f6b 100644 --- a/.github/workflows/build_mac.yml +++ b/.github/workflows/build_mac.yml @@ -39,6 +39,7 @@ jobs: uses: actions/checkout@v6 with: submodules: recursive + fetch-depth: 0 fetch-tags: true - name: Install Qt diff --git a/.github/workflows/build_wiiu.yml b/.github/workflows/build_wiiu.yml index ce1d00d8..116557c7 100644 --- a/.github/workflows/build_wiiu.yml +++ b/.github/workflows/build_wiiu.yml @@ -38,6 +38,7 @@ jobs: uses: actions/checkout@v6 with: submodules: recursive + fetch-depth: 0 fetch-tags: true - name: Set Debug Flags diff --git a/.github/workflows/build_windows.yml b/.github/workflows/build_windows.yml index ed5e0ca8..c72bc2cc 100644 --- a/.github/workflows/build_windows.yml +++ b/.github/workflows/build_windows.yml @@ -45,9 +45,10 @@ jobs: disk-root: "C:" - name: Checkout Repository - uses: actions/checkout@v6.0.2 + uses: actions/checkout@v6 with: submodules: recursive + fetch-depth: 0 fetch-tags: true - name: Install Qt From 47033e5e6cf52f79173103c1cf2433b18c12be73 Mon Sep 17 00:00:00 2001 From: SuperDude88 <82904174+SuperDude88@users.noreply.github.com> Date: Sun, 22 Mar 2026 21:18:26 -0400 Subject: [PATCH 3/5] Mac Bundle Improvements - Try to parse version from git tag and put it into CMake's project version - Tidy up some other bundle properties --- CMakeLists.txt | 48 +++++++++++++++++++++++--------------- gui/desktop/CMakeLists.txt | 6 +++-- 2 files changed, 33 insertions(+), 21 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index b8e6c2c2..03a55229 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -4,7 +4,35 @@ set(CMAKE_CXX_STANDARD 20) set(CMAKE_CXX_STANDARD_REQUIRED ON) set(CMAKE_EXPORT_COMPILE_COMMANDS ON) -project(wwhd_rando VERSION 0.1 LANGUAGES C CXX) # not sure how to handle this version variable, putting it here for the mac bundle +# Versioning +if(DEFINED RELEASE_TAG) + # Use the new tag we're creating for this release (passed in workflow) + set(GIT_TAG "${RELEASE_TAG}") + + # Also use the seed key to change item placement when a spoiler log isn't generated + set(SEED_KEY "$ENV{SEED_KEY}") +else() + # Get previous tag and commit hash + find_package(Git REQUIRED) + execute_process(COMMAND "${GIT_EXECUTABLE}" describe --tags --always --dirty --broken + WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}" + OUTPUT_VARIABLE GIT_TAG + ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE + ) +endif() +string(REGEX MATCH "^([0-9]+)\\.([0-9]+)\\.([0-9]+)(-([0-9]+))?(-g([0-9a-f]+))?(-([a-z]+))?" VERSION_MATCH "${GIT_TAG}") +if(VERSION_MATCH) + set(PROJECT_VERSION "${CMAKE_MATCH_1}.${CMAKE_MATCH_2}.${CMAKE_MATCH_3}") + if(${CMAKE_MATCH_5}) + string(APPEND PROJECT_VERSION ".${CMAKE_MATCH_5}") + endif() +else() + set(PROJECT_VERSION "0.0.0.0") +endif() +configure_file(version.hpp.in version.hpp @ONLY) +configure_file(keys/keys.hpp.in keys/keys.hpp @ONLY) + +project(wwhd_rando VERSION ${PROJECT_VERSION} LANGUAGES C CXX) add_compile_options("$<$:/utf-8>") if(DEFINED DEVKITPRO) @@ -45,24 +73,6 @@ if(LOGIC_TESTS) endif() endif() -# Versioning -if(DEFINED RELEASE_TAG) - # Use the new tag we're creating for this release (passed in workflow) - set(GIT_TAG "${RELEASE_TAG}") - - # Also use the seed key to change item placement when a spoiler log isn't generated - set(SEED_KEY "$ENV{SEED_KEY}") -else() - # Get previous tag and commit hash - find_package(Git REQUIRED) - execute_process(COMMAND "${GIT_EXECUTABLE}" describe --tags --always --dirty --broken - WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}" - OUTPUT_VARIABLE GIT_TAG - ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE - ) -endif() -configure_file(version.hpp.in version.hpp @ONLY) -configure_file(keys/keys.hpp.in keys/keys.hpp @ONLY) # Path strings for logging string(LENGTH "${CMAKE_SOURCE_DIR}/" SOURCE_PATH_SIZE) diff --git a/gui/desktop/CMakeLists.txt b/gui/desktop/CMakeLists.txt index 456f9d3c..71f94101 100644 --- a/gui/desktop/CMakeLists.txt +++ b/gui/desktop/CMakeLists.txt @@ -40,9 +40,11 @@ target_sources(wwhd_rando PRIVATE mainwindow.cpp mainwindow.ui player_customizat target_link_libraries(wwhd_rando PRIVATE Qt${QT_VERSION_MAJOR}::Widgets) set_target_properties(wwhd_rando PROPERTIES - MACOSX_BUNDLE_wwhd_rando_IDENTIFIER my.example.com + MACOSX_BUNDLE_BUNDLE_NAME "WWHD Randomizer" # 15 character limit + MACOSX_BUNDLE_GUI_IDENTIFIER "com.github.superdude88.twwhd-randomizer" + MACOSX_BUNDLE_COPYRIGHT "Copyright (c) 2024 TWWHDR Contributors" MACOSX_BUNDLE_BUNDLE_VERSION ${PROJECT_VERSION} - MACOSX_BUNDLE_SHORT_VERSION_STRING ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR} + MACOSX_BUNDLE_SHORT_VERSION_STRING ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH} MACOSX_BUNDLE TRUE WIN32_EXECUTABLE TRUE ) From ea7b51ea97cca09feae628e6a267c5a47ce2b8b9 Mon Sep 17 00:00:00 2001 From: SuperDude88 <82904174+SuperDude88@users.noreply.github.com> Date: Tue, 24 Mar 2026 20:35:22 -0400 Subject: [PATCH 4/5] Remove Experimental Library - Don't think we need this for the current Apple Clang version --- CMakeLists.txt | 2 -- 1 file changed, 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 03a55229..9d7ec57d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -39,8 +39,6 @@ if(DEFINED DEVKITPRO) add_compile_definitions(DEVKITPRO) add_compile_options(-Ofast -mcpu=750 -meabi -mhard-float -ffunction-sections -flto -Wall) add_link_options(-flto -fno-fat-lto-objects) -elseif(APPLE) - add_compile_options(-fexperimental-library) endif() if(ENABLE_DEBUG) From d79dd58714dac0cada81cff4c02de60c0e9d2be9 Mon Sep 17 00:00:00 2001 From: SuperDude88 <82904174+SuperDude88@users.noreply.github.com> Date: Tue, 24 Mar 2026 20:42:54 -0400 Subject: [PATCH 5/5] CMake Threads Change - Always require the threads package on non-Wii U platforms --- CMakeLists.txt | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 9d7ec57d..4fad755b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -107,14 +107,6 @@ else() add_executable(wwhd_rando main.cpp) endif() -if(GET_THREADS) - find_package(Threads REQUIRED) - - if(CMAKE_USE_PTHREADS_INIT) - target_link_libraries(wwhd_rando PRIVATE Threads::Threads) - endif() -endif() - target_sources(wwhd_rando PRIVATE "randomizer.cpp" "options.cpp" "tweaks.cpp" "text_replacements.cpp") add_subdirectory("libs") add_subdirectory("utility") @@ -148,4 +140,7 @@ if(DEFINED DEVKITPRO) #TVSPLASH "${CMAKE_SOURCE_DIR}/platform/Splash.png" #DRCSPLASH "${CMAKE_SOURCE_DIR}/platform/Splash.png" ) +else() + find_package(Threads REQUIRED) + target_link_libraries(wwhd_rando PRIVATE Threads::Threads) endif()