Guide to compile leviathan

at the begenning i started by downloading and installing the prerequisites linked here:
https://leviathanengine.com/doc/develop/Documentation/html/dc/d9e/prerequisites.html

then i went there:https://github.com/Revolutionary-Games/Thrive/blob/engine_refactor/doc/setup_instructions.md
aftet installing all the prerequisites made a folder called “bulding_thrive” and went there clicked in (Shift + right click)
then clicked on “open command window here” and typed “git clone https://github.com/Revolutionary-Games/Thrive.git
cd Thrive” when it finished typed “git checkout engine_refactor” to switch to engine_refactor bransh (when the engine switch is done you will not need to do this)
then typed “ruby SetupThrive.rb thrive” when it asked me for options typed “Y” waited until it finished compiling and
it asked me for password typed “thrive” waited until thrive compiled and done.

note:after compiling boost go to Enviroment Variables then user Variables click new and for name Type “BOOST_ROOT”
for path type the installation folder of boost location (not thrive but boost :smiley: ) then click new again and for name
type “BOOST_HOME” for path the installation folder of boost location then click ok.

note:i enconterd tons of bugs and errors i did not mentioned here becuase nearly all of them have been ironed out
and i do not remember most of them :smiley: .

2 Likes

so far so good.Thanks for this thread by the way

1 Like

you are welcome :smiley:

Okay, im here to add some stuff:
A: If boost complains about a mismatch between 32 bit and 64 bit versions while compiling, make sure to use the visual studio 64 bit command prompt and add architecture=x86 to the list of arguments (alongside address-model=64)
After compiling you will see it compiled the 64 bit dlls, this is good.

Also, do not skip any steps under any circumstances, if cmake complains about not finding visual studio 2017 download a new version of cmake, also stick to 64 bit binaries for all the pre-reques!

B. In addition to the boost path variable mentioned on the setup page, also add an environment variable path for boost_home with the same variable data, also stack overflow is your friend.

C. Remember to install ruby gems

there we go :stuck_out_tongue:

2 Likes

I highly doubt that this is required. As the FindBoost.cmake file should check both of the environment variables.

1 Like

It would be really excellent if somebody put together an installer… It appears that a lot of new people (including myself) are joining and a quick (or at least easy to use) set-up tool would make getting started much easier.

I searched for a bit and putting together an installer for the prerequisites isn’t as easy as for the library dependencies (which are now setup automatically). Because the installer would have to somehow run: RubyInstaller, visual studio 2017 install and check the right boxes there (not sure if this is even possible), install cygwin with a specific package list (this seems to be the most possible, https://stackoverflow.com/a/14986916/4371508) cygwin also needs to be added to path, install 7zip and add it to path, download and unzip boost and open the right version of visual studio 2017 command prompt and run the setup for it.

And if any of these change we need to update the installer. So the best I can think of is having people manually install ruby and then run one script which would install the rest of the gems, download the hopefully up to date installers for everything and start them.

I’d imagine that there is a way to do it (I doubt it’d be easy), but I wouldn’t think it’d have to be too high of a priority. Perhaps this is newbie of me, but the things that proved the most difficult to figure out were figuring which version/edition of certain requirements to download, or if that didn’t matter, and figuring out the right method of compiling the boost libraries. Also when compiling the game on VS, you have to select a specific compiling method (is that the right terminology?), ie you can’t use the default debug. If we’re interested in providing a way for potential programmers to start contributing without having to join the development forum, perhaps we should create an in-depth guide on the community forum that includes many potential problems that might come up and how to solve them (I think someone might have already suggested that, if so, I guess I’m just repeating the idea).

Guys, please read my really cool docs:

It says there in a quick tip that “On Windows: when building Thrive in visual studio select RelWithDebInfo configuration (instead of Debug). Otherwise the build may fail.”

And if that or the leviathan prerequisites page is missing something please tell me (or even make pull request to improve them).

3 Likes

Whoops, my bad

I’ve gone through all of the prerequisites and cloned thrive but when I attempt to run

C:\Projects\Thrive>ruby SetupThrive.rb thrive

I receive the following message:

C:/Ruby24-x64/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in `require'
: cannot load such file -- nokogiri (LoadError)
    from C:/Ruby24-x64/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55
:in `require'
    from C:/Projects/Thrive/linux_setup/RubySetupSystem.rb:16:in `<top (requ
ired)>'
    from SetupThrive.rb:38:in `require_relative'
    from SetupThrive.rb:38:in `<main>'

I’ve never used ruby before now and my search of stackexchange has been unhelpful. Any advice?

look here where it says to install some ruby gems.

1 Like

nokogiri needs to be added to the list of gems. Once I installed that it worked.

I am almost 100% sure that only the master branch version of leviathan uses nokogiri. How are you running the setup?

As you said in this document
When running SetupThrive.rb I got a LoadError when nokogiri wasn’t installed.
Now I get past all of that and, after a few minutes, run into

ERROR: Setup failed for cAudio. Is a dependency missing? or some other cmake err
or?

So I’ll look at cmake and see if there’s something wrong there.

cAudio isn’t used currently. Did you use the right branch? Before running setup you have to do git checkout engine_refactor.

The way it was worded in the document made it appear that this was only necessary for working specifically on the engine swap. My bad.

It could be worded a bit better. What it’s trying to say if you want the version that is using the new engine (for working on it, or checking how well it works or something) you need to use that branch. Until it gets merged and then that note can be removed.

1 Like