Far Cry 2

Informations

Créateur Messages
GNU_Raziel

Information

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

Informations

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

Retours d'expérience

Description

FPS, 2008.  Wikipedia

This script can install the game from: DVD, Steam, Local file (full game and the demo).

Known issue : visual rendering is bad (background is in single color: blue), makes it very hard to play. Fix: in the game settings, do reduce the 'Shadow quality' and 'Lighting quality' to 'Low'.

Appdb.winehq.orgPCGamingWiki.

Captures d'écran

Miniature

Code source

#!/bin/bash
# Date : (see changelog)
# Last revision : (see changelog)
# Wine version used : 1.2, 1.3.9, 1.3.23, 1.4
# Distribution used to test : Debian Testing x64
# Author : GNU_Raziel
# Licence : Retail
# Only For : http://www.playonlinux.com
#
# CHANGELOG
# [GNU_Raziel] (2010-02-09 12-00)
#   Initial writting.
# [GNU_Raziel] (2012-05-09 19:55)
#   Updates.
# [Dadu042] (2019-05-15 22-40)
#   Upgrade Wine 1.4 to 2.22 (after having read appdb.winehq.org). Move 'NoCD warning'.
# [Dadu042] (2020-04-06 14-00)
#   Wine 2.22 -> 3.0.3 (because I have the 'little window issue', OS Kubuntu 18.04 amd64).
#   Add code to support the demo.

 
[ "$PLAYONLINUX" = "" ] && exit 0
source "$PLAYONLINUX/lib/sources"
  
TITLE="Far Cry 2"
PREFIX="FarCry2"
EDITOR="Ubisoft"
GAME_URL="http://www.farcrygame.com/"
AUTHOR="GNU_Raziel"
WORKING_WINE_VERSION="3.0.3"
GAME_VMS="256"
  
# Starting the script
POL_GetSetupImages "http://files.playonlinux.com/resources/setups/top.jpg" "http://files.playonlinux.com/resources/setups/FarCry2/left.jpg" "$TITLE"
POL_SetupWindow_Init
  
# Starting debugging API
POL_Debug_Init
  
POL_SetupWindow_presentation "$TTILE" "$EDITOR" "$GAME_URL" "$AUTHOR" "$PREFIX"
 
# Game protection warning
POL_Call POL_Function_NoCDWarning
 
# Setting prefix path
POL_Wine_SelectPrefix "$PREFIX"
  
# Downloading wine if necessary and creating prefix
POL_System_SetArch "auto"
POL_Wine_PrefixCreate "$WORKING_WINE_VERSION"
  
# Choose between DVD and Digital Download version
POL_SetupWindow_InstallMethod "DVD,STEAM,LOCAL"
  
#Installing mandatory dependencies
if [ "$INSTALL_METHOD" == "STEAM" ]; then
        POL_Call POL_Install_steam
        STEAM_ID="19900"
fi
POL_Call POL_Install_dxfullsetup
POL_Call POL_Install_gdiplus
  
# Asking about memory size of graphic card
POL_SetupWindow_VMS $GAME_VMS
  
## Fix for this game
POL_Wine_Direct3D "OffscreenRenderingMode" "pbuffer"
  
# Sound problem fix - pulseaudio related
[ "$POL_OS" = "Linux" ] && Set_SoundDriver "alsa"
[ "$POL_OS" = "Linux" ] && Set_SoundEmulDriver "Y"
## End Fix
   
# Starting installation
if [ "$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 "setup.exe"
        POL_Wine start /unix "$CDROM/setup.exe"
        POL_Wine_WaitExit "$TITLE"
elif [ "$INSTALL_METHOD" == "STEAM" ]; 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"
        # 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"
fi
  
# Making Shortcut
if [ "$INSTALL_METHOD" != "STEAM" ]; then
            
        POL_SetupWindow_menu "$(eval_gettext 'Are you installing the full game or the demo ?')" "$TITLE" "$(eval_gettext 'Full game')~$(eval_gettext 'Demo')" "~"      
         
        if [ "$APP_ANSWER" == "$(eval_gettext 'Full game')" ]; then
            POL_Shortcut "FC2Launcher.exe" "$TITLE" "$TITLE.png" "" "Game;"
        else
            POL_Shortcut "FarCry.exe" "$TITLE" "$TITLE.png" "" "Game;"
        fi
fi
  
## BEGIN Configurator
if [ ! -e "$POL_USER_ROOT/configurations/configurators/" ]; then
    mkdir -p "$POL_USER_ROOT/configurations/configurators/"
fi
   
cat << EOF1 > "$POL_USER_ROOT/configurations/configurators/Far Cry 2"
#!/bin/bash
  
[ "\$PLAYONLINUX" = "" ] && exit 0
source "\$PLAYONLINUX/lib/sources"
   
TITLE="Far Cry 2"
PREFIX="FarCry2"
   
POL_SetupWindow_checkexist()
{        
        if [ ! -e \$POL_USER_ROOT/wineprefix/\$1 ]; then
                POL_SetupWindow_message "\$(eval_gettext 'Game is not installed')" "\$TITLE"
                exit 0
        fi
}
   
POL_SetupWindow_Init
POL_SetupWindow_checkexist "\$PREFIX"
   
POL_SetupWindow_message "\$(eval_gettext 'Welcome in \$TITLE configuration utils')" "\$TITLE"
   
POL_SetupWindow_message "\$(eval_gettext 'This utils only change game resolution.\nAll other settings will be set to default')" "\$TITLE"
   
GEOMETRY_SETTING="high"
   
POL_SetupWindow_menu_list "\$(eval_gettext 'Choose the game resolution you want')" "\$TITLE" "720x480-800x600-1024x768-1280x720-1280x768-1440x900" "-" "1024x768"
SELECTED_RES="\$APP_ANSWER"
   
if [ "\$SELECTED_RES" == "720x480" ];then
        ResX="720"
        ResY="480"
elif [ "\$SELECTED_RES" == "800x600" ];then
        ResX="800"
        ResY="600"
elif [ "\$SELECTED_RES" == "1024x768" ];then
        ResX="1024"
        ResY="768"
elif [ "\$SELECTED_RES" == "1280x720" ];then
        ResX="1280"
        ResY="720"
elif [ "\$SELECTED_RES" == "1280x768" ];then
        ResX="1280"
        ResY="768"
elif [ "\$SELECTED_RES" == "1440x900" ];then
        ResX="1440"
        ResY="900"
else
        ResX="1024"
        ResY="768"
fi
   
if [ ! -e "\$HOME/My Games/Far Cry 2/GamerProfile.xml" ]; then
        mkdir -p "\$HOME/My Games/Far Cry 2/"
else
        rm "\$HOME/My Games/Far Cry 2/GamerProfile.xml"
fi
   
cat << EOF2 > "\$HOME/My Games/Far Cry 2/GamerProfile.xml"
<GamerProfile>
        <SoundProfile MusicEnabled="1" MasterVolume="100" />
        <RenderProfile MultiSampleMode="0" AlphaToCoverage="0" ResolutionX="\$ResX" ResolutionY="\$ResY" Quality="custom" Fullscreen="1" Maximized="0" ForceWidescreen="0" AspectRatio="0" VSync="0" RefreshRate="60" DisableMip0Loading="0" MaxDriverBufferedFrames="0" Platform="d3d9" ShowFPS="0" ClustersZPassMaxLOD="1" Brightness="1" Contrast="1" GammaRamp="1" GammaRampR="1" GammaRampG="1" GammaRampB="1" AllowAsynchShaderLoading="1">
                <CustomQuality>
                        <quality ResolutionX="\$ResX" ResolutionY="\$ResY" EnvironmentQuality="low" AntiPortalQuality="high" PostFxQuality="low" TextureQuality="low" TextureResolutionQuality="low" WaterQuality="low" DepthPassQuality="high" VegetationQuality="low" TerrainQuality="low" GeometryQuality="\$GEOMETRY_SETTING" AmbientQuality="low" ShadowQuality="off" Hdr="0" HdrFP32="0" Bloom="0" id="custom" />
                        <quality ResolutionX="\$ResX" ResolutionY="\$ResY" EnvironmentQuality="high" AntiPortalQuality="high" PostFxQuality="high" TextureQuality="high" TextureResolutionQuality="high" WaterQuality="high" DepthPassQuality="high" VegetationQuality="high" TerrainQuality="high" GeometryQuality="\$GEOMETRY_SETTING" AmbientQuality="high" ShadowQuality="high" Hdr="1" HdrFP32="1" Bloom="1" id="customd3d10" />
                </CustomQuality>
        </RenderProfile>
        <NetworkProfile CustomMapMaxUploadRateOnline="10240" OnlineEnginePort="9000" OnlineServicePort="9001" FileTransferHostPort="9002" FileTransferClientPort="9003" LanBroadcastPort="9004" ScanFreePorts="1" ScanPortRange="1000" ScanPortStart="9000" SessionProvider="" DetectPublicAddress="1" MaxUploadOnline="768">
                <Accounts />
        </NetworkProfile>
        <GameProfile Sensitivity="1" Invert_y="0" UseMouseSmooth="0" Smoothness="0" Smoothness_Ironsight="1" HelpCrosshair="1" UseCompassMiniMap="1" UseRoadSignHilight="1" UseSubtitles="1" UseAmbx="0" Autosave="1" Machete="0" DifficultyLevel="1">
                <FireConfig QualitySetting="Low" />
        </GameProfile>
        <RealTreeProfile Quality="Low">
                <CustomQuality />
        </RealTreeProfile>
        <EngineProfile>
                <PhysicConfig QualitySetting="Low" />
                <QcConfig GatherFPS="1" GatherAICnt="1" IsQcTester="0" />
                <InputConfig />
        </EngineProfile>
</GamerProfile>
EOF2
   
POL_SetupWindow_Close
exit 0
EOF1
## End Configurator
  
POL_SetupWindow_Close
exit 0

Contributions

Filters:

Contribuer
Membre Messages
Dadu042 Lundi 6 Avril 2020 à 15:58
Dadu042

Information

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

Messages

Demo now supported (to download by yourself. File name is : farcryresearchdemo.zip ).

Differences

@@ -8,46 +8,50 @@
 # Only For : http://www.playonlinux.com
 #
 # CHANGELOG
-# [Dadu042] (2019-05-15 22-40)
-#   Upgrade Wine 1.4 to 2.22 (after having read appdb.winehq.org). Move 'NoCD warning'.
-# [GNU_Raziel] (2012-05-09 19:55)
-#   Updates.
 # [GNU_Raziel] (2010-02-09 12-00)
 #   Initial writting.
+# [GNU_Raziel] (2012-05-09 19:55)
+#   Updates.
+# [Dadu042] (2019-05-15 22-40)
+#   Upgrade Wine 1.4 to 2.22 (after having read appdb.winehq.org). Move 'NoCD warning'.
+# [Dadu042] (2020-04-06 14-00)
+#   Wine 2.22 -> 3.0.3 (because I have the 'little window issue', OS Kubuntu 18.04 amd64).
+#   Add code to support the demo.
 
+ 
 [ "$PLAYONLINUX" = "" ] && exit 0
 source "$PLAYONLINUX/lib/sources"
- 
+  
 TITLE="Far Cry 2"
 PREFIX="FarCry2"
 EDITOR="Ubisoft"
 GAME_URL="http://www.farcrygame.com/"
 AUTHOR="GNU_Raziel"
-WORKING_WINE_VERSION="2.22"
+WORKING_WINE_VERSION="3.0.3"
 GAME_VMS="256"
- 
+  
 # Starting the script
 POL_GetSetupImages "http://files.playonlinux.com/resources/setups/top.jpg" "http://files.playonlinux.com/resources/setups/FarCry2/left.jpg" "$TITLE"
 POL_SetupWindow_Init
- 
+  
 # Starting debugging API
 POL_Debug_Init
- 
+  
 POL_SetupWindow_presentation "$TTILE" "$EDITOR" "$GAME_URL" "$AUTHOR" "$PREFIX"
-
+ 
 # Game protection warning
 POL_Call POL_Function_NoCDWarning
-
+ 
 # Setting prefix path
 POL_Wine_SelectPrefix "$PREFIX"
- 
+  
 # Downloading wine if necessary and creating prefix
 POL_System_SetArch "auto"
 POL_Wine_PrefixCreate "$WORKING_WINE_VERSION"
- 
+  
 # Choose between DVD and Digital Download version
 POL_SetupWindow_InstallMethod "DVD,STEAM,LOCAL"
- 
+  
 #Installing mandatory dependencies
 if [ "$INSTALL_METHOD" == "STEAM" ]; then
         POL_Call POL_Install_steam
@@ -55,18 +59,18 @@
 fi
 POL_Call POL_Install_dxfullsetup
 POL_Call POL_Install_gdiplus
- 
+  
 # Asking about memory size of graphic card
 POL_SetupWindow_VMS $GAME_VMS
- 
+  
 ## Fix for this game
 POL_Wine_Direct3D "OffscreenRenderingMode" "pbuffer"
- 
+  
 # Sound problem fix - pulseaudio related
 [ "$POL_OS" = "Linux" ] && Set_SoundDriver "alsa"
 [ "$POL_OS" = "Linux" ] && Set_SoundEmulDriver "Y"
 ## End Fix
-  
+   
 # Starting installation
 if [ "$INSTALL_METHOD" == "DVD" ]; then
         # Asking for CDROM and checking if it's correct one
@@ -74,7 +78,7 @@
         POL_SetupWindow_cdrom
         POL_SetupWindow_check_cdrom "setup.exe"
         POL_Wine start /unix "$CDROM/setup.exe"
-POL_Wine_WaitExit "$TITLE"
+        POL_Wine_WaitExit "$TITLE"
 elif [ "$INSTALL_METHOD" == "STEAM" ]; then
         # Mandatory pre-install fix for steam
         POL_Call POL_Install_steam_flags "$STEAM_ID"
@@ -93,26 +97,33 @@
         POL_Wine start /unix "$SETUP_EXE"
         POL_Wine_WaitExit "$TITLE"
 fi
- 
+  
 # Making Shortcut
 if [ "$INSTALL_METHOD" != "STEAM" ]; then
-        POL_Shortcut "FC2Launcher.exe" "$TITLE" "$TITLE.png" ""
+            
+        POL_SetupWindow_menu "$(eval_gettext 'Are you installing the full game or the demo ?')" "$TITLE" "$(eval_gettext 'Full game')~$(eval_gettext 'Demo')" "~"      
+         
+        if [ "$APP_ANSWER" == "$(eval_gettext 'Full game')" ]; then
+            POL_Shortcut "FC2Launcher.exe" "$TITLE" "$TITLE.png" "" "Game;"
+        else
+            POL_Shortcut "FarCry.exe" "$TITLE" "$TITLE.png" "" "Game;"
+        fi
 fi
- 
+  
 ## BEGIN Configurator
 if [ ! -e "$POL_USER_ROOT/configurations/configurators/" ]; then
-mkdir -p "$POL_USER_ROOT/configurations/configurators/"
+    mkdir -p "$POL_USER_ROOT/configurations/configurators/"
 fi
-  
+   
 cat << EOF1 > "$POL_USER_ROOT/configurations/configurators/Far Cry 2"
 #!/bin/bash
- 
+  
 [ "\$PLAYONLINUX" = "" ] && exit 0
 source "\$PLAYONLINUX/lib/sources"
-  
+   
 TITLE="Far Cry 2"
 PREFIX="FarCry2"
-  
+   
 POL_SetupWindow_checkexist()
 {        
         if [ ! -e \$POL_USER_ROOT/wineprefix/\$1 ]; then
@@ -120,19 +131,19 @@
                 exit 0
         fi
 }
-  
+   
 POL_SetupWindow_Init
 POL_SetupWindow_checkexist "\$PREFIX"
-  
+   
 POL_SetupWindow_message "\$(eval_gettext 'Welcome in \$TITLE configuration utils')" "\$TITLE"
-  
+   
 POL_SetupWindow_message "\$(eval_gettext 'This utils only change game resolution.\nAll other settings will be set to default')" "\$TITLE"
-  
+   
 GEOMETRY_SETTING="high"
-  
+   
 POL_SetupWindow_menu_list "\$(eval_gettext 'Choose the game resolution you want')" "\$TITLE" "720x480-800x600-1024x768-1280x720-1280x768-1440x900" "-" "1024x768"
 SELECTED_RES="\$APP_ANSWER"
-  
+   
 if [ "\$SELECTED_RES" == "720x480" ];then
         ResX="720"
         ResY="480"
@@ -155,13 +166,13 @@
         ResX="1024"
         ResY="768"
 fi
-  
+   
 if [ ! -e "\$HOME/My Games/Far Cry 2/GamerProfile.xml" ]; then
         mkdir -p "\$HOME/My Games/Far Cry 2/"
 else
         rm "\$HOME/My Games/Far Cry 2/GamerProfile.xml"
 fi
-  
+   
 cat << EOF2 > "\$HOME/My Games/Far Cry 2/GamerProfile.xml"
 <GamerProfile>
         <SoundProfile MusicEnabled="1" MasterVolume="100" />
@@ -187,11 +198,11 @@
         </EngineProfile>
 </GamerProfile>
 EOF2
-  
+   
 POL_SetupWindow_Close
 exit 0
 EOF1
 ## End Configurator
- 
+  
 POL_SetupWindow_Close
-exit 0
\ No newline at end of file
+exit 0

Nouveau code source

#!/bin/bash
# Date : (see changelog)
# Last revision : (see changelog)
# Wine version used : 1.2, 1.3.9, 1.3.23, 1.4
# Distribution used to test : Debian Testing x64
# Author : GNU_Raziel
# Licence : Retail
# Only For : http://www.playonlinux.com
#
# CHANGELOG
# [GNU_Raziel] (2010-02-09 12-00)
#   Initial writting.
# [GNU_Raziel] (2012-05-09 19:55)
#   Updates.
# [Dadu042] (2019-05-15 22-40)
#   Upgrade Wine 1.4 to 2.22 (after having read appdb.winehq.org). Move 'NoCD warning'.
# [Dadu042] (2020-04-06 14-00)
#   Wine 2.22 -> 3.0.3 (because I have the 'little window issue', OS Kubuntu 18.04 amd64).
#   Add code to support the demo.

 
[ "$PLAYONLINUX" = "" ] && exit 0
source "$PLAYONLINUX/lib/sources"
  
TITLE="Far Cry 2"
PREFIX="FarCry2"
EDITOR="Ubisoft"
GAME_URL="http://www.farcrygame.com/"
AUTHOR="GNU_Raziel"
WORKING_WINE_VERSION="3.0.3"
GAME_VMS="256"
  
# Starting the script
POL_GetSetupImages "http://files.playonlinux.com/resources/setups/top.jpg" "http://files.playonlinux.com/resources/setups/FarCry2/left.jpg" "$TITLE"
POL_SetupWindow_Init
  
# Starting debugging API
POL_Debug_Init
  
POL_SetupWindow_presentation "$TTILE" "$EDITOR" "$GAME_URL" "$AUTHOR" "$PREFIX"
 
# Game protection warning
POL_Call POL_Function_NoCDWarning
 
# Setting prefix path
POL_Wine_SelectPrefix "$PREFIX"
  
# Downloading wine if necessary and creating prefix
POL_System_SetArch "auto"
POL_Wine_PrefixCreate "$WORKING_WINE_VERSION"
  
# Choose between DVD and Digital Download version
POL_SetupWindow_InstallMethod "DVD,STEAM,LOCAL"
  
#Installing mandatory dependencies
if [ "$INSTALL_METHOD" == "STEAM" ]; then
        POL_Call POL_Install_steam
        STEAM_ID="19900"
fi
POL_Call POL_Install_dxfullsetup
POL_Call POL_Install_gdiplus
  
# Asking about memory size of graphic card
POL_SetupWindow_VMS $GAME_VMS
  
## Fix for this game
POL_Wine_Direct3D "OffscreenRenderingMode" "pbuffer"
  
# Sound problem fix - pulseaudio related
[ "$POL_OS" = "Linux" ] && Set_SoundDriver "alsa"
[ "$POL_OS" = "Linux" ] && Set_SoundEmulDriver "Y"
## End Fix
   
# Starting installation
if [ "$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 "setup.exe"
        POL_Wine start /unix "$CDROM/setup.exe"
        POL_Wine_WaitExit "$TITLE"
elif [ "$INSTALL_METHOD" == "STEAM" ]; 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"
        # 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"
fi
  
# Making Shortcut
if [ "$INSTALL_METHOD" != "STEAM" ]; then
            
        POL_SetupWindow_menu "$(eval_gettext 'Are you installing the full game or the demo ?')" "$TITLE" "$(eval_gettext 'Full game')~$(eval_gettext 'Demo')" "~"      
         
        if [ "$APP_ANSWER" == "$(eval_gettext 'Full game')" ]; then
            POL_Shortcut "FC2Launcher.exe" "$TITLE" "$TITLE.png" "" "Game;"
        else
            POL_Shortcut "FarCry.exe" "$TITLE" "$TITLE.png" "" "Game;"
        fi
fi
  
## BEGIN Configurator
if [ ! -e "$POL_USER_ROOT/configurations/configurators/" ]; then
    mkdir -p "$POL_USER_ROOT/configurations/configurators/"
fi
   
cat << EOF1 > "$POL_USER_ROOT/configurations/configurators/Far Cry 2"
#!/bin/bash
  
[ "\$PLAYONLINUX" = "" ] && exit 0
source "\$PLAYONLINUX/lib/sources"
   
TITLE="Far Cry 2"
PREFIX="FarCry2"
   
POL_SetupWindow_checkexist()
{        
        if [ ! -e \$POL_USER_ROOT/wineprefix/\$1 ]; then
                POL_SetupWindow_message "\$(eval_gettext 'Game is not installed')" "\$TITLE"
                exit 0
        fi
}
   
POL_SetupWindow_Init
POL_SetupWindow_checkexist "\$PREFIX"
   
POL_SetupWindow_message "\$(eval_gettext 'Welcome in \$TITLE configuration utils')" "\$TITLE"
   
POL_SetupWindow_message "\$(eval_gettext 'This utils only change game resolution.\nAll other settings will be set to default')" "\$TITLE"
   
GEOMETRY_SETTING="high"
   
POL_SetupWindow_menu_list "\$(eval_gettext 'Choose the game resolution you want')" "\$TITLE" "720x480-800x600-1024x768-1280x720-1280x768-1440x900" "-" "1024x768"
SELECTED_RES="\$APP_ANSWER"
   
if [ "\$SELECTED_RES" == "720x480" ];then
        ResX="720"
        ResY="480"
elif [ "\$SELECTED_RES" == "800x600" ];then
        ResX="800"
        ResY="600"
elif [ "\$SELECTED_RES" == "1024x768" ];then
        ResX="1024"
        ResY="768"
elif [ "\$SELECTED_RES" == "1280x720" ];then
        ResX="1280"
        ResY="720"
elif [ "\$SELECTED_RES" == "1280x768" ];then
        ResX="1280"
        ResY="768"
elif [ "\$SELECTED_RES" == "1440x900" ];then
        ResX="1440"
        ResY="900"
else
        ResX="1024"
        ResY="768"
fi
   
if [ ! -e "\$HOME/My Games/Far Cry 2/GamerProfile.xml" ]; then
        mkdir -p "\$HOME/My Games/Far Cry 2/"
else
        rm "\$HOME/My Games/Far Cry 2/GamerProfile.xml"
fi
   
cat << EOF2 > "\$HOME/My Games/Far Cry 2/GamerProfile.xml"
<GamerProfile>
        <SoundProfile MusicEnabled="1" MasterVolume="100" />
        <RenderProfile MultiSampleMode="0" AlphaToCoverage="0" ResolutionX="\$ResX" ResolutionY="\$ResY" Quality="custom" Fullscreen="1" Maximized="0" ForceWidescreen="0" AspectRatio="0" VSync="0" RefreshRate="60" DisableMip0Loading="0" MaxDriverBufferedFrames="0" Platform="d3d9" ShowFPS="0" ClustersZPassMaxLOD="1" Brightness="1" Contrast="1" GammaRamp="1" GammaRampR="1" GammaRampG="1" GammaRampB="1" AllowAsynchShaderLoading="1">
                <CustomQuality>
                        <quality ResolutionX="\$ResX" ResolutionY="\$ResY" EnvironmentQuality="low" AntiPortalQuality="high" PostFxQuality="low" TextureQuality="low" TextureResolutionQuality="low" WaterQuality="low" DepthPassQuality="high" VegetationQuality="low" TerrainQuality="low" GeometryQuality="\$GEOMETRY_SETTING" AmbientQuality="low" ShadowQuality="off" Hdr="0" HdrFP32="0" Bloom="0" id="custom" />
                        <quality ResolutionX="\$ResX" ResolutionY="\$ResY" EnvironmentQuality="high" AntiPortalQuality="high" PostFxQuality="high" TextureQuality="high" TextureResolutionQuality="high" WaterQuality="high" DepthPassQuality="high" VegetationQuality="high" TerrainQuality="high" GeometryQuality="\$GEOMETRY_SETTING" AmbientQuality="high" ShadowQuality="high" Hdr="1" HdrFP32="1" Bloom="1" id="customd3d10" />
                </CustomQuality>
        </RenderProfile>
        <NetworkProfile CustomMapMaxUploadRateOnline="10240" OnlineEnginePort="9000" OnlineServicePort="9001" FileTransferHostPort="9002" FileTransferClientPort="9003" LanBroadcastPort="9004" ScanFreePorts="1" ScanPortRange="1000" ScanPortStart="9000" SessionProvider="" DetectPublicAddress="1" MaxUploadOnline="768">
                <Accounts />
        </NetworkProfile>
        <GameProfile Sensitivity="1" Invert_y="0" UseMouseSmooth="0" Smoothness="0" Smoothness_Ironsight="1" HelpCrosshair="1" UseCompassMiniMap="1" UseRoadSignHilight="1" UseSubtitles="1" UseAmbx="0" Autosave="1" Machete="0" DifficultyLevel="1">
                <FireConfig QualitySetting="Low" />
        </GameProfile>
        <RealTreeProfile Quality="Low">
                <CustomQuality />
        </RealTreeProfile>
        <EngineProfile>
                <PhysicConfig QualitySetting="Low" />
                <QcConfig GatherFPS="1" GatherAICnt="1" IsQcTester="0" />
                <InputConfig />
        </EngineProfile>
</GamerProfile>
EOF2
   
POL_SetupWindow_Close
exit 0
EOF1
## End Configurator
  
POL_SetupWindow_Close
exit 0

Réponses

Jeudi 9 Avril 2020 à 13:56
Note: demo played 100% with Wine 3.0.3
Anonymous
Lundi 20 Avril 2020 à 23:02
Here is some help for other newbies, like me, if you want the POL Far Cry 2 installation.  The installation code 'Source code' from Gnu_Raziel is the same as the 'New source code' from Dadu042 posted 6 April 2020.  The installation is run from the POL application window.  Before you run the installation, ensure you have wine version 3.0.3.
Check the wine version on your system:
open a Terminal
type "apt update"
type "wine --version"
If your wine version is older than 3.0.3 then it is best for you to update your Linux installation, before you use the POL Far Cry 2 installation.
Anonymous
Mercredi 22 Avril 2020 à 20:28
Can you make the source code available please, for these?
source "$PLAYONLINUX/lib/sources"
POL_Call
POL_SetupWindow_browse
POL_SetupWindow_cdrom
POL_SetupWindow_check_cdrom
POL_SetupWindow_menu
POL_SetupWindow_message
POL_Shortcut
POL_Wine
POL_Wine start
POL_Wine_WaitExit
POL_Install_steam_flags
POL_Call POL_Function_NoCDWarning
POL_Call POL_Install_dxfullsetup
POL_Call POL_Install_gdiplus
POL_Call POL_Install_steam
POL_Debug_Init
POL_GetSetupImages
POL_SetupWindow_checkexist()
POL_SetupWindow_Close
POL_SetupWindow_Init
POL_SetupWindow_InstallMethod
POL_SetupWindow_menu_list
POL_SetupWindow_presentation
POL_SetupWindow_VMS
POL_System_SetArch
POL_Wine_Direct3D
POL_Wine_PrefixCreate
POL_Wine_SelectPrefix
Thankyou
Dadu042 Jeudi 30 Mai 2019 à 23:15
Dadu042

Warning

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

Messages

See changelog (Changed Wine 1.4 to 2.22)

Differences

@@ -1,189 +1,197 @@
 #!/bin/bash
-# Date : (2010-02-09 12-00)
-# Last revision : (2012-05-09 19:55)
+# Date : (see changelog)
+# Last revision : (see changelog)
 # Wine version used : 1.2, 1.3.9, 1.3.23, 1.4
 # Distribution used to test : Debian Testing x64
 # Author : GNU_Raziel
 # Licence : Retail
 # Only For : http://www.playonlinux.com
+#
+# CHANGELOG
+# [Dadu042] (2019-05-15 22-40)
+#   Upgrade Wine 1.4 to 2.22 (after having read appdb.winehq.org). Move 'NoCD warning'.
+# [GNU_Raziel] (2012-05-09 19:55)
+#   Updates.
+# [GNU_Raziel] (2010-02-09 12-00)
+#   Initial writting.
 
 [ "$PLAYONLINUX" = "" ] && exit 0
 source "$PLAYONLINUX/lib/sources"
-
+ 
 TITLE="Far Cry 2"
 PREFIX="FarCry2"
 EDITOR="Ubisoft"
 GAME_URL="http://www.farcrygame.com/"
 AUTHOR="GNU_Raziel"
-WORKING_WINE_VERSION="1.4"
+WORKING_WINE_VERSION="2.22"
 GAME_VMS="256"
-
+ 
 # Starting the script
 POL_GetSetupImages "http://files.playonlinux.com/resources/setups/top.jpg" "http://files.playonlinux.com/resources/setups/FarCry2/left.jpg" "$TITLE"
 POL_SetupWindow_Init
-
+ 
 # Starting debugging API
 POL_Debug_Init
+ 
+POL_SetupWindow_presentation "$TTILE" "$EDITOR" "$GAME_URL" "$AUTHOR" "$PREFIX"
 
-POL_SetupWindow_presentation "$TITLE" "$EDITOR" "$GAME_URL" "$AUTHOR" "$PREFIX"
+# Game protection warning
+POL_Call POL_Function_NoCDWarning
 
 # Setting prefix path
 POL_Wine_SelectPrefix "$PREFIX"
-
+ 
 # Downloading wine if necessary and creating prefix
 POL_System_SetArch "auto"
 POL_Wine_PrefixCreate "$WORKING_WINE_VERSION"
-
+ 
 # Choose between DVD and Digital Download version
 POL_SetupWindow_InstallMethod "DVD,STEAM,LOCAL"
-
+ 
 #Installing mandatory dependencies
 if [ "$INSTALL_METHOD" == "STEAM" ]; then
-	POL_Call POL_Install_steam
-	STEAM_ID="19900"
+        POL_Call POL_Install_steam
+        STEAM_ID="19900"
 fi
 POL_Call POL_Install_dxfullsetup
 POL_Call POL_Install_gdiplus
-
+ 
 # Asking about memory size of graphic card
 POL_SetupWindow_VMS $GAME_VMS
-
+ 
 ## Fix for this game
 POL_Wine_Direct3D "OffscreenRenderingMode" "pbuffer"
-
+ 
 # Sound problem fix - pulseaudio related
 [ "$POL_OS" = "Linux" ] && Set_SoundDriver "alsa"
 [ "$POL_OS" = "Linux" ] && Set_SoundEmulDriver "Y"
 ## End Fix
- 
+  
 # Starting installation
 if [ "$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 "setup.exe"
-	POL_Wine start /unix "$CDROM/setup.exe"
+        # 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 "setup.exe"
+        POL_Wine start /unix "$CDROM/setup.exe"
 POL_Wine_WaitExit "$TITLE"
 elif [ "$INSTALL_METHOD" == "STEAM" ]; 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"
-	# 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"
+        # 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"
+        # 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"
+        # 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"
 fi
-
+ 
 # Making Shortcut
 if [ "$INSTALL_METHOD" != "STEAM" ]; then
-	POL_Shortcut "FC2Launcher.exe" "$TITLE" "$TITLE.png" ""
+        POL_Shortcut "FC2Launcher.exe" "$TITLE" "$TITLE.png" ""
 fi
-
+ 
 ## BEGIN Configurator
 if [ ! -e "$POL_USER_ROOT/configurations/configurators/" ]; then
 mkdir -p "$POL_USER_ROOT/configurations/configurators/"
 fi
- 
+  
 cat << EOF1 > "$POL_USER_ROOT/configurations/configurators/Far Cry 2"
 #!/bin/bash
-
+ 
 [ "\$PLAYONLINUX" = "" ] && exit 0
 source "\$PLAYONLINUX/lib/sources"
- 
+  
 TITLE="Far Cry 2"
 PREFIX="FarCry2"
- 
+  
 POL_SetupWindow_checkexist()
-{	
-	if [ ! -e \$POL_USER_ROOT/wineprefix/\$1 ]; then
-		POL_SetupWindow_message "\$(eval_gettext 'Game is not installed')" "\$TITLE"
-		exit 0
-	fi
+{        
+        if [ ! -e \$POL_USER_ROOT/wineprefix/\$1 ]; then
+                POL_SetupWindow_message "\$(eval_gettext 'Game is not installed')" "\$TITLE"
+                exit 0
+        fi
 }
- 
+  
 POL_SetupWindow_Init
 POL_SetupWindow_checkexist "\$PREFIX"
- 
+  
 POL_SetupWindow_message "\$(eval_gettext 'Welcome in \$TITLE configuration utils')" "\$TITLE"
- 
+  
 POL_SetupWindow_message "\$(eval_gettext 'This utils only change game resolution.\nAll other settings will be set to default')" "\$TITLE"
- 
+  
 GEOMETRY_SETTING="high"
- 
+  
 POL_SetupWindow_menu_list "\$(eval_gettext 'Choose the game resolution you want')" "\$TITLE" "720x480-800x600-1024x768-1280x720-1280x768-1440x900" "-" "1024x768"
 SELECTED_RES="\$APP_ANSWER"
- 
+  
 if [ "\$SELECTED_RES" == "720x480" ];then
-	ResX="720"
-	ResY="480"
+        ResX="720"
+        ResY="480"
 elif [ "\$SELECTED_RES" == "800x600" ];then
-	ResX="800"
-	ResY="600"
+        ResX="800"
+        ResY="600"
 elif [ "\$SELECTED_RES" == "1024x768" ];then
-	ResX="1024"
-	ResY="768"
+        ResX="1024"
+        ResY="768"
 elif [ "\$SELECTED_RES" == "1280x720" ];then
-	ResX="1280"
-	ResY="720"
+        ResX="1280"
+        ResY="720"
 elif [ "\$SELECTED_RES" == "1280x768" ];then
-	ResX="1280"
-	ResY="768"
+        ResX="1280"
+        ResY="768"
 elif [ "\$SELECTED_RES" == "1440x900" ];then
-	ResX="1440"
-	ResY="900"
+        ResX="1440"
+        ResY="900"
 else
-	ResX="1024"
-	ResY="768"
-fi 
- 
+        ResX="1024"
+        ResY="768"
+fi
+  
 if [ ! -e "\$HOME/My Games/Far Cry 2/GamerProfile.xml" ]; then
-	mkdir -p "\$HOME/My Games/Far Cry 2/"
+        mkdir -p "\$HOME/My Games/Far Cry 2/"
 else
-	rm "\$HOME/My Games/Far Cry 2/GamerProfile.xml"
+        rm "\$HOME/My Games/Far Cry 2/GamerProfile.xml"
 fi
- 
+  
 cat << EOF2 > "\$HOME/My Games/Far Cry 2/GamerProfile.xml"
 <GamerProfile>
-	<SoundProfile MusicEnabled="1" MasterVolume="100" />
-	<RenderProfile MultiSampleMode="0" AlphaToCoverage="0" ResolutionX="\$ResX" ResolutionY="\$ResY" Quality="custom" Fullscreen="1" Maximized="0" ForceWidescreen="0" AspectRatio="0" VSync="0" RefreshRate="60" DisableMip0Loading="0" MaxDriverBufferedFrames="0" Platform="d3d9" ShowFPS="0" ClustersZPassMaxLOD="1" Brightness="1" Contrast="1" GammaRamp="1" GammaRampR="1" GammaRampG="1" GammaRampB="1" AllowAsynchShaderLoading="1">
-		<CustomQuality>
-			<quality ResolutionX="\$ResX" ResolutionY="\$ResY" EnvironmentQuality="low" AntiPortalQuality="high" PostFxQuality="low" TextureQuality="low" TextureResolutionQuality="low" WaterQuality="low" DepthPassQuality="high" VegetationQuality="low" TerrainQuality="low" GeometryQuality="\$GEOMETRY_SETTING" AmbientQuality="low" ShadowQuality="off" Hdr="0" HdrFP32="0" Bloom="0" id="custom" />
-			<quality ResolutionX="\$ResX" ResolutionY="\$ResY" EnvironmentQuality="high" AntiPortalQuality="high" PostFxQuality="high" TextureQuality="high" TextureResolutionQuality="high" WaterQuality="high" DepthPassQuality="high" VegetationQuality="high" TerrainQuality="high" GeometryQuality="\$GEOMETRY_SETTING" AmbientQuality="high" ShadowQuality="high" Hdr="1" HdrFP32="1" Bloom="1" id="customd3d10" />
-		</CustomQuality>
-	</RenderProfile>
-	<NetworkProfile CustomMapMaxUploadRateOnline="10240" OnlineEnginePort="9000" OnlineServicePort="9001" FileTransferHostPort="9002" FileTransferClientPort="9003" LanBroadcastPort="9004" ScanFreePorts="1" ScanPortRange="1000" ScanPortStart="9000" SessionProvider="" DetectPublicAddress="1" MaxUploadOnline="768">
-		<Accounts />
-	</NetworkProfile>
-	<GameProfile Sensitivity="1" Invert_y="0" UseMouseSmooth="0" Smoothness="0" Smoothness_Ironsight="1" HelpCrosshair="1" UseCompassMiniMap="1" UseRoadSignHilight="1" UseSubtitles="1" UseAmbx="0" Autosave="1" Machete="0" DifficultyLevel="1">
-		<FireConfig QualitySetting="Low" />
-	</GameProfile>
-	<RealTreeProfile Quality="Low">
-		<CustomQuality />
-	</RealTreeProfile>
-	<EngineProfile>
-		<PhysicConfig QualitySetting="Low" />
-		<QcConfig GatherFPS="1" GatherAICnt="1" IsQcTester="0" />
-		<InputConfig />
-	</EngineProfile>
+        <SoundProfile MusicEnabled="1" MasterVolume="100" />
+        <RenderProfile MultiSampleMode="0" AlphaToCoverage="0" ResolutionX="\$ResX" ResolutionY="\$ResY" Quality="custom" Fullscreen="1" Maximized="0" ForceWidescreen="0" AspectRatio="0" VSync="0" RefreshRate="60" DisableMip0Loading="0" MaxDriverBufferedFrames="0" Platform="d3d9" ShowFPS="0" ClustersZPassMaxLOD="1" Brightness="1" Contrast="1" GammaRamp="1" GammaRampR="1" GammaRampG="1" GammaRampB="1" AllowAsynchShaderLoading="1">
+                <CustomQuality>
+                        <quality ResolutionX="\$ResX" ResolutionY="\$ResY" EnvironmentQuality="low" AntiPortalQuality="high" PostFxQuality="low" TextureQuality="low" TextureResolutionQuality="low" WaterQuality="low" DepthPassQuality="high" VegetationQuality="low" TerrainQuality="low" GeometryQuality="\$GEOMETRY_SETTING" AmbientQuality="low" ShadowQuality="off" Hdr="0" HdrFP32="0" Bloom="0" id="custom" />
+                        <quality ResolutionX="\$ResX" ResolutionY="\$ResY" EnvironmentQuality="high" AntiPortalQuality="high" PostFxQuality="high" TextureQuality="high" TextureResolutionQuality="high" WaterQuality="high" DepthPassQuality="high" VegetationQuality="high" TerrainQuality="high" GeometryQuality="\$GEOMETRY_SETTING" AmbientQuality="high" ShadowQuality="high" Hdr="1" HdrFP32="1" Bloom="1" id="customd3d10" />
+                </CustomQuality>
+        </RenderProfile>
+        <NetworkProfile CustomMapMaxUploadRateOnline="10240" OnlineEnginePort="9000" OnlineServicePort="9001" FileTransferHostPort="9002" FileTransferClientPort="9003" LanBroadcastPort="9004" ScanFreePorts="1" ScanPortRange="1000" ScanPortStart="9000" SessionProvider="" DetectPublicAddress="1" MaxUploadOnline="768">
+                <Accounts />
+        </NetworkProfile>
+        <GameProfile Sensitivity="1" Invert_y="0" UseMouseSmooth="0" Smoothness="0" Smoothness_Ironsight="1" HelpCrosshair="1" UseCompassMiniMap="1" UseRoadSignHilight="1" UseSubtitles="1" UseAmbx="0" Autosave="1" Machete="0" DifficultyLevel="1">
+                <FireConfig QualitySetting="Low" />
+        </GameProfile>
+        <RealTreeProfile Quality="Low">
+                <CustomQuality />
+        </RealTreeProfile>
+        <EngineProfile>
+                <PhysicConfig QualitySetting="Low" />
+                <QcConfig GatherFPS="1" GatherAICnt="1" IsQcTester="0" />
+                <InputConfig />
+        </EngineProfile>
 </GamerProfile>
 EOF2
- 
+  
 POL_SetupWindow_Close
 exit 0
 EOF1
 ## End Configurator
-
-# Game protection warning
-POL_SetupWindow_message "$(eval_gettext 'You must disable anti-piracy protections of this game\nif you want to play it with wine.')" "$TITLE"
-
+ 
 POL_SetupWindow_Close
 exit 0
\ No newline at end of file

Nouveau code source

#!/bin/bash
# Date : (see changelog)
# Last revision : (see changelog)
# Wine version used : 1.2, 1.3.9, 1.3.23, 1.4
# Distribution used to test : Debian Testing x64
# Author : GNU_Raziel
# Licence : Retail
# Only For : http://www.playonlinux.com
#
# CHANGELOG
# [Dadu042] (2019-05-15 22-40)
#   Upgrade Wine 1.4 to 2.22 (after having read appdb.winehq.org). Move 'NoCD warning'.
# [GNU_Raziel] (2012-05-09 19:55)
#   Updates.
# [GNU_Raziel] (2010-02-09 12-00)
#   Initial writting.

[ "$PLAYONLINUX" = "" ] && exit 0
source "$PLAYONLINUX/lib/sources"
 
TITLE="Far Cry 2"
PREFIX="FarCry2"
EDITOR="Ubisoft"
GAME_URL="http://www.farcrygame.com/"
AUTHOR="GNU_Raziel"
WORKING_WINE_VERSION="2.22"
GAME_VMS="256"
 
# Starting the script
POL_GetSetupImages "http://files.playonlinux.com/resources/setups/top.jpg" "http://files.playonlinux.com/resources/setups/FarCry2/left.jpg" "$TITLE"
POL_SetupWindow_Init
 
# Starting debugging API
POL_Debug_Init
 
POL_SetupWindow_presentation "$TTILE" "$EDITOR" "$GAME_URL" "$AUTHOR" "$PREFIX"

# Game protection warning
POL_Call POL_Function_NoCDWarning

# Setting prefix path
POL_Wine_SelectPrefix "$PREFIX"
 
# Downloading wine if necessary and creating prefix
POL_System_SetArch "auto"
POL_Wine_PrefixCreate "$WORKING_WINE_VERSION"
 
# Choose between DVD and Digital Download version
POL_SetupWindow_InstallMethod "DVD,STEAM,LOCAL"
 
#Installing mandatory dependencies
if [ "$INSTALL_METHOD" == "STEAM" ]; then
        POL_Call POL_Install_steam
        STEAM_ID="19900"
fi
POL_Call POL_Install_dxfullsetup
POL_Call POL_Install_gdiplus
 
# Asking about memory size of graphic card
POL_SetupWindow_VMS $GAME_VMS
 
## Fix for this game
POL_Wine_Direct3D "OffscreenRenderingMode" "pbuffer"
 
# Sound problem fix - pulseaudio related
[ "$POL_OS" = "Linux" ] && Set_SoundDriver "alsa"
[ "$POL_OS" = "Linux" ] && Set_SoundEmulDriver "Y"
## End Fix
  
# Starting installation
if [ "$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 "setup.exe"
        POL_Wine start /unix "$CDROM/setup.exe"
POL_Wine_WaitExit "$TITLE"
elif [ "$INSTALL_METHOD" == "STEAM" ]; 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"
        # 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"
fi
 
# Making Shortcut
if [ "$INSTALL_METHOD" != "STEAM" ]; then
        POL_Shortcut "FC2Launcher.exe" "$TITLE" "$TITLE.png" ""
fi
 
## BEGIN Configurator
if [ ! -e "$POL_USER_ROOT/configurations/configurators/" ]; then
mkdir -p "$POL_USER_ROOT/configurations/configurators/"
fi
  
cat << EOF1 > "$POL_USER_ROOT/configurations/configurators/Far Cry 2"
#!/bin/bash
 
[ "\$PLAYONLINUX" = "" ] && exit 0
source "\$PLAYONLINUX/lib/sources"
  
TITLE="Far Cry 2"
PREFIX="FarCry2"
  
POL_SetupWindow_checkexist()
{        
        if [ ! -e \$POL_USER_ROOT/wineprefix/\$1 ]; then
                POL_SetupWindow_message "\$(eval_gettext 'Game is not installed')" "\$TITLE"
                exit 0
        fi
}
  
POL_SetupWindow_Init
POL_SetupWindow_checkexist "\$PREFIX"
  
POL_SetupWindow_message "\$(eval_gettext 'Welcome in \$TITLE configuration utils')" "\$TITLE"
  
POL_SetupWindow_message "\$(eval_gettext 'This utils only change game resolution.\nAll other settings will be set to default')" "\$TITLE"
  
GEOMETRY_SETTING="high"
  
POL_SetupWindow_menu_list "\$(eval_gettext 'Choose the game resolution you want')" "\$TITLE" "720x480-800x600-1024x768-1280x720-1280x768-1440x900" "-" "1024x768"
SELECTED_RES="\$APP_ANSWER"
  
if [ "\$SELECTED_RES" == "720x480" ];then
        ResX="720"
        ResY="480"
elif [ "\$SELECTED_RES" == "800x600" ];then
        ResX="800"
        ResY="600"
elif [ "\$SELECTED_RES" == "1024x768" ];then
        ResX="1024"
        ResY="768"
elif [ "\$SELECTED_RES" == "1280x720" ];then
        ResX="1280"
        ResY="720"
elif [ "\$SELECTED_RES" == "1280x768" ];then
        ResX="1280"
        ResY="768"
elif [ "\$SELECTED_RES" == "1440x900" ];then
        ResX="1440"
        ResY="900"
else
        ResX="1024"
        ResY="768"
fi
  
if [ ! -e "\$HOME/My Games/Far Cry 2/GamerProfile.xml" ]; then
        mkdir -p "\$HOME/My Games/Far Cry 2/"
else
        rm "\$HOME/My Games/Far Cry 2/GamerProfile.xml"
fi
  
cat << EOF2 > "\$HOME/My Games/Far Cry 2/GamerProfile.xml"
<GamerProfile>
        <SoundProfile MusicEnabled="1" MasterVolume="100" />
        <RenderProfile MultiSampleMode="0" AlphaToCoverage="0" ResolutionX="\$ResX" ResolutionY="\$ResY" Quality="custom" Fullscreen="1" Maximized="0" ForceWidescreen="0" AspectRatio="0" VSync="0" RefreshRate="60" DisableMip0Loading="0" MaxDriverBufferedFrames="0" Platform="d3d9" ShowFPS="0" ClustersZPassMaxLOD="1" Brightness="1" Contrast="1" GammaRamp="1" GammaRampR="1" GammaRampG="1" GammaRampB="1" AllowAsynchShaderLoading="1">
                <CustomQuality>
                        <quality ResolutionX="\$ResX" ResolutionY="\$ResY" EnvironmentQuality="low" AntiPortalQuality="high" PostFxQuality="low" TextureQuality="low" TextureResolutionQuality="low" WaterQuality="low" DepthPassQuality="high" VegetationQuality="low" TerrainQuality="low" GeometryQuality="\$GEOMETRY_SETTING" AmbientQuality="low" ShadowQuality="off" Hdr="0" HdrFP32="0" Bloom="0" id="custom" />
                        <quality ResolutionX="\$ResX" ResolutionY="\$ResY" EnvironmentQuality="high" AntiPortalQuality="high" PostFxQuality="high" TextureQuality="high" TextureResolutionQuality="high" WaterQuality="high" DepthPassQuality="high" VegetationQuality="high" TerrainQuality="high" GeometryQuality="\$GEOMETRY_SETTING" AmbientQuality="high" ShadowQuality="high" Hdr="1" HdrFP32="1" Bloom="1" id="customd3d10" />
                </CustomQuality>
        </RenderProfile>
        <NetworkProfile CustomMapMaxUploadRateOnline="10240" OnlineEnginePort="9000" OnlineServicePort="9001" FileTransferHostPort="9002" FileTransferClientPort="9003" LanBroadcastPort="9004" ScanFreePorts="1" ScanPortRange="1000" ScanPortStart="9000" SessionProvider="" DetectPublicAddress="1" MaxUploadOnline="768">
                <Accounts />
        </NetworkProfile>
        <GameProfile Sensitivity="1" Invert_y="0" UseMouseSmooth="0" Smoothness="0" Smoothness_Ironsight="1" HelpCrosshair="1" UseCompassMiniMap="1" UseRoadSignHilight="1" UseSubtitles="1" UseAmbx="0" Autosave="1" Machete="0" DifficultyLevel="1">
                <FireConfig QualitySetting="Low" />
        </GameProfile>
        <RealTreeProfile Quality="Low">
                <CustomQuality />
        </RealTreeProfile>
        <EngineProfile>
                <PhysicConfig QualitySetting="Low" />
                <QcConfig GatherFPS="1" GatherAICnt="1" IsQcTester="0" />
                <InputConfig />
        </EngineProfile>
</GamerProfile>
EOF2
  
POL_SetupWindow_Close
exit 0
EOF1
## End Configurator
 
POL_SetupWindow_Close
exit 0

Réponses

rmm-alk Jeudi 30 Mai 2019 à 13:49
rmm-alk Anonymous

Messages

j'ai ce programme sur windows XP 32 avec 9600GT et Intel Core 8400 //// 9400GS et AMD64 4200+

hors là avec Ubuntu 18.04 le jeu s'installe et fonctionne mais c'est impraticable, image super lente

j'ai baissé les options de qualité sans différence

Réponses

Jeudi 30 Mai 2019 à 15:45
English only here. I suggest to try a newer version of Wine instead of the current: WORKING_WINE_VERSION="1.4" and to read https://appdb.winehq.org about this game.