Applications

Choose a category

accessories
Accessories
development
Development
education
Education
games
Games
graphics
Graphics
internet
Internet
multimedia
Multimedia
office
Office
other
Other

Prince Of Persia - Sands of Time

#!/bin/bash
# Date : (2009-06-14 20-00)
# Last revision : (2009-06-16 20-00)
# Wine version used : N/A
# Distribution used to test : N/A
# Author : NSLW
# Licence : Retail
 
#Translated from V2 to V3
[ "$PLAYONLINUX" = "" ] && exit 0
source "$PLAYONLINUX/lib/sources"
 
#fetching PROGRAMFILES environmental variable
PROGRAMFILES=`wine cmd /c echo "%ProgramFiles%"`
PROGRAMFILES=${PROGRAMFILES:3}
 
if [ "$POL_LANG" == "fr" ]; then
SUBTITLE="Les Sables du Temps"
 
elif [ "$POL_LANG" == "it" ]
then
SUBTITLE="Le sabbie del tempo"
 
elif [ "$POL_LANG" == "es" ]
then
SUBTITLE="Las Arenas del Tiempo"
 
elif [ "$POL_LANG" == "pl" ]
then
SUBTITLE="Piaski Czasu"
 
else
SUBTITLE="Sands Of Time"
fi
 
TITLE="Prince Of Persia - $SUBTITLE"
PREFIX="PoP-SandsOfTime"
 
POL_SetupWindow_Init
POL_SetupWindow_presentation "$TITLE" "Ubisoft" "http://www.princeofpersiagame.com" "GNU_Raziel and NSLW" "$PREFIX"
 
#presentation "Prince Of Persia - Sands Of Time" "Ubisoft" "http://www.princeofpersiagame.com/index.php" "GNU_Raziel" "PoP-SandsOfTime" 1 10
 
if [ "$POL_LANG" == "fr_FR.UTF-8" ]; then
LNG_DX9_DL="Téléchargement de la mise a jour DirectX9.0c pour Wine..."
LNG_XINPUT_DL="Téléchargement de la mise a jour Xinput et XACT pour Wine..."
LNG_DX9_INSTALL="L'installation de la mise a jour DirectX9.0c pour Wine va débuter."
LNG_XINPUT_INSTALL="L'installation de la mise a jour Xinput et XACT pour Wine va débutée."
LNG_WAIT_END="Appuyez sur "Suivant" UNIQUEMENT quand l'installation du jeu sera terminée sous peine de devoir recommencer l'installation."
else
LNG_DX9_DL="Downloading Wine DirectX9.0c Update..."
LNG_XINPUT_DL="Downloading Wine Xinput and XACT Update..."
LNG_DX9_INSTALL="DirectX9.0c Update installation will begin."
LNG_XINPUT_INSTALL="Xinput and XACT installation will begin."
LNG_WAIT_END="Click on "Next" ONLY when the game installation is finished or you will have to redo the installation."
fi
 
cd "$REPERTOIRE/ressources/"
#determining which Version is the latest
wget http://mulx.playonlinux.com/wine/linux-i386/LIST --output-document=LIST
cat LIST | sed -e 's/\.//g' | cut -d';' -f2 | sort -n | tail -n1 >& LatestVersion.txt
 
x=`cat LatestVersion.txt | cut -c1-1`
y=`cat LatestVersion.txt | cut -c2-2`
z=`cat LatestVersion.txt | cut -c3-4`
 
LATESTVERSION=$x.$y.$z
CHOSENWINEVERSION="$LATESTVERSION"
POL_SetupWindow_install_wine "$CHOSENWINEVERSION"
Use_WineVersion "$CHOSENWINEVERSION"
 
select_prefix "$REPERTOIRE/wineprefix/$PREFIX"
POL_SetupWindow_prefixcreate
 
POL_SetupWindow_cdrom
POL_SetupWindow_check_cdrom "setup.exe"
 
#adding CD-ROM as drive d: to winecfg
CDROM2=${CDROM//"1"/"2"} #POP_DISC2
cd "$WINEPREFIX/dosdevices"
ln -s $CDROM d:
ln -s $CDROM2 e:
 
cd "$WINEPREFIX/drive_c/windows/temp/"
echo "[HKEY_LOCAL_MACHINE\\Software\\Wine\\Drives]" > cdrom.reg
echo "\"d:\"=\"cdrom\"" >> cdrom.reg
echo "\"e:\"=\"cdrom\"" >> cdrom.reg
regedit cdrom.reg
sleep 5
 
cd "$REPERTOIRE/ressources"
#downloading winetricks
if [ "`sha1sum < winetricks | sed 's/ .*//'`" != "bf24bc6d84a40a836d7ce6de41ff04f910b34434" ]; then
wget http://winezeug.googlecode.com/svn/trunk/winetricks --output-document=winetricks
fi
 
WINETRICKSDX=`cat winetricks | grep \/directx | cut -d'_' -f2`
WINETRICKSDXLINK=`cat winetricks | grep \/directx | cut -d'/' -f5,6,7,8`
 
#downloading DirectX
if [ ! -e "$HOME/.winetrickscache/directx_${WINETRICKSDX}_redist.exe" ]; then
mkdir "$HOME/.winetrickscache"
cd "$HOME/.winetrickscache"
POL_SetupWindow_download "$LNG_DX9_DL" "$TITLE" "http://download.microsoft.com/download/$WINETRICKSDXLINK/directx_${WINETRICKSDX}_redist.exe"
fi
 
#modyfing winetricks
cd "$WINEPREFIX/drive_c/windows/temp"
cat "$REPERTOIRE/ressources/winetricks" | sed -e 's/set_winver\ win2k/set_winver\ winxp/' > winetricks
 
#installing DirectX
POL_SetupWindow_wait_next_signal "$LNG_DX9_INSTALL" "$TITLE"
bash winetricks -q directx9 xact
POL_SetupWindow_detect_exit
 
Set_OS "winxp"
 
#starting installation
cd $CDROM
wine "setup.exe"
POL_SetupWindow_message "$LNG_WAIT_END" "$TITLE"
Set_Managed "On"
Set_DXGrab "On"
POL_SetupWindow_make_shortcut "$PREFIX" "$PROGRAMFILES/UBISOFT/Prince of Persia $SUBTITLE" "PrinceOfPersia.EXE" "PoP-SandsOfTime.xpm" "$TITLE" "" ""
Set_WineVersion_Assign "$CHOSENWINEVERSION" "Prince Of Persia $SUBTITLE"
POL_SetupWindow_reboot
POL_SetupWindow_message "$TITLE has been installed successfully" "$TITLE"
POL_SetupWindow_Close
exit
 
#Ask_For_cdrom 2 10
#Check_cdrom "setup.exe"
 
#TEMP="$HOME/.PlayOnLinux/tmp/PoP-SandsOfTime"
#chmod 777 $TEMP -R
#rm $TEMP -R
#mkdir $TEMP
#mkdir -p $REPERTOIRE/wineprefix/PoP-SandsOfTime
#cd $REPERTOIRE/wineprefix/PoP-SandsOfTime
#select_prefixe "$(pwd)"
#creer_prefixe 3 10
 
#cd $WINEPREFIX/drive_c/windows/
#mkdir temp
#cd $WINEPREFIX/dosdevices
#ln -sf $TEMP ./d:
 
#attendre "Patientez pendant la préparation de l'installation ..." "cp -r #$CDROM/* $TEMP" "" 4 10
#chmod 777 $TEMP -R
#ask_mount_num 2
#attendre "Patientez pendant la préparation de l'installation ..." "cp -r $CDROM/* $TEMP" "" 5 10
#chmod 777 $TEMP -R
 
#cd $REPERTOIRE/tmp/
#if [ ! -e $REPERTOIRE/tmp/D3DX9_dll_update.zip ]; then
#telecharger "$LNG_DX9_DL" http://www.threelights.de/page/projects/d3dx9_xx_dll_files/D3DX9_dll_update.zip "" 6 10
#fi
#if [ ! -e $REPERTOIRE/tmp/X_dll_update.zip ]; then
#telecharger "$LNG_XINPUT_DL" http://www.threelights.de/page/projects/d3dx9_xx_dll_files/X_dll_update.zip "" 7 10
#fi
#cd $WINEPREFIX/drive_c/windows/temp/
#unzip $REPERTOIRE/tmp/D3DX9_dll_update.zip
#unzip $REPERTOIRE/tmp/X_dll_update.zip
#message "$LNG_DX9_INSTALL" "" 8 10
#Set_OS "winxp"
#wine c:\\windows\\temp\\D3DX9_dll_update\\Install\\DXSETUP.exe
#message "$LNG_XINPUT_INSTALL" "" 9 10
#wine c:\\windows\\temp\\X_dll_update\\Install\\DXSETUP.exe
 
#wine d:\\setup.exe
#message "$LNG_WAIT_END" "" 10 10
 
#Set_Managed "On"
#Set_DXGrab "On"
#Set_GLSL "On"
 
#cd $WINEPREFIX/dosdevices
#rm ./d:
#ln -s $CDROM ./d:
#rm -rf $TEMP
 
#simuler_reboot
#rm -rf $WINEPREFIX/drive_c/windows/temp/*
 
#if [ "$POL_LANG" == "fr_FR.UTF-8" ]; then
#creer_lanceur "PoP-SandsOfTime" "Program Files/UBISOFT/Prince of Persia Les Sables du Temps" "PrinceOfPersia.EXE" "PoP-SandsOfTime.xpm" "Prince Of Persia - Les Sables Du Temps"
#elif [ "$POL_LANG" == "es_ES.UTF-8" ]
#then
#creer_lanceur "PoP-SandsOfTime" "Archivos de programa/UBISOFT/Prince of Persia Las Arenas del Tiempo" "PrinceOfPersia.EXE" "PoP-SandsOfTime.xpm" "Prince Of Persia - Las Arenas del Tiempo"
#else
#creer_lanceur "PoP-SandsOfTime" "Program Files/UBISOFT/Prince of Persia Sands of Time" "PrinceOfPersia.EXE" "PoP-SandsOfTime.xpm" "Prince Of Persia - Sands Of Time"
#fi
 
#end_install
#exit
Il n'y a rien à voir ici