F.E.A.R.2 : Project Origin

Informations

Creator Message
Berillions

Warning

This installer is a beta script. It means that it might not work as expected

Informations

Platforms:
Downloads: 14083
Wine: System

Feedbacks

Description

FPS released in 2009.

 

PCGamingWiki.

Source code

#!/bin/bash
# Date: (2010-08-13)
# Distribution used to test: Debian Sid 32bits
# Wine version used: 2.22
# Author: Berillions
  
#Vérifier que PlayOnLinux est bien exécuté avant
[ "$PLAYONLINUX" = "" ] && exit 0 

# CHANGELOG:
# [Berillions] (2010-08-13)
#   First script.
# [Dadu042] (2019-08-18)
#  Cleanup, french -> english.
#  Wine 1.3.0 -> 2.22
#  Script (using DVD) currently blocks on the stage 'Updating Steam...'.

# Load libraries
source "$PLAYONLINUX/lib/sources"
  
Title="F.E.A.R.2 : Project Origin"
Prefix="F.E.A.R.2"
  
if [ "$POL_LANG" == "fr" ]; then
        LNG_WAIT_END="Appuyez sur \"Suivant\" UNIQUEMENT quand l'installation du jeu sera
        terminée sous peine de devoir recommencer l'installation."
        LNG_CHANGE_DVD="Appuyez sur \"Suivant\" lorsque l'installation demande d'insérer le second DVD."
        LNG_WMF9="PlayOnLinux télécharge Windows Media Format 9"
else
        LNG_WAIT_END="Click on \"Next\" ONLY when the game installation
        is finished or you will have to redo the installation.."
        LNG_CHANGE_DVD="Click on \"Next\" when the installation ask you to insert the Second DVD."
        LNG_WMF9="PlayOnLinux is downloading Windows Media Format 9"
fi

cd $REPERTOIRE/tmp
wget http://upload.wikimedia.org/wikipedia/en/9/90/POF2picture.jpg --output-document="$REPERTOIRE/tmp/$Prefix.jpg"
wget http://sd-1.archive-host.com/membres/images/51568577817080088/FEAR2.png
 
convert "$REPERTOIRE/tmp/$Prefix.jpg" -scale 150x356\! "$REPERTOIRE/tmp/left.jpg"
  
POL_SetupWindow_Init "$REPERTOIRE/tmp/FEAR2.png" "$REPERTOIRE/tmp/left.jpg"
  
# Presentation
POL_SetupWindow_presentation "$Title" "Monolith Productions" "http://www.projectorigingame.com/" "Berillions" "$Prefix"
  
# Detect the DVD-ROM
POL_SetupWindow_cdrom
POL_SetupWindow_check_cdrom "Setup.exe"
  
# Wine Installation
POL_SetupWindow_install_wine "2.22"
  
# Preapare prefix
select_prefix "$REPERTOIRE/wineprefix/$Prefix"
POL_SetupWindow_prefixcreate
 
# Add CDROM to Winecfg
cd "$WINEPREFIX/dosdevices"
ln -s "$CDROM" d:
 
cd "$WINEPREFIX/drive_c/windows/temp/"
echo "[HKEY_LOCAL_MACHINE\\Software\\Wine\\Drives]" > cdrom.reg
echo "\"d:\"=\"cdrom\"" >> cdrom.reg
regedit cdrom.reg
  
# Fetching PROGRAMFILES environmental variable
PROGRAMFILES="Program Files"
POL_LoadVar_PROGRAMFILES
 
# Installation corefonts and Directx9
POL_Call POL_Install_d3dx9
fonts_to_prefix
  
# Set graphic memory size
POL_SetupWindow_menu_list "Your Memory Graphic" "$Title" "32 64 128 256 384 512 768 896 1024 2048" " "
VMS="$APP_ANSWER"
  
# Set Direct3D
cd "$WINEPREFIX/drive_c/windows/temp"
cat << EOF > OGL.reg
[HKEY_CURRENT_USER\\Software\\Wine\\Direct3D]
"VideoMemorySize"="$VMS"
EOF
regedit OGL.reg
  
POL_SetupWindow_wait_next_signal "Installing ..." "$Title"
wine start /unix "$CDROM/Setup.exe"
 
POL_SetupWindow_message "$LNG_CHANGE_DVD" "$Title"
env WINEPREFIX="$REPERTOIRE/wineprefix/$Prefix" wine eject d:
 
POL_SetupWindow_message "$LNG_WAIT_END" "$Title"
  
# Make Icon
cd "$REPERTOIRE/tmp"
convert "$REPERTOIRE/tmp/FEAR2.png" -geometry 32x32 "$REPERTOIRE/icones/32/$Title"
 
# Windows Media Format 9 Download and Installation
POL_SetupWindow_wait_next_signal "$LNG_WMF9" "$Title"
wget http://www.acoustica.com/downloading.asp?p=1002
wine wmfadist.exe /Q
POL_SetupWindow_detect_exit
  
# Create Launcher 
POL_SetupWindow_make_shortcut "$Prefix" "$PROGRAMFILES/Steam" "Steam.exe" "" "$Title"
 
# Set Sound
cd "$WINEPREFIX/drive_c/windows/temp"
cat << EOF > Sound.reg
[HKEY_CURRENT_USER\\Software\\Wine\\DirectSound]
"HardwareAcceleration"="Emulation"
EOF
regedit Sound.reg
 
Set_WineVersion_Assign "2.22" "$Title"
  
POL_SetupWindow_Close
exit

Contributions

Filters:

Contribute
Member Message
Dadu042 Sunday 18 August 2019 at 12:45
Dadu042
Moderator

Warning

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

Message

I made a new clean script (attached here). However it does not work, perhaps because of Steam failing to install (stuck on 'Updating Steam...'), like the current script.

 

I switch this installer to 'testing'.

Differences

@@ -1,119 +1,127 @@
 #!/bin/bash
-# Date: (2010-08-13)
-# Distribution used to test: Debian Sid 32bits
-# Wine version used: 2.22
-# Author: Berillions
-  
-#Vérifier que PlayOnLinux est bien exécuté avant
-[ "$PLAYONLINUX" = "" ] && exit 0 
-
+# Date : (2019-08-18)
+# Last revision : see changelog
+# Wine version used : see below
+# Distribution used to test : XUbuntu 18.04 x64
+# Script licence : GPL3
+# Program licence : Retail
+# Playonlinux v4.3.4
+#
+# Tested version : v1.0.0 (retail, 2x DVDs, western europe)
+#
+# Game based on (ie: middlewares): .
+#
+#
 # CHANGELOG:
 # [Berillions] (2010-08-13)
 #   First script.
 # [Dadu042] (2019-08-18)
-#  Cleanup, french -> english.
-#  Wine 1.3.0 -> 2.22
-#  Script (using DVD) currently blocks on the stage 'Updating Steam...'.
+#   Cleanup, french -> english.
+#   Wine 1.3.0 -> 2.22
+#   Script (using DVD) currently blocks on the stage 'Updating Steam...'.
+# [Dadu042] (2019-08-18)
+#   Script rewrite. Don't work because Steam update process does fail (stuck, it don't start downloading).
+#
+# KNOWN ISSUES:
+#   - 4.11  "Failed to run install script" (when Steam installation should start), fix: POL_Install_dotnet20
 
-# Load libraries
+
+
+[ -z "$PLAYONLINUX" ] && exit 0
 source "$PLAYONLINUX/lib/sources"
+         
+TITLE="F.E.A.R.2 : Project Origin"
+PREFIX="F.E.A.R.2_PO"
+WORKING_WINE_VERSION="4.0.1"
+AUTHOR="Dadu042"
+EDITOR="Monolith Productions"
+GAME_URL=""
+    
+POL_SetupWindow_Init
+POL_Debug_Init
+    
+POL_SetupWindow_presentation "$TITLE" "$EDITOR" "$GAME_URL" "$AUTHOR" "$PREFIX"
+    
+POL_RequiredVersion "4.3.4" || POL_Debug_Fatal "$APPLICATION_TITLE $VERSION is required to install $TITLE"
+    
+POL_Wine_SelectPrefix "$PREFIX"
+POL_System_SetArch "x86"
+POL_Wine_PrefixCreate "$WORKING_WINE_VERSION"
+# POL_Wine_PrefixCreate
+POL_System_TmpCreate "$TITLE"
   
-Title="F.E.A.R.2 : Project Origin"
-Prefix="F.E.A.R.2"
-  
-if [ "$POL_LANG" == "fr" ]; then
-	LNG_WAIT_END="Appuyez sur \"Suivant\" UNIQUEMENT quand l'installation du jeu sera
-	terminée sous peine de devoir recommencer l'installation."
-	LNG_CHANGE_DVD="Appuyez sur \"Suivant\" lorsque l'installation demande d'insérer le second DVD."
-	LNG_WMF9="PlayOnLinux télécharge Windows Media Format 9"
-else
-	LNG_WAIT_END="Click on \"Next\" ONLY when the game installation
-	is finished or you will have to redo the installation.."
-	LNG_CHANGE_DVD="Click on \"Next\" when the installation ask you to insert the Second DVD."
-	LNG_WMF9="PlayOnLinux is downloading Windows Media Format 9"
-fi
+Set_OS "vista"
+
+# steam : 'Fail to run install script'  (wine 4.12.1)
+# POL_Call POL_Install_steam_flags
+# POL_Call POL_Install_steam
+# POL_Call POL_Install_vcrun2008
+
+
+# Wine 4.11 : setup does crash before steam ! (miss msls?  -> same with)
+POL_Call POL_Install_riched30
+POL_Call POL_Install_vcrun2008
+
+POL_Call POL_Install_msls31
+
+POL_Call POL_Install_dotnet20
+POL_Call POL_Install_vcrun2008
+
+POL_Call POL_Install_d3dx9_43
+
+
+# useless
+# POL_Call POL_Install_wininet
+# POL_Call POL_Install_winhttp
 
-cd $REPERTOIRE/tmp
-wget http://upload.wikimedia.org/wikipedia/en/9/90/POF2picture.jpg --output-document="$REPERTOIRE/tmp/$Prefix.jpg"
-wget http://sd-1.archive-host.com/membres/images/51568577817080088/FEAR2.png
- 
-convert "$REPERTOIRE/tmp/$Prefix.jpg" -scale 150x356\! "$REPERTOIRE/tmp/left.jpg"
-  
-POL_SetupWindow_Init "$REPERTOIRE/tmp/FEAR2.png" "$REPERTOIRE/tmp/left.jpg"
-  
-# Presentation
-POL_SetupWindow_presentation "$Title" "Monolith Productions" "http://www.projectorigingame.com/" "Berillions" "$Prefix"
-  
-# Detect the DVD-ROM
-POL_SetupWindow_cdrom
-POL_SetupWindow_check_cdrom "Setup.exe"
-  
-# Wine Installation
-POL_SetupWindow_install_wine "2.22"
-  
-# Preapare prefix
-select_prefix "$REPERTOIRE/wineprefix/$Prefix"
-POL_SetupWindow_prefixcreate
- 
-# Add CDROM to Winecfg
-cd "$WINEPREFIX/dosdevices"
-ln -s "$CDROM" d:
- 
-cd "$WINEPREFIX/drive_c/windows/temp/"
-echo "[HKEY_LOCAL_MACHINE\\Software\\Wine\\Drives]" > cdrom.reg
-echo "\"d:\"=\"cdrom\"" >> cdrom.reg
-regedit cdrom.reg
-  
-# Fetching PROGRAMFILES environmental variable
-PROGRAMFILES="Program Files"
-POL_LoadVar_PROGRAMFILES
- 
-# Installation corefonts and Directx9
-POL_Call POL_Install_d3dx9
-fonts_to_prefix
-  
-# Set graphic memory size
-POL_SetupWindow_menu_list "Your Memory Graphic" "$Title" "32 64 128 256 384 512 768 896 1024 2048" " "
-VMS="$APP_ANSWER"
-  
-# Set Direct3D
-cd "$WINEPREFIX/drive_c/windows/temp"
-cat << EOF > OGL.reg
-[HKEY_CURRENT_USER\\Software\\Wine\\Direct3D]
-"VideoMemorySize"="$VMS"
-EOF
-regedit OGL.reg
-  
-POL_SetupWindow_wait_next_signal "Installing ..." "$Title"
-wine start /unix "$CDROM/Setup.exe"
- 
-POL_SetupWindow_message "$LNG_CHANGE_DVD" "$Title"
-env WINEPREFIX="$REPERTOIRE/wineprefix/$Prefix" wine eject d:
- 
-POL_SetupWindow_message "$LNG_WAIT_END" "$Title"
-  
-# Make Icon
-cd "$REPERTOIRE/tmp"
-convert "$REPERTOIRE/tmp/FEAR2.png" -geometry 32x32 "$REPERTOIRE/icones/32/$Title"
  
-# Windows Media Format 9 Download and Installation
-POL_SetupWindow_wait_next_signal "$LNG_WMF9" "$Title"
-wget http://www.acoustica.com/downloading.asp?p=1002
-wine wmfadist.exe /Q
-POL_SetupWindow_detect_exit
+# POL_Call POL_Install_corefonts
   
-# Create Launcher 
-POL_SetupWindow_make_shortcut "$Prefix" "$PROGRAMFILES/Steam" "Steam.exe" "" "$Title"
- 
-# Set Sound
-cd "$WINEPREFIX/drive_c/windows/temp"
-cat << EOF > Sound.reg
-[HKEY_CURRENT_USER\\Software\\Wine\\DirectSound]
-"HardwareAcceleration"="Emulation"
-EOF
-regedit Sound.reg
- 
-Set_WineVersion_Assign "2.22" "$Title"
+## Begin Common PlayOnMac Section ##
+[ "$POL_OS" = "Mac" ] && Set_Managed "Off"
+# End Section ##
+
+# This web game was not released on CD/DVD.
+# POL_SetupWindow_InstallMethod "LOCAL,STEAM,CD" 
+POL_SetupWindow_InstallMethod "LOCAL,DVD,STEAM"
+     
+if [ "$INSTALL_METHOD" == "LOCAL" ]; then
+   
+        cd "$HOME"
+        POL_SetupWindow_browse "$(eval_gettext 'Please select the setup file to run:')" "$TITLE"
+        SETUP_EXE="$APP_ANSWER"
+
+#	POL_SetupWindow_message "We recommend to uncheck all checkboxes (ie: about DirectX, VC++ ..." "$TITLE"
+
+        POL_Wine start /unix "$SETUP_EXE"
+        POL_Wine_WaitExit "$TITLE"
+
+elif [ "$INSTALL_METHOD" == "STEAM" ];then
+        POL_Call POL_Install_steam
+        cd "$WINEPREFIX/drive_c/$PROGRAMFILES/Steam"
+        POL_Wine "steam.exe" steam://install/16450
+        POL_Wine_WaitBefore "$TITLE"
+
+elif [ "$INSTALL_METHOD" == "DVD" ];then
+        POL_SetupWindow_cdrom
+        POL_SetupWindow_check_cdrom "Project Origin_disk1.sis"
+        POL_Wine start /unix "$CDROM/Setup.exe"
+        POL_Wine_WaitExit "Setup.exe"
+        cd "$POL_System_TmpDir"
+fi
+      
+      
+if [ "$INSTALL_METHOD" == "STEAM" ]; then
+        POL_Shortcut "steam.exe" "$TITLE" "" "steam://rungameid/16450"
+else         
+       POL_Shortcut "steam.exe" "$TITLE Steam" "" "" "Game;Shooter;"
+       POL_Shortcut "F.E.A.R.exe" "$TITLE" "" "" "Game;Shooter;"
+       POL_Shortcut_Document "$TITLE" "FFOW_Manual.pdf"
+fi
   
+# GPU selection. Useful when there is 2 GPU on the same computer (ie: Intel HD + Nvidia).
+POL_Call POL_Install_VideoDriver
+
+POL_System_TmpDelete
 POL_SetupWindow_Close
-exit
\ No newline at end of file
+exit 0
\ No newline at end of file

New source code

#!/bin/bash
# Date : (2019-08-18)
# Last revision : see changelog
# Wine version used : see below
# Distribution used to test : XUbuntu 18.04 x64
# Script licence : GPL3
# Program licence : Retail
# Playonlinux v4.3.4
#
# Tested version : v1.0.0 (retail, 2x DVDs, western europe)
#
# Game based on (ie: middlewares): .
#
#
# CHANGELOG:
# [Berillions] (2010-08-13)
#   First script.
# [Dadu042] (2019-08-18)
#   Cleanup, french -> english.
#   Wine 1.3.0 -> 2.22
#   Script (using DVD) currently blocks on the stage 'Updating Steam...'.
# [Dadu042] (2019-08-18)
#   Script rewrite. Don't work because Steam update process does fail (stuck, it don't start downloading).
#
# KNOWN ISSUES:
#   - 4.11  "Failed to run install script" (when Steam installation should start), fix: POL_Install_dotnet20



[ -z "$PLAYONLINUX" ] && exit 0
source "$PLAYONLINUX/lib/sources"
         
TITLE="F.E.A.R.2 : Project Origin"
PREFIX="F.E.A.R.2_PO"
WORKING_WINE_VERSION="4.0.1"
AUTHOR="Dadu042"
EDITOR="Monolith Productions"
GAME_URL=""
    
POL_SetupWindow_Init
POL_Debug_Init
    
POL_SetupWindow_presentation "$TITLE" "$EDITOR" "$GAME_URL" "$AUTHOR" "$PREFIX"
    
POL_RequiredVersion "4.3.4" || POL_Debug_Fatal "$APPLICATION_TITLE $VERSION is required to install $TITLE"
    
POL_Wine_SelectPrefix "$PREFIX"
POL_System_SetArch "x86"
POL_Wine_PrefixCreate "$WORKING_WINE_VERSION"
# POL_Wine_PrefixCreate
POL_System_TmpCreate "$TITLE"
  
Set_OS "vista"

# steam : 'Fail to run install script'  (wine 4.12.1)
# POL_Call POL_Install_steam_flags
# POL_Call POL_Install_steam
# POL_Call POL_Install_vcrun2008


# Wine 4.11 : setup does crash before steam ! (miss msls?  -> same with)
POL_Call POL_Install_riched30
POL_Call POL_Install_vcrun2008

POL_Call POL_Install_msls31

POL_Call POL_Install_dotnet20
POL_Call POL_Install_vcrun2008

POL_Call POL_Install_d3dx9_43


# useless
# POL_Call POL_Install_wininet
# POL_Call POL_Install_winhttp

 
# POL_Call POL_Install_corefonts
  
## Begin Common PlayOnMac Section ##
[ "$POL_OS" = "Mac" ] && Set_Managed "Off"
# End Section ##

# This web game was not released on CD/DVD.
# POL_SetupWindow_InstallMethod "LOCAL,STEAM,CD" 
POL_SetupWindow_InstallMethod "LOCAL,DVD,STEAM"
     
if [ "$INSTALL_METHOD" == "LOCAL" ]; then
   
        cd "$HOME"
        POL_SetupWindow_browse "$(eval_gettext 'Please select the setup file to run:')" "$TITLE"
        SETUP_EXE="$APP_ANSWER"

#        POL_SetupWindow_message "We recommend to uncheck all checkboxes (ie: about DirectX, VC++ ..." "$TITLE"

        POL_Wine start /unix "$SETUP_EXE"
        POL_Wine_WaitExit "$TITLE"

elif [ "$INSTALL_METHOD" == "STEAM" ];then
        POL_Call POL_Install_steam
        cd "$WINEPREFIX/drive_c/$PROGRAMFILES/Steam"
        POL_Wine "steam.exe" steam://install/16450
        POL_Wine_WaitBefore "$TITLE"

elif [ "$INSTALL_METHOD" == "DVD" ];then
        POL_SetupWindow_cdrom
        POL_SetupWindow_check_cdrom "Project Origin_disk1.sis"
        POL_Wine start /unix "$CDROM/Setup.exe"
        POL_Wine_WaitExit "Setup.exe"
        cd "$POL_System_TmpDir"
fi
      
      
if [ "$INSTALL_METHOD" == "STEAM" ]; then
        POL_Shortcut "steam.exe" "$TITLE" "" "steam://rungameid/16450"
else         
       POL_Shortcut "steam.exe" "$TITLE Steam" "" "" "Game;Shooter;"
       POL_Shortcut "F.E.A.R.exe" "$TITLE" "" "" "Game;Shooter;"
       POL_Shortcut_Document "$TITLE" "FFOW_Manual.pdf"
fi
  
# GPU selection. Useful when there is 2 GPU on the same computer (ie: Intel HD + Nvidia).
POL_Call POL_Install_VideoDriver

POL_System_TmpDelete
POL_SetupWindow_Close
exit 0

Replies

Edited by Dadu042

Dadu042 Sunday 18 August 2019 at 2:58
Dadu042
Moderator

Information

This update has been approved by the team.

Message

The script (using Wine v1.3.0) blocks on the Windows 'Steam - Updating' displaying message 'Updating Steam...  '. Same thing with v2.22

Differences

@@ -1,111 +1,119 @@
 #!/bin/bash
 # Date: (2010-08-13)
 # Distribution used to test: Debian Sid 32bits
-# Wine version used: 1.3.0
+# Wine version used: 2.22
 # Author: Berillions
- 
+  
 #Vérifier que PlayOnLinux est bien exécuté avant
 [ "$PLAYONLINUX" = "" ] && exit 0 
- 
-#Charger les librairies
+
+# CHANGELOG:
+# [Berillions] (2010-08-13)
+#   First script.
+# [Dadu042] (2019-08-18)
+#  Cleanup, french -> english.
+#  Wine 1.3.0 -> 2.22
+#  Script (using DVD) currently blocks on the stage 'Updating Steam...'.
+
+# Load libraries
 source "$PLAYONLINUX/lib/sources"
- 
+  
 Title="F.E.A.R.2 : Project Origin"
 Prefix="F.E.A.R.2"
- 
+  
 if [ "$POL_LANG" == "fr" ]; then
-LNG_WAIT_END="Appuyez sur \"Suivant\" UNIQUEMENT quand l'installation du jeu sera
-terminée sous peine de devoir recommencer l'installation."
-LNG_CHANGE_DVD="Appuyez sur \"Suivant\" lorsque l'installation demande d'insérer le second DVD."
-LNG_WMF9="PlayOnLinux télécharge Windows Media Format 9"
+	LNG_WAIT_END="Appuyez sur \"Suivant\" UNIQUEMENT quand l'installation du jeu sera
+	terminée sous peine de devoir recommencer l'installation."
+	LNG_CHANGE_DVD="Appuyez sur \"Suivant\" lorsque l'installation demande d'insérer le second DVD."
+	LNG_WMF9="PlayOnLinux télécharge Windows Media Format 9"
 else
-LNG_WAIT_END="Click on \"Next\" ONLY when the game installation
-is finished or you will have to redo the installation.."
-LNG_CHANGE_DVD="Click on \"Next\" when the installation ask you to insert the Second DVD."
-LNG_WMF9="PlayOnLinux is downloading Windows Media Format 9"
+	LNG_WAIT_END="Click on \"Next\" ONLY when the game installation
+	is finished or you will have to redo the installation.."
+	LNG_CHANGE_DVD="Click on \"Next\" when the installation ask you to insert the Second DVD."
+	LNG_WMF9="PlayOnLinux is downloading Windows Media Format 9"
 fi
- 
+
 cd $REPERTOIRE/tmp
 wget http://upload.wikimedia.org/wikipedia/en/9/90/POF2picture.jpg --output-document="$REPERTOIRE/tmp/$Prefix.jpg"
 wget http://sd-1.archive-host.com/membres/images/51568577817080088/FEAR2.png
-
-convert "$REPERTOIRE/tmp/$Prefix.jpg" -scale 150x356\! "$REPERTOIRE/tmp/left.jpg"
- 
-POL_SetupWindow_Init "$REPERTOIRE/tmp/FEAR2.png" "$REPERTOIRE/tmp/left.jpg" 
  
-#Presentation
+convert "$REPERTOIRE/tmp/$Prefix.jpg" -scale 150x356\! "$REPERTOIRE/tmp/left.jpg"
+  
+POL_SetupWindow_Init "$REPERTOIRE/tmp/FEAR2.png" "$REPERTOIRE/tmp/left.jpg"
+  
+# Presentation
 POL_SetupWindow_presentation "$Title" "Monolith Productions" "http://www.projectorigingame.com/" "Berillions" "$Prefix"
- 
-#Détection du cd-rom
+  
+# Detect the DVD-ROM
 POL_SetupWindow_cdrom
-POL_SetupWindow_check_cdrom "Setup.exe" 
- 
-#Wine Installation
-POL_SetupWindow_install_wine "1.3.0"
- 
-#Préparation du prefix
+POL_SetupWindow_check_cdrom "Setup.exe"
+  
+# Wine Installation
+POL_SetupWindow_install_wine "2.22"
+  
+# Preapare prefix
 select_prefix "$REPERTOIRE/wineprefix/$Prefix"
 POL_SetupWindow_prefixcreate
-
-#Ajout du CDROM à Winecfg
+ 
+# Add CDROM to Winecfg
 cd "$WINEPREFIX/dosdevices"
 ln -s "$CDROM" d:
-
+ 
 cd "$WINEPREFIX/drive_c/windows/temp/"
 echo "[HKEY_LOCAL_MACHINE\\Software\\Wine\\Drives]" > cdrom.reg
 echo "\"d:\"=\"cdrom\"" >> cdrom.reg
 regedit cdrom.reg
- 
-#fetching PROGRAMFILES environmental variable
+  
+# Fetching PROGRAMFILES environmental variable
 PROGRAMFILES="Program Files"
 POL_LoadVar_PROGRAMFILES
-
-#Installation corefonts and Directx9
+ 
+# Installation corefonts and Directx9
 POL_Call POL_Install_d3dx9
 fonts_to_prefix
- 
-#Taille de la mémoire graphique
+  
+# Set graphic memory size
 POL_SetupWindow_menu_list "Your Memory Graphic" "$Title" "32 64 128 256 384 512 768 896 1024 2048" " "
 VMS="$APP_ANSWER"
- 
-#Réglage Direct3D
+  
+# Set Direct3D
 cd "$WINEPREFIX/drive_c/windows/temp"
 cat << EOF > OGL.reg
 [HKEY_CURRENT_USER\\Software\\Wine\\Direct3D]
 "VideoMemorySize"="$VMS"
 EOF
 regedit OGL.reg
- 
+  
 POL_SetupWindow_wait_next_signal "Installing ..." "$Title"
 wine start /unix "$CDROM/Setup.exe"
-
+ 
 POL_SetupWindow_message "$LNG_CHANGE_DVD" "$Title"
 env WINEPREFIX="$REPERTOIRE/wineprefix/$Prefix" wine eject d:
-
-POL_SetupWindow_message "$LNG_WAIT_END" "$Title"
  
-#Création Icone
+POL_SetupWindow_message "$LNG_WAIT_END" "$Title"
+  
+# Make Icon
 cd "$REPERTOIRE/tmp"
 convert "$REPERTOIRE/tmp/FEAR2.png" -geometry 32x32 "$REPERTOIRE/icones/32/$Title"
-
-#Windows Media Format 9 Download and Installation
+ 
+# Windows Media Format 9 Download and Installation
 POL_SetupWindow_wait_next_signal "$LNG_WMF9" "$Title"
 wget http://www.acoustica.com/downloading.asp?p=1002
 wine wmfadist.exe /Q
 POL_SetupWindow_detect_exit
- 
-#Création Launcher 
+  
+# Create Launcher 
 POL_SetupWindow_make_shortcut "$Prefix" "$PROGRAMFILES/Steam" "Steam.exe" "" "$Title"
-
-#Réglage Sound
+ 
+# Set Sound
 cd "$WINEPREFIX/drive_c/windows/temp"
 cat << EOF > Sound.reg
 [HKEY_CURRENT_USER\\Software\\Wine\\DirectSound]
 "HardwareAcceleration"="Emulation"
 EOF
 regedit Sound.reg
-
-Set_WineVersion_Assign "1.3.0" "$Title"
  
+Set_WineVersion_Assign "2.22" "$Title"
+  
 POL_SetupWindow_Close
 exit
\ No newline at end of file

New source code

#!/bin/bash
# Date: (2010-08-13)
# Distribution used to test: Debian Sid 32bits
# Wine version used: 2.22
# Author: Berillions
  
#Vérifier que PlayOnLinux est bien exécuté avant
[ "$PLAYONLINUX" = "" ] && exit 0 

# CHANGELOG:
# [Berillions] (2010-08-13)
#   First script.
# [Dadu042] (2019-08-18)
#  Cleanup, french -> english.
#  Wine 1.3.0 -> 2.22
#  Script (using DVD) currently blocks on the stage 'Updating Steam...'.

# Load libraries
source "$PLAYONLINUX/lib/sources"
  
Title="F.E.A.R.2 : Project Origin"
Prefix="F.E.A.R.2"
  
if [ "$POL_LANG" == "fr" ]; then
        LNG_WAIT_END="Appuyez sur \"Suivant\" UNIQUEMENT quand l'installation du jeu sera
        terminée sous peine de devoir recommencer l'installation."
        LNG_CHANGE_DVD="Appuyez sur \"Suivant\" lorsque l'installation demande d'insérer le second DVD."
        LNG_WMF9="PlayOnLinux télécharge Windows Media Format 9"
else
        LNG_WAIT_END="Click on \"Next\" ONLY when the game installation
        is finished or you will have to redo the installation.."
        LNG_CHANGE_DVD="Click on \"Next\" when the installation ask you to insert the Second DVD."
        LNG_WMF9="PlayOnLinux is downloading Windows Media Format 9"
fi

cd $REPERTOIRE/tmp
wget http://upload.wikimedia.org/wikipedia/en/9/90/POF2picture.jpg --output-document="$REPERTOIRE/tmp/$Prefix.jpg"
wget http://sd-1.archive-host.com/membres/images/51568577817080088/FEAR2.png
 
convert "$REPERTOIRE/tmp/$Prefix.jpg" -scale 150x356\! "$REPERTOIRE/tmp/left.jpg"
  
POL_SetupWindow_Init "$REPERTOIRE/tmp/FEAR2.png" "$REPERTOIRE/tmp/left.jpg"
  
# Presentation
POL_SetupWindow_presentation "$Title" "Monolith Productions" "http://www.projectorigingame.com/" "Berillions" "$Prefix"
  
# Detect the DVD-ROM
POL_SetupWindow_cdrom
POL_SetupWindow_check_cdrom "Setup.exe"
  
# Wine Installation
POL_SetupWindow_install_wine "2.22"
  
# Preapare prefix
select_prefix "$REPERTOIRE/wineprefix/$Prefix"
POL_SetupWindow_prefixcreate
 
# Add CDROM to Winecfg
cd "$WINEPREFIX/dosdevices"
ln -s "$CDROM" d:
 
cd "$WINEPREFIX/drive_c/windows/temp/"
echo "[HKEY_LOCAL_MACHINE\\Software\\Wine\\Drives]" > cdrom.reg
echo "\"d:\"=\"cdrom\"" >> cdrom.reg
regedit cdrom.reg
  
# Fetching PROGRAMFILES environmental variable
PROGRAMFILES="Program Files"
POL_LoadVar_PROGRAMFILES
 
# Installation corefonts and Directx9
POL_Call POL_Install_d3dx9
fonts_to_prefix
  
# Set graphic memory size
POL_SetupWindow_menu_list "Your Memory Graphic" "$Title" "32 64 128 256 384 512 768 896 1024 2048" " "
VMS="$APP_ANSWER"
  
# Set Direct3D
cd "$WINEPREFIX/drive_c/windows/temp"
cat << EOF > OGL.reg
[HKEY_CURRENT_USER\\Software\\Wine\\Direct3D]
"VideoMemorySize"="$VMS"
EOF
regedit OGL.reg
  
POL_SetupWindow_wait_next_signal "Installing ..." "$Title"
wine start /unix "$CDROM/Setup.exe"
 
POL_SetupWindow_message "$LNG_CHANGE_DVD" "$Title"
env WINEPREFIX="$REPERTOIRE/wineprefix/$Prefix" wine eject d:
 
POL_SetupWindow_message "$LNG_WAIT_END" "$Title"
  
# Make Icon
cd "$REPERTOIRE/tmp"
convert "$REPERTOIRE/tmp/FEAR2.png" -geometry 32x32 "$REPERTOIRE/icones/32/$Title"
 
# Windows Media Format 9 Download and Installation
POL_SetupWindow_wait_next_signal "$LNG_WMF9" "$Title"
wget http://www.acoustica.com/downloading.asp?p=1002
wine wmfadist.exe /Q
POL_SetupWindow_detect_exit
  
# Create Launcher 
POL_SetupWindow_make_shortcut "$Prefix" "$PROGRAMFILES/Steam" "Steam.exe" "" "$Title"
 
# Set Sound
cd "$WINEPREFIX/drive_c/windows/temp"
cat << EOF > Sound.reg
[HKEY_CURRENT_USER\\Software\\Wine\\DirectSound]
"HardwareAcceleration"="Emulation"
EOF
regedit Sound.reg
 
Set_WineVersion_Assign "2.22" "$Title"
  
POL_SetupWindow_Close
exit

Replies

Edited by Dadu042

RebelCoder Wednesday 10 January 2018 at 20:29
RebelCoder

Message

Install script did not work. Had two bugs: Graphical glitchis + audio glitches. I have installed from scratch, using "Install a non-listed program" and with few attempts, got a perfect combination. Game runs amazing!

My system: Debian 9 (Stretch) (Kernel 4.9)
PlayOnLinux: 4.2.12
Wine Used: 3.0-rc5 (32 bit)
Additional files installed:
POL_Install_corefonts
POL_Install_d3dx9
POL_Install_d3dx9_43
POL_Install_ffdshow
POL_Install_gecko
POL_Install_mfc40
POL_Install_msvc80
POL_Install_msvc90
POL_Install_vcrun2005
POL_Install_vcrun2008
POL_Install_wmp9

POL_Install_wmpcodeck

Game runs perfectly fine now. I use optirun/primusrun option (I have a laptop with intel+nvidia cards)
 

 

Replies