Need For Speed Most Wanted

Informations

Creator Message
NSLW

Information

This installer has been approved by the team.

Informations

Platforms:
Downloads: 216463
Wine: 3.0

Feedbacks

Description

-game won't run with original speed.exe

Source code

#!/bin/bash
# Date : (2009-05-23 12-14)
# Last revision : (2016-06-23 23-58)
# Wine version used : 1.3, 1.8.3, 3.0
# Distribution used to test : Debian Squeeze (Testing), Arch Linux, Ubuntu 18.04 x64
# Author : NSWL & GNU_Raziel
# Licence : Retail
 
[ "$PLAYONLINUX" = "" ] && exit 0
source "$PLAYONLINUX/lib/sources"
 
TITLE="Need For Speed Most Wanted"
PREFIX="NFSMW"
WORKING_WINE_VERSION="3.0"
GAME_VMS="32"
 
#starting the script
POL_SetupWindow_Init
POL_Debug_Init
 
POL_SetupWindow_presentation "$TITLE" "EA Games" "N/A" "NSLW & GNU_Raziel" "$PREFIX"
 
#preparing Wine prefix
POL_Wine_SelectPrefix "$PREFIX"
POL_System_SetArch "x86"
POL_Wine_PrefixCreate "$WORKING_WINE_VERSION"
 
#Choose between CD, DVD and Digital Download version
POL_SetupWindow_InstallMethod "CD,DVD,LOCAL"
 
if [ "$INSTALL_METHOD" == "CD" ]; then
        #asking for CDROM and checking if it's correct one
        #CD-ROM 1
        POL_SetupWindow_message "$(eval_gettext 'Please insert the game media into your disk drive.')"
        POL_SetupWindow_cdrom
        POL_SetupWindow_check_cdrom "AutoRun.exe"
        cd "$WINEPREFIX/dosdevices"
        rm "d::"
        ln -s "$CDROM" "d:"
        cd "$CDROM"
        POL_Wine "AutoRun.exe"
        POL_SetupWindow_message "$(eval_gettext 'When the game setup will ask for reboot\nclick on "Yes" then click on "Next".')"
        POL_Wine "AutoRun.exe"
        POL_SetupWindow_message "$(eval_gettext 'When the game setup will ask for next disk\nclick on "Next".')"
        #CD-ROM 2
        POL_SetupWindow_message "$(eval_gettext 'Please insert the game media into your disk drive.')"
        POL_SetupWindow_cdrom
        cd "$WINEPREFIX/dosdevices"
        rm "d:"
        ln -s "$CDROM" "d:"
        POL_SetupWindow_message "$(eval_gettext 'When the game setup will ask for next disk\nclick on "Next".')"
        #CD-ROM 3
        POL_SetupWindow_message "$(eval_gettext 'Please insert the game media into your disk drive.')"
        POL_SetupWindow_cdrom
        rm "d:"
        ln -s "$CDROM" "d:"
        POL_SetupWindow_message "$(eval_gettext 'When the game setup will ask for next disk\nclick on "Next".')"
        #CD-ROM 4
        POL_SetupWindow_message "$(eval_gettext 'Please insert the game media into your disk drive.')"
        POL_SetupWindow_cdrom
        rm "d:"
        ln -s "$CDROM" "d:"
        POL_SetupWindow_message "$(eval_gettext 'When the game setup will ask for next disk\nclick on "Next".')"
        #CD-ROM 1
        POL_SetupWindow_message "$(eval_gettext 'Please insert the game media into your disk drive.')"
        POL_SetupWindow_cdrom
        rm "d:"
        ln -s "$CDROM" "d:"
        POL_SetupWindow_message "$(eval_gettext 'Please wait while $TITLE is installed.')" "$TITLE"
elif [ "$INSTALL_METHOD" == "DVD" ]; then
        #asking for CDROM and checking if it's correct one
        POL_SetupWindow_message "$(eval_gettext 'Please insert the game media into your disk drive.')"
        POL_SetupWindow_cdrom
        POL_SetupWindow_check_cdrom "AutoRun.exe"
        cd "$CDROM"
        POL_Wine "AutoRun.exe"
        POL_Wine_WaitExit "$TITLE"
else
        #Asking then installing DDV of the game
        POL_SetupWindow_browse "$(eval_gettext 'Please select the setup file to run.')" "$TITLE"
        POL_Wine "$APP_ANSWER"
        POL_Wine_WaitExit "$TITLE"
fi
 
#asking about memory size of graphic card
POL_SetupWindow_VMS "$GAME_VMS"
 
## PlayOnMac Section
[ "$PLAYONMAC" == "" ] && Set_SoundDriver "alsa"
[ "$PLAYONMAC" == "" ] || Set_Managed "Off"
## End Section
 
#making shortcut
POL_Shortcut "speed.exe" "$TITLE"
 
POL_SetupWindow_message "$(eval_gettext '$TITLE has been successfully installed.')" "$TITLE"
 
POL_SetupWindow_Close
exit

Contributions

Filters:

Contribute
Member Message
marcelo_hayden Wednesday 16 January 2019 at 17:45
marcelo_hayden

Message

It's working fine when I change the Wine version for 3.0. The PlayOnLinux team needs to approve the last code update that uses 3.0.

Replies

Wednesday 16 January 2019 at 21:02
Done
LinuxScripter Wednesday 14 February 2018 at 11:46
LinuxScripter Anonymous

Information

This update has been approved by the team.

Message

Game runs on the latest version on wine just fine. No dependencies needed.

Differences

@@ -1,8 +1,8 @@
 #!/bin/bash
-# Date : (2009-23-05 12-14)
-# Last revision : (2016-04-01 13-24)
-# Wine version used : 1.3
-# Distribution used to test : Debian Squeeze (Testing)
+# Date : (2009-05-23 12-14)
+# Last revision : (2016-06-23 23-58)
+# Wine version used : 1.3, 1.8.3, 3.0
+# Distribution used to test : Debian Squeeze (Testing), Arch Linux, Ubuntu 18.04 x64
 # Author : NSWL & GNU_Raziel
 # Licence : Retail
  
@@ -11,172 +11,89 @@
  
 TITLE="Need For Speed Most Wanted"
 PREFIX="NFSMW"
-WORKING_WINE_VERSION="1.3.0"
- 
-if [ "$POL_LANG" == "fr" ]; then
-LNG_CHOOSE_MEDIA="Quelle version possédez-vous?"
-LNG_CD="Version CD"
-LNG_DVD="Version DVD"
-LNG_DDV="Version Digital Download"
-LNG_CHOOSE_DDV="Veuillez selectionner votre executable Digital Download"
-LNG_WAIT_REBOOT="Quand l'installateur du jeu demandera de redémarrer cliquez sur \"Oui\"\npuis cliquez sur \"Suivant\"."
-LNG_INSERT_MEDIA_1="Veuillez insérer le disque 1 dans votre lecteur\nsi ce n'est pas déja fait."
-LNG_INSERT_MEDIA_2="Veuillez insérer le disque 2 dans votre lecteur\nsi ce n'est pas déja fait."
-LNG_INSERT_MEDIA_3="Veuillez insérer le disque 3 dans votre lecteur\nsi ce n'est pas déja fait."
-LNG_INSERT_MEDIA_4="Veuillez insérer le disque 4 dans votre lecteur\nsi ce n'est pas déja fait."
-LNG_NEXT_MEDIA="Quand l'installateur du jeu demandera le prochain disque\ncliquez sur \"Suivant\"."
-LNG_INSERT_MEDIA="Veuillez insérer le disque $TITLE dans votre lecteur\nsi ce n'est pas déja fait."
-LNG_WAIT_END="Appuyez sur \"Suivant\" UNIQUEMENT quand l'installation du\njeu sera terminée sous peine de devoir recommencer l'installation."
-LNG_INSTALL_ON="Installation en cours..."
-LNG_GAME_VMS="La taille de votre mémoire graphique?"
-LNG_VMS_ERROR="Ce jeu ne fonctionnera correctement qu'avec une carte graphique ayant plus de 128Mo de mémoire."
-LNG_SUCCES="$TITLE a été installé avec succès."
-else
-LNG_CHOOSE_MEDIA="What version do you have?"
-LNG_CD="CD Version"
-LNG_DVD="DVD Version"
-LNG_DDV="Digital Download Version"
-LNG_CHOOSE_DDV="Please select your $TITLE Digital Download executable"
-LNG_WAIT_REBOOT="When the game setup will ask for reboot click on \"Yes\"\nthen click on \"Next\"."
-LNG_INSERT_MEDIA_1="Please insert disk 1 into your disk drive\nif not already done."
-LNG_INSERT_MEDIA_2="Please insert disk 2 into your disk drive\nif not already done."
-LNG_INSERT_MEDIA_3="Please insert disk 3 into your disk drive\nif not already done."
-LNG_INSERT_MEDIA_4="Please insert disk 4 into your disk drive\nif not already done."
-LNG_NEXT_MEDIA="When the game setup will ask for next disk\nclick on \"Next\"."
-LNG_INSERT_MEDIA="Please insert $TITLE media into your disk drive\nif not already done."
-LNG_WAIT_END="Click on \"Next\" ONLY when the game installation is finished\nor you will have to redo the installation."
-LNG_INSTALL_ON="Installation in progress..."
-LNG_GAME_VMS="How much memory do your graphic card have got?"
-LNG_VMS_ERROR="This game will work correctly only with a graphic card with more than 128Mo of memory."
-LNG_SUCCES="$TITLE has been installed successfully."
-fi
+WORKING_WINE_VERSION="3.0"
+GAME_VMS="32"
  
 #starting the script
-rm "$REPERTOIRE/tmp/*.jpg"
 POL_SetupWindow_Init
+POL_Debug_Init
  
-POL_SetupWindow_presentation "$TITLE" "EA Games" "N/A" "NSLW & GNU_Raziel" "$PREFIX" 
+POL_SetupWindow_presentation "$TITLE" "EA Games" "N/A" "NSLW & 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
-POL_LoadVar_PROGRAMFILES
+#preparing Wine prefix
+POL_Wine_SelectPrefix "$PREFIX"
+POL_System_SetArch "x86"
+POL_Wine_PrefixCreate "$WORKING_WINE_VERSION"
  
 #Choose between CD, DVD and Digital Download version
-POL_SetupWindow_menu "$LNG_CHOOSE_MEDIA" "Actions" "$LNG_CD~$LNG_DVD~$LNG_DDV" "~"
+POL_SetupWindow_InstallMethod "CD,DVD,LOCAL"
  
-if [ "$APP_ANSWER" == "$LNG_CD" ]; then
-	GAME_MEDIAVERSION="CD"	
-elif [ "$APP_ANSWER" == "$LNG_DVD" ]; then
-	GAME_MEDIAVERSION="DVD"
+if [ "$INSTALL_METHOD" == "CD" ]; then
+        #asking for CDROM and checking if it's correct one
+        #CD-ROM 1
+        POL_SetupWindow_message "$(eval_gettext 'Please insert the game media into your disk drive.')"
+        POL_SetupWindow_cdrom
+        POL_SetupWindow_check_cdrom "AutoRun.exe"
+        cd "$WINEPREFIX/dosdevices"
+        rm "d::"
+        ln -s "$CDROM" "d:"
+        cd "$CDROM"
+        POL_Wine "AutoRun.exe"
+        POL_SetupWindow_message "$(eval_gettext 'When the game setup will ask for reboot\nclick on "Yes" then click on "Next".')"
+        POL_Wine "AutoRun.exe"
+        POL_SetupWindow_message "$(eval_gettext 'When the game setup will ask for next disk\nclick on "Next".')"
+        #CD-ROM 2
+        POL_SetupWindow_message "$(eval_gettext 'Please insert the game media into your disk drive.')"
+        POL_SetupWindow_cdrom
+        cd "$WINEPREFIX/dosdevices"
+        rm "d:"
+        ln -s "$CDROM" "d:"
+        POL_SetupWindow_message "$(eval_gettext 'When the game setup will ask for next disk\nclick on "Next".')"
+        #CD-ROM 3
+        POL_SetupWindow_message "$(eval_gettext 'Please insert the game media into your disk drive.')"
+        POL_SetupWindow_cdrom
+        rm "d:"
+        ln -s "$CDROM" "d:"
+        POL_SetupWindow_message "$(eval_gettext 'When the game setup will ask for next disk\nclick on "Next".')"
+        #CD-ROM 4
+        POL_SetupWindow_message "$(eval_gettext 'Please insert the game media into your disk drive.')"
+        POL_SetupWindow_cdrom
+        rm "d:"
+        ln -s "$CDROM" "d:"
+        POL_SetupWindow_message "$(eval_gettext 'When the game setup will ask for next disk\nclick on "Next".')"
+        #CD-ROM 1
+        POL_SetupWindow_message "$(eval_gettext 'Please insert the game media into your disk drive.')"
+        POL_SetupWindow_cdrom
+        rm "d:"
+        ln -s "$CDROM" "d:"
+        POL_SetupWindow_message "$(eval_gettext 'Please wait while $TITLE is installed.')" "$TITLE"
+elif [ "$INSTALL_METHOD" == "DVD" ]; then
+        #asking for CDROM and checking if it's correct one
+        POL_SetupWindow_message "$(eval_gettext 'Please insert the game media into your disk drive.')"
+        POL_SetupWindow_cdrom
+        POL_SetupWindow_check_cdrom "AutoRun.exe"
+        cd "$CDROM"
+        POL_Wine "AutoRun.exe"
+        POL_Wine_WaitExit "$TITLE"
 else
-	GAME_MEDIAVERSION="DD"
-fi
-
-#Installing mandatory dependencies 
-POL_Call POL_Install_vcrun2005
-POL_Call POL_Install_d3dx9
-
-if [ "$GAME_MEDIAVERSION" == "CD" ]; then
-	#asking for CDROM and checking if it's correct one
-	#CD-ROM 1
-	POL_SetupWindow_message "$LNG_INSERT_MEDIA_1"
-	POL_SetupWindow_cdrom
-	POL_SetupWindow_check_cdrom "AutoRun.exe"
-	cd $WINEPREFIX/dosdevices
-	rm d::
-	ls -sfT $CDROM d:
-	wine start /unix "$CDROM/AutoRun.exe"
-	POL_SetupWindow_message "$LNG_WAIT_REBOOT"
-	wine start /unix "$CDROM/AutoRun.exe"
-	#Ejecting CD-ROM 1
-	POL_SetupWindow_message "$LNG_NEXT_MEDIA"
-	wine eject d:
-	#CD-ROM 2
-	POL_SetupWindow_message "$LNG_INSERT_MEDIA_2"
-	POL_SetupWindow_cdrom
-	cd $WINEPREFIX/dosdevices
-	ln -sfT $CDROM d:
-	#Ejecting CD-ROM 2
-	POL_SetupWindow_message "$LNG_NEXT_MEDIA"
-	wine eject d:
-	#CD-ROM 3
-	POL_SetupWindow_message "$LNG_INSERT_MEDIA_3"
-	POL_SetupWindow_cdrom
-	cd $WINEPREFIX/dosdevices
-	ln -sfT $CDROM d:
-	#Ejecting CD-ROM 3
-	POL_SetupWindow_message "$LNG_NEXT_MEDIA"
-	eject d:
-	#CD-ROM 4
-	POL_SetupWindow_message "$LNG_INSERT_MEDIA_4"
-	POL_SetupWindow_cdrom
-	cd $WINEPREFIX/dosdevices
-	ln -sfT $CDROM d:
-	#Ejecting CD-ROM 4
-	POL_SetupWindow_message "$LNG_NEXT_MEDIA"
-	eject d:
-	#CD-ROM 1
-	POL_SetupWindow_message "$LNG_INSERT_MEDIA_1"
-	POL_SetupWindow_cdrom
-	cd $WINEPREFIX/dosdevices
-	ln -sfT $CDROM d:
-	
-	POL_SetupWindow_message "$LNG_WAIT_END" "$TITLE"
-elif [ "$GAME_MEDIAVERSION" == "DVD" ]; then
-	#asking for CDROM and checking if it's correct one
-	POL_SetupWindow_message "$LNG_INSERT_MEDIA"
-	POL_SetupWindow_cdrom
-	POL_SetupWindow_check_cdrom "AutoRun.exe"
-	wine start /unix "$CDROM/AutoRun.exe"
-	POL_SetupWindow_message "$LNG_WAIT_END" "$TITLE"
-else
-	#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
+        #Asking then installing DDV of the game
+        POL_SetupWindow_browse "$(eval_gettext 'Please select the setup file to run.')" "$TITLE"
+        POL_Wine "$APP_ANSWER"
+        POL_Wine_WaitExit "$TITLE"
 fi
  
 #asking about memory size of graphic card
-POL_SetupWindow_menu_list "$LNG_GAME_VMS" "$TITLE" "128-256-320-384-512-640-768-896-1024-1792-2048" "-" "256"
-VMS="$APP_ANSWER"
+POL_SetupWindow_VMS "$GAME_VMS"
  
-cd "$WINEPREFIX/drive_c/windows/temp/"
-echo "[HKEY_CURRENT_USER\\Software\\Wine\\Direct3D]" > vms.reg
-echo "\"VideoMemorySize\"=\"$VMS\"" >> vms.reg
-regedit vms.reg
-if [ "$VMS" -lt "256" ]; then
-	POL_SetupWindow_message "$LNG_VMS_ERROR" "$TITLE"
-fi
-
 ## 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" "speed.exe" "$TITLE" "" ""
-Set_WineVersion_Assign "$WORKING_WINE_VERSION" "$TITLE"
+POL_Shortcut "speed.exe" "$TITLE"
+ 
+POL_SetupWindow_message "$(eval_gettext '$TITLE has been successfully installed.')" "$TITLE"
  
-POL_SetupWindow_message "$LNG_SUCCES" "$TITLE"
 POL_SetupWindow_Close
 exit
\ No newline at end of file

New source code

#!/bin/bash
# Date : (2009-05-23 12-14)
# Last revision : (2016-06-23 23-58)
# Wine version used : 1.3, 1.8.3, 3.0
# Distribution used to test : Debian Squeeze (Testing), Arch Linux, Ubuntu 18.04 x64
# Author : NSWL & GNU_Raziel
# Licence : Retail
 
[ "$PLAYONLINUX" = "" ] && exit 0
source "$PLAYONLINUX/lib/sources"
 
TITLE="Need For Speed Most Wanted"
PREFIX="NFSMW"
WORKING_WINE_VERSION="3.0"
GAME_VMS="32"
 
#starting the script
POL_SetupWindow_Init
POL_Debug_Init
 
POL_SetupWindow_presentation "$TITLE" "EA Games" "N/A" "NSLW & GNU_Raziel" "$PREFIX"
 
#preparing Wine prefix
POL_Wine_SelectPrefix "$PREFIX"
POL_System_SetArch "x86"
POL_Wine_PrefixCreate "$WORKING_WINE_VERSION"
 
#Choose between CD, DVD and Digital Download version
POL_SetupWindow_InstallMethod "CD,DVD,LOCAL"
 
if [ "$INSTALL_METHOD" == "CD" ]; then
        #asking for CDROM and checking if it's correct one
        #CD-ROM 1
        POL_SetupWindow_message "$(eval_gettext 'Please insert the game media into your disk drive.')"
        POL_SetupWindow_cdrom
        POL_SetupWindow_check_cdrom "AutoRun.exe"
        cd "$WINEPREFIX/dosdevices"
        rm "d::"
        ln -s "$CDROM" "d:"
        cd "$CDROM"
        POL_Wine "AutoRun.exe"
        POL_SetupWindow_message "$(eval_gettext 'When the game setup will ask for reboot\nclick on "Yes" then click on "Next".')"
        POL_Wine "AutoRun.exe"
        POL_SetupWindow_message "$(eval_gettext 'When the game setup will ask for next disk\nclick on "Next".')"
        #CD-ROM 2
        POL_SetupWindow_message "$(eval_gettext 'Please insert the game media into your disk drive.')"
        POL_SetupWindow_cdrom
        cd "$WINEPREFIX/dosdevices"
        rm "d:"
        ln -s "$CDROM" "d:"
        POL_SetupWindow_message "$(eval_gettext 'When the game setup will ask for next disk\nclick on "Next".')"
        #CD-ROM 3
        POL_SetupWindow_message "$(eval_gettext 'Please insert the game media into your disk drive.')"
        POL_SetupWindow_cdrom
        rm "d:"
        ln -s "$CDROM" "d:"
        POL_SetupWindow_message "$(eval_gettext 'When the game setup will ask for next disk\nclick on "Next".')"
        #CD-ROM 4
        POL_SetupWindow_message "$(eval_gettext 'Please insert the game media into your disk drive.')"
        POL_SetupWindow_cdrom
        rm "d:"
        ln -s "$CDROM" "d:"
        POL_SetupWindow_message "$(eval_gettext 'When the game setup will ask for next disk\nclick on "Next".')"
        #CD-ROM 1
        POL_SetupWindow_message "$(eval_gettext 'Please insert the game media into your disk drive.')"
        POL_SetupWindow_cdrom
        rm "d:"
        ln -s "$CDROM" "d:"
        POL_SetupWindow_message "$(eval_gettext 'Please wait while $TITLE is installed.')" "$TITLE"
elif [ "$INSTALL_METHOD" == "DVD" ]; then
        #asking for CDROM and checking if it's correct one
        POL_SetupWindow_message "$(eval_gettext 'Please insert the game media into your disk drive.')"
        POL_SetupWindow_cdrom
        POL_SetupWindow_check_cdrom "AutoRun.exe"
        cd "$CDROM"
        POL_Wine "AutoRun.exe"
        POL_Wine_WaitExit "$TITLE"
else
        #Asking then installing DDV of the game
        POL_SetupWindow_browse "$(eval_gettext 'Please select the setup file to run.')" "$TITLE"
        POL_Wine "$APP_ANSWER"
        POL_Wine_WaitExit "$TITLE"
fi
 
#asking about memory size of graphic card
POL_SetupWindow_VMS "$GAME_VMS"
 
## PlayOnMac Section
[ "$PLAYONMAC" == "" ] && Set_SoundDriver "alsa"
[ "$PLAYONMAC" == "" ] || Set_Managed "Off"
## End Section
 
#making shortcut
POL_Shortcut "speed.exe" "$TITLE"
 
POL_SetupWindow_message "$(eval_gettext '$TITLE has been successfully installed.')" "$TITLE"
 
POL_SetupWindow_Close
exit

Replies

Anonymous
Friday 6 July 2018 at 11:42
Hello LinuxScripter. Thanks for your script: it really is the one that gets me furthest. However, during installation , I get blocked at 60%.
Anonymous
Sunday 8 July 2018 at 10:58
Were you using CD's or a single DVD?
Anonymous
Monday 9 July 2018 at 17:20
I ran this script on wine 3.0.2 instead of 3.0
Maybe this was an issue I'm not sure I haven't experienced this before.
Anonymous
Wednesday 11 July 2018 at 20:19
Please run this script with 3.0.2 and let me know if it works.
Wednesday 16 January 2019 at 17:34
I installed with the last approved script, after, I changed the wine version for 3.0 manually and the game is running now. The team needs to approve this new version of the code.
Wednesday 16 January 2019 at 17:43
Did you know the ThirteenAG's fix? It's for widescreen and other improvements. I think it needs some dependencies to work. Do you think you can change your code to make the mod work?
Anonymous
Thursday 17 January 2019 at 9:59
I've never heard about that mod. I guess we can add a part where the script ask user if they want this mod and only then it will install the dependencies.
ZeNity_ Thursday 23 June 2016 at 23:58
ZeNity_

Warning

This update has not been approved yet by the team.
Use it at your own risk

Message

Updated the script.

Changelog:

* Rewrote messages using eval_gettext command

* Replaced deprecated functions by currently supported ones

* Updated Wine version to 1.8.3 (latest stable)

* Removed dependencies as they don't seem required anymore

* Removed /start unix from POL_Wine calls

Differences

@@ -1,182 +1,99 @@
 #!/bin/bash
-# Date : (2009-23-05 12-14)
-# Last revision : (2016-04-01 13-24)
-# Wine version used : 1.3
-# Distribution used to test : Debian Squeeze (Testing)
+# Date : (2009-05-23 12-14)
+# Last revision : (2016-06-23 23-58)
+# Wine version used : 1.3, 1.8.3
+# Distribution used to test : Debian Squeeze (Testing), Arch Linux
 # Author : NSWL & GNU_Raziel
 # Licence : Retail
- 
+
 [ "$PLAYONLINUX" = "" ] && exit 0
 source "$PLAYONLINUX/lib/sources"
- 
+
 TITLE="Need For Speed Most Wanted"
 PREFIX="NFSMW"
-WORKING_WINE_VERSION="1.3.0"
- 
-if [ "$POL_LANG" == "fr" ]; then
-LNG_CHOOSE_MEDIA="Quelle version possédez-vous?"
-LNG_CD="Version CD"
-LNG_DVD="Version DVD"
-LNG_DDV="Version Digital Download"
-LNG_CHOOSE_DDV="Veuillez selectionner votre executable Digital Download"
-LNG_WAIT_REBOOT="Quand l'installateur du jeu demandera de redémarrer cliquez sur \"Oui\"\npuis cliquez sur \"Suivant\"."
-LNG_INSERT_MEDIA_1="Veuillez insérer le disque 1 dans votre lecteur\nsi ce n'est pas déja fait."
-LNG_INSERT_MEDIA_2="Veuillez insérer le disque 2 dans votre lecteur\nsi ce n'est pas déja fait."
-LNG_INSERT_MEDIA_3="Veuillez insérer le disque 3 dans votre lecteur\nsi ce n'est pas déja fait."
-LNG_INSERT_MEDIA_4="Veuillez insérer le disque 4 dans votre lecteur\nsi ce n'est pas déja fait."
-LNG_NEXT_MEDIA="Quand l'installateur du jeu demandera le prochain disque\ncliquez sur \"Suivant\"."
-LNG_INSERT_MEDIA="Veuillez insérer le disque $TITLE dans votre lecteur\nsi ce n'est pas déja fait."
-LNG_WAIT_END="Appuyez sur \"Suivant\" UNIQUEMENT quand l'installation du\njeu sera terminée sous peine de devoir recommencer l'installation."
-LNG_INSTALL_ON="Installation en cours..."
-LNG_GAME_VMS="La taille de votre mémoire graphique?"
-LNG_VMS_ERROR="Ce jeu ne fonctionnera correctement qu'avec une carte graphique ayant plus de 128Mo de mémoire."
-LNG_SUCCES="$TITLE a été installé avec succès."
-else
-LNG_CHOOSE_MEDIA="What version do you have?"
-LNG_CD="CD Version"
-LNG_DVD="DVD Version"
-LNG_DDV="Digital Download Version"
-LNG_CHOOSE_DDV="Please select your $TITLE Digital Download executable"
-LNG_WAIT_REBOOT="When the game setup will ask for reboot click on \"Yes\"\nthen click on \"Next\"."
-LNG_INSERT_MEDIA_1="Please insert disk 1 into your disk drive\nif not already done."
-LNG_INSERT_MEDIA_2="Please insert disk 2 into your disk drive\nif not already done."
-LNG_INSERT_MEDIA_3="Please insert disk 3 into your disk drive\nif not already done."
-LNG_INSERT_MEDIA_4="Please insert disk 4 into your disk drive\nif not already done."
-LNG_NEXT_MEDIA="When the game setup will ask for next disk\nclick on \"Next\"."
-LNG_INSERT_MEDIA="Please insert $TITLE media into your disk drive\nif not already done."
-LNG_WAIT_END="Click on \"Next\" ONLY when the game installation is finished\nor you will have to redo the installation."
-LNG_INSTALL_ON="Installation in progress..."
-LNG_GAME_VMS="How much memory do your graphic card have got?"
-LNG_VMS_ERROR="This game will work correctly only with a graphic card with more than 128Mo of memory."
-LNG_SUCCES="$TITLE has been installed successfully."
-fi
- 
+WORKING_WINE_VERSION="1.8.3"
+GAME_VMS="32"
+
 #starting the script
-rm "$REPERTOIRE/tmp/*.jpg"
 POL_SetupWindow_Init
- 
-POL_SetupWindow_presentation "$TITLE" "EA Games" "N/A" "NSLW & 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
-POL_LoadVar_PROGRAMFILES
- 
-#Choose between CD, DVD and Digital Download version
-POL_SetupWindow_menu "$LNG_CHOOSE_MEDIA" "Actions" "$LNG_CD~$LNG_DVD~$LNG_DDV" "~"
- 
-if [ "$APP_ANSWER" == "$LNG_CD" ]; then
-	GAME_MEDIAVERSION="CD"	
-elif [ "$APP_ANSWER" == "$LNG_DVD" ]; then
-	GAME_MEDIAVERSION="DVD"
-else
-	GAME_MEDIAVERSION="DD"
-fi
+POL_Debug_Init
+
+POL_SetupWindow_presentation "$TITLE" "EA Games" "N/A" "NSLW & GNU_Raziel" "$PREFIX"
 
-#Installing mandatory dependencies 
-POL_Call POL_Install_vcrun2005
-POL_Call POL_Install_d3dx9
+#preparing Wine prefix
+POL_Wine_SelectPrefix "$PREFIX"
+POL_System_SetArch "x86"
+POL_Wine_PrefixCreate "$WORKING_WINE_VERSION"
 
-if [ "$GAME_MEDIAVERSION" == "CD" ]; then
+#Choose between CD, DVD and Digital Download version
+POL_SetupWindow_InstallMethod "CD,DVD,LOCAL"
+
+if [ "$INSTALL_METHOD" == "CD" ]; then
 	#asking for CDROM and checking if it's correct one
 	#CD-ROM 1
-	POL_SetupWindow_message "$LNG_INSERT_MEDIA_1"
+	POL_SetupWindow_message "$(eval_gettext 'Please insert the game media into your disk drive.')"
 	POL_SetupWindow_cdrom
 	POL_SetupWindow_check_cdrom "AutoRun.exe"
-	cd $WINEPREFIX/dosdevices
-	rm d::
-	ls -sfT $CDROM d:
-	wine start /unix "$CDROM/AutoRun.exe"
-	POL_SetupWindow_message "$LNG_WAIT_REBOOT"
-	wine start /unix "$CDROM/AutoRun.exe"
-	#Ejecting CD-ROM 1
-	POL_SetupWindow_message "$LNG_NEXT_MEDIA"
-	wine eject d:
+	cd "$WINEPREFIX/dosdevices"
+	rm "d::"
+	ln -s "$CDROM" "d:"
+	cd "$CDROM"
+	POL_Wine "AutoRun.exe"
+	POL_SetupWindow_message "$(eval_gettext 'When the game setup will ask for reboot\nclick on "Yes" then click on "Next".')"
+	POL_Wine "AutoRun.exe"
+	POL_SetupWindow_message "$(eval_gettext 'When the game setup will ask for next disk\nclick on "Next".')"
 	#CD-ROM 2
-	POL_SetupWindow_message "$LNG_INSERT_MEDIA_2"
+	POL_SetupWindow_message "$(eval_gettext 'Please insert the game media into your disk drive.')"
 	POL_SetupWindow_cdrom
-	cd $WINEPREFIX/dosdevices
-	ln -sfT $CDROM d:
-	#Ejecting CD-ROM 2
-	POL_SetupWindow_message "$LNG_NEXT_MEDIA"
-	wine eject d:
+	cd "$WINEPREFIX/dosdevices"
+	rm "d:"
+	ln -s "$CDROM" "d:"
+	POL_SetupWindow_message "$(eval_gettext 'When the game setup will ask for next disk\nclick on "Next".')"
 	#CD-ROM 3
-	POL_SetupWindow_message "$LNG_INSERT_MEDIA_3"
+	POL_SetupWindow_message "$(eval_gettext 'Please insert the game media into your disk drive.')"
 	POL_SetupWindow_cdrom
-	cd $WINEPREFIX/dosdevices
-	ln -sfT $CDROM d:
-	#Ejecting CD-ROM 3
-	POL_SetupWindow_message "$LNG_NEXT_MEDIA"
-	eject d:
+	rm "d:"
+	ln -s "$CDROM" "d:"
+	POL_SetupWindow_message "$(eval_gettext 'When the game setup will ask for next disk\nclick on "Next".')"
 	#CD-ROM 4
-	POL_SetupWindow_message "$LNG_INSERT_MEDIA_4"
+	POL_SetupWindow_message "$(eval_gettext 'Please insert the game media into your disk drive.')"
 	POL_SetupWindow_cdrom
-	cd $WINEPREFIX/dosdevices
-	ln -sfT $CDROM d:
-	#Ejecting CD-ROM 4
-	POL_SetupWindow_message "$LNG_NEXT_MEDIA"
-	eject d:
+	rm "d:"
+	ln -s "$CDROM" "d:"
+	POL_SetupWindow_message "$(eval_gettext 'When the game setup will ask for next disk\nclick on "Next".')"
 	#CD-ROM 1
-	POL_SetupWindow_message "$LNG_INSERT_MEDIA_1"
+	POL_SetupWindow_message "$(eval_gettext 'Please insert the game media into your disk drive.')"
 	POL_SetupWindow_cdrom
-	cd $WINEPREFIX/dosdevices
-	ln -sfT $CDROM d:
-	
-	POL_SetupWindow_message "$LNG_WAIT_END" "$TITLE"
-elif [ "$GAME_MEDIAVERSION" == "DVD" ]; then
+	rm "d:"
+	ln -s "$CDROM" "d:"
+	POL_SetupWindow_message "$(eval_gettext 'Please wait while $TITLE is installed.')" "$TITLE"
+elif [ "$INSTALL_METHOD" == "DVD" ]; then
 	#asking for CDROM and checking if it's correct one
-	POL_SetupWindow_message "$LNG_INSERT_MEDIA"
+	POL_SetupWindow_message "$(eval_gettext 'Please insert the game media into your disk drive.')"
 	POL_SetupWindow_cdrom
 	POL_SetupWindow_check_cdrom "AutoRun.exe"
-	wine start /unix "$CDROM/AutoRun.exe"
-	POL_SetupWindow_message "$LNG_WAIT_END" "$TITLE"
+	cd "$CDROM"
+	POL_Wine "AutoRun.exe"
+	POL_Wine_WaitExit "$TITLE"
 else
 	#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
+	POL_SetupWindow_browse "$(eval_gettext 'Please select the setup file to run.')" "$TITLE"
+	POL_Wine "$APP_ANSWER"
+	POL_Wine_WaitExit "$TITLE"
 fi
- 
+
 #asking about memory size of graphic card
-POL_SetupWindow_menu_list "$LNG_GAME_VMS" "$TITLE" "128-256-320-384-512-640-768-896-1024-1792-2048" "-" "256"
-VMS="$APP_ANSWER"
- 
-cd "$WINEPREFIX/drive_c/windows/temp/"
-echo "[HKEY_CURRENT_USER\\Software\\Wine\\Direct3D]" > vms.reg
-echo "\"VideoMemorySize\"=\"$VMS\"" >> vms.reg
-regedit vms.reg
-if [ "$VMS" -lt "256" ]; then
-	POL_SetupWindow_message "$LNG_VMS_ERROR" "$TITLE"
-fi
+POL_SetupWindow_VMS "$GAME_VMS"
 
 ## 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" "speed.exe" "$TITLE" "" ""
-Set_WineVersion_Assign "$WORKING_WINE_VERSION" "$TITLE"
- 
-POL_SetupWindow_message "$LNG_SUCCES" "$TITLE"
+POL_Shortcut "speed.exe" "$TITLE"
+
+POL_SetupWindow_message "$(eval_gettext '$TITLE has been successfully installed.')" "$TITLE"
+
 POL_SetupWindow_Close
 exit
\ No newline at end of file

New source code

#!/bin/bash
# Date : (2009-05-23 12-14)
# Last revision : (2016-06-23 23-58)
# Wine version used : 1.3, 1.8.3
# Distribution used to test : Debian Squeeze (Testing), Arch Linux
# Author : NSWL & GNU_Raziel
# Licence : Retail

[ "$PLAYONLINUX" = "" ] && exit 0
source "$PLAYONLINUX/lib/sources"

TITLE="Need For Speed Most Wanted"
PREFIX="NFSMW"
WORKING_WINE_VERSION="1.8.3"
GAME_VMS="32"

#starting the script
POL_SetupWindow_Init
POL_Debug_Init

POL_SetupWindow_presentation "$TITLE" "EA Games" "N/A" "NSLW & GNU_Raziel" "$PREFIX"

#preparing Wine prefix
POL_Wine_SelectPrefix "$PREFIX"
POL_System_SetArch "x86"
POL_Wine_PrefixCreate "$WORKING_WINE_VERSION"

#Choose between CD, DVD and Digital Download version
POL_SetupWindow_InstallMethod "CD,DVD,LOCAL"

if [ "$INSTALL_METHOD" == "CD" ]; then
        #asking for CDROM and checking if it's correct one
        #CD-ROM 1
        POL_SetupWindow_message "$(eval_gettext 'Please insert the game media into your disk drive.')"
        POL_SetupWindow_cdrom
        POL_SetupWindow_check_cdrom "AutoRun.exe"
        cd "$WINEPREFIX/dosdevices"
        rm "d::"
        ln -s "$CDROM" "d:"
        cd "$CDROM"
        POL_Wine "AutoRun.exe"
        POL_SetupWindow_message "$(eval_gettext 'When the game setup will ask for reboot\nclick on "Yes" then click on "Next".')"
        POL_Wine "AutoRun.exe"
        POL_SetupWindow_message "$(eval_gettext 'When the game setup will ask for next disk\nclick on "Next".')"
        #CD-ROM 2
        POL_SetupWindow_message "$(eval_gettext 'Please insert the game media into your disk drive.')"
        POL_SetupWindow_cdrom
        cd "$WINEPREFIX/dosdevices"
        rm "d:"
        ln -s "$CDROM" "d:"
        POL_SetupWindow_message "$(eval_gettext 'When the game setup will ask for next disk\nclick on "Next".')"
        #CD-ROM 3
        POL_SetupWindow_message "$(eval_gettext 'Please insert the game media into your disk drive.')"
        POL_SetupWindow_cdrom
        rm "d:"
        ln -s "$CDROM" "d:"
        POL_SetupWindow_message "$(eval_gettext 'When the game setup will ask for next disk\nclick on "Next".')"
        #CD-ROM 4
        POL_SetupWindow_message "$(eval_gettext 'Please insert the game media into your disk drive.')"
        POL_SetupWindow_cdrom
        rm "d:"
        ln -s "$CDROM" "d:"
        POL_SetupWindow_message "$(eval_gettext 'When the game setup will ask for next disk\nclick on "Next".')"
        #CD-ROM 1
        POL_SetupWindow_message "$(eval_gettext 'Please insert the game media into your disk drive.')"
        POL_SetupWindow_cdrom
        rm "d:"
        ln -s "$CDROM" "d:"
        POL_SetupWindow_message "$(eval_gettext 'Please wait while $TITLE is installed.')" "$TITLE"
elif [ "$INSTALL_METHOD" == "DVD" ]; then
        #asking for CDROM and checking if it's correct one
        POL_SetupWindow_message "$(eval_gettext 'Please insert the game media into your disk drive.')"
        POL_SetupWindow_cdrom
        POL_SetupWindow_check_cdrom "AutoRun.exe"
        cd "$CDROM"
        POL_Wine "AutoRun.exe"
        POL_Wine_WaitExit "$TITLE"
else
        #Asking then installing DDV of the game
        POL_SetupWindow_browse "$(eval_gettext 'Please select the setup file to run.')" "$TITLE"
        POL_Wine "$APP_ANSWER"
        POL_Wine_WaitExit "$TITLE"
fi

#asking about memory size of graphic card
POL_SetupWindow_VMS "$GAME_VMS"

## PlayOnMac Section
[ "$PLAYONMAC" == "" ] && Set_SoundDriver "alsa"
[ "$PLAYONMAC" == "" ] || Set_Managed "Off"
## End Section

#making shortcut
POL_Shortcut "speed.exe" "$TITLE"

POL_SetupWindow_message "$(eval_gettext '$TITLE has been successfully installed.')" "$TITLE"

POL_SetupWindow_Close
exit

Replies

Anonymous
Wednesday 13 December 2017 at 10:26
look like it runs for me, i'm in the Setup :-)
Scindix Monday 14 March 2016 at 4:58
Scindix

Message

When using this script I get the error message "The game cannot be installed, because it requires DirectX 9.0c or higher."
I tried installing direct3d9, directx9 and dxdiag manually. However that didn't change anything. The terminal doesn't contain any useful information.
I tried to install it myself in a seperate prefix and it seems to work flawlessly in a standard, plain wine 1.9.2 prefix. I didn't have to make any special configuration or install any library. So I guess it would be the best to update the script to the newest wine version and removing the installation of vcrun2005/d3dx9 and the Video memory part.

Replies

Wednesday 16 March 2016 at 20:52
Hi, I know this issue, Wine version used in the script is too old. I was waiting for my previous patch to be applied in order to submit another one to fix this.
ZeNity_ Wednesday 6 January 2016 at 15:02
ZeNity_

Warning

This update has not been approved yet by the team.
Use it at your own risk

Message

Removed -fT option from ln command call to provide PlayOnMac compatibility:

  • -T isn't supported on Mac and BSD;
  • -f alone doesn't prevent ln to treat the target as a directory on Linux.

Also made a correction: replaced ls by ln (first occurence).

Differences

@@ -1,6 +1,6 @@
 #!/bin/bash
 # Date : (2009-23-05 12-14)
-# Last revision : (2016-04-01 13-24)
+# Last revision : (2016-06-01 15-02)
 # Wine version used : 1.3
 # Distribution used to test : Debian Squeeze (Testing)
 # Author : NSWL & GNU_Raziel
@@ -89,7 +89,7 @@
 	POL_SetupWindow_check_cdrom "AutoRun.exe"
 	cd $WINEPREFIX/dosdevices
 	rm d::
-	ls -sfT $CDROM d:
+	ln -s $CDROM d:
 	wine start /unix "$CDROM/AutoRun.exe"
 	POL_SetupWindow_message "$LNG_WAIT_REBOOT"
 	wine start /unix "$CDROM/AutoRun.exe"
@@ -100,7 +100,8 @@
 	POL_SetupWindow_message "$LNG_INSERT_MEDIA_2"
 	POL_SetupWindow_cdrom
 	cd $WINEPREFIX/dosdevices
-	ln -sfT $CDROM d:
+	rm d:
+	ln -s $CDROM d:
 	#Ejecting CD-ROM 2
 	POL_SetupWindow_message "$LNG_NEXT_MEDIA"
 	wine eject d:
@@ -108,7 +109,8 @@
 	POL_SetupWindow_message "$LNG_INSERT_MEDIA_3"
 	POL_SetupWindow_cdrom
 	cd $WINEPREFIX/dosdevices
-	ln -sfT $CDROM d:
+	rm d:
+	ln -s $CDROM d:
 	#Ejecting CD-ROM 3
 	POL_SetupWindow_message "$LNG_NEXT_MEDIA"
 	eject d:
@@ -116,7 +118,8 @@
 	POL_SetupWindow_message "$LNG_INSERT_MEDIA_4"
 	POL_SetupWindow_cdrom
 	cd $WINEPREFIX/dosdevices
-	ln -sfT $CDROM d:
+	rm d:
+	ln -s $CDROM d:
 	#Ejecting CD-ROM 4
 	POL_SetupWindow_message "$LNG_NEXT_MEDIA"
 	eject d:
@@ -124,7 +127,8 @@
 	POL_SetupWindow_message "$LNG_INSERT_MEDIA_1"
 	POL_SetupWindow_cdrom
 	cd $WINEPREFIX/dosdevices
-	ln -sfT $CDROM d:
+	rm d:
+	ln -s $CDROM d:
 	
 	POL_SetupWindow_message "$LNG_WAIT_END" "$TITLE"
 elif [ "$GAME_MEDIAVERSION" == "DVD" ]; then

New source code

#!/bin/bash
# Date : (2009-23-05 12-14)
# Last revision : (2016-06-01 15-02)
# Wine version used : 1.3
# Distribution used to test : Debian Squeeze (Testing)
# Author : NSWL & GNU_Raziel
# Licence : Retail
 
[ "$PLAYONLINUX" = "" ] && exit 0
source "$PLAYONLINUX/lib/sources"
 
TITLE="Need For Speed Most Wanted"
PREFIX="NFSMW"
WORKING_WINE_VERSION="1.3.0"
 
if [ "$POL_LANG" == "fr" ]; then
LNG_CHOOSE_MEDIA="Quelle version possédez-vous?"
LNG_CD="Version CD"
LNG_DVD="Version DVD"
LNG_DDV="Version Digital Download"
LNG_CHOOSE_DDV="Veuillez selectionner votre executable Digital Download"
LNG_WAIT_REBOOT="Quand l'installateur du jeu demandera de redémarrer cliquez sur \"Oui\"\npuis cliquez sur \"Suivant\"."
LNG_INSERT_MEDIA_1="Veuillez insérer le disque 1 dans votre lecteur\nsi ce n'est pas déja fait."
LNG_INSERT_MEDIA_2="Veuillez insérer le disque 2 dans votre lecteur\nsi ce n'est pas déja fait."
LNG_INSERT_MEDIA_3="Veuillez insérer le disque 3 dans votre lecteur\nsi ce n'est pas déja fait."
LNG_INSERT_MEDIA_4="Veuillez insérer le disque 4 dans votre lecteur\nsi ce n'est pas déja fait."
LNG_NEXT_MEDIA="Quand l'installateur du jeu demandera le prochain disque\ncliquez sur \"Suivant\"."
LNG_INSERT_MEDIA="Veuillez insérer le disque $TITLE dans votre lecteur\nsi ce n'est pas déja fait."
LNG_WAIT_END="Appuyez sur \"Suivant\" UNIQUEMENT quand l'installation du\njeu sera terminée sous peine de devoir recommencer l'installation."
LNG_INSTALL_ON="Installation en cours..."
LNG_GAME_VMS="La taille de votre mémoire graphique?"
LNG_VMS_ERROR="Ce jeu ne fonctionnera correctement qu'avec une carte graphique ayant plus de 128Mo de mémoire."
LNG_SUCCES="$TITLE a été installé avec succès."
else
LNG_CHOOSE_MEDIA="What version do you have?"
LNG_CD="CD Version"
LNG_DVD="DVD Version"
LNG_DDV="Digital Download Version"
LNG_CHOOSE_DDV="Please select your $TITLE Digital Download executable"
LNG_WAIT_REBOOT="When the game setup will ask for reboot click on \"Yes\"\nthen click on \"Next\"."
LNG_INSERT_MEDIA_1="Please insert disk 1 into your disk drive\nif not already done."
LNG_INSERT_MEDIA_2="Please insert disk 2 into your disk drive\nif not already done."
LNG_INSERT_MEDIA_3="Please insert disk 3 into your disk drive\nif not already done."
LNG_INSERT_MEDIA_4="Please insert disk 4 into your disk drive\nif not already done."
LNG_NEXT_MEDIA="When the game setup will ask for next disk\nclick on \"Next\"."
LNG_INSERT_MEDIA="Please insert $TITLE media into your disk drive\nif not already done."
LNG_WAIT_END="Click on \"Next\" ONLY when the game installation is finished\nor you will have to redo the installation."
LNG_INSTALL_ON="Installation in progress..."
LNG_GAME_VMS="How much memory do your graphic card have got?"
LNG_VMS_ERROR="This game will work correctly only with a graphic card with more than 128Mo of memory."
LNG_SUCCES="$TITLE has been installed successfully."
fi
 
#starting the script
rm "$REPERTOIRE/tmp/*.jpg"
POL_SetupWindow_Init
 
POL_SetupWindow_presentation "$TITLE" "EA Games" "N/A" "NSLW & 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
POL_LoadVar_PROGRAMFILES
 
#Choose between CD, DVD and Digital Download version
POL_SetupWindow_menu "$LNG_CHOOSE_MEDIA" "Actions" "$LNG_CD~$LNG_DVD~$LNG_DDV" "~"
 
if [ "$APP_ANSWER" == "$LNG_CD" ]; then
        GAME_MEDIAVERSION="CD"        
elif [ "$APP_ANSWER" == "$LNG_DVD" ]; then
        GAME_MEDIAVERSION="DVD"
else
        GAME_MEDIAVERSION="DD"
fi

#Installing mandatory dependencies 
POL_Call POL_Install_vcrun2005
POL_Call POL_Install_d3dx9

if [ "$GAME_MEDIAVERSION" == "CD" ]; then
        #asking for CDROM and checking if it's correct one
        #CD-ROM 1
        POL_SetupWindow_message "$LNG_INSERT_MEDIA_1"
        POL_SetupWindow_cdrom
        POL_SetupWindow_check_cdrom "AutoRun.exe"
        cd $WINEPREFIX/dosdevices
        rm d::
        ln -s $CDROM d:
        wine start /unix "$CDROM/AutoRun.exe"
        POL_SetupWindow_message "$LNG_WAIT_REBOOT"
        wine start /unix "$CDROM/AutoRun.exe"
        #Ejecting CD-ROM 1
        POL_SetupWindow_message "$LNG_NEXT_MEDIA"
        wine eject d:
        #CD-ROM 2
        POL_SetupWindow_message "$LNG_INSERT_MEDIA_2"
        POL_SetupWindow_cdrom
        cd $WINEPREFIX/dosdevices
        rm d:
        ln -s $CDROM d:
        #Ejecting CD-ROM 2
        POL_SetupWindow_message "$LNG_NEXT_MEDIA"
        wine eject d:
        #CD-ROM 3
        POL_SetupWindow_message "$LNG_INSERT_MEDIA_3"
        POL_SetupWindow_cdrom
        cd $WINEPREFIX/dosdevices
        rm d:
        ln -s $CDROM d:
        #Ejecting CD-ROM 3
        POL_SetupWindow_message "$LNG_NEXT_MEDIA"
        eject d:
        #CD-ROM 4
        POL_SetupWindow_message "$LNG_INSERT_MEDIA_4"
        POL_SetupWindow_cdrom
        cd $WINEPREFIX/dosdevices
        rm d:
        ln -s $CDROM d:
        #Ejecting CD-ROM 4
        POL_SetupWindow_message "$LNG_NEXT_MEDIA"
        eject d:
        #CD-ROM 1
        POL_SetupWindow_message "$LNG_INSERT_MEDIA_1"
        POL_SetupWindow_cdrom
        cd $WINEPREFIX/dosdevices
        rm d:
        ln -s $CDROM d:
        
        POL_SetupWindow_message "$LNG_WAIT_END" "$TITLE"
elif [ "$GAME_MEDIAVERSION" == "DVD" ]; then
        #asking for CDROM and checking if it's correct one
        POL_SetupWindow_message "$LNG_INSERT_MEDIA"
        POL_SetupWindow_cdrom
        POL_SetupWindow_check_cdrom "AutoRun.exe"
        wine start /unix "$CDROM/AutoRun.exe"
        POL_SetupWindow_message "$LNG_WAIT_END" "$TITLE"
else
        #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
fi
 
#asking about memory size of graphic card
POL_SetupWindow_menu_list "$LNG_GAME_VMS" "$TITLE" "128-256-320-384-512-640-768-896-1024-1792-2048" "-" "256"
VMS="$APP_ANSWER"
 
cd "$WINEPREFIX/drive_c/windows/temp/"
echo "[HKEY_CURRENT_USER\\Software\\Wine\\Direct3D]" > vms.reg
echo "\"VideoMemorySize\"=\"$VMS\"" >> vms.reg
regedit vms.reg
if [ "$VMS" -lt "256" ]; then
        POL_SetupWindow_message "$LNG_VMS_ERROR" "$TITLE"
fi

## 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" "speed.exe" "$TITLE" "" ""
Set_WineVersion_Assign "$WORKING_WINE_VERSION" "$TITLE"
 
POL_SetupWindow_message "$LNG_SUCCES" "$TITLE"
POL_SetupWindow_Close
exit

Replies

ZeNity_ Monday 4 January 2016 at 13:24
ZeNity_

Warning

This update has not been approved yet by the team.
Use it at your own risk

Message

Hi,

I rewrote the CD install section of the script as it didn't seem functional to me.

Differences

@@ -1,6 +1,6 @@
 #!/bin/bash
 # Date : (2009-23-05 12-14)
-# Last revision : (2010-29-11 17-00)
+# Last revision : (2016-04-01 13-24)
 # Wine version used : 1.3
 # Distribution used to test : Debian Squeeze (Testing)
 # Author : NSWL & GNU_Raziel
@@ -19,11 +19,12 @@
 LNG_DVD="Version DVD"
 LNG_DDV="Version Digital Download"
 LNG_CHOOSE_DDV="Veuillez selectionner votre executable Digital Download"
-LNG_WAIT_CP="Patientez pendant la préparation de l'installation..."
+LNG_WAIT_REBOOT="Quand l'installateur du jeu demandera de redémarrer cliquez sur \"Oui\"\npuis cliquez sur \"Suivant\"."
 LNG_INSERT_MEDIA_1="Veuillez insérer le disque 1 dans votre lecteur\nsi ce n'est pas déja fait."
 LNG_INSERT_MEDIA_2="Veuillez insérer le disque 2 dans votre lecteur\nsi ce n'est pas déja fait."
 LNG_INSERT_MEDIA_3="Veuillez insérer le disque 3 dans votre lecteur\nsi ce n'est pas déja fait."
 LNG_INSERT_MEDIA_4="Veuillez insérer le disque 4 dans votre lecteur\nsi ce n'est pas déja fait."
+LNG_NEXT_MEDIA="Quand l'installateur du jeu demandera le prochain disque\ncliquez sur \"Suivant\"."
 LNG_INSERT_MEDIA="Veuillez insérer le disque $TITLE dans votre lecteur\nsi ce n'est pas déja fait."
 LNG_WAIT_END="Appuyez sur \"Suivant\" UNIQUEMENT quand l'installation du\njeu sera terminée sous peine de devoir recommencer l'installation."
 LNG_INSTALL_ON="Installation en cours..."
@@ -36,11 +37,12 @@
 LNG_DVD="DVD Version"
 LNG_DDV="Digital Download Version"
 LNG_CHOOSE_DDV="Please select your $TITLE Digital Download executable"
-LNG_WAIT_CP="Wait while the installation is prepared..."
+LNG_WAIT_REBOOT="When the game setup will ask for reboot click on \"Yes\"\nthen click on \"Next\"."
 LNG_INSERT_MEDIA_1="Please insert disk 1 into your disk drive\nif not already done."
 LNG_INSERT_MEDIA_2="Please insert disk 2 into your disk drive\nif not already done."
 LNG_INSERT_MEDIA_3="Please insert disk 3 into your disk drive\nif not already done."
 LNG_INSERT_MEDIA_4="Please insert disk 4 into your disk drive\nif not already done."
+LNG_NEXT_MEDIA="When the game setup will ask for next disk\nclick on \"Next\"."
 LNG_INSERT_MEDIA="Please insert $TITLE media into your disk drive\nif not already done."
 LNG_WAIT_END="Click on \"Next\" ONLY when the game installation is finished\nor you will have to redo the installation."
 LNG_INSTALL_ON="Installation in progress..."
@@ -80,52 +82,51 @@
 POL_Call POL_Install_d3dx9
 
 if [ "$GAME_MEDIAVERSION" == "CD" ]; then
-	#Copy content of CDs to HDD
-	TEMP="$REPERTOIRE/tmp/$PREFIX"
-	chmod -R 777 $TEMP
-	rm -R $TEMP
-	mkdir -p $TEMP
-	cd $WINEPREFIX/dosdevices
-	ln -s $TEMP d:
 	#asking for CDROM and checking if it's correct one
 	#CD-ROM 1
 	POL_SetupWindow_message "$LNG_INSERT_MEDIA_1"
 	POL_SetupWindow_cdrom
 	POL_SetupWindow_check_cdrom "AutoRun.exe"
-	POL_SetupWindow_wait_next_signal "$LNG_WAIT_CP" "$TITLE"
-	cp -r $CDROM/* $TEMP
-	chmod 777 $TEMP -R
-	mv $TEMP/autorun.inf $TEMP/autorun-cd1.inf
+	cd $WINEPREFIX/dosdevices
+	rm d::
+	ls -sfT $CDROM d:
+	wine start /unix "$CDROM/AutoRun.exe"
+	POL_SetupWindow_message "$LNG_WAIT_REBOOT"
+	wine start /unix "$CDROM/AutoRun.exe"
+	#Ejecting CD-ROM 1
+	POL_SetupWindow_message "$LNG_NEXT_MEDIA"
+	wine eject d:
 	#CD-ROM 2
 	POL_SetupWindow_message "$LNG_INSERT_MEDIA_2"
 	POL_SetupWindow_cdrom
-	POL_SetupWindow_wait_next_signal "$LNG_WAIT_CP" "$TITLE"
-	cp -r $CDROM/* $TEMP
-	chmod 777 $TEMP -R
-	mv $TEMP/autorun.inf $TEMP/autorun-cd2.inf
+	cd $WINEPREFIX/dosdevices
+	ln -sfT $CDROM d:
+	#Ejecting CD-ROM 2
+	POL_SetupWindow_message "$LNG_NEXT_MEDIA"
+	wine eject d:
 	#CD-ROM 3
 	POL_SetupWindow_message "$LNG_INSERT_MEDIA_3"
 	POL_SetupWindow_cdrom
-	POL_SetupWindow_wait_next_signal "$LNG_WAIT_CP" "$TITLE"
-	cp -r $CDROM/* $TEMP
-	chmod 777 $TEMP -R
-	mv $TEMP/autorun.inf $TEMP/autorun-cd3.inf
+	cd $WINEPREFIX/dosdevices
+	ln -sfT $CDROM d:
+	#Ejecting CD-ROM 3
+	POL_SetupWindow_message "$LNG_NEXT_MEDIA"
+	eject d:
 	#CD-ROM 4
 	POL_SetupWindow_message "$LNG_INSERT_MEDIA_4"
 	POL_SetupWindow_cdrom
-	POL_SetupWindow_wait_next_signal "$LNG_WAIT_CP" "$TITLE"
-	cp -r $CDROM/*.cab $TEMP
-	chmod 777 $TEMP -R
-	mv $TEMP/autorun.inf $TEMP/autorun-cd4.inf
-	mv $TEMP/autorun-cd1.inf $TEMP/autorun.inf
+	cd $WINEPREFIX/dosdevices
+	ln -sfT $CDROM d:
+	#Ejecting CD-ROM 4
+	POL_SetupWindow_message "$LNG_NEXT_MEDIA"
+	eject d:
+	#CD-ROM 1
+	POL_SetupWindow_message "$LNG_INSERT_MEDIA_1"
+	POL_SetupWindow_cdrom
+	cd $WINEPREFIX/dosdevices
+	ln -sfT $CDROM d:
 	
-	wine "d:\\AutoRun.exe"
 	POL_SetupWindow_message "$LNG_WAIT_END" "$TITLE"
-	
-	#Relinking d: to $CDROM
-	cd $WINEPREFIX/dosdevices
-	rm ./d:
-	ln -s $CDROM ./d:
 elif [ "$GAME_MEDIAVERSION" == "DVD" ]; then
 	#asking for CDROM and checking if it's correct one
 	POL_SetupWindow_message "$LNG_INSERT_MEDIA"

New source code

#!/bin/bash
# Date : (2009-23-05 12-14)
# Last revision : (2016-04-01 13-24)
# Wine version used : 1.3
# Distribution used to test : Debian Squeeze (Testing)
# Author : NSWL & GNU_Raziel
# Licence : Retail
 
[ "$PLAYONLINUX" = "" ] && exit 0
source "$PLAYONLINUX/lib/sources"
 
TITLE="Need For Speed Most Wanted"
PREFIX="NFSMW"
WORKING_WINE_VERSION="1.3.0"
 
if [ "$POL_LANG" == "fr" ]; then
LNG_CHOOSE_MEDIA="Quelle version possédez-vous?"
LNG_CD="Version CD"
LNG_DVD="Version DVD"
LNG_DDV="Version Digital Download"
LNG_CHOOSE_DDV="Veuillez selectionner votre executable Digital Download"
LNG_WAIT_REBOOT="Quand l'installateur du jeu demandera de redémarrer cliquez sur \"Oui\"\npuis cliquez sur \"Suivant\"."
LNG_INSERT_MEDIA_1="Veuillez insérer le disque 1 dans votre lecteur\nsi ce n'est pas déja fait."
LNG_INSERT_MEDIA_2="Veuillez insérer le disque 2 dans votre lecteur\nsi ce n'est pas déja fait."
LNG_INSERT_MEDIA_3="Veuillez insérer le disque 3 dans votre lecteur\nsi ce n'est pas déja fait."
LNG_INSERT_MEDIA_4="Veuillez insérer le disque 4 dans votre lecteur\nsi ce n'est pas déja fait."
LNG_NEXT_MEDIA="Quand l'installateur du jeu demandera le prochain disque\ncliquez sur \"Suivant\"."
LNG_INSERT_MEDIA="Veuillez insérer le disque $TITLE dans votre lecteur\nsi ce n'est pas déja fait."
LNG_WAIT_END="Appuyez sur \"Suivant\" UNIQUEMENT quand l'installation du\njeu sera terminée sous peine de devoir recommencer l'installation."
LNG_INSTALL_ON="Installation en cours..."
LNG_GAME_VMS="La taille de votre mémoire graphique?"
LNG_VMS_ERROR="Ce jeu ne fonctionnera correctement qu'avec une carte graphique ayant plus de 128Mo de mémoire."
LNG_SUCCES="$TITLE a été installé avec succès."
else
LNG_CHOOSE_MEDIA="What version do you have?"
LNG_CD="CD Version"
LNG_DVD="DVD Version"
LNG_DDV="Digital Download Version"
LNG_CHOOSE_DDV="Please select your $TITLE Digital Download executable"
LNG_WAIT_REBOOT="When the game setup will ask for reboot click on \"Yes\"\nthen click on \"Next\"."
LNG_INSERT_MEDIA_1="Please insert disk 1 into your disk drive\nif not already done."
LNG_INSERT_MEDIA_2="Please insert disk 2 into your disk drive\nif not already done."
LNG_INSERT_MEDIA_3="Please insert disk 3 into your disk drive\nif not already done."
LNG_INSERT_MEDIA_4="Please insert disk 4 into your disk drive\nif not already done."
LNG_NEXT_MEDIA="When the game setup will ask for next disk\nclick on \"Next\"."
LNG_INSERT_MEDIA="Please insert $TITLE media into your disk drive\nif not already done."
LNG_WAIT_END="Click on \"Next\" ONLY when the game installation is finished\nor you will have to redo the installation."
LNG_INSTALL_ON="Installation in progress..."
LNG_GAME_VMS="How much memory do your graphic card have got?"
LNG_VMS_ERROR="This game will work correctly only with a graphic card with more than 128Mo of memory."
LNG_SUCCES="$TITLE has been installed successfully."
fi
 
#starting the script
rm "$REPERTOIRE/tmp/*.jpg"
POL_SetupWindow_Init
 
POL_SetupWindow_presentation "$TITLE" "EA Games" "N/A" "NSLW & 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
POL_LoadVar_PROGRAMFILES
 
#Choose between CD, DVD and Digital Download version
POL_SetupWindow_menu "$LNG_CHOOSE_MEDIA" "Actions" "$LNG_CD~$LNG_DVD~$LNG_DDV" "~"
 
if [ "$APP_ANSWER" == "$LNG_CD" ]; then
        GAME_MEDIAVERSION="CD"        
elif [ "$APP_ANSWER" == "$LNG_DVD" ]; then
        GAME_MEDIAVERSION="DVD"
else
        GAME_MEDIAVERSION="DD"
fi

#Installing mandatory dependencies 
POL_Call POL_Install_vcrun2005
POL_Call POL_Install_d3dx9

if [ "$GAME_MEDIAVERSION" == "CD" ]; then
        #asking for CDROM and checking if it's correct one
        #CD-ROM 1
        POL_SetupWindow_message "$LNG_INSERT_MEDIA_1"
        POL_SetupWindow_cdrom
        POL_SetupWindow_check_cdrom "AutoRun.exe"
        cd $WINEPREFIX/dosdevices
        rm d::
        ls -sfT $CDROM d:
        wine start /unix "$CDROM/AutoRun.exe"
        POL_SetupWindow_message "$LNG_WAIT_REBOOT"
        wine start /unix "$CDROM/AutoRun.exe"
        #Ejecting CD-ROM 1
        POL_SetupWindow_message "$LNG_NEXT_MEDIA"
        wine eject d:
        #CD-ROM 2
        POL_SetupWindow_message "$LNG_INSERT_MEDIA_2"
        POL_SetupWindow_cdrom
        cd $WINEPREFIX/dosdevices
        ln -sfT $CDROM d:
        #Ejecting CD-ROM 2
        POL_SetupWindow_message "$LNG_NEXT_MEDIA"
        wine eject d:
        #CD-ROM 3
        POL_SetupWindow_message "$LNG_INSERT_MEDIA_3"
        POL_SetupWindow_cdrom
        cd $WINEPREFIX/dosdevices
        ln -sfT $CDROM d:
        #Ejecting CD-ROM 3
        POL_SetupWindow_message "$LNG_NEXT_MEDIA"
        eject d:
        #CD-ROM 4
        POL_SetupWindow_message "$LNG_INSERT_MEDIA_4"
        POL_SetupWindow_cdrom
        cd $WINEPREFIX/dosdevices
        ln -sfT $CDROM d:
        #Ejecting CD-ROM 4
        POL_SetupWindow_message "$LNG_NEXT_MEDIA"
        eject d:
        #CD-ROM 1
        POL_SetupWindow_message "$LNG_INSERT_MEDIA_1"
        POL_SetupWindow_cdrom
        cd $WINEPREFIX/dosdevices
        ln -sfT $CDROM d:
        
        POL_SetupWindow_message "$LNG_WAIT_END" "$TITLE"
elif [ "$GAME_MEDIAVERSION" == "DVD" ]; then
        #asking for CDROM and checking if it's correct one
        POL_SetupWindow_message "$LNG_INSERT_MEDIA"
        POL_SetupWindow_cdrom
        POL_SetupWindow_check_cdrom "AutoRun.exe"
        wine start /unix "$CDROM/AutoRun.exe"
        POL_SetupWindow_message "$LNG_WAIT_END" "$TITLE"
else
        #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
fi
 
#asking about memory size of graphic card
POL_SetupWindow_menu_list "$LNG_GAME_VMS" "$TITLE" "128-256-320-384-512-640-768-896-1024-1792-2048" "-" "256"
VMS="$APP_ANSWER"
 
cd "$WINEPREFIX/drive_c/windows/temp/"
echo "[HKEY_CURRENT_USER\\Software\\Wine\\Direct3D]" > vms.reg
echo "\"VideoMemorySize\"=\"$VMS\"" >> vms.reg
regedit vms.reg
if [ "$VMS" -lt "256" ]; then
        POL_SetupWindow_message "$LNG_VMS_ERROR" "$TITLE"
fi

## 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" "speed.exe" "$TITLE" "" ""
Set_WineVersion_Assign "$WORKING_WINE_VERSION" "$TITLE"
 
POL_SetupWindow_message "$LNG_SUCCES" "$TITLE"
POL_SetupWindow_Close
exit

Replies

Monday 4 January 2016 at 20:28
Oops, something I just checked, BSD's ln doesn't support -T, so this breaks PlayOnMac compatibility...
Tuesday 5 January 2016 at 22:52
Oh, I can post a new patch to fix that soon (atfer my exams).
MasterGamer2001 Wednesday 8 October 2014 at 18:10
MasterGamer2001 Anonymous

Message

it keeps saying warning PlayOnMac Wizard the i click next then agree and it still wont work

Replies

Wednesday 8 October 2014 at 21:06
Please post up the debug output and your full computer specs in the forums or here (the forums are usually a better choice for visibility), otherwise we can only guess.