Forums

[Script] Little Fighter 2 v2.0a

Auteur Réponses
MangaD Mercredi 30 September 2015 à 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:

#!/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"
WEBSITE="http://www.lf2.net/"

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_URL="http://www.lf-empire.de/downloads/offversions/LF2_v2.0a.zip"
            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

Edité par MangaD


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

Removed

Edité par MangaD


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

Hi,

My quick code review:

    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

    case "$(basename "$APP_ANSWER")" in
        "$FILENAME_EMPIRE" )
        RUN_MESSAGE=$RUN_MESSAGE_EMPIRE
        ;;
    esac

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

            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 :(

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 Mercredi 30 September 2015 à 20:38
petch

Question: In the function
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 Mercredi 30 September 2015 à 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 Mercredi 28 Octobre 2015 à 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 !

Edité par Andre1996

MangaD Vendredi 19 Janvier 2018 à 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...

 

 

#!/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"
WEBSITE="http://www.lf2.net/"

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_URL="http://www.lf-empire.de/downloads/offversions/LF2_v2.0a.zip"
            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_URL="http://www.lf2lobby.com/downloads/LF2Lobby0.1.4.rar"
    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_URL="http://lf2.co.il/downloads/LF2MultiServer_v2.0.rar"
    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_URL="http://herofighter-empire.com/downloads/LF2Linux/LF2Dashboard.exe"
    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_URL="http://herofighter-empire.com/downloads/LF2Linux/HFv0.7.zip"
    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

Edité par MangaD


You can find me on IRC: https://webchat.gamesurge.net/?nick=hfe_guest_??#hfe
MangaD Jeudi 13 September 2018 à 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:

#!/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"

WEBSITE="http://www.lf2.net/"


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_URL="http://www.lf-empire.de/downloads/offversions/LF2_v2.0a.zip"

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_URL="http://www.lf2lobby.com/downloads/LF2Lobby0.1.4.rar"

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_URL="http://lf2.co.il/downloads/LF2MultiServer_v2.0.rar"

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_URL="http://herofighter-empire.com/downloads/LF2Linux/LF2Dashboard.exe"

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_URL="http://herofighter-empire.com/downloads/LF2Linux/HFv0.7.zip"

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