Fixed installing wrong ntpconverter. MOD conversion implemented for IIgs.

This commit is contained in:
Scott Duensing 2022-09-27 19:57:07 -05:00
parent 46a1d5f1c6
commit 0b8b772b05

View file

@ -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
;;