From 0d0e25c958d3b1b3a221afaa39b36e0bc72822a3 Mon Sep 17 00:00:00 2001 From: Jaby Date: Sun, 10 Jul 2022 15:11:21 +0200 Subject: [PATCH] Prepare usage of psxcdgen --- JabyEngine.code-workspace | 12 +++++++++--- Tools/Finalize.bat | 18 ++++++++++++++++++ 2 files changed, 27 insertions(+), 3 deletions(-) create mode 100644 Tools/Finalize.bat diff --git a/JabyEngine.code-workspace b/JabyEngine.code-workspace index 73630ba3..614e6a45 100644 --- a/JabyEngine.code-workspace +++ b/JabyEngine.code-workspace @@ -19,10 +19,10 @@ { "label": "finalize", "type": "shell", - "command": "FinalizeCD.bat ${input:finalize} JabyEngine Library\\Code", + "command": "Finalize.bat ${input:finalize_tool} ${input:finalize} JabyEngine Library\\Code", "options": { "env": { - "PATH": "../../Tools/;../../Tools/mkpsxiso;${env:PATH}" + "PATH": "./Tools/;../../Tools/;../../Tools/mkpsxiso;${env:PATH}" } }, "group": { @@ -86,7 +86,13 @@ "options": ["all", "calculate", "skip"], "default": "all" }, - + { + "id": "finalize_tool", + "type": "pickString", + "description": "Tool to use for Finalizing the CD", + "options": ["mkpsxiso.exe"], + "default": "mkpsxiso.exe" + }, { "id": "target", "type": "pickString", diff --git a/Tools/Finalize.bat b/Tools/Finalize.bat new file mode 100644 index 00000000..6c69ef0c --- /dev/null +++ b/Tools/Finalize.bat @@ -0,0 +1,18 @@ +@echo off +if not exist "%4\iso\Info" mkdir %4\iso\Info +if not exist "iso" mkdir iso + +if %2 == skip goto end + +if not exist "%4/bin/GlobalLBATable.bin" echo Planschi > "%4%/bin/GlobalLBATable.bin" + +echo "Calculate LBAs" +%1 -y -lba %4\iso\Info\%3.lba -lbahead %4\iso\Info\%3.h -noisogen %4\iso\%3ISODesc.xml +if exist "%4\iso\%3LBAFile.json" LBAHacker.exe %4\iso\%3LBAFile.json + +if %2 == calculate goto end + +%1 -y %4\iso\%3ISODesc.xml *> nul +echo "Wrote ISO image" + +:end \ No newline at end of file