Terraria

Informations

Créateur Messages
lahtis

Attention

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

Informations

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

Retours d'expérience

Description

Action-adventure sandbox game (2011). Dig, fight, explore, build! Nothing is impossible in this action-packed 2D-adventure game. The world is your canvas and the ground itself is your paint. Wikipedia.

Appdb.winehq.org .

Captures d'écran

MiniatureMiniatureMiniature

Code source

#!/bin/bash
# Date : (2013-02-18)
# Last revision : see the changelog below
# Wine version used : see the changelog below
# Distribution used to test : XUbuntu 18.04 64 bits
# Author : Lahtis
# Licence : Retail
# Only For : http://www.playonlinux.com
#
# TESTED Editions: v1.3.5.3 (2017).
#
# Middlewares used by this software : XNA .
#
#
# CHANGELOG
# [lahtis] (2013-02-18)
#   First script.
# [lahtis] (2018-02-09)
#   ...
# [Dadu042] (2019-12-11)
#   Wine 3.1 -> 3.0.3 (for POL v4.2.12).
#   Add POL_RequiredVersion "4.2.1"
# [Dadu042] (2020-03-28)
#   New script (to allow installation from local file).
#   VMS 512 -> 256
#
# KNOWN ISSUES
#  - Wine amd64 4.21, 5.0: X
#
#
#
# KNOWN ISSUES (FIXED):
#  - Wine x86 5.0: on the main menu the mouse can not click the buttons. Tried: d3dx11. Fix: Wine 5.2
#  - 
  
[ "$PLAYONLINUX" = "" ] && exit 0
source "$PLAYONLINUX/lib/sources"

TITLE="Terraria"
PREFIX="terraria"
EDITOR="Merge Games"
GAME_URL="http://www.terraria.org/"
AUTHOR="Lahtis"
STEAM_ID="105600"
GAME_VMS="256"
SHORTCUT_FILENAME="Terraria.exe"
SOFTWARE_CATEGORIES="Game;"
# http://wiki.playonlinux.com/index.php/Scripting_-_Chapter_9:_Standardization#Advanced_Standardization
DOCUMENT_FILE=""
        
# Starting the script
POL_SetupWindow_Init
                     
# Starting debugging API
POL_Debug_Init
    
# Open dialogue box 
POL_SetupWindow_presentation "$TITLE" "$EDITOR" "$GAME_URL" "$AUTHOR" "$PREFIX"
  
# POL_SetupWindow_message "$(eval_gettext 'WARNING: this software does exist in Linux native version.\n\nThis script only allow to run the Windows version on Linux, please prefer the Linux edition for better 3D speed.')" "$TITLE"
  
# POL_SetupWindow_message "$(eval_gettext 'This game requires a fast 3D GPU (ie: Intel HD Graphics 4440 is not enough).')" "$TITLE"
  
POL_RequiredVersion "4.1.0" || POL_Debug_Fatal "$APPLICATION_TITLE $VERSION is required to install $TITLE"
  
# Setting prefix path
POL_Wine_SelectPrefix "$PREFIX"
        
# Determine Architecture
# POL_System_SetArch "amd64"
POL_System_SetArch "x86"
    
# Downloading wine if necessary and creating prefix
POL_Wine_PrefixCreate "3.0.3"
  
POL_System_TmpCreate "$PREFIX"
         
Set_OS "win7"


POL_Call POL_Function_SetResolution

#######################################
#  Installing mandatory dependencies  #
#######################################

POL_Call POL_Install_xinput # Fix game issue
POL_Call POL_Install_xna40  # Fix game issue


# POL_Call POL_Install_corefonts
# POL_Call POL_Install_mfc42
# POL_Call POL_Install_directmusic
# POL_Call POL_Install_dsound
# POL_Call POL_Install_quartz
# POL_Call POL_Install_d3dx9_43
# POL_Call POL_Install_d3dcompiler_43
# POL_Call POL_Install_wininet
# POL_Call POL_Install_corefonts
# POL_Call POL_Install_dotnet30sp1
# POL_Call POL_Install_mono5.20
# POL_Call POL_Install_dotnet20
# POL_Call POL_Install_dotnet40
# POL_Call POL_Install_dotnet472
# POL_Call POL_Install_dsound
# POL_Call POL_Install_riched30
# POL_Call POL_Install_corefonts
# POL_Call POL_Install_d3dx11
# POL_Call POL_Install_mono210
             
             
################
#      GPU     #
################
         
# Asking about memory size of graphic card
POL_SetupWindow_VMS $GAME_VMS
          
# Set Graphic Card information keys for wine
POL_Wine_SetVideoDriver
           
# Useful for Nvidia GPUs
# POL_Call POL_Install_physx
             
             
#############################################
#  Sound problem fix - pulseaudio related   #
#############################################
# [ "$POL_OS" = "Linux" ] && Set_SoundDriver "alsa"
# [ "$POL_OS" = "Linux" ] && Set_SoundEmulDriver "Y"
## End Fix
          
         
#######################################
#  Main part of this script           #
#######################################
             
# Choose between Steam and other Digital Download versions
# POL_SetupWindow_InstallMethod "STEAM,DVD,LOCAL,DOWNLOAD"
POL_SetupWindow_InstallMethod "LOCAL,STEAM"
  
# POL_SetupWindow_message "Warning: do not install DirectX (nor icons)." "$TITLE"
# POL_SetupWindow_message "Warning: do not install Visual C++ 2013 redistribuable\n nor Direct X." "$TITLE"
          
# Begin game installation
if [ "$INSTALL_METHOD" == "STEAM" ]; then
        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" "" "steam://rungameid/$STEAM_ID"
        # Steam install
        POL_SetupWindow_message "$(eval_gettext 'When $TITLE download by Steam is finished,\nDo NOT click on Play.\n\nClose COMPLETELY the Steam interface, \nso that the installation script can continue')" "$TITLE"
        cd "$WINEPREFIX/drive_c/$PROGRAMFILES/Steam"
        POL_Wine start /unix "steam.exe" steam://install/$STEAM_ID
        POL_Wine_WaitExit "$TITLE"
                  
elif [ "$INSTALL_METHOD" == "CD" ]; then
        POL_SetupWindow_cdrom
                  
        # POL_Call POL_Function_NoCDWarning
           
        POL_SetupWindow_check_cdrom "setup.exe"
        POL_Wine start /unix "$CDROM/setup.exe"
                 
        POL_Wine_WaitExit "$TITLE"
              
        # Restore screen resolution (game's default is 800x600 ?)
        # POL_Shortcut_InsertBeforeWine "$SHORTCUT" "trap 'xrandr -s 0' EXIT"
                 
        POL_Shortcut "$SHORTCUT_FILENAME" "$TITLE" "" "" "$SOFTWARE_CATEGORIES"
        POL_Shortcut_QuietDebug "$TITLE"
        POL_Shortcut_Document "$TITLE" "$DOCUMENT_FILE"
          
          
elif [ "$INSTALL_METHOD" == "DOWNLOAD" ]; then
        cd "$WINEPREFIX/drive_c"
         
        # POL_SetupWindow_message "$(eval_gettext '\n\nNote: this script will download the beta v0.5 .')" "$TITLE"
        POL_Download "https://ggj.s3.amazonaws.com/games/2020/02/271015/src/VCwio/Teacher%20Simulator.zip"
        # Also hosted on: https://archive.org/details/eternalwar_201612
       
        # mv Mystery-of-Unicorn-Castle-the-Beastmaster.exe GameInstaller.exe
        # mv Teacher%20Simulator.rar gameinstaller.rar        
        mv Teacher%20Simulator.zip gameinstaller.zip
       
        # POL_SetupWindow_wait_next_signal "$(eval_gettext 'Extracting the archive...')" "$TITLE"
        # POL_System_unrar x "gameinstaller.rar" "$WINEPREFIX/drive_c/game/" || POL_Debug_Fatal "unrar is required to unarchive $TITLE (unrar package is not installed on the OS)."
        POL_System_unzip "gameinstaller.zip" -d "$WINEPREFIX/drive_c/game/"
         
        # Extract without sub-folder.
        # unzip "gameinstaller.zip" -j -d "$WINEPREFIX/drive_c/"
         
        # POL_SetupWindow_message "$(eval_gettext 'Note: we recommend you to uncheck all the checkboxes:\n[x] -> [ ]')" "$TITLE"
          
        # cd  "$WINEPREFIX/drive_c/game/"
        # POL_Wine "setup.exe" # "/SILENT"
        # POL_Wine_WaitBefore "$TITLE"
 
        # rm GameInstaller.exe
        rm gameinstaller.zip
         
        POL_Shortcut "$SHORTCUT_FILENAME" "$TITLE" "" "" "$SOFTWARE_CATEGORIES"
        POL_Shortcut_QuietDebug "$TITLE"
         
        # Restore screen resolution (game's default is 1024x768)
        # POL_Shortcut_InsertBeforeWine "$SHORTCUT" "trap 'xrandr -s 0' EXIT"
              
        POL_Shortcut_Document "$TITLE" "$DOCUMENT_FILE"
       
         
elif [ "$INSTALL_METHOD" == "LOCAL" ]; then
        POL_SetupWindow_menu "$(eval_gettext 'What is the type of the file?.')" "$TITLE" "$(eval_gettext '.EXE')~$(eval_gettext '.ZIP')~$(eval_gettext '.RAR')" "~"
        # POL_SetupWindow_menu "$(eval_gettext 'What is the type of the file?.')" "$TITLE" "$(eval_gettext '.ZIP')~$(eval_gettext '.RAR')" "~"
        # APP_ANSWER=".EXE"
        # POL_SetupWindow_menu "$(eval_gettext 'What is the type of the file?.')" "$TITLE" "$(eval_gettext '.MSI')~$(eval_gettext '.EXE')" "~"
       
if [ "$APP_ANSWER" == ".EXE" ]; then
        # Asking then installing local files of the game
        cd "$HOME"
        POL_SetupWindow_browse "$(eval_gettext 'Please select the setup file to run')" "$TITLE"
        SETUP_EXE="$APP_ANSWER"
        POL_Wine start /unix "$SETUP_EXE"
        POL_Wine_WaitExit "$TITLE"
               
        # Restore screen resolution (game's default is 640x480 ?)
        # POL_Shortcut_InsertBeforeWine "$SHORTCUT" "trap 'xrandr -s 0' EXIT"
               
        POL_Shortcut "$SHORTCUT_FILENAME" "$TITLE" "" "" "$SOFTWARE_CATEGORIES"
        POL_Shortcut_QuietDebug "$TITLE"
         
        POL_Shortcut_Document "$TITLE" "$DOCUMENT_FILE"
  
  
elif [ "$APP_ANSWER" == "$(eval_gettext '.MSI')" ]; then
       # Asking then installing local files of the game
        cd "$HOME"
        POL_SetupWindow_browse "$(eval_gettext 'Please select the setup file to run')" "$TITLE"
        SETUP_EXE="$APP_ANSWER"
        POL_Wine msiexec /i  "$SETUP_EXE"
        POL_Wine_WaitExit "$TITLE"
               
        # Restore screen resolution (game's default is 640x480 ?)
        # POL_Shortcut_InsertBeforeWine "$SHORTCUT" "trap 'xrandr -s 0' EXIT"
               
        POL_Shortcut "$SHORTCUT_FILENAME" "$TITLE" "" "" "$SOFTWARE_CATEGORIES"
        POL_Shortcut_QuietDebug "$TITLE"
         
        POL_Shortcut_Document "$TITLE" "$DOCUMENT_FILE"
  
elif [ "$APP_ANSWER" == "$(eval_gettext '.ZIP')" ]; then
        cd "$HOME"
         
        POL_SetupWindow_message "$(eval_gettext '\n\nWARNING: the file name must not have SPACES in its name !.')" "$TITLE"
        POL_SetupWindow_browse "$(eval_gettext 'Please select the .ZIP file')" "$TITLE"
        cd "$POL_System_TmpDir"
        POL_SetupWindow_wait_next_signal "$(eval_gettext 'Extracting the archive...')" "$TITLE"
        POL_System_unzip "$APP_ANSWER" -d "$WINEPREFIX/drive_c/game/"
       
        POL_Shortcut "$SHORTCUT_FILENAME" "$TITLE" "" "" "$SOFTWARE_CATEGORIES"
         
        POL_Shortcut_Document "$TITLE" "$DOCUMENT_FILE"
       
elif [ "$APP_ANSWER" == "$(eval_gettext '.RAR')" ]; then
        cd "$HOME"
        POL_SetupWindow_browse "$(eval_gettext 'Please select the .RAR file')" "$TITLE"
        SETUP_EXE="$APP_ANSWER"
        cd "$POL_System_TmpDir"
        POL_SetupWindow_wait_next_signal "$(eval_gettext 'Extracting the archive...')" "$TITLE"
        POL_System_unrar x "$APP_ANSWER" "$WINEPREFIX/drive_c/game/" || POL_Debug_Fatal "unrar is required to unarchive $TITLE (unrar package is not installed on the OS)."
        POL_Shortcut "$SHORTCUT_FILENAME" "$TITLE" "" "" "$SOFTWARE_CATEGORIES"
        
        POL_Shortcut_Document "$TITLE" "$DOCUMENT_FILE"
  
fi
fi
         
         
################
# Patch update #
################
    
# POL_SetupWindow_menu "$(eval_gettext 'Do you want to install a official patch-update ?')" "$TITLE" "$(eval_gettext 'Yes')~$(eval_gettext 'No')" "~"      
         
if [ "$APP_ANSWER" == "$(eval_gettext 'Yes')" ]; then
        POL_SetupWindow_browse "$(eval_gettext 'Please select the .EXE file to run')" "$TITLE"
        PATCH_EXE="$APP_ANSWER"
        POL_Wine start /unix "$PATCH_EXE"
        POL_Wine_WaitExit "$PATCH_EXE"
fi
          
# POL_SetupWindow_message "$(eval_gettext '\nInstallation is finished ! :)')" "$TITLE"
    
# POL_SetupWindow_message "$(eval_gettext 'WARNING: to avoid to have huge log file, you should type \ninto Debug flags : fixme-all')" "$TITLE"
          
# Fail ?
# POL_SetupWindow_message "$LNG_FIN" "$TITLE"
         
POL_System_TmpDelete
POL_SetupWindow_Close
exit 0

Contributions

Filters:

Contribuer
Membre Messages
harddie Lundi 18 Mai 2020 à 0:32
harddie Anonymous

Messages

PlayOnLinux log:

[05/18/20 01:38:09] - Running wine-3.0.3 Terraria.exe (Working directory : /home/harddie/.PlayOnLinux/wineprefix/terraria/drive_c/GOG Games/Terraria)
0012:fixme:heap:RtlSetHeapInformation (nil) 1 (nil) 0 stub
0012:fixme:process:SetProcessDEPPolicy (1): stub
0012:fixme:heap:RtlSetHeapInformation (nil) 1 (nil) 0 stub
0017:fixme:process:SetProcessShutdownParameters (00000380, 00000000): partial stub.
0017:fixme:wtsapi:WTSQuerySessionInformationW Stub (nil) 0xffffffff 4 0x87fb3c 0x87fb2c
0009:fixme:thread:SetThreadStackGuarantee (0x32fc64): stub
0030:err:ole:CoGetContextToken apartment not initialised
0009:fixme:shell:URL_ParseUrl failed to parse L"ReLogic"
0009:fixme:nls:get_dummy_preferred_ui_language (0x0 0x32af38 (nil) 0x32af34) returning a dummy value (current locale)
0009:fixme:nls:get_dummy_preferred_ui_language (0x0 0x32af38 0x1ab780 0x32af34) returning a dummy value (current locale)
0009:fixme:shell:URL_ParseUrl failed to parse L"System"
0009:fixme:shell:URL_ParseUrl failed to parse L"Microsoft.Xna.Framework.Game"
0009:err:winediag:gnutls_initialize failed to load libgnutls, no support for encryption
0009:fixme:shell:URL_ParseUrl failed to parse L"Microsoft.Xna.Framework"
0009:err:module:load_builtin_dll failed to load .so lib for builtin L"l3codeca.acm": libmpg123.so.0: cannot open shared object file: No such file or directory
0009:fixme:shell:URL_ParseUrl failed to parse L"Microsoft.Xna.Framework.Graphics"
0009:fixme:shell:URL_ParseUrl failed to parse L"WindowsBase"
0009:fixme:shell:URL_ParseUrl failed to parse L"Newtonsoft.Json"
0009:fixme:shell:URL_ParseUrl failed to parse L"System.Core"
0009:fixme:shell:URL_ParseUrl failed to parse L"System.Numerics"
0009:fixme:shell:URL_ParseUrl failed to parse L"System.Runtime.Serialization"
0009:fixme:shell:URL_ParseUrl failed to parse L"System.Data"
0009:fixme:shell:URL_ParseUrl failed to parse L"System.Xml"
0009:fixme:process:FlushProcessWriteBuffers : stub
0009:fixme:shell:URL_ParseUrl failed to parse L"Microsoft.Xna.Framework.Xact"
0009:fixme:shell:URL_ParseUrl failed to parse L"System.Configuration"
Error Logging Enabled.
0009:fixme:shell:URL_ParseUrl failed to parse L"Microsoft.Xna.Framework.Input.Touch"
0009:fixme:shell:URL_ParseUrl failed to parse L"System.Drawing"
0009:fixme:shell:URL_ParseUrl failed to parse L"System.Windows.Forms"
0009:fixme:shell:URL_ParseUrl failed to parse L"Accessibility"
0009:fixme:win:EnumDisplayDevicesW ((null),0,0x32cc18,0x00000000), stub!
0009:fixme:d3d9:D3DPERF_SetOptions (0x2) : stub
0009:fixme:imm:ImmDisableTextFrameService Stub
0009:fixme:imm:ImmReleaseContext (0x10058, 0xc401b28): stub
0009:fixme:imm:NotifyIME NI_CLOSECANDIDATE
0009:fixme:msctf:ThreadMgr_ActivateEx Unimplemented flags 0x4
0009:fixme:msctf:ThreadMgrSource_AdviseSink (0x21b148) Unhandled Sink: {ea1ea136-19df-11d7-a6d2-00065b84435c}
0009:fixme:gdiplus:GdipCreateHalftonePalette stub
Resolution changed to: 1280x720.
0009:err:module:load_builtin_dll failed to load .so lib for builtin L"xaudio2_6.dll": libopenal.so.1: cannot open shared object file: No such file or directory
0009:err:ole:COMPOBJ_DllList_Add couldn't load in-process dll L"C:\\windows\\system32\\xaudio2_6.dll"
0009:err:ole:CoGetClassObject no class object {3eda9b49-2085-498b-9bb2-39a6778493de} could be created for context 0x1
0009:fixme:ntdll:EtwRegisterTraceGuidsW (0x17611a2, (nil), {8e9f5090-2d75-4d03-8a81-e5afbf85daf1}, 1, 0x32db2c, (null), (null), 0x1693a7b8): stub
0009:fixme:ntdll:EtwRegisterTraceGuidsW   register trace class {8e9f5090-2d75-4d03-8a81-e5afbf85daf1}
0017:fixme:wtsapi:WTSQuerySessionInformationW Stub (nil) 0xffffffff 4 0x87fb38 0x87fb28
0017:fixme:wtsapi:WTSQuerySessionInformationW Stub (nil) 0xffffffff 4 0x87fb38 0x87fb28
0017:fixme:wtsapi:WTSQuerySessionInformationW Stub (nil) 0xffffffff 4 0x87fb88 0x87fb78
0017:fixme:wtsapi:WTSQuerySessionInformationW Stub (nil) 0xffffffff 4 0x87fb3c 0x87fb2c
0009:fixme:ole:CoGetApartmentType (0x32fccc, 0x32fcc8): semi-stub
0037:fixme:ole:CoGetApartmentType (0xb97fbbc, 0xb97fbb8): semi-stub
0030:fixme:ntdll:EtwUnregisterTraceGuids deadbeef: stub
0009:fixme:msvcrt:__clean_type_info_names_internal (0x5eb3980) stub
0009:fixme:msvcrt:__clean_type_info_names_internal (0x4ad9264) stub
0009:fixme:msvcrt:__clean_type_info_names_internal (0x100a6028) stub

 

Wine error message:

Réponses

Edité par harddie

Dadu042 Samedi 28 Mars 2020 à 23:29
Dadu042

Information

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

Messages

Run OK (tested 2 Min from local source).

Differences

@@ -1,90 +1,301 @@
-#!/usr/bin/env playonlinux-bash
+#!/bin/bash
 # Date : (2013-02-18)
-# Last revision : (2018-02-09 21-39)
-# Distribution used to test : Ubuntu 12.10, Ubuntu 16.04
-# Author : lahtis
-# Licence : retail
-# Steam installer.
+# Last revision : see the changelog below
+# Wine version used : see the changelog below
+# Distribution used to test : XUbuntu 18.04 64 bits
+# Author : Lahtis
+# Licence : Retail
+# Only For : http://www.playonlinux.com
+#
+# TESTED Editions: v1.3.5.3 (2017).
+#
+# Middlewares used by this software : XNA .
+#
 #
 # CHANGELOG
 # [lahtis] (2013-02-18)
 #   First script.
 # [lahtis] (2018-02-09)
-#   ?.
+#   ...
 # [Dadu042] (2019-12-11)
 #   Wine 3.1 -> 3.0.3 (for POL v4.2.12).
 #   Add POL_RequiredVersion "4.2.1"
-
-[ -z "$PLAYONLINUX" ] && exit
-source "$PLAYONLINUX/lib/sources"
+# [Dadu042] (2020-03-28)
+#   New script (to allow installation from local file).
+#   VMS 512 -> 256
+#
+# KNOWN ISSUES
+#  - Wine amd64 4.21, 5.0: X
+#
+#
+#
+# KNOWN ISSUES (FIXED):
+#  - Wine x86 5.0: on the main menu the mouse can not click the buttons. Tried: d3dx11. Fix: Wine 5.2
+#  - 
   
-PREFIX="terraria"
-WORKING_WINE_VERSION="3.0.3"
+[ "$PLAYONLINUX" = "" ] && exit 0
+source "$PLAYONLINUX/lib/sources"
+
 TITLE="Terraria"
+PREFIX="terraria"
 EDITOR="Merge Games"
 GAME_URL="http://www.terraria.org/"
-AUTHOR="lahtis"
-  
-#Initialization
-POL_GetSetupImages "http://files.playonlinux.com/resources/setups/$PREFIX/top.jpg" "http://files.playonlinux.com/resources/setups/$PREFIX/left.jpg" "$TITLE"
+AUTHOR="Lahtis"
+STEAM_ID="105600"
+GAME_VMS="256"
+SHORTCUT_FILENAME="Terraria.exe"
+SOFTWARE_CATEGORIES="Game;"
+# http://wiki.playonlinux.com/index.php/Scripting_-_Chapter_9:_Standardization#Advanced_Standardization
+DOCUMENT_FILE=""
+        
+# Starting the script
 POL_SetupWindow_Init
-POL_SetupWindow_SetID 1576
+                     
+# Starting debugging API
 POL_Debug_Init
-       
-# Presentation
+    
+# Open dialogue box 
 POL_SetupWindow_presentation "$TITLE" "$EDITOR" "$GAME_URL" "$AUTHOR" "$PREFIX"
-
-POL_RequiredVersion "4.2.12" || POL_Debug_Fatal "$APPLICATION_TITLE $VERSION is required to install $TITLE"
-
-# Create Prefix
+  
+# POL_SetupWindow_message "$(eval_gettext 'WARNING: this software does exist in Linux native version.\n\nThis script only allow to run the Windows version on Linux, please prefer the Linux edition for better 3D speed.')" "$TITLE"
+  
+# POL_SetupWindow_message "$(eval_gettext 'This game requires a fast 3D GPU (ie: Intel HD Graphics 4440 is not enough).')" "$TITLE"
+  
+POL_RequiredVersion "4.1.0" || POL_Debug_Fatal "$APPLICATION_TITLE $VERSION is required to install $TITLE"
+  
+# Setting prefix path
 POL_Wine_SelectPrefix "$PREFIX"
+        
+# Determine Architecture
+# POL_System_SetArch "amd64"
 POL_System_SetArch "x86"
-POL_Wine_PrefixCreate "$WORKING_WINE_VERSION"
-STEAM_ID="105600"
-Set_OS "win7"
+    
+# Downloading wine if necessary and creating prefix
+POL_Wine_PrefixCreate "3.0.3"
+  
 POL_System_TmpCreate "$PREFIX"
- 
-# Moving TMP dir
-cd "$POL_System_TmpDir"
- 
+         
+Set_OS "win7"
+
+
+POL_Call POL_Function_SetResolution
+
+#######################################
+#  Installing mandatory dependencies  #
+#######################################
+
+POL_Call POL_Install_xinput # Fix game issue
+POL_Call POL_Install_xna40  # Fix game issue
+
+
+# POL_Call POL_Install_corefonts
+# POL_Call POL_Install_mfc42
+# POL_Call POL_Install_directmusic
+# POL_Call POL_Install_dsound
+# POL_Call POL_Install_quartz
+# POL_Call POL_Install_d3dx9_43
+# POL_Call POL_Install_d3dcompiler_43
+# POL_Call POL_Install_wininet
+# POL_Call POL_Install_corefonts
+# POL_Call POL_Install_dotnet30sp1
+# POL_Call POL_Install_mono5.20
+# POL_Call POL_Install_dotnet20
+# POL_Call POL_Install_dotnet40
+# POL_Call POL_Install_dotnet472
+# POL_Call POL_Install_dsound
+# POL_Call POL_Install_riched30
+# POL_Call POL_Install_corefonts
+# POL_Call POL_Install_d3dx11
+# POL_Call POL_Install_mono210
+             
+             
+################
+#      GPU     #
+################
+         
 # Asking about memory size of graphic card
-POL_SetupWindow_VMS "512"
+POL_SetupWindow_VMS $GAME_VMS
+          
+# Set Graphic Card information keys for wine
+POL_Wine_SetVideoDriver
+           
+# Useful for Nvidia GPUs
+# POL_Call POL_Install_physx
+             
+             
+#############################################
+#  Sound problem fix - pulseaudio related   #
+#############################################
+# [ "$POL_OS" = "Linux" ] && Set_SoundDriver "alsa"
+# [ "$POL_OS" = "Linux" ] && Set_SoundEmulDriver "Y"
+## End Fix
+          
+         
+#######################################
+#  Main part of this script           #
+#######################################
+             
+# Choose between Steam and other Digital Download versions
+# POL_SetupWindow_InstallMethod "STEAM,DVD,LOCAL,DOWNLOAD"
+POL_SetupWindow_InstallMethod "LOCAL,STEAM"
   
-POL_Call POL_Function_SetResolution
- 
-# Registery fix
-cat << EOF > fix.reg
-REGEDIT4
-        
-[HKEY_CURRENT_USER\Software\Wine\X11 Driver]
-"UseTakeFocus"="Y"
-EOF
+# POL_SetupWindow_message "Warning: do not install DirectX (nor icons)." "$TITLE"
+# POL_SetupWindow_message "Warning: do not install Visual C++ 2013 redistribuable\n nor Direct X." "$TITLE"
+          
+# Begin game installation
+if [ "$INSTALL_METHOD" == "STEAM" ]; then
+        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" "" "steam://rungameid/$STEAM_ID"
+        # Steam install
+        POL_SetupWindow_message "$(eval_gettext 'When $TITLE download by Steam is finished,\nDo NOT click on Play.\n\nClose COMPLETELY the Steam interface, \nso that the installation script can continue')" "$TITLE"
+        cd "$WINEPREFIX/drive_c/$PROGRAMFILES/Steam"
+        POL_Wine start /unix "steam.exe" steam://install/$STEAM_ID
+        POL_Wine_WaitExit "$TITLE"
+                  
+elif [ "$INSTALL_METHOD" == "CD" ]; then
+        POL_SetupWindow_cdrom
+                  
+        # POL_Call POL_Function_NoCDWarning
+           
+        POL_SetupWindow_check_cdrom "setup.exe"
+        POL_Wine start /unix "$CDROM/setup.exe"
+                 
+        POL_Wine_WaitExit "$TITLE"
+              
+        # Restore screen resolution (game's default is 800x600 ?)
+        # POL_Shortcut_InsertBeforeWine "$SHORTCUT" "trap 'xrandr -s 0' EXIT"
+                 
+        POL_Shortcut "$SHORTCUT_FILENAME" "$TITLE" "" "" "$SOFTWARE_CATEGORIES"
+        POL_Shortcut_QuietDebug "$TITLE"
+        POL_Shortcut_Document "$TITLE" "$DOCUMENT_FILE"
+          
+          
+elif [ "$INSTALL_METHOD" == "DOWNLOAD" ]; then
+        cd "$WINEPREFIX/drive_c"
+         
+        # POL_SetupWindow_message "$(eval_gettext '\n\nNote: this script will download the beta v0.5 .')" "$TITLE"
+        POL_Download "https://ggj.s3.amazonaws.com/games/2020/02/271015/src/VCwio/Teacher%20Simulator.zip"
+        # Also hosted on: https://archive.org/details/eternalwar_201612
+       
+        # mv Mystery-of-Unicorn-Castle-the-Beastmaster.exe GameInstaller.exe
+        # mv Teacher%20Simulator.rar gameinstaller.rar        
+        mv Teacher%20Simulator.zip gameinstaller.zip
+       
+        # POL_SetupWindow_wait_next_signal "$(eval_gettext 'Extracting the archive...')" "$TITLE"
+        # POL_System_unrar x "gameinstaller.rar" "$WINEPREFIX/drive_c/game/" || POL_Debug_Fatal "unrar is required to unarchive $TITLE (unrar package is not installed on the OS)."
+        POL_System_unzip "gameinstaller.zip" -d "$WINEPREFIX/drive_c/game/"
+         
+        # Extract without sub-folder.
+        # unzip "gameinstaller.zip" -j -d "$WINEPREFIX/drive_c/"
+         
+        # POL_SetupWindow_message "$(eval_gettext 'Note: we recommend you to uncheck all the checkboxes:\n[x] -> [ ]')" "$TITLE"
+          
+        # cd  "$WINEPREFIX/drive_c/game/"
+        # POL_Wine "setup.exe" # "/SILENT"
+        # POL_Wine_WaitBefore "$TITLE"
  
-POL_Wine regedit.exe fix.reg
-POL_Wine_WaitExit "$TITLE"
+        # rm GameInstaller.exe
+        rm gameinstaller.zip
+         
+        POL_Shortcut "$SHORTCUT_FILENAME" "$TITLE" "" "" "$SOFTWARE_CATEGORIES"
+        POL_Shortcut_QuietDebug "$TITLE"
+         
+        # Restore screen resolution (game's default is 1024x768)
+        # POL_Shortcut_InsertBeforeWine "$SHORTCUT" "trap 'xrandr -s 0' EXIT"
+              
+        POL_Shortcut_Document "$TITLE" "$DOCUMENT_FILE"
+       
+         
+elif [ "$INSTALL_METHOD" == "LOCAL" ]; then
+        POL_SetupWindow_menu "$(eval_gettext 'What is the type of the file?.')" "$TITLE" "$(eval_gettext '.EXE')~$(eval_gettext '.ZIP')~$(eval_gettext '.RAR')" "~"
+        # POL_SetupWindow_menu "$(eval_gettext 'What is the type of the file?.')" "$TITLE" "$(eval_gettext '.ZIP')~$(eval_gettext '.RAR')" "~"
+        # APP_ANSWER=".EXE"
+        # POL_SetupWindow_menu "$(eval_gettext 'What is the type of the file?.')" "$TITLE" "$(eval_gettext '.MSI')~$(eval_gettext '.EXE')" "~"
+       
+if [ "$APP_ANSWER" == ".EXE" ]; then
+        # Asking then installing local files of the game
+        cd "$HOME"
+        POL_SetupWindow_browse "$(eval_gettext 'Please select the setup file to run')" "$TITLE"
+        SETUP_EXE="$APP_ANSWER"
+        POL_Wine start /unix "$SETUP_EXE"
+        POL_Wine_WaitExit "$TITLE"
+               
+        # Restore screen resolution (game's default is 640x480 ?)
+        # POL_Shortcut_InsertBeforeWine "$SHORTCUT" "trap 'xrandr -s 0' EXIT"
+               
+        POL_Shortcut "$SHORTCUT_FILENAME" "$TITLE" "" "" "$SOFTWARE_CATEGORIES"
+        POL_Shortcut_QuietDebug "$TITLE"
+         
+        POL_Shortcut_Document "$TITLE" "$DOCUMENT_FILE"
   
-# Installing mandatory dependencies
   
-POL_Call POL_Install_xinput # Fix game issue
-POL_Call POL_Install_xna40 # Fix game issue
+elif [ "$APP_ANSWER" == "$(eval_gettext '.MSI')" ]; then
+       # Asking then installing local files of the game
+        cd "$HOME"
+        POL_SetupWindow_browse "$(eval_gettext 'Please select the setup file to run')" "$TITLE"
+        SETUP_EXE="$APP_ANSWER"
+        POL_Wine msiexec /i  "$SETUP_EXE"
+        POL_Wine_WaitExit "$TITLE"
+               
+        # Restore screen resolution (game's default is 640x480 ?)
+        # POL_Shortcut_InsertBeforeWine "$SHORTCUT" "trap 'xrandr -s 0' EXIT"
+               
+        POL_Shortcut "$SHORTCUT_FILENAME" "$TITLE" "" "" "$SOFTWARE_CATEGORIES"
+        POL_Shortcut_QuietDebug "$TITLE"
+         
+        POL_Shortcut_Document "$TITLE" "$DOCUMENT_FILE"
   
-# Installing Steam
-POL_Call POL_Install_steam
-cd "$WINEPREFIX/drive_c/$PROGRAMFILES/Steam"
-POL_Wine "steam.exe" steam://install/$STEAM_ID
-POL_Wine_WaitBefore "$TITLE"
+elif [ "$APP_ANSWER" == "$(eval_gettext '.ZIP')" ]; then
+        cd "$HOME"
+         
+        POL_SetupWindow_message "$(eval_gettext '\n\nWARNING: the file name must not have SPACES in its name !.')" "$TITLE"
+        POL_SetupWindow_browse "$(eval_gettext 'Please select the .ZIP file')" "$TITLE"
+        cd "$POL_System_TmpDir"
+        POL_SetupWindow_wait_next_signal "$(eval_gettext 'Extracting the archive...')" "$TITLE"
+        POL_System_unzip "$APP_ANSWER" -d "$WINEPREFIX/drive_c/game/"
        
-# Shortcut
-POL_Shortcut "steam.exe" "$TITLE" "$TITLE.png" "steam://rungameid/$STEAM_ID"
- 
-# Check Kernel ptrace
-if [ -e "/proc/sys/kernel/yama/ptrace_scope" ]; then
-        PTRACE_CHECK=`cat /proc/sys/kernel/yama/ptrace_scope`
-        if [ "$PTRACE_CHECK" != 0 ]; then
-                POL_Debug_message "$(eval_gettext 'If the game crashes at startup, open a terminal and type:\necho 0|sudo tee /proc/sys/kernel/yama/ptrace_scope')" "$TITLE"
-        fi
+        POL_Shortcut "$SHORTCUT_FILENAME" "$TITLE" "" "" "$SOFTWARE_CATEGORIES"
+         
+        POL_Shortcut_Document "$TITLE" "$DOCUMENT_FILE"
+       
+elif [ "$APP_ANSWER" == "$(eval_gettext '.RAR')" ]; then
+        cd "$HOME"
+        POL_SetupWindow_browse "$(eval_gettext 'Please select the .RAR file')" "$TITLE"
+        SETUP_EXE="$APP_ANSWER"
+        cd "$POL_System_TmpDir"
+        POL_SetupWindow_wait_next_signal "$(eval_gettext 'Extracting the archive...')" "$TITLE"
+        POL_System_unrar x "$APP_ANSWER" "$WINEPREFIX/drive_c/game/" || POL_Debug_Fatal "unrar is required to unarchive $TITLE (unrar package is not installed on the OS)."
+        POL_Shortcut "$SHORTCUT_FILENAME" "$TITLE" "" "" "$SOFTWARE_CATEGORIES"
+        
+        POL_Shortcut_Document "$TITLE" "$DOCUMENT_FILE"
+  
 fi
- 
+fi
+         
+         
+################
+# Patch update #
+################
+    
+# POL_SetupWindow_menu "$(eval_gettext 'Do you want to install a official patch-update ?')" "$TITLE" "$(eval_gettext 'Yes')~$(eval_gettext 'No')" "~"      
+         
+if [ "$APP_ANSWER" == "$(eval_gettext 'Yes')" ]; then
+        POL_SetupWindow_browse "$(eval_gettext 'Please select the .EXE file to run')" "$TITLE"
+        PATCH_EXE="$APP_ANSWER"
+        POL_Wine start /unix "$PATCH_EXE"
+        POL_Wine_WaitExit "$PATCH_EXE"
+fi
+          
+# POL_SetupWindow_message "$(eval_gettext '\nInstallation is finished ! :)')" "$TITLE"
+    
+# POL_SetupWindow_message "$(eval_gettext 'WARNING: to avoid to have huge log file, you should type \ninto Debug flags : fixme-all')" "$TITLE"
+          
+# Fail ?
+# POL_SetupWindow_message "$LNG_FIN" "$TITLE"
+         
 POL_System_TmpDelete
 POL_SetupWindow_Close
-exit 0
\ No newline at end of file
+exit 0

Nouveau code source

#!/bin/bash
# Date : (2013-02-18)
# Last revision : see the changelog below
# Wine version used : see the changelog below
# Distribution used to test : XUbuntu 18.04 64 bits
# Author : Lahtis
# Licence : Retail
# Only For : http://www.playonlinux.com
#
# TESTED Editions: v1.3.5.3 (2017).
#
# Middlewares used by this software : XNA .
#
#
# CHANGELOG
# [lahtis] (2013-02-18)
#   First script.
# [lahtis] (2018-02-09)
#   ...
# [Dadu042] (2019-12-11)
#   Wine 3.1 -> 3.0.3 (for POL v4.2.12).
#   Add POL_RequiredVersion "4.2.1"
# [Dadu042] (2020-03-28)
#   New script (to allow installation from local file).
#   VMS 512 -> 256
#
# KNOWN ISSUES
#  - Wine amd64 4.21, 5.0: X
#
#
#
# KNOWN ISSUES (FIXED):
#  - Wine x86 5.0: on the main menu the mouse can not click the buttons. Tried: d3dx11. Fix: Wine 5.2
#  - 
  
[ "$PLAYONLINUX" = "" ] && exit 0
source "$PLAYONLINUX/lib/sources"

TITLE="Terraria"
PREFIX="terraria"
EDITOR="Merge Games"
GAME_URL="http://www.terraria.org/"
AUTHOR="Lahtis"
STEAM_ID="105600"
GAME_VMS="256"
SHORTCUT_FILENAME="Terraria.exe"
SOFTWARE_CATEGORIES="Game;"
# http://wiki.playonlinux.com/index.php/Scripting_-_Chapter_9:_Standardization#Advanced_Standardization
DOCUMENT_FILE=""
        
# Starting the script
POL_SetupWindow_Init
                     
# Starting debugging API
POL_Debug_Init
    
# Open dialogue box 
POL_SetupWindow_presentation "$TITLE" "$EDITOR" "$GAME_URL" "$AUTHOR" "$PREFIX"
  
# POL_SetupWindow_message "$(eval_gettext 'WARNING: this software does exist in Linux native version.\n\nThis script only allow to run the Windows version on Linux, please prefer the Linux edition for better 3D speed.')" "$TITLE"
  
# POL_SetupWindow_message "$(eval_gettext 'This game requires a fast 3D GPU (ie: Intel HD Graphics 4440 is not enough).')" "$TITLE"
  
POL_RequiredVersion "4.1.0" || POL_Debug_Fatal "$APPLICATION_TITLE $VERSION is required to install $TITLE"
  
# Setting prefix path
POL_Wine_SelectPrefix "$PREFIX"
        
# Determine Architecture
# POL_System_SetArch "amd64"
POL_System_SetArch "x86"
    
# Downloading wine if necessary and creating prefix
POL_Wine_PrefixCreate "3.0.3"
  
POL_System_TmpCreate "$PREFIX"
         
Set_OS "win7"


POL_Call POL_Function_SetResolution

#######################################
#  Installing mandatory dependencies  #
#######################################

POL_Call POL_Install_xinput # Fix game issue
POL_Call POL_Install_xna40  # Fix game issue


# POL_Call POL_Install_corefonts
# POL_Call POL_Install_mfc42
# POL_Call POL_Install_directmusic
# POL_Call POL_Install_dsound
# POL_Call POL_Install_quartz
# POL_Call POL_Install_d3dx9_43
# POL_Call POL_Install_d3dcompiler_43
# POL_Call POL_Install_wininet
# POL_Call POL_Install_corefonts
# POL_Call POL_Install_dotnet30sp1
# POL_Call POL_Install_mono5.20
# POL_Call POL_Install_dotnet20
# POL_Call POL_Install_dotnet40
# POL_Call POL_Install_dotnet472
# POL_Call POL_Install_dsound
# POL_Call POL_Install_riched30
# POL_Call POL_Install_corefonts
# POL_Call POL_Install_d3dx11
# POL_Call POL_Install_mono210
             
             
################
#      GPU     #
################
         
# Asking about memory size of graphic card
POL_SetupWindow_VMS $GAME_VMS
          
# Set Graphic Card information keys for wine
POL_Wine_SetVideoDriver
           
# Useful for Nvidia GPUs
# POL_Call POL_Install_physx
             
             
#############################################
#  Sound problem fix - pulseaudio related   #
#############################################
# [ "$POL_OS" = "Linux" ] && Set_SoundDriver "alsa"
# [ "$POL_OS" = "Linux" ] && Set_SoundEmulDriver "Y"
## End Fix
          
         
#######################################
#  Main part of this script           #
#######################################
             
# Choose between Steam and other Digital Download versions
# POL_SetupWindow_InstallMethod "STEAM,DVD,LOCAL,DOWNLOAD"
POL_SetupWindow_InstallMethod "LOCAL,STEAM"
  
# POL_SetupWindow_message "Warning: do not install DirectX (nor icons)." "$TITLE"
# POL_SetupWindow_message "Warning: do not install Visual C++ 2013 redistribuable\n nor Direct X." "$TITLE"
          
# Begin game installation
if [ "$INSTALL_METHOD" == "STEAM" ]; then
        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" "" "steam://rungameid/$STEAM_ID"
        # Steam install
        POL_SetupWindow_message "$(eval_gettext 'When $TITLE download by Steam is finished,\nDo NOT click on Play.\n\nClose COMPLETELY the Steam interface, \nso that the installation script can continue')" "$TITLE"
        cd "$WINEPREFIX/drive_c/$PROGRAMFILES/Steam"
        POL_Wine start /unix "steam.exe" steam://install/$STEAM_ID
        POL_Wine_WaitExit "$TITLE"
                  
elif [ "$INSTALL_METHOD" == "CD" ]; then
        POL_SetupWindow_cdrom
                  
        # POL_Call POL_Function_NoCDWarning
           
        POL_SetupWindow_check_cdrom "setup.exe"
        POL_Wine start /unix "$CDROM/setup.exe"
                 
        POL_Wine_WaitExit "$TITLE"
              
        # Restore screen resolution (game's default is 800x600 ?)
        # POL_Shortcut_InsertBeforeWine "$SHORTCUT" "trap 'xrandr -s 0' EXIT"
                 
        POL_Shortcut "$SHORTCUT_FILENAME" "$TITLE" "" "" "$SOFTWARE_CATEGORIES"
        POL_Shortcut_QuietDebug "$TITLE"
        POL_Shortcut_Document "$TITLE" "$DOCUMENT_FILE"
          
          
elif [ "$INSTALL_METHOD" == "DOWNLOAD" ]; then
        cd "$WINEPREFIX/drive_c"
         
        # POL_SetupWindow_message "$(eval_gettext '\n\nNote: this script will download the beta v0.5 .')" "$TITLE"
        POL_Download "https://ggj.s3.amazonaws.com/games/2020/02/271015/src/VCwio/Teacher%20Simulator.zip"
        # Also hosted on: https://archive.org/details/eternalwar_201612
       
        # mv Mystery-of-Unicorn-Castle-the-Beastmaster.exe GameInstaller.exe
        # mv Teacher%20Simulator.rar gameinstaller.rar        
        mv Teacher%20Simulator.zip gameinstaller.zip
       
        # POL_SetupWindow_wait_next_signal "$(eval_gettext 'Extracting the archive...')" "$TITLE"
        # POL_System_unrar x "gameinstaller.rar" "$WINEPREFIX/drive_c/game/" || POL_Debug_Fatal "unrar is required to unarchive $TITLE (unrar package is not installed on the OS)."
        POL_System_unzip "gameinstaller.zip" -d "$WINEPREFIX/drive_c/game/"
         
        # Extract without sub-folder.
        # unzip "gameinstaller.zip" -j -d "$WINEPREFIX/drive_c/"
         
        # POL_SetupWindow_message "$(eval_gettext 'Note: we recommend you to uncheck all the checkboxes:\n[x] -> [ ]')" "$TITLE"
          
        # cd  "$WINEPREFIX/drive_c/game/"
        # POL_Wine "setup.exe" # "/SILENT"
        # POL_Wine_WaitBefore "$TITLE"
 
        # rm GameInstaller.exe
        rm gameinstaller.zip
         
        POL_Shortcut "$SHORTCUT_FILENAME" "$TITLE" "" "" "$SOFTWARE_CATEGORIES"
        POL_Shortcut_QuietDebug "$TITLE"
         
        # Restore screen resolution (game's default is 1024x768)
        # POL_Shortcut_InsertBeforeWine "$SHORTCUT" "trap 'xrandr -s 0' EXIT"
              
        POL_Shortcut_Document "$TITLE" "$DOCUMENT_FILE"
       
         
elif [ "$INSTALL_METHOD" == "LOCAL" ]; then
        POL_SetupWindow_menu "$(eval_gettext 'What is the type of the file?.')" "$TITLE" "$(eval_gettext '.EXE')~$(eval_gettext '.ZIP')~$(eval_gettext '.RAR')" "~"
        # POL_SetupWindow_menu "$(eval_gettext 'What is the type of the file?.')" "$TITLE" "$(eval_gettext '.ZIP')~$(eval_gettext '.RAR')" "~"
        # APP_ANSWER=".EXE"
        # POL_SetupWindow_menu "$(eval_gettext 'What is the type of the file?.')" "$TITLE" "$(eval_gettext '.MSI')~$(eval_gettext '.EXE')" "~"
       
if [ "$APP_ANSWER" == ".EXE" ]; then
        # Asking then installing local files of the game
        cd "$HOME"
        POL_SetupWindow_browse "$(eval_gettext 'Please select the setup file to run')" "$TITLE"
        SETUP_EXE="$APP_ANSWER"
        POL_Wine start /unix "$SETUP_EXE"
        POL_Wine_WaitExit "$TITLE"
               
        # Restore screen resolution (game's default is 640x480 ?)
        # POL_Shortcut_InsertBeforeWine "$SHORTCUT" "trap 'xrandr -s 0' EXIT"
               
        POL_Shortcut "$SHORTCUT_FILENAME" "$TITLE" "" "" "$SOFTWARE_CATEGORIES"
        POL_Shortcut_QuietDebug "$TITLE"
         
        POL_Shortcut_Document "$TITLE" "$DOCUMENT_FILE"
  
  
elif [ "$APP_ANSWER" == "$(eval_gettext '.MSI')" ]; then
       # Asking then installing local files of the game
        cd "$HOME"
        POL_SetupWindow_browse "$(eval_gettext 'Please select the setup file to run')" "$TITLE"
        SETUP_EXE="$APP_ANSWER"
        POL_Wine msiexec /i  "$SETUP_EXE"
        POL_Wine_WaitExit "$TITLE"
               
        # Restore screen resolution (game's default is 640x480 ?)
        # POL_Shortcut_InsertBeforeWine "$SHORTCUT" "trap 'xrandr -s 0' EXIT"
               
        POL_Shortcut "$SHORTCUT_FILENAME" "$TITLE" "" "" "$SOFTWARE_CATEGORIES"
        POL_Shortcut_QuietDebug "$TITLE"
         
        POL_Shortcut_Document "$TITLE" "$DOCUMENT_FILE"
  
elif [ "$APP_ANSWER" == "$(eval_gettext '.ZIP')" ]; then
        cd "$HOME"
         
        POL_SetupWindow_message "$(eval_gettext '\n\nWARNING: the file name must not have SPACES in its name !.')" "$TITLE"
        POL_SetupWindow_browse "$(eval_gettext 'Please select the .ZIP file')" "$TITLE"
        cd "$POL_System_TmpDir"
        POL_SetupWindow_wait_next_signal "$(eval_gettext 'Extracting the archive...')" "$TITLE"
        POL_System_unzip "$APP_ANSWER" -d "$WINEPREFIX/drive_c/game/"
       
        POL_Shortcut "$SHORTCUT_FILENAME" "$TITLE" "" "" "$SOFTWARE_CATEGORIES"
         
        POL_Shortcut_Document "$TITLE" "$DOCUMENT_FILE"
       
elif [ "$APP_ANSWER" == "$(eval_gettext '.RAR')" ]; then
        cd "$HOME"
        POL_SetupWindow_browse "$(eval_gettext 'Please select the .RAR file')" "$TITLE"
        SETUP_EXE="$APP_ANSWER"
        cd "$POL_System_TmpDir"
        POL_SetupWindow_wait_next_signal "$(eval_gettext 'Extracting the archive...')" "$TITLE"
        POL_System_unrar x "$APP_ANSWER" "$WINEPREFIX/drive_c/game/" || POL_Debug_Fatal "unrar is required to unarchive $TITLE (unrar package is not installed on the OS)."
        POL_Shortcut "$SHORTCUT_FILENAME" "$TITLE" "" "" "$SOFTWARE_CATEGORIES"
        
        POL_Shortcut_Document "$TITLE" "$DOCUMENT_FILE"
  
fi
fi
         
         
################
# Patch update #
################
    
# POL_SetupWindow_menu "$(eval_gettext 'Do you want to install a official patch-update ?')" "$TITLE" "$(eval_gettext 'Yes')~$(eval_gettext 'No')" "~"      
         
if [ "$APP_ANSWER" == "$(eval_gettext 'Yes')" ]; then
        POL_SetupWindow_browse "$(eval_gettext 'Please select the .EXE file to run')" "$TITLE"
        PATCH_EXE="$APP_ANSWER"
        POL_Wine start /unix "$PATCH_EXE"
        POL_Wine_WaitExit "$PATCH_EXE"
fi
          
# POL_SetupWindow_message "$(eval_gettext '\nInstallation is finished ! :)')" "$TITLE"
    
# POL_SetupWindow_message "$(eval_gettext 'WARNING: to avoid to have huge log file, you should type \ninto Debug flags : fixme-all')" "$TITLE"
          
# Fail ?
# POL_SetupWindow_message "$LNG_FIN" "$TITLE"
         
POL_System_TmpDelete
POL_SetupWindow_Close
exit 0

Réponses

Edité par Dadu042

Dadu042 Mercredi 11 Décembre 2019 à 21:13
Dadu042

Warning

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

Differences

@@ -5,12 +5,21 @@
 # Author : lahtis
 # Licence : retail
 # Steam installer.
-  
+#
+# CHANGELOG
+# [lahtis] (2013-02-18)
+#   First script.
+# [lahtis] (2018-02-09)
+#   ?.
+# [Dadu042] (2019-12-11)
+#   Wine 3.1 -> 3.0.3 (for POL v4.2.12).
+#   Add POL_RequiredVersion "4.2.1"
+
 [ -z "$PLAYONLINUX" ] && exit
 source "$PLAYONLINUX/lib/sources"
   
 PREFIX="terraria"
-WORKING_WINE_VERSION="3.1"
+WORKING_WINE_VERSION="3.0.3"
 TITLE="Terraria"
 EDITOR="Merge Games"
 GAME_URL="http://www.terraria.org/"
@@ -24,7 +33,9 @@
        
 # Presentation
 POL_SetupWindow_presentation "$TITLE" "$EDITOR" "$GAME_URL" "$AUTHOR" "$PREFIX"
-  
+
+POL_RequiredVersion "4.2.12" || POL_Debug_Fatal "$APPLICATION_TITLE $VERSION is required to install $TITLE"
+
 # Create Prefix
 POL_Wine_SelectPrefix "$PREFIX"
 POL_System_SetArch "x86"

Nouveau code source

#!/usr/bin/env playonlinux-bash
# Date : (2013-02-18)
# Last revision : (2018-02-09 21-39)
# Distribution used to test : Ubuntu 12.10, Ubuntu 16.04
# Author : lahtis
# Licence : retail
# Steam installer.
#
# CHANGELOG
# [lahtis] (2013-02-18)
#   First script.
# [lahtis] (2018-02-09)
#   ?.
# [Dadu042] (2019-12-11)
#   Wine 3.1 -> 3.0.3 (for POL v4.2.12).
#   Add POL_RequiredVersion "4.2.1"

[ -z "$PLAYONLINUX" ] && exit
source "$PLAYONLINUX/lib/sources"
  
PREFIX="terraria"
WORKING_WINE_VERSION="3.0.3"
TITLE="Terraria"
EDITOR="Merge Games"
GAME_URL="http://www.terraria.org/"
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 1576
POL_Debug_Init
       
# Presentation
POL_SetupWindow_presentation "$TITLE" "$EDITOR" "$GAME_URL" "$AUTHOR" "$PREFIX"

POL_RequiredVersion "4.2.12" || POL_Debug_Fatal "$APPLICATION_TITLE $VERSION is required to install $TITLE"

# Create Prefix
POL_Wine_SelectPrefix "$PREFIX"
POL_System_SetArch "x86"
POL_Wine_PrefixCreate "$WORKING_WINE_VERSION"
STEAM_ID="105600"
Set_OS "win7"
POL_System_TmpCreate "$PREFIX"
 
# Moving TMP dir
cd "$POL_System_TmpDir"
 
# Asking about memory size of graphic card
POL_SetupWindow_VMS "512"
  
POL_Call POL_Function_SetResolution
 
# Registery fix
cat << EOF > fix.reg
REGEDIT4
        
[HKEY_CURRENT_USER\Software\Wine\X11 Driver]
"UseTakeFocus"="Y"
EOF
 
POL_Wine regedit.exe fix.reg
POL_Wine_WaitExit "$TITLE"
  
# Installing mandatory dependencies
  
POL_Call POL_Install_xinput # Fix game issue
POL_Call POL_Install_xna40 # Fix game issue
  
# Installing Steam
POL_Call POL_Install_steam
cd "$WINEPREFIX/drive_c/$PROGRAMFILES/Steam"
POL_Wine "steam.exe" steam://install/$STEAM_ID
POL_Wine_WaitBefore "$TITLE"
       
# Shortcut
POL_Shortcut "steam.exe" "$TITLE" "$TITLE.png" "steam://rungameid/$STEAM_ID"
 
# Check Kernel ptrace
if [ -e "/proc/sys/kernel/yama/ptrace_scope" ]; then
        PTRACE_CHECK=`cat /proc/sys/kernel/yama/ptrace_scope`
        if [ "$PTRACE_CHECK" != 0 ]; then
                POL_Debug_message "$(eval_gettext 'If the game crashes at startup, open a terminal and type:\necho 0|sudo tee /proc/sys/kernel/yama/ptrace_scope')" "$TITLE"
        fi
fi
 
POL_System_TmpDelete
POL_SetupWindow_Close
exit 0

Réponses

Vaval62 Jeudi 8 Mars 2018 à 12:01
Vaval62 Anonymous

Messages

Ce programme ne fonctionne pas, quand je l'éxécute ça me marque:

<< PlayOnLinux has encountered an error. If the programm does not work correctly, it might be the cause of the problem. Visit www.playonlinux.com to get further information.

Error in main

Terraria crashed.

Select his shortcut and click on "debug" in the side panel to get more details.>>

Je me demande donc ce que je dois faire pour pouvoir jouer à ce jeu que j'adore tant......

Réponses

Mardi 13 Mars 2018 à 19:08
you try old installer. Below is a new installer that works.
lahtis Mardi 13 Février 2018 à 1:21
lahtis

Warning

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

Messages

fixing POLL_Call

Differences

@@ -1,71 +1,70 @@
-#!/bin/bash
+#!/usr/bin/env playonlinux-bash
 # Date : (2013-02-18)
-# Last revision : (2014-01-11 03:24) - DJYoshaBYD
-# Distribution used to test : Ubuntu 12.10
+# Last revision : (2018-02-09 21-39)
+# Distribution used to test : Ubuntu 12.10, Ubuntu 16.04
 # Author : lahtis
 # Licence : retail
-# PlayOnLinux: 4.1.9
-# Steam installer works (2013-02-18)
-# DVD installer not tested. I do not have dvd version.
-
-[-z "$PLAYONLINUX" = "" ] && exit 0
+# Steam installer.
+  
+[ -z "$PLAYONLINUX" ] && exit
 source "$PLAYONLINUX/lib/sources"
-
+  
 PREFIX="terraria"
-WINEVERSION="1.7.8"
+WORKING_WINE_VERSION="3.1"
 TITLE="Terraria"
 EDITOR="Merge Games"
 GAME_URL="http://www.terraria.org/"
 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 1576
 POL_Debug_Init
-     
+       
 # Presentation
 POL_SetupWindow_presentation "$TITLE" "$EDITOR" "$GAME_URL" "$AUTHOR" "$PREFIX"
-
+  
 # Create Prefix
 POL_Wine_SelectPrefix "$PREFIX"
 POL_System_SetArch "x86"
-POL_Wine_PrefixCreate "$WINEVERSION"  
-GAME_VMS="512"
+POL_Wine_PrefixCreate "$WORKING_WINE_VERSION"
 STEAM_ID="105600"
-
-# Fix pulseaudio issue
-which pulseaudio && Set_OS "winxp"
-
-# Latest Terraria version of Linux working if Virtual Desktop is off. 
-# If you had a problem. Set virtual destop on in Wine prefix settings. 
-# Set_Desktop On 1024 768
-
+Set_OS "win7"
+POL_System_TmpCreate "$PREFIX"
+ 
+# Moving TMP dir
+cd "$POL_System_TmpDir"
+ 
 # Asking about memory size of graphic card
-POL_SetupWindow_VMS $GAME_VMS
-
-# Installing mandatory dependencies
-POL_Call POL_Install_steam
-
-# Mandatory pre-install fix for steam
-POL_Call POL_Install_steam_flags "$STEAM_ID"
+POL_SetupWindow_VMS "512"
+  
+POL_Call POL_Function_SetResolution
  
-# Shortcut done before install for steam version
-POL_Shortcut "steam.exe" "$TITLE" "$TITLE.png" "steam://rungameid/$STEAM_ID"
-POL_Shortcut "steam.exe" "Steam ($TITLE)" "" ""
-
-POL_SetupWindow_message "$(eval_gettext 'Install Terraria via Steam.  Once Terraria has fully downloaded, press the Play button, Steam will prompt you to install the xna framework.  Once the xna framework has been installed close Steam and continue this installer.')" "$TITLE"
-cd "$WINEPREFIX/drive_c/$PROGRAMFILES/Steam"
-POL_Wine start /unix "steam.exe" steam://install/$STEAM_ID
+# Registery fix
+cat << EOF > fix.reg
+REGEDIT4
+        
+[HKEY_CURRENT_USER\Software\Wine\X11 Driver]
+"UseTakeFocus"="Y"
+EOF
+ 
+POL_Wine regedit.exe fix.reg
 POL_Wine_WaitExit "$TITLE"
-     
+  
 # Installing mandatory dependencies
-
+  
 POL_Call POL_Install_xinput # Fix game issue
 POL_Call POL_Install_xna40 # Fix game issue
-
-# disable in Steam gameoverlayrender
-POL_Wine_OverrideDLL "" "gameoverlayrenderer"
+  
+# Installing Steam
+POL_Call POL_Install_steam
+cd "$WINEPREFIX/drive_c/$PROGRAMFILES/Steam"
+POL_Wine "steam.exe" steam://install/$STEAM_ID
+POL_Wine_WaitBefore "$TITLE"
+       
+# Shortcut
+POL_Shortcut "steam.exe" "$TITLE" "$TITLE.png" "steam://rungameid/$STEAM_ID"
  
 # Check Kernel ptrace
 if [ -e "/proc/sys/kernel/yama/ptrace_scope" ]; then
@@ -74,7 +73,7 @@
                 POL_Debug_message "$(eval_gettext 'If the game crashes at startup, open a terminal and type:\necho 0|sudo tee /proc/sys/kernel/yama/ptrace_scope')" "$TITLE"
         fi
 fi
-
+ 
+POL_System_TmpDelete
 POL_SetupWindow_Close
-
-exit 0
+exit 0
\ No newline at end of file

Nouveau code source

#!/usr/bin/env playonlinux-bash
# Date : (2013-02-18)
# Last revision : (2018-02-09 21-39)
# Distribution used to test : Ubuntu 12.10, Ubuntu 16.04
# Author : lahtis
# Licence : retail
# Steam installer.
  
[ -z "$PLAYONLINUX" ] && exit
source "$PLAYONLINUX/lib/sources"
  
PREFIX="terraria"
WORKING_WINE_VERSION="3.1"
TITLE="Terraria"
EDITOR="Merge Games"
GAME_URL="http://www.terraria.org/"
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 1576
POL_Debug_Init
       
# Presentation
POL_SetupWindow_presentation "$TITLE" "$EDITOR" "$GAME_URL" "$AUTHOR" "$PREFIX"
  
# Create Prefix
POL_Wine_SelectPrefix "$PREFIX"
POL_System_SetArch "x86"
POL_Wine_PrefixCreate "$WORKING_WINE_VERSION"
STEAM_ID="105600"
Set_OS "win7"
POL_System_TmpCreate "$PREFIX"
 
# Moving TMP dir
cd "$POL_System_TmpDir"
 
# Asking about memory size of graphic card
POL_SetupWindow_VMS "512"
  
POL_Call POL_Function_SetResolution
 
# Registery fix
cat << EOF > fix.reg
REGEDIT4
        
[HKEY_CURRENT_USER\Software\Wine\X11 Driver]
"UseTakeFocus"="Y"
EOF
 
POL_Wine regedit.exe fix.reg
POL_Wine_WaitExit "$TITLE"
  
# Installing mandatory dependencies
  
POL_Call POL_Install_xinput # Fix game issue
POL_Call POL_Install_xna40 # Fix game issue
  
# Installing Steam
POL_Call POL_Install_steam
cd "$WINEPREFIX/drive_c/$PROGRAMFILES/Steam"
POL_Wine "steam.exe" steam://install/$STEAM_ID
POL_Wine_WaitBefore "$TITLE"
       
# Shortcut
POL_Shortcut "steam.exe" "$TITLE" "$TITLE.png" "steam://rungameid/$STEAM_ID"
 
# Check Kernel ptrace
if [ -e "/proc/sys/kernel/yama/ptrace_scope" ]; then
        PTRACE_CHECK=`cat /proc/sys/kernel/yama/ptrace_scope`
        if [ "$PTRACE_CHECK" != 0 ]; then
                POL_Debug_message "$(eval_gettext 'If the game crashes at startup, open a terminal and type:\necho 0|sudo tee /proc/sys/kernel/yama/ptrace_scope')" "$TITLE"
        fi
fi
 
POL_System_TmpDelete
POL_SetupWindow_Close
exit 0

Réponses

Anonymous
Mardi 6 Mars 2018 à 17:13
I'm unable to click "try this update". I've got playonmac open but it tries to open with a new icon bouncing in the dock, and it never opens. I'm unable to force quit it too. How can I test this update without having to use the button? Can I use the new source code in some way?
Mardi 6 Mars 2018 à 19:41
copy the source code in file and go playonmac software -> tools -> run a local script. Now you can test the code and game.
lahtis Vendredi 9 Février 2018 à 20:40
lahtis

Warning

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

Messages

fix the register.

Differences

@@ -1,72 +1,71 @@
-#!/bin/bash
+#!/usr/bin/env playonlinux-bash
 # Date : (2013-02-18)
-# Last revision : (2014-01-11 03:24) - DJYoshaBYD
-# Distribution used to test : Ubuntu 12.10
+# Last revision : (2018-02-09 21-39)
+# Distribution used to test : Ubuntu 12.10, Ubuntu 16.04
 # Author : lahtis
 # Licence : retail
-# PlayOnLinux: 4.1.9
-# Steam installer works (2013-02-18)
-# DVD installer not tested. I do not have dvd version.
-
-[-z "$PLAYONLINUX" = "" ] && exit 0
+# Steam installer.
+ 
+[ -z "$PLAYONLINUX" ] && exit
 source "$PLAYONLINUX/lib/sources"
-
+ 
 PREFIX="terraria"
-WINEVERSION="1.7.8"
+WORKING_WINE_VERSION="3.1"
 TITLE="Terraria"
 EDITOR="Merge Games"
 GAME_URL="http://www.terraria.org/"
 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 1576
 POL_Debug_Init
-     
+      
 # Presentation
 POL_SetupWindow_presentation "$TITLE" "$EDITOR" "$GAME_URL" "$AUTHOR" "$PREFIX"
-
+ 
 # Create Prefix
 POL_Wine_SelectPrefix "$PREFIX"
 POL_System_SetArch "x86"
-POL_Wine_PrefixCreate "$WINEVERSION"  
-GAME_VMS="512"
+POL_Wine_PrefixCreate "$WORKING_WINE_VERSION" 
 STEAM_ID="105600"
+Set_OS "win7"
+POL_System_TmpCreate "$PREFIX"
 
-# Fix pulseaudio issue
-which pulseaudio && Set_OS "winxp"
-
-# Latest Terraria version of Linux working if Virtual Desktop is off. 
-# If you had a problem. Set virtual destop on in Wine prefix settings. 
-# Set_Desktop On 1024 768
+# Moving TMP dir
+cd "$POL_System_TmpDir"
 
 # Asking about memory size of graphic card
-POL_SetupWindow_VMS $GAME_VMS
-
-# Installing mandatory dependencies
-POL_Call POL_Install_steam
-
-# Mandatory pre-install fix for steam
-POL_Call POL_Install_steam_flags "$STEAM_ID"
+POL_SetupWindow_VMS "512"
  
-# Shortcut done before install for steam version
-POL_Shortcut "steam.exe" "$TITLE" "$TITLE.png" "steam://rungameid/$STEAM_ID"
-POL_Shortcut "steam.exe" "Steam ($TITLE)" "" ""
+Poll_Call POL_Function_SetResolution
 
-POL_SetupWindow_message "$(eval_gettext 'Install Terraria via Steam.  Once Terraria has fully downloaded, press the Play button, Steam will prompt you to install the xna framework.  Once the xna framework has been installed close Steam and continue this installer.')" "$TITLE"
-cd "$WINEPREFIX/drive_c/$PROGRAMFILES/Steam"
-POL_Wine start /unix "steam.exe" steam://install/$STEAM_ID
+# Registery fix
+cat << EOF > fix.reg
+REGEDIT4
+       
+[HKEY_CURRENT_USER\Software\Wine\X11 Driver]
+"UseTakeFocus"="Y"
+EOF
+
+POL_Wine regedit.exe fix.reg
 POL_Wine_WaitExit "$TITLE"
-     
+ 
 # Installing mandatory dependencies
-
+ 
 POL_Call POL_Install_xinput # Fix game issue
 POL_Call POL_Install_xna40 # Fix game issue
-
-# disable in Steam gameoverlayrender
-POL_Wine_OverrideDLL "" "gameoverlayrenderer"
  
+# Installing Steam
+POL_Call POL_Install_steam
+cd "$WINEPREFIX/drive_c/$PROGRAMFILES/Steam"
+POL_Wine "steam.exe" steam://install/$STEAM_ID
+POL_Wine_WaitBefore "$TITLE"
+      
+# Shortcut 
+POL_Shortcut "steam.exe" "$TITLE" "$TITLE.png" "steam://rungameid/$STEAM_ID" 
+
 # Check Kernel ptrace
 if [ -e "/proc/sys/kernel/yama/ptrace_scope" ]; then
         PTRACE_CHECK=`cat /proc/sys/kernel/yama/ptrace_scope`
@@ -75,6 +74,6 @@
         fi
 fi
 
+POL_System_TmpDelete
 POL_SetupWindow_Close
-
-exit 0
+exit 0
\ No newline at end of file

Nouveau code source

#!/usr/bin/env playonlinux-bash
# Date : (2013-02-18)
# Last revision : (2018-02-09 21-39)
# Distribution used to test : Ubuntu 12.10, Ubuntu 16.04
# Author : lahtis
# Licence : retail
# Steam installer.
 
[ -z "$PLAYONLINUX" ] && exit
source "$PLAYONLINUX/lib/sources"
 
PREFIX="terraria"
WORKING_WINE_VERSION="3.1"
TITLE="Terraria"
EDITOR="Merge Games"
GAME_URL="http://www.terraria.org/"
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 1576
POL_Debug_Init
      
# Presentation
POL_SetupWindow_presentation "$TITLE" "$EDITOR" "$GAME_URL" "$AUTHOR" "$PREFIX"
 
# Create Prefix
POL_Wine_SelectPrefix "$PREFIX"
POL_System_SetArch "x86"
POL_Wine_PrefixCreate "$WORKING_WINE_VERSION" 
STEAM_ID="105600"
Set_OS "win7"
POL_System_TmpCreate "$PREFIX"

# Moving TMP dir
cd "$POL_System_TmpDir"

# Asking about memory size of graphic card
POL_SetupWindow_VMS "512"
 
Poll_Call POL_Function_SetResolution

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

POL_Wine regedit.exe fix.reg
POL_Wine_WaitExit "$TITLE"
 
# Installing mandatory dependencies
 
POL_Call POL_Install_xinput # Fix game issue
POL_Call POL_Install_xna40 # Fix game issue
 
# Installing Steam
POL_Call POL_Install_steam
cd "$WINEPREFIX/drive_c/$PROGRAMFILES/Steam"
POL_Wine "steam.exe" steam://install/$STEAM_ID
POL_Wine_WaitBefore "$TITLE"
      
# Shortcut 
POL_Shortcut "steam.exe" "$TITLE" "$TITLE.png" "steam://rungameid/$STEAM_ID" 

# Check Kernel ptrace
if [ -e "/proc/sys/kernel/yama/ptrace_scope" ]; then
        PTRACE_CHECK=`cat /proc/sys/kernel/yama/ptrace_scope`
        if [ "$PTRACE_CHECK" != 0 ]; then
                POL_Debug_message "$(eval_gettext 'If the game crashes at startup, open a terminal and type:\necho 0|sudo tee /proc/sys/kernel/yama/ptrace_scope')" "$TITLE"
        fi
fi

POL_System_TmpDelete
POL_SetupWindow_Close
exit 0

Réponses

lahtis Vendredi 9 Février 2018 à 16:28
lahtis

Warning

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

Messages

  • New wine version.
  • You have to use virtual desktop. Game not work properly fullscreen, if virtual desktop is off. 
  • If virtual desktop is off and you go fullscreen mouse or keyboard maybe not working properly.
  • A virtual desktop is possible to put the screen's maximum resolution. A virtual desktop is displayed on the full screen. In some situations, it may make gaming difficult.The game does not work properlymouse problems begin or crash when create or load a map.
  • Resizing the window will resize only the game display and not the size of the graphical user interface.
  • The game supports graphical effects if supported (OpenGL 2.0+)

You can test 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 maybe work with -force-glcore45, which is OpenGL 4.5.

Differences

@@ -1,72 +1,68 @@
-#!/bin/bash
+#!/usr/bin/env playonlinux-bash
 # Date : (2013-02-18)
-# Last revision : (2014-01-11 03:24) - DJYoshaBYD
-# Distribution used to test : Ubuntu 12.10
+# Last revision : (2018-02-09 17-02)
+# Distribution used to test : Ubuntu 12.10, Ubuntu 16.04
 # Author : lahtis
 # Licence : retail
-# PlayOnLinux: 4.1.9
-# Steam installer works (2013-02-18)
-# DVD installer not tested. I do not have dvd version.
-
-[-z "$PLAYONLINUX" = "" ] && exit 0
+# Steam installer.
+ 
+[ -z "$PLAYONLINUX" ] && exit
 source "$PLAYONLINUX/lib/sources"
-
+ 
 PREFIX="terraria"
-WINEVERSION="1.7.8"
+WORKING_WINE_VERSION="3.1"
 TITLE="Terraria"
 EDITOR="Merge Games"
 GAME_URL="http://www.terraria.org/"
 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 1576
 POL_Debug_Init
-     
+      
 # Presentation
 POL_SetupWindow_presentation "$TITLE" "$EDITOR" "$GAME_URL" "$AUTHOR" "$PREFIX"
-
+ 
 # Create Prefix
 POL_Wine_SelectPrefix "$PREFIX"
 POL_System_SetArch "x86"
-POL_Wine_PrefixCreate "$WINEVERSION"  
-GAME_VMS="512"
+POL_Wine_PrefixCreate "$WORKING_WINE_VERSION" 
 STEAM_ID="105600"
+Set_OS "win7"
+POL_System_TmpCreate "$PREFIX"
 
-# Fix pulseaudio issue
-which pulseaudio && Set_OS "winxp"
-
-# Latest Terraria version of Linux working if Virtual Desktop is off. 
-# If you had a problem. Set virtual destop on in Wine prefix settings. 
-# Set_Desktop On 1024 768
+# Moving TMP dir
+cd "$POL_System_TmpDir"
 
 # Asking about memory size of graphic card
-POL_SetupWindow_VMS $GAME_VMS
-
-# Installing mandatory dependencies
-POL_Call POL_Install_steam
-
-# Mandatory pre-install fix for steam
-POL_Call POL_Install_steam_flags "$STEAM_ID"
+POL_SetupWindow_VMS "512"
  
-# Shortcut done before install for steam version
-POL_Shortcut "steam.exe" "$TITLE" "$TITLE.png" "steam://rungameid/$STEAM_ID"
-POL_Shortcut "steam.exe" "Steam ($TITLE)" "" ""
+Poll_Call POL_Function_SetResolution
 
-POL_SetupWindow_message "$(eval_gettext 'Install Terraria via Steam.  Once Terraria has fully downloaded, press the Play button, Steam will prompt you to install the xna framework.  Once the xna framework has been installed close Steam and continue this installer.')" "$TITLE"
-cd "$WINEPREFIX/drive_c/$PROGRAMFILES/Steam"
-POL_Wine start /unix "steam.exe" steam://install/$STEAM_ID
-POL_Wine_WaitExit "$TITLE"
-     
+# Registery fix
+cat << EOF > fix.reg
+REGEDIT4
+       
+[HKEY_CURRENT_USER\Software\Wine\X11 Driver]
+"UseTakeFocus"="Y"
+EOF
+ 
 # Installing mandatory dependencies
-
+ 
 POL_Call POL_Install_xinput # Fix game issue
 POL_Call POL_Install_xna40 # Fix game issue
-
-# disable in Steam gameoverlayrender
-POL_Wine_OverrideDLL "" "gameoverlayrenderer"
  
+# Installing Steam
+POL_Call POL_Install_steam
+cd "$WINEPREFIX/drive_c/$PROGRAMFILES/Steam"
+POL_Wine "steam.exe" steam://install/$STEAM_ID
+POL_Wine_WaitBefore "$TITLE"
+      
+# Shortcut 
+POL_Shortcut "steam.exe" "$TITLE" "$TITLE.png" "steam://rungameid/$STEAM_ID" 
+
 # Check Kernel ptrace
 if [ -e "/proc/sys/kernel/yama/ptrace_scope" ]; then
         PTRACE_CHECK=`cat /proc/sys/kernel/yama/ptrace_scope`
@@ -75,6 +71,6 @@
         fi
 fi
 
+POL_System_TmpDelete
 POL_SetupWindow_Close
-
-exit 0
+exit 0
\ No newline at end of file

Nouveau code source

#!/usr/bin/env playonlinux-bash
# Date : (2013-02-18)
# Last revision : (2018-02-09 17-02)
# Distribution used to test : Ubuntu 12.10, Ubuntu 16.04
# Author : lahtis
# Licence : retail
# Steam installer.
 
[ -z "$PLAYONLINUX" ] && exit
source "$PLAYONLINUX/lib/sources"
 
PREFIX="terraria"
WORKING_WINE_VERSION="3.1"
TITLE="Terraria"
EDITOR="Merge Games"
GAME_URL="http://www.terraria.org/"
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 1576
POL_Debug_Init
      
# Presentation
POL_SetupWindow_presentation "$TITLE" "$EDITOR" "$GAME_URL" "$AUTHOR" "$PREFIX"
 
# Create Prefix
POL_Wine_SelectPrefix "$PREFIX"
POL_System_SetArch "x86"
POL_Wine_PrefixCreate "$WORKING_WINE_VERSION" 
STEAM_ID="105600"
Set_OS "win7"
POL_System_TmpCreate "$PREFIX"

# Moving TMP dir
cd "$POL_System_TmpDir"

# Asking about memory size of graphic card
POL_SetupWindow_VMS "512"
 
Poll_Call POL_Function_SetResolution

# Registery fix
cat << EOF > fix.reg
REGEDIT4
       
[HKEY_CURRENT_USER\Software\Wine\X11 Driver]
"UseTakeFocus"="Y"
EOF
 
# Installing mandatory dependencies
 
POL_Call POL_Install_xinput # Fix game issue
POL_Call POL_Install_xna40 # Fix game issue
 
# Installing Steam
POL_Call POL_Install_steam
cd "$WINEPREFIX/drive_c/$PROGRAMFILES/Steam"
POL_Wine "steam.exe" steam://install/$STEAM_ID
POL_Wine_WaitBefore "$TITLE"
      
# Shortcut 
POL_Shortcut "steam.exe" "$TITLE" "$TITLE.png" "steam://rungameid/$STEAM_ID" 

# Check Kernel ptrace
if [ -e "/proc/sys/kernel/yama/ptrace_scope" ]; then
        PTRACE_CHECK=`cat /proc/sys/kernel/yama/ptrace_scope`
        if [ "$PTRACE_CHECK" != 0 ]; then
                POL_Debug_message "$(eval_gettext 'If the game crashes at startup, open a terminal and type:\necho 0|sudo tee /proc/sys/kernel/yama/ptrace_scope')" "$TITLE"
        fi
fi

POL_System_TmpDelete
POL_SetupWindow_Close
exit 0

Réponses

Vendredi 9 Février 2018 à 16:53
You don't use regedit fix ?
Vendredi 9 Février 2018 à 20:41
Forgot. Thanks.
Badcop73 Samedi 6 Février 2016 à 1:19
Badcop73 Anonymous

Messages

Well it does not on my chromebook at least :)

 

Réponses

lahtis Dimanche 18 Octobre 2015 à 1:54
lahtis

Warning

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

Messages

Latest Terraria version of Linux working if Virtual Desktop is off.

If you had a problem. Set virtual destop on in Wine prefix settings.

 

Differences

@@ -37,8 +37,9 @@
 # Fix pulseaudio issue
 which pulseaudio && Set_OS "winxp"
 
-# Select virtual desktop mode on
-Set_Desktop On 1024 768
+# Latest Terraria version of Linux working if Virtual Desktop is off. 
+# If you had a problem. Set virtual destop on in Wine prefix settings. 
+# Set_Desktop On 1024 768
 
 # Asking about memory size of graphic card
 POL_SetupWindow_VMS $GAME_VMS

Nouveau code source

#!/bin/bash
# Date : (2013-02-18)
# Last revision : (2014-01-11 03:24) - DJYoshaBYD
# Distribution used to test : Ubuntu 12.10
# Author : lahtis
# Licence : retail
# PlayOnLinux: 4.1.9
# Steam installer works (2013-02-18)
# DVD installer not tested. I do not have dvd version.

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

PREFIX="terraria"
WINEVERSION="1.7.8"
TITLE="Terraria"
EDITOR="Merge Games"
GAME_URL="http://www.terraria.org/"
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 "x86"
POL_Wine_PrefixCreate "$WINEVERSION"  
GAME_VMS="512"
STEAM_ID="105600"

# Fix pulseaudio issue
which pulseaudio && Set_OS "winxp"

# Latest Terraria version of Linux working if Virtual Desktop is off. 
# If you had a problem. Set virtual destop on in Wine prefix settings. 
# Set_Desktop On 1024 768

# Asking about memory size of graphic card
POL_SetupWindow_VMS $GAME_VMS

# Installing mandatory dependencies
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)" "" ""

POL_SetupWindow_message "$(eval_gettext 'Install Terraria via Steam.  Once Terraria has fully downloaded, press the Play button, Steam will prompt you to install the xna framework.  Once the xna framework has been installed close Steam and continue this installer.')" "$TITLE"
cd "$WINEPREFIX/drive_c/$PROGRAMFILES/Steam"
POL_Wine start /unix "steam.exe" steam://install/$STEAM_ID
POL_Wine_WaitExit "$TITLE"
     
# Installing mandatory dependencies

POL_Call POL_Install_xinput # Fix game issue
POL_Call POL_Install_xna40 # Fix game issue

# disable in Steam gameoverlayrender
POL_Wine_OverrideDLL "" "gameoverlayrenderer"
 
# Check Kernel ptrace
if [ -e "/proc/sys/kernel/yama/ptrace_scope" ]; then
        PTRACE_CHECK=`cat /proc/sys/kernel/yama/ptrace_scope`
        if [ "$PTRACE_CHECK" != 0 ]; then
                POL_Debug_message "$(eval_gettext 'If the game crashes at startup, open a terminal and type:\necho 0|sudo tee /proc/sys/kernel/yama/ptrace_scope')" "$TITLE"
        fi
fi

POL_SetupWindow_Close

exit 0

Réponses

Vendredi 23 Octobre 2015 à 17:37
note: When steam comes up there is no text displayed. Close Steam window. Steam re-start and font issue is repaired.
Quentin PÂRIS Jeudi 6 Aoüt 2015 à 21:24
Quentin PÂRIS Anonymous

Warning

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

Differences

@@ -53,7 +53,7 @@
 POL_Shortcut "steam.exe" "$TITLE" "$TITLE.png" "steam://rungameid/$STEAM_ID"
 POL_Shortcut "steam.exe" "Steam ($TITLE)" "" ""
 
-POL_SetupWindow_message "$(eval_gettext 'Install Terraria in Steam. Run the Terraria when Steam is installed the game. Steam install xna framework the game. Close the Steam so that the installer can continue.')" "$TITLE"
+POL_SetupWindow_message "$(eval_gettext 'Install Terraria via Steam.  Once Terraria has fully downloaded, press the Play button, Steam will prompt you to install the xna framework.  Once the xna framework has been installed close Steam and continue this installer.')" "$TITLE"
 cd "$WINEPREFIX/drive_c/$PROGRAMFILES/Steam"
 POL_Wine start /unix "steam.exe" steam://install/$STEAM_ID
 POL_Wine_WaitExit "$TITLE"

Nouveau code source

#!/bin/bash
# Date : (2013-02-18)
# Last revision : (2014-01-11 03:24) - DJYoshaBYD
# Distribution used to test : Ubuntu 12.10
# Author : lahtis
# Licence : retail
# PlayOnLinux: 4.1.9
# Steam installer works (2013-02-18)
# DVD installer not tested. I do not have dvd version.

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

PREFIX="terraria"
WINEVERSION="1.7.8"
TITLE="Terraria"
EDITOR="Merge Games"
GAME_URL="http://www.terraria.org/"
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 "x86"
POL_Wine_PrefixCreate "$WINEVERSION"  
GAME_VMS="512"
STEAM_ID="105600"

# Fix pulseaudio issue
which pulseaudio && Set_OS "winxp"

# Select virtual desktop mode on
Set_Desktop On 1024 768

# Asking about memory size of graphic card
POL_SetupWindow_VMS $GAME_VMS

# Installing mandatory dependencies
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)" "" ""

POL_SetupWindow_message "$(eval_gettext 'Install Terraria via Steam.  Once Terraria has fully downloaded, press the Play button, Steam will prompt you to install the xna framework.  Once the xna framework has been installed close Steam and continue this installer.')" "$TITLE"
cd "$WINEPREFIX/drive_c/$PROGRAMFILES/Steam"
POL_Wine start /unix "steam.exe" steam://install/$STEAM_ID
POL_Wine_WaitExit "$TITLE"
     
# Installing mandatory dependencies

POL_Call POL_Install_xinput # Fix game issue
POL_Call POL_Install_xna40 # Fix game issue

# disable in Steam gameoverlayrender
POL_Wine_OverrideDLL "" "gameoverlayrenderer"
 
# Check Kernel ptrace
if [ -e "/proc/sys/kernel/yama/ptrace_scope" ]; then
        PTRACE_CHECK=`cat /proc/sys/kernel/yama/ptrace_scope`
        if [ "$PTRACE_CHECK" != 0 ]; then
                POL_Debug_message "$(eval_gettext 'If the game crashes at startup, open a terminal and type:\necho 0|sudo tee /proc/sys/kernel/yama/ptrace_scope')" "$TITLE"
        fi
fi

POL_SetupWindow_Close

exit 0

Réponses

petch Samedi 18 Juillet 2015 à 16:57
petch

Warning

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

Messages

Modify ptrace_scope message so it only shows on Linux, entry exists and is not 0 already

Differences

@@ -66,8 +66,13 @@
 # disable in Steam gameoverlayrender
 POL_Wine_OverrideDLL "" "gameoverlayrenderer"
  
-
-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')"
+# Check Kernel ptrace
+if [ -e "/proc/sys/kernel/yama/ptrace_scope" ]; then
+        PTRACE_CHECK=`cat /proc/sys/kernel/yama/ptrace_scope`
+        if [ "$PTRACE_CHECK" != 0 ]; then
+                POL_Debug_message "$(eval_gettext 'If the game crashes at startup, open a terminal and type:\necho 0|sudo tee /proc/sys/kernel/yama/ptrace_scope')" "$TITLE"
+        fi
+fi
 
 POL_SetupWindow_Close
 

Nouveau code source

#!/bin/bash
# Date : (2013-02-18)
# Last revision : (2014-01-11 03:24) - DJYoshaBYD
# Distribution used to test : Ubuntu 12.10
# Author : lahtis
# Licence : retail
# PlayOnLinux: 4.1.9
# Steam installer works (2013-02-18)
# DVD installer not tested. I do not have dvd version.

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

PREFIX="terraria"
WINEVERSION="1.7.8"
TITLE="Terraria"
EDITOR="Merge Games"
GAME_URL="http://www.terraria.org/"
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 "x86"
POL_Wine_PrefixCreate "$WINEVERSION"  
GAME_VMS="512"
STEAM_ID="105600"

# Fix pulseaudio issue
which pulseaudio && Set_OS "winxp"

# Select virtual desktop mode on
Set_Desktop On 1024 768

# Asking about memory size of graphic card
POL_SetupWindow_VMS $GAME_VMS

# Installing mandatory dependencies
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)" "" ""

POL_SetupWindow_message "$(eval_gettext 'Install Terraria in Steam. Run the Terraria when Steam is installed the game. Steam install xna framework the game. Close the Steam so that the installer can continue.')" "$TITLE"
cd "$WINEPREFIX/drive_c/$PROGRAMFILES/Steam"
POL_Wine start /unix "steam.exe" steam://install/$STEAM_ID
POL_Wine_WaitExit "$TITLE"
     
# Installing mandatory dependencies

POL_Call POL_Install_xinput # Fix game issue
POL_Call POL_Install_xna40 # Fix game issue

# disable in Steam gameoverlayrender
POL_Wine_OverrideDLL "" "gameoverlayrenderer"
 
# Check Kernel ptrace
if [ -e "/proc/sys/kernel/yama/ptrace_scope" ]; then
        PTRACE_CHECK=`cat /proc/sys/kernel/yama/ptrace_scope`
        if [ "$PTRACE_CHECK" != 0 ]; then
                POL_Debug_message "$(eval_gettext 'If the game crashes at startup, open a terminal and type:\necho 0|sudo tee /proc/sys/kernel/yama/ptrace_scope')" "$TITLE"
        fi
fi

POL_SetupWindow_Close

exit 0

Réponses

Vendredi 24 Juillet 2015 à 15:58
Great news in Terraria player. http://store.steampowered.com/news/?appids=105600
Vendredi 24 Juillet 2015 à 16:00
Steam Linux is Beta version of game.
amelorate Lundi 6 Juillet 2015 à 5:00
amelorate Anonymous

Messages

When steam comes up there is no text displayed. Just a blank window with a few textboxes. This makes entering your account info almost impossible. Possibly a font issue?

Réponses

Anonymous
Lundi 6 Juillet 2015 à 18:14
I think this can be fixed by adding POL_Wine_OverrideDLL "" "dwrite" to the script. I'll try later and see.
Lundi 6 Juillet 2015 à 19:04
POL_Call POL_Install_steam should have already done that
Anonymous
Lundi 6 Juillet 2015 à 21:28
This is nothing huge, but could you use newer wine? Newer wine fixes bugs that older ones have. And it's not good that we have already old version when publishing a script.
Anonymous
Mardi 7 Juillet 2015 à 0:03
Changing the line WINEVERSION="1.7.8" to WINEVERSION="1.7.46" doesn't solve the issue. Adding POL_Wine_OverrideDLL "" "dwrite" just before POL_Call POL_Install_steam did however. However now I am having issues with garbled audio. I think this might be an issue with wine and my system and it happens to both 1.7.8 and 1.7.46 of wine. Otherwise terraria plays well with this.
Anonymous
Mardi 7 Juillet 2015 à 16:07
I think there is regression at the audio code that causes the garbled sounds. Sometimes those can be fixed changing audio settings at linux box
lahtis Lundi 21 Juillet 2014 à 19:51
lahtis

Warning

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

Differences

@@ -61,7 +61,11 @@
 # Installing mandatory dependencies
 
 POL_Call POL_Install_xinput # Fix game issue
-POL_Call POL_Install_xna40 # Fix game issue     
+POL_Call POL_Install_xna40 # Fix game issue
+
+# disable in Steam gameoverlayrender
+POL_Wine_OverrideDLL "" "gameoverlayrenderer"
+ 
 
 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')"
 

Nouveau code source

#!/bin/bash
# Date : (2013-02-18)
# Last revision : (2014-01-11 03:24) - DJYoshaBYD
# Distribution used to test : Ubuntu 12.10
# Author : lahtis
# Licence : retail
# PlayOnLinux: 4.1.9
# Steam installer works (2013-02-18)
# DVD installer not tested. I do not have dvd version.

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

PREFIX="terraria"
WINEVERSION="1.7.8"
TITLE="Terraria"
EDITOR="Merge Games"
GAME_URL="http://www.terraria.org/"
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 "x86"
POL_Wine_PrefixCreate "$WINEVERSION"  
GAME_VMS="512"
STEAM_ID="105600"

# Fix pulseaudio issue
which pulseaudio && Set_OS "winxp"

# Select virtual desktop mode on
Set_Desktop On 1024 768

# Asking about memory size of graphic card
POL_SetupWindow_VMS $GAME_VMS

# Installing mandatory dependencies
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)" "" ""

POL_SetupWindow_message "$(eval_gettext 'Install Terraria in Steam. Run the Terraria when Steam is installed the game. Steam install xna framework the game. Close the Steam so that the installer can continue.')" "$TITLE"
cd "$WINEPREFIX/drive_c/$PROGRAMFILES/Steam"
POL_Wine start /unix "steam.exe" steam://install/$STEAM_ID
POL_Wine_WaitExit "$TITLE"
     
# Installing mandatory dependencies

POL_Call POL_Install_xinput # Fix game issue
POL_Call POL_Install_xna40 # Fix game issue

# disable in Steam gameoverlayrender
POL_Wine_OverrideDLL "" "gameoverlayrenderer"
 

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

Réponses

lahtis Vendredi 18 Juillet 2014 à 13:35
lahtis

Warning

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

Differences

@@ -53,7 +53,7 @@
 POL_Shortcut "steam.exe" "$TITLE" "$TITLE.png" "steam://rungameid/$STEAM_ID"
 POL_Shortcut "steam.exe" "Steam ($TITLE)" "" ""
 
-POL_SetupWindow_message "$(eval_gettext 'Install Terraria in Steam. Run the Terraria when Steam is installed the game. Steam install xna framework the game. Close the Steam so that the installer can continue.')" "$TITLE"
+POL_SetupWindow_message "$(eval_gettext 'Install Terraria in Steam. Run the Terraria when Steam is installed the game. Steam install own xna framework the game. Close the Steam so that the installer can continue. When you play a game Steam Overlay must be turned off.')" "$TITLE"
 cd "$WINEPREFIX/drive_c/$PROGRAMFILES/Steam"
 POL_Wine start /unix "steam.exe" steam://install/$STEAM_ID
 POL_Wine_WaitExit "$TITLE"

Nouveau code source

#!/bin/bash
# Date : (2013-02-18)
# Last revision : (2014-01-11 03:24) - DJYoshaBYD
# Distribution used to test : Ubuntu 12.10
# Author : lahtis
# Licence : retail
# PlayOnLinux: 4.1.9
# Steam installer works (2013-02-18)
# DVD installer not tested. I do not have dvd version.

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

PREFIX="terraria"
WINEVERSION="1.7.8"
TITLE="Terraria"
EDITOR="Merge Games"
GAME_URL="http://www.terraria.org/"
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 "x86"
POL_Wine_PrefixCreate "$WINEVERSION"  
GAME_VMS="512"
STEAM_ID="105600"

# Fix pulseaudio issue
which pulseaudio && Set_OS "winxp"

# Select virtual desktop mode on
Set_Desktop On 1024 768

# Asking about memory size of graphic card
POL_SetupWindow_VMS $GAME_VMS

# Installing mandatory dependencies
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)" "" ""

POL_SetupWindow_message "$(eval_gettext 'Install Terraria in Steam. Run the Terraria when Steam is installed the game. Steam install own xna framework the game. Close the Steam so that the installer can continue. When you play a game Steam Overlay must be turned off.')" "$TITLE"
cd "$WINEPREFIX/drive_c/$PROGRAMFILES/Steam"
POL_Wine start /unix "steam.exe" steam://install/$STEAM_ID
POL_Wine_WaitExit "$TITLE"
     
# Installing mandatory dependencies

POL_Call POL_Install_xinput # Fix game issue
POL_Call POL_Install_xna40 # Fix game issue     

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

Réponses

Anonymous
Vendredi 18 Juillet 2014 à 13:41
Maybe we could automatically disable it?
Vendredi 18 Juillet 2014 à 14:18
No. It can only be done Steam program.
Anonymous
Vendredi 18 Juillet 2014 à 14:28
What about this?
POL_Wine_OverrideDLL "" "gameoverlayrenderer"
Anonymous
Jeudi 16 Avril 2015 à 18:36
Is no one able to get the in game map to work?
Mercredi 10 Février 2016 à 6:37
only using stable linux version.
jorlinn Mardi 8 Juillet 2014 à 19:09
jorlinn Anonymous

Messages

Please disregard the previous message about Terraria crashing.

With Steam Overlay disabled (As stated in the WineHQ entry on Terraria), this game script runs perfectly well.

Thank you so much for enabling me to play one of my favourite games on Linux.

Much obliged.

 

Réponses

jorlinn Vendredi 27 Juin 2014 à 2:45
jorlinn Anonymous

Messages

Operating system : Ubuntu 14.04
Graphic card : nVidia 640 GT
Comments :  program tends to crash quite often after a key press, usually right after the game has started proper. Sometimes later on in the game, though this happens rarely.

First of all, thank you fro creating this script. Terraria is one of my most favourite games.

This started happening on 27-06-2014. I did update my system and I run no Ubuntu PPA's Before today this game ran perfectly.

When running the game with the debugging enabled, the game crashes with an Access violation.

I'll submit a more detailed bug report through PlayOnLinux itself.

Réponses

Anonymous
Mardi 8 Juillet 2014 à 19:07
Moderator, please delete this message. The game runs perfectly when the steam overlay has been disabled, as the WineHQ AppDB entry states,

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