Update mkxp-z submodule #358
This file contains hidden or 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
| name: Automatic Build | |
| on: | |
| push: | |
| branches-ignore: | |
| - dependabot/** | |
| pull_request: | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| jobs: | |
| check-nostalgist: | |
| name: Check Nostalgist.js | |
| runs-on: ubuntu-slim | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v5 | |
| - name: Check | |
| run: | | |
| cd nostalgist | |
| npm install | |
| npm run build | |
| download-rpg-maker-xp-rtp: | |
| name: Download RPG Maker XP run time package | |
| runs-on: ubuntu-slim | |
| steps: | |
| - name: Install dependencies | |
| run: | | |
| sudo apt update | |
| sudo apt install -y curl python3-pip innoextract | |
| pip3 install rpzip | |
| - name: Restore run time package from cache | |
| id: cache-rtp | |
| uses: actions/cache@v5 | |
| with: | |
| key: xp_rtp104e.exe | |
| path: xp_rtp104e.exe | |
| - name: Download run time package if not cached | |
| if: steps.cache-rtp.outputs.cache-hit != 'true' | |
| run: | | |
| curl -Lko xp_rtp104e.exe https://dl.komodo.jp/rpgmakerweb/run-time-packages/xp_rtp104e.exe | |
| [ "$(sha256sum xp_rtp104e.exe | cut -d ' ' -f 1)" = 'b3bd20ad7f413b40ac233aafd2e061de1dc429c2eadb59d0b3157ba3c47f16b2' ] | |
| - name: Pack run time package files | |
| run: | | |
| innoextract xp_rtp104e.exe | |
| cd app | |
| rpzip -r ../Standard.mkxpz * | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: Standard.mkxpz | |
| path: Standard.mkxpz | |
| download-rpg-maker-vx-rtp: | |
| name: Download RPG Maker VX run time package | |
| runs-on: ubuntu-slim | |
| steps: | |
| - name: Install dependencies | |
| run: | | |
| sudo apt update | |
| sudo apt install -y curl python3-pip innoextract | |
| pip3 install rpzip | |
| - name: Restore run time package from cache | |
| id: cache-rtp | |
| uses: actions/cache@v5 | |
| with: | |
| key: vx_rtp102e.zip | |
| path: vx_rtp102e.zip | |
| - name: Download run time package if not cached | |
| if: steps.cache-rtp.outputs.cache-hit != 'true' | |
| run: | | |
| curl -Lko vx_rtp102e.zip https://dl.komodo.jp/rpgmakerweb/run-time-packages/vx_rtp102e.zip | |
| [ "$(sha256sum vx_rtp102e.zip | cut -d ' ' -f 1)" = '8c82c02c876391d9585934454a629748d71b421c4957ada1dff8dc4b013ce403' ] | |
| - name: Pack run time package files | |
| run: | | |
| unzip vx_rtp102e.zip | |
| innoextract RPGVX_RTP/Setup.exe | |
| cd app | |
| rpzip -r ../RPGVX.mkxpz * | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: RPGVX.mkxpz | |
| path: RPGVX.mkxpz | |
| download-rpg-maker-vx-ace-rtp: | |
| name: Download RPG Maker VX Ace run time package | |
| runs-on: ubuntu-slim | |
| steps: | |
| - name: Install dependencies | |
| run: | | |
| sudo apt update | |
| sudo apt install -y curl python3-pip innoextract | |
| pip3 install rpzip | |
| - name: Restore run time package from cache | |
| id: cache-rtp | |
| uses: actions/cache@v5 | |
| with: | |
| key: RPGVXAce_RTP.zip | |
| path: RPGVXAce_RTP.zip | |
| - name: Download run time package if not cached | |
| if: steps.cache-rtp.outputs.cache-hit != 'true' | |
| run: | | |
| curl -Lko RPGVXAce_RTP.zip https://dl.komodo.jp/rpgmakerweb/run-time-packages/RPGVXAce_RTP.zip | |
| [ "$(sha256sum RPGVXAce_RTP.zip | cut -d ' ' -f 1)" = '7e93d0ead93a686218b7c671bf099ef42f09f536083bd0b2f0fa6423a39fc19b' ] | |
| - name: Pack run time package files | |
| run: | | |
| unzip RPGVXAce_RTP.zip | |
| innoextract RTP100/Setup.exe | |
| cd app | |
| rpzip -r ../RPGVXAce.mkxpz * | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: RPGVXAce.mkxpz | |
| path: RPGVXAce.mkxpz | |
| download-aetherion: | |
| name: Download Aetherion | |
| runs-on: ubuntu-slim | |
| steps: | |
| - name: Install dependencies | |
| run: | | |
| sudo apt update | |
| sudo apt install -y curl python3-pip 7zip | |
| pip3 install rpzip | |
| - name: Restore game from cache | |
| id: cache-game | |
| uses: actions/cache@v5 | |
| with: | |
| key: aetherion.zip | |
| path: aetherion.zip | |
| - name: Download game if not cached | |
| if: steps.cache-game.outputs.cache-hit != 'true' | |
| run: | | |
| curl -Lko aetherion.zip https://dl.komodo.jp/rpgmakerweb/free-game-bundle/aetherion.zip | |
| [ "$(sha256sum aetherion.zip | cut -d ' ' -f 1)" = 'eeb75a6c99b58634e9dba5b344850bc5880e762b5b89ae45dab15b50cd00c37c' ] | |
| - name: Pack game files | |
| run: | | |
| unzip aetherion.zip | |
| 7z x -oaetherion Aetherion.exe | |
| cd aetherion | |
| rpzip -r ../aetherion.mkxpz * | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: aetherion.mkxpz | |
| path: aetherion.mkxpz | |
| download-crysalis: | |
| name: Download Crysalis | |
| runs-on: ubuntu-slim | |
| steps: | |
| - name: Install dependencies | |
| run: | | |
| sudo apt update | |
| sudo apt install -y curl python3-pip 7zip | |
| pip3 install rpzip | |
| - name: Restore game from cache | |
| id: cache-game | |
| uses: actions/cache@v5 | |
| with: | |
| key: crysalis.zip | |
| path: crysalis.zip | |
| - name: Download game if not cached | |
| if: steps.cache-game.outputs.cache-hit != 'true' | |
| run: | | |
| curl -Lko crysalis.zip https://dl.komodo.jp/rpgmakerweb/sample-games/crysalis.zip | |
| [ "$(sha256sum crysalis.zip | cut -d ' ' -f 1)" = '8388d84097e8427abf22fcd110abd98d5892991987259d5bfc0b75eabea74763' ] | |
| - name: Pack game files | |
| run: | | |
| unzip crysalis.zip | |
| 7z x -ocrysalis Crysalis.exe | |
| cd crysalis | |
| rpzip -r ../crysalis.mkxpz * | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: crysalis.mkxpz | |
| path: crysalis.mkxpz | |
| download-knight-blade-howling-of-kerberos: | |
| name: 'Download KNight-Blade: Howling of Kerberos' | |
| runs-on: ubuntu-slim | |
| steps: | |
| - name: Install dependencies | |
| run: | | |
| sudo apt update | |
| sudo apt install -y curl python3-pip | |
| pip3 install rpzip | |
| - name: Restore game from cache | |
| id: cache-game | |
| uses: actions/cache@v5 | |
| with: | |
| key: knight-blade-howling-of-kerberos.zip | |
| path: knight-blade-howling-of-kerberos.zip | |
| - name: Download game if not cached | |
| if: steps.cache-game.outputs.cache-hit != 'true' | |
| run: | | |
| curl -Lko knight-blade-howling-of-kerberos.zip https://dl.komodo.jp/rpgmakerweb/sample-games/knight-blade-howling-of-kerberos.zip | |
| [ "$(sha256sum knight-blade-howling-of-kerberos.zip | cut -d ' ' -f 1)" = 'a47c9cf1eaa466fc0fcd5e4fff0143881d318a71424fe1fab823aa95acaac58c' ] | |
| - name: Pack game files | |
| run: | | |
| unzip knight-blade-howling-of-kerberos.zip | |
| cd KN_E | |
| rpzip -r ../knight-blade-howling-of-kerberos.mkxpz * | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: knight-blade-howling-of-kerberos.mkxpz | |
| path: knight-blade-howling-of-kerberos.mkxpz | |
| download-star-stealing-prince: | |
| name: Download Star Stealing Prince | |
| runs-on: ubuntu-slim | |
| steps: | |
| - name: Install dependencies | |
| run: | | |
| sudo apt update | |
| sudo apt install -y curl python3-pip | |
| pip3 install rpzip | |
| - name: Restore game from cache | |
| id: cache-game | |
| uses: actions/cache@v5 | |
| with: | |
| key: star-stealing-prince.zip | |
| path: star-stealing-prince.zip | |
| - name: Download game if not cached | |
| if: steps.cache-game.outputs.cache-hit != 'true' | |
| run: | | |
| curl -Lko star-stealing-prince.zip https://dl.komodo.jp/rpgmakerweb/free-game-bundle/star-stealing-prince.zip | |
| [ "$(sha256sum star-stealing-prince.zip | cut -d ' ' -f 1)" = '453e9863d4b88d8b99d78695663849e0e07b8be7a55a2deb40d2b12e3a37c4bc' ] | |
| - name: Pack game files | |
| run: | | |
| unzip star-stealing-prince.zip | |
| cd StarStealingPrinceFullV.3.2wRTP | |
| rpzip -r ../star-stealing-prince.mkxpz * | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: star-stealing-prince.mkxpz | |
| path: star-stealing-prince.mkxpz | |
| build-stage1: | |
| name: Build stage 1 | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Install dependencies | |
| run: | | |
| sudo apt update | |
| sudo apt install -y curl build-essential automake libtool zip universal-ctags ruby | |
| - name: Set up WASI SDK | |
| run: | | |
| curl -Lo ${{ runner.temp }}/wasi-sdk.tar.gz https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-30/wasi-sdk-30.0-x86_64-linux.tar.gz | |
| mkdir ${{ runner.temp }}/wasi-sdk | |
| tar -xzf ${{ runner.temp }}/wasi-sdk.tar.gz -C ${{ runner.temp }}/wasi-sdk --strip-components=1 | |
| rm ${{ runner.temp }}/wasi-sdk.tar.gz | |
| - name: Set up Binaryen | |
| run: | | |
| curl -Lo ${{ runner.temp }}/binaryen.tar.gz https://github.com/WebAssembly/binaryen/releases/download/version_126/binaryen-version_126-x86_64-linux.tar.gz | |
| mkdir ${{ runner.temp }}/binaryen | |
| tar -xzf ${{ runner.temp }}/binaryen.tar.gz -C ${{ runner.temp }}/binaryen --strip-components=1 | |
| rm ${{ runner.temp }}/binaryen.tar.gz | |
| - name: Checkout | |
| uses: actions/checkout@v5 | |
| with: | |
| submodules: recursive | |
| - name: Build stage 1 | |
| run: | | |
| cd mkxp-z/libretro | |
| CLICOLOR_FORCE=1 make -j $(nproc) WASI_SDK=${{ runner.temp }}/wasi-sdk WASM_OPT=${{ runner.temp }}/binaryen/bin/wasm-opt | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v5 | |
| with: | |
| name: stage1 | |
| path: mkxp-z/libretro/build/libretro-stage1 | |
| build-core: | |
| needs: build-stage1 | |
| name: Build core | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Install dependencies | |
| run: | | |
| sudo apt update | |
| sudo apt install -y meson cmake | |
| - name: Set up Emscripten SDK | |
| uses: mymindstorm/setup-emsdk@v14 | |
| with: | |
| version: 4.0.8 | |
| - name: Checkout | |
| uses: actions/checkout@v5 | |
| with: | |
| submodules: recursive | |
| - name: Download stage 1 | |
| uses: actions/download-artifact@v5 | |
| with: | |
| name: stage1 | |
| path: mkxp-z/libretro/build/libretro-stage1 | |
| - name: Configure core | |
| run: | | |
| echo "[binaries]" | tee -a ${{ runner.temp }}/cross.ini | |
| echo "c = 'emcc'" | tee -a ${{ runner.temp }}/cross.ini | |
| echo "cpp = 'em++'" | tee -a ${{ runner.temp }}/cross.ini | |
| echo "ar = 'emar'" | tee -a ${{ runner.temp }}/cross.ini | |
| echo "cmake = 'cmake'" | tee -a ${{ runner.temp }}/cross.ini | |
| echo "[host_machine]" | tee -a ${{ runner.temp }}/cross.ini | |
| echo "system = 'emscripten'" | tee -a ${{ runner.temp }}/cross.ini | |
| echo "cpu_family = 'wasm32'" | tee -a ${{ runner.temp }}/cross.ini | |
| echo "cpu = 'wasm32'" | tee -a ${{ runner.temp }}/cross.ini | |
| echo "endian = 'little'" | tee -a ${{ runner.temp }}/cross.ini | |
| echo "[properties]" | tee -a ${{ runner.temp }}/cross.ini | |
| echo "cmake_toolchain_file = '$(em-config EMSCRIPTEN_ROOT)/cmake/Modules/Platform/Emscripten.cmake'" | tee -a ${{ runner.temp }}/cross.ini | |
| echo '--------------------------------------------------------------------------------' | |
| cd mkxp-z | |
| CLICOLOR_FORCE=1 meson setup build --cross-file ${{ runner.temp }}/cross.ini --buildtype release -Db_lto=true -Dlibretro=true -Dlibretro_save_states=true -Demscripten_threaded=true | |
| - name: Build core | |
| run: | | |
| cd mkxp-z/build | |
| CLICOLOR_FORCE=1 ninja -v | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v5 | |
| with: | |
| name: mkxp-z_libretro.a | |
| path: mkxp-z/build/mkxp-z_libretro.a | |
| build-frontend: | |
| needs: build-core | |
| name: Build frontend | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Set up Emscripten SDK | |
| uses: mymindstorm/setup-emsdk@v14 | |
| with: | |
| version: 4.0.8 | |
| - name: Checkout | |
| uses: actions/checkout@v5 | |
| with: | |
| submodules: recursive | |
| - name: Download core | |
| uses: actions/download-artifact@v5 | |
| with: | |
| name: mkxp-z_libretro.a | |
| path: mkxp-z/build | |
| - name: Build frontend | |
| run: | | |
| mv mkxp-z/build/mkxp-z_libretro.a retroarch/libretro_emscripten.a | |
| cd retroarch | |
| CLICOLOR_FORCE=1 emmake make -f Makefile.emscripten LIBRETRO=mkxp-z HAVE_THREADS=1 PROXY_TO_PTHREAD=1 HAVE_AUDIOWORKLET=1 HAVE_RWEBAUDIO=0 HAVE_AL=0 HAVE_WASMFS=1 HAVE_EXTRA_WASMFS=1 | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v5 | |
| with: | |
| name: mkxp-z_libretro.wasm | |
| path: | | |
| retroarch/mkxp-z_libretro.js | |
| retroarch/mkxp-z_libretro.wasm | |
| build-retroarch-web-player: | |
| needs: build-frontend | |
| name: Build RetroArch web player | |
| runs-on: ubuntu-slim | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v5 | |
| with: | |
| submodules: recursive | |
| - name: Download core + frontend | |
| uses: actions/download-artifact@v5 | |
| with: | |
| name: mkxp-z_libretro.wasm | |
| path: retroarch | |
| - name: Build RetroArch web player | |
| run: | | |
| mv retroarch/mkxp-z_libretro.js retroarch/pkg/emscripten/libretro-thread/ | |
| mv retroarch/mkxp-z_libretro.wasm retroarch/pkg/emscripten/libretro-thread/ | |
| mkdir bundle | |
| mkdir bundle/assets | |
| mkdir bundle/assets/xmb | |
| mv libretro-super/dist/info bundle | |
| mv retroarch-assets/COPYING bundle/assets | |
| mv retroarch-assets/ozone bundle/assets | |
| mv retroarch-assets/pkg bundle/assets | |
| mv retroarch-assets/sounds bundle/assets | |
| mv retroarch-assets/xmb/monochrome bundle/assets/xmb | |
| zip -r9 bundle-minimal.zip bundle | |
| mkdir retroarch/pkg/emscripten/libretro-thread/assets | |
| mkdir retroarch/pkg/emscripten/libretro-thread/assets/frontend | |
| mv bundle-minimal.zip retroarch/pkg/emscripten/libretro-thread/assets/frontend | |
| mv retroarch/media retroarch/pkg/emscripten/libretro-thread | |
| mv coi-serviceworker/coi-serviceworker.js retroarch/pkg/emscripten/libretro-thread | |
| cd retroarch | |
| git apply ../retroarch.patch | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v5 | |
| with: | |
| name: mkxp-z_libretro_retroarch_web_player | |
| path: retroarch/pkg/emscripten/libretro-thread | |
| build-nostalgist: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - name: Aetherion | |
| id: aetherion | |
| rtp: None | |
| xp: false | |
| - name: Crysalis | |
| id: crysalis | |
| rtp: RPGVXAce | |
| xp: false | |
| - name: 'KNight-Blade: Howling of Kerberos' | |
| id: knight-blade-howling-of-kerberos | |
| rtp: Standard | |
| xp: true | |
| - name: Star Stealing Prince | |
| id: star-stealing-prince | |
| rtp: None | |
| xp: false | |
| needs: | |
| - check-nostalgist | |
| - build-frontend | |
| - download-rpg-maker-xp-rtp | |
| - download-rpg-maker-vx-rtp | |
| - download-rpg-maker-vx-ace-rtp | |
| - download-aetherion | |
| - download-crysalis | |
| - download-knight-blade-howling-of-kerberos | |
| - download-star-stealing-prince | |
| name: Build Nostalgist.js with ${{ matrix.name }} | |
| runs-on: ubuntu-slim | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v5 | |
| with: | |
| submodules: recursive | |
| - name: Download core + frontend | |
| uses: actions/download-artifact@v5 | |
| with: | |
| name: mkxp-z_libretro.wasm | |
| path: retroarch | |
| - name: Download game | |
| uses: actions/download-artifact@v5 | |
| with: | |
| name: ${{ matrix.id }}.mkxpz | |
| - name: Download run time package | |
| if: matrix.rtp != 'None' | |
| uses: actions/download-artifact@v5 | |
| with: | |
| name: ${{ matrix.rtp }}.mkxpz | |
| - name: Build Nostalgist.js | |
| run: | | |
| mv retroarch/mkxp-z_libretro.js nostalgist/public/ | |
| mv retroarch/mkxp-z_libretro.wasm nostalgist/public/ | |
| mv ${{ matrix.id }}.mkxpz nostalgist/public/ | |
| if [ '${{ matrix.rtp }}' != 'None' ] | |
| then | |
| mv ${{ matrix.rtp }}.mkxpz nostalgist/public/ | |
| fi | |
| echo "VITE_CORE_JS_PATH=./mkxp-z_libretro.js" >> nostalgist/.env | |
| echo "VITE_CORE_WASM_PATH=./mkxp-z_libretro.wasm" >> nostalgist/.env | |
| echo "VITE_GAME_NAME=${{ matrix.name }}" >> nostalgist/.env | |
| echo 'VITE_GAME_PATH=./${{ matrix.id }}.mkxpz' >> nostalgist/.env | |
| if [ '${{ matrix.rtp }}' != 'None' ] | |
| then | |
| echo 'VITE_RTP_PATH=./${{ matrix.rtp }}.mkxpz' >> nostalgist/.env | |
| fi | |
| echo 'VITE_XP_CONTROLS=${{ matrix.xp }}' >> nostalgist/.env | |
| cd nostalgist | |
| npm install | |
| npm run build | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v5 | |
| with: | |
| name: mkxp-z_libretro_nostalgist_${{ matrix.id }} | |
| path: nostalgist/dist | |
| build-website: | |
| needs: | |
| - build-retroarch-web-player | |
| - build-nostalgist | |
| name: Build website | |
| runs-on: ubuntu-slim | |
| steps: | |
| - name: Install dependencies | |
| run: | | |
| sudo apt update | |
| sudo apt install -y pandoc | |
| - name: Checkout | |
| uses: actions/checkout@v5 | |
| - name: Generate index.html | |
| run: | | |
| mkdir dist | |
| echo '<!doctype html><html><head><meta charset="UTF-8" /></head><body>' > dist/index.html | |
| pandoc -f markdown -t html README.md >> dist/index.html | |
| echo '</body></html>' >> dist/index.html | |
| - name: Download RetroArch web player | |
| uses: actions/download-artifact@v5 | |
| with: | |
| name: mkxp-z_libretro_retroarch_web_player | |
| path: dist/retroarch-web-player | |
| - name: Download Nostalgist.js with Aetherion | |
| uses: actions/download-artifact@v5 | |
| with: | |
| name: mkxp-z_libretro_nostalgist_aetherion | |
| path: dist/nostalgist-aetherion | |
| - name: Download Nostalgist.js with Crysalis | |
| uses: actions/download-artifact@v5 | |
| with: | |
| name: mkxp-z_libretro_nostalgist_crysalis | |
| path: dist/nostalgist-crysalis | |
| - name: 'Download Nostalgist.js with KNight-Blade: Howling of Kerberos' | |
| uses: actions/download-artifact@v5 | |
| with: | |
| name: mkxp-z_libretro_nostalgist_knight-blade-howling-of-kerberos | |
| path: dist/nostalgist-knight-blade-howling-of-kerberos | |
| - name: Download Nostalgist.js with Star Stealing Prince | |
| uses: actions/download-artifact@v5 | |
| with: | |
| name: mkxp-z_libretro_nostalgist_star-stealing-prince | |
| path: dist/nostalgist-star-stealing-prince | |
| - name: Upload artifact | |
| uses: actions/upload-pages-artifact@v4 | |
| with: | |
| path: dist | |
| retention-days: 90 | |
| deploy-website: | |
| needs: build-website | |
| name: Deploy to GitHub Pages | |
| if: (github.event_name == 'push' || github.event_name == 'workflow_dispatch') && github.ref == 'refs/heads/main' | |
| concurrency: | |
| group: pages | |
| cancel-in-progress: false | |
| runs-on: ubuntu-slim | |
| steps: | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v4 |