forked from mattcaron/playonlinux
-
Notifications
You must be signed in to change notification settings - Fork 10
/
Freelancer
89 lines (65 loc) · 2.56 KB
/
Freelancer
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
#!/usr/bin/env playonlinux-bash
# Date : (2013-03-1 17:00)
# Last revision : (2013-10-04 17:58)
# Wine version used : 1.5.24
# Distribution used to test : Ubuntu 12.10, Nvidia Geforce 9800 GT 512MB using
# nvidia-experimental-310 driver, Intel® Core™2 Duo CPU E4400 @ 2.00GHz×2, Memory 1,9 GiB
# Author : lahtis [email protected]
# Script licence : GPL v.2
# Program licence : Retail
# Freelancer installer and 1.1 offical patching.
[ -z "$PLAYONLINUX" = "" ] && exit
source "$PLAYONLINUX/lib/sources"
PREFIX="Freelancer"
WORKING_WINE_VERSION="1.5.24"
TITLE="Freelancer"
SERVERTITLE="FreelanceServer"
EDITOR="Microsoft game studios"
GAME_URL="http://www.microsoft.com/games/freelancer/default.aspx"
AUTHOR="lahtis"
GAME_VMS="512"
# 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_Wine_PrefixCreate "$WORKING_WINE_VERSION"
Set_OS winxp
# Asking about memory size of graphic card
POL_SetupWindow_VMS $GAME_VMS
# Fix pulseaudio issue
which pulseaudio && Set_OS "winxp"
# Select virtual desktop mode on
Set_Desktop On 800 600
# Download and install directplay
POL_Install_directplay
# Asking for CDROM and checking if it's correct one
POL_SetupWindow_message "$(eval_gettext 'Please insert the game media into your disk drive')" "$TITLE"
POL_SetupWindow_cdrom
POL_SetupWindow_check_cdrom "00000000.016"
POL_Wine start /unix "$CDROM/SETUP.EXE" || POL_Debug_Fatal "$(eval_gettext 'Error while installing game.')"
POL_Wine_WaitExit "$TITLE"
# Create shortcuts
POL_Shortcut "Freelancer.exe" "$TITLE" "$TITLE.png"
# Patching latest 1.1 offical patch
PATCHVERSION = "1.1"
# Create tmp directory for downloaded files
POL_System_TmpCreate "$PREFIX"
# Moving tmp directory
cd "$POL_System_TmpDir"
# Download patch
POL_Download "http://download.microsoft.com/download/5/4/2/542a372f-d540-468d-a653-2cdced8d1d0d/flpatch.exe"
# Select setup file
ARCHIVE="$POL_USER_ROOT/tmp/Freelancer/flpatch.exe"
# Install file && check install errors
POL_Wine "$ARCHIVE" || POL_Debug_Fatal "$(eval_gettext 'Error while installing patch.')"
# Wait is patch is installed
POL_Wine_WaitExit "$TITLE"
POL_Shortcut "FLServer.exe" "$TITLE server" "$SERVERTITLE.png"
POL_System_TmpDelete
POL_SetupWindow_message "$(eval_gettext '$TITLE and $PATCHVERSION patch has been successfully installed.')"
POL_SetupWindow_Close
exit 0