Linux build?

Started by namida, February 12, 2022, 08:39:32 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

namida

Is there anyone who'd be interested in me providing Linux builds during this early test-build phase? Note that I intend to, if possible, release Linux builds once it's time to go stable either way . This is purely about during the current phase of development.

(Mac, on the other hand, I am going to rule out at least during the test phase.)
My projects
2D Lemmings: NeoLemmix (engine) | Lemmings Plus Series (level packs) | Doomsday Lemmings (level pack)
3D Lemmings: Loap (engine) | L3DEdit (level / graphics editor) | L3DUtils (replay / etc utility) | Lemmings Plus 3D (level pack)
Non-Lemmings: Commander Keen: Galaxy Reimagined (a Commander Keen fangame)

Simon

I have little time: I haven't even looked in detail at Daimaikai's L2 editor or RavenNine's L2Player. It's your call how much immediate Linux support is worth.

I'd like build instructions even more than binaries.




Here's a quick attempt with Mono's msbuild. msbuild expects several obj/project.assets.json that don't exist.

Build errors

~/c/notown> git clone https://bitbucket.org/namida42/loap/src/master/ loap
...successful cloning...
~/c/notown> cd loap
~/c/notown/loap*master> msbuild
Microsoft (R) Build Engine version 16.10.1 for Mono
Copyright (C) Microsoft Corporation. All rights reserved.

Building the projects in this solution one at a time. To enable parallel build, please add the "-m" switch.
Build started 2/13/2022 7:49:26 AM.
Project "/home/simon/c/notown/loap/Loap.sln" on node 1 (default targets).
ValidateSolutionConfiguration:
  Building solution configuration "Debug|x64".
Project "/home/simon/c/notown/loap/Loap.sln" (1) is building "/home/simon/c/notown/loap/LoapCore/LoapCore.csproj" (2) on node 1 (default targets).
/usr/lib/mono/msbuild/Current/bin/Sdks/Microsoft.NET.Sdk/targets/Microsoft.PackageDependencyResolution.targets(241,5): error NETSDK1004: Assets file '/home/simon/c/notown/loap/LoapCore/obj/project.assets.json' not found. Run a NuGet package restore to generate this file. [/home/simon/c/notown/loap/LoapCore/LoapCore.csproj]
Done Building Project "/home/simon/c/notown/loap/LoapCore/LoapCore.csproj" (default targets) -- FAILED.
Project "/home/simon/c/notown/loap/Loap.sln" (1) is building "/home/simon/c/notown/loap/Loap/Loap.csproj" (3) on node 1 (default targets).
/usr/lib/mono/msbuild/Current/bin/Sdks/Microsoft.NET.Sdk/targets/Microsoft.PackageDependencyResolution.targets(241,5): error NETSDK1004: Assets file '/home/simon/c/notown/loap/Loap/obj/project.assets.json' not found. Run a NuGet package restore to generate this file. [/home/simon/c/notown/loap/Loap/Loap.csproj]
Done Building Project "/home/simon/c/notown/loap/Loap/Loap.csproj" (default targets) -- FAILED.
Project "/home/simon/c/notown/loap/Loap.sln" (1) is building "/home/simon/c/notown/loap/DeRNC/DeRNC.csproj" (4) on node 1 (default targets).
/usr/lib/mono/msbuild/Current/bin/Sdks/Microsoft.NET.Sdk/targets/Microsoft.PackageDependencyResolution.targets(241,5): error NETSDK1004: Assets file '/home/simon/c/notown/loap/DeRNC/obj/project.assets.json' not found. Run a NuGet package restore to generate this file. [/home/simon/c/notown/loap/DeRNC/DeRNC.csproj]
Done Building Project "/home/simon/c/notown/loap/DeRNC/DeRNC.csproj" (default targets) -- FAILED.
Done Building Project "/home/simon/c/notown/loap/Loap.sln" (default targets) -- FAILED.

Build FAILED.

"/home/simon/c/notown/loap/Loap.sln" (default target) (1) ->
"/home/simon/c/notown/loap/LoapCore/LoapCore.csproj" (default target) (2) ->
(ResolvePackageAssets target) ->
  /usr/lib/mono/msbuild/Current/bin/Sdks/Microsoft.NET.Sdk/targets/Microsoft.PackageDependencyResolution.targets(241,5): error NETSDK1004: Assets file '/home/simon/c/notown/loap/LoapCore/obj/project.assets.json' not found. Run a NuGet package restore to generate this file. [/home/simon/c/notown/loap/LoapCore/LoapCore.csproj]


"/home/simon/c/notown/loap/Loap.sln" (default target) (1) ->
"/home/simon/c/notown/loap/Loap/Loap.csproj" (default target) (3) ->
  /usr/lib/mono/msbuild/Current/bin/Sdks/Microsoft.NET.Sdk/targets/Microsoft.PackageDependencyResolution.targets(241,5): error NETSDK1004: Assets file '/home/simon/c/notown/loap/Loap/obj/project.assets.json' not found. Run a NuGet package restore to generate this file. [/home/simon/c/notown/loap/Loap/Loap.csproj]


"/home/simon/c/notown/loap/Loap.sln" (default target) (1) ->
"/home/simon/c/notown/loap/DeRNC/DeRNC.csproj" (default target) (4) ->
  /usr/lib/mono/msbuild/Current/bin/Sdks/Microsoft.NET.Sdk/targets/Microsoft.PackageDependencyResolution.targets(241,5): error NETSDK1004: Assets file '/home/simon/c/notown/loap/DeRNC/obj/project.assets.json' not found. Run a NuGet package restore to generate this file. [/home/simon/c/notown/loap/DeRNC/DeRNC.csproj]

    0 Warning(s)
    3 Error(s)

Time Elapsed 00:00:00.84

-- Simon

namida

When building the project (in Visual Studio, for Windows), VS automatically fetches the packages in question via NuGet. I believe this is not part of the compiler's actions, as a build can fail similarly to what you describe if the cached packages are deleted and it hasn't finished redownloading them (as opposed to it giving a "please wait" or similar). I assume that msbuild, being a command line tool (?), requires you to do this manually somehow; or at least to manually invoke it being done.

Build instructions, yep, sure, I'll make a note of those at the same time when a Linux build is produced.

As for the value of it - I think it's worthwhile when it gets to stable; but I'll only bother during this early phase if there are people specifically interested in it. I'm happy to at least have a shot at it if there are, though.
My projects
2D Lemmings: NeoLemmix (engine) | Lemmings Plus Series (level packs) | Doomsday Lemmings (level pack)
3D Lemmings: Loap (engine) | L3DEdit (level / graphics editor) | L3DUtils (replay / etc utility) | Lemmings Plus 3D (level pack)
Non-Lemmings: Commander Keen: Galaxy Reimagined (a Commander Keen fangame)

namida

I did a bit of Googling and was pointed towards MonoDevelop. Downloaded this in a Debian VM and attempted to build.

Upon opening Loap.sln (solution file containing Loap, the main project; LoapCore, which is a library containing physics and data functions seperate from the UI / visuals; and DeRNC, which as the name suggests decompresses RNC-compressed files as many L3D data files are), was prompted to install .NET. The website I was taken to suggested .NET 6.0 or 7.0; however the Windows builds have been built with .NET Core 3.1. Quick attempts to install this version failed, so went with 6.0.

wget https://packages.microsoft.com/config/debian/12/packages-microsoft-prod.deb -O packages-microsoft-prod.deb
sudo dpkg -i packages-microsoft-prod.deb
rm packages-microsoft-prod.deb
sudo apt-get update
sudo apt-get install dotnet-sdk-6.0


I get MSB4236 error when trying to build all projects now. Some quick Googling suggests this is an issue with .NET 6.0 in some cases; rather than trying to fix it, let's try 7.0 first.

sudo apt-get remove dotnet-sdk-6.0
sudo apt-get install dotnet-sdk-7.0


I still get the same. >_>

Okay, let's see if a command line build works any better.

dotnet publish -c Release -r linux-x64

No errors. It seems to have worked. Let's go to the output folder and try to run it...

I try to run it. Nothing happens. I try in terminal; we're getting an error message about "can't find a valid ICU package". Some searching suggests intalling libicu63 should do the trick. It's not supported on Debian 12; I try the version that is (libicu72) but it seems to be already installed and not helping.

I also found a question regarding this issue on Stack Overflow. Didn't quite get what it was referring to, but came across a post on GitHub and it clicked. Tried this, ran the app again...



Performance is awful any time 3D graphics are in use, but that's very likely due to running it in a VM. It seems to work though!
My projects
2D Lemmings: NeoLemmix (engine) | Lemmings Plus Series (level packs) | Doomsday Lemmings (level pack)
3D Lemmings: Loap (engine) | L3DEdit (level / graphics editor) | L3DUtils (replay / etc utility) | Lemmings Plus 3D (level pack)
Non-Lemmings: Commander Keen: Galaxy Reimagined (a Commander Keen fangame)

Simon

Congratulations!

It's excellent to see Loap running with Mono. Mono for running C# is popular and common.

I've been busy these weeks, and and the next weeks will be busy, too. Still, I have the long-term goal of trying Loap and your custom 3D levels. With the Linux build, it will be even more more interesting. At latest, prod me in 2024 to build Loap on Linux and to post feedback.

-- Simon