From d370a8e2a2d58d20da284683bd9262e6ca696746 Mon Sep 17 00:00:00 2001 From: Nick Daly Date: Thu, 2 Jul 2009 16:28:11 -0500 Subject: recommendcfg works even when starting on a disc other than 1. --- includes/autoinstall-includes.sh | 14 ++++++++++---- includes/cd-list.sh | 8 +++++--- 2 files changed, 15 insertions(+), 7 deletions(-) (limited to 'includes') diff --git a/includes/autoinstall-includes.sh b/includes/autoinstall-includes.sh index 1e9c95d..0cd3754 100644 --- a/includes/autoinstall-includes.sh +++ b/includes/autoinstall-includes.sh @@ -40,7 +40,7 @@ function query function recommendcfg { - # usage: recommendcfg [numofcds] + # usage: recommendcfg [numofcds] [startCd] if [ "$1" ]; then NUMOFCDS="$1" @@ -48,23 +48,29 @@ function recommendcfg NUMOFCDS=1 fi + if [ "$2" ]; then + STARTCD="$2" + else + STARTCD=1 + fi + echo echo "To play the game with GemRB, you will need to add the following" echo "lines to your GemRB.cfg file:" echo LINE="GamePath=$TARGETDIR"; echo $LINE if [ $FULLINSTALL -eq 1 ]; then - for CDNUMBER in $(seq $NUMOFCDS); do + for CDNUMBER in $(seq $startCd $(($NUMOFCDS+$startCd-1))); do if [ -d "${TARGETDIR}/cd${CDNUMBER}" ]; then LINE="CD${CDNUMBER}=${TARGETDIR}/cd${CDNUMBER}" else - LINE="CD$CDNUMBER=$TARGETDIR" + LINE="CD${CDNUMBER}=${TARGETDIR}" fi echo $LINE done echo "GameOnCD=0" else - for CDNUMBER in $(seq $NUMOFCDS); do + for CDNUMBER in $(seq $startCd $(($NUMOFCDS+$startCd-1))); do LINE="CD$CDNUMBER=$CDMOUNT/cd$CDNUMBER" echo $LINE done diff --git a/includes/cd-list.sh b/includes/cd-list.sh index 96d0007..bcdf5c4 100644 --- a/includes/cd-list.sh +++ b/includes/cd-list.sh @@ -52,11 +52,11 @@ function get_game MINSCRIPT="bg2/install-soa-4cd-us-minimal.sh" EXTRASCRIPT="bg2/install-soa-4cd-us-extra.sh" EXPANSIONSCRIPT="bg2/install-soa-4cd-us-tobMinimal.sh" - EXPANSIONNAME="Throne of Bhaal" + EXPANSIONNAME="Throne of Bhaal" PATCHES="" # TODO: fill in patches # bg2/install-patch-soa-us.sh bg2/install-patch-baldurdash-fix.sh bg2/install-patch-soa-baldurdash-text.sh" WINDOWSFILES="bgdxtest.exe bggltest.exe glsetup.exe bgconfig.exe bgmain.exe charview.exe" - CDNO=4 + CDNO=4 ;; $BG2_TOB_1CD_US_MD5 ) FULLGAMENAME="Baldurs Gate 2 - Throne of Bhaal: 1CD US version" @@ -65,6 +65,8 @@ function get_game PATCHES="" # TODO: fill in patches # bg2/install-patch-totsc-uk.sh bg1/install-patch-baldurdash-fix.sh bg1/install-patch-totsc-baldurdash-text.sh" WINDOWSFILES="autorun.ini bgconfig.exe bgdxtest.exe bggltest.exe bgmain.exe charview.exe glsetup.exe update.url earthlink gamespy" + CDNO=1 + CDSTART=5 ;; $PST_2CD_MD5 ) FULLGAMENAME="Planescape Torment: 2CD version" @@ -108,7 +110,7 @@ function get_game esac done - export FULLGAMENAME SHORTGAMENAME MINSCRIPT EXTRASCRIPT EXPANSIONSCRIPT EXPANSIONNAME PATCHES WINDOWSFILES CDNO + export FULLGAMENAME SHORTGAMENAME MINSCRIPT EXTRASCRIPT EXPANSIONSCRIPT EXPANSIONNAME PATCHES WINDOWSFILES CDNO CDSTART } function choosegame -- cgit v1.2.3