Linux install script (Lutris)

3

There should've been a banner picture here

Hey there folks!

Since FAF works very well under Linux for a while now I decided to put some effort into making it more easily available for people, since there was no Lutris install script yet.


Install now
You can also find it on lutris.net by clicking "Show unpublished installers" (Steam + Lobby version).


What it does:

  • Downloads Lobby + assets
  • Setups Lobby independent from your system Java (since it needs the older SDK 15)
  • Guides you through Steam setup & fetches the 'run' file
  • Preconfigures your Lobby correctly
  • Gives you the option to put your lobby data inside the install folder instead of /home
  • Ready to Play!

Tested successfully on

✔ Ubuntu 20.04 LTS
✔ Pop!_OS 20.10
✔ Linux Mint 20.1 "Ulyssa"
✔ Fedora 34 Workstation
✔ OpenSUSE Tumbleweed
✔ MX Linux 19.4.1-ahs
✔ ElementaryOS 5.1
✔ Manjaro 21.0.5 (Gnome)
✔ Debian 10 Buster
⚠ Manjaro 21.0.5 (Xfce)
⚠ Arch Linux

⚠ Unfortunately as of now there is a bug where either the environment variable is ignored or he's reporting missing symbols. In this case you can start the lobby manually by going into the lobby folder in a terminal and running:

INSTALL4J_JAVA_HOME=/path/to/game/folder/openjdk15/ ./downlords-faf-client

RIght now it downloads the Lobby 1.4.6 as well as a prepared client.prefs file from a VPS generously set up by misthafalls (thanks dude). Main reason for this is github not giving you download speeds beyond 200kb/s when downloading outside of a browser.

In the long run it would probably look way more professional if the script could download the lobby directly off of faforever.com, as well as always get the newest version. To do the latter it'd be necessary to add a CLI command to the lobby though, telling it to dump a client.prefs file without actually starting.

Please ignore the fact I screwed up the line breaks at one point (yaml....), it should fix itself once the mods greenlight the newest draft. 🙃

You can download the .yaml and banner file here.

Feedback is much appreciated! 😊

0

@Sereiya nice just as a heads up 1.4.4 is now Offical and not a Release Candidate

0

While working on the script for Retail I noticed FA is on gog now too, said not to be compatible to FAF (challenge accepted?). Can someone confirm?

@rowey said in Linux install script (Lutris):

@Sereiya nice just as a heads up 1.4.4 is now Offical and not a Release Candidate

Good to know, thanks.

0

FA on GOG is not supported due to the fact that we have no way to confirm you owning a copy of the game on gog.
Which is now done by steamlinking your faf account so that we can avoid all kinds of trouble from SE.

Basically there is nothing wrong with the GOG version itself, the problem lies in the fact that we can't know if you really own the game while it's easily done through steam.

0

@randomwheelchair Oh, right, there was something.... does that mean the Retail version is now also blocked due to missing checks?

0

As far as I'm aware all retail versions can be activated on steam to receive gold version of SC and FA.
That's also how I got one of my steam copies.

0

Correct the retail code if redemed on steam will give you a gold eddition. and GOG has no way for us to Validate if you own the game.

1

I've tested out a few distros with the script to make sure FAF works stable on all flavours of Linux using it.

✔ Ubuntu 20.04 LTS
✔ Pop!_OS 20.10
✔ Linux Mint 20.1 "Ulyssa"
✔ Fedora 34 Workstation
✔ OpenSUSE Tumbleweed
✔ MX Linux 19.4.1-ahs
✔ ElementaryOS 5.1
✔ Manjaro 21.0.5
✔ Debian 10 Buster
⚠ Arch Linux

The mentioned bug on Arch Linux may be a sole problem of me missing a specific package (classic Arch problem I assume). Someone may confirm and tell which one it was for FAF to recognize Env vars so it can be fixed. Since Manjaro works fine it probably is just missing configuration on my side. ☺

0

https://lutris.net/games/forged-alliance-forever-steam-latest/installer/edit
made my own attempt which looks less hacky and is working on arch

0

You could edit the wiki and make an instruction there on how to do your thing https://wiki.faforever.com/index.php?title=Setting_Up_FAF_Linux

0

@axel12 Already done here.

0

@ovo Your install script doesn't work, throws Error 17 "File already exists" after looking for the run file. This isn't the only problem though.

Other things I noticed:

  • You're getting the files via wget instead of using Lutris' in-built file download function. Works, but isn't beautiful since you skip the option to insert the files yourself
  • Instead of downloading the FAF client, you're downloading the Java 15 SDK twice
  • The Steam arguments you give are missing %command%
  • Having the user manually looking for the run file is unnecessary, it will always spawn in /tmp/proton-$USER/
  • You made the same error like me with line breaks 😉
  • The user isn't told to set a specific Proton version. This can cause later problems like desyncs, as described here.
  • You don't tell the user that SteamPlay has to be activated for every title in order to even install Forged Alliance. In my opinion missing information like this is extremely frustrating for new users.
  • Your client.prefs file will be rejected by the FAF client since the lobby isn't written to simply add missing entries, but expect them to be already present. That's the reason I uploaded a prepared one for my script which I edit using sed, so the client accepts the file.
  • You do not set the preferences file location, therefore FAF lobby will look for it in ~/.wine/ and create a new one there, ignoring your FA settings as well as forgetting all settings every time a user might deletes his standard wine prefix.
  • Not a necessity, but I find the option to have all files in your defined game folder quite important for large games so your /home won't get cluttered. In the end FAF will save literally everything in ~/.faforever/

Sorry, but as it is, your script is absolutely non-working on any machine and riddled with problems.

0

@sereiya i've posted a link to edit script, since new drafts wont appear before lutris team moderation, take a look into it

You're getting the files via wget instead of using Lutris' in-built file download function. Works, but isn't beautiful since you skip the option to insert the files yourself

can be done for JRE, but i guess only the latest version of FAF should be aviable, especially after 1.4.4

Having the user manually looking for the run file is unnecessary, it will always spawn in /tmp/proton-$USER/

sounds reasonable, used this one just to show instruction dialog
may just use input_menu

The user isn't told to set a specific Proton version. This can cause later problems like desyncs, as described here.

Didn't checked, but haven't latest proton already got rid if most of FA errors?
https://www.winehq.org/announce/6.7
That one fixed the last bug for FA, may not be an issue for future versions of proton.

You don't tell the user that SteamPlay has to be activated for every title in order to even install Forged Alliance. In my opinion missing information like this is extremely frustrating for new users.

Agree

Your client.prefs file will be rejected by the FAF client since the lobby isn't written to simply add missing entries, but expect them to be already present. That's the reason I uploaded a prepared one for my script which I edit using sed, so the client accepts the file.

Works 4 me👍
Will look into it

You do not set the preferences file location, therefore FAF lobby will look for it in ~/.wine/ and create a new one there, ignoring your FA settings as well as forgetting all settings every time a user might deletes his standard wine prefix.

Uuugh, but it doesnt even uses standart wine

Not a necessity, but I find the option to have all files in your defined game folder quite important for large games so your /home won't get cluttered. In the end FAF will save literally everything in ~/.faforever/

Agree, can it be done just with a symlink?

UPD: ok, zero brain moment, just realized only i have access to edit page

0

@ovo I've looked into it, but every iteration of the draft shows the same bugged version. I encounteres some similar behaviour when I worked with the page which is why I almost never saved it before commiting and mostly worked offline. I assume the website is bugged. 😕

Since I uploaded the .yaml code in my first post (clearer syntax than on lutris . net, looks way less "hacky"), why won't you just take the code that's already working but seem a little hacky to you and just edit it? 😘 Not lying, it feels weird to see someone completely working around me and encountering some problems I already solved within a few hours of testing. Stuff like the optional ~/.faforever/ symlink is already included too, and as I said I'm not even sure the problem on Arch wasn't due to a faulty configuration on my side.

0

Updated to Lobby version 1.4.6 due to the serverload issue. Filename still says 1.4.4-RC1 simply because the Lutris mods still didn't review the installer, therefore link changes aren't applied. Next revision of the install script will have some fancy code to update the lobby automatically through Lutris. 😄

0

It worked, Thank you!

Before I stated I installed the open source AMDGPU driver for my RX 570 with pretty much everything from the "Install" section: https://wiki.archlinux.org/title/AMDGPU
I am on Manjaro, the only problem I encountered was that the game crashes on launch, saying “CD3DDeviceResources::DevResInitResources: Unable to load effect file /effects/cartographic.fx”

I followed this guys guide: https://www.protondb.com/users/1007765403
But skipped the resolution changes. Maybe that was why the first start of the steam version took quite long, the cut scenes were laggy but skippable.

Install winetricks:
ubuntu: sudo apt install winetricks
manjaro: sudo pacman -S winetricks

Install protontricks using this guide from simpler: https://www.simpler.website/html/2021/1/protontricks.html

Copy from simpler:
Arch based Linux distros:
Open the terminal, then copy and paste these commands:
sudo pacman -S python-pip python-pipx python-setuptools python-virtualenv
python3 -m pip install --user pipx
python3 -m pipx ensurepath

Close and reopen the terminal again.
Install protontricks using this command:

pipx install protontricks

in a terminal, write: protontricks 9420 dlls d3dx9

in a terminal, write: protontricks 9420 dlls xact

(if you, at a later stage, change proton version in steam, you have to reinstall the above two libraries since they don’t seem to come with proton.)

Now start the game. It took quite some time for me. Create a game profile ingame and exit.
edit your Game.prefs on ubuntu it’s located in:

~/.steam/debian-installation/steamapps/compatdata/9420/pfx/drive_c/users/steamuser/Local Settings/Application Data/Gas Powered Games/Supreme Commander Forged Alliance/ change primary_adapter = ‘1024,758,60’, to whatever your native screen resolution is, mine is: primary_adapter = ‘2560,1440,60’, and save.

Edit launch options again (see step above) and remove “/windowed 1024 758” leaving just PROTON_NO_ESYNC=1, PROTON_DUMP_DEBUG_COMMANDS=1 %command%.

All that is left now is to install faforever client (for multiplayer), check the wiki: https://wiki.faforever.com/index.php?title=Setting_Up_FAF_Linux#Java_Downlord.27s_Client