gdkchan / SPICA

Experimental H3D tool
The Unlicense
95 stars 46 forks source link

Linux build? #12

Closed EmpressFiona closed 7 years ago

EmpressFiona commented 7 years ago

For various reasons, I left the Windows world behind a while back...before I got a chance to try SPICA's automated builds. While I am considering setting up a Windows To Go environment for this and other reasons, I figured I may as well ask about this.

I'm used to building from makefiles and other Linux-typical methods, but Mono's completely different. I've got no clue what could be wrong here, so here's the terminal dump:

fiona@ophelia:~/SPICA$ xbuild XBuild Engine Version 14.0 Mono, Version 4.6.2.0 Copyright (C) 2005-2013 Various Mono authors

Build started 2017-06-10 12:58:31 AM.


/home/fiona/SPICA/SPICA/SPICA.shproj: warning : Could not find project file /usr/lib/mono/xbuild/Microsoft/VisualStudio/v/CodeSharing/Microsoft.CodeSharing.Common.Default.props, to import. Ignoring.
/home/fiona/SPICA/SPICA/SPICA.shproj: warning : Could not find project file /usr/lib/mono/xbuild/Microsoft/VisualStudio/v/CodeSharing/Microsoft.CodeSharing.Common.props, to import. Ignoring.
/home/fiona/SPICA/SPICA/SPICA.shproj: warning : Could not find project file /usr/lib/mono/xbuild/Microsoft/VisualStudio/v/CodeSharing/Microsoft.CodeSharing.CSharp.targets, to import. Ignoring.
/home/fiona/SPICA/SPICA.Renderer/SPICA.Renderer.shproj: warning : Could not find project file /usr/lib/mono/xbuild/Microsoft/VisualStudio/v/CodeSharing/Microsoft.CodeSharing.Common.Default.props, to import. Ignoring.
/home/fiona/SPICA/SPICA.Renderer/SPICA.Renderer.shproj: warning : Could not find project file /usr/lib/mono/xbuild/Microsoft/VisualStudio/v/CodeSharing/Microsoft.CodeSharing.Common.props, to import. Ignoring.
/home/fiona/SPICA/SPICA.Renderer/SPICA.Renderer.shproj: warning : Could not find project file /usr/lib/mono/xbuild/Microsoft/VisualStudio/v/CodeSharing/Microsoft.CodeSharing.CSharp.targets, to import. Ignoring.
/home/fiona/SPICA/SPICA.sln: warning : Don't know how to handle GlobalSection SharedMSBuildProjectFiles, Ignoring. Project "/home/fiona/SPICA/SPICA.sln" (default target(s)): Target ValidateSolutionConfiguration: Building solution configuration "Debug|Any CPU". Target Build: Project "/home/fiona/SPICA/SPICA.WinForms/SPICA.WinForms.csproj" (default target(s)): Target PrepareForBuild: Configuration: Debug Platform: AnyCPU Created directory "bin/Debug/" Created directory "obj/Debug/" Target ResolveAssemblyReferences: /usr/lib/mono/xbuild/14.0/bin/Microsoft.Common.targets: warning : Reference 'System.Data.DataSetExtensions' not resolved For searchpath {CandidateAssemblyFiles} Warning: {CandidateAssemblyFiles} not supported currently For searchpath {HintPathFromItem} HintPath attribute not found For searchpath {TargetFrameworkDirectory} Considered target framework dir /usr/lib/mono/4.5/, assembly named 'System.Data.DataSetExtensions' not found. For searchpath {PkgConfig} Considered System.Data.DataSetExtensions, but could not find in any pkg-config files. For searchpath {GAC} Considered System.Data.DataSetExtensions, but could not find in the GAC. For searchpath {RawFileName} Considered 'System.Data.DataSetExtensions' as a file, but the file does not exist For searchpath bin/Debug/ Considered '/home/fiona/SPICA/SPICA.WinForms/bin/Debug/System.Data.DataSetExtensions' as a file, but the file does not exist Considered '/home/fiona/SPICA/SPICA.WinForms/bin/Debug/System.Data.DataSetExtensions.exe' as a file, but the file does not exist Considered '/home/fiona/SPICA/SPICA.WinForms/bin/Debug/System.Data.DataSetExtensions.dll' as a file, but the file does not exist /usr/lib/mono/xbuild/14.0/bin/Microsoft.Common.targets: warning : Reference 'System.Deployment' not resolved For searchpath {CandidateAssemblyFiles} Warning: {CandidateAssemblyFiles} not supported currently For searchpath {HintPathFromItem} HintPath attribute not found For searchpath {TargetFrameworkDirectory} Considered target framework dir /usr/lib/mono/4.5/, assembly named 'System.Deployment' not found. For searchpath {PkgConfig} Considered System.Deployment, but could not find in any pkg-config files. For searchpath {GAC} Considered System.Deployment, but could not find in the GAC. For searchpath {RawFileName} Considered 'System.Deployment' as a file, but the file does not exist For searchpath bin/Debug/ Considered '/home/fiona/SPICA/SPICA.WinForms/bin/Debug/System.Deployment' as a file, but the file does not exist Considered '/home/fiona/SPICA/SPICA.WinForms/bin/Debug/System.Deployment.exe' as a file, but the file does not exist Considered '/home/fiona/SPICA/SPICA.WinForms/bin/Debug/System.Deployment.dll' as a file, but the file does not exist /usr/lib/mono/xbuild/14.0/bin/Microsoft.Common.targets: warning : Reference 'System.Net.Http' not resolved For searchpath {CandidateAssemblyFiles} Warning: {CandidateAssemblyFiles} not supported currently For searchpath {HintPathFromItem} HintPath attribute not found For searchpath {TargetFrameworkDirectory} Considered target framework dir /usr/lib/mono/4.5/, assembly named 'System.Net.Http' not found. For searchpath {PkgConfig} Considered System.Net.Http, but could not find in any pkg-config files. For searchpath {GAC} Considered System.Net.Http, but could not find in the GAC. For searchpath {RawFileName} Considered 'System.Net.Http' as a file, but the file does not exist For searchpath bin/Debug/ Considered '/home/fiona/SPICA/SPICA.WinForms/bin/Debug/System.Net.Http' as a file, but the file does not exist Considered '/home/fiona/SPICA/SPICA.WinForms/bin/Debug/System.Net.Http.exe' as a file, but the file does not exist Considered '/home/fiona/SPICA/SPICA.WinForms/bin/Debug/System.Net.Http.dll' as a file, but the file does not exist Target CopyFilesMarkedCopyLocal: Copying file from '/home/fiona/SPICA/Libraries/OpenTK.dll' to '/home/fiona/SPICA/SPICA.WinForms/bin/Debug/OpenTK.dll' Copying file from '/home/fiona/SPICA/Libraries/OpenTK.GLControl.dll' to '/home/fiona/SPICA/SPICA.WinForms/bin/Debug/OpenTK.GLControl.dll' Target CopyNonResxEmbeddedResources: Copying file from '/home/fiona/SPICA/SPICA.Renderer/Shaders/GUIColFragmentShader.glsl' to '/home/fiona/SPICA/SPICA.WinForms/obj/Debug/SPICA.WinForms.Shaders.GUIColFragmentShader.glsl' Copying file from '/home/fiona/SPICA/SPICA.Renderer/Shaders/GUIVertexShader.glsl' to '/home/fiona/SPICA/SPICA.WinForms/obj/Debug/SPICA.WinForms.Shaders.GUIVertexShader.glsl' Copying file from '/home/fiona/SPICA/SPICA.Renderer/Shaders/GUIFragmentShader.glsl' to '/home/fiona/SPICA/SPICA.WinForms/obj/Debug/SPICA.WinForms.Shaders.GUIFragmentShader.glsl' Copying file from '/home/fiona/SPICA/SPICA.Renderer/Shaders/MdlFragmentShader.glsl' to '/home/fiona/SPICA/SPICA.WinForms/obj/Debug/SPICA.WinForms.Shaders.MdlFragmentShader.glsl' Copying file from '/home/fiona/SPICA/SPICA.Renderer/Shaders/MdlVertexShader.glsl' to '/home/fiona/SPICA/SPICA.WinForms/obj/Debug/SPICA.WinForms.Shaders.MdlVertexShader.glsl' Done building project "/home/fiona/SPICA/SPICA.WinForms/SPICA.WinForms.csproj".-- FAILED Task "MSBuild" execution -- FAILED Done building target "Build" in project "/home/fiona/SPICA/SPICA.sln".-- FAILED Done building project "/home/fiona/SPICA/SPICA.sln".-- FAILED

Build FAILED.

Warnings:

/home/fiona/SPICA/SPICA/SPICA.shproj: warning : Could not find project file /usr/lib/mono/xbuild/Microsoft/VisualStudio/v/CodeSharing/Microsoft.CodeSharing.Common.Default.props, to import. Ignoring. /home/fiona/SPICA/SPICA/SPICA.shproj: warning : Could not find project file /usr/lib/mono/xbuild/Microsoft/VisualStudio/v/CodeSharing/Microsoft.CodeSharing.Common.props, to import. Ignoring. /home/fiona/SPICA/SPICA/SPICA.shproj: warning : Could not find project file /usr/lib/mono/xbuild/Microsoft/VisualStudio/v/CodeSharing/Microsoft.CodeSharing.CSharp.targets, to import. Ignoring. /home/fiona/SPICA/SPICA.Renderer/SPICA.Renderer.shproj: warning : Could not find project file /usr/lib/mono/xbuild/Microsoft/VisualStudio/v/CodeSharing/Microsoft.CodeSharing.Common.Default.props, to import. Ignoring. /home/fiona/SPICA/SPICA.Renderer/SPICA.Renderer.shproj: warning : Could not find project file /usr/lib/mono/xbuild/Microsoft/VisualStudio/v/CodeSharing/Microsoft.CodeSharing.Common.props, to import. Ignoring. /home/fiona/SPICA/SPICA.Renderer/SPICA.Renderer.shproj: warning : Could not find project file /usr/lib/mono/xbuild/Microsoft/VisualStudio/v/CodeSharing/Microsoft.CodeSharing.CSharp.targets, to import. Ignoring. /home/fiona/SPICA/SPICA.sln: warning : Don't know how to handle GlobalSection SharedMSBuildProjectFiles, Ignoring.

/home/fiona/SPICA/SPICA.sln (default targets) -> (Build target) -> /home/fiona/SPICA/SPICA.WinForms/SPICA.WinForms.csproj (default targets) -> /usr/lib/mono/xbuild/14.0/bin/Microsoft.Common.targets (ResolveAssemblyReferences target) ->

    /usr/lib/mono/xbuild/14.0/bin/Microsoft.Common.targets:  warning : Reference 'System.Data.DataSetExtensions' not resolved
    /usr/lib/mono/xbuild/14.0/bin/Microsoft.Common.targets:  warning : Reference 'System.Deployment' not resolved
    /usr/lib/mono/xbuild/14.0/bin/Microsoft.Common.targets:  warning : Reference 'System.Net.Http' not resolved

     10 Warning(s)
     0 Error(s)

Time Elapsed 00:00:00.3862660

There's probably just something really obvious that I've missed, given that I'm not a dev and I've never compiled anything with Mono before. I did install the OpenTK dependencies, but that doesn't appear to be the issue itself.

Any ideas how to build this? And could we perhaps see automated Linux builds alongside the Windows builds? I need to take glamour shots of Lusamine...

gdkchan commented 7 years ago

You should be able to run the "windows" build directly on linux with mono, since all the dependencies on the program are dependencies for the .net framework itself, and not some windows API. Just running "mono SPICA.WinForms.exe" should be enough, but you'll need to have mono winforms lib installed aswell.

About the compilation error, I'm not sure either, since it doesn't output actual error messages, just warnings, but peharps the problem is that it seems to be targeting .net framework 4.5, but the project currently target 4.6 (due to the System.Numerics.Vector dependency). I'll try building it with xbuild later and try to figure out what is broken.

About running it on linux, I was thinking in using .net core since it is actually open and supports Linux and Mac natively, but then there's the issue that it doesn't supports winforms (obviously), and I'll need to redo all the UI work, which I don't want to for now, I want to keep working to improve the currently supported formats.

gdkchan commented 7 years ago

Just tried to compile with xbuild under linux. On Linux Mint with pre-installed version (same as ubuntu) it gave me basically the same output you pasted here. So I updated mono to the lastest stable version (5.0.1.1) and it worked (had to make minor fixes to the source that I'll push soon). Anyway here is it running under linux with mono:

Edit: Just pushed the fixes I said earlier. You should be able to compile it with the lastest stable version of mono on linux now. Let me know if you have any further problems.

EmpressFiona commented 7 years ago

screenshot_20170610_211851

Success!

After getting your latest push, I had to install mono-complete and/or use msbuild instead of xbuild (not sure which was the issue), but it worked just fine after that.

The only issue I have left is that overworld models are both lit very strangely and don't appear to have any attached material animations, but that might just be an issue with the files I'm using or my inexperience in the subject. Right now, Lusamine looks less like she's throwing a tantrum and more like she's in the middle of squatting for a sprint:

screenshot_20170610_212108

gdkchan commented 7 years ago

Glad it worked!

The lighting on the overworld model is due to the way the model configures the fragment lighting parameters. It's like phong shading, maybe the game configures the lights in a way that doesn't make the darker shades so dark. I'll add controls to configure the light later, atm light colors are hardcoded.

About the facial animation, yea they aren't included with the overworld models. Maybe they are all on a single file, since overworld characters faces follows a pattern, and the animation itself just translates the texture to change the character face.

EmpressFiona commented 7 years ago

Thanks for your prompt help on all of this! 💜 I'll check in with VG Resource for help with the animations.