From dee614fa3d4046f88ceaa0da036f26013571e4f8 Mon Sep 17 00:00:00 2001 From: Soapyman Date: Mon, 10 May 2021 22:32:29 +0600 Subject: [PATCH] - added bash version of game install scripts --- data/_convert_cd_fmv_xa.bat | 4 ++-- data/_convert_cd_fmv_xa.sh | 23 +++++++++++++++++++++++ data/install/conv.sh | 13 +++++++++++++ data/install/jpsxdec.jar | Bin 4 files changed, 38 insertions(+), 2 deletions(-) create mode 100755 data/_convert_cd_fmv_xa.sh create mode 100755 data/install/conv.sh mode change 100644 => 100755 data/install/jpsxdec.jar diff --git a/data/_convert_cd_fmv_xa.bat b/data/_convert_cd_fmv_xa.bat index 732e5354..47803176 100644 --- a/data/_convert_cd_fmv_xa.bat +++ b/data/_convert_cd_fmv_xa.bat @@ -3,7 +3,7 @@ set CD1_PATH=install/Driver2CD1.bin set CD2_PATH=install/Driver2CD2.bin -set JPSXDEC_PATH=install/jpsxdec +set JPSXDEC_PATH=install rem -- Check if Java is installed -- java -version 1>nul 2>nul || ( @@ -24,4 +24,4 @@ rem del Driver2temp.idx echo DONE -pause \ No newline at end of file +pause diff --git a/data/_convert_cd_fmv_xa.sh b/data/_convert_cd_fmv_xa.sh new file mode 100755 index 00000000..928a7882 --- /dev/null +++ b/data/_convert_cd_fmv_xa.sh @@ -0,0 +1,23 @@ +#!/bin/sh + +export CD1_PATH="./install/Driver2CD1.bin" +export CD2_PATH="./install/Driver2CD2.bin" +export JPSXDEC_PATH="./install" + +# -- Check if Java is installed -- +if !(java -version 2>&1 >/dev/null | grep "java version\|openjdk version"); then + echo "Java NOT installed!" + exit +fi + +# -- Extract CD movies and audios -- + +echo "Processing CD1..." +./install/conv.sh ${CD1_PATH} Driver2temp.idx + +echo "Processing CD2..." +./install/conv.sh ${CD2_PATH} Driver2temp.idx + +rm Driver2temp.idx + +echo "DONE" diff --git a/data/install/conv.sh b/data/install/conv.sh new file mode 100755 index 00000000..15f069ac --- /dev/null +++ b/data/install/conv.sh @@ -0,0 +1,13 @@ +#!/bin/sh + +echo ${JPSXDEC_PATH} + +echo "BUILDING INDEXES" +java -jar ${JPSXDEC_PATH}/jpsxdec.jar -f $1 -x $2 + +echo "---- CONVERTING VIDEO ----" +java -jar ${JPSXDEC_PATH}/jpsxdec.jar -x $2 -a video -quality psx -vf avi:mjpg -up Lanczos3 + +echo "---- CONVERTING AUDIO ----" +java -jar ${JPSXDEC_PATH}/jpsxdec.jar -x $2 -a audio -quality psx -af wav + diff --git a/data/install/jpsxdec.jar b/data/install/jpsxdec.jar old mode 100644 new mode 100755