Stride uses the MSBuild system to the max. This is an instruction on how to build Stride packages so that they can be used under Linux to compile a project (excluding asset compilation).
In /build/Stride.build
are the definitions of builds for different platforms/graphics systems. I will be invoking the build for Linux OpenGL, so I'm going to invoke a command
msbuild .\Stride.build /target:BuildLinux
This command should be invoked from the Visual Studio 2019 Developer PowerShell, so that all environment variables are properly set. Best open it from Visual Studio (Ctrl+Q -> PowerShell).
To that command I have added a switch that disables signing (I don't have the certificate)
msbuild .\Stride.build /target:BuildLinux /p:StrideSign=false
And I wanted to get NuGet packages, so I modified the Stride.build
file and under build parameters for my target set StrideSkipAutoPack=false
.
I also experienced an issue, where the Stride.Core.Tasks assembly is not compiled under Release:netcoreapp3.1, so I also had to first run
msbuild ..\sources\core\Stride.Core.Tasks\Stride.Core.Tasks.csproj /p:Configuration=Release /p:TargetFramework=netcoreapp3.1
And now you should be able to copy the packages from /bin/packages
over to a Linux machine, add them to a NuGet source and compile your project against it.
When running your application you might need to set LD_LIBRARY_PATH
to the folder with dll files (e.g. bin/Debug/netcoreapp3.1), so that LD finds libcore.so
.
If you want to compile for Vulkan, use target BuildLinuxVulkan
.