summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xauto-installer.sh88
-rwxr-xr-xbg1/install-3cd-extra.sh24
-rwxr-xr-xbg1/install-3cd-minimal.sh40
-rwxr-xr-xbg1/install-5cd-minimal.sh2
-rw-r--r--includes/cd-includes.sh24
-rw-r--r--includes/generic-includes.sh2
-rwxr-xr-xpst/install-2cd-extra.sh6
-rwxr-xr-xpst/install-2cd-minimal.sh2
-rwxr-xr-xpst/install-4cd-extra.sh10
-rwxr-xr-xpst/install-4cd-minimal.sh2
-rwxr-xr-xtotsc/install-1cd-uk.sh2
11 files changed, 148 insertions, 54 deletions
diff --git a/auto-installer.sh b/auto-installer.sh
index a34a5cd..b6d7bd1 100755
--- a/auto-installer.sh
+++ b/auto-installer.sh
@@ -35,55 +35,55 @@ echo "Checking CD version"
CDMD5=$(md5sum $CDMOUNT/data1.cab|awk '{print $1}')
while [ -z "$MINSCRIPT" ]; do
- case "$CDMD5" in
- "138528155dfeb695bd63f90eacee7dc0" )
- FULLGAMENAME="Baldurs Gate 1: 5CD International version"
+ case "$CDMD5" in
+ $BG1_5CD_INTL_MD5 )
+ FULLGAMENAME="Baldurs Gate 1: 5CD International version"
SHORTGAMENAME="baldursgate1"
- MINSCRIPT=bg1/install-5cd-minimal.sh
- EXTRASCRIPT=bg1/install-5cd-extra.sh
- PATCHES="bg1/install-patch-intl.sh bg1/install-patch-baldurdash-fix.sh bg1/install-patch-baldurdash-text.sh"
- WINDOWSFILES="baldur.exe bgmain.exe config.exe keymap.ini luaauto.cfg update.url"
- CDNO=5
- ;;
- "1a6828b97a27967e8c4acc25e1ef48d2" )
- FULLGAMENAME="Baldurs Gate & Tales of the Sword Coast: 3CD US version"
+ MINSCRIPT=bg1/install-5cd-minimal.sh
+ EXTRASCRIPT=bg1/install-5cd-extra.sh
+ PATCHES="bg1/install-patch-intl.sh bg1/install-patch-baldurdash-fix.sh bg1/install-patch-baldurdash-text.sh"
+ WINDOWSFILES="baldur.exe bgmain.exe config.exe keymap.ini luaauto.cfg update.url"
+ CDNO=5
+ ;;
+ $BG1_TOTSC_3CD_US_MD5 )
+ FULLGAMENAME="Baldurs Gate & Tales of the Sword Coast: 3CD US version"
SHORTGAMENAME="baldursgate1totsc"
- MINSCRIPT=totsc/install-3cd-minimal.sh
- EXTRASCRIPT=totsc/install-3cd-extra.sh
- PATCHES="totsc/install-patch-baldurdash-fix.sh totsc/install-patch-baldurdash-text.sh"
- WINDOWSFILES="baldur.exe bgmain.exe config.exe keymap.ini luaauto.cfg update.url"
- CDNO=3
- ;;
- "e27d259ddc0171ff945dbba136e60309" )
- FULLGAMENAME="Baldurs Gate Tales of the Sword Coast: 1CD UK version"
- SHORTGAMENAME="baldursgate1totsc"
- MINSCRIPT=totsc/install-1cd-uk.sh
- PATCHES="totsc/install-patch-uk.sh totsc/install-patch-baldurdash-fix.sh totsc/install-patch-baldurdash-text.sh"
- WINDOWSFILES="bgmain2.exe baldur.exe config.exe mconvert.exe"
- CDNO=6
- ;;
- "640b61443cc86c434f1b6826e63c0e33" )
- FULLGAMENAME="Planescape Torment: 2CD version"
+ MINSCRIPT=bg1/install-3cd-minimal.sh
+ EXTRASCRIPT=bg1/install-3cd-extra.sh
+ PATCHES="bg1/install-patch-baldurdash-fix.sh bg1/install-patch-baldurdash-text.sh"
+ WINDOWSFILES="baldur.exe bgmain.exe config.exe keymap.ini luaauto.cfg update.url"
+ CDNO=3
+ ;;
+ $BG1_TOTSC_1CD_UK_MD5 )
+ FULLGAMENAME="Baldurs Gate Tales of the Sword Coast: 1CD UK version"
+ SHORTGAMENAME="baldursgate1totsc"
+ MINSCRIPT=totsc/install-1cd-uk.sh
+ PATCHES="totsc/install-patch-uk.sh totsc/install-patch-baldurdash-fix.sh totsc/install-patch-baldurdash-text.sh"
+ WINDOWSFILES="bgmain2.exe baldur.exe config.exe mconvert.exe"
+ ;;
+ $PST_2CD_MD5 )
+ FULLGAMENAME="Planescape Torment: 2CD version"
SHORTGAMENAME="planescapetorment"
- MINSCRIPT=pst/install-2cd-minimal.sh
- EXTRASCRIPT=pst/install-2cd-extra.sh
- WINDOWSFILES="torment.exe ereg"
- CDNO=2
- ;;
- "5e8c2075163aca124de4a467fb33063d" )
- FULLGAMENAME="Planescape Torment: 4CD version"
+ MINSCRIPT=pst/install-2cd-minimal.sh
+ EXTRASCRIPT=pst/install-2cd-extra.sh
+ PATCHES="pst/install-patch-fixpack.sh pst/install-patch-ub.sh pst/install-patch-tweaks.sh"
+ WINDOWSFILES="torment.exe ereg"
+ CDNO=2
+ ;;
+ $PST_4CD_MD5 )
+ FULLGAMENAME="Planescape Torment: 4CD version"
SHORTGAMENAME="planescapetorment"
- MINSCRIPT=pst/install-4cd-minimal.sh
- EXTRASCRIPT=pst/install-4cd-extra.sh
- PATCHES="pst/install-patch-official.sh"
- WINDOWSFILES="torment.exe ereg"
- CDNO=4
- ;;
- * )
- echo "Unrecognised CD - please select game from menu"
+ MINSCRIPT=pst/install-4cd-minimal.sh
+ EXTRASCRIPT=pst/install-4cd-extra.sh
+ PATCHES="pst/install-patch-official.sh pst/install-patch-fixpack.sh pst/install-patch-ub.sh pst/install-patch-tweaks.sh"
+ WINDOWSFILES="torment.exe ereg"
+ CDNO=4
+ ;;
+ * )
+ echo "Unrecognised CD - please select game from menu"
choosegame
- ;;
- esac
+ ;;
+ esac
done
[ -z "$TARGETDIR" ] && [ -n "$SHORTGAMENAME" ] && export TARGETDIR="$PWD/$SHORTGAMENAME"
diff --git a/bg1/install-3cd-extra.sh b/bg1/install-3cd-extra.sh
new file mode 100755
index 0000000..95c96a3
--- /dev/null
+++ b/bg1/install-3cd-extra.sh
@@ -0,0 +1,24 @@
+#!/bin/bash
+# Extra Baldur's Gate content (so CDs aren't needed)
+
+scriptdir="$(dirname $0)"/..
+source "$scriptdir/includes/generic-includes.sh"
+source "$scriptdir/includes/cd-includes.sh"
+
+parseargs "$@"
+
+copylower "$CDMOUNT/cd1/" "$TARGETDIR"
+
+CD2_MD5="c04758a6af171bf9a35d8e3d4dcd807c"
+CD3_MD5="ba4224f50f890e10561d22f602d6a991"
+
+getcd 2 $CD2_MD5 CD2/Movies/MovieCD2.bif
+copylower "$CDMOUNT/cd2/" "$TARGETDIR"
+copylower "$CDMOUNT/cd5/" "$TARGETDIR"
+cp $CDMOUNT/Manual/Baldur.pdf "$TARGETDIR"/manual || die
+
+getcd 3 $CD3_MD5 CD3/Movies/MovieCD3.bif
+copylower "$CDMOUNT/cd3/" "$TARGETDIR"
+copylower "$CDMOUNT/cd4/" "$TARGETDIR"
+copylower "$CDMOUNT/cd6/" "$TARGETDIR"
+setperms "$TARGETDIR"
diff --git a/bg1/install-3cd-minimal.sh b/bg1/install-3cd-minimal.sh
new file mode 100755
index 0000000..4169e40
--- /dev/null
+++ b/bg1/install-3cd-minimal.sh
@@ -0,0 +1,40 @@
+#!/bin/sh
+# Baldur's Gate & Tales of the Sword Coast 3CD version minimal
+
+scriptdir="$(dirname $0)"/..
+source "$scriptdir/includes/generic-includes.sh"
+source "$scriptdir/includes/cd-includes.sh"
+
+parseargs "$@"
+
+checkforbin unshield
+
+getcd 1 $BG1_TOTSC_3CD_US_MD5 data1.cab
+
+mkdir -p "$TARGETDIR" || die
+
+cp $CDMOUNT/dialog.tlk "$TARGETDIR" || die
+
+unshield -L x $CDMOUNT/data1.cab -d "$TARGETDIR" || die
+
+cp -R "$TARGETDIR"/minimumdata/* "$TARGETDIR" || die
+rm -r "$TARGETDIR"/minimumdata
+
+cp -R "$TARGETDIR"/english_sounds/sounds/* "$TARGETDIR"/sounds/ || die
+rm -r "$TARGETDIR"/english_sounds
+
+cp -R "$TARGETDIR"/english/* "$TARGETDIR" || die
+rm -r "$TARGETDIR"/english
+
+mkdir -p "$TARGETDIR"/movies
+mkdir -p "$TARGETDIR"/manual
+
+mkdir -p "$TARGETDIR"/save
+cp -R $CDMOUNT/[Ss]ave/* "$TARGETDIR"/save || die
+
+cp $CDMOUNT/Manual/BGManual.pdf "$TARGETDIR"/manual/ || die
+cp $CDMOUNT/Manual/TotscManual.pdf "$TARGETDIR"/manual/ || die
+
+cp $CDMOUNT/baldur.ico "$TARGETDIR" || die
+
+setperms "$TARGETDIR"
diff --git a/bg1/install-5cd-minimal.sh b/bg1/install-5cd-minimal.sh
index 002c5a9..2e6ff59 100755
--- a/bg1/install-5cd-minimal.sh
+++ b/bg1/install-5cd-minimal.sh
@@ -24,7 +24,7 @@ parseargs "$@"
checkforbin unshield
-getcd 1 138528155dfeb695bd63f90eacee7dc0 data1.cab
+getcd 1 $BG1_5CD_INTL_MD5 data1.cab
mkdir -p "$TARGETDIR" || die
diff --git a/includes/cd-includes.sh b/includes/cd-includes.sh
index e234c9b..e7c2526 100644
--- a/includes/cd-includes.sh
+++ b/includes/cd-includes.sh
@@ -17,6 +17,30 @@
[ -z "$CDMOUNT" ] && export CDMOUNT="/media/cdrom"
+export BG1_5CD_INTL_MD5="138528155dfeb695bd63f90eacee7dc0"
+export BG1_TOTSC_3CD_US_MD5="1a6828b97a27967e8c4acc25e1ef48d2"
+export BG1_TOTSC_1CD_UK_MD5="e27d259ddc0171ff945dbba136e60309"
+
+export BG2_4CD_US_MD5="8acf4a6348de916bfaf077469a427b65"
+
+export PST_2CD_MD5="640b61443cc86c434f1b6826e63c0e33"
+export PST_4CD_MD5="5e8c2075163aca124de4a467fb33063d"
+
+export IWD_2CD_US_MD5=""
+export IWD_HOW_1CD_US_MD5=""
+
+export IWD2_2CD_US_MD5=""
+
+# a record of every IE collection I can find.
+export IWD_ULTIMATE_COLLECTION_MD5=""
+export BG1_1DVD_MD5=""
+export BG_COMPLILATION_1DVD_MD5=""
+#export BG2_COMPLILATION_NCD_MD5="" # no idea how many cds.
+export BLACK_ISLE_COMPILATION_PART_ONE_MD5=""
+export BLACK_ISLE_COMPILATION_PART_TWO_MD5=""
+export ULTIMATE_DUNGEONS_DRAGONS_MD5=""
+export ROLLENSPIELE_DELUXE_EDITION_MD5=""
+
### functions ###
function checkcd
diff --git a/includes/generic-includes.sh b/includes/generic-includes.sh
index 43474af..51cffcb 100644
--- a/includes/generic-includes.sh
+++ b/includes/generic-includes.sh
@@ -97,7 +97,7 @@ function setperms
find "$1" -type f -exec chmod 644 '{}' \;
find "$1" -type f -iname '*.exe' -exec chmod 755 '{}' \;
find "$1" -type f -iname '*.ini' -exec chmod 664 '{}' \;
- chgrp -R games "$1"
+ chgrp -R games "$1" &> /dev/null
if [ -d "$1"/save ]; then
chmod -R g+w "$1"/save
fi
diff --git a/pst/install-2cd-extra.sh b/pst/install-2cd-extra.sh
index 4fe58a9..f37e173 100755
--- a/pst/install-2cd-extra.sh
+++ b/pst/install-2cd-extra.sh
@@ -24,7 +24,9 @@ parseargs "$@"
checkforbin unshield
-getcd 1 640b61443cc86c434f1b6826e63c0e33 data1.cab
+CD2="610d9f6354be741b09fc25b5e9645328"
+
+getcd 1 $PST_2CD_MD5 data1.cab
unshield -g OtherData -L x $CDMOUNT/data1.cab -d "$TARGETDIR" || die
unshield -g OtherData -L x $CDMOUNT/data2.cab -d "$TARGETDIR" || die
@@ -32,7 +34,7 @@ unshield -g OtherData -L x $CDMOUNT/data2.cab -d "$TARGETDIR" || die
mv "$TARGETDIR"/otherdata/* "$TARGETDIR" || die
rmdir "$TARGETDIR"/otherdata || die
-getcd 2 610d9f6354be741b09fc25b5e9645328 cd2/movies4.bif
+getcd 2 $CD2 cd2/movies4.bif
copylower "$CDMOUNT/cd2/" "$TARGETDIR" || die
diff --git a/pst/install-2cd-minimal.sh b/pst/install-2cd-minimal.sh
index fa8fa04..61ff812 100755
--- a/pst/install-2cd-minimal.sh
+++ b/pst/install-2cd-minimal.sh
@@ -24,7 +24,7 @@ parseargs "$@"
checkforbin unshield
-getcd 1 640b61443cc86c434f1b6826e63c0e33 data1.cab
+getcd 1 $PST_2CD_MD5 data1.cab
mkdir -p "$TARGETDIR" || die
diff --git a/pst/install-4cd-extra.sh b/pst/install-4cd-extra.sh
index 02f566e..f66c79e 100755
--- a/pst/install-4cd-extra.sh
+++ b/pst/install-4cd-extra.sh
@@ -24,13 +24,17 @@ parseargs "$@"
checkforbin unshield
-getcd 2 99be7c8544016302c820088091c52fef cd2/movies2.bif
+CD2="99be7c8544016302c820088091c52fef"
+CD3="6ffd2c51a41603c7dca6196d9bef2e26"
+CD4="b70322aaa7b1d61a168a766eba399085"
+
+getcd 2 $CD2 cd2/movies2.bif
copylower "$CDMOUNT/cd2/" "$TARGETDIR" || die
-getcd 3 6ffd2c51a41603c7dca6196d9bef2e26 cd3/AR0500.bif
+getcd 3 $CD3 cd3/AR0500.bif
copylower "$CDMOUNT/cd3/" "$TARGETDIR" || die
-getcd 4 b70322aaa7b1d61a168a766eba399085 cd4/movies4.bif
+getcd 4 $CD4 cd4/movies4.bif
copylower "$CDMOUNT/cd4/" "$TARGETDIR" || die
setperms "$TARGETDIR"
diff --git a/pst/install-4cd-minimal.sh b/pst/install-4cd-minimal.sh
index 3552312..09cd175 100755
--- a/pst/install-4cd-minimal.sh
+++ b/pst/install-4cd-minimal.sh
@@ -24,7 +24,7 @@ parseargs "$@"
checkforbin unshield
-getcd 1 5e8c2075163aca124de4a467fb33063d data1.cab
+getcd 1 $PST_4CD_MD5 data1.cab
mkdir -p "$TARGETDIR" || die
diff --git a/totsc/install-1cd-uk.sh b/totsc/install-1cd-uk.sh
index d625afc..9f2f582 100755
--- a/totsc/install-1cd-uk.sh
+++ b/totsc/install-1cd-uk.sh
@@ -24,7 +24,7 @@ parseargs "$@"
checkforbin unshield
-getcd 1 e27d259ddc0171ff945dbba136e60309 data1.cab
+getcd 1 $BG1_TOTSC_1CD_UK_MD5 data1.cab
mkdir -p "$TARGETDIR" || die