|
|
| (One intermediate revision by the same user not shown) |
| Line 1: |
Line 1: |
| {{ note | While this method can work, it is currently not officially supported. See issue [https://github.com/Yellow-Dog-Man/Resonite-Issues/issues/2555 GH-2555] for the status on official support | warning }}
| | The Headless Server Software is supported on ARM64-based Linux machines, such as the Oracle Cloud free tier. |
| | |
| With some work, it is possible to run the Headless Server Software on ARM-based machines, such as the Oracle Cloud free tier.
| |
| | |
| Do note this page concerns <code>aarch64</code> CPUs. If you are using a different kind of ARM CPU, those instructions will not apply and further steps will need to be taken.
| |
| | |
| Similarly, this page assumes you are using a Linux-based system.
| |
|
| |
|
| == Steps == | | == Steps == |
| Line 13: |
Line 7: |
| Several pre-requisites are needed to run the Headless: | | Several pre-requisites are needed to run the Headless: |
|
| |
|
| * [https://dotnet.microsoft.com/en-us/download/dotnet/8.0 .NET 8 SDK] | | * [https://dotnet.microsoft.com/en-us/download/dotnet/10.0 .NET 10 Runtime] |
| ** You will need this for <code>ilspycmd</code>
| | * Either SteamCMD or [https://github.com/SteamRE/DepotDownloader DepotDownloader] to Download the headless, you can also copy the headless from your Resonite install if you're on the headless branch |
| * [https://dotnet.microsoft.com/en-us/download/dotnet/9.0 .NET 9 Runtime]
| |
| * ILSpy Command Line Tool (<code>ilspycmd</code> on most distributions)
| |
| ** You can install it using <code>dotnet tool install --global ilspycmd</code>
| |
| * Either SteamCMD or [https://github.com/SteamRE/DepotDownloader DepotDownloader] to Download the headless | |
| ** SteamCMD is not officially supported on ARM but can be used through box64 [https://github.com/ptitSeb/box64/blob/main/docs/COMPILE.md#note-about-box32 built with the box32 flag] | | ** SteamCMD is not officially supported on ARM but can be used through box64 [https://github.com/ptitSeb/box64/blob/main/docs/COMPILE.md#note-about-box32 built with the box32 flag] |
|
| |
|
| Line 45: |
Line 35: |
| </pre> | | </pre> |
|
| |
|
| ==== Getting native libraries ====
| |
|
| |
| The Headless Server Software needs a number of native libraries to function properly.
| |
|
| |
| A set of libraries pre-compiled for ARM is available, courtesy of [[User:J4 | J4]]. More information is available on [https://j4.lc/resonite-arm-libraries.html its website].
| |
|
| |
| First, download and unzip the libraries:
| |
|
| |
| <pre>
| |
| wget https://i.j4.lc/resonite/libraries-arm.zip
| |
| unzip libraries-arm.zip
| |
| </pre>
| |
|
| |
| Then copy the libraries to the directory in which the Headless Server Software is present:
| |
|
| |
| <pre>
| |
| find . -type f -exec cp {} /path/to/install/ \;
| |
| </pre>
| |
|
| |
| Finally, rename <code>libfreetype</code> to ensure compatibility with the one needed:
| |
|
| |
| <pre>
| |
| mv /path/to/install/libfreetype.so /path/to/install/libfreetype6.so
| |
| </pre>
| |
|
| |
| ===== SteamWorks.NET =====
| |
|
| |
| Among the libraries needed for the Headless Server Software, <code>SteamWorks.NET</code> is a special case as it is simply not available for ARM systems at the moment, due to the native library not being available for ARM. Failing to load the binding library will result in an exception that prevents Resonite from detecting types contained in FrooxEngine, which makes it enter a broken state later on when loading the world. This means the library needs to at the very least be loaded, even though it will fail initialization.
| |
|
| |
| You will need to recompile it with the correct architecture, which can be done like so:
| |
|
| |
| Create a de-compilation directory, then de-compile SteamWorks.NET to it:
| |
|
| |
| <pre>
| |
| mkdir decomp && cd decomp
| |
| ilspycmd /path/to/install/Headless/Steamworks.NET.dll -r ./ -p -o .
| |
| </pre>
| |
|
| |
| Open the <code>Steamworks.NET.csproj</code> with a text editor (<code>nano</code> and <code>vim</code> are commonly used), and edit the <code>PlatformTarget</code> and <code>PlatformTarget</code> tags so they match the following:
| |
|
| |
| <pre>
| |
| <PlatformTarget>x86</PlatformTarget>
| |
| </pre>
| |
|
| |
| And:
| |
|
| |
| <pre>
| |
| <PlatformTarget>AnyCPU</PlatformTarget>
| |
| </pre>
| |
|
| |
| You can then build the library using <code>dotnet build -c Release</code>.
| |
|
| |
| Once the compilation is finished, you can copy the built DLL library file to the headless location:
| |
|
| |
| <pre>
| |
| cp bin/Release/netstandard2.1/Steamworks.NET.dll /path/to/install/Headless/Steamworks.NET.dll
| |
| </pre>
| |
|
| |
| === Launching the Headless Server Software ===
| |
|
| |
| You can now launch the Headless Server Software like on x64-based machines:
| |
|
| |
| <pre>
| |
| dotnet /path/to/install/Headless/Resonite.dll
| |
| </pre>
| |
|
| |
|
| == Modding == | | == Modding == |
|
| |
|
| Modding is somewhat tricky due to lack of aarch64 linux support in MonoMod (used by Harmony), while there has been some effort put into Android and Apple Silicon support, it seems to have gone somewhat stale. Thankfully it seems like a combination of different arm64 branches rebased on a recent version of MonoMod works quite well, but it should be noted I have no idea what I'm doing and I've never touched IL or much of C# in my life, this is copy pasted code, use at your own risk.
| | Linux aarch64 support for MonoMod [https://github.com/MonoMod/MonoMod/pull/241 has now been merged], so all your mods should work as expected! |
| | |
| To use it:
| |
| * Install [https://github.com/resonite-modding-group/ResoniteModLoader RML] itself as usual
| |
| * Download the '''thin''' version of Harmony from https://github.com/pardeike/Harmony/releases
| |
| * Download MonoMod from https://github.com/OrionMoonclaw/MonoMod-arm64/releases/ or build it yourself, and put it alongside 0Harmony.dll
| |
| | |
| Now your mods should be working.
| |
|
| |
|
| == Troubleshooting == | | == Troubleshooting == |
The Headless Server Software is supported on ARM64-based Linux machines, such as the Oracle Cloud free tier.
Steps
Pre-requisites
Several pre-requisites are needed to run the Headless:
- .NET 10 Runtime
- Either SteamCMD or DepotDownloader to Download the headless, you can also copy the headless from your Resonite install if you're on the headless branch
Downloading the Headless Server Software
SteamCMD
Downloading the Headless Server Software through SteamCMD is done as following:
steamcmd +force_install_dir /path/to/install \
+login YOUR_STEAM_USERNAME YOUR_STEAM_PASSWORD \
+app_update 2519830 -beta headless -betapassword HEADLESS_BETA_CODE validate \
+quit
DepotDownloader
Downloading the Headless Server Software through DepotDownloader is done as following:
DepotDownloader -app 2519830 \
-username YOUR_STEAM_USERNAME -password YOUR_STEAM_PASSWORD \
-branch headless -branchpassword HEADLESS_BETA_CODE \
-dir /path/to/install
Modding
Linux aarch64 support for MonoMod has now been merged, so all your mods should work as expected!
Troubleshooting
Acknowledgements
Several people made running Resonite on ARM-based machines possible:
- Orion Moonclaw for helping and testing native libraries, janky arm64 MonoMod branch
- WattleFoxxo for compiling the information and writing the original version of this guide on Discord
- J4 for providing build processes and pre-compiled native libraries