The forum

[Script] FAForever

Script to get the FAForever lobby running

Author Replies
Walkman Saturday 9 July 2016 at 20:15
Walkman

I've written a script to get the FAForever lobby running that also installs requirements of the actual game (Forged Alliance), so after installing this you should be able to run FA in the wineprefix generated.

The script installs msvc100 and d3dx9, and adds an override for msvcr100 to builtin,native (lobby crashes otherwise)

It then installs the official Microsoft Visual C++ 2010 Redistributable Package (x86) (vcredist_x86.exe) without which the lobby tells you that it isn't installed, then closes.

Then the lobby is installed, shortcut created and script exit.

The script is also hosted on GitHub, and you will also see in the repo's issues that in-game sound doesn't work.

#!/usr/bin/env playonlinux-bash
# Date : (2016-07-09 01-08)
# Last revision : (2016-07-09 02-47)
# Wine version used : 1.9.13
# Distribution used to test : Linux Mint 17.2 Rafaela
# Author : Walkman
[ "$PLAYONLINUX" = "" ] && exit 0
source "$PLAYONLINUX/lib/sources"

TITLE="FAForever"
PREFIX="FAForever"

POL_SetupWindow_Init
POL_Debug_Init

POL_SetupWindow_presentation "$TITLE" "github.com/orgs/FAForever/people" "faforever.com" "Walkman" "$PREFIX"
POL_System_TmpCreate "$PREFIX"
    cd "$POL_System_TmpDir"
    POL_Download "https://download.microsoft.com/download/5/B/C/5BC5DBB3-652D-4DCE-B14A-475AB85EEF6E/vcredist_x86.exe" "b88228d5fef4b6dc019d69d4471f23ec"
    POL_Download "http://content.faforever.com/Forged.Alliance.Forever-0.11.58-win32.msi" "52c9dc652264ef9c97614c518658acfc"

    POL_Wine_SelectPrefix "$PREFIX"
    POL_Wine_PrefixCreate "1.9.13"

    POL_Call POL_Install_msvc100
    POL_Wine_OverrideDLL "builtin,native" "msvcr100"
    POL_Call POL_Install_d3dx9

    POL_SetupWindow_wait "Installing Microsoft Visual C++ 2010 Redistributable Package (x86)..." "$TITLE"
    POL_Wine "vcredist_x86.exe"

    POL_SetupWindow_wait "Installing FAF lobby..." "$TITLE"
    POL_Wine msiexec /i "Forged.Alliance.Forever-0.11.58-win32.msi"
POL_System_TmpDelete

POL_Shortcut "FAForever.exe" "$TITLE"

POL_SetupWindow_Close
exit

Edited by Walkman

Walkman Sunday 10 July 2016 at 2:40
Walkman

I've made a few changes already, changelog here

#!/usr/bin/env playonlinux-bash
# Date : (2016-07-09 01-08)
# Last revision : (2016-07-10 00-19)
# Wine version used : 1.9.13
# Distribution used to test : Linux Mint 17.2 Rafaela
# Author : Walkman
[ "$PLAYONLINUX" = "" ] && exit 0
source "$PLAYONLINUX/lib/sources"

TITLE="FAForever"
PREFIX="FAForever"

IMAGEURLS="https://raw.githubusercontent.com/Walkman100/POL_FAForever/master"
POL_GetSetupImages "$IMAGEURLS/top.png" "$IMAGEURLS/left.png" "$TITLE"
POL_SetupWindow_Init
POL_Debug_Init

POL_SetupWindow_presentation "$TITLE" "github.com/orgs/FAForever/people" "faforever.com" "Walkman" "$PREFIX"
POL_System_TmpCreate "$PREFIX"
    cd "$POL_System_TmpDir"
    POL_Download "https://download.microsoft.com/download/5/B/C/5BC5DBB3-652D-4DCE-B14A-475AB85EEF6E/vcredist_x86.exe" "b88228d5fef4b6dc019d69d4471f23ec"
    POL_Download "http://content.faforever.com/Forged.Alliance.Forever-0.11.58-win32.msi" "52c9dc652264ef9c97614c518658acfc"

    POL_Wine_SelectPrefix "$PREFIX"
    POL_Wine_PrefixCreate "1.9.13"

    POL_SetupWindow_wait "Installing Microsoft Visual C++ 2010 Redistributable Package (x86)..." "$TITLE"
    POL_Wine "vcredist_x86.exe"

    POL_SetupWindow_wait "Installing FAF lobby..." "$TITLE"
    POL_Wine msiexec /i "Forged.Alliance.Forever-0.11.58-win32.msi" /q

    POL_Call POL_Install_d3dx9 # required for game to run
POL_System_TmpDelete

POL_Shortcut "FAForever.exe" "$TITLE"

POL_SetupWindow_Close
exit

Just for reference, I'm installing VCP2010 manually because with the wine version installed the lobby crashes with this message:

Lobby Crash Message

Walkman Tuesday 26 July 2016 at 1:33
Walkman

New changes, log here.

#!/usr/bin/env playonlinux-bash
# Date : (2016-07-09 01-08)
# Last revision : (2016-07-26 01-07)
# Wine version used : 1.9.13, 1.9.15
# Distribution used to test : Linux Mint 17.2 Rafaela
# Author : Walkman
[ "$PLAYONLINUX" = "" ] && exit 0
source "$PLAYONLINUX/lib/sources"

TITLE="FAForever"
PREFIX="FAForever"

IMAGEURLS="https://raw.githubusercontent.com/Walkman100/POL_FAForever/master"
POL_GetSetupImages "$IMAGEURLS/top.png" "$IMAGEURLS/left.png" "$TITLE"
POL_SetupWindow_Init
POL_Debug_Init

POL_SetupWindow_presentation "$TITLE" "github.com/orgs/FAForever/people" "faforever.com" "Walkman" "$PREFIX"
POL_System_TmpCreate "$PREFIX"
    cd "$POL_System_TmpDir"
    POL_Download "https://download.microsoft.com/download/5/B/C/5BC5DBB3-652D-4DCE-B14A-475AB85EEF6E/vcredist_x86.exe" "b88228d5fef4b6dc019d69d4471f23ec"
    POL_Download "http://content.faforever.com/Forged.Alliance.Forever-0.11.60-win32.msi" "ae3e27708989aa2bc6e6b2d18cefe7ad"

    POL_Wine_SelectPrefix "$PREFIX"
    POL_Wine_PrefixCreate "1.9.15"

    cd "$POL_System_TmpDir"
    POL_SetupWindow_wait "Installing Microsoft Visual C++ 2010 Redistributable Package (x86)..." "$TITLE"
    POL_Wine "vcredist_x86.exe"

    POL_SetupWindow_wait "Installing FAF lobby..." "$TITLE"
    POL_Wine msiexec /i "Forged.Alliance.Forever-0.11.60-win32.msi" /q

    POL_Call POL_Install_d3dx9 # required for game to run
POL_System_TmpDelete

POL_Shortcut "FAForever.exe" "$TITLE"

POL_SetupWindow_Close
exit
Walkman Tuesday 2 August 2016 at 14:12
Walkman

Update: Fixed Game sound, made VCRedist install with /passive flag

#!/usr/bin/env playonlinux-bash
# Date : (2016-07-09 01-08)
# Last revision : (2016-08-02 12-12)
# Wine version used : 1.9.13, 1.9.15
# Distribution used to test : Linux Mint 17.2 Rafaela
# Author : Walkman
[ "$PLAYONLINUX" = "" ] && exit 0
source "$PLAYONLINUX/lib/sources"

TITLE="FAForever"
PREFIX="FAForever"

IMAGEURLS="https://raw.githubusercontent.com/Walkman100/POL_FAForever/master"
POL_GetSetupImages "$IMAGEURLS/top.png" "$IMAGEURLS/left.png" "$TITLE"
POL_SetupWindow_Init
POL_Debug_Init

POL_SetupWindow_presentation "$TITLE" "github.com/orgs/FAForever/people" "faforever.com" "Walkman" "$PREFIX"
POL_System_TmpCreate "$PREFIX"
    cd "$POL_System_TmpDir"
    POL_Download "https://download.microsoft.com/download/5/B/C/5BC5DBB3-652D-4DCE-B14A-475AB85EEF6E/vcredist_x86.exe" "b88228d5fef4b6dc019d69d4471f23ec"
    POL_Download "http://content.faforever.com/Forged.Alliance.Forever-0.11.60-win32.msi" "ae3e27708989aa2bc6e6b2d18cefe7ad"

    POL_Wine_SelectPrefix "$PREFIX"
    POL_Wine_PrefixCreate "1.9.15"

    cd "$POL_System_TmpDir"
    POL_SetupWindow_wait "Installing Microsoft Visual C++ 2010 Redistributable Package (x86)..." "$TITLE"
    POL_Wine "vcredist_x86.exe" /passive

    POL_SetupWindow_wait "Installing FAF lobby..." "$TITLE"
    POL_Wine msiexec /i "Forged.Alliance.Forever-0.11.60-win32.msi" /q

    POL_Call POL_Install_d3dx9 # required for game to run
    POL_Call POL_Install_directx9 # required for game audio
POL_System_TmpDelete

POL_Shortcut "FAForever.exe" "$TITLE"

POL_Setup