From c874830339e95d18c2a62c9cca53c78bb0a6df46 Mon Sep 17 00:00:00 2001 From: AKuHAK <621640+AKuHAK@users.noreply.github.com> Date: Sun, 28 Jul 2024 19:56:04 +0300 Subject: [PATCH] Update for modern toolchain --- .github/workflows/compilation.yml | 15 +++++---- Makefile | 56 +++++++++++++++---------------- 2 files changed, 36 insertions(+), 35 deletions(-) diff --git a/.github/workflows/compilation.yml b/.github/workflows/compilation.yml index 8fd1989..b1e6fba 100644 --- a/.github/workflows/compilation.yml +++ b/.github/workflows/compilation.yml @@ -8,14 +8,15 @@ jobs: build: name: MechaPwn compilation runs-on: ubuntu-latest - container: ghcr.io/ps2homebrew/ps2homebrew@sha256:9cf3f8497e5a49e3a08cdf96aa9a5b97f119d554e21e3925b3cc84485846b3ce + container: ghcr.io/ps2homebrew/ps2homebrew:main + # ghcr.io/ps2homebrew/ps2homebrew@sha256:9cf3f8497e5a49e3a08cdf96aa9a5b97f119d554e21e3925b3cc84485846b3ce # instead of "ps2dev/ps2dev:latest" you can use different tags, for example for old projects you can use "ps2dev/ps2dev:v1.0" steps: - name: Install dependencies run: | apk add py3-pillow - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: 0 @@ -30,7 +31,7 @@ jobs: - name: Upload artifacts if: ${{ success() }} - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: MechaPwn-${{ steps.slug.outputs.sha8 }} path: MechaPwn_pck.elf @@ -43,14 +44,14 @@ jobs: runs-on: ubuntu-latest if: startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/master' || github.ref == 'refs/heads/LangPwn' steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Get short SHA id: slug run: echo "sha8=$(echo ${GITHUB_SHA} | cut -c1-8)" >> $GITHUB_OUTPUT - name: Download artifact - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: MechaPwn-${{ steps.slug.outputs.sha8 }} path: MechaPwn @@ -60,7 +61,7 @@ jobs: - name: Create pre-release if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/LangPwn' - uses: marvinpinto/action-automatic-releases@latest + uses: mathieucarbou/marvinpinto-action-automatic-releases@latest with: repo_token: ${{ secrets.GITHUB_TOKEN }} prerelease: true @@ -70,7 +71,7 @@ jobs: - name: Create Tagged Release Draft if: startsWith(github.ref, 'refs/tags/v') - uses: marvinpinto/action-automatic-releases@latest + uses: mathieucarbou/marvinpinto-action-automatic-releases@latest with: repo_token: ${{ secrets.GITHUB_TOKEN }} prerelease: false diff --git a/Makefile b/Makefile index 1fc5c74..86110b6 100644 --- a/Makefile +++ b/Makefile @@ -4,15 +4,15 @@ EE_PACKED_BIN = MechaPwn_pck.elf # C File EE_OBJS = main.o mecha.o exploit.o pad.o ui.o mass.o -EE_OBJS += iomanX.o fileXio.o freesio2.o freepad.o mcman.o mcsrv.o USBD.o USBHDFSD.o IndieFlower.o +EE_OBJS += iomanX_irx.o fileXio_irx.o freesio2_irx.o freepad_irx.o mcman_irx.o mcsrv_irx.o USBD_irx.o USBHDFSD_irx.o IndieFlower_irx.o EE_OBJS += MECHAPROXY_irx.o MASSWATCHER_irx.o pwr50k.o pwr70k.o pwr90k.o pwrpsx1.o pwrpsx2.o pwrtvcombo.o frame_001.o frame_002.o frame_003.o frame_004.o frame_005.o frame_006.o frame_007.o frame_008.o frame_009.o frame_010.o frame_011.o frame_012.o frame_013.o frame_014.o frame_015.o frame_016.o frame_017.o frame_018.o frame_019.o frame_020.o frame_021.o frame_022.o frame_023.o frame_024.o frame_025.o frame_026.o frame_027.o frame_028.o frame_029.o frame_030.o frame_031.o frame_032.o frame_033.o frame_034.o frame_035.o frame_036.o frame_037.o frame_038.o frame_039.o frame_040.o frame_041.o frame_042.o frame_043.o frame_044.o frame_045.o frame_046.o frame_047.o frame_048.o frame_049.o frame_050.o frame_051.o frame_052.o frame_053.o frame_054.o frame_055.o frame_056.o frame_057.o frame_058.o frame_059.o frame_060.o frame_061.o frame_062.o EE_INCS = -I$(PS2SDK)/ports/include -I$(PS2SDK)/sbv/include -I$(PS2SDK)/common/include -I./irx/source/mechaproxy/include/ -I./irx/source/masswatcher/include/ -I$(PS2SDK)/ports/include/freetype2 -I$(GSKIT)/include EE_LDFLAGS = -L$(PS2SDK)/sbv/lib -L$(PS2SDK)/ports/lib -L$(GSKIT)/lib -EE_LIBS = -lpatches -lpadx -lmc -lfreetype -lpng16 -lz -lgskit -lgskit_toolkit -ldmakit -lfileXio +EE_LIBS = -lpatches -lpadx -lmc -lfreetype -lpng -lz -lgskit -lgskit_toolkit -ldmakit -lfileXio EE_CFLAGS = -std=c99 -BIN2S = $(PS2SDK)/bin/bin2s +BIN2C = $(PS2SDK)/bin/bin2c all: $(EE_BIN) ps2-packer $(EE_BIN) $(EE_PACKED_BIN) @@ -20,36 +20,36 @@ all: $(EE_BIN) clean: make clean -C irx/source/mechaproxy make clean -C irx/source/masswatcher - rm -f *.elf *.o *.s resources/*.bin resources/*.pyc *.pyc + rm -f *.elf *.o *_irx.c resources/*.bin resources/*.pyc *.pyc #IRX Modules -iomanX.s: - $(BIN2S) $(PS2SDK)/iop/irx/iomanX.irx iomanX.s iomanX -fileXio.s: - $(BIN2S) $(PS2SDK)/iop/irx/fileXio.irx fileXio.s fileXio -freesio2.s: - $(BIN2S) $(PS2SDK)/iop/irx/freesio2.irx freesio2.s freesio2 -freepad.s: - $(BIN2S) $(PS2SDK)/iop/irx/freepad.irx freepad.s freepad -mcman.s: - $(BIN2S) $(PS2SDK)/iop/irx/mcman.irx mcman.s mcman -mcsrv.s: - $(BIN2S) $(PS2SDK)/iop/irx/mcserv.irx mcsrv.s mcserv -USBD.s: $(PS2SDK)/iop/irx/usbd.irx - $(BIN2S) $(PS2SDK)/iop/irx/usbd.irx USBD.s USBD -USBHDFSD.s: $(PS2SDK)/iop/irx/usbhdfsd.irx - $(BIN2S) $(PS2SDK)/iop/irx/usbhdfsd.irx USBHDFSD.s USBHDFSD -MECHAPROXY_irx.s: +iomanX_irx.c: + $(BIN2C) $(PS2SDK)/iop/irx/iomanX.irx iomanX_irx.c iomanX +fileXio_irx.c: + $(BIN2C) $(PS2SDK)/iop/irx/fileXio.irx fileXio_irx.c fileXio +freesio2_irx.c: + $(BIN2C) $(PS2SDK)/iop/irx/freesio2.irx freesio2_irx.c freesio2 +freepad_irx.c: + $(BIN2C) $(PS2SDK)/iop/irx/freepad.irx freepad_irx.c freepad +mcman_irx.c: + $(BIN2C) $(PS2SDK)/iop/irx/mcman.irx mcman_irx.c mcman +mcsrv_irx.c: + $(BIN2C) $(PS2SDK)/iop/irx/mcserv.irx mcsrv_irx.c mcserv +USBD_irx.c: $(PS2SDK)/iop/irx/usbd.irx + $(BIN2C) $(PS2SDK)/iop/irx/usbd.irx USBD_irx.c USBD +USBHDFSD_irx.c: $(PS2SDK)/iop/irx/usbhdfsd.irx + $(BIN2C) $(PS2SDK)/iop/irx/usbhdfsd.irx USBHDFSD_irx.c USBHDFSD +MECHAPROXY_irx.c: $(MAKE) -C irx/source/mechaproxy - $(BIN2S) irx/source/mechaproxy/irx/mechaproxy.irx MECHAPROXY_irx.s MECHAPROXY_irx -MASSWATCHER_irx.s: + $(BIN2C) irx/source/mechaproxy/irx/mechaproxy.irx MECHAPROXY_irx.c MECHAPROXY_irx +MASSWATCHER_irx.c: $(MAKE) -C irx/source/masswatcher - $(BIN2S) irx/source/masswatcher/irx/masswatcher.irx MASSWATCHER_irx.s MASSWATCHER_irx -IndieFlower.s: resources/IndieFlower-Regular.ttf - $(BIN2S) resources/IndieFlower-Regular.ttf IndieFlower.s IndieFlower + $(BIN2C) irx/source/masswatcher/irx/masswatcher.irx MASSWATCHER_irx.c MASSWATCHER_irx +IndieFlower_irx.c: resources/IndieFlower-Regular.ttf + $(BIN2C) resources/IndieFlower-Regular.ttf IndieFlower_irx.c IndieFlower -%.s: resources/% - $(BIN2S) $^ $@ $(^F) +%.c: resources/% + $(BIN2C) $^ $@ $(^F) resources/%: resources/%.png python3 resources/conv.py $^ $@