The forum

Risen

The creation of Risen script

Author Replies
norway Monday 14 November 2011 at 22:11
norway

This is the first version of script.
---------------------------------------------------------------------------------
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
#!/bin/bash
# Date : (2011-15-11 01-07)
# Last revision : (2011-15-11 01-07)
# Wine version used : 1.3.18
# Distribution used to test : Linux Mint x64
# Author : Ulrick(No)
# Licence : Retail
  
[ "$PLAYONLINUX" = "" ] && exit 0
source "$PLAYONLINUX/lib/sources"
  
# Setting the variables
TITLE="Risen"
PREFIX="risen"
WORKING_WINE_VERSION="1.3.18"
DEVELOPER="Piranha Bytes"
SCRIPTCREATOR="Ulrick(No)"
  
# 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 # To fix game crash
POL_Call POL_Install_vcrun6 # To fix game crash
POL_Call POL_Install_dsound # To fix sound interruption
POL_Call POL_Install_physx # To fix graphic bugs
POL_Call POL_Install_gfwl86 # Must be installed
 
 
# 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
# Asking for resolution
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)"
Set_Desktop On $WIDTH $HEIGHT
     
# Making shortcut
POL_Shortcut "risen.exe" "$TITLE" "" ""
   
# Final note
POL_SetupWindow_message "$(eval_gettext '$TITLE is installed')" "$TITLE"
  
# Exiting the  POL window
POL_SetupWindow_Close
exit 0

Edited by norway


ulrickno94
You are here: Index > Your creations. > Risen

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@playonlinux.com