Forums

[script] Planescape Torment

Auteur Réponses
NSLW Mercredi 20 Mai 2009 à 9:12
NSLW

Hello,
I wrote script which installs Planescape Torment. It also can patch the game after it's been installed

Wine version : 1.1.21
Distribution : Fedora
Distribution Version : 10 (32 bit)
Graphics card : Nvidia, GeForce 9xxx
Drivers of the graphics card : 185.18.08
Comments
-available only in windowed mode

Icon for the game:



#!/bin/bash
if [ "$PLAYONLINUX" = "" ]
then
exit 0
fi
source "$PLAYONLINUX/lib/sources"
 
VERSIONWINE=$(wine --version)
TYTUL="Planescape Torment"
PREFIX="PT"
 
#procedure for patching Planescape Torment
patch_pt()
{
POL_SetupWindow_browse "Select patch file" "$TYTUL" ""
wine "$APP_ANSWER"
POL_SetupWindow_message "Patch for $TYTUL has been installed successfully" "$TYTUL"
}

POL_SetupWindow_Init
POL_SetupWindow_presentation "$TYTUL" "Black Isle" "N/A" "NSLW" "$PREFIX" 
 
select_prefixe "$REPERTOIRE/wineprefix/$PREFIX"

#asking about patching
POL_SetupWindow_menu "What do you want to do?" "Actions" "install-game patch-game" " "
if [ "$APP_ANSWER" == "patch-game" ]; then
	if [ -e "$REPERTOIRE/wineprefix/$PREFIX" ]; then
	patch_pt
	POL_SetupWindow_Close
	fi
fi

POL_SetupWindow_prefixcreate 

POL_SetupWindow_cdrom
POL_SetupWindow_check_cdrom "SETUP.EXE"
 
#adding CD-ROM as drive d: to winecfg
CDROM2=${CDROM//"1"/"2"} #CD2
CDROM3=${CDROM//"1"/"3"} #CD3
CDROM4=${CDROM//"1"/"4"} #CD4
cd "$WINEPREFIX/dosdevices"
ln -s $CDROM d: #not sure about CD1 label
ln -s $CDROM2 e:
ln -s $CDROM3 f:
ln -s $CDROM4 g:

echo "\\"d:\\"=\\"cdrom\\"" >> "$REPERTOIRE/tmp/cdrom.reg"
echo "\\"e:\\"=\\"cdrom\\"" >> "$REPERTOIRE/tmp/cdrom.reg"
echo "\\"f:\\"=\\"cdrom\\"" >> "$REPERTOIRE/tmp/cdrom.reg"
echo "\\"g:\\"=\\"cdrom\\"" >> "$REPERTOIRE/tmp/cdrom.reg"
regedit "$REPERTOIRE/tmp/cdrom.reg"
 
POL_SetupWindow_message "Wait 5 seconds then click next" "$TYTUL"
 
#starting installation
POL_SetupWindow_wait_next_signal "Installation in progress..." "$TYTUL"
cd $CDROM
wine "SETUP.EXE"
POL_SetupWindow_message "Click \\"Next\\" when installation will finish." "$TYTUL"

#switching to windowed mode
cd "$WINEPREFIX/drive_c/Program Files/Black Isle/Torment"
mv Torment.ini Torment.ini.bak
cat Torment.ini.bak | sed s/Full\\ Screen=1/Full\\ Screen=0/ >& Torment.ini
 
#cleaning temp
cd "$WINEPREFIX/drive_c/windows/temp/"
rm -rf *
 
#making shortcut
cp "$CDROM/TORMENT.ICO" "$REPERTOIRE/icones/32/$TYTUL"
POL_SetupWindow_make_shortcut "$PREFIX" "Program Files/Black Isle/Torment" "Torment.exe" "" "$TYTUL" "" "-opengl"

POL_SetupWindow_message "$TYTUL has been installed successfully" "$TYTUL"
 
#asking about patching
POL_SetupWindow_question "Do you want to patch your game?" "$TYTUL"
if [ "$APP_ANSWER" == "TRUE" ] ;then
patch_pt
fi

POL_SetupWindow_Close
exit
GNU_Raziel Mercredi 20 Mai 2009 à 14:52
GNU_Raziel

Script added to repository, thx for your work :)
BebeFoetus Dimanche 8 Aoüt 2010 à 0:05
BebeFoetusAnonymous

Works fine, but there is no audio.

To get it, go into wine cfg window, select audio tab then tick OSS driver and tick off everything else.
In DirectSound, choose Hardware Acceleration as Emulation, 22050 Hz, 8 bits, as described here:
> http://appdb.winehq.org/objectManager.php?sClass=version&iId=3058&iTestingId=4091

I don't know if it can be added into PoL script.

This site allows content generated by members, and we promptly remove any content that infringes copyright according to our Terms of Service. To report copyright infringement, please send a notice to dmcayonlinux.com