From 0b8b772b05226c895ca03160feeeda7ab440b71f Mon Sep 17 00:00:00 2001 From: Scott Duensing Date: Tue, 27 Sep 2022 19:57:07 -0500 Subject: [PATCH] Fixed installing wrong ntpconverter. MOD conversion implemented for IIgs. --- scripts/buildVm.sh | 36 ++++++++++++++++++++++++++++-------- 1 file changed, 28 insertions(+), 8 deletions(-) diff --git a/scripts/buildVm.sh b/scripts/buildVm.sh index c0abd40..ff56acf 100755 --- a/scripts/buildVm.sh +++ b/scripts/buildVm.sh @@ -181,10 +181,10 @@ function buildIIgsSDK() { fi if [[ ! -e "${IIGS}/ntpconverter/ntpconverter.php" ]]; then - download http://www.ninjaforce.com/downloads/ntconverter.zip - unzip ntconverter.zip + download http://ninjaforce.com/downloads/ntpsources.zip + unzip ntpsources.zip ntpconverter* mkdir -p "${IIGS}/ntpconverter" - cp -f ntconverter.php "${IIGS}/ntpconverter/ntpconverter.php" + mv -f ntpconverter*.php "${IIGS}/ntpconverter/." fi if [[ ! -e "${IIGS}/Tool222#ba0000" ]]; then @@ -219,9 +219,15 @@ function buildJoeyLib() { rm -rf ${OUT} || true mkdir -p ${OUT}/out/joey pushd ${SRC} + # Add BUILD_SERVER flag. + cp joey.h joey.h.original + sed -i "1i #define BUILD_SERVER" joey.h iix assemble jIIgs.asm keep=31:/out/joey/jIIgsasm iix compile jIIgs.c keep=31:/out/joey/jIIgsc iix compile joey.c keep=31:/out/joey/joey + # Remove BUILD_SERVER. + rm joey.h + mv joey.h.original joey.h popd cp -f "${OUT}/jIIgsc.root" "jIIgsc.root#b10000" cp -f "${OUT}/jIIgsc.a" "jIIgsc.a#b10000" @@ -454,7 +460,8 @@ function doBuild() { case ${BACKEND} in orca) - #***TODO*** Somehow pass in -DBUILD_SERVER + # Pass in -DBUILD_SERVER + sed -i "1i #define BUILD_SERVER" "${SOURCE}/joey.h" # Compile C files and generate object list. OFILES="" for FILE in "${CFILES[@]}"; do @@ -487,10 +494,23 @@ function doBuild() { # Copy game data. for FILE in "${DATA[@]}"; do #***TODO*** Data conversion here! - O=`basename ${FILE}`#060000 - cp -f ${FILE} ${O} - ${CADIUS} addfile ${DISK} ${BUILD_PROJECT}/data ${O} - rm ${O} + EXTENSION="${FILE##*.}" + case ${EXTENSION,,} in + mod) + php "${IIGS}/ntpconverter/ntpconverter.php" "${FILE}" + O=`basename -s .mod ${FILE}`.ntp#060000 + mv -f ${FILE} ${O} + ${CADIUS} addfile ${DISK} ${BUILD_PROJECT}/data ${O} + rm ${O} + ;; + + *) + O=`basename ${FILE}`#060000 + cp -f ${FILE} ${O} + ${CADIUS} addfile ${DISK} ${BUILD_PROJECT}/data ${O} + rm ${O} + ;; + esac done ;;