gdkchan / SPICA

Experimental H3D tool
The Unlicense
93 stars 46 forks source link

Add makefile and documentation for building with Mono #51

Closed iskunk closed 6 years ago

iskunk commented 6 years ago

Hi @gdkchan, I found that it is possible to compile/run SPICA from source on Linux using Mono. There is no documentation on doing this, however, so this PR adds that, plus a makefile to simplify the process.

In your original VG-Resource forum post on SPICA, you mentioned that you wanted to move away from WinForms to something that was more cross-platform compatible. Well, as it turns out, Mono has a (seemingly) complete implementation of WinForms. So for the sake of Linux and MacOS X compatibility, there does not appear to be a need to move to a different GUI toolkit. (I do appreciate your concern for cross-platform support, and likewise previously believed that WinForms was Windows-only.)

I've tested this build on my own setup, which is Ubuntu Linux (bionic/18.04) on amd64. Others will need to contribute details on what is different about building on CentOS/Fedora/etc. and MacOS X.

CuriousTommy commented 6 years ago

I tested this with yum repo you linked to, the steps are mostly the same as the Ubuntu steps, but I had to manually request dnf to install msbuild.

iskunk commented 6 years ago

@CuriousTommy, is there a metapackage you can install that pulls in everything necessary? On Debian/Ubuntu, mono-devel does this. What packages did you install?

Also, what specific (old) version of Mono is provided in the official Fedora repos?

I'll be happy to flesh out the Fedora section of the README file; I just need some bits of information like this.

Did the shader tweak from #47 work for you? That should allow SPICA to run using the Intel GPU on both your laptop and desktop systems.

CuriousTommy commented 6 years ago

@CuriousTommy, is there a metapackage you can install that pulls in everything necessary? On Debian/Ubuntu, mono-devel does this. What packages did you install?

None that I am aware of. I installed mono-devel, but the package manager doesn't seems to include msbuild. I also tried to install mono-complete, but that didn't include the msbuild either. However, I don't think it would be too bad to have people do this for the time being:

sudo dnf install mono-devel msbuild

Also, what specific (old) version of Mono is provided in the official Fedora repos?

[user@localhost ~]$ mono --version
Mono JIT compiler version 4.8.0 (Stable 4.8.0.520/8f6d0f6 Thu Jun  7 07:23:56 UTC 2018)
Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
    TLS:           __thread
    SIGSEGV:       normal
    Notifications: epoll
    Architecture:  amd64
    Disabled:      none
    Misc:          softdebug 
    LLVM:          supported, not enabled.
    GC:            sgen
iskunk commented 6 years ago

Okay, that is a strange situation with the package-dependency structure, but explicitly installing two packages isn't a big deal.

Greatly appreciate the information @CuriousTommy! I've pushed a new commit to this PR that elaborates the README file accordingly. I've also tweaked the wording and organization of the doc so that it flows better.

gdkchan commented 6 years ago

thanks 👍