From 6e9a376a860085f979a0eb48488e30cb01184221 Mon Sep 17 00:00:00 2001 From: Jaby Date: Fri, 22 Mar 2024 00:50:37 -0500 Subject: [PATCH] Integrate pop-fe better --- bin/run_pop_fe.bat | 11 ----------- bin/run_pop_fe.sh | 6 +++++- examples/PoolBox/Makefile | 7 ++++--- examples/PoolBox/PoolBox.code-workspace | 15 +-------------- mkfile/ISOMakefile.mk | 14 +++++++++++--- readme.md | 1 + .../#{ProjectName}.code-workspace | 15 +-------------- template/JabyEngine-PSX_Game/Makefile | 8 +++++--- wsl_scripts/install_pop-fe.sh | 2 ++ 9 files changed, 30 insertions(+), 49 deletions(-) delete mode 100644 bin/run_pop_fe.bat diff --git a/bin/run_pop_fe.bat b/bin/run_pop_fe.bat deleted file mode 100644 index 71c9edc4..00000000 --- a/bin/run_pop_fe.bat +++ /dev/null @@ -1,11 +0,0 @@ -rem %1 input cue file -rem %2 Optional picture files -setlocal ENABLEDELAYEDEXPANSION - -echo %PATH% -if [%2] == [] ( - set img_input= -) else ( - set img_input=--cover %2/cover.png --pic0 %2/pic0.png --pic1 %2/pic1.png -) -pop-fe.exe --ps1-newemu --ps3-pkg=%~dpn1.pkg %img_input% %1 \ No newline at end of file diff --git a/bin/run_pop_fe.sh b/bin/run_pop_fe.sh index 80f9ce7b..849ca07b 100644 --- a/bin/run_pop_fe.sh +++ b/bin/run_pop_fe.sh @@ -1,5 +1,9 @@ #!/bin/bash +#Made possible by Cody the white tiger + +BASEDIR=$(dirname "$0") +cd $BASEDIR source extern/py3venv/bin/activate cd extern/pop-fe/ -./pop-fe.py --title=MyGame --ps1-newemu --cover=$2/Icon.png --pic0=$2/Pic0.png --pic1=$2/Pic1.png --ps3-pkg="${1%.*}.pkg" $1 \ No newline at end of file +./pop-fe.py --title=$1 --ps1-newemu --cover=$2/Icon.png --pic0=$2/Pic0.png --pic1=$2/Pic1.png --ps3-pkg="${3%.*}.pkg" $3 \ No newline at end of file diff --git a/examples/PoolBox/Makefile b/examples/PoolBox/Makefile index f4225105..a231ab4f 100644 --- a/examples/PoolBox/Makefile +++ b/examples/PoolBox/Makefile @@ -13,17 +13,16 @@ ifeq ($(REGION),SCEE) export PSX_TV_FORMAT=PAL export PSX_LICENSE=LICENSEE export PSX_BOOT_FILE=SLES_AAA.AA - #SLES_000.25 endif ifeq ($(REGION),SCEA) export PSX_TV_FORMAT=NTSC export PSX_LICENSE=LICENSEA - export PSX_BOOT_FILE=SLUS_001.51 + export PSX_BOOT_FILE=SLUS_AAA.AA endif ifeq ($(REGION),SCEI) export PSX_TV_FORMAT=NTSC export PSX_LICENSE=LICENSEJ - export PSX_BOOT_FILE=XXXX_AAA.AA + export PSX_BOOT_FILE=SLJS_AAA.AA endif ifndef PSX_TV_FORMAT @@ -47,5 +46,7 @@ application_%: always $(call make_application,$*) cd_%: always $(call make_cd,$*) +pkg_%: always + $(call make_cd,pkg_$*) always: ; \ No newline at end of file diff --git a/examples/PoolBox/PoolBox.code-workspace b/examples/PoolBox/PoolBox.code-workspace index a4590a87..2939de43 100644 --- a/examples/PoolBox/PoolBox.code-workspace +++ b/examples/PoolBox/PoolBox.code-workspace @@ -27,19 +27,6 @@ } } }, - { - "label": "create pkg (experimental)", - "type": "shell", - "command": "wsl ./run_pop_fe.sh $(wslpath ${workspaceFolder}/iso/${input:region}/PoolBox.cue) $(wslpath ${workspaceFolder}/iso)", - "group": "build", - "options": { - // v otherwise the tool won't start... - "cwd": "${env:JABY_ENGINE_PATH}/bin", - "env": { - "PATH": "${env:JABY_ENGINE_PATH}/bin;${env:PATH}" - } - } - }, { "label": "read memory map", "type": "shell", @@ -63,7 +50,7 @@ { "id": "project", "type": "pickString", - "options": ["all", "assets", "application", "cd"], + "options": ["all", "assets", "application", "cd", "pkg"], "default": "all", "description": "Project to build" }, diff --git a/mkfile/ISOMakefile.mk b/mkfile/ISOMakefile.mk index ba88be7c..491abef3 100644 --- a/mkfile/ISOMakefile.mk +++ b/mkfile/ISOMakefile.mk @@ -1,15 +1,23 @@ -CD_OUTPUT ?= $(REGION)/$(ARTIFACT).bin +CD_OUTPUT ?= $(REGION)/$(ARTIFACT).bin +PKG_OUTPUT ?= $(REGION)/$(ARTIFACT).pkg $(CD_OUTPUT): always @mkdir -p $(REGION) psxcdgen_ex --list $(REGION)/$(ARTIFACT).lba -o $(REGION)/$(ARTIFACT) psx bin-cue Config.xml -all: $(CD_OUTPUT) +$(PKG_OUTPUT): always + @mkdir -p $(REGION) + @echo "!!PKG generation is experimentel!!" + run_pop_fe.sh $(ARTIFACT) $(PWD)/iso $(PWD)/iso/$(REGION)/$(ARTIFACT).cue -clean: +all: $(CD_OUTPUT) +clean: pkg_clean rm -fr $(REGION)/*.bin rm -fr $(REGION)/*.cue rm -fr $(REGION)/*.lba + +pkg_all: $(PKG_OUTPUT) +pkg_clean: rm -fr $(REGION)/*.pkg always: ; \ No newline at end of file diff --git a/readme.md b/readme.md index 13d5144b..e8ce7758 100644 --- a/readme.md +++ b/readme.md @@ -14,5 +14,6 @@ - [ ] Support more GTE - [X] Easy serial code swap - [X] Support .subst files to be substituted with environment variables + - [X] Support pop-fe - [ ] PS3 PKG generation tool? - [ ] PS3 runtime detection? \ No newline at end of file diff --git a/template/JabyEngine-PSX_Game/#{ProjectName}.code-workspace b/template/JabyEngine-PSX_Game/#{ProjectName}.code-workspace index d626a8b8..866a6c77 100644 --- a/template/JabyEngine-PSX_Game/#{ProjectName}.code-workspace +++ b/template/JabyEngine-PSX_Game/#{ProjectName}.code-workspace @@ -27,19 +27,6 @@ } } }, - { - "label": "create pkg (experimental)", - "type": "shell", - "command": "run_pop_fe.bat ${workspaceFolder}/iso/${input:region}/#{ProjectName}.cue", - "group": "build", - "options": { - // v otherwise the tool won't start... - "cwd": "${env:POP_FE_PATH}", - "env": { - "PATH": "${env:JABY_ENGINE_PATH}/bin;${env:PATH}" - } - } - }, { "label": "read memory map", "type": "shell", @@ -63,7 +50,7 @@ { "id": "project", "type": "pickString", - "options": ["all", "assets", "application", "cd"], + "options": ["all", "assets", "application", "cd", "pkg"], "default": "all", "description": "Project to build" }, diff --git a/template/JabyEngine-PSX_Game/Makefile b/template/JabyEngine-PSX_Game/Makefile index fc03908c..e86abecc 100644 --- a/template/JabyEngine-PSX_Game/Makefile +++ b/template/JabyEngine-PSX_Game/Makefile @@ -12,17 +12,17 @@ endif ifeq ($(REGION),SCEE) export PSX_TV_FORMAT=PAL export PSX_LICENSE=LICENSEE - export PSX_BOOT_FILE=XXXX_AAA.AA + export PSX_BOOT_FILE=SLES_AAA.AA endif ifeq ($(REGION),SCEA) export PSX_TV_FORMAT=NTSC export PSX_LICENSE=LICENSEA - export PSX_BOOT_FILE=XXXX_AAA.AA + export PSX_BOOT_FILE=SLUS_AAA.AA endif ifeq ($(REGION),SCEI) export PSX_TV_FORMAT=NTSC export PSX_LICENSE=LICENSEJ - export PSX_BOOT_FILE=XXXX_AAA.AA + export PSX_BOOT_FILE=SLJS_AAA.AA endif ifndef PSX_TV_FORMAT @@ -46,5 +46,7 @@ application_%: always $(call make_application,$*) cd_%: always $(call make_cd,$*) +pkg_%: always + $(call make_cd,pkg_$*) always: ; \ No newline at end of file diff --git a/wsl_scripts/install_pop-fe.sh b/wsl_scripts/install_pop-fe.sh index 34097867..628e3f31 100644 --- a/wsl_scripts/install_pop-fe.sh +++ b/wsl_scripts/install_pop-fe.sh @@ -1,4 +1,6 @@ #!/bin/bash +#Made possible by Cody the white tiger + BASEDIR=$(dirname "$0") mkdir -p $BASEDIR/../bin/extern/ cd $BASEDIR/../bin/extern