Forums

[Script] Project Reality: BF2

Auteur Réponses
Dadu042 Samedi 27 Avril 2019 à 21:41
Dadu042
Modérateur

Currently (april 2019) this script does not allow to start the game:
It show a black screen. After pressing ALT+F4 two times, the intro video is played, then back screen again.

 

#!/usr/bin/env playonlinux-bash
# Date : (2019-04-27 21-48)
# Last revision : (2019-04-27 21-48)
# Wine version used : see below
# Distribution used to test : Ubuntu 18.04 x64
# Script licence : GPL3
# Program licence : 
#
# Playonlinux version used : 4.3.4
#
# This game is based on: DirectX 9, DotNetFX 4.0, MS Visual C++ 2015.
#
# Issues known :
# - Error "HTTP Status: 500" when installing game v1.5.0
# - Game does not start (not even the main menu).

[ -z "$PLAYONLINUX" ] && exit 0
source "$PLAYONLINUX/lib/sources"
 
TITLE="Project Reality"
PREFIX="project_reality"
WORKING_WINE_VERSION="4.7"
AUTHOR="Dadu042"
EDITOR="?"
GAME_URL="https://www.realitymod.com/"

Set_OS "Win7"

POL_SetupWindow_Init
POL_Debug_Init
   
POL_SetupWindow_presentation "$TITLE" "$EDITOR" "$GAME_URL" "$AUTHOR" "$PREFIX"
   
POL_Wine_SelectPrefix "$PREFIX"
POL_System_SetArch "x86"
POL_Wine_PrefixCreate "$WORKING_WINE_VERSION"
POL_System_TmpCreate "$TITLE"

POL_Call POL_Install_d3dx9

# A 2015 would be better... Not yet available in POL (april 2019)
POL_Call POL_Install_vcrun2013

# No DotNet40fx available on Wine :(
POL_Call POL_Install_dotnet40
 
###############
# Go          #
###############

POL_SetupWindow_message  "Please note: Do not run the game at the end of the installation, finish first.\n" "$TITLE"

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"
POL_Wine_WaitExit "$TITLE"
cd "$POL_System_TmpDir"

POL_Shortcut "PRBF2.exe" "$TITLE" ""
POL_Shortcut "PRLauncher.exe" "$TITLE - Launcher" ""
POL_Shortcut "PRUpdater.exe" "$TITLE - Updater" ""

POL_Call POL_Install_VideoDriver

Set_WineWindowTitle "$TITLE"
 
POL_System_TmpDelete
POL_SetupWindow_Close
exit 0

 

Edité par Dadu042

Dadu042 Samedi 27 Avril 2019 à 21:58
Dadu042
Modérateur

After writing the script above, I found this talk frown : Linux - PRBF2 Now Partially Works through WINE (2016).

Here a other script version (did not work for me).

 

The error I get :

"PRLauncher.exe - Fatal Error.  CLR error: 80004005. The program will now terminate. <OK>"

[04/28/19 15:37:22] - Running wine-4.7 PRLauncher.exe (Working directory : /home/username/.PlayOnLinux/wineprefix/project_reality_2016/drive_c/Program Files/Project Reality/Project Reality BF2/mods/pr/bi0012:fixme:heap:RtlSetHeapInformation (nil) 1 (nil) 0 stub
Reality/Project Reality BF2/mods/pr/bi0012:fixme:heap:RtlSetHeapInformation (nil) 1 (nil) 0 stub
0012:fixme:process:SetProcessDEPPolicy (1): stub
0012:fixme:heap:RtlSetHeapInformation (nil) 1 (nil) 0 stub
0009:fixme:thread:SetThreadStackGuarantee (0x33fc64): stub

After searching the web I found that the issue is realted to Dotnet40, with dotnet461 the windows "select your profile/account" window does open.

 

#!/usr/bin/env playonlinux-bash
# Date : (2019-04-27 21-48)
# Last revision : (2019-04-27 21-48)
# Wine version used : see below
# Distribution used to test : Ubuntu 18.04 x64
# Script licence : GPL3
# Program licence :
#
# Playonlinux version used : 4.3.4
#
# This game is based on: DirectX 9, DotNetFX 4.0, MS Visual C++ 2015.
#
# Issues known :
# - Error "HTTP Status: 500" when installing game v1.5.0
# - Game does not start (not even the main menu).
 
[ -z "$PLAYONLINUX" ] && exit 0
source "$PLAYONLINUX/lib/sources"
 
TITLE="Project Reality"
PREFIX="project_reality_2016"
WORKING_WINE_VERSION="4.7"
AUTHOR="Dadu042"
EDITOR="?"
GAME_URL="https://www.realitymod.com/"
 
Set_OS "Win7"
 
POL_SetupWindow_Init
POL_Debug_Init
    
POL_SetupWindow_presentation "$TITLE" "$EDITOR" "$GAME_URL" "$AUTHOR" "$PREFIX"
    
POL_Wine_SelectPrefix "$PREFIX"
POL_System_SetArch "x86"
POL_Wine_PrefixCreate "$WORKING_WINE_VERSION"
POL_System_TmpCreate "$TITLE"

POL_Call POL_Install_corefonts
POL_Call POL_Install_d3dx9
POL_Call POL_Install_d3dcompiler_43

# A 2015 would be better... Not yet available in POL (april 2019)
POL_Call POL_Install_vcrun2012
 
# No DotNet40fx available on Wine :(
POL_Call POL_Install_dotnet40

POL_Call POL_Install_RegisterFonts

POL_Wine_OverrideDLL "native" "openal32"
 
###############
# Go          #
###############
 
POL_SetupWindow_message  "Please note: Do not run the game at the end of the installation, finish first.\n" "$TITLE"
 
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"
POL_Wine_WaitExit "$TITLE"
cd "$POL_System_TmpDir"
 
POL_Shortcut "PRBF2.exe" "$TITLE" ""
POL_Shortcut "PRLauncher.exe" "$TITLE - Launcher" ""
POL_Shortcut "PRUpdater.exe" "$TITLE - Updater" ""
 
POL_Call POL_Install_VideoDriver
 
Set_WineWindowTitle "$TITLE"
 
POL_System_TmpDelete
POL_SetupWindow_Close
exit 0

Edité par Dadu042

Dadu042 Dimanche 28 Avril 2019 à 18:18
Dadu042
Modérateur

Finally a working script, I posted in the area "Supported Software" : Project Reality: BF2.

I think that the main issue with this game is DotNet40.