Subnautica

Informations

Creator Message
lahtis

Information

This installer has been approved by the team.

Informations

Platforms:
Downloads: 11349
Wine: 3.14

Feedbacks

Description

Subnautica (2018) is an adventure survival game set in an open world environment and played from a first-person perspactive. Explore the game's world and survive the dangers. Wikipedia

Appdb.winehq.org

Source code

#!/usr/bin/env playonlinux-bash
# Date : (2017-01-24)
# Last revision : (2018-09-15 10:02)
# Distribution used to test : Ubuntu 16.04 LTS with NVIDIA geforce GTX 770 (lathis), Ubuntu 18.04 with Palit GeForce GTX 1070 (LinuxScripter)
# Author : lahtis, LinuxScripter
# Script licence : GPL3
# Licence : retail
# This installer pictures files found https://github.com/lahtis/playonlinux/blob/master/working/Subnautica/
       
[ "$PLAYONLINUX" = "" ] && exit 0
source "$PLAYONLINUX/lib/sources"
        
TITLE="Subnautica"
PREFIX="Subnautica"
WORKING_WINE_VERSION="3.14"
AUTHOR="lahtis, LinuxScripter"
EDITOR="Unknown Worlds"
GAME_URL="https://unknownworlds.com/subnautica/"
        
# Initialization
POL_GetSetupImages "http://files.playonlinux.com/resources/setups/$PREFIX/top.png" "http://files.playonlinux.com/resources/setups/$PREFIX/left.png" "$TITLE"
POL_SetupWindow_Init
POL_SetupWindow_SetID 3299
POL_Debug_Init
             
# Presentation
POL_SetupWindow_presentation "$TITLE" "$EDITOR" "$GAME_URL" "$AUTHOR" "$PREFIX"
        
# Create Prefix
POL_Wine_SelectPrefix "$PREFIX"
POL_System_SetArch "x64"
POL_Wine_PrefixCreate "$WORKING_WINE_VERSION"
POL_System_TmpCreate "$PREFIX"
  
POL_Call POL_Function_SetResolution
       
# Moving to TMP dir
cd "$POL_System_TmpDir"
      
# Installing mandatory dependencies
POL_Call POL_Install_corefonts #Steam UI is textless without it
POL_Call POL_Install_vcrun2013 #needed by the game itself
 
# Registery fix for the game crashing after quiting
cat << EOF > fix.reg
REGEDIT4
        
[HKEY_CURRENT_USER\Software\Wine\X11 Driver]
"UseTakeFocus"="N"

EOF
       
POL_Wine regedit.exe fix.reg
 
# Installing Steam
POL_SetupWindow_message "$(eval_gettext 'Do NOT launch Steam after instalation. Uncheck the Launch Steam option at the end of installation. Otherwise the game instalation will fail due to missing content servers in config file.')"
POL_Call POL_Install_steam
cd "$WINEPREFIX/drive_c/$PROGRAMFILES/Steam/config"
sed '27i                                "CS"                "valve511.steamcontent.com;valve501.steamcontent.com;valve517.steamcontent.com;valve557.steamcontent.com;valve513.steamcontent.com;valve535.steamcontent.com;valve546.steamcontent.com;valve538.steamcontent.com;valve536.steamcontent.com;valve530.steamcontent.com;valve559.steamcontent.com;valve545.steamcontent.com;valve518.steamcontent.com;valve548.steamcontent.com;valve555.steamcontent.com;valve556.steamcontent.com;valve506.steamcontent.com;valve544.steamcontent.com;valve525.steamcontent.com;valve567.steamcontent.com;valve521.steamcontent.com;valve510.steamcontent.com;valve542.steamcontent.com;valve519.steamcontent.com;valve526.steamcontent.com;valve504.steamcontent.com;valve500.steamcontent.com;valve554.steamcontent.com;valve562.steamcontent.com;valve524.steamcontent.com;valve502.steamcontent.com;valve505.steamcontent.com;valve547.steamcontent.com;valve560.steamcontent.com;valve503.steamcontent.com;valve507.steamcontent.com;valve553.steamcontent.com;valve520.steamcontent.com;valve550.steamcontent.com;valve531.steamcontent.com;valve558.steamcontent.com;valve552.steamcontent.com;valve563.steamcontent.com;valve540.steamcontent.com;valve541.steamcontent.com;valve537.steamcontent.com;valve528.steamcontent.com;valve523.steamcontent.com;valve512.steamcontent.com;valve532.steamcontent.com;valve561.steamcontent.com;valve549.steamcontent.com;valve522.steamcontent.com;valve514.steamcontent.com;valve551.steamcontent.com;valve564.steamcontent.com;valve543.steamcontent.com;valve565.steamcontent.com;valve529.steamcontent.com;valve539.steamcontent.com;valve566.steamcontent.com;valve165.steamcontent.com;valve959.steamcontent.com;valve164.steamcontent.com;valve1611.steamcontent.com;valve1601.steamcontent.com;valve1617.steamcontent.com;valve1603.steamcontent.com;valve1602.steamcontent.com;valve1610.steamcontent.com;valve1615.steamcontent.com;valve909.steamcontent.com;valve900.steamcontent.com;valve905.steamcontent.com;valve954.steamcontent.com;valve955.steamcontent.com;valve1612.steamcontent.com;valve1607.steamcontent.com;valve1608.steamcontent.com;valve1618.steamcontent.com;valve1619.steamcontent.com;valve1606.steamcontent.com;valve1605.steamcontent.com;valve1609.steamcontent.com;valve907.steamcontent.com;valve901.steamcontent.com;valve902.steamcontent.com;valve1604.steamcontent.com;valve908.steamcontent.com;valve950.steamcontent.com;valve957.steamcontent.com;valve903.steamcontent.com;valve1614.steamcontent.com;valve904.steamcontent.com;valve952.steamcontent.com;valve1616.steamcontent.com;valve1613.steamcontent.com;valve958.steamcontent.com;valve956.steamcontent.com;valve906.steamcontent.com"' config.vdf > config.vdf
cd "$WINEPREFIX/drive_c/$PROGRAMFILES/Steam"
POL_Wine "steam.exe" steam://install/264710
POL_Wine_WaitBefore "$TITLE"
       
# Shortcut
POL_Shortcut "steam.exe" "$TITLE" "$TITLE.png" "steam://rungameid/264710" "-no-ces-sandbox"
POL_SetupWindow_message "$(eval_gettext 'If the game crashes at startup, open a terminal and type:\necho 0|sudo tee /proc/sys/kernel/yama/ptrace_scope')"
POL_SetupWindow_message "$(eval_gettext 'Remember to go to Configure menu and write fixme-all in debug flags. This will increase the game's performance.')"
    
POL_System_TmpDelete
POL_SetupWindow_Close
exit 0

Contributions

Filters:

Contribute
Member Message
LinuxScripter Wednesday 5 February 2020 at 9:38
LinuxScripter Anonymous

Message

This game requires DXVK but we do not have it for POL4

Replies

LinuxScripter Sunday 26 August 2018 at 17:29
LinuxScripter Anonymous

Message

I've discovered something. You can increase the game performance quite a bit by installing d3dx11_42 and d3dx11_43 via winetricks. We don't have functions for those - only generic d3dx11 which changes nothing in terms of performance. This also fixes this anyoing issue when player keeps moving after releasing the WASD keys. The game is now about as smooth as on Windows.

Replies

Anonymous
Wednesday 29 August 2018 at 17:13
UPDATE: you also have to launch the game with -force-dx11 argument
Anonymous
Sunday 10 March 2019 at 22:38
How do you do that
Thursday 23 January 2020 at 21:38
http://wiki.playonlinux.com/index.php/The_Configuration_Window#.2816.29_-_Arguments_field
LinuxScripter Tuesday 21 August 2018 at 22:43
LinuxScripter Anonymous

Information

This update has been approved by the team.

Message

Updated wine version to 3.14, removed optional mod framework instalation (link for the file have changed and not sure about the QModFramework's state), reworked the dependencies, removed the steam fix for browser (which no longer works anyway and since Steam is droping support for xp and vista we can remove it).
The main issue is player keeps moving after releasing the movement keys. Pressing the opposite key fixes that.

Using -force-glcore45 helps with bigger saves and mods but it makes the in-game FPS counter invisible. Therefore using it would be ill-advised for testing how this game performs on Wine.

Differences

@@ -1,69 +1,71 @@
 #!/usr/bin/env playonlinux-bash
 # Date : (2017-01-24)
-# Last revision : (2018-06-01 14:10)
-# Distribution used to test : Ubuntu 16.04 LTS with NVIDIA geforce GTX 770 (lathis), Ubuntu 18.04 with Palit GeForce GTX 750 Ti (LinuxScripter)
+# Last revision : (2018-09-15 10:02)
+# Distribution used to test : Ubuntu 16.04 LTS with NVIDIA geforce GTX 770 (lathis), Ubuntu 18.04 with Palit GeForce GTX 1070 (LinuxScripter)
 # Author : lahtis, LinuxScripter
 # Script licence : GPL3
 # Licence : retail
 # This installer pictures files found https://github.com/lahtis/playonlinux/blob/master/working/Subnautica/
-      
+       
 [ "$PLAYONLINUX" = "" ] && exit 0
 source "$PLAYONLINUX/lib/sources"
-       
+        
 TITLE="Subnautica"
 PREFIX="Subnautica"
-WORKING_WINE_VERSION="3.9"
+WORKING_WINE_VERSION="3.14"
 AUTHOR="lahtis, LinuxScripter"
 EDITOR="Unknown Worlds"
 GAME_URL="https://unknownworlds.com/subnautica/"
-       
+        
 # Initialization
 POL_GetSetupImages "http://files.playonlinux.com/resources/setups/$PREFIX/top.png" "http://files.playonlinux.com/resources/setups/$PREFIX/left.png" "$TITLE"
 POL_SetupWindow_Init
 POL_SetupWindow_SetID 3299
 POL_Debug_Init
-            
+             
 # Presentation
 POL_SetupWindow_presentation "$TITLE" "$EDITOR" "$GAME_URL" "$AUTHOR" "$PREFIX"
-       
+        
 # Create Prefix
 POL_Wine_SelectPrefix "$PREFIX"
 POL_System_SetArch "x64"
 POL_Wine_PrefixCreate "$WORKING_WINE_VERSION"
 POL_System_TmpCreate "$PREFIX"
- 
+  
 POL_Call POL_Function_SetResolution
-      
-# Moving TMP dir
+       
+# Moving to TMP dir
 cd "$POL_System_TmpDir"
-     
+      
 # Installing mandatory dependencies
-POL_Call POL_Install_d3dx9_42 #increases game's smoothness, recommended on winehq
-POL_Call POL_Install_xact #removes errors about dwrite.dll being missing
-POL_Call POL_Install_vcrun2008 #needed for steam functions like Achievements
+POL_Call POL_Install_corefonts #Steam UI is textless without it
 POL_Call POL_Install_vcrun2013 #needed by the game itself
-
+ 
 # Registery fix for the game crashing after quiting
 cat << EOF > fix.reg
 REGEDIT4
-       
+        
 [HKEY_CURRENT_USER\Software\Wine\X11 Driver]
 "UseTakeFocus"="N"
+
 EOF
-      
+       
 POL_Wine regedit.exe fix.reg
-
+ 
 # Installing Steam
+POL_SetupWindow_message "$(eval_gettext 'Do NOT launch Steam after instalation. Uncheck the Launch Steam option at the end of installation. Otherwise the game instalation will fail due to missing content servers in config file.')"
 POL_Call POL_Install_steam
+cd "$WINEPREFIX/drive_c/$PROGRAMFILES/Steam/config"
+sed '27i                                "CS"                "valve511.steamcontent.com;valve501.steamcontent.com;valve517.steamcontent.com;valve557.steamcontent.com;valve513.steamcontent.com;valve535.steamcontent.com;valve546.steamcontent.com;valve538.steamcontent.com;valve536.steamcontent.com;valve530.steamcontent.com;valve559.steamcontent.com;valve545.steamcontent.com;valve518.steamcontent.com;valve548.steamcontent.com;valve555.steamcontent.com;valve556.steamcontent.com;valve506.steamcontent.com;valve544.steamcontent.com;valve525.steamcontent.com;valve567.steamcontent.com;valve521.steamcontent.com;valve510.steamcontent.com;valve542.steamcontent.com;valve519.steamcontent.com;valve526.steamcontent.com;valve504.steamcontent.com;valve500.steamcontent.com;valve554.steamcontent.com;valve562.steamcontent.com;valve524.steamcontent.com;valve502.steamcontent.com;valve505.steamcontent.com;valve547.steamcontent.com;valve560.steamcontent.com;valve503.steamcontent.com;valve507.steamcontent.com;valve553.steamcontent.com;valve520.steamcontent.com;valve550.steamcontent.com;valve531.steamcontent.com;valve558.steamcontent.com;valve552.steamcontent.com;valve563.steamcontent.com;valve540.steamcontent.com;valve541.steamcontent.com;valve537.steamcontent.com;valve528.steamcontent.com;valve523.steamcontent.com;valve512.steamcontent.com;valve532.steamcontent.com;valve561.steamcontent.com;valve549.steamcontent.com;valve522.steamcontent.com;valve514.steamcontent.com;valve551.steamcontent.com;valve564.steamcontent.com;valve543.steamcontent.com;valve565.steamcontent.com;valve529.steamcontent.com;valve539.steamcontent.com;valve566.steamcontent.com;valve165.steamcontent.com;valve959.steamcontent.com;valve164.steamcontent.com;valve1611.steamcontent.com;valve1601.steamcontent.com;valve1617.steamcontent.com;valve1603.steamcontent.com;valve1602.steamcontent.com;valve1610.steamcontent.com;valve1615.steamcontent.com;valve909.steamcontent.com;valve900.steamcontent.com;valve905.steamcontent.com;valve954.steamcontent.com;valve955.steamcontent.com;valve1612.steamcontent.com;valve1607.steamcontent.com;valve1608.steamcontent.com;valve1618.steamcontent.com;valve1619.steamcontent.com;valve1606.steamcontent.com;valve1605.steamcontent.com;valve1609.steamcontent.com;valve907.steamcontent.com;valve901.steamcontent.com;valve902.steamcontent.com;valve1604.steamcontent.com;valve908.steamcontent.com;valve950.steamcontent.com;valve957.steamcontent.com;valve903.steamcontent.com;valve1614.steamcontent.com;valve904.steamcontent.com;valve952.steamcontent.com;valve1616.steamcontent.com;valve1613.steamcontent.com;valve958.steamcontent.com;valve956.steamcontent.com;valve906.steamcontent.com"' config.vdf > config.vdf
 cd "$WINEPREFIX/drive_c/$PROGRAMFILES/Steam"
 POL_Wine "steam.exe" steam://install/264710
 POL_Wine_WaitBefore "$TITLE"
-      
-# Shortcut done before install for steam version
-POL_Shortcut "steam.exe" "$TITLE" "$TITLE.png" "steam://rungameid/264710"
+       
+# Shortcut
+POL_Shortcut "steam.exe" "$TITLE" "$TITLE.png" "steam://rungameid/264710" "-no-ces-sandbox"
 POL_SetupWindow_message "$(eval_gettext 'If the game crashes at startup, open a terminal and type:\necho 0|sudo tee /proc/sys/kernel/yama/ptrace_scope')"
 POL_SetupWindow_message "$(eval_gettext 'Remember to go to Configure menu and write fixme-all in debug flags. This will increase the game's performance.')"
-      
+    
 POL_System_TmpDelete
 POL_SetupWindow_Close
 exit 0
\ No newline at end of file

New source code

#!/usr/bin/env playonlinux-bash
# Date : (2017-01-24)
# Last revision : (2018-09-15 10:02)
# Distribution used to test : Ubuntu 16.04 LTS with NVIDIA geforce GTX 770 (lathis), Ubuntu 18.04 with Palit GeForce GTX 1070 (LinuxScripter)
# Author : lahtis, LinuxScripter
# Script licence : GPL3
# Licence : retail
# This installer pictures files found https://github.com/lahtis/playonlinux/blob/master/working/Subnautica/
       
[ "$PLAYONLINUX" = "" ] && exit 0
source "$PLAYONLINUX/lib/sources"
        
TITLE="Subnautica"
PREFIX="Subnautica"
WORKING_WINE_VERSION="3.14"
AUTHOR="lahtis, LinuxScripter"
EDITOR="Unknown Worlds"
GAME_URL="https://unknownworlds.com/subnautica/"
        
# Initialization
POL_GetSetupImages "http://files.playonlinux.com/resources/setups/$PREFIX/top.png" "http://files.playonlinux.com/resources/setups/$PREFIX/left.png" "$TITLE"
POL_SetupWindow_Init
POL_SetupWindow_SetID 3299
POL_Debug_Init
             
# Presentation
POL_SetupWindow_presentation "$TITLE" "$EDITOR" "$GAME_URL" "$AUTHOR" "$PREFIX"
        
# Create Prefix
POL_Wine_SelectPrefix "$PREFIX"
POL_System_SetArch "x64"
POL_Wine_PrefixCreate "$WORKING_WINE_VERSION"
POL_System_TmpCreate "$PREFIX"
  
POL_Call POL_Function_SetResolution
       
# Moving to TMP dir
cd "$POL_System_TmpDir"
      
# Installing mandatory dependencies
POL_Call POL_Install_corefonts #Steam UI is textless without it
POL_Call POL_Install_vcrun2013 #needed by the game itself
 
# Registery fix for the game crashing after quiting
cat << EOF > fix.reg
REGEDIT4
        
[HKEY_CURRENT_USER\Software\Wine\X11 Driver]
"UseTakeFocus"="N"

EOF
       
POL_Wine regedit.exe fix.reg
 
# Installing Steam
POL_SetupWindow_message "$(eval_gettext 'Do NOT launch Steam after instalation. Uncheck the Launch Steam option at the end of installation. Otherwise the game instalation will fail due to missing content servers in config file.')"
POL_Call POL_Install_steam
cd "$WINEPREFIX/drive_c/$PROGRAMFILES/Steam/config"
sed '27i                                "CS"                "valve511.steamcontent.com;valve501.steamcontent.com;valve517.steamcontent.com;valve557.steamcontent.com;valve513.steamcontent.com;valve535.steamcontent.com;valve546.steamcontent.com;valve538.steamcontent.com;valve536.steamcontent.com;valve530.steamcontent.com;valve559.steamcontent.com;valve545.steamcontent.com;valve518.steamcontent.com;valve548.steamcontent.com;valve555.steamcontent.com;valve556.steamcontent.com;valve506.steamcontent.com;valve544.steamcontent.com;valve525.steamcontent.com;valve567.steamcontent.com;valve521.steamcontent.com;valve510.steamcontent.com;valve542.steamcontent.com;valve519.steamcontent.com;valve526.steamcontent.com;valve504.steamcontent.com;valve500.steamcontent.com;valve554.steamcontent.com;valve562.steamcontent.com;valve524.steamcontent.com;valve502.steamcontent.com;valve505.steamcontent.com;valve547.steamcontent.com;valve560.steamcontent.com;valve503.steamcontent.com;valve507.steamcontent.com;valve553.steamcontent.com;valve520.steamcontent.com;valve550.steamcontent.com;valve531.steamcontent.com;valve558.steamcontent.com;valve552.steamcontent.com;valve563.steamcontent.com;valve540.steamcontent.com;valve541.steamcontent.com;valve537.steamcontent.com;valve528.steamcontent.com;valve523.steamcontent.com;valve512.steamcontent.com;valve532.steamcontent.com;valve561.steamcontent.com;valve549.steamcontent.com;valve522.steamcontent.com;valve514.steamcontent.com;valve551.steamcontent.com;valve564.steamcontent.com;valve543.steamcontent.com;valve565.steamcontent.com;valve529.steamcontent.com;valve539.steamcontent.com;valve566.steamcontent.com;valve165.steamcontent.com;valve959.steamcontent.com;valve164.steamcontent.com;valve1611.steamcontent.com;valve1601.steamcontent.com;valve1617.steamcontent.com;valve1603.steamcontent.com;valve1602.steamcontent.com;valve1610.steamcontent.com;valve1615.steamcontent.com;valve909.steamcontent.com;valve900.steamcontent.com;valve905.steamcontent.com;valve954.steamcontent.com;valve955.steamcontent.com;valve1612.steamcontent.com;valve1607.steamcontent.com;valve1608.steamcontent.com;valve1618.steamcontent.com;valve1619.steamcontent.com;valve1606.steamcontent.com;valve1605.steamcontent.com;valve1609.steamcontent.com;valve907.steamcontent.com;valve901.steamcontent.com;valve902.steamcontent.com;valve1604.steamcontent.com;valve908.steamcontent.com;valve950.steamcontent.com;valve957.steamcontent.com;valve903.steamcontent.com;valve1614.steamcontent.com;valve904.steamcontent.com;valve952.steamcontent.com;valve1616.steamcontent.com;valve1613.steamcontent.com;valve958.steamcontent.com;valve956.steamcontent.com;valve906.steamcontent.com"' config.vdf > config.vdf
cd "$WINEPREFIX/drive_c/$PROGRAMFILES/Steam"
POL_Wine "steam.exe" steam://install/264710
POL_Wine_WaitBefore "$TITLE"
       
# Shortcut
POL_Shortcut "steam.exe" "$TITLE" "$TITLE.png" "steam://rungameid/264710" "-no-ces-sandbox"
POL_SetupWindow_message "$(eval_gettext 'If the game crashes at startup, open a terminal and type:\necho 0|sudo tee /proc/sys/kernel/yama/ptrace_scope')"
POL_SetupWindow_message "$(eval_gettext 'Remember to go to Configure menu and write fixme-all in debug flags. This will increase the game's performance.')"
    
POL_System_TmpDelete
POL_SetupWindow_Close
exit 0

Replies

Anonymous
Friday 1 February 2019 at 14:34
sed '...' file > file is not quite right: bash will truncate the file before sed gets a chance to read it. Better use sed -i '...' file to have sed itself edit the file in-place.
Anonymous
Friday 1 February 2019 at 15:58
I understand but POL5 already have this fixed on every steam script.
LinuxScripter Monday 9 July 2018 at 18:36
LinuxScripter Anonymous

Warning

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

Message

Using the latest wine version (3.11 at this moment), removed/commented out some fixes because they no longer function, added a fix for Steam failing to download anything due to "content servers unavaiable" error (no list of CS in config file), added the option to install the framework for mods (works after an hour from downloading so token wont be an issue).

Differences

@@ -1,69 +1,86 @@
 #!/usr/bin/env playonlinux-bash
 # Date : (2017-01-24)
-# Last revision : (2018-06-01 14:10)
-# Distribution used to test : Ubuntu 16.04 LTS with NVIDIA geforce GTX 770 (lathis), Ubuntu 18.04 with Palit GeForce GTX 750 Ti (LinuxScripter)
+# Last revision : (2018-07-09 18:26)
+# Distribution used to test : Ubuntu 16.04 LTS with NVIDIA geforce GTX 770 (lathis), Ubuntu 18.04 with Palit GeForce GTX 1070 (LinuxScripter)
 # Author : lahtis, LinuxScripter
 # Script licence : GPL3
 # Licence : retail
 # This installer pictures files found https://github.com/lahtis/playonlinux/blob/master/working/Subnautica/
-      
+       
 [ "$PLAYONLINUX" = "" ] && exit 0
 source "$PLAYONLINUX/lib/sources"
-       
+        
 TITLE="Subnautica"
 PREFIX="Subnautica"
-WORKING_WINE_VERSION="3.9"
+WORKING_WINE_VERSION="3.11"
 AUTHOR="lahtis, LinuxScripter"
 EDITOR="Unknown Worlds"
 GAME_URL="https://unknownworlds.com/subnautica/"
-       
+        
 # Initialization
 POL_GetSetupImages "http://files.playonlinux.com/resources/setups/$PREFIX/top.png" "http://files.playonlinux.com/resources/setups/$PREFIX/left.png" "$TITLE"
 POL_SetupWindow_Init
 POL_SetupWindow_SetID 3299
 POL_Debug_Init
-            
+             
 # Presentation
 POL_SetupWindow_presentation "$TITLE" "$EDITOR" "$GAME_URL" "$AUTHOR" "$PREFIX"
-       
+        
 # Create Prefix
 POL_Wine_SelectPrefix "$PREFIX"
 POL_System_SetArch "x64"
 POL_Wine_PrefixCreate "$WORKING_WINE_VERSION"
 POL_System_TmpCreate "$PREFIX"
- 
+  
 POL_Call POL_Function_SetResolution
-      
-# Moving TMP dir
+       
+# Moving to TMP dir
 cd "$POL_System_TmpDir"
-     
+      
 # Installing mandatory dependencies
-POL_Call POL_Install_d3dx9_42 #increases game's smoothness, recommended on winehq
 POL_Call POL_Install_xact #removes errors about dwrite.dll being missing
-POL_Call POL_Install_vcrun2008 #needed for steam functions like Achievements
 POL_Call POL_Install_vcrun2013 #needed by the game itself
-
+ 
 # Registery fix for the game crashing after quiting
+# Fix for Steam Browser was commented out because it's not working anymore, still looking for a fix
 cat << EOF > fix.reg
 REGEDIT4
-       
+        
 [HKEY_CURRENT_USER\Software\Wine\X11 Driver]
 "UseTakeFocus"="N"
+:'
+[HKEY_CURRENT_USER\Software\Wine\AppDefaults\Steam.exe]
+"Version"="winxp64"
+ 
+[HKEY_CURRENT_USER\Software\Wine\AppDefaults\steamwebhelper.exe]
+"Version"="winxp64"
+'
 EOF
-      
+       
 POL_Wine regedit.exe fix.reg
-
+ 
 # Installing Steam
 POL_Call POL_Install_steam
+cd "$WINEPREFIX/drive_c/$PROGRAMFILES/Steam/config"
+sed '27i                                "CS"                "valve511.steamcontent.com;valve501.steamcontent.com;valve517.steamcontent.com;valve557.steamcontent.com;valve513.steamcontent.com;valve535.steamcontent.com;valve546.steamcontent.com;valve538.steamcontent.com;valve536.steamcontent.com;valve530.steamcontent.com;valve559.steamcontent.com;valve545.steamcontent.com;valve518.steamcontent.com;valve548.steamcontent.com;valve555.steamcontent.com;valve556.steamcontent.com;valve506.steamcontent.com;valve544.steamcontent.com;valve525.steamcontent.com;valve567.steamcontent.com;valve521.steamcontent.com;valve510.steamcontent.com;valve542.steamcontent.com;valve519.steamcontent.com;valve526.steamcontent.com;valve504.steamcontent.com;valve500.steamcontent.com;valve554.steamcontent.com;valve562.steamcontent.com;valve524.steamcontent.com;valve502.steamcontent.com;valve505.steamcontent.com;valve547.steamcontent.com;valve560.steamcontent.com;valve503.steamcontent.com;valve507.steamcontent.com;valve553.steamcontent.com;valve520.steamcontent.com;valve550.steamcontent.com;valve531.steamcontent.com;valve558.steamcontent.com;valve552.steamcontent.com;valve563.steamcontent.com;valve540.steamcontent.com;valve541.steamcontent.com;valve537.steamcontent.com;valve528.steamcontent.com;valve523.steamcontent.com;valve512.steamcontent.com;valve532.steamcontent.com;valve561.steamcontent.com;valve549.steamcontent.com;valve522.steamcontent.com;valve514.steamcontent.com;valve551.steamcontent.com;valve564.steamcontent.com;valve543.steamcontent.com;valve565.steamcontent.com;valve529.steamcontent.com;valve539.steamcontent.com;valve566.steamcontent.com;valve165.steamcontent.com;valve959.steamcontent.com;valve164.steamcontent.com;valve1611.steamcontent.com;valve1601.steamcontent.com;valve1617.steamcontent.com;valve1603.steamcontent.com;valve1602.steamcontent.com;valve1610.steamcontent.com;valve1615.steamcontent.com;valve909.steamcontent.com;valve900.steamcontent.com;valve905.steamcontent.com;valve954.steamcontent.com;valve955.steamcontent.com;valve1612.steamcontent.com;valve1607.steamcontent.com;valve1608.steamcontent.com;valve1618.steamcontent.com;valve1619.steamcontent.com;valve1606.steamcontent.com;valve1605.steamcontent.com;valve1609.steamcontent.com;valve907.steamcontent.com;valve901.steamcontent.com;valve902.steamcontent.com;valve1604.steamcontent.com;valve908.steamcontent.com;valve950.steamcontent.com;valve957.steamcontent.com;valve903.steamcontent.com;valve1614.steamcontent.com;valve904.steamcontent.com;valve952.steamcontent.com;valve1616.steamcontent.com;valve1613.steamcontent.com;valve958.steamcontent.com;valve956.steamcontent.com;valve906.steamcontent.com"' config.vdf > config.vdf
 cd "$WINEPREFIX/drive_c/$PROGRAMFILES/Steam"
 POL_Wine "steam.exe" steam://install/264710
 POL_Wine_WaitBefore "$TITLE"
-      
-# Shortcut done before install for steam version
-POL_Shortcut "steam.exe" "$TITLE" "$TITLE.png" "steam://rungameid/264710"
+       
+# Shortcut
+POL_Shortcut "steam.exe" "$TITLE" "$TITLE.png" "steam://rungameid/264710" "-no-ces-sandbox"
 POL_SetupWindow_message "$(eval_gettext 'If the game crashes at startup, open a terminal and type:\necho 0|sudo tee /proc/sys/kernel/yama/ptrace_scope')"
 POL_SetupWindow_message "$(eval_gettext 'Remember to go to Configure menu and write fixme-all in debug flags. This will increase the game's performance.')"
-      
+
+# Optional mod framework instalation
+POL_SetupWindow_question "Do you want to install the QMod framework in order to enable mods for $TITLE ?" "$TITLE"
+if [ "$APP_ANSWER" = "TRUE" ]; then
+    cd "$POL_System_TmpDir"
+    POL_Download http://filedelivery.nexusmods.com/1155/QModsSetup-16-1-2-1.exe?fid=334&ttl=1531154970&ri=8192&rs=8192&setec=4e3c18c0c0e99ed84fb9bcb03e01d3ff "b4136e56045ea7421f53ac178d749096"
+    POL_Wine "QModsSetup-16-1-2-1.exe"
+    POL_Wine_WaitBefore "$TITLE"
+fi
+    
 POL_System_TmpDelete
 POL_SetupWindow_Close
 exit 0
\ No newline at end of file

New source code

#!/usr/bin/env playonlinux-bash
# Date : (2017-01-24)
# Last revision : (2018-07-09 18:26)
# Distribution used to test : Ubuntu 16.04 LTS with NVIDIA geforce GTX 770 (lathis), Ubuntu 18.04 with Palit GeForce GTX 1070 (LinuxScripter)
# Author : lahtis, LinuxScripter
# Script licence : GPL3
# Licence : retail
# This installer pictures files found https://github.com/lahtis/playonlinux/blob/master/working/Subnautica/
       
[ "$PLAYONLINUX" = "" ] && exit 0
source "$PLAYONLINUX/lib/sources"
        
TITLE="Subnautica"
PREFIX="Subnautica"
WORKING_WINE_VERSION="3.11"
AUTHOR="lahtis, LinuxScripter"
EDITOR="Unknown Worlds"
GAME_URL="https://unknownworlds.com/subnautica/"
        
# Initialization
POL_GetSetupImages "http://files.playonlinux.com/resources/setups/$PREFIX/top.png" "http://files.playonlinux.com/resources/setups/$PREFIX/left.png" "$TITLE"
POL_SetupWindow_Init
POL_SetupWindow_SetID 3299
POL_Debug_Init
             
# Presentation
POL_SetupWindow_presentation "$TITLE" "$EDITOR" "$GAME_URL" "$AUTHOR" "$PREFIX"
        
# Create Prefix
POL_Wine_SelectPrefix "$PREFIX"
POL_System_SetArch "x64"
POL_Wine_PrefixCreate "$WORKING_WINE_VERSION"
POL_System_TmpCreate "$PREFIX"
  
POL_Call POL_Function_SetResolution
       
# Moving to TMP dir
cd "$POL_System_TmpDir"
      
# Installing mandatory dependencies
POL_Call POL_Install_xact #removes errors about dwrite.dll being missing
POL_Call POL_Install_vcrun2013 #needed by the game itself
 
# Registery fix for the game crashing after quiting
# Fix for Steam Browser was commented out because it's not working anymore, still looking for a fix
cat << EOF > fix.reg
REGEDIT4
        
[HKEY_CURRENT_USER\Software\Wine\X11 Driver]
"UseTakeFocus"="N"
:'
[HKEY_CURRENT_USER\Software\Wine\AppDefaults\Steam.exe]
"Version"="winxp64"
 
[HKEY_CURRENT_USER\Software\Wine\AppDefaults\steamwebhelper.exe]
"Version"="winxp64"
'
EOF
       
POL_Wine regedit.exe fix.reg
 
# Installing Steam
POL_Call POL_Install_steam
cd "$WINEPREFIX/drive_c/$PROGRAMFILES/Steam/config"
sed '27i                                "CS"                "valve511.steamcontent.com;valve501.steamcontent.com;valve517.steamcontent.com;valve557.steamcontent.com;valve513.steamcontent.com;valve535.steamcontent.com;valve546.steamcontent.com;valve538.steamcontent.com;valve536.steamcontent.com;valve530.steamcontent.com;valve559.steamcontent.com;valve545.steamcontent.com;valve518.steamcontent.com;valve548.steamcontent.com;valve555.steamcontent.com;valve556.steamcontent.com;valve506.steamcontent.com;valve544.steamcontent.com;valve525.steamcontent.com;valve567.steamcontent.com;valve521.steamcontent.com;valve510.steamcontent.com;valve542.steamcontent.com;valve519.steamcontent.com;valve526.steamcontent.com;valve504.steamcontent.com;valve500.steamcontent.com;valve554.steamcontent.com;valve562.steamcontent.com;valve524.steamcontent.com;valve502.steamcontent.com;valve505.steamcontent.com;valve547.steamcontent.com;valve560.steamcontent.com;valve503.steamcontent.com;valve507.steamcontent.com;valve553.steamcontent.com;valve520.steamcontent.com;valve550.steamcontent.com;valve531.steamcontent.com;valve558.steamcontent.com;valve552.steamcontent.com;valve563.steamcontent.com;valve540.steamcontent.com;valve541.steamcontent.com;valve537.steamcontent.com;valve528.steamcontent.com;valve523.steamcontent.com;valve512.steamcontent.com;valve532.steamcontent.com;valve561.steamcontent.com;valve549.steamcontent.com;valve522.steamcontent.com;valve514.steamcontent.com;valve551.steamcontent.com;valve564.steamcontent.com;valve543.steamcontent.com;valve565.steamcontent.com;valve529.steamcontent.com;valve539.steamcontent.com;valve566.steamcontent.com;valve165.steamcontent.com;valve959.steamcontent.com;valve164.steamcontent.com;valve1611.steamcontent.com;valve1601.steamcontent.com;valve1617.steamcontent.com;valve1603.steamcontent.com;valve1602.steamcontent.com;valve1610.steamcontent.com;valve1615.steamcontent.com;valve909.steamcontent.com;valve900.steamcontent.com;valve905.steamcontent.com;valve954.steamcontent.com;valve955.steamcontent.com;valve1612.steamcontent.com;valve1607.steamcontent.com;valve1608.steamcontent.com;valve1618.steamcontent.com;valve1619.steamcontent.com;valve1606.steamcontent.com;valve1605.steamcontent.com;valve1609.steamcontent.com;valve907.steamcontent.com;valve901.steamcontent.com;valve902.steamcontent.com;valve1604.steamcontent.com;valve908.steamcontent.com;valve950.steamcontent.com;valve957.steamcontent.com;valve903.steamcontent.com;valve1614.steamcontent.com;valve904.steamcontent.com;valve952.steamcontent.com;valve1616.steamcontent.com;valve1613.steamcontent.com;valve958.steamcontent.com;valve956.steamcontent.com;valve906.steamcontent.com"' config.vdf > config.vdf
cd "$WINEPREFIX/drive_c/$PROGRAMFILES/Steam"
POL_Wine "steam.exe" steam://install/264710
POL_Wine_WaitBefore "$TITLE"
       
# Shortcut
POL_Shortcut "steam.exe" "$TITLE" "$TITLE.png" "steam://rungameid/264710" "-no-ces-sandbox"
POL_SetupWindow_message "$(eval_gettext 'If the game crashes at startup, open a terminal and type:\necho 0|sudo tee /proc/sys/kernel/yama/ptrace_scope')"
POL_SetupWindow_message "$(eval_gettext 'Remember to go to Configure menu and write fixme-all in debug flags. This will increase the game's performance.')"

# Optional mod framework instalation
POL_SetupWindow_question "Do you want to install the QMod framework in order to enable mods for $TITLE ?" "$TITLE"
if [ "$APP_ANSWER" = "TRUE" ]; then
    cd "$POL_System_TmpDir"
    POL_Download http://filedelivery.nexusmods.com/1155/QModsSetup-16-1-2-1.exe?fid=334&ttl=1531154970&ri=8192&rs=8192&setec=4e3c18c0c0e99ed84fb9bcb03e01d3ff "b4136e56045ea7421f53ac178d749096"
    POL_Wine "QModsSetup-16-1-2-1.exe"
    POL_Wine_WaitBefore "$TITLE"
fi
    
POL_System_TmpDelete
POL_SetupWindow_Close
exit 0

Replies

Thursday 16 August 2018 at 17:49
There is not set os command. if empty steam say you are using XP and show warning. Steam will drop Windows XP and Vista support at the end of the year.
Anonymous
Tuesday 21 August 2018 at 22:30
3.0 uses windows 7 as default option. I'm aware of steam droping xp and vista. I'm redoing this script a little but discovered that using the -force-glcore45 command breaks the in-game fps command. And it actually increases the z-fighting to the point where the Cyclops looks ridicolous inside. But most important there is an issue when player keeps moving after releasing the movement keys. This isn't tied to the framerate very much. Changing to 3.14 helps a bit.
Wednesday 22 August 2018 at 23:24
Need a test of steam proton. (steam beta)
Anonymous
Thursday 23 August 2018 at 22:29
I've tried that just now. Vulkan will crash the game when changing graphics settings and loading the game. Used the -force-glcore45 parametr to play it. But the F1 menu and fps command are broken when using OpenGL. Is there a way to disable vulkan?
Anonymous
Thursday 23 August 2018 at 22:48
UPDATE: Seems like runing Subnautica on Proton/Steam Beta is like in vanilla Wine 3.7 so the mouse loses focus in menus.
LinuxScripter Friday 1 June 2018 at 14:09
LinuxScripter Anonymous

Warning

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

Message

Since Wine 3.9 forcing the game to use OpenGL is no longer required. This should gve you a boost in performance.

Differences

@@ -1,6 +1,6 @@
 #!/usr/bin/env playonlinux-bash
 # Date : (2017-01-24)
-# Last revision : (2017-02-11 20:56)
+# Last revision : (2018-06-01 14:10)
 # Distribution used to test : Ubuntu 16.04 LTS with NVIDIA geforce GTX 770 (lathis), Ubuntu 18.04 with Palit GeForce GTX 750 Ti (LinuxScripter)
 # Author : lahtis, LinuxScripter
 # Script licence : GPL3
@@ -12,7 +12,7 @@
        
 TITLE="Subnautica"
 PREFIX="Subnautica"
-WORKING_WINE_VERSION="3.1"
+WORKING_WINE_VERSION="3.9"
 AUTHOR="lahtis, LinuxScripter"
 EDITOR="Unknown Worlds"
 GAME_URL="https://unknownworlds.com/subnautica/"
@@ -61,7 +61,6 @@
       
 # Shortcut done before install for steam version
 POL_Shortcut "steam.exe" "$TITLE" "$TITLE.png" "steam://rungameid/264710"
-POL_SetupWindow_message "$(eval_gettext 'When running game add -force-glcore or -force-opengl\nto your launch options by right clicking the game under Properties, Launch Options.\nNewer Nvidia Proprietary Drivers will work with -force-glcore45, which is OpenGL 4.5.')" "$TITLE"
 POL_SetupWindow_message "$(eval_gettext 'If the game crashes at startup, open a terminal and type:\necho 0|sudo tee /proc/sys/kernel/yama/ptrace_scope')"
 POL_SetupWindow_message "$(eval_gettext 'Remember to go to Configure menu and write fixme-all in debug flags. This will increase the game's performance.')"
       

New source code

#!/usr/bin/env playonlinux-bash
# Date : (2017-01-24)
# Last revision : (2018-06-01 14:10)
# Distribution used to test : Ubuntu 16.04 LTS with NVIDIA geforce GTX 770 (lathis), Ubuntu 18.04 with Palit GeForce GTX 750 Ti (LinuxScripter)
# Author : lahtis, LinuxScripter
# Script licence : GPL3
# Licence : retail
# This installer pictures files found https://github.com/lahtis/playonlinux/blob/master/working/Subnautica/
      
[ "$PLAYONLINUX" = "" ] && exit 0
source "$PLAYONLINUX/lib/sources"
       
TITLE="Subnautica"
PREFIX="Subnautica"
WORKING_WINE_VERSION="3.9"
AUTHOR="lahtis, LinuxScripter"
EDITOR="Unknown Worlds"
GAME_URL="https://unknownworlds.com/subnautica/"
       
# Initialization
POL_GetSetupImages "http://files.playonlinux.com/resources/setups/$PREFIX/top.png" "http://files.playonlinux.com/resources/setups/$PREFIX/left.png" "$TITLE"
POL_SetupWindow_Init
POL_SetupWindow_SetID 3299
POL_Debug_Init
            
# Presentation
POL_SetupWindow_presentation "$TITLE" "$EDITOR" "$GAME_URL" "$AUTHOR" "$PREFIX"
       
# Create Prefix
POL_Wine_SelectPrefix "$PREFIX"
POL_System_SetArch "x64"
POL_Wine_PrefixCreate "$WORKING_WINE_VERSION"
POL_System_TmpCreate "$PREFIX"
 
POL_Call POL_Function_SetResolution
      
# Moving TMP dir
cd "$POL_System_TmpDir"
     
# Installing mandatory dependencies
POL_Call POL_Install_d3dx9_42 #increases game's smoothness, recommended on winehq
POL_Call POL_Install_xact #removes errors about dwrite.dll being missing
POL_Call POL_Install_vcrun2008 #needed for steam functions like Achievements
POL_Call POL_Install_vcrun2013 #needed by the game itself

# Registery fix for the game crashing after quiting
cat << EOF > fix.reg
REGEDIT4
       
[HKEY_CURRENT_USER\Software\Wine\X11 Driver]
"UseTakeFocus"="N"
EOF
      
POL_Wine regedit.exe fix.reg

# Installing Steam
POL_Call POL_Install_steam
cd "$WINEPREFIX/drive_c/$PROGRAMFILES/Steam"
POL_Wine "steam.exe" steam://install/264710
POL_Wine_WaitBefore "$TITLE"
      
# Shortcut done before install for steam version
POL_Shortcut "steam.exe" "$TITLE" "$TITLE.png" "steam://rungameid/264710"
POL_SetupWindow_message "$(eval_gettext 'If the game crashes at startup, open a terminal and type:\necho 0|sudo tee /proc/sys/kernel/yama/ptrace_scope')"
POL_SetupWindow_message "$(eval_gettext 'Remember to go to Configure menu and write fixme-all in debug flags. This will increase the game's performance.')"
      
POL_System_TmpDelete
POL_SetupWindow_Close
exit 0

Replies

Anonymous
Sunday 24 June 2018 at 11:17
Running PoL 4.2.12 on xenial everything works fine until game install via steam. Clicking next from the "disk space/choose location" screen gives Steam Error "content servers unavailable".
Anonymous
Sunday 8 July 2018 at 11:03
Sorry for late response haven't been visiting this site in a while I'll try to test this script using wine 3.11
Have you tried it again? This sound like an error on Steam's end and not a bug in Wine or POL.
Anonymous
Sunday 8 July 2018 at 11:45
UPDATE: turns out this is a Steam issue and it affects all games. A fresh instalation does not have a certian line in config.vdf file
A fix is aviable here:
https://bugs.winehq.org/show_bug.cgi?id=45329#c4
We might have to include this in POL_Install_steam
LinuxScripter Friday 27 April 2018 at 14:59
LinuxScripter Anonymous

Warning

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

Message

Another steam browser fix. This time it works.

Differences

@@ -49,6 +49,13 @@
        
 [HKEY_CURRENT_USER\Software\Wine\X11 Driver]
 "UseTakeFocus"="N"
+
+[HKEY_CURRENT_USER\Software\Wine\AppDefaults\Steam.exe]
+"Version"="winxp64"
+ 
+[HKEY_CURRENT_USER\Software\Wine\AppDefaults\steamwebhelper.exe]
+"Version"="winxp64"
+
 EOF
       
 POL_Wine regedit.exe fix.reg
@@ -60,7 +67,7 @@
 POL_Wine_WaitBefore "$TITLE"
       
 # Shortcut done before install for steam version
-POL_Shortcut "steam.exe" "$TITLE" "$TITLE.png" "steam://rungameid/264710"
+POL_Shortcut "steam.exe" "$TITLE" "$TITLE.png" "steam://rungameid/264710" "-no-ces-sandbox"
 POL_SetupWindow_message "$(eval_gettext 'When running game add -force-glcore or -force-opengl\nto your launch options by right clicking the game under Properties, Launch Options.\nNewer Nvidia Proprietary Drivers will work with -force-glcore45, which is OpenGL 4.5.')" "$TITLE"
 POL_SetupWindow_message "$(eval_gettext 'If the game crashes at startup, open a terminal and type:\necho 0|sudo tee /proc/sys/kernel/yama/ptrace_scope')"
 POL_SetupWindow_message "$(eval_gettext 'Remember to go to Configure menu and write fixme-all in debug flags. This will increase the game's performance.')"

New source code

#!/usr/bin/env playonlinux-bash
# Date : (2017-01-24)
# Last revision : (2017-02-11 20:56)
# Distribution used to test : Ubuntu 16.04 LTS with NVIDIA geforce GTX 770 (lathis), Ubuntu 18.04 with Palit GeForce GTX 750 Ti (LinuxScripter)
# Author : lahtis, LinuxScripter
# Script licence : GPL3
# Licence : retail
# This installer pictures files found https://github.com/lahtis/playonlinux/blob/master/working/Subnautica/
      
[ "$PLAYONLINUX" = "" ] && exit 0
source "$PLAYONLINUX/lib/sources"
       
TITLE="Subnautica"
PREFIX="Subnautica"
WORKING_WINE_VERSION="3.1"
AUTHOR="lahtis, LinuxScripter"
EDITOR="Unknown Worlds"
GAME_URL="https://unknownworlds.com/subnautica/"
       
# Initialization
POL_GetSetupImages "http://files.playonlinux.com/resources/setups/$PREFIX/top.png" "http://files.playonlinux.com/resources/setups/$PREFIX/left.png" "$TITLE"
POL_SetupWindow_Init
POL_SetupWindow_SetID 3299
POL_Debug_Init
            
# Presentation
POL_SetupWindow_presentation "$TITLE" "$EDITOR" "$GAME_URL" "$AUTHOR" "$PREFIX"
       
# Create Prefix
POL_Wine_SelectPrefix "$PREFIX"
POL_System_SetArch "x64"
POL_Wine_PrefixCreate "$WORKING_WINE_VERSION"
POL_System_TmpCreate "$PREFIX"
 
POL_Call POL_Function_SetResolution
      
# Moving TMP dir
cd "$POL_System_TmpDir"
     
# Installing mandatory dependencies
POL_Call POL_Install_d3dx9_42 #increases game's smoothness, recommended on winehq
POL_Call POL_Install_xact #removes errors about dwrite.dll being missing
POL_Call POL_Install_vcrun2008 #needed for steam functions like Achievements
POL_Call POL_Install_vcrun2013 #needed by the game itself

# Registery fix for the game crashing after quiting
cat << EOF > fix.reg
REGEDIT4
       
[HKEY_CURRENT_USER\Software\Wine\X11 Driver]
"UseTakeFocus"="N"

[HKEY_CURRENT_USER\Software\Wine\AppDefaults\Steam.exe]
"Version"="winxp64"
 
[HKEY_CURRENT_USER\Software\Wine\AppDefaults\steamwebhelper.exe]
"Version"="winxp64"

EOF
      
POL_Wine regedit.exe fix.reg

# Installing Steam
POL_Call POL_Install_steam
cd "$WINEPREFIX/drive_c/$PROGRAMFILES/Steam"
POL_Wine "steam.exe" steam://install/264710
POL_Wine_WaitBefore "$TITLE"
      
# Shortcut done before install for steam version
POL_Shortcut "steam.exe" "$TITLE" "$TITLE.png" "steam://rungameid/264710" "-no-ces-sandbox"
POL_SetupWindow_message "$(eval_gettext 'When running game add -force-glcore or -force-opengl\nto your launch options by right clicking the game under Properties, Launch Options.\nNewer Nvidia Proprietary Drivers will work with -force-glcore45, which is OpenGL 4.5.')" "$TITLE"
POL_SetupWindow_message "$(eval_gettext 'If the game crashes at startup, open a terminal and type:\necho 0|sudo tee /proc/sys/kernel/yama/ptrace_scope')"
POL_SetupWindow_message "$(eval_gettext 'Remember to go to Configure menu and write fixme-all in debug flags. This will increase the game's performance.')"
      
POL_System_TmpDelete
POL_SetupWindow_Close
exit 0

Replies

LinuxScripter Wednesday 25 April 2018 at 22:26
LinuxScripter Anonymous

Warning

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

Message

After reading on Steam's winehq page, I've decided to add a parameter to disable CES sandboxing. This should make the steam browser working.
 

Differences

@@ -60,7 +60,7 @@
 POL_Wine_WaitBefore "$TITLE"
       
 # Shortcut done before install for steam version
-POL_Shortcut "steam.exe" "$TITLE" "$TITLE.png" "steam://rungameid/264710"
+POL_Shortcut "steam.exe" "$TITLE" "$TITLE.png" "steam://rungameid/264710" "-no-ces-sandbox"
 POL_SetupWindow_message "$(eval_gettext 'When running game add -force-glcore or -force-opengl\nto your launch options by right clicking the game under Properties, Launch Options.\nNewer Nvidia Proprietary Drivers will work with -force-glcore45, which is OpenGL 4.5.')" "$TITLE"
 POL_SetupWindow_message "$(eval_gettext 'If the game crashes at startup, open a terminal and type:\necho 0|sudo tee /proc/sys/kernel/yama/ptrace_scope')"
 POL_SetupWindow_message "$(eval_gettext 'Remember to go to Configure menu and write fixme-all in debug flags. This will increase the game's performance.')"

New source code

#!/usr/bin/env playonlinux-bash
# Date : (2017-01-24)
# Last revision : (2017-02-11 20:56)
# Distribution used to test : Ubuntu 16.04 LTS with NVIDIA geforce GTX 770 (lathis), Ubuntu 18.04 with Palit GeForce GTX 750 Ti (LinuxScripter)
# Author : lahtis, LinuxScripter
# Script licence : GPL3
# Licence : retail
# This installer pictures files found https://github.com/lahtis/playonlinux/blob/master/working/Subnautica/
      
[ "$PLAYONLINUX" = "" ] && exit 0
source "$PLAYONLINUX/lib/sources"
       
TITLE="Subnautica"
PREFIX="Subnautica"
WORKING_WINE_VERSION="3.1"
AUTHOR="lahtis, LinuxScripter"
EDITOR="Unknown Worlds"
GAME_URL="https://unknownworlds.com/subnautica/"
       
# Initialization
POL_GetSetupImages "http://files.playonlinux.com/resources/setups/$PREFIX/top.png" "http://files.playonlinux.com/resources/setups/$PREFIX/left.png" "$TITLE"
POL_SetupWindow_Init
POL_SetupWindow_SetID 3299
POL_Debug_Init
            
# Presentation
POL_SetupWindow_presentation "$TITLE" "$EDITOR" "$GAME_URL" "$AUTHOR" "$PREFIX"
       
# Create Prefix
POL_Wine_SelectPrefix "$PREFIX"
POL_System_SetArch "x64"
POL_Wine_PrefixCreate "$WORKING_WINE_VERSION"
POL_System_TmpCreate "$PREFIX"
 
POL_Call POL_Function_SetResolution
      
# Moving TMP dir
cd "$POL_System_TmpDir"
     
# Installing mandatory dependencies
POL_Call POL_Install_d3dx9_42 #increases game's smoothness, recommended on winehq
POL_Call POL_Install_xact #removes errors about dwrite.dll being missing
POL_Call POL_Install_vcrun2008 #needed for steam functions like Achievements
POL_Call POL_Install_vcrun2013 #needed by the game itself

# Registery fix for the game crashing after quiting
cat << EOF > fix.reg
REGEDIT4
       
[HKEY_CURRENT_USER\Software\Wine\X11 Driver]
"UseTakeFocus"="N"
EOF
      
POL_Wine regedit.exe fix.reg

# Installing Steam
POL_Call POL_Install_steam
cd "$WINEPREFIX/drive_c/$PROGRAMFILES/Steam"
POL_Wine "steam.exe" steam://install/264710
POL_Wine_WaitBefore "$TITLE"
      
# Shortcut done before install for steam version
POL_Shortcut "steam.exe" "$TITLE" "$TITLE.png" "steam://rungameid/264710" "-no-ces-sandbox"
POL_SetupWindow_message "$(eval_gettext 'When running game add -force-glcore or -force-opengl\nto your launch options by right clicking the game under Properties, Launch Options.\nNewer Nvidia Proprietary Drivers will work with -force-glcore45, which is OpenGL 4.5.')" "$TITLE"
POL_SetupWindow_message "$(eval_gettext 'If the game crashes at startup, open a terminal and type:\necho 0|sudo tee /proc/sys/kernel/yama/ptrace_scope')"
POL_SetupWindow_message "$(eval_gettext 'Remember to go to Configure menu and write fixme-all in debug flags. This will increase the game's performance.')"
      
POL_System_TmpDelete
POL_SetupWindow_Close
exit 0

Replies

Anonymous
Thursday 26 April 2018 at 21:40
Steam browser is still not working for me.
Anonymous
Friday 27 April 2018 at 14:58
Looks like disabling ces snadboxing is no longer enough. There is another fix on winehq that makes steam.exe and webhelper run in windows xp x64 mode.
LinuxScripter Monday 12 February 2018 at 21:25
LinuxScripter Anonymous

Warning

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

Message

Same as my last contribution but including tutul's change from .jpg to .png
 

Differences

@@ -1,67 +1,70 @@
 #!/usr/bin/env playonlinux-bash
 # Date : (2017-01-24)
-# Last revision : (2017-02-07 23:00)
+# Last revision : (2017-02-11 20:56)
 # Distribution used to test : Ubuntu 16.04 LTS with NVIDIA geforce GTX 770 (lathis), Ubuntu 18.04 with Palit GeForce GTX 750 Ti (LinuxScripter)
 # Author : lahtis, LinuxScripter
 # Script licence : GPL3
 # Licence : retail
 # This installer pictures files found https://github.com/lahtis/playonlinux/blob/master/working/Subnautica/
-     
+      
 [ "$PLAYONLINUX" = "" ] && exit 0
 source "$PLAYONLINUX/lib/sources"
-      
+       
 TITLE="Subnautica"
 PREFIX="Subnautica"
 WORKING_WINE_VERSION="3.1"
 AUTHOR="lahtis, LinuxScripter"
 EDITOR="Unknown Worlds"
 GAME_URL="https://unknownworlds.com/subnautica/"
-      
+       
 # Initialization
 POL_GetSetupImages "http://files.playonlinux.com/resources/setups/$PREFIX/top.png" "http://files.playonlinux.com/resources/setups/$PREFIX/left.png" "$TITLE"
 POL_SetupWindow_Init
 POL_SetupWindow_SetID 3299
 POL_Debug_Init
-           
+            
 # Presentation
 POL_SetupWindow_presentation "$TITLE" "$EDITOR" "$GAME_URL" "$AUTHOR" "$PREFIX"
-      
+       
 # Create Prefix
 POL_Wine_SelectPrefix "$PREFIX"
 POL_System_SetArch "x64"
 POL_Wine_PrefixCreate "$WORKING_WINE_VERSION"
 POL_System_TmpCreate "$PREFIX"
-
-Poll_Call POL_Function_SetResolution
-     
+ 
+POL_Call POL_Function_SetResolution
+      
 # Moving TMP dir
 cd "$POL_System_TmpDir"
-    
+     
 # Installing mandatory dependencies
-POL_Call POL_Install_vcrun2013
-       
-# Registery fix
+POL_Call POL_Install_d3dx9_42 #increases game's smoothness, recommended on winehq
+POL_Call POL_Install_xact #removes errors about dwrite.dll being missing
+POL_Call POL_Install_vcrun2008 #needed for steam functions like Achievements
+POL_Call POL_Install_vcrun2013 #needed by the game itself
+
+# Registery fix for the game crashing after quiting
 cat << EOF > fix.reg
 REGEDIT4
-      
+       
 [HKEY_CURRENT_USER\Software\Wine\X11 Driver]
 "UseTakeFocus"="N"
 EOF
-     
+      
 POL_Wine regedit.exe fix.reg
-POL_Wine_WaitExit "$TITLE"
-    
+
 # Installing Steam
 POL_Call POL_Install_steam
 cd "$WINEPREFIX/drive_c/$PROGRAMFILES/Steam"
 POL_Wine "steam.exe" steam://install/264710
 POL_Wine_WaitBefore "$TITLE"
-     
+      
 # Shortcut done before install for steam version
 POL_Shortcut "steam.exe" "$TITLE" "$TITLE.png" "steam://rungameid/264710"
 POL_SetupWindow_message "$(eval_gettext 'When running game add -force-glcore or -force-opengl\nto your launch options by right clicking the game under Properties, Launch Options.\nNewer Nvidia Proprietary Drivers will work with -force-glcore45, which is OpenGL 4.5.')" "$TITLE"
 POL_SetupWindow_message "$(eval_gettext 'If the game crashes at startup, open a terminal and type:\necho 0|sudo tee /proc/sys/kernel/yama/ptrace_scope')"
-     
+POL_SetupWindow_message "$(eval_gettext 'Remember to go to Configure menu and write fixme-all in debug flags. This will increase the game's performance.')"
+      
 POL_System_TmpDelete
 POL_SetupWindow_Close
 exit 0
\ No newline at end of file

New source code

#!/usr/bin/env playonlinux-bash
# Date : (2017-01-24)
# Last revision : (2017-02-11 20:56)
# Distribution used to test : Ubuntu 16.04 LTS with NVIDIA geforce GTX 770 (lathis), Ubuntu 18.04 with Palit GeForce GTX 750 Ti (LinuxScripter)
# Author : lahtis, LinuxScripter
# Script licence : GPL3
# Licence : retail
# This installer pictures files found https://github.com/lahtis/playonlinux/blob/master/working/Subnautica/
      
[ "$PLAYONLINUX" = "" ] && exit 0
source "$PLAYONLINUX/lib/sources"
       
TITLE="Subnautica"
PREFIX="Subnautica"
WORKING_WINE_VERSION="3.1"
AUTHOR="lahtis, LinuxScripter"
EDITOR="Unknown Worlds"
GAME_URL="https://unknownworlds.com/subnautica/"
       
# Initialization
POL_GetSetupImages "http://files.playonlinux.com/resources/setups/$PREFIX/top.png" "http://files.playonlinux.com/resources/setups/$PREFIX/left.png" "$TITLE"
POL_SetupWindow_Init
POL_SetupWindow_SetID 3299
POL_Debug_Init
            
# Presentation
POL_SetupWindow_presentation "$TITLE" "$EDITOR" "$GAME_URL" "$AUTHOR" "$PREFIX"
       
# Create Prefix
POL_Wine_SelectPrefix "$PREFIX"
POL_System_SetArch "x64"
POL_Wine_PrefixCreate "$WORKING_WINE_VERSION"
POL_System_TmpCreate "$PREFIX"
 
POL_Call POL_Function_SetResolution
      
# Moving TMP dir
cd "$POL_System_TmpDir"
     
# Installing mandatory dependencies
POL_Call POL_Install_d3dx9_42 #increases game's smoothness, recommended on winehq
POL_Call POL_Install_xact #removes errors about dwrite.dll being missing
POL_Call POL_Install_vcrun2008 #needed for steam functions like Achievements
POL_Call POL_Install_vcrun2013 #needed by the game itself

# Registery fix for the game crashing after quiting
cat << EOF > fix.reg
REGEDIT4
       
[HKEY_CURRENT_USER\Software\Wine\X11 Driver]
"UseTakeFocus"="N"
EOF
      
POL_Wine regedit.exe fix.reg

# Installing Steam
POL_Call POL_Install_steam
cd "$WINEPREFIX/drive_c/$PROGRAMFILES/Steam"
POL_Wine "steam.exe" steam://install/264710
POL_Wine_WaitBefore "$TITLE"
      
# Shortcut done before install for steam version
POL_Shortcut "steam.exe" "$TITLE" "$TITLE.png" "steam://rungameid/264710"
POL_SetupWindow_message "$(eval_gettext 'When running game add -force-glcore or -force-opengl\nto your launch options by right clicking the game under Properties, Launch Options.\nNewer Nvidia Proprietary Drivers will work with -force-glcore45, which is OpenGL 4.5.')" "$TITLE"
POL_SetupWindow_message "$(eval_gettext 'If the game crashes at startup, open a terminal and type:\necho 0|sudo tee /proc/sys/kernel/yama/ptrace_scope')"
POL_SetupWindow_message "$(eval_gettext 'Remember to go to Configure menu and write fixme-all in debug flags. This will increase the game's performance.')"
      
POL_System_TmpDelete
POL_SetupWindow_Close
exit 0

Replies

Tuesday 13 February 2018 at 1:03
I remove the NO-CD flag because we don't need any.
Anonymous
Wednesday 14 February 2018 at 13:11
Can we get this script out of beta phase? Everything from start to end credits is working now. The only issue I can think of is the fps in-game debug command not displaying FPS in the upper left corner of the screen.\
Wednesday 14 February 2018 at 17:15
lathis can do it by editing. Or I but I'm on smartphone now so it's a bit small ^^"
Thursday 15 February 2018 at 1:42
no can do. not enough rights.
Thursday 15 February 2018 at 16:11
done
Anonymous
Tuesday 13 March 2018 at 12:35
The in-game fps command now works. The latest update to the game seems to have fixed the issue.
Tutul Monday 12 February 2018 at 18:03
Tutul

Warning

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

Message

Change image name for top/left to use png

Differences

@@ -18,7 +18,7 @@
 GAME_URL="https://unknownworlds.com/subnautica/"
       
 # Initialization
-POL_GetSetupImages "http://files.playonlinux.com/resources/setups/$PREFIX/top.jpg" "http://files.playonlinux.com/resources/setups/$PREFIX/left.jpg" "$TITLE"
+POL_GetSetupImages "http://files.playonlinux.com/resources/setups/$PREFIX/top.png" "http://files.playonlinux.com/resources/setups/$PREFIX/left.png" "$TITLE"
 POL_SetupWindow_Init
 POL_SetupWindow_SetID 3299
 POL_Debug_Init

New source code

#!/usr/bin/env playonlinux-bash
# Date : (2017-01-24)
# Last revision : (2017-02-07 23:00)
# Distribution used to test : Ubuntu 16.04 LTS with NVIDIA geforce GTX 770 (lathis), Ubuntu 18.04 with Palit GeForce GTX 750 Ti (LinuxScripter)
# Author : lahtis, LinuxScripter
# Script licence : GPL3
# Licence : retail
# This installer pictures files found https://github.com/lahtis/playonlinux/blob/master/working/Subnautica/
     
[ "$PLAYONLINUX" = "" ] && exit 0
source "$PLAYONLINUX/lib/sources"
      
TITLE="Subnautica"
PREFIX="Subnautica"
WORKING_WINE_VERSION="3.1"
AUTHOR="lahtis, LinuxScripter"
EDITOR="Unknown Worlds"
GAME_URL="https://unknownworlds.com/subnautica/"
      
# Initialization
POL_GetSetupImages "http://files.playonlinux.com/resources/setups/$PREFIX/top.png" "http://files.playonlinux.com/resources/setups/$PREFIX/left.png" "$TITLE"
POL_SetupWindow_Init
POL_SetupWindow_SetID 3299
POL_Debug_Init
           
# Presentation
POL_SetupWindow_presentation "$TITLE" "$EDITOR" "$GAME_URL" "$AUTHOR" "$PREFIX"
      
# Create Prefix
POL_Wine_SelectPrefix "$PREFIX"
POL_System_SetArch "x64"
POL_Wine_PrefixCreate "$WORKING_WINE_VERSION"
POL_System_TmpCreate "$PREFIX"

Poll_Call POL_Function_SetResolution
     
# Moving TMP dir
cd "$POL_System_TmpDir"
    
# Installing mandatory dependencies
POL_Call POL_Install_vcrun2013
       
# Registery fix
cat << EOF > fix.reg
REGEDIT4
      
[HKEY_CURRENT_USER\Software\Wine\X11 Driver]
"UseTakeFocus"="N"
EOF
     
POL_Wine regedit.exe fix.reg
POL_Wine_WaitExit "$TITLE"
    
# Installing Steam
POL_Call POL_Install_steam
cd "$WINEPREFIX/drive_c/$PROGRAMFILES/Steam"
POL_Wine "steam.exe" steam://install/264710
POL_Wine_WaitBefore "$TITLE"
     
# Shortcut done before install for steam version
POL_Shortcut "steam.exe" "$TITLE" "$TITLE.png" "steam://rungameid/264710"
POL_SetupWindow_message "$(eval_gettext 'When running game add -force-glcore or -force-opengl\nto your launch options by right clicking the game under Properties, Launch Options.\nNewer Nvidia Proprietary Drivers will work with -force-glcore45, which is OpenGL 4.5.')" "$TITLE"
POL_SetupWindow_message "$(eval_gettext 'If the game crashes at startup, open a terminal and type:\necho 0|sudo tee /proc/sys/kernel/yama/ptrace_scope')"
     
POL_System_TmpDelete
POL_SetupWindow_Close
exit 0

Replies

lahtis Sunday 11 February 2018 at 21:38
lahtis

Warning

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

Message

ok. Latest.

Differences

@@ -1,67 +1,70 @@
 #!/usr/bin/env playonlinux-bash
 # Date : (2017-01-24)
-# Last revision : (2017-02-07 23:00)
+# Last revision : (2017-02-11 20:56)
 # Distribution used to test : Ubuntu 16.04 LTS with NVIDIA geforce GTX 770 (lathis), Ubuntu 18.04 with Palit GeForce GTX 750 Ti (LinuxScripter)
 # Author : lahtis, LinuxScripter
 # Script licence : GPL3
 # Licence : retail
 # This installer pictures files found https://github.com/lahtis/playonlinux/blob/master/working/Subnautica/
-     
+       
 [ "$PLAYONLINUX" = "" ] && exit 0
 source "$PLAYONLINUX/lib/sources"
-      
+        
 TITLE="Subnautica"
 PREFIX="Subnautica"
 WORKING_WINE_VERSION="3.1"
 AUTHOR="lahtis, LinuxScripter"
 EDITOR="Unknown Worlds"
 GAME_URL="https://unknownworlds.com/subnautica/"
-      
+        
 # Initialization
 POL_GetSetupImages "http://files.playonlinux.com/resources/setups/$PREFIX/top.jpg" "http://files.playonlinux.com/resources/setups/$PREFIX/left.jpg" "$TITLE"
 POL_SetupWindow_Init
 POL_SetupWindow_SetID 3299
 POL_Debug_Init
-           
+             
 # Presentation
 POL_SetupWindow_presentation "$TITLE" "$EDITOR" "$GAME_URL" "$AUTHOR" "$PREFIX"
-      
+        
 # Create Prefix
 POL_Wine_SelectPrefix "$PREFIX"
 POL_System_SetArch "x64"
 POL_Wine_PrefixCreate "$WORKING_WINE_VERSION"
 POL_System_TmpCreate "$PREFIX"
-
-Poll_Call POL_Function_SetResolution
-     
+  
+POL_Call POL_Function_SetResolution
+       
 # Moving TMP dir
 cd "$POL_System_TmpDir"
-    
+      
 # Installing mandatory dependencies
-POL_Call POL_Install_vcrun2013
-       
-# Registery fix
+POL_Call POL_Install_d3dx9_42 #increases game's smoothness
+POL_Call POL_Install_xact #removes errors about dwrite.dll being missing
+POL_Call POL_Install_vcrun2008 #needed for steam functions like Achievements
+POL_Call POL_Install_vcrun2013 #needed by the game itself
+ 
+# Registery fix for the game crashing after quiting
 cat << EOF > fix.reg
 REGEDIT4
-      
+        
 [HKEY_CURRENT_USER\Software\Wine\X11 Driver]
 "UseTakeFocus"="N"
 EOF
-     
+       
 POL_Wine regedit.exe fix.reg
-POL_Wine_WaitExit "$TITLE"
-    
+ 
 # Installing Steam
 POL_Call POL_Install_steam
 cd "$WINEPREFIX/drive_c/$PROGRAMFILES/Steam"
 POL_Wine "steam.exe" steam://install/264710
 POL_Wine_WaitBefore "$TITLE"
-     
+       
 # Shortcut done before install for steam version
 POL_Shortcut "steam.exe" "$TITLE" "$TITLE.png" "steam://rungameid/264710"
 POL_SetupWindow_message "$(eval_gettext 'When running game add -force-glcore or -force-opengl\nto your launch options by right clicking the game under Properties, Launch Options.\nNewer Nvidia Proprietary Drivers will work with -force-glcore45, which is OpenGL 4.5.')" "$TITLE"
 POL_SetupWindow_message "$(eval_gettext 'If the game crashes at startup, open a terminal and type:\necho 0|sudo tee /proc/sys/kernel/yama/ptrace_scope')"
-     
+POL_SetupWindow_message "$(eval_gettext 'Remember to go to Configure menu and write fixme-all in debug flags. This will increase the game's performance.')"
+       
 POL_System_TmpDelete
 POL_SetupWindow_Close
 exit 0
\ No newline at end of file

New source code

#!/usr/bin/env playonlinux-bash
# Date : (2017-01-24)
# Last revision : (2017-02-11 20:56)
# Distribution used to test : Ubuntu 16.04 LTS with NVIDIA geforce GTX 770 (lathis), Ubuntu 18.04 with Palit GeForce GTX 750 Ti (LinuxScripter)
# Author : lahtis, LinuxScripter
# Script licence : GPL3
# Licence : retail
# This installer pictures files found https://github.com/lahtis/playonlinux/blob/master/working/Subnautica/
       
[ "$PLAYONLINUX" = "" ] && exit 0
source "$PLAYONLINUX/lib/sources"
        
TITLE="Subnautica"
PREFIX="Subnautica"
WORKING_WINE_VERSION="3.1"
AUTHOR="lahtis, LinuxScripter"
EDITOR="Unknown Worlds"
GAME_URL="https://unknownworlds.com/subnautica/"
        
# Initialization
POL_GetSetupImages "http://files.playonlinux.com/resources/setups/$PREFIX/top.jpg" "http://files.playonlinux.com/resources/setups/$PREFIX/left.jpg" "$TITLE"
POL_SetupWindow_Init
POL_SetupWindow_SetID 3299
POL_Debug_Init
             
# Presentation
POL_SetupWindow_presentation "$TITLE" "$EDITOR" "$GAME_URL" "$AUTHOR" "$PREFIX"
        
# Create Prefix
POL_Wine_SelectPrefix "$PREFIX"
POL_System_SetArch "x64"
POL_Wine_PrefixCreate "$WORKING_WINE_VERSION"
POL_System_TmpCreate "$PREFIX"
  
POL_Call POL_Function_SetResolution
       
# Moving TMP dir
cd "$POL_System_TmpDir"
      
# Installing mandatory dependencies
POL_Call POL_Install_d3dx9_42 #increases game's smoothness
POL_Call POL_Install_xact #removes errors about dwrite.dll being missing
POL_Call POL_Install_vcrun2008 #needed for steam functions like Achievements
POL_Call POL_Install_vcrun2013 #needed by the game itself
 
# Registery fix for the game crashing after quiting
cat << EOF > fix.reg
REGEDIT4
        
[HKEY_CURRENT_USER\Software\Wine\X11 Driver]
"UseTakeFocus"="N"
EOF
       
POL_Wine regedit.exe fix.reg
 
# Installing Steam
POL_Call POL_Install_steam
cd "$WINEPREFIX/drive_c/$PROGRAMFILES/Steam"
POL_Wine "steam.exe" steam://install/264710
POL_Wine_WaitBefore "$TITLE"
       
# Shortcut done before install for steam version
POL_Shortcut "steam.exe" "$TITLE" "$TITLE.png" "steam://rungameid/264710"
POL_SetupWindow_message "$(eval_gettext 'When running game add -force-glcore or -force-opengl\nto your launch options by right clicking the game under Properties, Launch Options.\nNewer Nvidia Proprietary Drivers will work with -force-glcore45, which is OpenGL 4.5.')" "$TITLE"
POL_SetupWindow_message "$(eval_gettext 'If the game crashes at startup, open a terminal and type:\necho 0|sudo tee /proc/sys/kernel/yama/ptrace_scope')"
POL_SetupWindow_message "$(eval_gettext 'Remember to go to Configure menu and write fixme-all in debug flags. This will increase the game's performance.')"
       
POL_System_TmpDelete
POL_SetupWindow_Close
exit 0

Replies

Anonymous
Sunday 11 February 2018 at 23:03
why did you uploaded the exact same script I just did?
Sunday 11 February 2018 at 23:56
I'mu curious too about that
lahtis Sunday 11 February 2018 at 21:36
lahtis

Warning

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

Differences

@@ -6,62 +6,61 @@
 # Script licence : GPL3
 # Licence : retail
 # This installer pictures files found https://github.com/lahtis/playonlinux/blob/master/working/Subnautica/
-     
+      
 [ "$PLAYONLINUX" = "" ] && exit 0
 source "$PLAYONLINUX/lib/sources"
-      
+       
 TITLE="Subnautica"
 PREFIX="Subnautica"
 WORKING_WINE_VERSION="3.1"
 AUTHOR="lahtis, LinuxScripter"
 EDITOR="Unknown Worlds"
 GAME_URL="https://unknownworlds.com/subnautica/"
-      
+       
 # Initialization
 POL_GetSetupImages "http://files.playonlinux.com/resources/setups/$PREFIX/top.jpg" "http://files.playonlinux.com/resources/setups/$PREFIX/left.jpg" "$TITLE"
 POL_SetupWindow_Init
 POL_SetupWindow_SetID 3299
 POL_Debug_Init
-           
+            
 # Presentation
 POL_SetupWindow_presentation "$TITLE" "$EDITOR" "$GAME_URL" "$AUTHOR" "$PREFIX"
-      
+       
 # Create Prefix
 POL_Wine_SelectPrefix "$PREFIX"
 POL_System_SetArch "x64"
 POL_Wine_PrefixCreate "$WORKING_WINE_VERSION"
 POL_System_TmpCreate "$PREFIX"
-
-Poll_Call POL_Function_SetResolution
-     
+ 
+POL_Call POL_Function_SetResolution
+      
 # Moving TMP dir
 cd "$POL_System_TmpDir"
-    
+     
 # Installing mandatory dependencies
 POL_Call POL_Install_vcrun2013
-       
+ 
 # Registery fix
 cat << EOF > fix.reg
 REGEDIT4
-      
+       
 [HKEY_CURRENT_USER\Software\Wine\X11 Driver]
 "UseTakeFocus"="N"
 EOF
-     
+      
 POL_Wine regedit.exe fix.reg
-POL_Wine_WaitExit "$TITLE"
-    
+ 
 # Installing Steam
 POL_Call POL_Install_steam
 cd "$WINEPREFIX/drive_c/$PROGRAMFILES/Steam"
 POL_Wine "steam.exe" steam://install/264710
-POL_Wine_WaitBefore "$TITLE"
-     
+POL_Wine_WaitExit "$TITLE"
+      
 # Shortcut done before install for steam version
 POL_Shortcut "steam.exe" "$TITLE" "$TITLE.png" "steam://rungameid/264710"
 POL_SetupWindow_message "$(eval_gettext 'When running game add -force-glcore or -force-opengl\nto your launch options by right clicking the game under Properties, Launch Options.\nNewer Nvidia Proprietary Drivers will work with -force-glcore45, which is OpenGL 4.5.')" "$TITLE"
 POL_SetupWindow_message "$(eval_gettext 'If the game crashes at startup, open a terminal and type:\necho 0|sudo tee /proc/sys/kernel/yama/ptrace_scope')"
-     
+      
 POL_System_TmpDelete
 POL_SetupWindow_Close
 exit 0
\ No newline at end of file

New source code

#!/usr/bin/env playonlinux-bash
# Date : (2017-01-24)
# Last revision : (2017-02-07 23:00)
# Distribution used to test : Ubuntu 16.04 LTS with NVIDIA geforce GTX 770 (lathis), Ubuntu 18.04 with Palit GeForce GTX 750 Ti (LinuxScripter)
# Author : lahtis, LinuxScripter
# Script licence : GPL3
# Licence : retail
# This installer pictures files found https://github.com/lahtis/playonlinux/blob/master/working/Subnautica/
      
[ "$PLAYONLINUX" = "" ] && exit 0
source "$PLAYONLINUX/lib/sources"
       
TITLE="Subnautica"
PREFIX="Subnautica"
WORKING_WINE_VERSION="3.1"
AUTHOR="lahtis, LinuxScripter"
EDITOR="Unknown Worlds"
GAME_URL="https://unknownworlds.com/subnautica/"
       
# Initialization
POL_GetSetupImages "http://files.playonlinux.com/resources/setups/$PREFIX/top.jpg" "http://files.playonlinux.com/resources/setups/$PREFIX/left.jpg" "$TITLE"
POL_SetupWindow_Init
POL_SetupWindow_SetID 3299
POL_Debug_Init
            
# Presentation
POL_SetupWindow_presentation "$TITLE" "$EDITOR" "$GAME_URL" "$AUTHOR" "$PREFIX"
       
# Create Prefix
POL_Wine_SelectPrefix "$PREFIX"
POL_System_SetArch "x64"
POL_Wine_PrefixCreate "$WORKING_WINE_VERSION"
POL_System_TmpCreate "$PREFIX"
 
POL_Call POL_Function_SetResolution
      
# Moving TMP dir
cd "$POL_System_TmpDir"
     
# Installing mandatory dependencies
POL_Call POL_Install_vcrun2013
 
# Registery fix
cat << EOF > fix.reg
REGEDIT4
       
[HKEY_CURRENT_USER\Software\Wine\X11 Driver]
"UseTakeFocus"="N"
EOF
      
POL_Wine regedit.exe fix.reg
 
# Installing Steam
POL_Call POL_Install_steam
cd "$WINEPREFIX/drive_c/$PROGRAMFILES/Steam"
POL_Wine "steam.exe" steam://install/264710
POL_Wine_WaitExit "$TITLE"
      
# Shortcut done before install for steam version
POL_Shortcut "steam.exe" "$TITLE" "$TITLE.png" "steam://rungameid/264710"
POL_SetupWindow_message "$(eval_gettext 'When running game add -force-glcore or -force-opengl\nto your launch options by right clicking the game under Properties, Launch Options.\nNewer Nvidia Proprietary Drivers will work with -force-glcore45, which is OpenGL 4.5.')" "$TITLE"
POL_SetupWindow_message "$(eval_gettext 'If the game crashes at startup, open a terminal and type:\necho 0|sudo tee /proc/sys/kernel/yama/ptrace_scope')"
      
POL_System_TmpDelete
POL_SetupWindow_Close
exit 0

Replies

LinuxScripter Sunday 11 February 2018 at 21:36
LinuxScripter Anonymous

Warning

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

Message

I think I have discovered a new issue we haven't seen when we were figuring out how to make mouse lot lose focus in menus. This issue makes the game think the character is moving even if you are no longer pressing the WASD keys (or whatever movement keys you have). Installing d3dx9_42,vcrun2008 and xact solves this, while also removing errors about missing dlls (dwrite and libcaf). Also added a note about disabling fixme messages in debug log for increased performance.

There is one minor issue left - right after Steam begins to load up (but before Subnautica does) I'm getting a non-fatal error about msvcr120.dll (in caps) missing. I've checked and it comes with vcrun2013, this dll is presend in both system32 and syswow64 folders and it's set to "native,builtin" in winecfg.

Differences

@@ -1,67 +1,70 @@
 #!/usr/bin/env playonlinux-bash
 # Date : (2017-01-24)
-# Last revision : (2017-02-07 23:00)
+# Last revision : (2017-02-11 20:56)
 # Distribution used to test : Ubuntu 16.04 LTS with NVIDIA geforce GTX 770 (lathis), Ubuntu 18.04 with Palit GeForce GTX 750 Ti (LinuxScripter)
 # Author : lahtis, LinuxScripter
 # Script licence : GPL3
 # Licence : retail
 # This installer pictures files found https://github.com/lahtis/playonlinux/blob/master/working/Subnautica/
-     
+      
 [ "$PLAYONLINUX" = "" ] && exit 0
 source "$PLAYONLINUX/lib/sources"
-      
+       
 TITLE="Subnautica"
 PREFIX="Subnautica"
 WORKING_WINE_VERSION="3.1"
 AUTHOR="lahtis, LinuxScripter"
 EDITOR="Unknown Worlds"
 GAME_URL="https://unknownworlds.com/subnautica/"
-      
+       
 # Initialization
 POL_GetSetupImages "http://files.playonlinux.com/resources/setups/$PREFIX/top.jpg" "http://files.playonlinux.com/resources/setups/$PREFIX/left.jpg" "$TITLE"
 POL_SetupWindow_Init
 POL_SetupWindow_SetID 3299
 POL_Debug_Init
-           
+            
 # Presentation
 POL_SetupWindow_presentation "$TITLE" "$EDITOR" "$GAME_URL" "$AUTHOR" "$PREFIX"
-      
+       
 # Create Prefix
 POL_Wine_SelectPrefix "$PREFIX"
 POL_System_SetArch "x64"
 POL_Wine_PrefixCreate "$WORKING_WINE_VERSION"
 POL_System_TmpCreate "$PREFIX"
-
-Poll_Call POL_Function_SetResolution
-     
+ 
+POL_Call POL_Function_SetResolution
+      
 # Moving TMP dir
 cd "$POL_System_TmpDir"
-    
+     
 # Installing mandatory dependencies
-POL_Call POL_Install_vcrun2013
-       
-# Registery fix
+POL_Call POL_Install_d3dx9_42 #increases game's smoothness
+POL_Call POL_Install_xact #removes errors about dwrite.dll being missing
+POL_Call POL_Install_vcrun2008 #needed for steam functions like Achievements
+POL_Call POL_Install_vcrun2013 #needed by the game itself
+
+# Registery fix for the game crashing after quiting
 cat << EOF > fix.reg
 REGEDIT4
-      
+       
 [HKEY_CURRENT_USER\Software\Wine\X11 Driver]
 "UseTakeFocus"="N"
 EOF
-     
+      
 POL_Wine regedit.exe fix.reg
-POL_Wine_WaitExit "$TITLE"
-    
+
 # Installing Steam
 POL_Call POL_Install_steam
 cd "$WINEPREFIX/drive_c/$PROGRAMFILES/Steam"
 POL_Wine "steam.exe" steam://install/264710
 POL_Wine_WaitBefore "$TITLE"
-     
+      
 # Shortcut done before install for steam version
 POL_Shortcut "steam.exe" "$TITLE" "$TITLE.png" "steam://rungameid/264710"
 POL_SetupWindow_message "$(eval_gettext 'When running game add -force-glcore or -force-opengl\nto your launch options by right clicking the game under Properties, Launch Options.\nNewer Nvidia Proprietary Drivers will work with -force-glcore45, which is OpenGL 4.5.')" "$TITLE"
 POL_SetupWindow_message "$(eval_gettext 'If the game crashes at startup, open a terminal and type:\necho 0|sudo tee /proc/sys/kernel/yama/ptrace_scope')"
-     
+POL_SetupWindow_message "$(eval_gettext 'Remember to go to Configure menu and write fixme-all in debug flags. This will increase the game's performance.')"
+      
 POL_System_TmpDelete
 POL_SetupWindow_Close
 exit 0
\ No newline at end of file

New source code

#!/usr/bin/env playonlinux-bash
# Date : (2017-01-24)
# Last revision : (2017-02-11 20:56)
# Distribution used to test : Ubuntu 16.04 LTS with NVIDIA geforce GTX 770 (lathis), Ubuntu 18.04 with Palit GeForce GTX 750 Ti (LinuxScripter)
# Author : lahtis, LinuxScripter
# Script licence : GPL3
# Licence : retail
# This installer pictures files found https://github.com/lahtis/playonlinux/blob/master/working/Subnautica/
      
[ "$PLAYONLINUX" = "" ] && exit 0
source "$PLAYONLINUX/lib/sources"
       
TITLE="Subnautica"
PREFIX="Subnautica"
WORKING_WINE_VERSION="3.1"
AUTHOR="lahtis, LinuxScripter"
EDITOR="Unknown Worlds"
GAME_URL="https://unknownworlds.com/subnautica/"
       
# Initialization
POL_GetSetupImages "http://files.playonlinux.com/resources/setups/$PREFIX/top.jpg" "http://files.playonlinux.com/resources/setups/$PREFIX/left.jpg" "$TITLE"
POL_SetupWindow_Init
POL_SetupWindow_SetID 3299
POL_Debug_Init
            
# Presentation
POL_SetupWindow_presentation "$TITLE" "$EDITOR" "$GAME_URL" "$AUTHOR" "$PREFIX"
       
# Create Prefix
POL_Wine_SelectPrefix "$PREFIX"
POL_System_SetArch "x64"
POL_Wine_PrefixCreate "$WORKING_WINE_VERSION"
POL_System_TmpCreate "$PREFIX"
 
POL_Call POL_Function_SetResolution
      
# Moving TMP dir
cd "$POL_System_TmpDir"
     
# Installing mandatory dependencies
POL_Call POL_Install_d3dx9_42 #increases game's smoothness
POL_Call POL_Install_xact #removes errors about dwrite.dll being missing
POL_Call POL_Install_vcrun2008 #needed for steam functions like Achievements
POL_Call POL_Install_vcrun2013 #needed by the game itself

# Registery fix for the game crashing after quiting
cat << EOF > fix.reg
REGEDIT4
       
[HKEY_CURRENT_USER\Software\Wine\X11 Driver]
"UseTakeFocus"="N"
EOF
      
POL_Wine regedit.exe fix.reg

# Installing Steam
POL_Call POL_Install_steam
cd "$WINEPREFIX/drive_c/$PROGRAMFILES/Steam"
POL_Wine "steam.exe" steam://install/264710
POL_Wine_WaitBefore "$TITLE"
      
# Shortcut done before install for steam version
POL_Shortcut "steam.exe" "$TITLE" "$TITLE.png" "steam://rungameid/264710"
POL_SetupWindow_message "$(eval_gettext 'When running game add -force-glcore or -force-opengl\nto your launch options by right clicking the game under Properties, Launch Options.\nNewer Nvidia Proprietary Drivers will work with -force-glcore45, which is OpenGL 4.5.')" "$TITLE"
POL_SetupWindow_message "$(eval_gettext 'If the game crashes at startup, open a terminal and type:\necho 0|sudo tee /proc/sys/kernel/yama/ptrace_scope')"
POL_SetupWindow_message "$(eval_gettext 'Remember to go to Configure menu and write fixme-all in debug flags. This will increase the game's performance.')"
      
POL_System_TmpDelete
POL_SetupWindow_Close
exit 0

Replies

Sunday 11 February 2018 at 21:42
i have debug flags "-all,fixme-all"
lahtis Sunday 11 February 2018 at 16:25
lahtis

Warning

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

Message

is this correct way to use waitBefore and waitexit.

Differences

@@ -32,14 +32,16 @@
 POL_Wine_PrefixCreate "$WORKING_WINE_VERSION"
 POL_System_TmpCreate "$PREFIX"
 
-Poll_Call POL_Function_SetResolution
+POL_Call POL_Function_SetResolution
      
 # Moving TMP dir
 cd "$POL_System_TmpDir"
     
 # Installing mandatory dependencies
 POL_Call POL_Install_vcrun2013
-       
+
+POL_Wine_WaitBefore "$TITLE"
+
 # Registery fix
 cat << EOF > fix.reg
 REGEDIT4
@@ -49,13 +51,12 @@
 EOF
      
 POL_Wine regedit.exe fix.reg
-POL_Wine_WaitExit "$TITLE"
-    
+
 # Installing Steam
 POL_Call POL_Install_steam
 cd "$WINEPREFIX/drive_c/$PROGRAMFILES/Steam"
 POL_Wine "steam.exe" steam://install/264710
-POL_Wine_WaitBefore "$TITLE"
+POL_Wine_WaitExit "$TITLE"
      
 # Shortcut done before install for steam version
 POL_Shortcut "steam.exe" "$TITLE" "$TITLE.png" "steam://rungameid/264710"

New source code

#!/usr/bin/env playonlinux-bash
# Date : (2017-01-24)
# Last revision : (2017-02-07 23:00)
# Distribution used to test : Ubuntu 16.04 LTS with NVIDIA geforce GTX 770 (lathis), Ubuntu 18.04 with Palit GeForce GTX 750 Ti (LinuxScripter)
# Author : lahtis, LinuxScripter
# Script licence : GPL3
# Licence : retail
# This installer pictures files found https://github.com/lahtis/playonlinux/blob/master/working/Subnautica/
     
[ "$PLAYONLINUX" = "" ] && exit 0
source "$PLAYONLINUX/lib/sources"
      
TITLE="Subnautica"
PREFIX="Subnautica"
WORKING_WINE_VERSION="3.1"
AUTHOR="lahtis, LinuxScripter"
EDITOR="Unknown Worlds"
GAME_URL="https://unknownworlds.com/subnautica/"
      
# Initialization
POL_GetSetupImages "http://files.playonlinux.com/resources/setups/$PREFIX/top.jpg" "http://files.playonlinux.com/resources/setups/$PREFIX/left.jpg" "$TITLE"
POL_SetupWindow_Init
POL_SetupWindow_SetID 3299
POL_Debug_Init
           
# Presentation
POL_SetupWindow_presentation "$TITLE" "$EDITOR" "$GAME_URL" "$AUTHOR" "$PREFIX"
      
# Create Prefix
POL_Wine_SelectPrefix "$PREFIX"
POL_System_SetArch "x64"
POL_Wine_PrefixCreate "$WORKING_WINE_VERSION"
POL_System_TmpCreate "$PREFIX"

POL_Call POL_Function_SetResolution
     
# Moving TMP dir
cd "$POL_System_TmpDir"
    
# Installing mandatory dependencies
POL_Call POL_Install_vcrun2013

POL_Wine_WaitBefore "$TITLE"

# Registery fix
cat << EOF > fix.reg
REGEDIT4
      
[HKEY_CURRENT_USER\Software\Wine\X11 Driver]
"UseTakeFocus"="N"
EOF
     
POL_Wine regedit.exe fix.reg

# Installing Steam
POL_Call POL_Install_steam
cd "$WINEPREFIX/drive_c/$PROGRAMFILES/Steam"
POL_Wine "steam.exe" steam://install/264710
POL_Wine_WaitExit "$TITLE"
     
# Shortcut done before install for steam version
POL_Shortcut "steam.exe" "$TITLE" "$TITLE.png" "steam://rungameid/264710"
POL_SetupWindow_message "$(eval_gettext 'When running game add -force-glcore or -force-opengl\nto your launch options by right clicking the game under Properties, Launch Options.\nNewer Nvidia Proprietary Drivers will work with -force-glcore45, which is OpenGL 4.5.')" "$TITLE"
POL_SetupWindow_message "$(eval_gettext 'If the game crashes at startup, open a terminal and type:\necho 0|sudo tee /proc/sys/kernel/yama/ptrace_scope')"
     
POL_System_TmpDelete
POL_SetupWindow_Close
exit 0

Replies

Anonymous
Sunday 11 February 2018 at 17:47
You do not need the POL_Wine_WaitBefore "$TITLE".
lahtis Sunday 11 February 2018 at 16:13
lahtis

Warning

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

Message

fix POLL_Call SetResolution function

Differences

@@ -32,7 +32,7 @@
 POL_Wine_PrefixCreate "$WORKING_WINE_VERSION"
 POL_System_TmpCreate "$PREFIX"
 
-Poll_Call POL_Function_SetResolution
+POL_Call POL_Function_SetResolution
      
 # Moving TMP dir
 cd "$POL_System_TmpDir"

New source code

#!/usr/bin/env playonlinux-bash
# Date : (2017-01-24)
# Last revision : (2017-02-07 23:00)
# Distribution used to test : Ubuntu 16.04 LTS with NVIDIA geforce GTX 770 (lathis), Ubuntu 18.04 with Palit GeForce GTX 750 Ti (LinuxScripter)
# Author : lahtis, LinuxScripter
# Script licence : GPL3
# Licence : retail
# This installer pictures files found https://github.com/lahtis/playonlinux/blob/master/working/Subnautica/
     
[ "$PLAYONLINUX" = "" ] && exit 0
source "$PLAYONLINUX/lib/sources"
      
TITLE="Subnautica"
PREFIX="Subnautica"
WORKING_WINE_VERSION="3.1"
AUTHOR="lahtis, LinuxScripter"
EDITOR="Unknown Worlds"
GAME_URL="https://unknownworlds.com/subnautica/"
      
# Initialization
POL_GetSetupImages "http://files.playonlinux.com/resources/setups/$PREFIX/top.jpg" "http://files.playonlinux.com/resources/setups/$PREFIX/left.jpg" "$TITLE"
POL_SetupWindow_Init
POL_SetupWindow_SetID 3299
POL_Debug_Init
           
# Presentation
POL_SetupWindow_presentation "$TITLE" "$EDITOR" "$GAME_URL" "$AUTHOR" "$PREFIX"
      
# Create Prefix
POL_Wine_SelectPrefix "$PREFIX"
POL_System_SetArch "x64"
POL_Wine_PrefixCreate "$WORKING_WINE_VERSION"
POL_System_TmpCreate "$PREFIX"

POL_Call POL_Function_SetResolution
     
# Moving TMP dir
cd "$POL_System_TmpDir"
    
# Installing mandatory dependencies
POL_Call POL_Install_vcrun2013
       
# Registery fix
cat << EOF > fix.reg
REGEDIT4
      
[HKEY_CURRENT_USER\Software\Wine\X11 Driver]
"UseTakeFocus"="N"
EOF
     
POL_Wine regedit.exe fix.reg
POL_Wine_WaitExit "$TITLE"
    
# Installing Steam
POL_Call POL_Install_steam
cd "$WINEPREFIX/drive_c/$PROGRAMFILES/Steam"
POL_Wine "steam.exe" steam://install/264710
POL_Wine_WaitBefore "$TITLE"
     
# Shortcut done before install for steam version
POL_Shortcut "steam.exe" "$TITLE" "$TITLE.png" "steam://rungameid/264710"
POL_SetupWindow_message "$(eval_gettext 'When running game add -force-glcore or -force-opengl\nto your launch options by right clicking the game under Properties, Launch Options.\nNewer Nvidia Proprietary Drivers will work with -force-glcore45, which is OpenGL 4.5.')" "$TITLE"
POL_SetupWindow_message "$(eval_gettext 'If the game crashes at startup, open a terminal and type:\necho 0|sudo tee /proc/sys/kernel/yama/ptrace_scope')"
     
POL_System_TmpDelete
POL_SetupWindow_Close
exit 0

Replies

lahtis Thursday 8 February 2018 at 19:17
lahtis

Warning

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

Differences

@@ -1,80 +1,67 @@
-#!/usr/bin/env playonlinux-bash 
+#!/usr/bin/env playonlinux-bash
 # Date : (2017-01-24)
-# Last revision : (2017-02-04 03:07)
-# Distribution used to test : Ubuntu 16.04 LTS, NVIDIA geforce GTX 770, 
-# Author : lahtis
+# Last revision : (2017-02-07 23:00)
+# Distribution used to test : Ubuntu 16.04 LTS with NVIDIA geforce GTX 770 (lathis), Ubuntu 18.04 with Palit GeForce GTX 750 Ti (LinuxScripter)
+# Author : lahtis, LinuxScripter
+# Script licence : GPL3
 # Licence : retail
-# PlayOnLinux: 4.2.12
-# working 99%, it has unity engine mouse focus menu issues.
-# Mouse losing focus in menus (can be fixed by pressing start on the keyboard and clicking on other windows but that also makes camera movement crazy)
 # This installer pictures files found https://github.com/lahtis/playonlinux/blob/master/working/Subnautica/
-
+     
 [ "$PLAYONLINUX" = "" ] && exit 0
 source "$PLAYONLINUX/lib/sources"
- 
-PREFIX="Subnautica"
-WINEVERSION="3.1"
+      
 TITLE="Subnautica"
+PREFIX="Subnautica"
+WORKING_WINE_VERSION="3.1"
+AUTHOR="lahtis, LinuxScripter"
 EDITOR="Unknown Worlds"
 GAME_URL="https://unknownworlds.com/subnautica/"
-AUTHOR="lahtis"
- 
+      
 # Initialization
 POL_GetSetupImages "http://files.playonlinux.com/resources/setups/$PREFIX/top.jpg" "http://files.playonlinux.com/resources/setups/$PREFIX/left.jpg" "$TITLE"
 POL_SetupWindow_Init
 POL_SetupWindow_SetID 3299
 POL_Debug_Init
-      
+           
 # Presentation
 POL_SetupWindow_presentation "$TITLE" "$EDITOR" "$GAME_URL" "$AUTHOR" "$PREFIX"
- 
+      
 # Create Prefix
 POL_Wine_SelectPrefix "$PREFIX"
 POL_System_SetArch "x64"
-POL_Wine_PrefixCreate "$WINEVERSION" 
-STEAM_ID="264710"
-Set_OS "winxp"
+POL_Wine_PrefixCreate "$WORKING_WINE_VERSION"
 POL_System_TmpCreate "$PREFIX"
 
+Poll_Call POL_Function_SetResolution
+     
 # Moving TMP dir
 cd "$POL_System_TmpDir"
-  
+    
+# Installing mandatory dependencies
+POL_Call POL_Install_vcrun2013
+       
 # Registery fix
-POL_SetupWindow_message "$(eval_gettext 'Modifying register.')" "$TITLE"
-
 cat << EOF > fix.reg
 REGEDIT4
- 
-[HKEY_CURRENT_USER\Software\Wine\AppDefaults\Steam.exe]
-"Version"="winxp64"
-
-[HKEY_CURRENT_USER\Software\Wine\AppDefaults\steamwebhelper.exe]
-"Version"="winxp64"
-
+      
 [HKEY_CURRENT_USER\Software\Wine\X11 Driver]
 "UseTakeFocus"="N"
 EOF
-
+     
 POL_Wine regedit.exe fix.reg
 POL_Wine_WaitExit "$TITLE"
- 
-# Installing mandatory dependencies
-POL_Call POL_Install_vcrun2013
-POL_Call POL_Install_corefonts
-
+    
 # Installing Steam
 POL_Call POL_Install_steam
-POL_SetupWindow_message "$(eval_gettext 'Install $TITLE in Steam. Run the $TITLE when Steam is installed the game.')" "$TITLE"
 cd "$WINEPREFIX/drive_c/$PROGRAMFILES/Steam"
-POL_Wine "steam.exe" steam://install/$STEAM_ID -no-cef-sandbox
+POL_Wine "steam.exe" steam://install/264710
 POL_Wine_WaitBefore "$TITLE"
-
+     
 # Shortcut done before install for steam version
-POL_Shortcut "steam.exe" "$TITLE (Steam)" "$TITLE.png" "steam://rungameid/$STEAM_ID"
-      
+POL_Shortcut "steam.exe" "$TITLE" "$TITLE.png" "steam://rungameid/264710"
 POL_SetupWindow_message "$(eval_gettext 'When running game add -force-glcore or -force-opengl\nto your launch options by right clicking the game under Properties, Launch Options.\nNewer Nvidia Proprietary Drivers will work with -force-glcore45, which is OpenGL 4.5.')" "$TITLE"
 POL_SetupWindow_message "$(eval_gettext 'If the game crashes at startup, open a terminal and type:\necho 0|sudo tee /proc/sys/kernel/yama/ptrace_scope')"
-
+     
 POL_System_TmpDelete
 POL_SetupWindow_Close
 exit 0
\ No newline at end of file

New source code

#!/usr/bin/env playonlinux-bash
# Date : (2017-01-24)
# Last revision : (2017-02-07 23:00)
# Distribution used to test : Ubuntu 16.04 LTS with NVIDIA geforce GTX 770 (lathis), Ubuntu 18.04 with Palit GeForce GTX 750 Ti (LinuxScripter)
# Author : lahtis, LinuxScripter
# Script licence : GPL3
# Licence : retail
# This installer pictures files found https://github.com/lahtis/playonlinux/blob/master/working/Subnautica/
     
[ "$PLAYONLINUX" = "" ] && exit 0
source "$PLAYONLINUX/lib/sources"
      
TITLE="Subnautica"
PREFIX="Subnautica"
WORKING_WINE_VERSION="3.1"
AUTHOR="lahtis, LinuxScripter"
EDITOR="Unknown Worlds"
GAME_URL="https://unknownworlds.com/subnautica/"
      
# Initialization
POL_GetSetupImages "http://files.playonlinux.com/resources/setups/$PREFIX/top.jpg" "http://files.playonlinux.com/resources/setups/$PREFIX/left.jpg" "$TITLE"
POL_SetupWindow_Init
POL_SetupWindow_SetID 3299
POL_Debug_Init
           
# Presentation
POL_SetupWindow_presentation "$TITLE" "$EDITOR" "$GAME_URL" "$AUTHOR" "$PREFIX"
      
# Create Prefix
POL_Wine_SelectPrefix "$PREFIX"
POL_System_SetArch "x64"
POL_Wine_PrefixCreate "$WORKING_WINE_VERSION"
POL_System_TmpCreate "$PREFIX"

Poll_Call POL_Function_SetResolution
     
# Moving TMP dir
cd "$POL_System_TmpDir"
    
# Installing mandatory dependencies
POL_Call POL_Install_vcrun2013
       
# Registery fix
cat << EOF > fix.reg
REGEDIT4
      
[HKEY_CURRENT_USER\Software\Wine\X11 Driver]
"UseTakeFocus"="N"
EOF
     
POL_Wine regedit.exe fix.reg
POL_Wine_WaitExit "$TITLE"
    
# Installing Steam
POL_Call POL_Install_steam
cd "$WINEPREFIX/drive_c/$PROGRAMFILES/Steam"
POL_Wine "steam.exe" steam://install/264710
POL_Wine_WaitBefore "$TITLE"
     
# Shortcut done before install for steam version
POL_Shortcut "steam.exe" "$TITLE" "$TITLE.png" "steam://rungameid/264710"
POL_SetupWindow_message "$(eval_gettext 'When running game add -force-glcore or -force-opengl\nto your launch options by right clicking the game under Properties, Launch Options.\nNewer Nvidia Proprietary Drivers will work with -force-glcore45, which is OpenGL 4.5.')" "$TITLE"
POL_SetupWindow_message "$(eval_gettext 'If the game crashes at startup, open a terminal and type:\necho 0|sudo tee /proc/sys/kernel/yama/ptrace_scope')"
     
POL_System_TmpDelete
POL_SetupWindow_Close
exit 0

Replies

Anonymous
Sunday 11 February 2018 at 12:42
It's POL_Call not Poll_Call. Also why do you use POL_Wine_WaitExit "$TITLE" after adding registry entry?
lahtis Thursday 8 February 2018 at 19:16
lahtis

Warning

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

Differences

@@ -1,80 +1,68 @@
-#!/usr/bin/env playonlinux-bash 
+#!/usr/bin/env playonlinux-bash
 # Date : (2017-01-24)
-# Last revision : (2017-02-04 03:07)
-# Distribution used to test : Ubuntu 16.04 LTS, NVIDIA geforce GTX 770, 
-# Author : lahtis
+# Last revision : (2017-02-07 23:00)
+# Distribution used to test : Ubuntu 16.04 LTS with NVIDIA geforce GTX 770 (lathis), Ubuntu 18.04 with Palit GeForce GTX 750 Ti (LinuxScripter)
+# Author : lahtis, LinuxScripter
+# Script licence : GPL3
 # Licence : retail
-# PlayOnLinux: 4.2.12
-# working 99%, it has unity engine mouse focus menu issues.
-# Mouse losing focus in menus (can be fixed by pressing start on the keyboard and clicking on other windows but that also makes camera movement crazy)
 # This installer pictures files found https://github.com/lahtis/playonlinux/blob/master/working/Subnautica/
-
+    
 [ "$PLAYONLINUX" = "" ] && exit 0
 source "$PLAYONLINUX/lib/sources"
- 
-PREFIX="Subnautica"
-WINEVERSION="3.1"
+     
 TITLE="Subnautica"
+PREFIX="Subnautica"
+WORKING_WINE_VERSION="3.1"
+AUTHOR="lahtis, LinuxScripter"
 EDITOR="Unknown Worlds"
 GAME_URL="https://unknownworlds.com/subnautica/"
-AUTHOR="lahtis"
- 
+     
 # Initialization
 POL_GetSetupImages "http://files.playonlinux.com/resources/setups/$PREFIX/top.jpg" "http://files.playonlinux.com/resources/setups/$PREFIX/left.jpg" "$TITLE"
 POL_SetupWindow_Init
 POL_SetupWindow_SetID 3299
 POL_Debug_Init
-      
+          
 # Presentation
 POL_SetupWindow_presentation "$TITLE" "$EDITOR" "$GAME_URL" "$AUTHOR" "$PREFIX"
- 
+     
 # Create Prefix
 POL_Wine_SelectPrefix "$PREFIX"
 POL_System_SetArch "x64"
-POL_Wine_PrefixCreate "$WINEVERSION" 
-STEAM_ID="264710"
-Set_OS "winxp"
+POL_Wine_PrefixCreate "$WORKING_WINE_VERSION"
 POL_System_TmpCreate "$PREFIX"
-
+POL_SetupWindow_message "The game uses a virtual desktop through Wine, likely because it has graphical glitches without it. You can turn that off if you want to test without it: Configure -> select virtual drive -> Wine tab -> Wine Configuration -> Graphics tab -> uncheck Emulate a Virtual Desktop\n\nThough, it may cause graphic glitches. When someone has added that into the script, it is usually the case that it is somewhat broken without it. From that same graphics tab, though, you can increase the resolution of the virtual desktop, and that will enable you to set it for any size." "Set virtual desktop resolution."
+  
+Poll_Call POL_Function_SetResolution
+    
 # Moving TMP dir
 cd "$POL_System_TmpDir"
-  
+   
+# Installing mandatory dependencies
+POL_Call POL_Install_vcrun2013
+      
 # Registery fix
-POL_SetupWindow_message "$(eval_gettext 'Modifying register.')" "$TITLE"
-
 cat << EOF > fix.reg
 REGEDIT4
- 
-[HKEY_CURRENT_USER\Software\Wine\AppDefaults\Steam.exe]
-"Version"="winxp64"
-
-[HKEY_CURRENT_USER\Software\Wine\AppDefaults\steamwebhelper.exe]
-"Version"="winxp64"
-
+     
 [HKEY_CURRENT_USER\Software\Wine\X11 Driver]
 "UseTakeFocus"="N"
 EOF
-
+    
 POL_Wine regedit.exe fix.reg
 POL_Wine_WaitExit "$TITLE"
- 
-# Installing mandatory dependencies
-POL_Call POL_Install_vcrun2013
-POL_Call POL_Install_corefonts
-
+   
 # Installing Steam
 POL_Call POL_Install_steam
-POL_SetupWindow_message "$(eval_gettext 'Install $TITLE in Steam. Run the $TITLE when Steam is installed the game.')" "$TITLE"
 cd "$WINEPREFIX/drive_c/$PROGRAMFILES/Steam"
-POL_Wine "steam.exe" steam://install/$STEAM_ID -no-cef-sandbox
+POL_Wine "steam.exe" steam://install/264710
 POL_Wine_WaitBefore "$TITLE"
-
+    
 # Shortcut done before install for steam version
-POL_Shortcut "steam.exe" "$TITLE (Steam)" "$TITLE.png" "steam://rungameid/$STEAM_ID"
-      
+POL_Shortcut "steam.exe" "$TITLE" "$TITLE.png" "steam://rungameid/264710"
 POL_SetupWindow_message "$(eval_gettext 'When running game add -force-glcore or -force-opengl\nto your launch options by right clicking the game under Properties, Launch Options.\nNewer Nvidia Proprietary Drivers will work with -force-glcore45, which is OpenGL 4.5.')" "$TITLE"
 POL_SetupWindow_message "$(eval_gettext 'If the game crashes at startup, open a terminal and type:\necho 0|sudo tee /proc/sys/kernel/yama/ptrace_scope')"
-
+    
 POL_System_TmpDelete
 POL_SetupWindow_Close
 exit 0
\ No newline at end of file

New source code

#!/usr/bin/env playonlinux-bash
# Date : (2017-01-24)
# Last revision : (2017-02-07 23:00)
# Distribution used to test : Ubuntu 16.04 LTS with NVIDIA geforce GTX 770 (lathis), Ubuntu 18.04 with Palit GeForce GTX 750 Ti (LinuxScripter)
# Author : lahtis, LinuxScripter
# Script licence : GPL3
# Licence : retail
# This installer pictures files found https://github.com/lahtis/playonlinux/blob/master/working/Subnautica/
    
[ "$PLAYONLINUX" = "" ] && exit 0
source "$PLAYONLINUX/lib/sources"
     
TITLE="Subnautica"
PREFIX="Subnautica"
WORKING_WINE_VERSION="3.1"
AUTHOR="lahtis, LinuxScripter"
EDITOR="Unknown Worlds"
GAME_URL="https://unknownworlds.com/subnautica/"
     
# Initialization
POL_GetSetupImages "http://files.playonlinux.com/resources/setups/$PREFIX/top.jpg" "http://files.playonlinux.com/resources/setups/$PREFIX/left.jpg" "$TITLE"
POL_SetupWindow_Init
POL_SetupWindow_SetID 3299
POL_Debug_Init
          
# Presentation
POL_SetupWindow_presentation "$TITLE" "$EDITOR" "$GAME_URL" "$AUTHOR" "$PREFIX"
     
# Create Prefix
POL_Wine_SelectPrefix "$PREFIX"
POL_System_SetArch "x64"
POL_Wine_PrefixCreate "$WORKING_WINE_VERSION"
POL_System_TmpCreate "$PREFIX"
POL_SetupWindow_message "The game uses a virtual desktop through Wine, likely because it has graphical glitches without it. You can turn that off if you want to test without it: Configure -> select virtual drive -> Wine tab -> Wine Configuration -> Graphics tab -> uncheck Emulate a Virtual Desktop\n\nThough, it may cause graphic glitches. When someone has added that into the script, it is usually the case that it is somewhat broken without it. From that same graphics tab, though, you can increase the resolution of the virtual desktop, and that will enable you to set it for any size." "Set virtual desktop resolution."
  
Poll_Call POL_Function_SetResolution
    
# Moving TMP dir
cd "$POL_System_TmpDir"
   
# Installing mandatory dependencies
POL_Call POL_Install_vcrun2013
      
# Registery fix
cat << EOF > fix.reg
REGEDIT4
     
[HKEY_CURRENT_USER\Software\Wine\X11 Driver]
"UseTakeFocus"="N"
EOF
    
POL_Wine regedit.exe fix.reg
POL_Wine_WaitExit "$TITLE"
   
# Installing Steam
POL_Call POL_Install_steam
cd "$WINEPREFIX/drive_c/$PROGRAMFILES/Steam"
POL_Wine "steam.exe" steam://install/264710
POL_Wine_WaitBefore "$TITLE"
    
# Shortcut done before install for steam version
POL_Shortcut "steam.exe" "$TITLE" "$TITLE.png" "steam://rungameid/264710"
POL_SetupWindow_message "$(eval_gettext 'When running game add -force-glcore or -force-opengl\nto your launch options by right clicking the game under Properties, Launch Options.\nNewer Nvidia Proprietary Drivers will work with -force-glcore45, which is OpenGL 4.5.')" "$TITLE"
POL_SetupWindow_message "$(eval_gettext 'If the game crashes at startup, open a terminal and type:\necho 0|sudo tee /proc/sys/kernel/yama/ptrace_scope')"
    
POL_System_TmpDelete
POL_SetupWindow_Close
exit 0

Replies

lahtis Thursday 8 February 2018 at 16:32
lahtis

Warning

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

Differences

@@ -1,80 +1,71 @@
-#!/usr/bin/env playonlinux-bash 
+#!/usr/bin/env playonlinux-bash
 # Date : (2017-01-24)
-# Last revision : (2017-02-04 03:07)
-# Distribution used to test : Ubuntu 16.04 LTS, NVIDIA geforce GTX 770, 
-# Author : lahtis
+# Last revision : (2017-02-07 23:00)
+# Distribution used to test : Ubuntu 16.04 LTS with NVIDIA geforce GTX 770 (lathis), Ubuntu 18.04 with Palit GeForce GTX 750 Ti (LinuxScripter)
+# Author : lahtis, LinuxScripter
+# Script licence : GPL3
 # Licence : retail
-# PlayOnLinux: 4.2.12
-# working 99%, it has unity engine mouse focus menu issues.
-# Mouse losing focus in menus (can be fixed by pressing start on the keyboard and clicking on other windows but that also makes camera movement crazy)
 # This installer pictures files found https://github.com/lahtis/playonlinux/blob/master/working/Subnautica/
-
+   
 [ "$PLAYONLINUX" = "" ] && exit 0
 source "$PLAYONLINUX/lib/sources"
- 
-PREFIX="Subnautica"
-WINEVERSION="3.1"
+    
 TITLE="Subnautica"
+PREFIX="Subnautica"
+WORKING_WINE_VERSION="3.1"
+AUTHOR="lahtis, LinuxScripter"
 EDITOR="Unknown Worlds"
 GAME_URL="https://unknownworlds.com/subnautica/"
-AUTHOR="lahtis"
- 
+    
 # Initialization
 POL_GetSetupImages "http://files.playonlinux.com/resources/setups/$PREFIX/top.jpg" "http://files.playonlinux.com/resources/setups/$PREFIX/left.jpg" "$TITLE"
 POL_SetupWindow_Init
 POL_SetupWindow_SetID 3299
 POL_Debug_Init
-      
+         
 # Presentation
 POL_SetupWindow_presentation "$TITLE" "$EDITOR" "$GAME_URL" "$AUTHOR" "$PREFIX"
- 
+    
 # Create Prefix
 POL_Wine_SelectPrefix "$PREFIX"
 POL_System_SetArch "x64"
-POL_Wine_PrefixCreate "$WINEVERSION" 
-STEAM_ID="264710"
-Set_OS "winxp"
+POL_Wine_PrefixCreate "$WORKING_WINE_VERSION"
 POL_System_TmpCreate "$PREFIX"
-
+POL_SetupWindow_message "The game uses a virtual desktop through Wine, likely because it has graphical glitches without it. You can turn that off if you want to test without it: Configure -> select virtual drive -> Wine tab -> Wine Configuration -> Graphics tab -> uncheck Emulate a Virtual Desktop\n\nThough, it may cause graphic glitches. When someone has added that into the script, it is usually the case that it is somewhat broken without it. From that same graphics tab, though, you can increase the resolution of the virtual desktop, and that will enable you to set it for any size." "Set virtual desktop resolution."
+ 
+Poll_Call POL_Function_SetResolution
+   
 # Moving TMP dir
 cd "$POL_System_TmpDir"
   
+# Installing mandatory dependencies
+POL_Call POL_Install_vcrun2013
+     
 # Registery fix
 POL_SetupWindow_message "$(eval_gettext 'Modifying register.')" "$TITLE"
-
+   
 cat << EOF > fix.reg
 REGEDIT4
- 
-[HKEY_CURRENT_USER\Software\Wine\AppDefaults\Steam.exe]
-"Version"="winxp64"
-
-[HKEY_CURRENT_USER\Software\Wine\AppDefaults\steamwebhelper.exe]
-"Version"="winxp64"
-
+    
 [HKEY_CURRENT_USER\Software\Wine\X11 Driver]
 "UseTakeFocus"="N"
 EOF
-
+   
 POL_Wine regedit.exe fix.reg
 POL_Wine_WaitExit "$TITLE"
- 
-# Installing mandatory dependencies
-POL_Call POL_Install_vcrun2013
-POL_Call POL_Install_corefonts
-
+  
+POL_SetupWindow_message "$(eval_gettext 'When running game add -force-glcore or -force-opengl\nto your launch options by right clicking the game under Properties, Launch Options.\nNewer Nvidia Proprietary Drivers will work with -force-glcore45, which is OpenGL 4.5.')" "$TITLE"
+     
 # Installing Steam
 POL_Call POL_Install_steam
-POL_SetupWindow_message "$(eval_gettext 'Install $TITLE in Steam. Run the $TITLE when Steam is installed the game.')" "$TITLE"
 cd "$WINEPREFIX/drive_c/$PROGRAMFILES/Steam"
-POL_Wine "steam.exe" steam://install/$STEAM_ID -no-cef-sandbox
+POL_Wine "steam.exe" steam://install/264710
 POL_Wine_WaitBefore "$TITLE"
-
+   
 # Shortcut done before install for steam version
-POL_Shortcut "steam.exe" "$TITLE (Steam)" "$TITLE.png" "steam://rungameid/$STEAM_ID"
-      
-POL_SetupWindow_message "$(eval_gettext 'When running game add -force-glcore or -force-opengl\nto your launch options by right clicking the game under Properties, Launch Options.\nNewer Nvidia Proprietary Drivers will work with -force-glcore45, which is OpenGL 4.5.')" "$TITLE"
+POL_Shortcut "steam.exe" "$TITLE" "$TITLE.png" "steam://rungameid/264710"
 POL_SetupWindow_message "$(eval_gettext 'If the game crashes at startup, open a terminal and type:\necho 0|sudo tee /proc/sys/kernel/yama/ptrace_scope')"
-
+   
 POL_System_TmpDelete
 POL_SetupWindow_Close
 exit 0
\ No newline at end of file

New source code

#!/usr/bin/env playonlinux-bash
# Date : (2017-01-24)
# Last revision : (2017-02-07 23:00)
# Distribution used to test : Ubuntu 16.04 LTS with NVIDIA geforce GTX 770 (lathis), Ubuntu 18.04 with Palit GeForce GTX 750 Ti (LinuxScripter)
# Author : lahtis, LinuxScripter
# Script licence : GPL3
# Licence : retail
# This installer pictures files found https://github.com/lahtis/playonlinux/blob/master/working/Subnautica/
   
[ "$PLAYONLINUX" = "" ] && exit 0
source "$PLAYONLINUX/lib/sources"
    
TITLE="Subnautica"
PREFIX="Subnautica"
WORKING_WINE_VERSION="3.1"
AUTHOR="lahtis, LinuxScripter"
EDITOR="Unknown Worlds"
GAME_URL="https://unknownworlds.com/subnautica/"
    
# Initialization
POL_GetSetupImages "http://files.playonlinux.com/resources/setups/$PREFIX/top.jpg" "http://files.playonlinux.com/resources/setups/$PREFIX/left.jpg" "$TITLE"
POL_SetupWindow_Init
POL_SetupWindow_SetID 3299
POL_Debug_Init
         
# Presentation
POL_SetupWindow_presentation "$TITLE" "$EDITOR" "$GAME_URL" "$AUTHOR" "$PREFIX"
    
# Create Prefix
POL_Wine_SelectPrefix "$PREFIX"
POL_System_SetArch "x64"
POL_Wine_PrefixCreate "$WORKING_WINE_VERSION"
POL_System_TmpCreate "$PREFIX"
POL_SetupWindow_message "The game uses a virtual desktop through Wine, likely because it has graphical glitches without it. You can turn that off if you want to test without it: Configure -> select virtual drive -> Wine tab -> Wine Configuration -> Graphics tab -> uncheck Emulate a Virtual Desktop\n\nThough, it may cause graphic glitches. When someone has added that into the script, it is usually the case that it is somewhat broken without it. From that same graphics tab, though, you can increase the resolution of the virtual desktop, and that will enable you to set it for any size." "Set virtual desktop resolution."
 
Poll_Call POL_Function_SetResolution
   
# Moving TMP dir
cd "$POL_System_TmpDir"
  
# Installing mandatory dependencies
POL_Call POL_Install_vcrun2013
     
# Registery fix
POL_SetupWindow_message "$(eval_gettext 'Modifying register.')" "$TITLE"
   
cat << EOF > fix.reg
REGEDIT4
    
[HKEY_CURRENT_USER\Software\Wine\X11 Driver]
"UseTakeFocus"="N"
EOF
   
POL_Wine regedit.exe fix.reg
POL_Wine_WaitExit "$TITLE"
  
POL_SetupWindow_message "$(eval_gettext 'When running game add -force-glcore or -force-opengl\nto your launch options by right clicking the game under Properties, Launch Options.\nNewer Nvidia Proprietary Drivers will work with -force-glcore45, which is OpenGL 4.5.')" "$TITLE"
     
# Installing Steam
POL_Call POL_Install_steam
cd "$WINEPREFIX/drive_c/$PROGRAMFILES/Steam"
POL_Wine "steam.exe" steam://install/264710
POL_Wine_WaitBefore "$TITLE"
   
# Shortcut done before install for steam version
POL_Shortcut "steam.exe" "$TITLE" "$TITLE.png" "steam://rungameid/264710"
POL_SetupWindow_message "$(eval_gettext 'If the game crashes at startup, open a terminal and type:\necho 0|sudo tee /proc/sys/kernel/yama/ptrace_scope')"
   
POL_System_TmpDelete
POL_SetupWindow_Close
exit 0

Replies

Thursday 8 February 2018 at 16:47
No need of the warning about virtual desktop and avoid message than aren't required, because each message is a window that wait for user to click on "next". Use message only to informe about critical informations or like the last one. So "Modifying register" isn't required. And the "When running game" is to put at the end because user may forgot it during installation!
Thursday 8 February 2018 at 19:20
"And the "When running game" is to put at the end because user may forgot it during installation!"

When I test it I forgot and wonder why it crashed.
LinuxScripter Wednesday 7 February 2018 at 23:05
LinuxScripter Anonymous

Warning

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

Message

I took the liberty to include lathis's set_resolution function that he posted on forum just a couple hours ago. Works flawlessly. I'm suprised we didn't had anything like this already included.

Differences

@@ -1,80 +1,131 @@
-#!/usr/bin/env playonlinux-bash 
+#!/usr/bin/env playonlinux-bash
 # Date : (2017-01-24)
-# Last revision : (2017-02-04 03:07)
-# Distribution used to test : Ubuntu 16.04 LTS, NVIDIA geforce GTX 770, 
-# Author : lahtis
+# Last revision : (2017-02-07 23:00)
+# Distribution used to test : Ubuntu 16.04 LTS with NVIDIA geforce GTX 770 (lathis), Ubuntu 18.04 with Palit GeForce GTX 750 Ti (LinuxScripter)
+# Author : lahtis, LinuxScripter
+# Script licence : GPL3
 # Licence : retail
-# PlayOnLinux: 4.2.12
-# working 99%, it has unity engine mouse focus menu issues.
-# Mouse losing focus in menus (can be fixed by pressing start on the keyboard and clicking on other windows but that also makes camera movement crazy)
 # This installer pictures files found https://github.com/lahtis/playonlinux/blob/master/working/Subnautica/
-
+  
 [ "$PLAYONLINUX" = "" ] && exit 0
 source "$PLAYONLINUX/lib/sources"
- 
-PREFIX="Subnautica"
-WINEVERSION="3.1"
+   
 TITLE="Subnautica"
+PREFIX="Subnautica"
+WORKING_WINE_VERSION="3.1"
+AUTHOR="lahtis, LinuxScripter"
 EDITOR="Unknown Worlds"
 GAME_URL="https://unknownworlds.com/subnautica/"
-AUTHOR="lahtis"
- 
+   
 # Initialization
 POL_GetSetupImages "http://files.playonlinux.com/resources/setups/$PREFIX/top.jpg" "http://files.playonlinux.com/resources/setups/$PREFIX/left.jpg" "$TITLE"
 POL_SetupWindow_Init
 POL_SetupWindow_SetID 3299
 POL_Debug_Init
-      
+        
 # Presentation
 POL_SetupWindow_presentation "$TITLE" "$EDITOR" "$GAME_URL" "$AUTHOR" "$PREFIX"
- 
+   
 # Create Prefix
 POL_Wine_SelectPrefix "$PREFIX"
 POL_System_SetArch "x64"
-POL_Wine_PrefixCreate "$WINEVERSION" 
-STEAM_ID="264710"
-Set_OS "winxp"
+POL_Wine_PrefixCreate "$WORKING_WINE_VERSION"
 POL_System_TmpCreate "$PREFIX"
+POL_SetupWindow_message "The game uses a virtual desktop through Wine, likely because it has graphical glitches without it. You can turn that off if you want to test without it: Configure -> select virtual drive -> Wine tab -> Wine Configuration -> Graphics tab -> uncheck Emulate a Virtual Desktop\n\nThough, it may cause graphic glitches. When someone has added that into the script, it is usually the case that it is somewhat broken without it. From that same graphics tab, though, you can increase the resolution of the virtual desktop, and that will enable you to set it for any size." "Set virtual desktop resolution."
+
+POL_SetupWindow_menu "Resolution" "Set virtual desktop resolution." "640 x 360 (16:9)|720 x 576 (5:4)|800 x 600 (4?3)|1024 x 768 (4:3)|1093 x 614|1093 x 615|1152 x 864 (4:3)|1280 x 720 (16:9)|1280 x 768 (16:10)|1280 x 800 (16:10)|1280 x 960 (4:3)|1280 x 1024 (5:4)|1360 x 768|1366 x 768|1440 x 900|1536 x 864|1600 x 900 (16:9)|1680 x 1050 (16:10)|1600 x 1200|1920 x 1080 (16:9)|1920 x 1200|1920 x 1800 (16:9)|1680 x 1050|2560 x 1440 (16:9)|3200 x 1800 (16:9)|3840 x 2160 (16:9)|5120 x 2880 (16:9)|7680 x 4320 (16:9)" "|"
 
+if [ "$(echo $APP_ANSWER | grep -o "640 x 360 (16:9)")" != "" ]; then
+         Set_Desktop "On" "640" "360"
+elif [ "$(echo $APP_ANSWER | grep -o "720 x 576 (5:4)")" != "" ]; then
+        Set_Desktop "On" "720" "576"
+elif [ "$(echo $APP_ANSWER | grep -o "800 x 600 (4?3)")" != "" ]; then
+        Set_Desktop "On" "800" "600"
+elif [ "$(echo $APP_ANSWER | grep -o "1024 x 768 (4:3)")" != "" ]; then
+        Set_Desktop "On" "1024" "768"
+elif [ "$(echo $APP_ANSWER | grep -o "1093 x 614")" != "" ]; then
+        Set_Desktop "On" "1093" "614"
+elif [ "$(echo $APP_ANSWER | grep -o "1093 x 615")" != "" ]; then
+        Set_Desktop "On" "1093" "615"
+elif [ "$(echo $APP_ANSWER | grep -o "1152 x 864 (4:3)")" != "" ]; then
+        Set_Desktop "On" "1152" "864"
+elif [ "$(echo $APP_ANSWER | grep -o "1280 x 720 (16:9)")" != "" ]; then
+        Set_Desktop "On" "1280" "720"
+elif [ "$(echo $APP_ANSWER | grep -o "1280 x 768 (16:10)")" != "" ]; then
+        Set_Desktop "On" "1280" "768"
+elif [ "$(echo $APP_ANSWER | grep -o "1280 x 800 (16:10)")" != "" ]; then
+        Set_Desktop "On" "1280" "800"
+elif [ "$(echo $APP_ANSWER | grep -o "1280 x 960 (4:3)")" != "" ]; then
+        Set_Desktop "On" "1280" "960"
+elif [ "$(echo $APP_ANSWER | grep -o "1280 x 1024 (5:4)")" != "" ]; then
+        Set_Desktop "On" "1280" "1024"
+elif [ "$(echo $APP_ANSWER | grep -o "1360 x 768")" != "" ]; then
+        Set_Desktop "On" "1360" "768"
+elif [ "$(echo $APP_ANSWER | grep -o "1366 x 768")" != "" ]; then
+        Set_Desktop "On" "1366" "768"
+elif [ "$(echo $APP_ANSWER | grep -o "1440 x 900")" != "" ]; then
+        Set_Desktop "On" "1440" "900"
+elif [ "$(echo $APP_ANSWER | grep -o "1536 x 864")" != "" ]; then
+        Set_Desktop "On" "1536" "864"
+elif [ "$(echo $APP_ANSWER | grep -o "1600 x 900 (16:9)")" != "" ]; then
+        Set_Desktop "On" "1600" "900"
+elif [ "$(echo $APP_ANSWER | grep -o "1600 x 1200 (4:3)")" != "" ]; then
+        Set_Desktop "On" "1600" "1200"
+elif [ "$(echo $APP_ANSWER | grep -o "1680 x 1050 (16:10)")" != "" ]; then
+        Set_Desktop "On" "1680" "1050"
+elif [ "$(echo $APP_ANSWER | grep -o "1920 x 1080 (16:9)")" != "" ]; then
+        Set_Desktop "On" "1920" "1080"
+elif [ "$(echo $APP_ANSWER | grep -o "1920 x 1200")" != "" ]; then
+        Set_Desktop "On" "1920" "1200"
+elif [ "$(echo $APP_ANSWER | grep -o "1920 x 1800 (16:9)")" != "" ]; then
+        Set_Desktop "On" "1920" "1800"
+elif [ "$(echo $APP_ANSWER | grep -o "2560 x 1440 (16:9)")" != "" ]; then
+        Set_Desktop "On" "2560" "1440"
+elif [ "$(echo $APP_ANSWER | grep -o "3200 x 1800 (16:9)")" != "" ]; then
+        Set_Desktop "On" "3200" "1800"
+elif [ "$(echo $APP_ANSWER | grep -o "3200 x 1800 (16:9)")" != "" ]; then
+        Set_Desktop "On" "3200" "1800"
+elif [ "$(echo $APP_ANSWER | grep -o "3840 x 2160 (16:9)")" != "" ]; then
+        Set_Desktop "On" "3840" "2160"
+elif [ "$(echo $APP_ANSWER | grep -o "3200 x 1800 (16:9)")" != "" ]; then
+        Set_Desktop "On" "3200" "1800"
+elif [ "$(echo $APP_ANSWER | grep -o "5120 x 2880 (16:9)")" != "" ]; then
+        Set_Desktop "On" "5120" "2880"
+elif [ "$(echo $APP_ANSWER | grep -o "7680 x 4320 (16:9)")" != "" ]; then
+        Set_Desktop "On" "7680" "4320"
+fi
+  
 # Moving TMP dir
 cd "$POL_System_TmpDir"
-  
+ 
+# Installing mandatory dependencies
+POL_Call POL_Install_vcrun2013
+    
 # Registery fix
 POL_SetupWindow_message "$(eval_gettext 'Modifying register.')" "$TITLE"
-
+  
 cat << EOF > fix.reg
 REGEDIT4
- 
-[HKEY_CURRENT_USER\Software\Wine\AppDefaults\Steam.exe]
-"Version"="winxp64"
-
-[HKEY_CURRENT_USER\Software\Wine\AppDefaults\steamwebhelper.exe]
-"Version"="winxp64"
-
+   
 [HKEY_CURRENT_USER\Software\Wine\X11 Driver]
 "UseTakeFocus"="N"
 EOF
-
+  
 POL_Wine regedit.exe fix.reg
 POL_Wine_WaitExit "$TITLE"
  
-# Installing mandatory dependencies
-POL_Call POL_Install_vcrun2013
-POL_Call POL_Install_corefonts
-
+POL_SetupWindow_message "$(eval_gettext 'When running game add -force-glcore or -force-opengl\nto your launch options by right clicking the game under Properties, Launch Options.\nNewer Nvidia Proprietary Drivers will work with -force-glcore45, which is OpenGL 4.5.')" "$TITLE"
+    
 # Installing Steam
 POL_Call POL_Install_steam
-POL_SetupWindow_message "$(eval_gettext 'Install $TITLE in Steam. Run the $TITLE when Steam is installed the game.')" "$TITLE"
 cd "$WINEPREFIX/drive_c/$PROGRAMFILES/Steam"
-POL_Wine "steam.exe" steam://install/$STEAM_ID -no-cef-sandbox
+POL_Wine "steam.exe" steam://install/264710
 POL_Wine_WaitBefore "$TITLE"
-
+  
 # Shortcut done before install for steam version
-POL_Shortcut "steam.exe" "$TITLE (Steam)" "$TITLE.png" "steam://rungameid/$STEAM_ID"
-      
-POL_SetupWindow_message "$(eval_gettext 'When running game add -force-glcore or -force-opengl\nto your launch options by right clicking the game under Properties, Launch Options.\nNewer Nvidia Proprietary Drivers will work with -force-glcore45, which is OpenGL 4.5.')" "$TITLE"
+POL_Shortcut "steam.exe" "$TITLE" "$TITLE.png" "steam://rungameid/264710"
 POL_SetupWindow_message "$(eval_gettext 'If the game crashes at startup, open a terminal and type:\necho 0|sudo tee /proc/sys/kernel/yama/ptrace_scope')"
-
+  
 POL_System_TmpDelete
 POL_SetupWindow_Close
 exit 0
\ No newline at end of file

New source code

#!/usr/bin/env playonlinux-bash
# Date : (2017-01-24)
# Last revision : (2017-02-07 23:00)
# Distribution used to test : Ubuntu 16.04 LTS with NVIDIA geforce GTX 770 (lathis), Ubuntu 18.04 with Palit GeForce GTX 750 Ti (LinuxScripter)
# Author : lahtis, LinuxScripter
# Script licence : GPL3
# Licence : retail
# This installer pictures files found https://github.com/lahtis/playonlinux/blob/master/working/Subnautica/
  
[ "$PLAYONLINUX" = "" ] && exit 0
source "$PLAYONLINUX/lib/sources"
   
TITLE="Subnautica"
PREFIX="Subnautica"
WORKING_WINE_VERSION="3.1"
AUTHOR="lahtis, LinuxScripter"
EDITOR="Unknown Worlds"
GAME_URL="https://unknownworlds.com/subnautica/"
   
# Initialization
POL_GetSetupImages "http://files.playonlinux.com/resources/setups/$PREFIX/top.jpg" "http://files.playonlinux.com/resources/setups/$PREFIX/left.jpg" "$TITLE"
POL_SetupWindow_Init
POL_SetupWindow_SetID 3299
POL_Debug_Init
        
# Presentation
POL_SetupWindow_presentation "$TITLE" "$EDITOR" "$GAME_URL" "$AUTHOR" "$PREFIX"
   
# Create Prefix
POL_Wine_SelectPrefix "$PREFIX"
POL_System_SetArch "x64"
POL_Wine_PrefixCreate "$WORKING_WINE_VERSION"
POL_System_TmpCreate "$PREFIX"
POL_SetupWindow_message "The game uses a virtual desktop through Wine, likely because it has graphical glitches without it. You can turn that off if you want to test without it: Configure -> select virtual drive -> Wine tab -> Wine Configuration -> Graphics tab -> uncheck Emulate a Virtual Desktop\n\nThough, it may cause graphic glitches. When someone has added that into the script, it is usually the case that it is somewhat broken without it. From that same graphics tab, though, you can increase the resolution of the virtual desktop, and that will enable you to set it for any size." "Set virtual desktop resolution."

POL_SetupWindow_menu "Resolution" "Set virtual desktop resolution." "640 x 360 (16:9)|720 x 576 (5:4)|800 x 600 (4?3)|1024 x 768 (4:3)|1093 x 614|1093 x 615|1152 x 864 (4:3)|1280 x 720 (16:9)|1280 x 768 (16:10)|1280 x 800 (16:10)|1280 x 960 (4:3)|1280 x 1024 (5:4)|1360 x 768|1366 x 768|1440 x 900|1536 x 864|1600 x 900 (16:9)|1680 x 1050 (16:10)|1600 x 1200|1920 x 1080 (16:9)|1920 x 1200|1920 x 1800 (16:9)|1680 x 1050|2560 x 1440 (16:9)|3200 x 1800 (16:9)|3840 x 2160 (16:9)|5120 x 2880 (16:9)|7680 x 4320 (16:9)" "|"

if [ "$(echo $APP_ANSWER | grep -o "640 x 360 (16:9)")" != "" ]; then
         Set_Desktop "On" "640" "360"
elif [ "$(echo $APP_ANSWER | grep -o "720 x 576 (5:4)")" != "" ]; then
        Set_Desktop "On" "720" "576"
elif [ "$(echo $APP_ANSWER | grep -o "800 x 600 (4?3)")" != "" ]; then
        Set_Desktop "On" "800" "600"
elif [ "$(echo $APP_ANSWER | grep -o "1024 x 768 (4:3)")" != "" ]; then
        Set_Desktop "On" "1024" "768"
elif [ "$(echo $APP_ANSWER | grep -o "1093 x 614")" != "" ]; then
        Set_Desktop "On" "1093" "614"
elif [ "$(echo $APP_ANSWER | grep -o "1093 x 615")" != "" ]; then
        Set_Desktop "On" "1093" "615"
elif [ "$(echo $APP_ANSWER | grep -o "1152 x 864 (4:3)")" != "" ]; then
        Set_Desktop "On" "1152" "864"
elif [ "$(echo $APP_ANSWER | grep -o "1280 x 720 (16:9)")" != "" ]; then
        Set_Desktop "On" "1280" "720"
elif [ "$(echo $APP_ANSWER | grep -o "1280 x 768 (16:10)")" != "" ]; then
        Set_Desktop "On" "1280" "768"
elif [ "$(echo $APP_ANSWER | grep -o "1280 x 800 (16:10)")" != "" ]; then
        Set_Desktop "On" "1280" "800"
elif [ "$(echo $APP_ANSWER | grep -o "1280 x 960 (4:3)")" != "" ]; then
        Set_Desktop "On" "1280" "960"
elif [ "$(echo $APP_ANSWER | grep -o "1280 x 1024 (5:4)")" != "" ]; then
        Set_Desktop "On" "1280" "1024"
elif [ "$(echo $APP_ANSWER | grep -o "1360 x 768")" != "" ]; then
        Set_Desktop "On" "1360" "768"
elif [ "$(echo $APP_ANSWER | grep -o "1366 x 768")" != "" ]; then
        Set_Desktop "On" "1366" "768"
elif [ "$(echo $APP_ANSWER | grep -o "1440 x 900")" != "" ]; then
        Set_Desktop "On" "1440" "900"
elif [ "$(echo $APP_ANSWER | grep -o "1536 x 864")" != "" ]; then
        Set_Desktop "On" "1536" "864"
elif [ "$(echo $APP_ANSWER | grep -o "1600 x 900 (16:9)")" != "" ]; then
        Set_Desktop "On" "1600" "900"
elif [ "$(echo $APP_ANSWER | grep -o "1600 x 1200 (4:3)")" != "" ]; then
        Set_Desktop "On" "1600" "1200"
elif [ "$(echo $APP_ANSWER | grep -o "1680 x 1050 (16:10)")" != "" ]; then
        Set_Desktop "On" "1680" "1050"
elif [ "$(echo $APP_ANSWER | grep -o "1920 x 1080 (16:9)")" != "" ]; then
        Set_Desktop "On" "1920" "1080"
elif [ "$(echo $APP_ANSWER | grep -o "1920 x 1200")" != "" ]; then
        Set_Desktop "On" "1920" "1200"
elif [ "$(echo $APP_ANSWER | grep -o "1920 x 1800 (16:9)")" != "" ]; then
        Set_Desktop "On" "1920" "1800"
elif [ "$(echo $APP_ANSWER | grep -o "2560 x 1440 (16:9)")" != "" ]; then
        Set_Desktop "On" "2560" "1440"
elif [ "$(echo $APP_ANSWER | grep -o "3200 x 1800 (16:9)")" != "" ]; then
        Set_Desktop "On" "3200" "1800"
elif [ "$(echo $APP_ANSWER | grep -o "3200 x 1800 (16:9)")" != "" ]; then
        Set_Desktop "On" "3200" "1800"
elif [ "$(echo $APP_ANSWER | grep -o "3840 x 2160 (16:9)")" != "" ]; then
        Set_Desktop "On" "3840" "2160"
elif [ "$(echo $APP_ANSWER | grep -o "3200 x 1800 (16:9)")" != "" ]; then
        Set_Desktop "On" "3200" "1800"
elif [ "$(echo $APP_ANSWER | grep -o "5120 x 2880 (16:9)")" != "" ]; then
        Set_Desktop "On" "5120" "2880"
elif [ "$(echo $APP_ANSWER | grep -o "7680 x 4320 (16:9)")" != "" ]; then
        Set_Desktop "On" "7680" "4320"
fi
  
# Moving TMP dir
cd "$POL_System_TmpDir"
 
# Installing mandatory dependencies
POL_Call POL_Install_vcrun2013
    
# Registery fix
POL_SetupWindow_message "$(eval_gettext 'Modifying register.')" "$TITLE"
  
cat << EOF > fix.reg
REGEDIT4
   
[HKEY_CURRENT_USER\Software\Wine\X11 Driver]
"UseTakeFocus"="N"
EOF
  
POL_Wine regedit.exe fix.reg
POL_Wine_WaitExit "$TITLE"
 
POL_SetupWindow_message "$(eval_gettext 'When running game add -force-glcore or -force-opengl\nto your launch options by right clicking the game under Properties, Launch Options.\nNewer Nvidia Proprietary Drivers will work with -force-glcore45, which is OpenGL 4.5.')" "$TITLE"
    
# Installing Steam
POL_Call POL_Install_steam
cd "$WINEPREFIX/drive_c/$PROGRAMFILES/Steam"
POL_Wine "steam.exe" steam://install/264710
POL_Wine_WaitBefore "$TITLE"
  
# Shortcut done before install for steam version
POL_Shortcut "steam.exe" "$TITLE" "$TITLE.png" "steam://rungameid/264710"
POL_SetupWindow_message "$(eval_gettext 'If the game crashes at startup, open a terminal and type:\necho 0|sudo tee /proc/sys/kernel/yama/ptrace_scope')"
  
POL_System_TmpDelete
POL_SetupWindow_Close
exit 0

Replies

lahtis Tuesday 6 February 2018 at 17:47
lahtis

Warning

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

Message

Game working now 100%.

Differences

@@ -1,80 +1,69 @@
-#!/usr/bin/env playonlinux-bash 
+#!/usr/bin/env playonlinux-bash
 # Date : (2017-01-24)
-# Last revision : (2017-02-04 03:07)
-# Distribution used to test : Ubuntu 16.04 LTS, NVIDIA geforce GTX 770, 
-# Author : lahtis
+# Last revision : (2017-02-06 18:36)
+# Distribution used to test : Ubuntu 16.04 LTS, NVIDIA geforce GTX 770,
+# Author : lahtis, LinuxScripter
+# Script licence : GPL3
 # Licence : retail
-# PlayOnLinux: 4.2.12
-# working 99%, it has unity engine mouse focus menu issues.
-# Mouse losing focus in menus (can be fixed by pressing start on the keyboard and clicking on other windows but that also makes camera movement crazy)
 # This installer pictures files found https://github.com/lahtis/playonlinux/blob/master/working/Subnautica/
-
+ 
 [ "$PLAYONLINUX" = "" ] && exit 0
 source "$PLAYONLINUX/lib/sources"
- 
-PREFIX="Subnautica"
-WINEVERSION="3.1"
+  
 TITLE="Subnautica"
+PREFIX="Subnautica"
+WORKING_WINE_VERSION="3.1"
+AUTHOR="lahtis, LinuxScripter"
 EDITOR="Unknown Worlds"
 GAME_URL="https://unknownworlds.com/subnautica/"
-AUTHOR="lahtis"
- 
+  
 # Initialization
 POL_GetSetupImages "http://files.playonlinux.com/resources/setups/$PREFIX/top.jpg" "http://files.playonlinux.com/resources/setups/$PREFIX/left.jpg" "$TITLE"
 POL_SetupWindow_Init
 POL_SetupWindow_SetID 3299
 POL_Debug_Init
-      
+       
 # Presentation
 POL_SetupWindow_presentation "$TITLE" "$EDITOR" "$GAME_URL" "$AUTHOR" "$PREFIX"
- 
+  
 # Create Prefix
 POL_Wine_SelectPrefix "$PREFIX"
 POL_System_SetArch "x64"
-POL_Wine_PrefixCreate "$WINEVERSION" 
-STEAM_ID="264710"
-Set_OS "winxp"
+POL_Wine_PrefixCreate "$WORKING_WINE_VERSION"
 POL_System_TmpCreate "$PREFIX"
-
+Set_Desktop "On" "1366" "768"
+ 
 # Moving TMP dir
 cd "$POL_System_TmpDir"
-  
+
+# Installing mandatory dependencies
+POL_Call POL_Install_vcrun2013
+   
 # Registery fix
 POL_SetupWindow_message "$(eval_gettext 'Modifying register.')" "$TITLE"
-
+ 
 cat << EOF > fix.reg
 REGEDIT4
- 
-[HKEY_CURRENT_USER\Software\Wine\AppDefaults\Steam.exe]
-"Version"="winxp64"
-
-[HKEY_CURRENT_USER\Software\Wine\AppDefaults\steamwebhelper.exe]
-"Version"="winxp64"
-
+  
 [HKEY_CURRENT_USER\Software\Wine\X11 Driver]
 "UseTakeFocus"="N"
 EOF
-
+ 
 POL_Wine regedit.exe fix.reg
 POL_Wine_WaitExit "$TITLE"
- 
-# Installing mandatory dependencies
-POL_Call POL_Install_vcrun2013
-POL_Call POL_Install_corefonts
 
+POL_SetupWindow_message "$(eval_gettext 'When running game add -force-glcore or -force-opengl\nto your launch options by right clicking the game under Properties, Launch Options.\nNewer Nvidia Proprietary Drivers will work with -force-glcore45, which is OpenGL 4.5.')" "$TITLE"
+   
 # Installing Steam
 POL_Call POL_Install_steam
-POL_SetupWindow_message "$(eval_gettext 'Install $TITLE in Steam. Run the $TITLE when Steam is installed the game.')" "$TITLE"
 cd "$WINEPREFIX/drive_c/$PROGRAMFILES/Steam"
-POL_Wine "steam.exe" steam://install/$STEAM_ID -no-cef-sandbox
+POL_Wine "steam.exe" steam://install/264710
 POL_Wine_WaitBefore "$TITLE"
-
+ 
 # Shortcut done before install for steam version
-POL_Shortcut "steam.exe" "$TITLE (Steam)" "$TITLE.png" "steam://rungameid/$STEAM_ID"
-      
-POL_SetupWindow_message "$(eval_gettext 'When running game add -force-glcore or -force-opengl\nto your launch options by right clicking the game under Properties, Launch Options.\nNewer Nvidia Proprietary Drivers will work with -force-glcore45, which is OpenGL 4.5.')" "$TITLE"
+POL_Shortcut "steam.exe" "$TITLE" "$TITLE.png" "steam://rungameid/264710"
 POL_SetupWindow_message "$(eval_gettext 'If the game crashes at startup, open a terminal and type:\necho 0|sudo tee /proc/sys/kernel/yama/ptrace_scope')"
-
+ 
 POL_System_TmpDelete
 POL_SetupWindow_Close
 exit 0
\ No newline at end of file

New source code

#!/usr/bin/env playonlinux-bash
# Date : (2017-01-24)
# Last revision : (2017-02-06 18:36)
# Distribution used to test : Ubuntu 16.04 LTS, NVIDIA geforce GTX 770,
# Author : lahtis, LinuxScripter
# Script licence : GPL3
# Licence : retail
# This installer pictures files found https://github.com/lahtis/playonlinux/blob/master/working/Subnautica/
 
[ "$PLAYONLINUX" = "" ] && exit 0
source "$PLAYONLINUX/lib/sources"
  
TITLE="Subnautica"
PREFIX="Subnautica"
WORKING_WINE_VERSION="3.1"
AUTHOR="lahtis, LinuxScripter"
EDITOR="Unknown Worlds"
GAME_URL="https://unknownworlds.com/subnautica/"
  
# Initialization
POL_GetSetupImages "http://files.playonlinux.com/resources/setups/$PREFIX/top.jpg" "http://files.playonlinux.com/resources/setups/$PREFIX/left.jpg" "$TITLE"
POL_SetupWindow_Init
POL_SetupWindow_SetID 3299
POL_Debug_Init
       
# Presentation
POL_SetupWindow_presentation "$TITLE" "$EDITOR" "$GAME_URL" "$AUTHOR" "$PREFIX"
  
# Create Prefix
POL_Wine_SelectPrefix "$PREFIX"
POL_System_SetArch "x64"
POL_Wine_PrefixCreate "$WORKING_WINE_VERSION"
POL_System_TmpCreate "$PREFIX"
Set_Desktop "On" "1366" "768"
 
# Moving TMP dir
cd "$POL_System_TmpDir"

# Installing mandatory dependencies
POL_Call POL_Install_vcrun2013
   
# Registery fix
POL_SetupWindow_message "$(eval_gettext 'Modifying register.')" "$TITLE"
 
cat << EOF > fix.reg
REGEDIT4
  
[HKEY_CURRENT_USER\Software\Wine\X11 Driver]
"UseTakeFocus"="N"
EOF
 
POL_Wine regedit.exe fix.reg
POL_Wine_WaitExit "$TITLE"

POL_SetupWindow_message "$(eval_gettext 'When running game add -force-glcore or -force-opengl\nto your launch options by right clicking the game under Properties, Launch Options.\nNewer Nvidia Proprietary Drivers will work with -force-glcore45, which is OpenGL 4.5.')" "$TITLE"
   
# Installing Steam
POL_Call POL_Install_steam
cd "$WINEPREFIX/drive_c/$PROGRAMFILES/Steam"
POL_Wine "steam.exe" steam://install/264710
POL_Wine_WaitBefore "$TITLE"
 
# Shortcut done before install for steam version
POL_Shortcut "steam.exe" "$TITLE" "$TITLE.png" "steam://rungameid/264710"
POL_SetupWindow_message "$(eval_gettext 'If the game crashes at startup, open a terminal and type:\necho 0|sudo tee /proc/sys/kernel/yama/ptrace_scope')"
 
POL_System_TmpDelete
POL_SetupWindow_Close
exit 0

Replies

Tuesday 6 February 2018 at 17:55
Seem ok, prefer 1024*768 (working for more people than 1366*768)
Anonymous
Tuesday 6 February 2018 at 18:21
According to this link:
http://gs.statcounter.com/screen-resolution-stats/desktop/worldwide
1366x768 is actually more common than old 1024x768 (I'm also checking many local computer stores and almost every pc monitor is 1366x768 or higher). You can always change it in winecfg anyway.
Tuesday 6 February 2018 at 22:11
Yea but 1024*768 is 4:3 and the other is 16:9 So to avoid bad user experience, you prefere the 4:3 and let the user change it for his monitor size
LinuxScripter Tuesday 6 February 2018 at 1:25
LinuxScripter Anonymous

Warning

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

Message

After many trials and errors I have found the trick to the mouse losing focus problem. Just set the virtual desktop. Played for almost 2 hours and the mouse is fine.

Differences

@@ -1,80 +1,54 @@
-#!/usr/bin/env playonlinux-bash 
-# Date : (2017-01-24)
-# Last revision : (2017-02-04 03:07)
-# Distribution used to test : Ubuntu 16.04 LTS, NVIDIA geforce GTX 770, 
-# Author : lahtis
-# Licence : retail
-# PlayOnLinux: 4.2.12
-# working 99%, it has unity engine mouse focus menu issues.
-# Mouse losing focus in menus (can be fixed by pressing start on the keyboard and clicking on other windows but that also makes camera movement crazy)
-# This installer pictures files found https://github.com/lahtis/playonlinux/blob/master/working/Subnautica/
-
-[ "$PLAYONLINUX" = "" ] && exit 0
-source "$PLAYONLINUX/lib/sources"
+#!/bin/bash
+# Date : (2018-01-25 21-38)
+# Last revision : (2018-02-06 01-24)																			2)
+# Wine version used : 3.0
+# Distribution used to test : Ubuntu 18.04 x64
+# Script licence : GPL3
+# Program licence : Retail
  
+[ -z "$PLAYONLINUX" ] && exit 0
+source "$PLAYONLINUX/lib/sources"
+
+TITLE="Subnautica" 
 PREFIX="Subnautica"
-WINEVERSION="3.1"
-TITLE="Subnautica"
+WORKING_WINE_VERSION="3.1"
+AUTHOR="LinuxScripter"
 EDITOR="Unknown Worlds"
 GAME_URL="https://unknownworlds.com/subnautica/"
-AUTHOR="lahtis"
- 
-# Initialization
-POL_GetSetupImages "http://files.playonlinux.com/resources/setups/$PREFIX/top.jpg" "http://files.playonlinux.com/resources/setups/$PREFIX/left.jpg" "$TITLE"
+
+POL_GetSetupImages "http://files.playonlinux.com/resources/setups/$PREFIX/top.jpg" "http://files.playonlinux.com/resources/setups/$PREFIX/left.jpg" "$TITLE" 
 POL_SetupWindow_Init
-POL_SetupWindow_SetID 3299
 POL_Debug_Init
-      
-# Presentation
-POL_SetupWindow_presentation "$TITLE" "$EDITOR" "$GAME_URL" "$AUTHOR" "$PREFIX"
  
-# Create Prefix
+POL_SetupWindow_presentation "$TITLE" "$EDITOR" "$GAME_URL" "$AUTHOR" "$PREFIX"
+
 POL_Wine_SelectPrefix "$PREFIX"
 POL_System_SetArch "x64"
-POL_Wine_PrefixCreate "$WINEVERSION" 
-STEAM_ID="264710"
-Set_OS "winxp"
+POL_Wine_PrefixCreate "$WORKING_WINE_VERSION"
 POL_System_TmpCreate "$PREFIX"
+Set_Desktop "On" "1366" "768"
 
-# Moving TMP dir
-cd "$POL_System_TmpDir"
-  
-# Registery fix
-POL_SetupWindow_message "$(eval_gettext 'Modifying register.')" "$TITLE"
+POL_Call POL_Install_vcrun2013
 
+cd "$POL_System_TmpDir"
 cat << EOF > fix.reg
 REGEDIT4
  
-[HKEY_CURRENT_USER\Software\Wine\AppDefaults\Steam.exe]
-"Version"="winxp64"
-
-[HKEY_CURRENT_USER\Software\Wine\AppDefaults\steamwebhelper.exe]
-"Version"="winxp64"
-
 [HKEY_CURRENT_USER\Software\Wine\X11 Driver]
 "UseTakeFocus"="N"
 EOF
-
-POL_Wine regedit.exe fix.reg
-POL_Wine_WaitExit "$TITLE"
  
-# Installing mandatory dependencies
-POL_Call POL_Install_vcrun2013
-POL_Call POL_Install_corefonts
+POL_Wine regedit.exe fix.reg
+
+POL_SetupWindow_message "$(eval_gettext 'Before launching the game add -force-glcore or -force-opengl\nto your launch options by right clicking the game under Properties, Launch Options. Otherwise most of the textures will not be renered.\nNewer Nvidia Proprietary Drivers will work with -force-glcore45, which is OpenGL 4.5.')" "$TITLE"
+POL_SetupWindow_message "$(eval_gettext 'If the game crashes at startup, open a terminal and type:\necho 0|sudo tee /proc/sys/kernel/yama/ptrace_scope')"
 
-# Installing Steam
 POL_Call POL_Install_steam
-POL_SetupWindow_message "$(eval_gettext 'Install $TITLE in Steam. Run the $TITLE when Steam is installed the game.')" "$TITLE"
 cd "$WINEPREFIX/drive_c/$PROGRAMFILES/Steam"
-POL_Wine "steam.exe" steam://install/$STEAM_ID -no-cef-sandbox
+POL_Wine "steam.exe" steam://install/264710
 POL_Wine_WaitBefore "$TITLE"
 
-# Shortcut done before install for steam version
-POL_Shortcut "steam.exe" "$TITLE (Steam)" "$TITLE.png" "steam://rungameid/$STEAM_ID"
-      
-POL_SetupWindow_message "$(eval_gettext 'When running game add -force-glcore or -force-opengl\nto your launch options by right clicking the game under Properties, Launch Options.\nNewer Nvidia Proprietary Drivers will work with -force-glcore45, which is OpenGL 4.5.')" "$TITLE"
-POL_SetupWindow_message "$(eval_gettext 'If the game crashes at startup, open a terminal and type:\necho 0|sudo tee /proc/sys/kernel/yama/ptrace_scope')"
-
-POL_System_TmpDelete
+POL_Shortcut "steam.exe" "$TITLE" "" "steam://rungameid/264710"
+ 
 POL_SetupWindow_Close
 exit 0
\ No newline at end of file

New source code

#!/bin/bash
# Date : (2018-01-25 21-38)
# Last revision : (2018-02-06 01-24)                                                                                                                                                        2)
# Wine version used : 3.0
# Distribution used to test : Ubuntu 18.04 x64
# Script licence : GPL3
# Program licence : Retail
 
[ -z "$PLAYONLINUX" ] && exit 0
source "$PLAYONLINUX/lib/sources"

TITLE="Subnautica" 
PREFIX="Subnautica"
WORKING_WINE_VERSION="3.1"
AUTHOR="LinuxScripter"
EDITOR="Unknown Worlds"
GAME_URL="https://unknownworlds.com/subnautica/"

POL_GetSetupImages "http://files.playonlinux.com/resources/setups/$PREFIX/top.jpg" "http://files.playonlinux.com/resources/setups/$PREFIX/left.jpg" "$TITLE" 
POL_SetupWindow_Init
POL_Debug_Init
 
POL_SetupWindow_presentation "$TITLE" "$EDITOR" "$GAME_URL" "$AUTHOR" "$PREFIX"

POL_Wine_SelectPrefix "$PREFIX"
POL_System_SetArch "x64"
POL_Wine_PrefixCreate "$WORKING_WINE_VERSION"
POL_System_TmpCreate "$PREFIX"
Set_Desktop "On" "1366" "768"

POL_Call POL_Install_vcrun2013

cd "$POL_System_TmpDir"
cat << EOF > fix.reg
REGEDIT4
 
[HKEY_CURRENT_USER\Software\Wine\X11 Driver]
"UseTakeFocus"="N"
EOF
 
POL_Wine regedit.exe fix.reg

POL_SetupWindow_message "$(eval_gettext 'Before launching the game add -force-glcore or -force-opengl\nto your launch options by right clicking the game under Properties, Launch Options. Otherwise most of the textures will not be renered.\nNewer Nvidia Proprietary Drivers will work with -force-glcore45, which is OpenGL 4.5.')" "$TITLE"
POL_SetupWindow_message "$(eval_gettext 'If the game crashes at startup, open a terminal and type:\necho 0|sudo tee /proc/sys/kernel/yama/ptrace_scope')"

POL_Call POL_Install_steam
cd "$WINEPREFIX/drive_c/$PROGRAMFILES/Steam"
POL_Wine "steam.exe" steam://install/264710
POL_Wine_WaitBefore "$TITLE"

POL_Shortcut "steam.exe" "$TITLE" "" "steam://rungameid/264710"
 
POL_SetupWindow_Close
exit 0

Replies

Tuesday 6 February 2018 at 1:28
tested in Ubuntu with 3.0-rc6 version and virtual desktop not working. Are you use latest wine version?
Tuesday 6 February 2018 at 1:29
Maybe tomorrow testing also.
Anonymous
Tuesday 6 February 2018 at 10:38
I was using wine 3.1 to test that script. It's in the WORKING_WINE_VERSION.
Tuesday 6 February 2018 at 17:08
I already said it : please don't erase the previous AUTHOR!
Let the POL_SetupWindow_SetID 3299 (it's used to add a (i) button to these page).
Don't set a desktop like that. Some people may have to small desktop!
And why diod you rework so much ? like every comment ?
Tuesday 6 February 2018 at 17:33
working 100%. with 3.1
Anonymous
Tuesday 6 February 2018 at 18:16
I did not remove previous author because the script I uploaded I wrote myself so there is no previous author. When I'm working on someone else's script I try to keep their username. I wasn't aware of POL_SetupWindow_SetID functionality, will try to remember that. glad we finally got this game working.
Tuesday 6 February 2018 at 18:21
POL_SetupWindow_SetID is added when a script is validated for the first time. But not during patch validation (if missing).
Tuesday 6 February 2018 at 20:58
played 5 hours. No errors.
lahtis Sunday 4 February 2018 at 2:27
lahtis

Warning

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

Message

Exit game now working.

Differences

@@ -0,0 +1,80 @@
+#!/usr/bin/env playonlinux-bash 
+# Date : (2017-01-24)
+# Last revision : (2017-02-04 03:07)
+# Distribution used to test : Ubuntu 16.04 LTS, NVIDIA geforce GTX 770, 
+# Author : lahtis
+# Licence : retail
+# PlayOnLinux: 4.2.12
+# working 99%, it has unity engine mouse focus menu issues.
+# Mouse losing focus in menus (can be fixed by pressing start on the keyboard and clicking on other windows but that also makes camera movement crazy)
+# This installer pictures files found https://github.com/lahtis/playonlinux/blob/master/working/Subnautica/
+
+[ "$PLAYONLINUX" = "" ] && exit 0
+source "$PLAYONLINUX/lib/sources"
+ 
+PREFIX="Subnautica"
+WINEVERSION="3.1"
+TITLE="Subnautica"
+EDITOR="Unknown Worlds"
+GAME_URL="https://unknownworlds.com/subnautica/"
+AUTHOR="lahtis"
+ 
+# Initialization
+POL_GetSetupImages "http://files.playonlinux.com/resources/setups/$PREFIX/top.jpg" "http://files.playonlinux.com/resources/setups/$PREFIX/left.jpg" "$TITLE"
+POL_SetupWindow_Init
+POL_SetupWindow_SetID 3299
+POL_Debug_Init
+      
+# Presentation
+POL_SetupWindow_presentation "$TITLE" "$EDITOR" "$GAME_URL" "$AUTHOR" "$PREFIX"
+ 
+# Create Prefix
+POL_Wine_SelectPrefix "$PREFIX"
+POL_System_SetArch "x64"
+POL_Wine_PrefixCreate "$WINEVERSION" 
+STEAM_ID="264710"
+Set_OS "winxp"
+POL_System_TmpCreate "$PREFIX"
+
+# Moving TMP dir
+cd "$POL_System_TmpDir"
+  
+# Registery fix
+POL_SetupWindow_message "$(eval_gettext 'Modifying register.')" "$TITLE"
+
+cat << EOF > fix.reg
+REGEDIT4
+ 
+[HKEY_CURRENT_USER\Software\Wine\AppDefaults\Steam.exe]
+"Version"="winxp64"
+
+[HKEY_CURRENT_USER\Software\Wine\AppDefaults\steamwebhelper.exe]
+"Version"="winxp64"
+
+[HKEY_CURRENT_USER\Software\Wine\X11 Driver]
+"UseTakeFocus"="N"
+EOF
+
+POL_Wine regedit.exe fix.reg
+POL_Wine_WaitExit "$TITLE"
+ 
+# Installing mandatory dependencies
+POL_Call POL_Install_vcrun2013
+POL_Call POL_Install_corefonts
+
+# Installing Steam
+POL_Call POL_Install_steam
+POL_SetupWindow_message "$(eval_gettext 'Install $TITLE in Steam. Run the $TITLE when Steam is installed the game.')" "$TITLE"
+cd "$WINEPREFIX/drive_c/$PROGRAMFILES/Steam"
+POL_Wine "steam.exe" steam://install/$STEAM_ID -no-cef-sandbox
+POL_Wine_WaitBefore "$TITLE"
+
+# Shortcut done before install for steam version
+POL_Shortcut "steam.exe" "$TITLE (Steam)" "$TITLE.png" "steam://rungameid/$STEAM_ID"
+      
+POL_SetupWindow_message "$(eval_gettext 'When running game add -force-glcore or -force-opengl\nto your launch options by right clicking the game under Properties, Launch Options.\nNewer Nvidia Proprietary Drivers will work with -force-glcore45, which is OpenGL 4.5.')" "$TITLE"
+POL_SetupWindow_message "$(eval_gettext 'If the game crashes at startup, open a terminal and type:\necho 0|sudo tee /proc/sys/kernel/yama/ptrace_scope')"
+
+POL_System_TmpDelete
+POL_SetupWindow_Close
+exit 0
\ No newline at end of file

New source code

#!/usr/bin/env playonlinux-bash 
# Date : (2017-01-24)
# Last revision : (2017-02-04 03:07)
# Distribution used to test : Ubuntu 16.04 LTS, NVIDIA geforce GTX 770, 
# Author : lahtis
# Licence : retail
# PlayOnLinux: 4.2.12
# working 99%, it has unity engine mouse focus menu issues.
# Mouse losing focus in menus (can be fixed by pressing start on the keyboard and clicking on other windows but that also makes camera movement crazy)
# This installer pictures files found https://github.com/lahtis/playonlinux/blob/master/working/Subnautica/

[ "$PLAYONLINUX" = "" ] && exit 0
source "$PLAYONLINUX/lib/sources"
 
PREFIX="Subnautica"
WINEVERSION="3.1"
TITLE="Subnautica"
EDITOR="Unknown Worlds"
GAME_URL="https://unknownworlds.com/subnautica/"
AUTHOR="lahtis"
 
# Initialization
POL_GetSetupImages "http://files.playonlinux.com/resources/setups/$PREFIX/top.jpg" "http://files.playonlinux.com/resources/setups/$PREFIX/left.jpg" "$TITLE"
POL_SetupWindow_Init
POL_SetupWindow_SetID 3299
POL_Debug_Init
      
# Presentation
POL_SetupWindow_presentation "$TITLE" "$EDITOR" "$GAME_URL" "$AUTHOR" "$PREFIX"
 
# Create Prefix
POL_Wine_SelectPrefix "$PREFIX"
POL_System_SetArch "x64"
POL_Wine_PrefixCreate "$WINEVERSION" 
STEAM_ID="264710"
Set_OS "winxp"
POL_System_TmpCreate "$PREFIX"

# Moving TMP dir
cd "$POL_System_TmpDir"
  
# Registery fix
POL_SetupWindow_message "$(eval_gettext 'Modifying register.')" "$TITLE"

cat << EOF > fix.reg
REGEDIT4
 
[HKEY_CURRENT_USER\Software\Wine\AppDefaults\Steam.exe]
"Version"="winxp64"

[HKEY_CURRENT_USER\Software\Wine\AppDefaults\steamwebhelper.exe]
"Version"="winxp64"

[HKEY_CURRENT_USER\Software\Wine\X11 Driver]
"UseTakeFocus"="N"
EOF

POL_Wine regedit.exe fix.reg
POL_Wine_WaitExit "$TITLE"
 
# Installing mandatory dependencies
POL_Call POL_Install_vcrun2013
POL_Call POL_Install_corefonts

# Installing Steam
POL_Call POL_Install_steam
POL_SetupWindow_message "$(eval_gettext 'Install $TITLE in Steam. Run the $TITLE when Steam is installed the game.')" "$TITLE"
cd "$WINEPREFIX/drive_c/$PROGRAMFILES/Steam"
POL_Wine "steam.exe" steam://install/$STEAM_ID -no-cef-sandbox
POL_Wine_WaitBefore "$TITLE"

# Shortcut done before install for steam version
POL_Shortcut "steam.exe" "$TITLE (Steam)" "$TITLE.png" "steam://rungameid/$STEAM_ID"
      
POL_SetupWindow_message "$(eval_gettext 'When running game add -force-glcore or -force-opengl\nto your launch options by right clicking the game under Properties, Launch Options.\nNewer Nvidia Proprietary Drivers will work with -force-glcore45, which is OpenGL 4.5.')" "$TITLE"
POL_SetupWindow_message "$(eval_gettext 'If the game crashes at startup, open a terminal and type:\necho 0|sudo tee /proc/sys/kernel/yama/ptrace_scope')"

POL_System_TmpDelete
POL_SetupWindow_Close
exit 0

Replies

Sunday 4 February 2018 at 17:39
I valid it as testing ;)
Sunday 4 February 2018 at 17:40
Btw I patch the POL/POM corefonts function so now it should work fine
Sunday 4 February 2018 at 19:08
ok
lahtis Friday 2 February 2018 at 18:42
lahtis

Warning

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

Differences

@@ -0,0 +1,75 @@
+#!/usr/bin/env playonlinux-bash
+# Date : (2017-01-24)
+# Last revision : (2017-02-02 19:41)
+# Distribution used to test : Ubuntu 16.04
+# Author : lahtis
+# Licence : retail
+# PlayOnLinux: 4.2.12
+# working 99%, it has unity engine mouse focus menu issues.
+# Mouse losing focus in menus (can be fixed by pressing start on the keyboard and clicking on other windows but that also makes camera movement crazy)
+# This installer pictures files found https://github.com/lahtis/playonlinux/blob/master/working/Subnautica/
+   
+[ "$PLAYONLINUX" = "" ] && exit 0
+source "$PLAYONLINUX/lib/sources"
+   
+PREFIX="Subnautica"
+WINEVERSION="3.0-rc6"
+TITLE="Subnautica"
+EDITOR="Unknown Worlds"
+GAME_URL="https://unknownworlds.com/subnautica/"
+AUTHOR="lahtis"
+   
+# Initialization
+POL_GetSetupImages "http://files.playonlinux.com/resources/setups/$PREFIX/top.jpg" "http://files.playonlinux.com/resources/setups/$PREFIX/left.jpg" "$TITLE"
+POL_SetupWindow_Init
+POL_Debug_Init
+        
+# Presentation
+POL_SetupWindow_presentation "$TITLE" "$EDITOR" "$GAME_URL" "$AUTHOR" "$PREFIX"
+   
+# Create Prefix
+POL_Wine_SelectPrefix "$PREFIX"
+POL_System_SetArch "x64"
+POL_Wine_PrefixCreate "$WINEVERSION"
+STEAM_ID="264710"
+Set_OS "winxp"
+POL_System_TmpCreate "$PREFIX"
+  
+# Moving TMP dir
+cd "$POL_System_TmpDir"
+    
+# Registery fix
+POL_SetupWindow_message "$(eval_gettext 'Modifying register.')" "$TITLE"
+  
+cat << EOF > Steamfix.reg
+REGEDIT4
+   
+[HKEY_CURRENT_USER\Software\Wine\AppDefaults\Steam.exe]
+"Version"="winxp64"
+
+[HKEY_CURRENT_USER\Software\Wine\AppDefaults\steamwebhelper.exe]
+"Version"="winxp64"
+EOF
+  
+POL_Wine regedit.exe Steamfix.reg
+POL_Wine_WaitExit "$TITLE"
+   
+# Installing mandatory dependencies
+POL_Call POL_Install_vcrun2013
+POL_Call POL_Install_corefonts
+  
+# Installing Steam
+POL_Call POL_Install_steam
+POL_SetupWindow_message "$(eval_gettext 'Install $TITLE in Steam. Run the $TITLE when Steam is installed the game.')" "$TITLE"
+cd "$WINEPREFIX/drive_c/$PROGRAMFILES/Steam"
+POL_Wine "steam.exe" steam://install/$STEAM_ID -no-cef-sandbox
+POL_Wine_WaitBefore "$TITLE"
+  
+# Shortcut done before install for steam version
+POL_Shortcut "steam.exe" "$TITLE (Steam)" "$TITLE.png" "steam://rungameid/$STEAM_ID -force-glcore45"
+POL_SetupWindow_message "$(eval_gettext 'When running game add -force-glcore or -force-opengl\nto your launch options by right clicking the game under Properties, Launch Options.\nNewer Nvidia Proprietary Drivers will work with -force-glcore45, which is OpenGL 4.5.')" "$TITLE"
+POL_SetupWindow_message "$(eval_gettext 'If the game crashes at startup, open a terminal and type:\necho 0|sudo tee /proc/sys/kernel/yama/ptrace_scope')"
+   
+POL_System_TmpDelete
+POL_SetupWindow_Close
+exit 0
\ No newline at end of file

New source code

#!/usr/bin/env playonlinux-bash
# Date : (2017-01-24)
# Last revision : (2017-02-02 19:41)
# Distribution used to test : Ubuntu 16.04
# Author : lahtis
# Licence : retail
# PlayOnLinux: 4.2.12
# working 99%, it has unity engine mouse focus menu issues.
# Mouse losing focus in menus (can be fixed by pressing start on the keyboard and clicking on other windows but that also makes camera movement crazy)
# This installer pictures files found https://github.com/lahtis/playonlinux/blob/master/working/Subnautica/
   
[ "$PLAYONLINUX" = "" ] && exit 0
source "$PLAYONLINUX/lib/sources"
   
PREFIX="Subnautica"
WINEVERSION="3.0-rc6"
TITLE="Subnautica"
EDITOR="Unknown Worlds"
GAME_URL="https://unknownworlds.com/subnautica/"
AUTHOR="lahtis"
   
# Initialization
POL_GetSetupImages "http://files.playonlinux.com/resources/setups/$PREFIX/top.jpg" "http://files.playonlinux.com/resources/setups/$PREFIX/left.jpg" "$TITLE"
POL_SetupWindow_Init
POL_Debug_Init
        
# Presentation
POL_SetupWindow_presentation "$TITLE" "$EDITOR" "$GAME_URL" "$AUTHOR" "$PREFIX"
   
# Create Prefix
POL_Wine_SelectPrefix "$PREFIX"
POL_System_SetArch "x64"
POL_Wine_PrefixCreate "$WINEVERSION"
STEAM_ID="264710"
Set_OS "winxp"
POL_System_TmpCreate "$PREFIX"
  
# Moving TMP dir
cd "$POL_System_TmpDir"
    
# Registery fix
POL_SetupWindow_message "$(eval_gettext 'Modifying register.')" "$TITLE"
  
cat << EOF > Steamfix.reg
REGEDIT4
   
[HKEY_CURRENT_USER\Software\Wine\AppDefaults\Steam.exe]
"Version"="winxp64"

[HKEY_CURRENT_USER\Software\Wine\AppDefaults\steamwebhelper.exe]
"Version"="winxp64"
EOF
  
POL_Wine regedit.exe Steamfix.reg
POL_Wine_WaitExit "$TITLE"
   
# Installing mandatory dependencies
POL_Call POL_Install_vcrun2013
POL_Call POL_Install_corefonts
  
# Installing Steam
POL_Call POL_Install_steam
POL_SetupWindow_message "$(eval_gettext 'Install $TITLE in Steam. Run the $TITLE when Steam is installed the game.')" "$TITLE"
cd "$WINEPREFIX/drive_c/$PROGRAMFILES/Steam"
POL_Wine "steam.exe" steam://install/$STEAM_ID -no-cef-sandbox
POL_Wine_WaitBefore "$TITLE"
  
# Shortcut done before install for steam version
POL_Shortcut "steam.exe" "$TITLE (Steam)" "$TITLE.png" "steam://rungameid/$STEAM_ID -force-glcore45"
POL_SetupWindow_message "$(eval_gettext 'When running game add -force-glcore or -force-opengl\nto your launch options by right clicking the game under Properties, Launch Options.\nNewer Nvidia Proprietary Drivers will work with -force-glcore45, which is OpenGL 4.5.')" "$TITLE"
POL_SetupWindow_message "$(eval_gettext 'If the game crashes at startup, open a terminal and type:\necho 0|sudo tee /proc/sys/kernel/yama/ptrace_scope')"
   
POL_System_TmpDelete
POL_SetupWindow_Close
exit 0

Replies

Anonymous
Saturday 3 February 2018 at 13:05
Tried using the latest dev version of wine (3.1) and changing the line in options.bin file from ControllerEnabled to ControllerDisabled via Emacs hex editor. The issue with the mouse losing focus on menus still remains. I'm starting to doubt if this can be fixed with wine/winetricks/regedit/POL or it's something beyond user's controll like something in the game's code that for some reason runs fine in Windows but not under Linux.
https://www.reddit.com/r/linux_gaming/comments/7aaa7a/guideubuntufedorasubnautica_on_linux_using_wine/
According to this redit thread we need Wine devs to come up for a fix for this specific game which is unlikey. On the other hand pepole are saying that other games that rely on Unity (including Overwatch) are showing similiar issues.
Saturday 3 February 2018 at 19:01
Btw Overwatch isn't on Unity but a intern engine (said during Blizzcon 2014)
Saturday 3 February 2018 at 20:49
- Exit the game is not working properly. Get stuck?. maybe crash when press exit button.

- The issue with the mouse losing focus on menus still remains.?

- Mouse losing focus ?can be fixed pressing win button in keyboard. And Mouse and keyboard problems begin after 27 minutes of starting the game.? Played game about 10 hours.
lahtis Wednesday 31 January 2018 at 17:40
lahtis

Warning

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

Differences

@@ -0,0 +1,81 @@
+#!/usr/bin/env playonlinux-bash
+# Date : (2017-01-24)
+# Last revision : (2017-01-26 19:57)
+# Distribution used to test : Ubuntu 16.04
+# Author : lahtis
+# Licence : retail
+# PlayOnLinux: 4.2.12
+# working 99%, it has unity engine mouse focus menu issues. 
+# Mouse losing focus in menus (can be fixed by pressing start on the keyboard and clicking on other windows but that also makes camera movement crazy)
+# This installer pictures files found https://github.com/lahtis/playonlinux/blob/master/working/Subnautica/
+  
+[ "$PLAYONLINUX" = "" ] && exit 0
+source "$PLAYONLINUX/lib/sources"
+  
+PREFIX="Subnautica"
+WINEVERSION="3.0-rc6"
+TITLE="Subnautica"
+EDITOR="Unknown Worlds"
+GAME_URL="https://unknownworlds.com/subnautica/"
+AUTHOR="lahtis"
+  
+# Initialization
+POL_GetSetupImages "http://files.playonlinux.com/resources/setups/$PREFIX/top.jpg" "http://files.playonlinux.com/resources/setups/$PREFIX/left.jpg" "$TITLE"
+POL_SetupWindow_Init
+POL_Debug_Init
+       
+# Presentation
+POL_SetupWindow_presentation "$TITLE" "$EDITOR" "$GAME_URL" "$AUTHOR" "$PREFIX"
+  
+# Create Prefix
+POL_Wine_SelectPrefix "$PREFIX"
+POL_System_SetArch "x64"
+POL_Wine_PrefixCreate "$WINEVERSION"
+STEAM_ID="264710"
+Set_OS "winxp"
+POL_System_TmpCreate "$PREFIX"
+ 
+# Moving TMP dir
+cd "$POL_System_TmpDir"
+   
+# Registery fix
+POL_SetupWindow_message "$(eval_gettext 'Modifying register.')" "$TITLE"
+ 
+cat << EOF > Steam.reg
+REGEDIT4
+  
+[HKEY_CURRENT_USER\Software\Wine\AppDefaults\Steam.exe]
+"Version"="winxp64"
+EOF
+ 
+POL_Wine regedit.exe steam.reg
+ 
+cat << EOF > steamwebhelper.reg
+REGEDIT4
+  
+[HKEY_CURRENT_USER\Software\Wine\AppDefaults\steamwebhelper.exe]
+"Version"="winxp64"
+EOF
+ 
+POL_Wine regedit.exe steamwebhelper.reg
+POL_Wine_WaitExit "$TITLE"
+  
+# Installing mandatory dependencies
+POL_Call POL_Install_vcrun2013 
+POL_Call POL_Install_corefonts
+ 
+# Installing Steam
+POL_Call POL_Install_steam
+POL_SetupWindow_message "$(eval_gettext 'Install $TITLE in Steam. Run the $TITLE when Steam is installed the game.')" "$TITLE"
+cd "$WINEPREFIX/drive_c/$PROGRAMFILES/Steam"
+POL_Wine "steam.exe" steam://install/$STEAM_ID -no-cef-sandbox
+POL_Wine_WaitBefore "$TITLE"
+ 
+# Shortcut done before install for steam version
+POL_Shortcut "steam.exe" "$TITLE (Steam)" "$TITLE.png" "steam://rungameid/$STEAM_ID -force-glcore45"
+POL_SetupWindow_message "$(eval_gettext 'When running game add -force-glcore or -force-opengl\nto your launch options by right clicking the game under Properties, Launch Options.\nNewer Nvidia Proprietary Drivers will work with -force-glcore45, which is OpenGL 4.5.')" "$TITLE"
+POL_SetupWindow_message "$(eval_gettext 'If the game crashes at startup, open a terminal and type:\necho 0|sudo tee /proc/sys/kernel/yama/ptrace_scope')"
+  
+POL_System_TmpDelete
+POL_SetupWindow_Close
+exit 0
\ No newline at end of file

New source code

#!/usr/bin/env playonlinux-bash
# Date : (2017-01-24)
# Last revision : (2017-01-26 19:57)
# Distribution used to test : Ubuntu 16.04
# Author : lahtis
# Licence : retail
# PlayOnLinux: 4.2.12
# working 99%, it has unity engine mouse focus menu issues. 
# Mouse losing focus in menus (can be fixed by pressing start on the keyboard and clicking on other windows but that also makes camera movement crazy)
# This installer pictures files found https://github.com/lahtis/playonlinux/blob/master/working/Subnautica/
  
[ "$PLAYONLINUX" = "" ] && exit 0
source "$PLAYONLINUX/lib/sources"
  
PREFIX="Subnautica"
WINEVERSION="3.0-rc6"
TITLE="Subnautica"
EDITOR="Unknown Worlds"
GAME_URL="https://unknownworlds.com/subnautica/"
AUTHOR="lahtis"
  
# Initialization
POL_GetSetupImages "http://files.playonlinux.com/resources/setups/$PREFIX/top.jpg" "http://files.playonlinux.com/resources/setups/$PREFIX/left.jpg" "$TITLE"
POL_SetupWindow_Init
POL_Debug_Init
       
# Presentation
POL_SetupWindow_presentation "$TITLE" "$EDITOR" "$GAME_URL" "$AUTHOR" "$PREFIX"
  
# Create Prefix
POL_Wine_SelectPrefix "$PREFIX"
POL_System_SetArch "x64"
POL_Wine_PrefixCreate "$WINEVERSION"
STEAM_ID="264710"
Set_OS "winxp"
POL_System_TmpCreate "$PREFIX"
 
# Moving TMP dir
cd "$POL_System_TmpDir"
   
# Registery fix
POL_SetupWindow_message "$(eval_gettext 'Modifying register.')" "$TITLE"
 
cat << EOF > Steam.reg
REGEDIT4
  
[HKEY_CURRENT_USER\Software\Wine\AppDefaults\Steam.exe]
"Version"="winxp64"
EOF
 
POL_Wine regedit.exe steam.reg
 
cat << EOF > steamwebhelper.reg
REGEDIT4
  
[HKEY_CURRENT_USER\Software\Wine\AppDefaults\steamwebhelper.exe]
"Version"="winxp64"
EOF
 
POL_Wine regedit.exe steamwebhelper.reg
POL_Wine_WaitExit "$TITLE"
  
# Installing mandatory dependencies
POL_Call POL_Install_vcrun2013 
POL_Call POL_Install_corefonts
 
# Installing Steam
POL_Call POL_Install_steam
POL_SetupWindow_message "$(eval_gettext 'Install $TITLE in Steam. Run the $TITLE when Steam is installed the game.')" "$TITLE"
cd "$WINEPREFIX/drive_c/$PROGRAMFILES/Steam"
POL_Wine "steam.exe" steam://install/$STEAM_ID -no-cef-sandbox
POL_Wine_WaitBefore "$TITLE"
 
# Shortcut done before install for steam version
POL_Shortcut "steam.exe" "$TITLE (Steam)" "$TITLE.png" "steam://rungameid/$STEAM_ID -force-glcore45"
POL_SetupWindow_message "$(eval_gettext 'When running game add -force-glcore or -force-opengl\nto your launch options by right clicking the game under Properties, Launch Options.\nNewer Nvidia Proprietary Drivers will work with -force-glcore45, which is OpenGL 4.5.')" "$TITLE"
POL_SetupWindow_message "$(eval_gettext 'If the game crashes at startup, open a terminal and type:\necho 0|sudo tee /proc/sys/kernel/yama/ptrace_scope')"
  
POL_System_TmpDelete
POL_SetupWindow_Close
exit 0

Replies

Wednesday 31 January 2018 at 17:45
As I said you can use regedit one instead of two
cat << EOF > Steam.reg
REGEDIT4

[HKEY_CURRENT_USER\Software\Wine\AppDefaults\Steam.exe]
"Version"="winxp64"

[HKEY_CURRENT_USER\Software\Wine\AppDefaults\steamwebhelper.exe]
"Version"="winxp64"
EOF

POL_Wine regedit.exe Steam.reg

Everything else seems ok. If someone else can test it ? :-)
Anonymous
Wednesday 31 January 2018 at 19:31
I've tested it and the only diffirence is in debug log. Instead of DWrite and libcef it gives this:
err:module:import_dll Loading library MSVCR120.dll (which is needed by L"C:\\Program Files (x86)\\Steam\\bin\\gldriverquery64.exe") failed (error c000007b).
Other than that there is no diffirence between this script and mine. Game runs fine but the mouse still loses focus in menus after some time. Still haven't found the reason why.
Sunday 4 February 2018 at 20:19
if you download MSVCR120.dll and add the correct location. Error not show.
lahtis Sunday 28 January 2018 at 20:07
lahtis

Warning

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

Message

Debug GUIs (in game F1 and F3 menus are blank) install corefonts fix.

 

When running game add -force-glcore or -force-opengl to your launch options by right clicking the game under Properties, Launch Options.

Newer Nvidia Proprietary Drivers will work with -force-glcore45, which is OpenGL 4.5.

Differences

@@ -0,0 +1,93 @@
+#!/usr/bin/env playonlinux-bash 
+# Date : (2017-01-24)
+# Last revision : (2017-01-26 19:57)
+# Distribution used to test : Ubuntu 16.04 
+# Author : lahtis
+# Licence : retail
+# PlayOnLinux: 4.2.12
+# working 99%, it has unity engine mouse issues.
+# This installer pictures files found https://github.com/lahtis/playonlinux/blob/master/working/Subnautica/
+ 
+[ "$PLAYONLINUX" = "" ] && exit 0
+source "$PLAYONLINUX/lib/sources"
+ 
+PREFIX="Subnautica"
+WINEVERSION="3.0-rc6"
+TITLE="Subnautica"
+EDITOR="Unknown Worlds"
+GAME_URL="https://unknownworlds.com/subnautica/"
+AUTHOR="lahtis"
+ 
+# Initialization
+POL_GetSetupImages "http://files.playonlinux.com/resources/setups/$PREFIX/top.jpg" "http://files.playonlinux.com/resources/setups/$PREFIX/left.jpg" "$TITLE"
+POL_SetupWindow_Init
+
+POL_Debug_Init
+      
+# Presentation
+POL_SetupWindow_presentation "$TITLE" "$EDITOR" "$GAME_URL" "$AUTHOR" "$PREFIX"
+ 
+# Create Prefix
+POL_Wine_SelectPrefix "$PREFIX"
+POL_System_SetArch "x64"
+POL_Wine_PrefixCreate "$WINEVERSION" 
+STEAM_ID="264710"
+Set_OS "win7"
+POL_System_TmpCreate "$PREFIX"
+
+# Moving TMP dir
+cd "$POL_System_TmpDir"
+  
+POL_SetupWindow_question "$(eval_gettext 'Do you want to open $TITLE install guide in your browser?')" "$TITLE"
+
+	if [ "$APP_ANSWER" = "TRUE" ] 
+	then 
+	POL_Browser "https://steamcommunity.com/app/264710/discussions/0/1484358860940334488/"
+	fi
+
+# Registery fix
+POL_SetupWindow_message "$(eval_gettext 'Modifying register.')" "$TITLE"
+
+cat << EOF > Steam.reg
+REGEDIT4
+ 
+[HKEY_CURRENT_USER\Software\Wine\AppDefaults\Steam.exe]
+"Version"="winxp64"
+EOF
+
+POL_Wine regedit.exe steam.reg
+
+cat << EOF > steamwebhelper.reg
+REGEDIT4
+ 
+[HKEY_CURRENT_USER\Software\Wine\AppDefaults\steamwebhelper.exe]
+"Version"="winxp64"
+EOF
+
+POL_Wine regedit.exe steamwebhelper.reg
+
+POL_Wine_WaitExit "$TITLE"
+ 
+# Installing mandatory dependencies
+POL_Call POL_Install_vcrun2013
+POL_Call POL_Install_corefonts
+
+# Installing Steam
+POL_Call POL_Install_steam
+ 
+POL_SetupWindow_message "$(eval_gettext 'Install $TITLE in Steam. Run the $TITLE when Steam is installed the game.')" "$TITLE"
+cd "$WINEPREFIX/drive_c/$PROGRAMFILES/Steam"
+POL_Wine "steam.exe" steam://install/$STEAM_ID -no-cef-sandbox
+POL_Wine_WaitBefore "$TITLE"
+
+# Shortcut done before install for steam version
+POL_Shortcut "steam.exe" "$TITLE (Steam)" "$TITLE.png" "steam://rungameid/$STEAM_ID"
+      
+POL_SetupWindow_message "$(eval_gettext 'If the game crashes at startup, open a terminal and type:\necho 0|sudo tee /proc/sys/kernel/yama/ptrace_scope')"
+
+POL_SetupWindow_message "$(eval_gettext 'When running game add -force-glcore or -force-opengl\nto your launch options by right clicking the game under Properties, Launch Options.\nNewer Nvidia Proprietary Drivers will work with -force-glcore45, which is OpenGL 4.5.')" "$TITLE"
+ 
+POL_System_TmpDelete
+POL_SetupWindow_Close
+ 
+exit 0

New source code

#!/usr/bin/env playonlinux-bash 
# Date : (2017-01-24)
# Last revision : (2017-01-26 19:57)
# Distribution used to test : Ubuntu 16.04 
# Author : lahtis
# Licence : retail
# PlayOnLinux: 4.2.12
# working 99%, it has unity engine mouse issues.
# This installer pictures files found https://github.com/lahtis/playonlinux/blob/master/working/Subnautica/
 
[ "$PLAYONLINUX" = "" ] && exit 0
source "$PLAYONLINUX/lib/sources"
 
PREFIX="Subnautica"
WINEVERSION="3.0-rc6"
TITLE="Subnautica"
EDITOR="Unknown Worlds"
GAME_URL="https://unknownworlds.com/subnautica/"
AUTHOR="lahtis"
 
# Initialization
POL_GetSetupImages "http://files.playonlinux.com/resources/setups/$PREFIX/top.jpg" "http://files.playonlinux.com/resources/setups/$PREFIX/left.jpg" "$TITLE"
POL_SetupWindow_Init

POL_Debug_Init
      
# Presentation
POL_SetupWindow_presentation "$TITLE" "$EDITOR" "$GAME_URL" "$AUTHOR" "$PREFIX"
 
# Create Prefix
POL_Wine_SelectPrefix "$PREFIX"
POL_System_SetArch "x64"
POL_Wine_PrefixCreate "$WINEVERSION" 
STEAM_ID="264710"
Set_OS "win7"
POL_System_TmpCreate "$PREFIX"

# Moving TMP dir
cd "$POL_System_TmpDir"
  
POL_SetupWindow_question "$(eval_gettext 'Do you want to open $TITLE install guide in your browser?')" "$TITLE"

        if [ "$APP_ANSWER" = "TRUE" ] 
        then 
        POL_Browser "https://steamcommunity.com/app/264710/discussions/0/1484358860940334488/"
        fi

# Registery fix
POL_SetupWindow_message "$(eval_gettext 'Modifying register.')" "$TITLE"

cat << EOF > Steam.reg
REGEDIT4
 
[HKEY_CURRENT_USER\Software\Wine\AppDefaults\Steam.exe]
"Version"="winxp64"
EOF

POL_Wine regedit.exe steam.reg

cat << EOF > steamwebhelper.reg
REGEDIT4
 
[HKEY_CURRENT_USER\Software\Wine\AppDefaults\steamwebhelper.exe]
"Version"="winxp64"
EOF

POL_Wine regedit.exe steamwebhelper.reg

POL_Wine_WaitExit "$TITLE"
 
# Installing mandatory dependencies
POL_Call POL_Install_vcrun2013
POL_Call POL_Install_corefonts

# Installing Steam
POL_Call POL_Install_steam
 
POL_SetupWindow_message "$(eval_gettext 'Install $TITLE in Steam. Run the $TITLE when Steam is installed the game.')" "$TITLE"
cd "$WINEPREFIX/drive_c/$PROGRAMFILES/Steam"
POL_Wine "steam.exe" steam://install/$STEAM_ID -no-cef-sandbox
POL_Wine_WaitBefore "$TITLE"

# Shortcut done before install for steam version
POL_Shortcut "steam.exe" "$TITLE (Steam)" "$TITLE.png" "steam://rungameid/$STEAM_ID"
      
POL_SetupWindow_message "$(eval_gettext 'If the game crashes at startup, open a terminal and type:\necho 0|sudo tee /proc/sys/kernel/yama/ptrace_scope')"

POL_SetupWindow_message "$(eval_gettext 'When running game add -force-glcore or -force-opengl\nto your launch options by right clicking the game under Properties, Launch Options.\nNewer Nvidia Proprietary Drivers will work with -force-glcore45, which is OpenGL 4.5.')" "$TITLE"
 
POL_System_TmpDelete
POL_SetupWindow_Close
 
exit 0

Replies

Sunday 28 January 2018 at 20:32
No winxp64 on a win7 isn't good. Remove the URL for the guide on steam comunity, POL dosn't allow the use of winetrick. You can add the option directly to the launcher you created. Check the script just bellow
Anonymous
Monday 29 January 2018 at 15:59
I wonder why corefonts installed with steam does not work. Those are identical to corefonts installed via winetricks.
Monday 29 January 2018 at 16:15
because the script failed, one found cannot be downloaded and the script failed before proper installations. I already signal it to other of the team but we need to find a proper link.
Anonymous
Monday 29 January 2018 at 17:28
So it seems that the only problem we have with runing this game on Linux is mouse losing focus in menus (can be fixed by pressing start on the keyboard and clicking on other windows but that also makes camera movement crazy). Changing the mouse override setting did not help.
Wednesday 31 January 2018 at 16:36
win xp 64 working this game better than win 7.
Wednesday 31 January 2018 at 16:38
My gaming session lasts for about half an hour without losing mouse focus in menus. Then im restart game.
Wednesday 31 January 2018 at 16:42
Ok winxp can be better but in your script you use "Version"="winxp64" in steam reg and you run a win7 system!
Wednesday 31 January 2018 at 17:28
forgot when tested.
Anonymous
Wednesday 31 January 2018 at 17:44
My play-testing sessions last about 50 minutes. Unfortunatley the debug window dosen't show why mouse loses focus on menus and not in-game.
LinuxScripter Sunday 28 January 2018 at 18:29
LinuxScripter Anonymous

Warning

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

Message

Since this page exists I will put my script here instead of making a separate one. Remember to put -force-glcore45 in run options for this game. It throws some errors about missing dlls (DWrite.dll and libcef.dll) but other than that (and lack of Steam overlay) it works.

Differences

@@ -0,0 +1,39 @@
+#!/bin/bash
+# Date : (2018-01-25 21-38)
+# Last revision : (2018-01-25 21-38)
+# Wine version used : 3.0
+# Distribution used to test : Ubuntu 18.04 x64
+# Script licence : GPL3
+# Program licence : Retail
+ 
+[ -z "$PLAYONLINUX" ] && exit 0
+source "$PLAYONLINUX/lib/sources"
+
+TITLE="Subnautica" 
+PREFIX="Subnautica"
+WORKING_WINE_VERSION="3.0"
+AUTHOR="LinuxScripter"
+EDITOR="Unknown Worlds"
+GAME_URL="https://unknownworlds.com/subnautica/"
+ 
+POL_SetupWindow_Init
+POL_Debug_Init
+ 
+POL_SetupWindow_presentation "$TITLE" "$EDITOR" "$GAME_URL" "$AUTHOR" "$PREFIX"
+
+POL_Wine_SelectPrefix "$PREFIX"
+POL_System_SetArch "x64"
+POL_Wine_PrefixCreate "$WORKING_WINE_VERSION"
+#POL_System_TmpCreate "$TITLE"
+
+POL_Call POL_Install_vcrun2013
+
+POL_Call POL_Install_steam
+cd "$WINEPREFIX/drive_c/$PROGRAMFILES/Steam"
+POL_Wine "steam.exe" steam://install/264710
+POL_Wine_WaitBefore "$TITLE"
+
+POL_Shortcut "steam.exe" "$TITLE" "" "steam://rungameid/264710"
+ 
+POL_SetupWindow_Close
+exit 0
\ No newline at end of file

New source code

#!/bin/bash
# Date : (2018-01-25 21-38)
# Last revision : (2018-01-25 21-38)
# Wine version used : 3.0
# Distribution used to test : Ubuntu 18.04 x64
# Script licence : GPL3
# Program licence : Retail
 
[ -z "$PLAYONLINUX" ] && exit 0
source "$PLAYONLINUX/lib/sources"

TITLE="Subnautica" 
PREFIX="Subnautica"
WORKING_WINE_VERSION="3.0"
AUTHOR="LinuxScripter"
EDITOR="Unknown Worlds"
GAME_URL="https://unknownworlds.com/subnautica/"
 
POL_SetupWindow_Init
POL_Debug_Init
 
POL_SetupWindow_presentation "$TITLE" "$EDITOR" "$GAME_URL" "$AUTHOR" "$PREFIX"

POL_Wine_SelectPrefix "$PREFIX"
POL_System_SetArch "x64"
POL_Wine_PrefixCreate "$WORKING_WINE_VERSION"
#POL_System_TmpCreate "$TITLE"

POL_Call POL_Install_vcrun2013

POL_Call POL_Install_steam
cd "$WINEPREFIX/drive_c/$PROGRAMFILES/Steam"
POL_Wine "steam.exe" steam://install/264710
POL_Wine_WaitBefore "$TITLE"

POL_Shortcut "steam.exe" "$TITLE" "" "steam://rungameid/264710"
 
POL_SetupWindow_Close
exit 0

Replies

lahtis Friday 26 January 2018 at 18:59
lahtis

Warning

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

Message

  • Add a note fixing registery
  • remove pulseaudio

Differences

@@ -0,0 +1,96 @@
+#!/usr/bin/env playonlinux-bash 
+# Date : (2017-01-24)
+# Last revision : (2017-01-26 19:57)
+# Distribution used to test : Ubuntu 16.04 
+# Author : lahtis
+# Licence : retail
+# PlayOnLinux: 4.2.12
+# working 99%, it has unity engine mouse issues.
+ 
+[ "$PLAYONLINUX" = "" ] && exit 0
+source "$PLAYONLINUX/lib/sources"
+ 
+PREFIX="Subnautica"
+WINEVERSION="2.21-staging"
+TITLE="Subnautica"
+EDITOR="Unknown Worlds"
+GAME_URL="https://unknownworlds.com/subnautica/"
+AUTHOR="lahtis"
+ 
+# Initialization
+# Setup files found https://github.com/lahtis/playonlinux/blob/master/working/Subnautica/
+POL_GetSetupImages "http://files.playonlinux.com/resources/setups/$PREFIX/top.jpg" "http://files.playonlinux.com/resources/setups/$PREFIX/left.jpg" "$TITLE"
+POL_SetupWindow_Init
+      
+POL_Debug_Init
+      
+# Presentation
+POL_SetupWindow_presentation "$TITLE" "$EDITOR" "$GAME_URL" "$AUTHOR" "$PREFIX"
+ 
+# Create Prefix
+POL_Wine_SelectPrefix "$PREFIX"
+POL_System_SetArch "x64"
+POL_Wine_PrefixCreate "$WINEVERSION" 
+GAME_VMS="512"
+STEAM_ID="264710"
+Set_OS "winxp"
+  
+# Asking about memory size of graphic card
+POL_SetupWindow_VMS $GAME_VMS
+
+# Disable Steam In Game Overlay
+POL_Wine_OverrideDLL "" "gameoverlayrenderer" # To disable the DLL
+
+POL_SetupWindow_question "$(eval_gettext 'Do you want to open $TITLE install guide in your browser?')" "$TITLE"
+
+	if [ "$APP_ANSWER" = "TRUE" ] 
+	then 
+	POL_Browser "https://steamcommunity.com/app/264710/discussions/0/1484358860940334488/"
+	fi
+
+# Registery fix
+POL_SetupWindow_message "$(eval_gettext 'Fixing register.')" "$TITLE"
+
+cat << EOF > Steam.reg
+REGEDIT4
+ 
+[HKEY_CURRENT_USER\Software\Wine\AppDefaults\Steam.exe]
+"Version"="winxp64"
+EOF
+
+POL_Wine regedit.exe steam.reg
+
+cat << EOF > steamwebhelper.reg
+REGEDIT4
+ 
+[HKEY_CURRENT_USER\Software\Wine\AppDefaults\steamwebhelper.exe]
+"Version"="winxp64"
+EOF
+
+POL_Wine regedit.exe steamwebhelper.reg
+
+POL_Wine_WaitExit "$TITLE"
+ 
+# Installing mandatory dependencies
+POL_Call POL_Install_corefonts
+
+# Installing Steam
+POL_Call POL_Install_steam
+ 
+# 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" "$TITLE" "$TITLE.png" "steam://rungameid/$STEAM_ID -no-cef-sandbox -force-glcore45"
+POL_Shortcut "steam.exe" "Steam ($TITLE)" "-no-cef-sandbox" ""
+
+POL_SetupWindow_message "$(eval_gettext 'Install $TITLE in Steam. Run the $TITLE when Steam is installed the game.')" "$TITLE"
+cd "$WINEPREFIX/drive_c/$PROGRAMFILES/Steam"
+POL_Wine start /unix "steam.exe" steam://install/$STEAM_ID
+POL_Wine_WaitExit "$TITLE"
+      
+POL_SetupWindow_message "$(eval_gettext 'If the game crashes at startup, open a terminal and type:\necho 0|sudo tee /proc/sys/kernel/yama/ptrace_scope')"
+ 
+POL_SetupWindow_Close
+ 
+exit 0
\ No newline at end of file

New source code

#!/usr/bin/env playonlinux-bash 
# Date : (2017-01-24)
# Last revision : (2017-01-26 19:57)
# Distribution used to test : Ubuntu 16.04 
# Author : lahtis
# Licence : retail
# PlayOnLinux: 4.2.12
# working 99%, it has unity engine mouse issues.
 
[ "$PLAYONLINUX" = "" ] && exit 0
source "$PLAYONLINUX/lib/sources"
 
PREFIX="Subnautica"
WINEVERSION="2.21-staging"
TITLE="Subnautica"
EDITOR="Unknown Worlds"
GAME_URL="https://unknownworlds.com/subnautica/"
AUTHOR="lahtis"
 
# Initialization
# Setup files found https://github.com/lahtis/playonlinux/blob/master/working/Subnautica/
POL_GetSetupImages "http://files.playonlinux.com/resources/setups/$PREFIX/top.jpg" "http://files.playonlinux.com/resources/setups/$PREFIX/left.jpg" "$TITLE"
POL_SetupWindow_Init
      
POL_Debug_Init
      
# Presentation
POL_SetupWindow_presentation "$TITLE" "$EDITOR" "$GAME_URL" "$AUTHOR" "$PREFIX"
 
# Create Prefix
POL_Wine_SelectPrefix "$PREFIX"
POL_System_SetArch "x64"
POL_Wine_PrefixCreate "$WINEVERSION" 
GAME_VMS="512"
STEAM_ID="264710"
Set_OS "winxp"
  
# Asking about memory size of graphic card
POL_SetupWindow_VMS $GAME_VMS

# Disable Steam In Game Overlay
POL_Wine_OverrideDLL "" "gameoverlayrenderer" # To disable the DLL

POL_SetupWindow_question "$(eval_gettext 'Do you want to open $TITLE install guide in your browser?')" "$TITLE"

        if [ "$APP_ANSWER" = "TRUE" ] 
        then 
        POL_Browser "https://steamcommunity.com/app/264710/discussions/0/1484358860940334488/"
        fi

# Registery fix
POL_SetupWindow_message "$(eval_gettext 'Fixing register.')" "$TITLE"

cat << EOF > Steam.reg
REGEDIT4
 
[HKEY_CURRENT_USER\Software\Wine\AppDefaults\Steam.exe]
"Version"="winxp64"
EOF

POL_Wine regedit.exe steam.reg

cat << EOF > steamwebhelper.reg
REGEDIT4
 
[HKEY_CURRENT_USER\Software\Wine\AppDefaults\steamwebhelper.exe]
"Version"="winxp64"
EOF

POL_Wine regedit.exe steamwebhelper.reg

POL_Wine_WaitExit "$TITLE"
 
# Installing mandatory dependencies
POL_Call POL_Install_corefonts

# Installing Steam
POL_Call POL_Install_steam
 
# 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" "$TITLE" "$TITLE.png" "steam://rungameid/$STEAM_ID -no-cef-sandbox -force-glcore45"
POL_Shortcut "steam.exe" "Steam ($TITLE)" "-no-cef-sandbox" ""

POL_SetupWindow_message "$(eval_gettext 'Install $TITLE in Steam. Run the $TITLE when Steam is installed the game.')" "$TITLE"
cd "$WINEPREFIX/drive_c/$PROGRAMFILES/Steam"
POL_Wine start /unix "steam.exe" steam://install/$STEAM_ID
POL_Wine_WaitExit "$TITLE"
      
POL_SetupWindow_message "$(eval_gettext 'If the game crashes at startup, open a terminal and type:\necho 0|sudo tee /proc/sys/kernel/yama/ptrace_scope')"
 
POL_SetupWindow_Close
 
exit 0

Replies

Friday 26 January 2018 at 21:03
As I already said, avoid creating a second shortcut to steam. If all script with steam game does the same, the user will have a lot of "STEAM" launcher.

POL_Wine_OverrideDLL "" "gameoverlayrenderer" is already done by the steam installation script (and may be not required anymore)
Friday 26 January 2018 at 21:05
And an other note, where do you create the reg file ? Use a tmp directory. And you can define both entry into the same file
Anonymous
Saturday 27 January 2018 at 11:36
First of all this version of wine is outdated. 3.0 improves DX11 support so it's allways better to use this. Also dont use the GAME_VMS line. Instead let the users change that setting. the STEAM_ID line is not as necesseary nowdays. Setting OS to winxp for a modern game makes no sense. Same with editing the registry. It's better to install dependencies before the script starts Steam instalation.
lahtis Friday 26 January 2018 at 16:10
lahtis

Warning

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

Differences

@@ -0,0 +1,97 @@
+#!/bin/bash
+# Date : (2017-01-24)
+# Last revision : (2017-01-26)
+# Distribution used to test : Ubuntu 16.04
+# Author : lahtis
+# Licence : retail
+# PlayOnLinux: 4.2.12
+# working 99%, it has unity engine mouse issues.
+ 
+[-z "$PLAYONLINUX" = "" ] && exit 0
+source "$PLAYONLINUX/lib/sources"
+ 
+PREFIX="Subnautica"
+WINEVERSION="2.21-staging"
+TITLE="Subnautica"
+EDITOR="Unknown Worlds"
+GAME_URL="https://unknownworlds.com/subnautica/"
+AUTHOR="lahtis"
+ 
+# Initialization
+# Setup files found https://github.com/lahtis/playonlinux/blob/master/working/Subnautica/
+POL_GetSetupImages "http://files.playonlinux.com/resources/setups/$PREFIX/top.jpg" "http://files.playonlinux.com/resources/setups/$PREFIX/left.jpg" "$TITLE"
+POL_SetupWindow_Init
+      
+POL_Debug_Init
+      
+# Presentation
+POL_SetupWindow_presentation "$TITLE" "$EDITOR" "$GAME_URL" "$AUTHOR" "$PREFIX"
+ 
+# Create Prefix
+POL_Wine_SelectPrefix "$PREFIX"
+POL_System_SetArch "x64"
+POL_Wine_PrefixCreate "$WINEVERSION" 
+GAME_VMS="512"
+STEAM_ID="264710"
+ 
+# Fix pulseaudio issue
+which pulseaudio && Set_OS "winxp"
+  
+# Asking about memory size of graphic card
+POL_SetupWindow_VMS $GAME_VMS
+
+# Disable Steam In Game Overlay
+POL_Wine_OverrideDLL "" "gameoverlayrenderer" # To disable the DLL
+
+POL_SetupWindow_question "$(eval_gettext 'Do you want to open $TITLE install guide in your browser?')" "$TITLE"
+
+	if [ "$APP_ANSWER" = "TRUE" ] 
+	then 
+	POL_Browser "https://steamcommunity.com/app/264710/discussions/0/1484358860940334488/"
+	fi
+
+# Registery fix
+cat << EOF > Steam.reg
+REGEDIT4
+ 
+[HKEY_CURRENT_USER\Software\Wine\AppDefaults\Steam.exe]
+"Version"="winxp64"
+EOF
+
+POL_Wine regedit.exe steam.reg
+
+cat << EOF > steamwebhelper.reg
+REGEDIT4
+ 
+[HKEY_CURRENT_USER\Software\Wine\AppDefaults\steamwebhelper.exe]
+"Version"="winxp64"
+EOF
+
+POL_Wine regedit.exe steamwebhelper.reg
+
+ 
+# Installing mandatory dependencies
+POL_Call POL_Install_corefonts
+
+# Installing Steam
+POL_Call POL_Install_steam
+ 
+# 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" "$TITLE" "$TITLE.png" "steam://rungameid/$STEAM_ID"
+POL_Shortcut "steam.exe" "Steam ($TITLE)" "-no-cef-sandbox -force-glcore45" ""
+
+Set_OS "win7"
+
+POL_SetupWindow_message "$(eval_gettext 'Install $TITLE in Steam. Run the $TITLE when Steam is installed the game.')" "$TITLE"
+cd "$WINEPREFIX/drive_c/$PROGRAMFILES/Steam"
+POL_Wine start /unix "steam.exe" steam://install/$STEAM_ID
+POL_Wine_WaitExit "$TITLE"
+      
+POL_SetupWindow_message "$(eval_gettext 'If the game crashes at startup, open a terminal and type:\necho 0|sudo tee /proc/sys/kernel/yama/ptrace_scope')"
+ 
+POL_SetupWindow_Close
+ 
+exit 0
\ No newline at end of file

New source code

#!/bin/bash
# Date : (2017-01-24)
# Last revision : (2017-01-26)
# Distribution used to test : Ubuntu 16.04
# Author : lahtis
# Licence : retail
# PlayOnLinux: 4.2.12
# working 99%, it has unity engine mouse issues.
 
[-z "$PLAYONLINUX" = "" ] && exit 0
source "$PLAYONLINUX/lib/sources"
 
PREFIX="Subnautica"
WINEVERSION="2.21-staging"
TITLE="Subnautica"
EDITOR="Unknown Worlds"
GAME_URL="https://unknownworlds.com/subnautica/"
AUTHOR="lahtis"
 
# Initialization
# Setup files found https://github.com/lahtis/playonlinux/blob/master/working/Subnautica/
POL_GetSetupImages "http://files.playonlinux.com/resources/setups/$PREFIX/top.jpg" "http://files.playonlinux.com/resources/setups/$PREFIX/left.jpg" "$TITLE"
POL_SetupWindow_Init
      
POL_Debug_Init
      
# Presentation
POL_SetupWindow_presentation "$TITLE" "$EDITOR" "$GAME_URL" "$AUTHOR" "$PREFIX"
 
# Create Prefix
POL_Wine_SelectPrefix "$PREFIX"
POL_System_SetArch "x64"
POL_Wine_PrefixCreate "$WINEVERSION" 
GAME_VMS="512"
STEAM_ID="264710"
 
# Fix pulseaudio issue
which pulseaudio && Set_OS "winxp"
  
# Asking about memory size of graphic card
POL_SetupWindow_VMS $GAME_VMS

# Disable Steam In Game Overlay
POL_Wine_OverrideDLL "" "gameoverlayrenderer" # To disable the DLL

POL_SetupWindow_question "$(eval_gettext 'Do you want to open $TITLE install guide in your browser?')" "$TITLE"

        if [ "$APP_ANSWER" = "TRUE" ] 
        then 
        POL_Browser "https://steamcommunity.com/app/264710/discussions/0/1484358860940334488/"
        fi

# Registery fix
cat << EOF > Steam.reg
REGEDIT4
 
[HKEY_CURRENT_USER\Software\Wine\AppDefaults\Steam.exe]
"Version"="winxp64"
EOF

POL_Wine regedit.exe steam.reg

cat << EOF > steamwebhelper.reg
REGEDIT4
 
[HKEY_CURRENT_USER\Software\Wine\AppDefaults\steamwebhelper.exe]
"Version"="winxp64"
EOF

POL_Wine regedit.exe steamwebhelper.reg

 
# Installing mandatory dependencies
POL_Call POL_Install_corefonts

# Installing Steam
POL_Call POL_Install_steam
 
# 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" "$TITLE" "$TITLE.png" "steam://rungameid/$STEAM_ID"
POL_Shortcut "steam.exe" "Steam ($TITLE)" "-no-cef-sandbox -force-glcore45" ""

Set_OS "win7"

POL_SetupWindow_message "$(eval_gettext 'Install $TITLE in Steam. Run the $TITLE when Steam is installed the game.')" "$TITLE"
cd "$WINEPREFIX/drive_c/$PROGRAMFILES/Steam"
POL_Wine start /unix "steam.exe" steam://install/$STEAM_ID
POL_Wine_WaitExit "$TITLE"
      
POL_SetupWindow_message "$(eval_gettext 'If the game crashes at startup, open a terminal and type:\necho 0|sudo tee /proc/sys/kernel/yama/ptrace_scope')"
 
POL_SetupWindow_Close
 
exit 0

Replies

Friday 26 January 2018 at 16:24
Please detect if the script is on POM or POL before doing stuff with pulsaudio. And is it required to use the register ? And avoid creating a steam shortcut, user may have to many steam shortcut with that
Friday 26 January 2018 at 16:33
same fot he last message, it's POL specific
Friday 26 January 2018 at 18:36
yes it is required use register fix.
lahtis Friday 26 January 2018 at 16:02
lahtis

Warning

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

Differences

@@ -0,0 +1,96 @@
+#!/bin/bash
+# Date : (2017-01-24)
+# Last revision : (2017-01-26)
+# Distribution used to test : Ubuntu 16.04
+# Author : lahtis
+# Licence : retail
+# PlayOnLinux: 4.2.12
+# working 99%, it has unity mouse issues.
+ 
+[-z "$PLAYONLINUX" = "" ] && exit 0
+source "$PLAYONLINUX/lib/sources"
+ 
+PREFIX="Subnautica-test"
+WINEVERSION="2.21-staging"
+TITLE="Subnautica"
+EDITOR="Unknown Worlds"
+GAME_URL="https://unknownworlds.com/subnautica/"
+AUTHOR="lahtis"
+ 
+# Initialization
+# Setup files found https://github.com/lahtis/playonlinux/blob/master/working/Subnautica/
+POL_GetSetupImages "http://files.playonlinux.com/resources/setups/$PREFIX/top.jpg" "http://files.playonlinux.com/resources/setups/$PREFIX/left.jpg" "$TITLE"
+POL_SetupWindow_Init
+      
+POL_Debug_Init
+      
+# Presentation
+POL_SetupWindow_presentation "$TITLE" "$EDITOR" "$GAME_URL" "$AUTHOR" "$PREFIX"
+ 
+# Create Prefix
+POL_Wine_SelectPrefix "$PREFIX"
+POL_System_SetArch "x64"
+POL_Wine_PrefixCreate "$WINEVERSION" 
+GAME_VMS="512"
+STEAM_ID="264710"
+ 
+# Fix pulseaudio issue
+which pulseaudio && Set_OS "winxp"
+  
+# Asking about memory size of graphic card
+POL_SetupWindow_VMS $GAME_VMS
+
+# Disable Steam In Game Overlay
+POL_Wine_OverrideDLL "" "gameoverlayrenderer" # To disable the DLL
+
+POL_SetupWindow_question "$(eval_gettext 'Do you want to open $TITLE install guide in your browser?')" "$TITLE"
+
+	if [ "$APP_ANSWER" = "TRUE" ] 
+	then 
+	POL_Browser "https://steamcommunity.com/app/264710/discussions/0/1484358860940334488/"
+	fi
+
+# Registery fix
+cat << EOF > Steam.reg
+REGEDIT4
+ 
+[HKEY_CURRENT_USER\Software\Wine\AppDefaults\Steam.exe]
+"Version"="winxp64"
+EOF
+
+POL_Wine regedit.exe steam.reg
+
+cat << EOF > steamwebhelper.reg
+REGEDIT4
+ 
+[HKEY_CURRENT_USER\Software\Wine\AppDefaults\steamwebhelper.exe]
+"Version"="winxp64"
+EOF
+
+POL_Wine regedit.exe steamwebhelper.reg
+
+# Installing mandatory dependencies
+POL_Call POL_Install_corefonts
+
+# Installing Steam
+POL_Call POL_Install_steam
+ 
+# 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" "$TITLE" "$TITLE.png" "steam://rungameid/$STEAM_ID"
+POL_Shortcut "steam.exe" "Steam ($TITLE)" "-no-cef-sandbox -force-glcore45" ""
+
+Set_OS "win7"
+
+POL_SetupWindow_message "$(eval_gettext 'Install $TITLE in Steam. Run the $TITLE when Steam is installed the game.')" "$TITLE"
+cd "$WINEPREFIX/drive_c/$PROGRAMFILES/Steam"
+POL_Wine start /unix "steam.exe" steam://install/$STEAM_ID
+POL_Wine_WaitExit "$TITLE"
+      
+POL_SetupWindow_message "$(eval_gettext 'If the game crashes at startup, open a terminal and type:\necho 0|sudo tee /proc/sys/kernel/yama/ptrace_scope')"
+ 
+POL_SetupWindow_Close
+ 
+exit 0
\ No newline at end of file

New source code

#!/bin/bash
# Date : (2017-01-24)
# Last revision : (2017-01-26)
# Distribution used to test : Ubuntu 16.04
# Author : lahtis
# Licence : retail
# PlayOnLinux: 4.2.12
# working 99%, it has unity mouse issues.
 
[-z "$PLAYONLINUX" = "" ] && exit 0
source "$PLAYONLINUX/lib/sources"
 
PREFIX="Subnautica-test"
WINEVERSION="2.21-staging"
TITLE="Subnautica"
EDITOR="Unknown Worlds"
GAME_URL="https://unknownworlds.com/subnautica/"
AUTHOR="lahtis"
 
# Initialization
# Setup files found https://github.com/lahtis/playonlinux/blob/master/working/Subnautica/
POL_GetSetupImages "http://files.playonlinux.com/resources/setups/$PREFIX/top.jpg" "http://files.playonlinux.com/resources/setups/$PREFIX/left.jpg" "$TITLE"
POL_SetupWindow_Init
      
POL_Debug_Init
      
# Presentation
POL_SetupWindow_presentation "$TITLE" "$EDITOR" "$GAME_URL" "$AUTHOR" "$PREFIX"
 
# Create Prefix
POL_Wine_SelectPrefix "$PREFIX"
POL_System_SetArch "x64"
POL_Wine_PrefixCreate "$WINEVERSION" 
GAME_VMS="512"
STEAM_ID="264710"
 
# Fix pulseaudio issue
which pulseaudio && Set_OS "winxp"
  
# Asking about memory size of graphic card
POL_SetupWindow_VMS $GAME_VMS

# Disable Steam In Game Overlay
POL_Wine_OverrideDLL "" "gameoverlayrenderer" # To disable the DLL

POL_SetupWindow_question "$(eval_gettext 'Do you want to open $TITLE install guide in your browser?')" "$TITLE"

        if [ "$APP_ANSWER" = "TRUE" ] 
        then 
        POL_Browser "https://steamcommunity.com/app/264710/discussions/0/1484358860940334488/"
        fi

# Registery fix
cat << EOF > Steam.reg
REGEDIT4
 
[HKEY_CURRENT_USER\Software\Wine\AppDefaults\Steam.exe]
"Version"="winxp64"
EOF

POL_Wine regedit.exe steam.reg

cat << EOF > steamwebhelper.reg
REGEDIT4
 
[HKEY_CURRENT_USER\Software\Wine\AppDefaults\steamwebhelper.exe]
"Version"="winxp64"
EOF

POL_Wine regedit.exe steamwebhelper.reg

# Installing mandatory dependencies
POL_Call POL_Install_corefonts

# Installing Steam
POL_Call POL_Install_steam
 
# 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" "$TITLE" "$TITLE.png" "steam://rungameid/$STEAM_ID"
POL_Shortcut "steam.exe" "Steam ($TITLE)" "-no-cef-sandbox -force-glcore45" ""

Set_OS "win7"

POL_SetupWindow_message "$(eval_gettext 'Install $TITLE in Steam. Run the $TITLE when Steam is installed the game.')" "$TITLE"
cd "$WINEPREFIX/drive_c/$PROGRAMFILES/Steam"
POL_Wine start /unix "steam.exe" steam://install/$STEAM_ID
POL_Wine_WaitExit "$TITLE"
      
POL_SetupWindow_message "$(eval_gettext 'If the game crashes at startup, open a terminal and type:\necho 0|sudo tee /proc/sys/kernel/yama/ptrace_scope')"
 
POL_SetupWindow_Close
 
exit 0

Replies

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