fr

Changes for Worms Reloaded

Revision by GNU_Raziel (04 May 2012 14:06:23)

@@ -1,83 +1,88 @@
 #!/bin/bash
 # Date : (2010-18-09 14-00)
-# Last revision : (2010-18-09 14-00)
-# Wine version used : 1.3.2
+# Last revision : (2012-05-04 21:00)
+# Wine version used : 1.3.2, 1.4
 # Distribution used to test : Debian Squeeze (Testing)
 # Author : GNU_Raziel
 # Licence : Retail
+# Only For : http://www.playonlinux.com
  
 [ "$PLAYONLINUX" = "" ] && exit 0
 source "$PLAYONLINUX/lib/sources"
- 
+
 TITLE="Worms Reloaded"
+TITLE_DEMO="Worms Reloaded (Demo)"
 PREFIX="WormsReloaded"
-WORKING_WINE_VERSION="1.3.2"
-
-if [ "$POL_LANG" == "fr" ]; then
-LNG_CHOOSE_DDV="Veuillez selectionner votre executable Digital Download de $TITLE"
-LNG_INSTALL_ON="Installation en cours..."
-LNG_WAIT_END="Appuyez sur \"Suivant\" UNIQUEMENT quand l'installation du jeu sera\nterminée sous peine de devoir recommencer l'installation."
-LNG_SUCCES="$TITLE a été installé avec succès."
-else
-LNG_CHOOSE_DDV="Please select your $TITLE Digital Download executable"
-LNG_INSTALL_ON="Installation in progress..."
-LNG_WAIT_END="Click NEXT when the installation will finish"
-LNG_SUCCES="$TITLE has been installed successfully."
-fi
+EDITOR="Team 17"
+GAME_URL="http://www.team17.com"
+AUTHOR="GNU_Raziel"
+WORKING_WINE_VERSION="1.4"
 
-#starting the script
-cd $REPERTOIRE/tmp
-rm *.jpg
+# Starting the script
 POL_GetSetupImages "http://files.playonlinux.com/resources/setups/wormsreloaded/top.jpg" "http://files.playonlinux.com/resources/setups/wormsreloaded/left.jpg" "$TITLE"
-[ "$PLAYONMAC" == "" ] || POL_SetupWindow_Init
-[ "$PLAYONMAC" == "" ] && POL_SetupWindow_InitWithImages
- 
-POL_SetupWindow_presentation "$TITLE" "Team 17" "http://www.team17.com/" "GNU_Raziel" "$PREFIX" 
+POL_SetupWindow_Init
+
+# Starting debugging API
+POL_Debug_Init
+
+POL_SetupWindow_presentation "$TITLE" "$EDITOR" "$GAME_URL" "$AUTHOR" "$PREFIX" 
 
-select_prefix "$REPERTOIRE/wineprefix/$PREFIX"
+# Setting prefix path
+POL_Wine_SelectPrefix "$PREFIX"
 
-#downloading specific Wine
-POL_SetupWindow_install_wine "$WORKING_WINE_VERSION"
-Use_WineVersion "$WORKING_WINE_VERSION"
+# Downloading wine if necessary and creating prefix
+POL_System_SetArch "x86"
+POL_Wine_PrefixCreate "$WORKING_WINE_VERSION"
 
-#fetching PROGRAMFILES environmental variable
-PROGRAMFILES="Program Files" 
-POL_LoadVar_PROGRAMFILES
+# Choose between Steam and other Digital Download version
+POL_SetupWindow_InstallMethod "STEAM,LOCAL"
 
+# Installing mandatory dependencies
+if [ "$INSTALL_METHOD" == "STEAM" ] || [ "$INSTALL_METHOD" == "STEAM_DEMO" ]; then
+	POL_Call POL_Install_steam
+fi
 POL_Call POL_Install_vcrun2005
-POL_Call POL_Install_d3dx9
-POL_Call POL_Install_xact
+POL_Call POL_Install_dxfullsetup
 
-#Asking then installing DDV of the game
-cd $HOME
-POL_SetupWindow_browse "$LNG_CHOOSE_DDV" "$TITLE"
-SETUP_EXE="$APP_ANSWER"
-POL_SetupWindow_wait_next_signal "$LNG_INSTALL_ON" "$TITLE"
-wine start /unix "$SETUP_EXE"
-INSTALL_ON="1"
-until [ "$INSTALL_ON" == "" ]; do
-sleep 5
-INSTALL_ON=`ps aux | grep "wineserver" | grep -v "grep"`
-done
-POL_SetupWindow_detect_exit
+# Mandatory settings for steam
+[ "$INSTALL_METHOD" == "STEAM_DEMO" ] && { STEAM_ID="22690"; SHORTCUT_NAME="$TITLE_DEMO"; }
+[ "$INSTALL_METHOD" == "STEAM" ] && { STEAM_ID="22600"; SHORTCUT_NAME="$TITLE"; }
 
-## PlayOnMac Section
-[ "$PLAYONMAC" == "" ] && Set_SoundDriver "alsa"
-[ "$PLAYONMAC" == "" ] || Set_Managed "Off"
-## End Section
+# Asking about memory size of graphic card
+POL_SetupWindow_VMS $GAME_VMS
 
-#cleaning temp
-if [ -e "$WINEPREFIX/drive_c/windows/temp/" ]; then
-	rm -rf "$WINEPREFIX/drive_c/windows/temp/*"
-	chmod -R 777 "$REPERTOIRE/tmp/"
-	rm -rf "$REPERTOIRE/tmp/*"
-fi
+# Set Graphic Card information keys for wine
+POL_Wine_SetVideoDriver
 
-#making shortcut
-POL_SetupWindow_auto_shortcut "$PREFIX" "WormsReloaded.exe" "$TITLE" "$TITLE.png"
-Set_WineVersion_Assign "$WORKING_WINE_VERSION" "$TITLE"
+## Fix for this game
+# Sound problem fix - pulseaudio related
+[ "$POL_OS" = "Linux" ] && Set_SoundDriver "alsa"
+[ "$POL_OS" = "Linux" ] && Set_SoundEmulDriver "Y"
+## End Fix
+
+# Begin installation
+if [ "$INSTALL_METHOD" == "STEAM" ] || [ "$INSTALL_METHOD" == "STEAM_DEMO" ]; then
+	# Mandatory pre-install fix for steam
+	POL_Call POL_Install_steam_flags "$STEAM_ID"
+	# Shortcut done before install for steam version
+	POL_Shortcut "steam.exe" "$SHORTCUT_NAME" "$TITLE.png" "steam://rungameid/$STEAM_ID"
+	POL_Shortcut "steam.exe" "Steam ($TITLE)" "" ""
+	# Steam install
+	POL_SetupWindow_message "$(eval_gettext 'When $TITLE download by Steam is finished,\nDo NOT click on Play.\n\nClose COMPLETELY the Steam interface, \nso that the installation script can continue')" "$TITLE"
+	cd "$WINEPREFIX/drive_c/$PROGRAMFILES/Steam"
+	POL_Wine start /unix "steam.exe" steam://install/$STEAM_ID
+	POL_Wine_WaitExit "$TITLE"
+else
+	# Asking then installing DDV of the game
+	cd "$HOME"
+	POL_SetupWindow_browse "$(eval_gettext 'Please select the setup file to run')" "$TITLE"
+	SETUP_EXE="$APP_ANSWER"
+	POL_Wine start /unix "$SETUP_EXE"
+	POL_Wine_WaitExit "$TITLE"
+
+	# Shortcut done after install for local version
+	POL_Shortcut "WormsReloaded.exe" "$TITLE" "$TITLE.png" ""
+fi
 
-POL_SetupWindow_message "$LNG_SUCCES" "$TITLE"
- 
 POL_SetupWindow_Close
-exit
\ No newline at end of file
+exit 0
\ No newline at end of file

Revision by GNU_Raziel (19 September 2010 17:45:28)

@@ -0,0 +1,83 @@
+#!/bin/bash
+# Date : (2010-18-09 14-00)
+# Last revision : (2010-18-09 14-00)
+# Wine version used : 1.3.2
+# Distribution used to test : Debian Squeeze (Testing)
+# Author : GNU_Raziel
+# Licence : Retail
+ 
+[ "$PLAYONLINUX" = "" ] && exit 0
+source "$PLAYONLINUX/lib/sources"
+ 
+TITLE="Worms Reloaded"
+PREFIX="WormsReloaded"
+WORKING_WINE_VERSION="1.3.2"
+
+if [ "$POL_LANG" == "fr" ]; then
+LNG_CHOOSE_DDV="Veuillez selectionner votre executable Digital Download de $TITLE"
+LNG_INSTALL_ON="Installation en cours..."
+LNG_WAIT_END="Appuyez sur \"Suivant\" UNIQUEMENT quand l'installation du jeu sera\nterminée sous peine de devoir recommencer l'installation."
+LNG_SUCCES="$TITLE a été installé avec succès."
+else
+LNG_CHOOSE_DDV="Please select your $TITLE Digital Download executable"
+LNG_INSTALL_ON="Installation in progress..."
+LNG_WAIT_END="Click NEXT when the installation will finish"
+LNG_SUCCES="$TITLE has been installed successfully."
+fi
+
+#starting the script
+cd $REPERTOIRE/tmp
+rm *.jpg
+POL_GetSetupImages "http://files.playonlinux.com/resources/setups/wormsreloaded/top.jpg" "http://files.playonlinux.com/resources/setups/wormsreloaded/left.jpg" "$TITLE"
+[ "$PLAYONMAC" == "" ] || POL_SetupWindow_Init
+[ "$PLAYONMAC" == "" ] && POL_SetupWindow_InitWithImages
+ 
+POL_SetupWindow_presentation "$TITLE" "Team 17" "http://www.team17.com/" "GNU_Raziel" "$PREFIX" 
+
+select_prefix "$REPERTOIRE/wineprefix/$PREFIX"
+
+#downloading specific Wine
+POL_SetupWindow_install_wine "$WORKING_WINE_VERSION"
+Use_WineVersion "$WORKING_WINE_VERSION"
+
+#fetching PROGRAMFILES environmental variable
+PROGRAMFILES="Program Files" 
+POL_LoadVar_PROGRAMFILES
+
+POL_Call POL_Install_vcrun2005
+POL_Call POL_Install_d3dx9
+POL_Call POL_Install_xact
+
+#Asking then installing DDV of the game
+cd $HOME
+POL_SetupWindow_browse "$LNG_CHOOSE_DDV" "$TITLE"
+SETUP_EXE="$APP_ANSWER"
+POL_SetupWindow_wait_next_signal "$LNG_INSTALL_ON" "$TITLE"
+wine start /unix "$SETUP_EXE"
+INSTALL_ON="1"
+until [ "$INSTALL_ON" == "" ]; do
+sleep 5
+INSTALL_ON=`ps aux | grep "wineserver" | grep -v "grep"`
+done
+POL_SetupWindow_detect_exit
+
+## PlayOnMac Section
+[ "$PLAYONMAC" == "" ] && Set_SoundDriver "alsa"
+[ "$PLAYONMAC" == "" ] || Set_Managed "Off"
+## End Section
+
+#cleaning temp
+if [ -e "$WINEPREFIX/drive_c/windows/temp/" ]; then
+	rm -rf "$WINEPREFIX/drive_c/windows/temp/*"
+	chmod -R 777 "$REPERTOIRE/tmp/"
+	rm -rf "$REPERTOIRE/tmp/*"
+fi
+
+#making shortcut
+POL_SetupWindow_auto_shortcut "$PREFIX" "WormsReloaded.exe" "$TITLE.png" "$TITLE" ""
+Set_WineVersion_Assign "$WORKING_WINE_VERSION" "$TITLE"
+
+POL_SetupWindow_message "$LNG_SUCCES" "$TITLE"
+ 
+POL_SetupWindow_Close
+exit
\ No newline at end of file
Il n'y a rien à voir ici