The forum

[Script] Little Fighter 2 v2.0a

Author Replies
MangaD Wednesday 30 September 2015 at 1:58
MangaD

Hello,

This is my first script, for Little Fighter 2 game. I have tested it and it worked, but with an error message at the end:

POL_Wine] Error: Wine seems to have crashed

If your program is running, just ignore this message

Any suggestions are very much appreciated.

 

Description:

Little Fighter 2 is a popular Hong Kong freeware PC fighting game and is the sequel to the game Little Fighter (LF1). Little Fighter 2 was created by Marti Wong and Starsky Wong in 1999, and released in a long series of updates.

Known issues:

  • At installation phase, sometimes after clicking 'Next' nothing appears on the window. Just click 'Back' and 'Next' again to fix.
  • The 'control settings' screen is a bit buggy, but still works.

 

Setup images:

http://s6.postimg.org/46cuca80t/top.png
http://s6.postimg.org/i3zlvbvhd/left.png
The original (preferred): http://s6.postimg.org/9cxmy6ihp/lf2_0_32x32.png
http://s6.postimg.org/5nyanucrh/lf2_0_22x22.png
http://s6.postimg.org/of07y07bx/lf2_0_48x48.png

 

Screenshots:

http://lf2.net/lf2_pic/4.gif
http://lf2.net/lf2_pic/6.gif
http://lf2.net/lf2_pic/9.gif
http://lf2.net/lf2_pic/14.gif
http://lf2.net/lf2_pic/16.gif

 

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
99
100
#!/usr/bin/env playonlinux-bash
# Date : (2015-09-30 20-05)
# Last revision : (2015-10-03 17-05)
# Wine version used : 1.7.50
# Distribution used to test : Ubuntu 15.04
# Author : MangaD
# Depend: vcrun2005, wmp9, quartz, devenum
 
# Changelog
# (2015-10-01) 22:50 - MangaD
#        - Removed d3dx9 from dependencies
# (2015-10-03) 17-05 - MangaD
#        - Added MD5 digest to POL_Download
 
[ "$PLAYONLINUX" = "" ] && exit 0
source "$PLAYONLINUX/lib/sources"
 
# POL
WINEVERSION="1.7.50"
PREFIX="LittleFighter2v20a"
MAINTAINER="MangaD"
 
# Info
TITLE="Little Fighter 2 v2.0a"
VENDOR="Marti Wong &&&& Starsky Wong"
 
FILENAME_EMPIRE="lf2_v20a_Setup.exe"
 
POL_GetSetupImages "http://files.playonlinux.com/resources/setups/$PREFIX/top.png" "http://files.playonlinux.com/resources/setups/$PREFIX/left.png" "$TITLE"
 
POL_SetupWindow_Init
POL_RequiredVersion "4.1.4" || POL_Debug_Fatal "$(eval_gettext '$APPLICATION_TITLE equal or superior to 4.1.4 is required to install $TITLE')"
 
POL_Debug_Init
 
POL_SetupWindow_presentation "$TITLE" "$VENDOR" "$WEBSITE" "$MAINTAINER" "$PREFIX"
 
# Let the user choose between downloading the installer or using an already existing one.
POL_SetupWindow_InstallMethod "DOWNLOAD,LOCAL"
 
if [ "$INSTALL_METHOD" = "LOCAL" ]; then
    cd "$HOME"
    POL_SetupWindow_browse "$(eval_gettext 'Please select the setup file to run.')" "$TITLE" "" "Windows Executables (*.exe)|*.exe;*.EXE"
    FULL_INSTALLER="$APP_ANSWER"
else # DOWNLOAD
    POL_System_TmpCreate "$PREFIX"
     
    # There are two different installers available from two different sources. They both contain the same program.
    POL_SetupWindow_menu "$(eval_gettext 'Select installer to download:')" "$TITLE" "Little Fighter 2 - Official Website~Little Fighter - EMPIRE" "~"
    case "$APP_ANSWER" in
        "Little Fighter 2 - Official Website")
            DOWNLOAD_URL="http://lf2.net/__conduit/0131/LF2_v20a_Install.exe"
            DOWNLOAD_MD5="afd060f4f43601350486947d6d0838f9"
            ;;
        "Little Fighter - EMPIRE")
            DOWNLOAD_MD5="61062f685d3fb2227e354f2d74a1a638"
            ;;
    esac
 
    cd "$POL_System_TmpDir"
 
    POL_Download "$DOWNLOAD_URL" "$DOWNLOAD_MD5"
    DOWNLOAD_FILE="$(basename "$DOWNLOAD_URL")"
     
    case "$APP_ANSWER" in
        "Little Fighter - EMPIRE")
            POL_System_unzip -o "$DOWNLOAD_FILE"
            DOWNLOAD_FILE=$FILENAME_EMPIRE
        ;;
    esac
 
    FULL_INSTALLER="$POL_System_TmpDir/$DOWNLOAD_FILE"
fi
 
# Setting up the prefix
POL_System_SetArch "x86"
POL_Wine_SelectPrefix "$PREFIX"
POL_Wine_PrefixCreate "$WINEVERSION"
 
# Installing Dependencies
POL_Call POL_Install_vcrun2005
# wmp9, quartz and devenum are necessary for the background music to work
POL_Call POL_Install_wmp9
POL_Call POL_Install_quartz
POL_Call POL_Install_devenum
 
POL_Wine_WaitBefore "$TITLE"
POL_Wine "$FULL_INSTALLER"
 
POL_Shortcut "lf2.exe" "$TITLE" "" "" "Game;"
 
if [ "$INSTALL_METHOD" = "DOWNLOAD" ]; then
    # Free some disk space
    POL_System_TmpDelete
fi
 
POL_SetupWindow_Close
exit 0

Edited by MangaD


You can find me on IRC: https://webchat.gamesurge.net/?nick=hfe_guest_??#hfe
MangaD Wednesday 30 September 2015 at 10:29
MangaD

Removed

Edited by MangaD


You can find me on IRC: https://webchat.gamesurge.net/?nick=hfe_guest_??#hfe
petch Wednesday 30 September 2015 at 20:36
petch

Hi,

My quick code review:

1
POL_SetupWindow_browse "Please select the setup file to run." "$TITLE" "" "Windows Executables (*.exe)|*.exe;*.EXE"

All user-oriented messages must support localization mechanism:

http://wiki.playonlinux.com/index.php/Scripting_-_Chapter_10:_Script_Translation

1
2
3
4
5
case "$(basename "$APP_ANSWER")" in
    "$FILENAME_EMPIRE" )
    RUN_MESSAGE=$RUN_MESSAGE_EMPIRE
    ;;
esac

Depending on file names is a bit brittle... oh well

1
2
POL_SetupWindow_wait "Unzipping file..." "$TITLE"
unzip -o "$DOWNLOAD_FILE" || POL_Debug_Fatal "Unzip is required to install $TITLE from Little Fighter - EMPIRE source."

Since at least 4.1.4 you can use POL_System_unzip for that; Admittedly it's not documented at all :(

1
POL_SetupWindow_message "Warning: You must not tick the checkbox \"$RUN_MESSAGE\" when setup is done" "$TITLE"

That's redundant with general PlayOnLinux instructions not to run programs from their installers (in 4.2.9 it's even repeated until the user checks "don't remind me again"), and that will be one more message to translate... :/

I think that's all...

Regards,

Pierre.

petch Wednesday 30 September 2015 at 20:38
petch

Question: In the function
1
POL_SetupWindow_presentation "$TITLE" "Marti Wong and Starsky Wong" "http://www.lf2.net/" "MangaD" "$PREFIX"

I would like "Marti Wong and Starsky Wong" to be "Marti Wong & Starsky Wong". However, the '&' won't show on PlayOnLinux window. Is it possible to do this?

I doubt PlayOnLinux does anything special with &s, more likely it's a wxGTK mechanism (used to denote keyboard shortcuts or something). I'm not sure how to get around it either...

MangaD Wednesday 30 September 2015 at 21:15
MangaD

Thank you very much! I think I have fixed all the mistakes now. smiley


You can find me on IRC: https://webchat.gamesurge.net/?nick=hfe_guest_??#hfe
Andre1996 Wednesday 28 October 2015 at 15:29
Andre1996Anonymous

Hello there, for me, the script is not working very well, when I go to "Game Start", it says "couldn't create art surface" two times and crash ! :'(

Thanks and good job !

Edited by Andre1996

MangaD Friday 19 January 2018 at 14:07
MangaD

Hello, this is my update to the script. I would like to update the description. The changes made are also mentioned, hope they don't break any rules.

(Btw, Andre1996's problem was solved in a previous update I just never replied to him in this forum)

Description:

Little Fighter 2 is a popular Hong Kong freeware PC fighting game and is the sequel to the game Little Fighter (LF1). Little Fighter 2 was created by Marti Wong and Starsky Wong in 1999, and released in a long series of updates.

Known issues:

  • During installation PlayOnLinux may tell Wine crashed. Continue the LF2 installation normally and only click "Next" on POL when LF2 installation is done.
  • At installation phase, sometimes after clicking 'Next' nothing appears on the window. Just click 'Back' and 'Next' again to fix.
  • The 'control settings' screen is a bit buggy, with invisible buttons, but the buttons are there and work.

 

Changes:

  • Changed '&&&&' to '&&' in the VENDOR variable. Previously four '&' were required to make a '&', now only two are required.
  • Optionally download LF2 Lobby, LF2 MultiServer and LF2 Dashboard which are useful programs to complement this game.
  • Optionally download Hero Fighter, which is a game closely related to this game (it is from the same author).
  • Don't use specific wine version. I don't think it is necessary anymore.
  • Replace WMP9 with WMP10, for some reason WMP9 installation was failing for me. During testing it got frozen on installing WMP9 part 1...

 

 

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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
#!/usr/bin/env playonlinux-bash
# Date : (2015-09-30 20-05)
# Last revision : (2018-01-17 15-00)
# Wine version used : 1.7.50
# Distribution used to test : Ubuntu 15.04
# Author : MangaD
# LF2 depend: vcrun2005, wmp10, quartz, devenum
# LF2 Lobby depend: vb6run
 
# Changelog
# (2015-10-01) 22:50 - MangaD
#        - Removed d3dx9 from dependencies
# (2015-10-03) 17-05 - MangaD
#        - Added MD5 digest to POL_Download
# (2015-11-18) 01-25 - MangaD
#        - Added minimum VRAM required
# (2018-01-17) - MangaD
#        - Changed '&&&&' to '&&' in the VENDOR due to changes in POL.
#        - Optionally download LF2 Lobby, LF2 MultiServer and LF2 Dashboard
#        - Optionally download Hero Fighter
#        - Don't use specific wine version
#        - Replace WMP9 with WMP10, for some reason WMP9 installation was failing for me
 
[ "$PLAYONLINUX" = "" ] && exit 0
source "$PLAYONLINUX/lib/sources"
 
# POL
#WINEVERSION="1.7.50"
PREFIX="LittleFighter2v20a"
MAINTAINER="MangaD"
GAME_VMS="384"
 
# Info
TITLE="Little Fighter 2 v2.0a"
VENDOR="Marti Wong && Starsky Wong"
 
FILENAME_EMPIRE="lf2_v20a_Setup.exe"
 
POL_GetSetupImages "http://files.playonlinux.com/resources/setups/$PREFIX/top.png" "http://files.playonlinux.com/resources/setups/$PREFIX/left.png" "$TITLE"
 
POL_SetupWindow_Init
POL_RequiredVersion "4.1.4" || POL_Debug_Fatal "$(eval_gettext '$APPLICATION_TITLE equal or superior to 4.1.4 is required to install $TITLE')"
 
POL_Debug_Init
 
POL_SetupWindow_presentation "$TITLE" "$VENDOR" "$WEBSITE" "$MAINTAINER" "$PREFIX"
 
# Let the user choose between downloading the installer or using an already existing one.
POL_SetupWindow_InstallMethod "DOWNLOAD,LOCAL"
 
if [ "$INSTALL_METHOD" = "LOCAL" ]; then
    cd "$HOME"
    POL_SetupWindow_browse "$(eval_gettext 'Please select the setup file to run.')" "$TITLE" "" "Windows Executables (*.exe)|*.exe;*.EXE"
    FULL_INSTALLER="$APP_ANSWER"
else # DOWNLOAD
    POL_System_TmpCreate "$PREFIX"
 
    # There are two different installers available from two different sources. They both contain the same program.
    POL_SetupWindow_menu "$(eval_gettext 'Select installer to download:')" "$TITLE" "Little Fighter 2 - Official Website~Little Fighter - EMPIRE" "~"
    case "$APP_ANSWER" in
        "Little Fighter 2 - Official Website")
            DOWNLOAD_URL="http://lf2.net/__conduit/0131/LF2_v20a_Install.exe"
            DOWNLOAD_MD5="afd060f4f43601350486947d6d0838f9"
            ;;
        "Little Fighter - EMPIRE")
            DOWNLOAD_MD5="61062f685d3fb2227e354f2d74a1a638"
            ;;
    esac
 
    cd "$POL_System_TmpDir"
 
    POL_Download "$DOWNLOAD_URL" "$DOWNLOAD_MD5"
    DOWNLOAD_FILE="$(basename "$DOWNLOAD_URL")"
 
    case "$APP_ANSWER" in
        "Little Fighter - EMPIRE")
            POL_SetupWindow_wait "$(eval_gettext 'Unzipping archive.')" "$TITLE"
            POL_System_unzip -o "$DOWNLOAD_FILE"
            DOWNLOAD_FILE=$FILENAME_EMPIRE
        ;;
    esac
 
    FULL_INSTALLER="$POL_System_TmpDir/$DOWNLOAD_FILE"
fi
 
# Setting up the prefix
POL_System_SetArch "x86"
POL_Wine_SelectPrefix "$PREFIX"
POL_Wine_PrefixCreate #"$WINEVERSION"
 
# Asking about memory size of graphic card
#POL_SetupWindow_message "$(eval_gettext 'Warning: In the next question answer "$GAME_VMS" or above if you don't know.')" "$TITLE"
POL_SetupWindow_VMS "$GAME_VMS"
 
# Installing Dependencies
POL_Call POL_Install_vcrun2005
# wmp10, quartz and devenum are necessary for the background music to work
POL_Call POL_Install_wmp10
POL_Call POL_Install_quartz
POL_Call POL_Install_devenum
 
POL_Wine_WaitBefore "$TITLE"
POL_Wine "$FULL_INSTALLER"
 
POL_Shortcut "lf2.exe" "$TITLE" "" "" "Game;"
 
POL_SetupWindow_question "$(eval_gettext 'Would you also like to download and install LF2 Lobby, LF2 Multiserver 2.0 and LF2 Dashboard?')" "$(eval_gettext 'Download LF2 extras?')"
if [ "$APP_ANSWER" = "TRUE" ]; then
 
    if [ "$(basename "$FULL_INSTALLER")" = "LF2_v20a_Install.exe" ]
    then
        DIRECTORY="LittleFighter"
    else
        DIRECTORY="LittleFighter2/LF2_v2.0a"
    fi
 
    # Download LF2 Lobby
    cd "$WINEPREFIX"
    DOWNLOAD_MD5="3d1faf8321c4143dc161e026ee7379ab"
    DOWNLOAD_FILE="LF2Lobby0.1.4.rar"
    EXE_FILE="LF2Lobby0.1.4.exe"
    POL_Download "$DOWNLOAD_URL" "$DOWNLOAD_MD5"
    POL_SetupWindow_wait "$(eval_gettext 'Decompressing archive.')" "$TITLE"
    POL_System_unrar x -o+ "$DOWNLOAD_FILE"
    rm -f "$WINEPREFIX/$DOWNLOAD_FILE"
    mv "$WINEPREFIX/$EXE_FILE" "$WINEPREFIX/drive_c/Program Files/$DIRECTORY"
    POL_Shortcut "$EXE_FILE" "$(basename "$EXE_FILE" .exe)" "" "" "Game;"
    # vb6run is necessary for LF2 Lobby to work
    POL_Call POL_Install_vbrun6
 
    # Download LF2 MultiServer
    cd "$WINEPREFIX"
    DOWNLOAD_MD5="0eb8a92dbbdf5c8c2590612713d9d54b"
    DOWNLOAD_FILE="LF2MultiServer_v2.0.rar"
    EXE_FILE="LF2 Multi Server v2.0.exe"
    DLL_FILE="MultiPlugin/ddraw.dll"
    POL_Download "$DOWNLOAD_URL" "$DOWNLOAD_MD5"
    POL_SetupWindow_wait "$(eval_gettext 'Decompressing archive.')" "$TITLE"
    POL_System_unrar x -o+ "$DOWNLOAD_FILE"
    mv "$WINEPREFIX/$EXE_FILE" "$WINEPREFIX/drive_c/Program Files/$DIRECTORY"
    mv "$WINEPREFIX/$DLL_FILE" "$WINEPREFIX/drive_c/Program Files/$DIRECTORY"
    rm -rf "$WINEPREFIX/$DOWNLOAD_FILE" "$WINEPREFIX/MultiPlugin" "$WINEPREFIX/Readme.txt"
    POL_Shortcut "$EXE_FILE" "$(basename "$EXE_FILE" .exe)" "" "" "Game;"
    # ddraw is necessary for LF2 MultiServer and AI addons
    POL_Wine_OverrideDLL "native,builtin" "ddraw"
 
    # Download LF2 Dashboard
    cd "$WINEPREFIX"
    DOWNLOAD_MD5="2ab48968c17e1fbcdbb664ae8a900207"
    EXE_FILE="LF2Dashboard.exe"
    POL_Download "$DOWNLOAD_URL" "$DOWNLOAD_MD5"
    mv "$WINEPREFIX/$EXE_FILE" "$WINEPREFIX/drive_c/Program Files/$DIRECTORY"
    POL_Shortcut "$EXE_FILE" "$(basename "$EXE_FILE" .exe)" "" "" "Game;"
fi
 
POL_SetupWindow_question "$(eval_gettext 'Would you also like to download and install Hero Fighter?')" "$(eval_gettext 'Download Hero Fighter?')"
if [ "$APP_ANSWER" = "TRUE" ]; then
    # Download HF
    cd "$WINEPREFIX"
    DOWNLOAD_MD5="c0147da224e95901377e77f284d6f6f8"
    DOWNLOAD_FILE="HFv0.7.zip"
    EXE_FILE="HF.exe"
    POL_Download "$DOWNLOAD_URL" "$DOWNLOAD_MD5"
    POL_SetupWindow_wait "$(eval_gettext 'Unzipping archive.')" "$TITLE"
    POL_System_unzip -o "$DOWNLOAD_FILE"
    rm -f "$WINEPREFIX/$DOWNLOAD_FILE"
    mkdir "$WINEPREFIX/drive_c/Program Files/HeroFighter"
    mv "$WINEPREFIX/$EXE_FILE" "$WINEPREFIX/drive_c/Program Files/HeroFighter"
    mv "$WINEPREFIX/RoomServer.exe" "$WINEPREFIX/drive_c/Program Files/HeroFighter"
    POL_Shortcut "$EXE_FILE" "Hero Fighter v0.7" "" "" "Game;"
fi
 
if [ "$INSTALL_METHOD" = "DOWNLOAD" ]; then
    # Free some disk space
    POL_System_TmpDelete
fi
 
POL_SetupWindow_Close
exit 0

Edited by MangaD


You can find me on IRC: https://webchat.gamesurge.net/?nick=hfe_guest_??#hfe
MangaD Thursday 13 September 2018 at 10:06
MangaD

Hello. My program is having a problem since at least the start of this year. I install vcrun2005 and wmp9 but they don't seem to be installed because I go to the wine configuration I don't see DLL overrides there nor the Windows Media Player program installed.
 

This is the updated 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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
#!/usr/bin/env playonlinux-bash
 
# Date : (2015-09-30 20-05)
 
# Last revision : (2018-01-19 12-00)
 
# Distribution used to test : Ubuntu 15.04
 
# Author : MangaD
 
# LF2 depend: vcrun2005, wmp9, quartz, devenum
 
# LF2 Lobby depend: vb6run
 
 
# Changelog
 
# (2015-10-01) 22:50 - MangaD
 
#        - Removed d3dx9 from dependencies
 
# (2015-10-03) 17-05 - MangaD
 
#        - Added MD5 digest to POL_Download
 
# (2015-11-18) 01-25 - MangaD
 
#        - Added minimum VRAM required
 
# (2018-01-17) - MangaD
 
#        - Changed '&&&&' to '&&' in the VENDOR due to changes in POL.
 
#        - Optionally download LF2 Lobby, LF2 MultiServer and LF2 Dashboard
 
#        - Optionally download Hero Fighter
 
#        - Don't use specific wine version
 
#        - Replace WMP9 with WMP10, for some reason WMP9 installation was failing for me
 
# (2018-01-19) - MangaD
 
#        - Added $WINEPREFIX in rm commands
 
#        - Added POL_SetupWindow_wait before unzip/untar
 
# (2018-09-13) - MangaD
 
#        - Replace WMP10 with WMP9, the reason WMP9 installation was failing is because POL was having issues
 
 
 
 
[ "$PLAYONLINUX" = "" ] && exit 0
 
source "$PLAYONLINUX/lib/sources"
 
 
# POL
 
#WINEVERSION="1.7.50"
 
PREFIX="LittleFighter2v20a"
 
MAINTAINER="MangaD"
 
GAME_VMS="384"
 
 
# Info
 
TITLE="Little Fighter 2 v2.0a"
 
VENDOR="Marti Wong && Starsky Wong"
 
 
 
FILENAME_EMPIRE="lf2_v20a_Setup.exe"
 
 
POL_GetSetupImages "http://files.playonlinux.com/resources/setups/$PREFIX/top.png" "http://files.playonlinux.com/resources/setups/$PREFIX/left.png" "$TITLE"
 
 
POL_SetupWindow_Init
 
POL_RequiredVersion "4.1.4" || POL_Debug_Fatal "$(eval_gettext '$APPLICATION_TITLE equal or superior to 4.1.4 is required to install $TITLE')"
 
 
POL_Debug_Init
 
 
POL_SetupWindow_presentation "$TITLE" "$VENDOR" "$WEBSITE" "$MAINTAINER" "$PREFIX"
 
 
# Let the user choose between downloading the installer or using an already existing one.
 
POL_SetupWindow_InstallMethod "DOWNLOAD,LOCAL"
 
 
if [ "$INSTALL_METHOD" = "LOCAL" ]; then
 
cd "$HOME"
 
POL_SetupWindow_browse "$(eval_gettext 'Please select the setup file to run.')" "$TITLE" "" "Windows Executables (*.exe)|*.exe;*.EXE"
 
FULL_INSTALLER="$APP_ANSWER"
 
else # DOWNLOAD
 
POL_System_TmpCreate "$PREFIX"
 
 
# There are two different installers available from two different sources. They both contain the same program.
 
POL_SetupWindow_menu "$(eval_gettext 'Select installer to download:')" "$TITLE" "Little Fighter 2 - Official Website~Little Fighter - EMPIRE" "~"
 
case "$APP_ANSWER" in
 
"Little Fighter 2 - Official Website")
 
 
DOWNLOAD_MD5="afd060f4f43601350486947d6d0838f9"
 
;;
 
"Little Fighter - EMPIRE")
 
 
DOWNLOAD_MD5="61062f685d3fb2227e354f2d74a1a638"
 
;;
 
esac
 
 
cd "$POL_System_TmpDir"
 
 
POL_Download "$DOWNLOAD_URL" "$DOWNLOAD_MD5"
 
DOWNLOAD_FILE="$(basename "$DOWNLOAD_URL")"
 
 
case "$APP_ANSWER" in
 
"Little Fighter - EMPIRE")
 
POL_SetupWindow_wait "$(eval_gettext 'Unzipping archive.')" "$TITLE"
 
POL_System_unzip -o "$DOWNLOAD_FILE"
 
DOWNLOAD_FILE=$FILENAME_EMPIRE
 
;;
 
esac
 
 
FULL_INSTALLER="$POL_System_TmpDir/$DOWNLOAD_FILE"
 
fi
 
 
# Setting up the prefix
 
POL_System_SetArch "x86"
 
POL_Wine_SelectPrefix "$PREFIX"
 
POL_Wine_PrefixCreate #"$WINEVERSION"
 
 
# Asking about memory size of graphic card
 
#POL_SetupWindow_message "$(eval_gettext 'Warning: In the next question answer "$GAME_VMS" or above if you don't know.')" "$TITLE"
 
POL_SetupWindow_VMS "$GAME_VMS"
 
 
# Installing Dependencies
 
POL_Call POL_Install_vcrun2005
 
# wmp9, quartz and devenum are necessary for the background music to work
 
POL_Call POL_Install_wmp9
 
POL_Call POL_Install_quartz
 
POL_Call POL_Install_devenum
 
 
POL_Wine_WaitBefore "$TITLE"
 
POL_Wine "$FULL_INSTALLER"
 
 
POL_Shortcut "lf2.exe" "$TITLE" "" "" "Game;"
 
 
POL_SetupWindow_question "$(eval_gettext 'Would you also like to download and install LF2 Lobby, LF2 Multiserver 2.0 and LF2 Dashboard?')" "$(eval_gettext 'Download LF2 extras?')"
 
if [ "$APP_ANSWER" = "TRUE" ]; then
 
 
if [ "$(basename "$FULL_INSTALLER")" = "LF2_v20a_Install.exe" ]
 
then
 
DIRECTORY="LittleFighter"
 
else
 
DIRECTORY="LittleFighter2/LF2_v2.0a"
 
fi
 
 
# Download LF2 Lobby
 
cd "$WINEPREFIX"
 
 
DOWNLOAD_MD5="3d1faf8321c4143dc161e026ee7379ab"
 
DOWNLOAD_FILE="LF2Lobby0.1.4.rar"
 
EXE_FILE="LF2Lobby0.1.4.exe"
 
POL_Download "$DOWNLOAD_URL" "$DOWNLOAD_MD5"
 
POL_SetupWindow_wait "$(eval_gettext 'Decompressing archive.')" "$TITLE"
 
POL_System_unrar x -o+ "$DOWNLOAD_FILE"
 
rm -f "$WINEPREFIX/$DOWNLOAD_FILE"
 
mv "$WINEPREFIX/$EXE_FILE" "$WINEPREFIX/drive_c/Program Files/$DIRECTORY"
 
POL_Shortcut "$EXE_FILE" "$(basename "$EXE_FILE" .exe)" "" "" "Game;"
 
# vb6run is necessary for LF2 Lobby to work
 
POL_Call POL_Install_vbrun6
 
 
# Download LF2 MultiServer
 
cd "$WINEPREFIX"
 
 
DOWNLOAD_MD5="0eb8a92dbbdf5c8c2590612713d9d54b"
 
DOWNLOAD_FILE="LF2MultiServer_v2.0.rar"
 
EXE_FILE="LF2 Multi Server v2.0.exe"
 
DLL_FILE="MultiPlugin/ddraw.dll"
 
POL_Download "$DOWNLOAD_URL" "$DOWNLOAD_MD5"
 
POL_SetupWindow_wait "$(eval_gettext 'Decompressing archive.')" "$TITLE"
 
POL_System_unrar x -o+ "$DOWNLOAD_FILE"
 
mv "$WINEPREFIX/$EXE_FILE" "$WINEPREFIX/drive_c/Program Files/$DIRECTORY"
 
mv "$WINEPREFIX/$DLL_FILE" "$WINEPREFIX/drive_c/Program Files/$DIRECTORY"
 
rm -rf "$WINEPREFIX/$DOWNLOAD_FILE" "$WINEPREFIX/MultiPlugin" "$WINEPREFIX/Readme.txt"
 
POL_Shortcut "$EXE_FILE" "$(basename "$EXE_FILE" .exe)" "" "" "Game;"
 
# ddraw is necessary for LF2 MultiServer and AI addons
 
POL_Wine_OverrideDLL "native,builtin" "ddraw"
 
 
# Download LF2 Dashboard
 
cd "$WINEPREFIX"
 
 
DOWNLOAD_MD5="2ab48968c17e1fbcdbb664ae8a900207"
 
EXE_FILE="LF2Dashboard.exe"
 
POL_Download "$DOWNLOAD_URL" "$DOWNLOAD_MD5"
 
mv "$WINEPREFIX/$EXE_FILE" "$WINEPREFIX/drive_c/Program Files/$DIRECTORY"
 
POL_Shortcut "$EXE_FILE" "$(basename "$EXE_FILE" .exe)" "" "" "Game;"
 
fi
 
 
POL_SetupWindow_question "$(eval_gettext 'Would you also like to download and install Hero Fighter?')" "$(eval_gettext 'Download Hero Fighter?')"
 
if [ "$APP_ANSWER" = "TRUE" ]; then
 
# Download HF
 
cd "$WINEPREFIX"
 
 
DOWNLOAD_MD5="c0147da224e95901377e77f284d6f6f8"
 
DOWNLOAD_FILE="HFv0.7.zip"
 
EXE_FILE="HF.exe"
 
POL_Download "$DOWNLOAD_URL" "$DOWNLOAD_MD5"
 
POL_SetupWindow_wait "$(eval_gettext 'Unzipping archive.')" "$TITLE"
 
POL_System_unzip -o "$DOWNLOAD_FILE"
 
rm -f "$WINEPREFIX/$DOWNLOAD_FILE"
 
mkdir "$WINEPREFIX/drive_c/Program Files/HeroFighter"
 
mv "$WINEPREFIX/$EXE_FILE" "$WINEPREFIX/drive_c/Program Files/HeroFighter"
 
mv "$WINEPREFIX/RoomServer.exe" "$WINEPREFIX/drive_c/Program Files/HeroFighter"
 
POL_Shortcut "$EXE_FILE" "Hero Fighter v0.7" "" "" "Game;"
 
fi
 
 
if [ "$INSTALL_METHOD" = "DOWNLOAD" ]; then
 
# Free some disk space
 
POL_System_TmpDelete
 
fi
 
 
POL_SetupWindow_Close
 
exit 0

You can find me on IRC: https://webchat.gamesurge.net/?nick=hfe_guest_??#hfe

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