Call of Duty 4: Modern Warfare

Informations

Créateur Messages
NSLW

Information

Cet installateur a été accepté par l'équipe.

Informations

Plate-formes :
Téléchargements : 114082
Wine: 3.0.3

Retours d'expérience

Description

FPS, 2007. Wikipedia.

2010 comments :

- use latest 1.7 game patch.
- disable "depth of field" and "soften smoke edges" in game as they don't work.
- don't install DirectX 9.0c if prompted.
- game doesn't work with original iw3sp.exe (NoCD required).

Code source

#!/bin/bash
# Date : (2009-05-23 12-14)
# Last revision : (2015-05-27 07-07)
# Wine version used : 1.6.2
# Author : NSLW
# updated: petch
# Licence : Retail
#
# CHANGELOG
# [NSLW] (2009-05-23 12-14)
#   Initial script.
# [Dadu042] (2020-01-29 11:30)
#   Wine 1.6.2 -> 3.0.3.
#   Improve POL_Shortcut
#   Standardize POL_Function_NoCDWarning

[ "$PLAYONLINUX" = "" ] && exit 0
source "$PLAYONLINUX/lib/sources"
 
TITLE="Call of Duty 4: Modern Warfare"
PREFIX="COD4"
 
# procedure for patching cod4
patch_cod4()
{
    cd "$HOME"
    POL_SetupWindow_browse "$(eval_gettext 'Select patch file downloaded from www.infinityward.com')" "$TITLE" ""
    POL_Wine_WaitBefore "$TITLE"
    POL_Wine "$APP_ANSWER"
    POL_SetupWindow_message "$(eval_gettext 'Patch for $TITLE has been installed successfully')" "$TITLE"
}
 
POL_SetupWindow_Init
POL_Debug_Init
 
POL_SetupWindow_presentation "$TITLE" "infinityward" "www.infinityward.com" "NSLW" "$PREFIX"
 
if [ -e "$POL_USER_ROOT/configurations/installed/$TITLE" ]; then
    POL_SetupWindow_menu "$(eval_gettext 'What do you want to do?')" "$(eval_gettext 'Actions')" "$(eval_gettext 'Patch game')" "~"
 
    if [ "$APP_ANSWER" == "$(eval_gettext 'Patch game')" ]; then
        patch_cod4
    fi
 
    POL_SetupWindow_Close
    exit 0
fi

POL_Call POL_Function_NoCDWarning

POL_SetupWindow_message "$(eval_gettext 'Please insert $TITLE media into your disk drive.')"
POL_SetupWindow_cdrom
POL_SetupWindow_check_cdrom "setup.exe"
 
POL_Wine_SelectPrefix "$PREFIX"
POL_Wine_PrefixCreate "3.0.3"
 
#starting installation
POL_Wine_WaitBefore "$TITLE"
cd "$CDROM"
POL_Wine "setup.exe"
POL_Wine_WaitExit "$TITLE"
 
POL_Wine_Direct3D "Multisampling" "enabled"
POL_SetupWindow_VMS
 
cd  "$WINEPREFIX/drive_c/windows/temp/"
convert "$CDROM/Setup/rsrc/cod4.ico" -geometry 32X32 "cod4.png"
cp "cod4-1.png" "$POL_USER_ROOT/icones/32/$TITLE Singleplayer"
cp "cod4-1.png" "$POL_USER_ROOT/icones/32/$TITLE Multiplayer"
 
#making shortcut
POL_Shortcut "iw3sp.exe" "$TITLE Singleplayer" "" "" "Game;"
POL_Shortcut "iw3mp.exe" "$TITLE Multiplayer" "" "" "Game;"
 
#asking about patching
POL_SetupWindow_question "$(eval_gettext 'Do you want to patch your game?')" "$TITLE"
if [ "$APP_ANSWER" == "TRUE" ]; then
    patch_cod4
fi

POL_SetupWindow_Close
exit 0

Contributions

Filters:

Contribuer
Membre Messages
Dadu042 Mercredi 29 Janvier 2020 à 11:05
Dadu042

Information

Cette mise à jour a été acceptée par l'équipe

Differences

@@ -5,14 +5,22 @@
 # Author : NSLW
 # updated: petch
 # Licence : Retail
- 
+#
+# CHANGELOG
+# [NSLW] (2009-05-23 12-14)
+#   Initial script.
+# [Dadu042] (2020-01-29 11:30)
+#   Wine 1.6.2 -> 3.0.3.
+#   Improve POL_Shortcut
+#   Standardize POL_Function_NoCDWarning
+
 [ "$PLAYONLINUX" = "" ] && exit 0
 source "$PLAYONLINUX/lib/sources"
  
 TITLE="Call of Duty 4: Modern Warfare"
 PREFIX="COD4"
  
-#procedure for patching cod4
+# procedure for patching cod4
 patch_cod4()
 {
     cd "$HOME"
@@ -37,16 +45,15 @@
     POL_SetupWindow_Close
     exit 0
 fi
- 
+
+POL_Call POL_Function_NoCDWarning
+
 POL_SetupWindow_message "$(eval_gettext 'Please insert $TITLE media into your disk drive.')"
 POL_SetupWindow_cdrom
 POL_SetupWindow_check_cdrom "setup.exe"
  
-LATESTVERSION="1.6.2"
-CHOSENWINEVERSION="$LATESTVERSION"
- 
 POL_Wine_SelectPrefix "$PREFIX"
-POL_Wine_PrefixCreate "$CHOSENWINEVERSION"
+POL_Wine_PrefixCreate "3.0.3"
  
 #starting installation
 POL_Wine_WaitBefore "$TITLE"
@@ -63,16 +70,14 @@
 cp "cod4-1.png" "$POL_USER_ROOT/icones/32/$TITLE Multiplayer"
  
 #making shortcut
-POL_Shortcut "iw3sp.exe" "$TITLE Singleplayer"
-POL_Shortcut "iw3mp.exe" "$TITLE Multiplayer"
+POL_Shortcut "iw3sp.exe" "$TITLE Singleplayer" "" "" "Game;"
+POL_Shortcut "iw3mp.exe" "$TITLE Multiplayer" "" "" "Game;"
  
 #asking about patching
 POL_SetupWindow_question "$(eval_gettext 'Do you want to patch your game?')" "$TITLE"
 if [ "$APP_ANSWER" == "TRUE" ]; then
     patch_cod4
 fi
- 
-POL_SetupWindow_message "$(eval_gettext 'Please note that this game has a copy protection system\nand sadly, it prevents Wine from running the game.\n\nPlayOnLinux will not provide any help concerning any illegal\nstuff.')" "Note about copy protection"
- 
+
 POL_SetupWindow_Close
 exit 0
\ No newline at end of file

Nouveau code source

#!/bin/bash
# Date : (2009-05-23 12-14)
# Last revision : (2015-05-27 07-07)
# Wine version used : 1.6.2
# Author : NSLW
# updated: petch
# Licence : Retail
#
# CHANGELOG
# [NSLW] (2009-05-23 12-14)
#   Initial script.
# [Dadu042] (2020-01-29 11:30)
#   Wine 1.6.2 -> 3.0.3.
#   Improve POL_Shortcut
#   Standardize POL_Function_NoCDWarning

[ "$PLAYONLINUX" = "" ] && exit 0
source "$PLAYONLINUX/lib/sources"
 
TITLE="Call of Duty 4: Modern Warfare"
PREFIX="COD4"
 
# procedure for patching cod4
patch_cod4()
{
    cd "$HOME"
    POL_SetupWindow_browse "$(eval_gettext 'Select patch file downloaded from www.infinityward.com')" "$TITLE" ""
    POL_Wine_WaitBefore "$TITLE"
    POL_Wine "$APP_ANSWER"
    POL_SetupWindow_message "$(eval_gettext 'Patch for $TITLE has been installed successfully')" "$TITLE"
}
 
POL_SetupWindow_Init
POL_Debug_Init
 
POL_SetupWindow_presentation "$TITLE" "infinityward" "www.infinityward.com" "NSLW" "$PREFIX"
 
if [ -e "$POL_USER_ROOT/configurations/installed/$TITLE" ]; then
    POL_SetupWindow_menu "$(eval_gettext 'What do you want to do?')" "$(eval_gettext 'Actions')" "$(eval_gettext 'Patch game')" "~"
 
    if [ "$APP_ANSWER" == "$(eval_gettext 'Patch game')" ]; then
        patch_cod4
    fi
 
    POL_SetupWindow_Close
    exit 0
fi

POL_Call POL_Function_NoCDWarning

POL_SetupWindow_message "$(eval_gettext 'Please insert $TITLE media into your disk drive.')"
POL_SetupWindow_cdrom
POL_SetupWindow_check_cdrom "setup.exe"
 
POL_Wine_SelectPrefix "$PREFIX"
POL_Wine_PrefixCreate "3.0.3"
 
#starting installation
POL_Wine_WaitBefore "$TITLE"
cd "$CDROM"
POL_Wine "setup.exe"
POL_Wine_WaitExit "$TITLE"
 
POL_Wine_Direct3D "Multisampling" "enabled"
POL_SetupWindow_VMS
 
cd  "$WINEPREFIX/drive_c/windows/temp/"
convert "$CDROM/Setup/rsrc/cod4.ico" -geometry 32X32 "cod4.png"
cp "cod4-1.png" "$POL_USER_ROOT/icones/32/$TITLE Singleplayer"
cp "cod4-1.png" "$POL_USER_ROOT/icones/32/$TITLE Multiplayer"
 
#making shortcut
POL_Shortcut "iw3sp.exe" "$TITLE Singleplayer" "" "" "Game;"
POL_Shortcut "iw3mp.exe" "$TITLE Multiplayer" "" "" "Game;"
 
#asking about patching
POL_SetupWindow_question "$(eval_gettext 'Do you want to patch your game?')" "$TITLE"
if [ "$APP_ANSWER" == "TRUE" ]; then
    patch_cod4
fi

POL_SetupWindow_Close
exit 0

Réponses

vidocq Mardi 22 Décembre 2015 à 20:43
vidocq Anonymous

Messages

COD4MW runs perfectly with Wine 1.7.55 under Debian 8

Réponses

petch Mercredi 27 Mai 2015 à 7:08
petch

Warning

Cette mise à jour n'a pas été approuvée par l'équipe.
Utilisez-la à vos risques et périls

Messages

Remove full path from shortcut creations

Differences

@@ -1,125 +1,78 @@
 #!/bin/bash
 # Date : (2009-05-23 12-14)
-# Last revision : (2009-11-16 09-00)
-# Wine version used : 1.1.21
-# Distribution used to test : Fedora 10
+# Last revision : (2015-05-27 07-07)
+# Wine version used : 1.6.2
 # Author : NSLW
+# updated: petch
 # Licence : Retail
-
+ 
 [ "$PLAYONLINUX" = "" ] && exit 0
 source "$PLAYONLINUX/lib/sources"
-
-TYTUL="Call of Duty 4: Modern Warfare"
+ 
+TITLE="Call of Duty 4: Modern Warfare"
 PREFIX="COD4"
-
-Get_Latest_Wine_Version()
-{
-cd "$REPERTOIRE/tmp"
-POL_SetupWindow_download "Downloading Wine versions list" "$TYTUL" "http://mulx.playonlinux.com/wine/linux-i386/LIST"
-xyz=`cat "$REPERTOIRE/tmp/LIST" | sed -e 's/\.//g' | cut -d';' -f2 | sort -n | tail -n1`
-echo "$(echo $xyz | cut -c1-1).$(echo $xyz | cut -c2-2).$(echo $xyz | cut -c3-4)"
-}
-
+ 
 #procedure for patching cod4
 patch_cod4()
 {
-POL_SetupWindow_browse "Select patch file downloaded from www.infinityward.com" "$TYTUL" ""
-wine "$APP_ANSWER"
-POL_SetupWindow_message "Patch for $TYTUL has been installed successfully" "$TYTUL"
+    cd "$HOME"
+    POL_SetupWindow_browse "$(eval_gettext 'Select patch file downloaded from www.infinityward.com')" "$TITLE" ""
+    POL_Wine_WaitBefore "$TITLE"
+    POL_Wine "$APP_ANSWER"
+    POL_SetupWindow_message "$(eval_gettext 'Patch for $TITLE has been installed successfully')" "$TITLE"
 }
-
+ 
 POL_SetupWindow_Init
-POL_SetupWindow_presentation "$TYTUL" "infinityward" "www.infinityward.com" "NSLW" "$PREFIX" 
-
-select_prefix "$REPERTOIRE/wineprefix/$PREFIX"
-
-#asking about patching or updating Wine version
-if [ -e "$REPERTOIRE/configurations/installed/$TYTUL" ]; then
-POL_SetupWindow_menu "What do you want to do?" "Actions" "Patch game" "~"
-
-if [ "$APP_ANSWER" == "Patch game" ]; then
-	patch_cod4
-fi
-
-POL_SetupWindow_Close
-exit
+POL_Debug_Init
+ 
+POL_SetupWindow_presentation "$TITLE" "infinityward" "www.infinityward.com" "NSLW" "$PREFIX"
+ 
+if [ -e "$POL_USER_ROOT/configurations/installed/$TITLE" ]; then
+    POL_SetupWindow_menu "$(eval_gettext 'What do you want to do?')" "$(eval_gettext 'Actions')" "$(eval_gettext 'Patch game')" "~"
+ 
+    if [ "$APP_ANSWER" == "$(eval_gettext 'Patch game')" ]; then
+        patch_cod4
+    fi
+ 
+    POL_SetupWindow_Close
+    exit 0
 fi
-
-POL_SetupWindow_message "Please insert $TYTUL media into your disk drive."
+ 
+POL_SetupWindow_message "$(eval_gettext 'Please insert $TITLE media into your disk drive.')"
 POL_SetupWindow_cdrom
 POL_SetupWindow_check_cdrom "setup.exe"
-
-LATESTVERSION=$(Get_Latest_Wine_Version)
+ 
+LATESTVERSION="1.6.2"
 CHOSENWINEVERSION="$LATESTVERSION"
-POL_SetupWindow_install_wine "$CHOSENWINEVERSION"
-Use_WineVersion "$CHOSENWINEVERSION"
-
-POL_SetupWindow_prefixcreate
-#fetching PROGRAMFILES environmental variable
-#PROGRAMFILES=`wine cmd /c echo "%ProgramFiles%" |tr -d '\015' | tr -d '\010'`
-#PROGRAMFILES=${PROGRAMFILES:3}
-
-PROGRAMFILES="Program Files"
-POL_LoadVar_PROGRAMFILES
-
-#adding CD-ROM as drive e: to winecfg
-cd "$WINEPREFIX/dosdevices"
-ln -s "$CDROM" e:
-
-cd "$WINEPREFIX/drive_c/windows/temp/"
-echo "[HKEY_LOCAL_MACHINE\\Software\\Wine\\Drives]" > cdrom.reg
-echo "\"e:\"=\"cdrom\"" >> cdrom.reg
-regedit cdrom.reg
-
-sleep 5
-
+ 
+POL_Wine_SelectPrefix "$PREFIX"
+POL_Wine_PrefixCreate "$CHOSENWINEVERSION"
+ 
 #starting installation
-POL_SetupWindow_wait_next_signal "Installation in progress..." "$TYTUL"
+POL_Wine_WaitBefore "$TITLE"
 cd "$CDROM"
-wine "setup.exe"
-POL_SetupWindow_detect_exit
-
-cd "$WINEPREFIX/drive_c/windows/temp/"
-#setting Multisampling to enabled
-echo "[HKEY_CURRENT_USER\\Software\\Wine\\Direct3D]" > multisampling.reg
-echo "\"Multisampling\"=\"enabled\"" >> multisampling.reg
-regedit multisampling.reg
-
-#asking about memory size
-POL_SetupWindow_menu_list "How much memory do your graphic card have got?" "$TYTUL" "32-64-128-256-384-512-768-890-1024-2048" "-" "256"
-VMS="$APP_ANSWER"
- 
-echo "[HKEY_CURRENT_USER\\Software\\Wine\\Direct3D]" > vms.reg
-echo "\"VideoMemorySize\"=\"$VMS\"" >> vms.reg
-regedit vms.reg
-
+POL_Wine "setup.exe"
+POL_Wine_WaitExit "$TITLE"
+ 
+POL_Wine_Direct3D "Multisampling" "enabled"
+POL_SetupWindow_VMS
+ 
 cd  "$WINEPREFIX/drive_c/windows/temp/"
 convert "$CDROM/Setup/rsrc/cod4.ico" -geometry 32X32 "cod4.png"
-cp "cod4-1.png" "$REPERTOIRE/icones/32/$TYTUL Singleplayer"
-cp "cod4-1.png" "$REPERTOIRE/icones/32/$TYTUL Multiplayer"
-
-#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
-
+cp "cod4-1.png" "$POL_USER_ROOT/icones/32/$TITLE Singleplayer"
+cp "cod4-1.png" "$POL_USER_ROOT/icones/32/$TITLE Multiplayer"
+ 
 #making shortcut
-POL_SetupWindow_make_shortcut "$PREFIX" "$PROGRAMFILES/Activision/Call of Duty 4 - Modern Warfare" "iw3sp.exe" "" "$TYTUL Singleplayer" "" ""
-POL_SetupWindow_make_shortcut "$PREFIX" "$PROGRAMFILES/Activision/Call of Duty 4 - Modern Warfare" "iw3mp.exe" "" "$TYTUL Multiplayer" "" ""
-Set_WineVersion_Assign "$CHOSENWINEVERSION" "$TYTUL Singleplayer"
-Set_WineVersion_Assign "$CHOSENWINEVERSION" "$TYTUL Multiplayer"
-
-POL_SetupWindow_message "$TYTUL has been installed successfully" "$TYTUL"
-
+POL_Shortcut "iw3sp.exe" "$TITLE Singleplayer"
+POL_Shortcut "iw3mp.exe" "$TITLE Multiplayer"
+ 
 #asking about patching
-POL_SetupWindow_question "Do you want to patch your game?" "$TYTUL"
-if [ "$APP_ANSWER" == "TRUE" ] ;then
-patch_cod4
+POL_SetupWindow_question "$(eval_gettext 'Do you want to patch your game?')" "$TITLE"
+if [ "$APP_ANSWER" == "TRUE" ]; then
+    patch_cod4
 fi
-
-POL_SetupWindow_message_image "Please note that this game has a copy protection system\nand sadly, it prevents Wine from running the game.\n\nPlayOnLinux will not provide any help concerning any illegal\nstuff." "Note about copy protection" "$PLAYONLINUX/themes/tango/warning.png"
-
+ 
+POL_SetupWindow_message "$(eval_gettext 'Please note that this game has a copy protection system\nand sadly, it prevents Wine from running the game.\n\nPlayOnLinux will not provide any help concerning any illegal\nstuff.')" "Note about copy protection"
+ 
 POL_SetupWindow_Close
-exit
\ No newline at end of file
+exit 0
\ No newline at end of file

Nouveau code source

#!/bin/bash
# Date : (2009-05-23 12-14)
# Last revision : (2015-05-27 07-07)
# Wine version used : 1.6.2
# Author : NSLW
# updated: petch
# Licence : Retail
 
[ "$PLAYONLINUX" = "" ] && exit 0
source "$PLAYONLINUX/lib/sources"
 
TITLE="Call of Duty 4: Modern Warfare"
PREFIX="COD4"
 
#procedure for patching cod4
patch_cod4()
{
    cd "$HOME"
    POL_SetupWindow_browse "$(eval_gettext 'Select patch file downloaded from www.infinityward.com')" "$TITLE" ""
    POL_Wine_WaitBefore "$TITLE"
    POL_Wine "$APP_ANSWER"
    POL_SetupWindow_message "$(eval_gettext 'Patch for $TITLE has been installed successfully')" "$TITLE"
}
 
POL_SetupWindow_Init
POL_Debug_Init
 
POL_SetupWindow_presentation "$TITLE" "infinityward" "www.infinityward.com" "NSLW" "$PREFIX"
 
if [ -e "$POL_USER_ROOT/configurations/installed/$TITLE" ]; then
    POL_SetupWindow_menu "$(eval_gettext 'What do you want to do?')" "$(eval_gettext 'Actions')" "$(eval_gettext 'Patch game')" "~"
 
    if [ "$APP_ANSWER" == "$(eval_gettext 'Patch game')" ]; then
        patch_cod4
    fi
 
    POL_SetupWindow_Close
    exit 0
fi
 
POL_SetupWindow_message "$(eval_gettext 'Please insert $TITLE media into your disk drive.')"
POL_SetupWindow_cdrom
POL_SetupWindow_check_cdrom "setup.exe"
 
LATESTVERSION="1.6.2"
CHOSENWINEVERSION="$LATESTVERSION"
 
POL_Wine_SelectPrefix "$PREFIX"
POL_Wine_PrefixCreate "$CHOSENWINEVERSION"
 
#starting installation
POL_Wine_WaitBefore "$TITLE"
cd "$CDROM"
POL_Wine "setup.exe"
POL_Wine_WaitExit "$TITLE"
 
POL_Wine_Direct3D "Multisampling" "enabled"
POL_SetupWindow_VMS
 
cd  "$WINEPREFIX/drive_c/windows/temp/"
convert "$CDROM/Setup/rsrc/cod4.ico" -geometry 32X32 "cod4.png"
cp "cod4-1.png" "$POL_USER_ROOT/icones/32/$TITLE Singleplayer"
cp "cod4-1.png" "$POL_USER_ROOT/icones/32/$TITLE Multiplayer"
 
#making shortcut
POL_Shortcut "iw3sp.exe" "$TITLE Singleplayer"
POL_Shortcut "iw3mp.exe" "$TITLE Multiplayer"
 
#asking about patching
POL_SetupWindow_question "$(eval_gettext 'Do you want to patch your game?')" "$TITLE"
if [ "$APP_ANSWER" == "TRUE" ]; then
    patch_cod4
fi
 
POL_SetupWindow_message "$(eval_gettext 'Please note that this game has a copy protection system\nand sadly, it prevents Wine from running the game.\n\nPlayOnLinux will not provide any help concerning any illegal\nstuff.')" "Note about copy protection"
 
POL_SetupWindow_Close
exit 0

Réponses

Vendredi 3 Janvier 2020 à 0:27
Script approved.
petch Dimanche 24 Mai 2015 à 18:14
petch

Warning

Cette mise à jour n'a pas été approuvée par l'équipe.
Utilisez-la à vos risques et périls

Messages

Attempt at updating the script, untested

Differences

@@ -1,125 +1,78 @@
 #!/bin/bash
 # Date : (2009-05-23 12-14)
-# Last revision : (2009-11-16 09-00)
-# Wine version used : 1.1.21
-# Distribution used to test : Fedora 10
+# Last revision : (2015-05-24 18-13)
+# Wine version used : 1.6.2
 # Author : NSLW
+# updated: petch
 # Licence : Retail
 
 [ "$PLAYONLINUX" = "" ] && exit 0
 source "$PLAYONLINUX/lib/sources"
 
-TYTUL="Call of Duty 4: Modern Warfare"
+TITLE="Call of Duty 4: Modern Warfare"
 PREFIX="COD4"
 
-Get_Latest_Wine_Version()
-{
-cd "$REPERTOIRE/tmp"
-POL_SetupWindow_download "Downloading Wine versions list" "$TYTUL" "http://mulx.playonlinux.com/wine/linux-i386/LIST"
-xyz=`cat "$REPERTOIRE/tmp/LIST" | sed -e 's/\.//g' | cut -d';' -f2 | sort -n | tail -n1`
-echo "$(echo $xyz | cut -c1-1).$(echo $xyz | cut -c2-2).$(echo $xyz | cut -c3-4)"
-}
-
 #procedure for patching cod4
 patch_cod4()
 {
-POL_SetupWindow_browse "Select patch file downloaded from www.infinityward.com" "$TYTUL" ""
-wine "$APP_ANSWER"
-POL_SetupWindow_message "Patch for $TYTUL has been installed successfully" "$TYTUL"
+    cd "$HOME"
+    POL_SetupWindow_browse "$(eval_gettext 'Select patch file downloaded from www.infinityward.com')" "$TITLE" ""
+    POL_Wine_WaitBefore "$TITLE"
+    POL_Wine "$APP_ANSWER"
+    POL_SetupWindow_message "$(eval_gettext 'Patch for $TITLE has been installed successfully')" "$TITLE"
 }
 
 POL_SetupWindow_Init
-POL_SetupWindow_presentation "$TYTUL" "infinityward" "www.infinityward.com" "NSLW" "$PREFIX" 
+POL_Debug_Init
 
-select_prefix "$REPERTOIRE/wineprefix/$PREFIX"
+POL_SetupWindow_presentation "$TITLE" "infinityward" "www.infinityward.com" "NSLW" "$PREFIX"
 
-#asking about patching or updating Wine version
-if [ -e "$REPERTOIRE/configurations/installed/$TYTUL" ]; then
-POL_SetupWindow_menu "What do you want to do?" "Actions" "Patch game" "~"
+if [ -e "$POL_USER_ROOT/configurations/installed/$TITLE" ]; then
+    POL_SetupWindow_menu "$(eval_gettext 'What do you want to do?')" "$(eval_gettext 'Actions')" "$(eval_gettext 'Patch game')" "~"
 
-if [ "$APP_ANSWER" == "Patch game" ]; then
-	patch_cod4
-fi
+    if [ "$APP_ANSWER" == "$(eval_gettext 'Patch game')" ]; then
+        patch_cod4
+    fi
 
-POL_SetupWindow_Close
-exit
+    POL_SetupWindow_Close
+    exit
 fi
 
-POL_SetupWindow_message "Please insert $TYTUL media into your disk drive."
+POL_SetupWindow_message "$(eval_gettext 'Please insert $TITLE media into your disk drive.')"
 POL_SetupWindow_cdrom
 POL_SetupWindow_check_cdrom "setup.exe"
 
-LATESTVERSION=$(Get_Latest_Wine_Version)
+LATESTVERSION="1.6.2"
 CHOSENWINEVERSION="$LATESTVERSION"
-POL_SetupWindow_install_wine "$CHOSENWINEVERSION"
-Use_WineVersion "$CHOSENWINEVERSION"
 
-POL_SetupWindow_prefixcreate
-#fetching PROGRAMFILES environmental variable
-#PROGRAMFILES=`wine cmd /c echo "%ProgramFiles%" |tr -d '\015' | tr -d '\010'`
-#PROGRAMFILES=${PROGRAMFILES:3}
-
-PROGRAMFILES="Program Files"
-POL_LoadVar_PROGRAMFILES
-
-#adding CD-ROM as drive e: to winecfg
-cd "$WINEPREFIX/dosdevices"
-ln -s "$CDROM" e:
-
-cd "$WINEPREFIX/drive_c/windows/temp/"
-echo "[HKEY_LOCAL_MACHINE\\Software\\Wine\\Drives]" > cdrom.reg
-echo "\"e:\"=\"cdrom\"" >> cdrom.reg
-regedit cdrom.reg
-
-sleep 5
+POL_Wine_SelectPrefix "$PREFIX"
+POL_Wine_PrefixCreate "$CHOSENWINEVERSION"
 
 #starting installation
-POL_SetupWindow_wait_next_signal "Installation in progress..." "$TYTUL"
+POL_Wine_WaitBefore "$TITLE"
 cd "$CDROM"
-wine "setup.exe"
-POL_SetupWindow_detect_exit
+POL_Wine "setup.exe"
+POL_Wine_WaitExit "$TITLE"
 
-cd "$WINEPREFIX/drive_c/windows/temp/"
-#setting Multisampling to enabled
-echo "[HKEY_CURRENT_USER\\Software\\Wine\\Direct3D]" > multisampling.reg
-echo "\"Multisampling\"=\"enabled\"" >> multisampling.reg
-regedit multisampling.reg
-
-#asking about memory size
-POL_SetupWindow_menu_list "How much memory do your graphic card have got?" "$TYTUL" "32-64-128-256-384-512-768-890-1024-2048" "-" "256"
-VMS="$APP_ANSWER"
- 
-echo "[HKEY_CURRENT_USER\\Software\\Wine\\Direct3D]" > vms.reg
-echo "\"VideoMemorySize\"=\"$VMS\"" >> vms.reg
-regedit vms.reg
+POL_Wine_Direct3D "Multisampling" "enabled"
+POL_SetupWindow_VMS
 
 cd  "$WINEPREFIX/drive_c/windows/temp/"
 convert "$CDROM/Setup/rsrc/cod4.ico" -geometry 32X32 "cod4.png"
-cp "cod4-1.png" "$REPERTOIRE/icones/32/$TYTUL Singleplayer"
-cp "cod4-1.png" "$REPERTOIRE/icones/32/$TYTUL Multiplayer"
-
-#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
+cp "cod4-1.png" "$POL_USER_ROOT/icones/32/$TITLE Singleplayer"
+cp "cod4-1.png" "$POL_USER_ROOT/icones/32/$TITLE Multiplayer"
 
 #making shortcut
-POL_SetupWindow_make_shortcut "$PREFIX" "$PROGRAMFILES/Activision/Call of Duty 4 - Modern Warfare" "iw3sp.exe" "" "$TYTUL Singleplayer" "" ""
-POL_SetupWindow_make_shortcut "$PREFIX" "$PROGRAMFILES/Activision/Call of Duty 4 - Modern Warfare" "iw3mp.exe" "" "$TYTUL Multiplayer" "" ""
-Set_WineVersion_Assign "$CHOSENWINEVERSION" "$TYTUL Singleplayer"
-Set_WineVersion_Assign "$CHOSENWINEVERSION" "$TYTUL Multiplayer"
-
-POL_SetupWindow_message "$TYTUL has been installed successfully" "$TYTUL"
+POL_Shortcut "$PROGRAMFILES/Activision/Call of Duty 4 - Modern Warfare/iw3sp.exe" "$TITLE Singleplayer"
+POL_Shortcut "$PROGRAMFILES/Activision/Call of Duty 4 - Modern Warfare/iw3mp.exe" "$TITLE Multiplayer"
 
 #asking about patching
-POL_SetupWindow_question "Do you want to patch your game?" "$TYTUL"
+POL_SetupWindow_question "$(eval_gettext 'Do you want to patch your game?')" "$TITLE"
 if [ "$APP_ANSWER" == "TRUE" ] ;then
-patch_cod4
+    patch_cod4
 fi
 
-POL_SetupWindow_message_image "Please note that this game has a copy protection system\nand sadly, it prevents Wine from running the game.\n\nPlayOnLinux will not provide any help concerning any illegal\nstuff." "Note about copy protection" "$PLAYONLINUX/themes/tango/warning.png"
+POL_SetupWindow_message "$(eval_gettext 'Please note that this game has a copy protection system\nand sadly, it prevents Wine from running the game.\n\nPlayOnLinux will not provide any help concerning any illegal\nstuff.')" "Note about copy protection"
 
 POL_SetupWindow_Close
-exit
\ No newline at end of file
+exit

Nouveau code source

#!/bin/bash
# Date : (2009-05-23 12-14)
# Last revision : (2015-05-24 18-13)
# Wine version used : 1.6.2
# Author : NSLW
# updated: petch
# Licence : Retail

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

TITLE="Call of Duty 4: Modern Warfare"
PREFIX="COD4"

#procedure for patching cod4
patch_cod4()
{
    cd "$HOME"
    POL_SetupWindow_browse "$(eval_gettext 'Select patch file downloaded from www.infinityward.com')" "$TITLE" ""
    POL_Wine_WaitBefore "$TITLE"
    POL_Wine "$APP_ANSWER"
    POL_SetupWindow_message "$(eval_gettext 'Patch for $TITLE has been installed successfully')" "$TITLE"
}

POL_SetupWindow_Init
POL_Debug_Init

POL_SetupWindow_presentation "$TITLE" "infinityward" "www.infinityward.com" "NSLW" "$PREFIX"

if [ -e "$POL_USER_ROOT/configurations/installed/$TITLE" ]; then
    POL_SetupWindow_menu "$(eval_gettext 'What do you want to do?')" "$(eval_gettext 'Actions')" "$(eval_gettext 'Patch game')" "~"

    if [ "$APP_ANSWER" == "$(eval_gettext 'Patch game')" ]; then
        patch_cod4
    fi

    POL_SetupWindow_Close
    exit
fi

POL_SetupWindow_message "$(eval_gettext 'Please insert $TITLE media into your disk drive.')"
POL_SetupWindow_cdrom
POL_SetupWindow_check_cdrom "setup.exe"

LATESTVERSION="1.6.2"
CHOSENWINEVERSION="$LATESTVERSION"

POL_Wine_SelectPrefix "$PREFIX"
POL_Wine_PrefixCreate "$CHOSENWINEVERSION"

#starting installation
POL_Wine_WaitBefore "$TITLE"
cd "$CDROM"
POL_Wine "setup.exe"
POL_Wine_WaitExit "$TITLE"

POL_Wine_Direct3D "Multisampling" "enabled"
POL_SetupWindow_VMS

cd  "$WINEPREFIX/drive_c/windows/temp/"
convert "$CDROM/Setup/rsrc/cod4.ico" -geometry 32X32 "cod4.png"
cp "cod4-1.png" "$POL_USER_ROOT/icones/32/$TITLE Singleplayer"
cp "cod4-1.png" "$POL_USER_ROOT/icones/32/$TITLE Multiplayer"

#making shortcut
POL_Shortcut "$PROGRAMFILES/Activision/Call of Duty 4 - Modern Warfare/iw3sp.exe" "$TITLE Singleplayer"
POL_Shortcut "$PROGRAMFILES/Activision/Call of Duty 4 - Modern Warfare/iw3mp.exe" "$TITLE Multiplayer"

#asking about patching
POL_SetupWindow_question "$(eval_gettext 'Do you want to patch your game?')" "$TITLE"
if [ "$APP_ANSWER" == "TRUE" ] ;then
    patch_cod4
fi

POL_SetupWindow_message "$(eval_gettext 'Please note that this game has a copy protection system\nand sadly, it prevents Wine from running the game.\n\nPlayOnLinux will not provide any help concerning any illegal\nstuff.')" "Note about copy protection"

POL_SetupWindow_Close
exit

Réponses

Anonymous
Mardi 26 Mai 2015 à 23:35
The code don't work, it has a few errors in it, and then it works. Put a 0 after exit.
Anonymous
Mardi 26 Mai 2015 à 23:39
And "TRUE" ]; then not "t4
Anonymous
Mardi 26 Mai 2015 à 23:39
Not "TRUE" ;then
Anonymous
Mardi 26 Mai 2015 à 23:40
Then it installs just fine, may have to configure to install your shortcut from pol
Anonymous
Mardi 26 Mai 2015 à 23:54
Inside of pol click configure, and click make link, because it did not make a link for me, thank you
Anonymous
Mercredi 27 Mai 2015 à 0:03
sorry there is two exits with typos. Just add 0 to both. exit 0
Anonymous
Mercredi 27 Mai 2015 à 2:38

#!/bin/bash
# Date : (2009-05-23 12-14)
# Last revision : (2015-05-24 18-13)
# Wine version used : 1.6.2
# Author : NSLW
# updated: petch
# Licence : Retail

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

TITLE="Call of Duty 4: Modern Warfare"
PREFIX="COD4"

#procedure for patching cod4
patch_cod4()
{
cd "$HOME"
POL_SetupWindow_browse "$(eval_gettext 'Select patch file downloaded from www.infinityward.com')" "$TITLE" ""
POL_Wine_WaitBefore "$TITLE"
POL_Wine "$APP_ANSWER"
POL_SetupWindow_message "$(eval_gettext 'Patch for $TITLE has been installed successfully')" "$TITLE"
}

POL_SetupWindow_Init
POL_Debug_Init

POL_SetupWindow_presentation "$TITLE" "infinityward" "www.infinityward.com" "NSLW" "$PREFIX"

if [ -e "$POL_USER_ROOT/configurations/installed/$TITLE" ]; then
POL_SetupWindow_menu "$(eval_gettext 'What do you want to do?')" "$(eval_gettext 'Actions')" "$(eval_gettext 'Patch game')" "~"

if [ "$APP_ANSWER" == "$(eval_gettext 'Patch game')" ]; then
patch_cod4
fi

POL_SetupWindow_Close
exit 0
fi

POL_SetupWindow_message "$(eval_gettext 'Please insert $TITLE media into your disk drive.')"
POL_SetupWindow_cdrom
POL_SetupWindow_check_cdrom "setup.exe"

LATESTVERSION="1.6.2"
CHOSENWINEVERSION="$LATESTVERSION"

POL_Wine_SelectPrefix "$PREFIX"
POL_Wine_PrefixCreate "$CHOSENWINEVERSION"

#starting installation
POL_Wine_WaitBefore "$TITLE"
cd "$CDROM"
POL_Wine "setup.exe"
POL_Wine_WaitExit "$TITLE"

POL_Wine_Direct3D "Multisampling" "enabled"
POL_SetupWindow_VMS

cd "$WINEPREFIX/drive_c/windows/temp/"
convert "$CDROM/Setup/rsrc/cod4.ico" -geometry 32X32 "cod4.png"
cp "cod4-1.png" "$POL_USER_ROOT/icones/32/$TITLE Singleplayer"
cp "cod4-1.png" "$POL_USER_ROOT/icones/32/$TITLE Multiplayer"

#making shortcut
POL_Shortcut "$PROGRAMFILES/Activision/Call of Duty 4 - Modern Warfare/iw3sp.exe" "$TITLE Singleplayer"
POL_Shortcut "$PROGRAMFILES/Activision/Call of Duty 4 - Modern Warfare/iw3mp.exe" "$TITLE Multiplayer"

#asking about patching
POL_SetupWindow_question "$(eval_gettext 'Do you want to patch your game?')" "$TITLE"
if [ "$APP_ANSWER" == "TRUE" ]; then
patch_cod4
fi

POL_SetupWindow_message "$(eval_gettext 'Please note that this game has a copy protection system\nand sadly, it prevents Wine from running the game.\n\nPlayOnLinux will not provide any help concerning any illegal\nstuff.')" "Note about copy protection"

POL_SetupWindow_Close
exit 0

Edité par petch

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 dmca-notice@playonlinux.com