Difference between revisions of "Linux Installation Guide"
m (→1.4. Download the BTA installer and Extract the .zip into ${BTA_ROOT}: version change) |
Bloodydoves (talk | contribs) |
||
(13 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
<div id="" class="" style="clear: right; margin: -1em 0 0 10px; float: right; padding: 10px; background: transparent; width: 200px; ">__TOC__</div> | <div id="" class="" style="clear: right; margin: -1em 0 0 10px; float: right; padding: 10px; background: transparent; width: 200px; ">__TOC__</div> | ||
− | This guide assumes you are | + | This guide assumes you are running the native linux version BattleTech. If you installed the windows version and got it running through wine, parts of this guide may still be helpful, but it won't work exactly step by step. |
− | = | + | = 0. Disclaimer. = |
− | + | The BTA Team does not *officially* support Linux installations. The below guide is provided as-is and is not guaranteed to work for all possible configurations and installations of Linux due to Linux's variability as an OS. If it doesn't work, you are on your own. Ye be warned. | |
− | + | = 1. Preparation. = | |
+ | All of these steps are necessary. Seriously, don't skip them - you'll get weird errors later on even if installing the mod seems to succeed at first. | ||
− | + | == 1.1. Install Wine and winetricks == | |
− | + | You'll need to install Wine in order to run the installer. On debian-based systems (such as Ubuntu), you can install it with | |
− | $ | + | $ sudo apt-get install wine winetricks |
− | |||
− | + | Other distributions will have their own commands along similar lines. | |
− | == | + | == 1.2. Install dotnet 4.7.2 == |
+ | Installing BTA also requires dotnet 4.7.2. If you fail to install dotnet, you won't notice issues until you try to actually run the game. '''Do not skip this step'''. | ||
− | $ | + | $ winetricks dotnet472 |
− | == 1. | + | == 1.3. Raising the open files limit == |
+ | Most distributions default to a limit of 1024 open files at once, but you'll need to raise this for your user by editing /etc/security/limits.conf | ||
− | + | $ sudo nano /etc/security/limits.conf | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | + | Insert these lines at the bottom of the file: | |
− | + | * hard nofile 32768 | |
+ | * soft nofile 32768 | ||
− | + | You'll need to log out and log back in, or restart your computer for this change to take effect. | |
− | |||
− | + | = 2. Install BTA = | |
− | + | == 2.1. Locate your BattleTech install and create Mods directory == | |
− | |||
− | |||
− | == 1. | ||
− | + | For Steam on Debian-based distributions, BattleTech is installed at ~/.steam/debian-installation/steamapps/common/BATTLETECH. | |
− | + | For GOG installs, the path will be something like `~/GOG Games/BATTLETECH/game`. | |
− | |||
− | |||
− | |||
− | |||
− | + | You want the folder containing the BattleTech binary and a folder for BattleTech_Data. For example, on my system: | |
− | + | $ ls -l ~/Games/BATTLETECH/game | |
+ | total 27788 | ||
+ | -rwxrwxr-x 1 bluewinds bluewinds 27147344 Dec 22 13:35 BattleTech | ||
+ | drwx------ 8 bluewinds bluewinds 20480 Dec 22 13:49 BattleTech_Data | ||
+ | ...more stuff... | ||
− | + | In this directory, you'll need to create a Mods folder. | |
− | + | $ mkdir ~/Games/BATTLETECH/game/Mods | |
− | + | == 2.2. Setup an installer directory and download the installer. == | |
+ | You will need a directory to host the installer and cache '''outside the game directory'''. For purposes of this guide, we'll use BTAInstaller in your home directory, but feel free to use any other location outside of the game directory (and outside of .steam). | ||
− | + | This location will need at least 40gb of free space. The cache is big. | |
− | $ | + | $ mkdir ~/BTAInstaller |
− | $ | + | $ cd ~/BTAInstaller |
− | |||
− | + | Download the installer into this directory and unzip it, either using [this link](https://www.bta3062.com/files/BTAdvancedLauncher.php) or by running: | |
− | + | $ wget https://www.bta3062.com/files/BTAdvancedLauncher.php -O BTAdvancedLauncher.zip | |
+ | $ unzip BTAdvancedLauncher.zip | ||
− | + | You should end up with BTAdvancedLauncher.exe in your install folder. | |
− | + | $ ls -l ~/BTAInstaller | |
− | + | -rw-rw-rw- 1 bluewinds bluewinds 42516095 Jan 6 17:14 BTAdvancedLauncher.exe | |
+ | -rw-rw-r-- 1 bluewinds bluewinds 42295941 Feb 3 13:57 BTAdvancedLauncher.zip | ||
− | + | == 2.3 Configure the installer == | |
− | + | Run the BTAInstaller: | |
− | == | ||
− | $ | + | $ wine ~/BTAInstaller/BTAdvancedLauncher.exe |
− | |||
− | |||
− | + | At the bottom left of the installer, click "Advanced Mode". | |
− | |||
− | |||
− | + | You can then edit the "Install Target". Hit "Browse", and navigate to the location of the Mods folder you created in step 2.1. | |
+ | Also edit the "Checkout Workspace". Hit "Browse", and navigate to the installer directory you created in step 2.2. | ||
− | + | == 2.4 Install! == | |
− | == | + | You can now click "Update/Install BTA" to start the process. |
− | '' | + | When prompted to configure your game, be sure to select "Old Fire / Linux" at the bottom. Select *only* the addons for DLC you own - enabling addons for DLC you haven't installed will lock up the game when you try to play. Multithreading and Corgi's Perfix can improve performance. |
− | + | When it asks for the location of the BattleTech Binary ("Unable to locate BattleTech.exe"), navigate to your BattleTech install (see step 2.1) and select the "BattleTech" file. | |
− | + | == 2.5 Enable ModTek 3.x == | |
+ | === Steam on Linux === | ||
− | + | Note These instructions are based on the Steam Guide for BepInEx. | |
− | + | Instead of running the run.sh script directly, you need to ask Steam to run it for you. | |
− | + | Right mouse click on the game in the Steam library -> Properties... -> SET LAUNCH OPTIONS. | |
− | + | Launch options for Linux: | |
− | + | ./run.sh %command% | |
− | + | === GOG on Linux === | |
− | + | Modify the start.sh script from GOG to execute the run.sh script from ModTek/UnityDoorstop instead of BattleTech. | |
− | |||
− | + | #chmod +x "BattleTech" | |
+ | #./"BattleTech" | ||
+ | ./run.sh | ||
− | + | === Proton/Wine on Linux === | |
− | + | Using Proton or Wine is also supported, make sure the winhttp.dll from UnityDoorstop is loaded by setting the override to native, builtin. | |
− | |||
− | |||
− | |||
− | |||
− | + | = Troubleshooting = | |
+ | == Issue: The BTA Launcher will not run at step 2.1 and you get error message "MESA-INTEL:warning: processor code name Vulkan Support is incomplete" == | ||
+ | Likely cause: Older hardware that OpenGL struggles with. | ||
− | + | Solution: Run the following command in terminal before running the BTA Launcher with wine: | |
− | + | $ export MESA_GL_VERSION_OVERRIDE=4.5 | |
+ | == Issue: The Launcher gives you the error message "non-folder object in selection" when trying to point the Install Target to the correct folder through the Launcher's "browse" button == | ||
+ | Likely cause: Unknown | ||
− | + | Solution: Edit the BTALauncherSettings.xml to apply the correct path, then restart the launcher to load up the correct path. | |
− | |||
− | |||
− | |||
== Issue: The game loads but the main menu doesn’t say “BattleTech ADVANCED - 3062” and the ModTek version doesn’t show up under the game version next to the CREDITs button == | == Issue: The game loads but the main menu doesn’t say “BattleTech ADVANCED - 3062” and the ModTek version doesn’t show up under the game version next to the CREDITs button == | ||
Line 146: | Line 130: | ||
Likely cause: ModTek isn’t patched into the game correctly. | Likely cause: ModTek isn’t patched into the game correctly. | ||
− | This can happen if | + | This can happen if dotnet is incorrectly installed or was not installed before the BTA installer was run. |
− | Solution: (re)run the | + | Solution: Install dotnet472 with winetricks and (re)run the installer. |
− | $ | + | $ winetricks dotnet472 |
− | + | Run the installer, and "Update/Install BTA" again. | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
== Issue: BattleTech refuses to launch/crashes to desktop immediately == | == Issue: BattleTech refuses to launch/crashes to desktop immediately == | ||
Line 167: | Line 144: | ||
$ mkdir -p "${BTA_ROOT}/../BattleTech_Data/Plugins/x86_64/" | $ mkdir -p "${BTA_ROOT}/../BattleTech_Data/Plugins/x86_64/" | ||
$ mv "${BT_ROOT}/BattleTech_Data/Plugins/x86_64/libc.so.6" "${BTA_ROOT}/../BattleTech_Data/Plugins/x86_64/" | $ mv "${BT_ROOT}/BattleTech_Data/Plugins/x86_64/libc.so.6" "${BTA_ROOT}/../BattleTech_Data/Plugins/x86_64/" | ||
+ | == Issue: My Battletech directory is hidden, and I can't select it in the installer == | ||
+ | |||
+ | Likely cause: Wine is not configured to show hidden paths, such as those beginning with a dot. | ||
+ | |||
+ | Solution: Run winecfg and select the Drives tab. Check "Show dot files" at the bottom. Now hidden folders (such as ~/.steam) will be visible in the installer. | ||
+ | |||
+ | == Issue: The game wont run, or briefly runs and quits. == | ||
+ | |||
+ | Open a terminal in the BattleTech dir where your binary for the game is located, you should see the run.sh there. Run this command to convert the line endings from windows to unix | ||
+ | |||
+ | sed -i -e 's/\r$//' run.sh | ||
+ | |||
+ | and mark the script as executable, and finally run the game. | ||
+ | |||
== Issue: Not listed here == | == Issue: Not listed here == | ||
− | There are a few Linux users on the [https://discord.com/invite/g5nCYAV BTA Discord channel], you can ask for help in General Chat or open a support ticket with #ticketbot to get help resolving issues with BTA. For general issues with BattleTech on Linux, there are several forums available by searching your favorite search engine. | + | There are a few Linux users on the [https://discord.com/invite/g5nCYAV BTA Discord channel], you can ask for help in General Chat, message Indigo#8200 directly or open a support ticket with #ticketbot to get help resolving issues with BTA. For general issues with BattleTech on Linux, there are several forums available by searching your favorite search engine. |
Latest revision as of 19:14, 14 November 2023
This guide assumes you are running the native linux version BattleTech. If you installed the windows version and got it running through wine, parts of this guide may still be helpful, but it won't work exactly step by step.
0. Disclaimer.
The BTA Team does not *officially* support Linux installations. The below guide is provided as-is and is not guaranteed to work for all possible configurations and installations of Linux due to Linux's variability as an OS. If it doesn't work, you are on your own. Ye be warned.
1. Preparation.
All of these steps are necessary. Seriously, don't skip them - you'll get weird errors later on even if installing the mod seems to succeed at first.
1.1. Install Wine and winetricks
You'll need to install Wine in order to run the installer. On debian-based systems (such as Ubuntu), you can install it with
$ sudo apt-get install wine winetricks
Other distributions will have their own commands along similar lines.
1.2. Install dotnet 4.7.2
Installing BTA also requires dotnet 4.7.2. If you fail to install dotnet, you won't notice issues until you try to actually run the game. Do not skip this step.
$ winetricks dotnet472
1.3. Raising the open files limit
Most distributions default to a limit of 1024 open files at once, but you'll need to raise this for your user by editing /etc/security/limits.conf
$ sudo nano /etc/security/limits.conf
Insert these lines at the bottom of the file:
* hard nofile 32768 * soft nofile 32768
You'll need to log out and log back in, or restart your computer for this change to take effect.
2. Install BTA
2.1. Locate your BattleTech install and create Mods directory
For Steam on Debian-based distributions, BattleTech is installed at ~/.steam/debian-installation/steamapps/common/BATTLETECH.
For GOG installs, the path will be something like `~/GOG Games/BATTLETECH/game`.
You want the folder containing the BattleTech binary and a folder for BattleTech_Data. For example, on my system:
$ ls -l ~/Games/BATTLETECH/game total 27788 -rwxrwxr-x 1 bluewinds bluewinds 27147344 Dec 22 13:35 BattleTech drwx------ 8 bluewinds bluewinds 20480 Dec 22 13:49 BattleTech_Data ...more stuff...
In this directory, you'll need to create a Mods folder.
$ mkdir ~/Games/BATTLETECH/game/Mods
2.2. Setup an installer directory and download the installer.
You will need a directory to host the installer and cache outside the game directory. For purposes of this guide, we'll use BTAInstaller in your home directory, but feel free to use any other location outside of the game directory (and outside of .steam).
This location will need at least 40gb of free space. The cache is big.
$ mkdir ~/BTAInstaller $ cd ~/BTAInstaller
Download the installer into this directory and unzip it, either using [this link](https://www.bta3062.com/files/BTAdvancedLauncher.php) or by running:
$ wget https://www.bta3062.com/files/BTAdvancedLauncher.php -O BTAdvancedLauncher.zip $ unzip BTAdvancedLauncher.zip
You should end up with BTAdvancedLauncher.exe in your install folder.
$ ls -l ~/BTAInstaller
-rw-rw-rw- 1 bluewinds bluewinds 42516095 Jan 6 17:14 BTAdvancedLauncher.exe -rw-rw-r-- 1 bluewinds bluewinds 42295941 Feb 3 13:57 BTAdvancedLauncher.zip
2.3 Configure the installer
Run the BTAInstaller:
$ wine ~/BTAInstaller/BTAdvancedLauncher.exe
At the bottom left of the installer, click "Advanced Mode".
You can then edit the "Install Target". Hit "Browse", and navigate to the location of the Mods folder you created in step 2.1. Also edit the "Checkout Workspace". Hit "Browse", and navigate to the installer directory you created in step 2.2.
2.4 Install!
You can now click "Update/Install BTA" to start the process.
When prompted to configure your game, be sure to select "Old Fire / Linux" at the bottom. Select *only* the addons for DLC you own - enabling addons for DLC you haven't installed will lock up the game when you try to play. Multithreading and Corgi's Perfix can improve performance.
When it asks for the location of the BattleTech Binary ("Unable to locate BattleTech.exe"), navigate to your BattleTech install (see step 2.1) and select the "BattleTech" file.
2.5 Enable ModTek 3.x
Steam on Linux
Note These instructions are based on the Steam Guide for BepInEx.
Instead of running the run.sh script directly, you need to ask Steam to run it for you.
Right mouse click on the game in the Steam library -> Properties... -> SET LAUNCH OPTIONS.
Launch options for Linux:
./run.sh %command%
GOG on Linux
Modify the start.sh script from GOG to execute the run.sh script from ModTek/UnityDoorstop instead of BattleTech.
#chmod +x "BattleTech" #./"BattleTech" ./run.sh
Proton/Wine on Linux
Using Proton or Wine is also supported, make sure the winhttp.dll from UnityDoorstop is loaded by setting the override to native, builtin.
Troubleshooting
Issue: The BTA Launcher will not run at step 2.1 and you get error message "MESA-INTEL:warning: processor code name Vulkan Support is incomplete"
Likely cause: Older hardware that OpenGL struggles with.
Solution: Run the following command in terminal before running the BTA Launcher with wine:
$ export MESA_GL_VERSION_OVERRIDE=4.5
Issue: The Launcher gives you the error message "non-folder object in selection" when trying to point the Install Target to the correct folder through the Launcher's "browse" button
Likely cause: Unknown
Solution: Edit the BTALauncherSettings.xml to apply the correct path, then restart the launcher to load up the correct path.
Likely cause: ModTek isn’t patched into the game correctly.
This can happen if dotnet is incorrectly installed or was not installed before the BTA installer was run.
Solution: Install dotnet472 with winetricks and (re)run the installer.
$ winetricks dotnet472
Run the installer, and "Update/Install BTA" again.
Issue: BattleTech refuses to launch/crashes to desktop immediately
Likely cause: Libc library conflict. The system libc is likely newer than, and incompatible with, the libc included in BattleTech’s native Linux distribution.
Solution: Remove libc.so.6 from the BattleTech game directory. This forces BattleTech to use the system libc.
$ mkdir -p "${BTA_ROOT}/../BattleTech_Data/Plugins/x86_64/" $ mv "${BT_ROOT}/BattleTech_Data/Plugins/x86_64/libc.so.6" "${BTA_ROOT}/../BattleTech_Data/Plugins/x86_64/"
Likely cause: Wine is not configured to show hidden paths, such as those beginning with a dot.
Solution: Run winecfg and select the Drives tab. Check "Show dot files" at the bottom. Now hidden folders (such as ~/.steam) will be visible in the installer.
Issue: The game wont run, or briefly runs and quits.
Open a terminal in the BattleTech dir where your binary for the game is located, you should see the run.sh there. Run this command to convert the line endings from windows to unix
sed -i -e 's/\r$//' run.sh
and mark the script as executable, and finally run the game.
Issue: Not listed here
There are a few Linux users on the BTA Discord channel, you can ask for help in General Chat, message Indigo#8200 directly or open a support ticket with #ticketbot to get help resolving issues with BTA. For general issues with BattleTech on Linux, there are several forums available by searching your favorite search engine.