Closed phr00t closed 5 years ago
Setting up a Linux Mint VM to try this out...
phr00t@phr00t-VirtualBox:~/Desktop/Debug$ ./GentrieveX.Linux.Linux Error: An assembly specified in the application dependencies manifest (GentrieveX.Linux.deps.json) was not found: package: 'FFmpeg.AutoGen', version: '3.4.0.2' path: 'lib/netstandard2.0/FFmpeg.AutoGen.dll'
... so the libraries are not being included.
Adding DLLs from the Windows directory still can't run, because this is missing:
phr00t@phr00t-VirtualBox:~/Desktop/Debug$ ./GentrieveX.Linux.Linux Error: An assembly specified in the application dependencies manifest (GentrieveX.Linux.deps.json) was not found: package: 'Microsoft.Win32.SystemEvents', version: '4.5.0' path: 'lib/netstandard2.0/Microsoft.Win32.SystemEvents.dll'
To have everything copied, I remember doing a "publish" (either dotnet publish
or I think there is a similar option in Visual Studio when you right click the project).
Alternatively, maybe adding this to .exe project works too:
<PropertyGroup>
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
</PropertyGroup>
That does seem to work to copy DLLs over! However, if SDL2 isn't installed, you get this error:
Unhandled Exception: System.TypeInitializationException: The type initializer for 'Xenko.Graphics.SDL.Window' threw an exception. ---> System.DllNotFoundException: Unable to load shared library 'SDL2' or one of its dependencies. In order to help diagnose loading problems, consider setting the LD_DEBUG environment variable: libSDL2: cannot open shared object file: No such file or directory at SDL2.SDL.SDL_Init(UInt32 flags) at Xenko.Graphics.SDL.Window..cctor() --- End of inner exception stack trace --- at Xenko.Graphics.SDL.Window..ctor(String title) at Xenko.Games.GameFormSDL..ctor(String text) at Xenko.Games.GameContextFactory.NewGameContext(AppContextType type) at Xenko.Games.GameBase.Run(GameContext gameContext) at GentrieveX.Linux.GentrieveXApp.Main(String[] args) in D:\Phr00tsSoftware\XenkoProjects\GentrieveX\GentrieveX.Linux\GentrieveXApp.cs:line 12
EDIT: "sudo apt-get install libsdl2-2.0-0" does NOT fix the problem
Looks like Linux needs to install just about all libsdl2 libraries for this to work. libsdl2-dev was the library that finally made the application try to start. Unfortunately, Vulkan wasn't supported in my Linux VM :(
It might not be a bad idea to have Xenko try to install libsdl2 packages... or we just need to document these libraries need to be installed for Linux to work.
Main issue resolved with https://github.com/phr00t/xenko/commit/259e1cc0afec83fce45f42ac19620cca8b57b262 though
When building Xenko projects, the Windows/bin/Release/... directory gets filled with everything you'd expect to run your Xenko project. However, Linux/bin/Release and Mac/bin/Release only get a small set of files...
I noticed this when BulletSharp.dll was being added to Windows releases, but not Linux or Mac releases.
I added BulletSharp.dll to deps/BulletPhysics/<Linux/macOS>, but it still needs to get from there into built project directories.