Linux Setup

From OoTMM Wiki
Jump to navigation Jump to search

This Page is explaining to users of Linux which emulators are available and how to build Ares and the MultiClient for Multi Player. For creating your seed, refer to Creating_and_Starting_a_Seed.

Single Player

You can use any emulator mentioned under #Emulators_under_Linux to play in Single Player. For some of them you will still need to build them from their source code.

Multi Player

Multiplayer only has two options for Emulators: Ares (v143 or v145+) and Project64-EM (with Wine). However Ares is highly recommended.
Getting audio drivers and graphics to work with Project64-EM with good performance is not an easy task. (see #Emulators_under_Linux).

Additionally you will have to get the MultiClient running.

Even if not recommended, this can be done via WINE:
Open a Terminal and navigate to your downloaded and unzipped MultiClient.exe, then execute wine MultiClient.exe and it should be running. If you don't have WINE installed, you will have to do that via your package manager of your distribution.

However the recommended method is to build the MultiClient tool from source, refer to #Building_from_Source.

Emulators under Linux

Ares

Ares is the only good emulator for multiplayer, however you will need to build it from source for most distributions. Arch has an unofficial third party package, which is listed on the ares official download page.
You will therefore have to build the emulator from it's source code. That way you will get a compiled tool optimized for your hardware configuration. Please refer to #Building_from_Source.

RetroArch (Mupen64Plus-Next core)

RetroArch has native support for Linux via AppImage, Flatpak, Snap, etc. Please use "Mupen64Plus-Next" core!

Rosalie's Mupen GUI (RMG)

RMG has native support for Linux via AppImage, Flatpak, Arch Package, etc.

Project64-EM (only with WINE)

Not recommended
The adjusted version for Project64 from Nax. However it is only built for Windows.
The WINE Version, even if got running, has a multitude of problems, which impacts performance a lot.
[Might be able to build this for Linux or find a good set of configurations to make it run good? • Edit Article]

Building from Source

General requirements

In order to build from source, you will need to have a few general packages installed. Those can be easily installed by the package manager of your distribution. You will probably see them again in the external build instructions for Ares linked below, however a few you will most likely need:

  • git
  • cmake
  • clang
  • ninja
  • ccache

You can install them via those commands:

Debian-based (Ubuntu, Mint, etc.): sudo apt install git build-essential cmake clang ninja-build ccache

RedHat-based (Fedora, etc.): sudo dnf install git cmake clang ninja-build ccache

Arch: sudo pacman -S packageNamesNeeded [Dont know how those packages are called • Edit Article]
But you might not need to build something at all for Arch. A 3rd Party Package is available and the MultiClient can be started via WINE.

Ares

Note: There is a bug in v144 regarding transitions from OoT to MM, please do not use this version.

Ares has an own documentation on how to build, please refer to it: Ares Linux Build Documentation

Before you build: If you don't need the very last code changes (which might be unstable), please ensure that you checkout a specific tagged stable version of the repository once you have cloned it: git checkout tag_name
For example: git checkout v147

After you've built ares, the output will be in your build directory, from where you can launch ares (as of now, this should be rundir/bin)

If you are missing sound or input detection, look into the "drivers" options and see if the configuration there is empty. If it is you might have not installed all requirements listed in the Ares Documentation.

To make it more user friendly and more "installed" you can choose to do one of the following (A or B):

Option A. Install via cmake

Follow the ares documentation through til the cmake install part.

Cmake install gives you the option to put binaries and desktop menu entries into a given path.

Just for your own user:
cmake --install . --prefix ~/.local
Please refer to #Add_to_$PATH_of_your_current_user, if that did not work, even after a restart. It is likely your distribution does not add ~/.local/bin to your $PATH.

Install globally (not recommended):
[Untested, should work, but does it? • Edit Article]
sudo cmake --install . --prefix /usr


If you want to see first what gets copied into the target directory, execute:
cmake --install . --prefix v147
It will generate a directory "v147" in your current directory and you can see inside. There you will have most likely 2 folders "bin" and "share". Those will be copied to the target you give on the prefix option.

Option B. Install manually, run from build Directory

If you just want to run from your build directory or any other place, which is not in $PATH, you can just modify the rundir/share/ares.desktop
You want to adjust the "Exec" and "Icon" parameters:

[Desktop Entry]
Name=ares
Comment=Emulator
Exec=<PATH_TO_RUNDIR>/bin/ares
Icon=<PATH_TO_RUNDIR>/share/ares/ares.png
Terminal=false
Type=Application
Categories=Game;Emulator;

move this file into ~/.local/share/applications/ and ares should already be in your start menu. If not try restarting.

MultiClient

Building the MultiClient is a much simpler version of building ares. As you don't need a lot of other dependencies, other than the ones mentioned above in #General_requirements.

  • Clone the repository: git clone https://github.com/OoTMM/multi-client ootmm-multi-client
  • Enter your directory: cd ootmm-multi-client
  • Make a build directory and enter it: mkdir build && cd build
  • Build it: cmake .. -G Ninja && cmake --build .
  • You will now have the "MultiClient" binary in bin/MultiClient

For better integration into your system, you might want to do any of the following:

Add to $PATH

This will allow you to run the MultiClient in a terminal from anywhere. As the MultiClient will create a "data" directory next to it, it is not recommended to put it into a $PATH directory directly, so better create a symlink instead:
ln -s /FULL/PATH/TO/YOUR/bin/MultiClient ~/.local/bin/MultiClientOoTMM

Then you can still always open a terminal and just type "MultiClientOoTMM" (with tab you can also autocomplete it normally). And start it from anywhere, but the data is saved where you've saved your MultiClient.

Add to your Start Menu

Create a file "multiclient-ootmm.desktop"

[Desktop Entry]
Name=MultiClient-OoTMM
Comment="Client for OoTMM Multiplayer and Co-Op Seeds"
Exec=<PATH_TO_LOCATION>/MultiClient
Icon=<PATH_TO_ANY_ICON_FILE_YOU_LIKE>
Terminal=true
Type=Application
Categories=Game;
  • Icon= If you do not have an icon, you can also just delete that line.
  • Terminal= Please pay attention to it being true. This is recommended, so the process isn't dangling in the background. It will open a terminal for you to see when checks are going out etc. (Like you are maybe used to from windows)
  • Exec= If you have followed the above for adding to $PATH, you can also just write Exec=MultiClientOoTMM

Move this file into ~/.local/share/applications/

Own Multi-Server

You very most likely dont need this.

If you or your friend have hosted your own multi server (that does NOT mean creating or playing a multiplayer/coop seed!), you can use this client binary like the windows version and overwrite the defaults: ./MultiClient SERVER PORT.
In that case, just add those parameters to the "Exec" Line in your *.desktop file or append them when you are executing it from CLI.

Add to $PATH of your current user

Adding to $PATH allows you to execute binaries from your terminal from everywhere.

To see which directories are in your $PATH, you can run the following under (at least) debian based distributions: echo $PATH | tr ":" "\n" under other distributions where that does not work you can just echo $PATH and parse it with your eyes, in general every path is separated by a :.

Your distribution will most likely already have a check for a private bin directory, but in case it has not, you can put this code into your ~/.profile file:

# set PATH so it includes user's private bin if it exists
if [ -d "$HOME/.local/bin" ] ; then
    PATH="$HOME/.local/bin:$PATH"
fi

Now move the binary you want to add into ~/.local/bin/, create the "bin" directory if needed. Keep in mind that ".local" is a hidden directory, you might need to enable seeing hidden files for it to show in your file explorer.