Forums

Gothic III

Need help to complete script

Auteur Réponses
Jump to the page: 1 - 2 - 3
norway Dimanche 13 Novembre 2011 à 15:46
norway

#!/bin/bash 
# Date : (2011-6-11 19-41) 
# Last revision : (2011-11-11 21-11) 
# Wine version used : 1.3.18 - 1.3.32 
# Distribution used to test : Kubuntu 11.10 x64 
# Author : Ulrick(No) 
# Licence : Retail 
# Only For : http://www.playonmac.com 

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

TITLE="Gothic 3" 
PREFIX="gothic3" 
WORKING_WINE_VERSION="1.3.18" 
GAME_VMS="512" 
DEVELOPER="Piranha Bytes"
SCRIPTCREATOR="Ulrick(No)"
COMPANYSITE="http://www.pluto13.de/"

# Starting the script 
POL_SetupWindow_Init 

# Starting debugging API 
POL_Debug_Init 

POL_SetupWindow_presentation "$TITLE" "$DEVELOPER" "$COMPANYSITE" "$SCRIPTCREATOR" "$PREFIX" 

# Setting prefix path 
POL_Wine_SelectPrefix "$PREFIX" 

# Downloading wine if necessary and creating prefix 
Set_Arch "x86" 
POL_Wine_PrefixCreate "$WORKING_WINE_VERSION" 

# Choose between DVD and Digital Download version 
POL_SetupWindow_InstallMethod "DVD,LOCAL" 

# Installing mandatory dependencies 
POL_Call POL_Install_dxfullsetup 
POL_Call POL_Install_devenum 
POL_Call POL_Install_dinput8 
POL_Call POL_Install_dsound 
POL_Call POL_Install_dotnet20 
POL_Call POL_Install_vcrun2005 
POL_Call POL_Install_vcrun2008 
POL_Call POL_Install_vcrun6 

# Begin game installation 
if [ "$INSTALL_METHOD" == "DVD" ]; then 
# Asking for CDROM and checking if it's correct one 
POL_SetupWindow_message "$(eval_gettext 'Please insert game media into your disk drive\\nif not already done.')" 
POL_SetupWindow_cdrom 
POL_Wine start /unix "$CDROM/setup.exe" 
POL_Wine_WaitExit "$TITLE" 
else 
# Asking then installing DDV of the game 
cd "$HOME" 
POL_SetupWindow_browse "$(eval_gettext 'Please select the setup file to run:')" "$TITLE"
SETUP_EXE="$APP_ANSWER" 
POL_Wine start /unix "$SETUP_EXE" 
POL_Wine_WaitExit "$TITLE" 
fi 

# Fix for this game 
POL_Wine_DirectSound "MaxShadowSize" "0" 
POL_Wine_Direct3D "UseGLSL" "enabled" 
Set_DXGrab On
Set_Managed Off

# Set Graphic Card information keys for wine 
POL_Wine_SetVideoDriver 

# Sound problem fix - pulseaudio related 
[ "$POL_OS" = "Linux" ] && Set_SoundDriver "alsa" 
[ "$POL_OS" = "Linux" ] && Set_SoundEmulDriver "Y" 
## End Fix 

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

# Graphic fix
POL_SetupWindow_menu_list "$(eval_gettext "Choose the game resolution")" "$TITLE" "800x600-1152x864-1024x768-1280x720-1280x800-1280x900-1280x1024-1360x768-1440x900-1400x1050-1600x900-1600x1024-1680x1050-1920x1080" "-" "800x600"
 
resolution="$APP_ANSWER"
WIDTH="$(echo $resolution | cut -d"x" -f1)"
HEIGHT="$(echo $resolution | cut -d"x" -f2)"
 
cd "$POL_USER_ROOT/wineprefix/$PREFIX/drive_c/$PROGRAMFILES/Gothic 3/Ini/" || POL_Debug_Error "Unable to find Gothic 3 folder"
mv ge3.ini ge3.ini.back 
 
cat ge3.ini.back | sed s/Fullscreen\\=true/Fullscreen\\=false/ | sed s/Bottom\\=768/Bottom\\=$HEIGHT/ | sed s/Right\\=1024/RIght\\=$WIDTH/ > ge3.ini
Set_Desktop On $WIDTH $HEIGHT

# Making shortcut 
POL_Shortcut "Gothic3.exe" "$TITLE" "" "" 

POL_SetupWindow_message "$(eval_gettext '$TITLE installation is a succes !')" "$TITLE"

POL_SetupWindow_Close 
exit 0 
-----------------------------------------------------------------------------------
This script makes game playable, but I still cant fix system cursor in the game... I have an idea but... I ll try to install the win theme where system cursor will be sized - 1 pixel

Edité par Tinou


ulrickno94
Quentin PÂRIS Dimanche 13 Novembre 2011 à 15:51
Quentin PÂRISAnonymous

The scripts look goods

(Also, can you use [code language=playonlinux] [/code] please ?)

Edité par Tinou

norway Dimanche 13 Novembre 2011 à 16:04
norway

Sorry, where should I include that command??? And if it is not difficult, tell me please what it does.
I suppose that this command translate all the text used in installation to the language that POL use.

Edité par norway


ulrickno94
Quentin PÂRIS Dimanche 13 Novembre 2011 à 16:12
Quentin PÂRISAnonymous

Nope, it's a code for the forum to show the code coloured
norway Dimanche 13 Novembre 2011 à 16:14
norway

#!/bin/bash 
# Date : (2011-6-11 19-41) 
# Last revision : (2011-11-11 21-11) 
# Wine version used : 1.3.18 - 1.3.32 
# Distribution used to test : Kubuntu 11.10 x64 
# Author : Ulrick(No) 
# Licence : Retail 
# Only For : http://www.playonmac.com 

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

TITLE="Gothic 3" 
PREFIX="gothic3" 
WORKING_WINE_VERSION="1.3.18" 
GAME_VMS="512" 
DEVELOPER="Piranha Bytes"
SCRIPTCREATOR="Ulrick(No)"
COMPANYSITE="http://www.pluto13.de/"

# Starting the script 
POL_SetupWindow_Init 

# Starting debugging API 
POL_Debug_Init 

POL_SetupWindow_presentation "$TITLE" "$DEVELOPER" "$COMPANYSITE" "$SCRIPTCREATOR" "$PREFIX" 

# Setting prefix path 
POL_Wine_SelectPrefix "$PREFIX" 

# Downloading wine if necessary and creating prefix 
Set_Arch "x86" 
POL_Wine_PrefixCreate "$WORKING_WINE_VERSION" 

# Choose between DVD and Digital Download version 
POL_SetupWindow_InstallMethod "DVD,LOCAL" 

# Installing mandatory dependencies 
POL_Call POL_Install_dxfullsetup 
POL_Call POL_Install_devenum 
POL_Call POL_Install_dinput8 
POL_Call POL_Install_dsound 
POL_Call POL_Install_dotnet20 
POL_Call POL_Install_vcrun2005 
POL_Call POL_Install_vcrun2008 
POL_Call POL_Install_vcrun6 

# Begin game installation 
if [ "$INSTALL_METHOD" == "DVD" ]; then 
# Asking for CDROM and checking if it's correct one 
POL_SetupWindow_message "$(eval_gettext 'Please insert game media into your disk drive\\nif not already done.')" 
POL_SetupWindow_cdrom 
POL_Wine start /unix "$CDROM/setup.exe" 
POL_Wine_WaitExit "$TITLE" 
else 
# Asking then installing DDV of the game 
cd "$HOME" 
POL_SetupWindow_browse "$(eval_gettext 'Please select the setup file to run:')" "$TITLE"
SETUP_EXE="$APP_ANSWER" 
POL_Wine start /unix "$SETUP_EXE" 
POL_Wine_WaitExit "$TITLE" 
fi 

# Fix for this game 
POL_Wine_DirectSound "MaxShadowSize" "0" 
POL_Wine_Direct3D "UseGLSL" "enabled" 
Set_DXGrab On
Set_Managed Off

# Set Graphic Card information keys for wine 
POL_Wine_SetVideoDriver 

# Sound problem fix - pulseaudio related 
[ "$POL_OS" = "Linux" ] && Set_SoundDriver "alsa" 
[ "$POL_OS" = "Linux" ] && Set_SoundEmulDriver "Y" 
## End Fix 

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

# Graphic fix
POL_SetupWindow_menu_list "$(eval_gettext "Choose the game resolution")" "$TITLE" "800x600-1152x864-1024x768-1280x720-1280x800-1280x900-1280x1024-1360x768-1440x900-1400x1050-1600x900-1600x1024-1680x1050-1920x1080" "-" "800x600"
 
resolution="$APP_ANSWER"
WIDTH="$(echo $resolution | cut -d"x" -f1)"
HEIGHT="$(echo $resolution | cut -d"x" -f2)"
 
cd "$POL_USER_ROOT/wineprefix/$PREFIX/drive_c/$PROGRAMFILES/Gothic 3/Ini/" || POL_Debug_Error "Unable to find Gothic 3 folder"
mv ge3.ini ge3.ini.back 
 
cat ge3.ini.back | sed s/Fullscreen\\=true/Fullscreen\\=false/ | sed s/Bottom\\=768/Bottom\\=$HEIGHT/ | sed s/Right\\=1024/RIght\\=$WIDTH/ > ge3.ini
Set_Desktop On $WIDTH $HEIGHT

# Making shortcut 
POL_Shortcut "Gothic3.exe" "$TITLE" "" "" 

POL_SetupWindow_message "$(eval_gettext '$TITLE installation is a succes !')" "$TITLE"

POL_SetupWindow_Close 
exit 0 

ulrickno94
norway Dimanche 13 Novembre 2011 à 16:16
norway

I forgot to say "thanks" for idea with resolution)
Thanks a lot.

ulrickno94
norway Dimanche 13 Novembre 2011 à 16:17
norway

Should I send it for validation, or I d better work with cursor?

ulrickno94
Quentin PÂRIS Dimanche 13 Novembre 2011 à 16:24
Quentin PÂRISAnonymous

What is the problem with the cursor exactly?
norway Dimanche 13 Novembre 2011 à 16:33
norway

System cursor doesnt dissapeare in game...

ulrickno94
Quentin PÂRIS Dimanche 13 Novembre 2011 à 16:35
Quentin PÂRISAnonymous

We could put it in testing category ?
norway Dimanche 13 Novembre 2011 à 16:36
norway

I think that this problem is only on kde desktops... Can you try script on gnome or unity or on smth else?

ulrickno94
Quentin PÂRIS Dimanche 13 Novembre 2011 à 16:39
Quentin PÂRISAnonymous

I don't have the game.
norway Dimanche 13 Novembre 2011 à 16:42
norway

Im sure that the problem with cursor is a problem of kubuntu because I ve watched videos in youtube and there was no problem because they started the game in gnome.

ulrickno94
norway Dimanche 13 Novembre 2011 à 16:43
norway

Wait a minute, dont validate the script, Im having the last test

ulrickno94
Quentin PÂRIS Dimanche 13 Novembre 2011 à 16:46
Quentin PÂRISAnonymous

I don't think that the problem comes from GNOME. I think that it comes from one of the POL_Call you've installed, or from your wineversion

Edité par Tinou

norway Dimanche 13 Novembre 2011 à 16:48
norway

Okey I'll make some more tests. I ll try to delete some POL_Call commands.

ulrickno94
norway Dimanche 13 Novembre 2011 à 16:57
norway

I think that the problem was dinput8. Soon I ll check it.

Edité par norway


ulrickno94
norway Dimanche 13 Novembre 2011 à 17:16
norway

dinput8 is useless. I am still testing.

ulrickno94
norway Dimanche 13 Novembre 2011 à 20:20
norway

I've created 2 scripts of Gothic 3. Windowed and fullscreen. In window mode works all, but system cursor doesnt dissapeare. In fullscreen mode also works all, but the sky is black.
Now I'm working in two ways. I prefer fullscreen mode.
Links:
Fullscreen- http://www.playonmac.com/repository/?script=996

Windowed- http://www.playonmac.com/repository/?script=995

Edité par norway


ulrickno94
Vous êtes ici: Index > Your creations. > Gothic III

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 dmcayonlinux.com