Page 1 of 1

How to make ZK work on your Linux setup

Posted: 17 Mar 2012, 19:57
by varikonniemi
Since ZK has decided to use some arbitary dev version of Spring, you moust compile it yourself from GIT.

I spent two hours figuring it out, but here is how you set it step by step on vanilla ubuntu 11.10:

Code: Select all

sudo apt-get install git

Code: Select all

sudo apt-get install g++

Code: Select all

sudo apt-get build-dep spring
this gets all the packages needed to compile spring. For me it was a download of some 1 gigs worth of data on vanilla ubuntu 11.10.

Code: Select all

git clone git://github.com/spring/spring.git && cd spring && git checkout 6cefe1d4e60432a67bcc29bd3bd252278b8ddeb6 && cmake . && make -j 2 && sudo make install
This took almost an hour on the highest-end c2d processor utilizing its two cores. Substitute -j 2 with the amount of cores you have, eg -j 4 (thanks sirmaverick)

After this you open the hidden folder in ~/.springlobby and change the line containing

Code: Select all

set DisableVersionCheck=0
to

Code: Select all

set DisableVersionCheck=1
SL must be closed while doing this, otherwise it will overwrite the change at close.

Then you must change SL to use your compiled spring, instead of the packaged one. Open the SL settings, and replace the spring and unitsync wth these

Code: Select all

/usr/local/bin/spring
/usr/local/lib/libunitsync.so
Then you can play ZK again under linux.

As an PS. i have to say this method of fixing things is really dirty, and does not consider the gamers convenience in any way. Release a fixed spring that gets updated to the repositories, and that would be all. This was really messy, and took a long time to figure out even with the excellent help of Burp and some parts by Licho.

Re: How to make ZK work on your Linux setup

Posted: 17 Mar 2012, 21:54
by Saktoth
We wish the engine developers would release a fixed version of Spring, but its been too long with the critical bugs in this release that it is better to have the game functioning.

Until then, you can still play on the 'Teams old version' springie if you cant or do not want to figure out how to compile the new engine version.

Re: How to make ZK work on your Linux setup

Posted: 18 Mar 2012, 00:15
by SirMaverick
You don't need to point to a different libunitsync.so in SL. Just the spring binary.

Faster compiling: make -j 2 will compile on 2 core.

Re: How to make ZK work on your Linux setup

Posted: 19 Mar 2012, 17:49
by hoijui
minor adjustment:
the genreal rule for the -j parameter is to use #cores+1, so for a dual core, you would use -j 3.
this +1 will not bring too much of a performance boost though.

Re: How to make ZK work on your Linux setup

Posted: 19 Mar 2012, 17:57
by koshi
To be less invasive it would also be a good idea to install into a prefix outside of $PATH like /opt/zerok
Otherwise the manual install in /usr/local will globally and "forever" override spring's debian package install.

Re: How to make ZK work on your Linux setup

Posted: 21 Mar 2012, 13:59
by varikonniemi
I can say the -j 2 made it use my two cores, while without it it only used one. You might be technically correct, but this worked for me.

koshi: i have no clue about that one. I was told to change the bin target from /usr/bin/spring to usr/local/bin/spring and /usr/lib/libunitsync.so to /usr/local/lib/libunitsync.so so i assumed they did not go to the same directory. Of course the ones helping me could have been wrong, i just hope the next release will work once i do an apt-get upgrade.

In the future, if you decide to use dev builds, please take the time to post how to get things working under a system that does not use ZKL. (i have no idea about what it means to install outside a prefix $PATH)

edit: ubuntu packaged bin seems to be in in /usr/games/spring

Re: How to make ZK work on your Linux setup

Posted: 21 Mar 2012, 14:21
by burp
hoijui wrote:minor adjustment:
the genreal rule for the -j parameter is to use #cores+1, so for a dual core, you would use -j 3.
this +1 will not bring too much of a performance boost though.
Only if you use a bad scheduler. Use BFS -.-
Of course the ones helping me could have been wrong
Nope :)

Re: How to make ZK work on your Linux setup

Posted: 21 Mar 2012, 14:28
by koshi
varikonniemi wrote:i have no idea about what it means to install outside a prefix $PATH
set CMAKE_INSTALL_PREFIX to /opt/zerok for example

Re: How to make ZK work on your Linux setup

Posted: 21 Mar 2012, 15:04
by dansan
If you happen to already have run cmake and wish to change the install-path later, you can edit the variable CMAKE_INSTALL_PREFIX in CMakeCache.txt

Re: How to make ZK work on your Linux setup

Posted: 22 Mar 2012, 11:46
by wolas
Just curious how much players dropped when you started using this experimental spring version? I m kinda busy now with studies and lazy to compile it and its good I guess more time spent on studies...

And by the way new official spring version will be released any time soon?

Re: How to make ZK work on your Linux setup

Posted: 22 Mar 2012, 12:52
by Licho
We made record number of players since then wolas..

Re: How to make ZK work on your Linux setup

Posted: 23 Mar 2012, 16:11
by varikonniemi
Once again 88 was pushed to zk before it was pushed to server (and repos), so here is what you need to do (taking into consideration the first post in this thread)

Code: Select all

git clone git://github.com/spring/spring.git && cd spring && git checkout 88.0 && cmake . && make -j 3 && sudo make install

Re: How to make ZK work on your Linux setup

Posted: 23 Mar 2012, 16:39
by koshi
That's wrong. You need to check out the matching tag, not a branch that's been obsolete for months.

Re: How to make ZK work on your Linux setup

Posted: 23 Mar 2012, 17:11
by varikonniemi
Well could you tell me then the correct one, and how to get the tag, since that is what i used after reading some git --help and it works and compiled a working 88.0 for me.

edit: changed it to git checkout 88.0 which i assume is the correct way to do it?

Code: Select all

git tag
shows tagged releases available, i still have no idea how to find a dev release like the last one used

Code: Select all

git checkout 6cefe1d4e60432a67bcc29bd3bd252278b8ddeb6