diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index fea34b4..c22641d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -285,10 +285,23 @@ jobs: shell: bash run: | set -euo pipefail - OUT="${GITHUB_WORKSPACE}/.cache/sdl3-src" + # Use repo-relative paths for tar: Windows GITHUB_WORKSPACE is D:\… + # and GNU tar treats drive-letter abs paths as remote hosts + # ("Cannot connect to D"). Prefer prefetch_sdl3.sh when present. + OUT=".cache/sdl3-src" + sdl3_env() { + local abs="${OUT}" + if command -v cygpath >/dev/null 2>&1; then + abs="$(cygpath -m "${OUT}")" + elif [[ -d "${OUT}" ]]; then + abs="$(cd "${OUT}" && pwd)" + fi + echo "PSX_SDL3_SOURCE_DIR=${abs}" >>"$GITHUB_ENV" + echo "SDL3 source ready: ${abs}" + } if [[ -f "${OUT}/CMakeLists.txt" ]]; then - echo "PSX_SDL3_SOURCE_DIR=${OUT}" >>"$GITHUB_ENV" - echo "SDL3 source cache hit: ${OUT}" + sdl3_env + echo "SDL3 source cache hit" exit 0 fi if [[ -f psxrecomp/tools/ci/prefetch_sdl3.sh ]]; then @@ -298,22 +311,26 @@ jobs: fi # Submodule may predate the helper — inline HTTP/1.1 prefetch. echo "prefetch_sdl3.sh missing; using inline curl --http1.1" - mkdir -p "${GITHUB_WORKSPACE}/.cache" + mkdir -p .cache VER=3.4.10 SHA=12b34280415ec8418c864408b93d008a20a6530687ee613d60bfbd20411f2785 URL="https://github.com/libsdl-org/SDL/releases/download/release-${VER}/SDL3-${VER}.tar.gz" - TAR="${GITHUB_WORKSPACE}/.cache/SDL3-${VER}.tar.gz" + TAR=".cache/SDL3-${VER}.tar.gz" curl -fsSL --http1.1 --retry 5 --retry-all-errors --retry-delay 2 -o "${TAR}" "${URL}" echo "${SHA} ${TAR}" | sha256sum -c - rm -rf "${OUT}.extracting" mkdir -p "${OUT}.extracting" - tar -xzf "${TAR}" -C "${OUT}.extracting" + # --force-local: belt-and-suspenders if a path ever gains a colon. + if tar --help 2>&1 | grep -q -- '--force-local'; then + tar --force-local -xzf "${TAR}" -C "${OUT}.extracting" + else + tar -xzf "${TAR}" -C "${OUT}.extracting" + fi INNER="$(find "${OUT}.extracting" -mindepth 1 -maxdepth 1 -type d | head -n1)" rm -rf "${OUT}" mv "${INNER}" "${OUT}" rm -rf "${OUT}.extracting" - echo "PSX_SDL3_SOURCE_DIR=${OUT}" >>"$GITHUB_ENV" - echo "SDL3 source ready: ${OUT}" + sdl3_env # Windows: build emitters with llvm-mingw from cmake-clang-v1 (static CLI). # Zip still omits toolchain/ — fetch is for the build machine only. @@ -487,6 +504,30 @@ jobs: exit 1 fi cmake --build build-ci --target psx-runtime -j"${JOBS}" + # Lobby list pin must match RELEASE_VERSION (package_setup_host enforces). + STAMP="" + for cand in \ + build-ci/psx_game_version.txt \ + build-ci/Release/psx_game_version.txt \ + build-ci/*/psx_game_version.txt + do + if [[ -f "${cand}" ]]; then STAMP="${cand}"; break; fi + done + if [[ -z "${STAMP}" ]]; then + # Fallback: stamp next to the host exe + STAMP="$(find build-ci -name psx_game_version.txt -type f 2>/dev/null | head -n1 || true)" + fi + if [[ -z "${STAMP}" || ! -f "${STAMP}" ]]; then + echo "::error::missing psx_game_version.txt after build (update psxrecomp submodule)" + exit 1 + fi + BUILT="$(tr -d '[:space:]' <"${STAMP}")" + BUILT="${BUILT#v}" + if [[ "${BUILT}" != "${RELEASE_VERSION}" ]]; then + echo "::error::lobby pin stamp ${BUILT} != RELEASE_VERSION ${RELEASE_VERSION} (${STAMP})" + exit 1 + fi + echo "lobby pin ok: ${BUILT} (${STAMP})" - name: Package setup zip run: | diff --git a/.gitmodules b/.gitmodules index fc0eb43..c6e6ad9 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,7 +1,7 @@ [submodule "psxrecomp"] path = psxrecomp url = https://github.com/mstan/psxrecomp.git - branch = master + branch = feat/rbengine-bak [submodule "recomp-ui"] path = recomp-ui diff --git a/CMakeLists.migrate_extras.txt b/CMakeLists.migrate_extras.txt index c59e124..ba71904 100644 --- a/CMakeLists.migrate_extras.txt +++ b/CMakeLists.migrate_extras.txt @@ -1,6 +1,5 @@ Preserved notes after setup-host CMake rewrite: -- Old CMakeLists used EXTRAS_SOURCES — re-attach mod/plugin sources. - Old CMakeLists copied mods/preloaded POST_BUILD — re-add if needed. Full previous file: CMakeLists.txt.pre_migrate.bak diff --git a/CMakeLists.txt b/CMakeLists.txt index 4a11c39..a91bfb8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -17,9 +17,6 @@ set(PSX_SETUP_WIZARD ON CACHE BOOL "Advertise first-run setup wizard + Generate & rebuild in recomp-ui" FORCE) include("${PSXRECOMP_ROOT}/runtime/runtime.cmake") -file(GLOB TOMBA_MOD_PLUGIN_SOURCES CONFIGURE_DEPENDS - "${CMAKE_CURRENT_SOURCE_DIR}/src/mods/*.c") - psxrecomp_add_game_runtime(psx-runtime # ENABLE_NETPLAY_IF_PRESENT # NETPLAY_LOBBY_URL "ws://netplay.retcomm.net:8765" @@ -28,32 +25,22 @@ psxrecomp_add_game_runtime(psx-runtime DEFAULT_GAME_CONFIG_PATH "game.toml" MAX_PLAYERS 1 LAUNCHER_BOXART "${CMAKE_CURRENT_SOURCE_DIR}/launcher_assets/img/boxart.tga" + APP_ICON "${CMAKE_CURRENT_SOURCE_DIR}/assets/psxrecomp.ico" GEN_MARKER "generated/SCUS_942.36_dispatch.c" GEN_FULL_GLOB "generated/SCUS_942.36_full_*.c" CODEGEN_SETUP_SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/codegen_setup.c" ) -target_sources(psx-runtime PRIVATE ${TOMBA_MOD_PLUGIN_SOURCES}) - -# Stage configs beside the binary for direct launches. Gate on EXISTS so a -# setup-host zip that forgot an optional file still links successfully. -foreach(TOMBA_RUNTIME_CONFIG game.toml game_options.toml) - if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/${TOMBA_RUNTIME_CONFIG}") +# Stage runtime configs next to the exe for direct build/ launches. Only copy +# files that exist — never fail POST_BUILD when game_options.toml is absent. +foreach(_PSX_RUNTIME_CONFIG game.toml game_options.toml) + if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/${_PSX_RUNTIME_CONFIG}") add_custom_command(TARGET psx-runtime POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy_if_different - "${CMAKE_CURRENT_SOURCE_DIR}/${TOMBA_RUNTIME_CONFIG}" - "$/${TOMBA_RUNTIME_CONFIG}" - COMMENT "Staging ${TOMBA_RUNTIME_CONFIG} for direct Tomba launches" + "${CMAKE_CURRENT_SOURCE_DIR}/${_PSX_RUNTIME_CONFIG}" + "$/${_PSX_RUNTIME_CONFIG}" + COMMENT "Staging ${_PSX_RUNTIME_CONFIG}" VERBATIM) endif() endforeach() -set(TOMBA_PRELOADED_MODS "${CMAKE_CURRENT_SOURCE_DIR}/mods/preloaded") -if(EXISTS "${TOMBA_PRELOADED_MODS}/packages") - add_custom_command(TARGET psx-runtime POST_BUILD - COMMAND ${CMAKE_COMMAND} -E copy_directory - "${TOMBA_PRELOADED_MODS}" - "$/mods" - COMMENT "Preloading the Tomba mod catalog" - VERBATIM) -endif() diff --git a/README.md b/README.md index 26d493c..77c809b 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,16 @@ # TombaRecomp + +[![GitHub downloads (all assets, all releases)](https://img.shields.io/github/downloads/TechnicallyComputers/TombaRecomp/total)](https://github.com/TechnicallyComputers/TombaRecomp/releases) +[![GitHub downloads (latest release)](https://img.shields.io/github/downloads/TechnicallyComputers/TombaRecomp/latest/total)](https://github.com/TechnicallyComputers/TombaRecomp/releases/latest) +[![GitHub release](https://img.shields.io/github/v/release/TechnicallyComputers/TombaRecomp)](https://github.com/TechnicallyComputers/TombaRecomp/releases/latest) + +[![Linux](https://img.shields.io/github/downloads/TechnicallyComputers/TombaRecomp/latest/tomba-%2A-linux-x64.zip)](https://github.com/TechnicallyComputers/TombaRecomp/releases/latest) +[![Windows](https://img.shields.io/github/downloads/TechnicallyComputers/TombaRecomp/latest/tomba-%2A-windows-x64.zip)](https://github.com/TechnicallyComputers/TombaRecomp/releases/latest) +[![macOS arm64](https://img.shields.io/github/downloads/TechnicallyComputers/TombaRecomp/latest/tomba-%2A-macos-arm64.zip)](https://github.com/TechnicallyComputers/TombaRecomp/releases/latest) +[![macOS x64](https://img.shields.io/github/downloads/TechnicallyComputers/TombaRecomp/latest/tomba-%2A-macos-x64.zip)](https://github.com/TechnicallyComputers/TombaRecomp/releases/latest) + + > _This recompilation is a **byproduct of developing > [psxrecomp](https://github.com/mstan/psxrecomp)** — the games are the proving ground, the framework is the goal. > **These are in-development previews, not finished ports — expect rough @@ -14,6 +25,31 @@ Tomba! (USA, SCUS-94236) statically recompiled to a native PC executable with [![PSXRecomp demo](https://img.youtube.com/vi/CID9oVhgCyY/maxresdefault.jpg)](https://www.youtube.com/watch?v=CID9oVhgCyY) + +## RetComM Launcher + +You can run this title **standalone** (release zip + the built-in recomp-ui +Generate & Build flow), or manage installs, updates, ROM/BIOS wiring, and queued +builds more intuitively with +**[RetComM Launcher](https://github.com/TechnicallyComputers/RetComM-Launcher)** — +the Retro Compilation Manager hub for self-compiling recomps. + +[Downloads](https://github.com/TechnicallyComputers/RetComM-Launcher/releases) · +[Full README & features](https://github.com/TechnicallyComputers/RetComM-Launcher#readme) + +

+ RetComM hub with a background build, next to a title’s recomp-ui launcher +

+ +

+ Background cmake build with titles queued +

+ +RetComM checks for updates, rebuilds with existing build data when possible, +shares the portable toolchain used by per-title launchers, and automates +BIOS/ROM/save plumbing so you are not stuck repeating each game’s wizard by hand. + + ## What This Is This repository contains the game-specific configuration, seeds, tools, and diff --git a/assets/psxrecomp.ico b/assets/psxrecomp.ico new file mode 100644 index 0000000..9d4739e Binary files /dev/null and b/assets/psxrecomp.ico differ diff --git a/assets/psxrecomp.png b/assets/psxrecomp.png new file mode 100644 index 0000000..dbed8ca Binary files /dev/null and b/assets/psxrecomp.png differ diff --git a/assets/psxrecomp.svg b/assets/psxrecomp.svg new file mode 100644 index 0000000..ce04553 --- /dev/null +++ b/assets/psxrecomp.svg @@ -0,0 +1,31 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/framework_pins.txt b/framework_pins.txt index 7c17363..e94935f 100644 --- a/framework_pins.txt +++ b/framework_pins.txt @@ -1,4 +1,4 @@ -psxrecomp=13a5662 (13a56626d34cd34aabab56273e823ce7172378a9) +psxrecomp=958e09f (958e09faa3aea4dde6179fec5fd0257fa974b1f2) recomp-ui=ad2f3e2 (ad2f3e293c6641c93ee69963dd669661f3e40290) recomp-net=77a9e26 (77a9e26fa9197694fb8f3424005b3a0fd0a2a810) retcomm-rbengine=8a25408 (8a254082fa77600c0fe482d22f23ddd117f1b774) diff --git a/psxrecomp b/psxrecomp index 13a5662..958e09f 160000 --- a/psxrecomp +++ b/psxrecomp @@ -1 +1 @@ -Subproject commit 13a56626d34cd34aabab56273e823ce7172378a9 +Subproject commit 958e09faa3aea4dde6179fec5fd0257fa974b1f2