-
Couldn't load subscription status.
- Fork 0
Running MiNET on Linux
#WARNING: NOT SUPPORTED ON 0.15 - ENCRYPTION NOT IMPLEMENTED ON MONO
On Linux/Mac, compiling and using the server is relatively straightforward but there are a few things that can catch you out in the process. Tested with Mono 4.4.0.148.
The first step is to clone the repository.
git clone https://github.com/NiclasOlofsson/MiNET.git
Once you've cloned the repository, you can use the xbuild tool to compile the code. You'll need a relatively recent version of Mono to be able to run the server (3.10.x) and you might find that your distribution's repositories (if you're relying on them) have a version that's too old. As a result, you may want to looking into downloading the latest stable Mono build from the website. xbuild will want to be given the path to the solution file to work:
xbuild src/MiNET/MiNET.sln
If the build fails, because of many errors like The predefined type 'System.Exception' is not defined or imported try manually setting the TargetFrameworkVersion:
xbuild /p:TargetFrameworkVersion="v4.6" src/MiNET/MiNET.sln
If the build fails because of The type or namespace name 'Topshelf' could not be found. Are you missing an assembly reference? you have to manually restore the package(s) with nuget:
nuget restore src/MiNET/MiNET.sln
Now that the code is compiled, you can run the MiNET.Service.exe file using Mono:
cd src/MiNET/MiNET.Service/bin/Debug; mono MiNET.Service.exe
If everything went as expected, you should see the following output:
INFO [NetService] - Starting MiNET
INFO [iNetServer] - Initializing...
INFO [iNetServer] - Loading settings...
INFO [iNetServer] - Loading plugins...
INFO [iNetServer] - Plugins loaded!
INFO [iNetServer] - Server open for business...
MiNET runing. Press <enter> to stop service..
You might have some issues with the tool downloading NuGet packages. You'll see an error like the one below if this is the case:
WARNING: Error getting response stream (Write: The authentication or decryption has failed.): SendFailure
To fix this, follow the instructions in this StackOverflow answer.
If you instead see an exception like the one in the stack trace below, you need to update your version of Mono.
System.NotImplementedException: The requested feature is not implemented.
at System.IO.Compression.DeflateStream..ctor (System.IO.Stream stream, CompressionLevel compressionLevel, Boolean leaveOpen) [0x00000] in <filename unknown>:0
at MiNET.Utils.ZLibStream..ctor (System.IO.Stream stream, CompressionLevel level, Boolean leaveOpen) [0x00000] in <filename unknown>:0
at (wrapper remoting-invoke-with-check) MiNET.Utils.ZLibStream:.ctor (System.IO.Stream,System.IO.Compression.CompressionLevel,bool)
at MiNET.Worlds.ChunkColumn.GetBytes () [0x00000] in <filename unknown>:0
at MiNET.Worlds.Level.<Initialize>m__0 (System.Object state) [0x00000] in <filename unknown>:0
If you get an exception that some path/file was not found and the displayed paths contain backslashes, you have to manually edit the file src/MiNET/MiNET.Service/server.conf and fix the paths.
ERROR [iNetServer] - Error during startup!
System.IO.DirectoryNotFoundException: Could not find a part of the path "/mnt/hdd/MiNET/src/MiNET/MiNET.Service/bin/Debug/D:\Development\Worlds\TopixMedia Lobby/level.dat".