News:

SMF - Just Installed!

Main Menu

Running on Linux

Started by qubodup, March 10, 2010, 04:39:04 PM

Previous topic - Next topic

qubodup

Hello,

I managed to compile knights, after adding '-mt' to libboost_threads in the Makefile.
I have now knights and knights_server binaries in the root folder
Then I run ./start_knights_server.sh and get
nohup: appending output to `nohup.out'
nohup: failed to run command `knights_server': No such file or directory

If I try to run ./knights, then I get
error loading 'client_config.txt': could not open file
even, if I first copy "knights_config.txt" to "client_config.txt".

Am I doing something wrong?

Thanks

duke

The start_knights_server.sh isn't ready. You have to edit the file by hand with a text editor like nano or vim. Change line 20 to your knights_server location and knights_config.txt location.

Try running as root. Maybe the game can't access the client_config.txt, because the file is not readable for the current user.


qubodup

Allright, I realized that I don't need to run the server first and that all that was missing was the data path parameter.

$ ./knights -d ./knights_data/
Works!

(I usually try avoid installing self-compiled software and always forget that they usually expect data in a /usr/shared... directory :) )

Stephen

Sorry about the delay replying... have been a bit busy lately.

If you use 'make install' you don't need to supply the data path parameter. You can always install to somewhere in your home directory:

make PREFIX=$HOME/knights_test
make install PREFIX=$HOME/knights_test

Then run the game by running ~/knights_test/bin/knights and it should all work as intended. (You may want to add ~/knights_test/bin to your path in this case.) To uninstall just delete ~/knights_test.

The start_knights_server.sh is only really needed if you want to make sure the server is restarted after it crashes. (It's intended to be set up as a cron job, to be run every 5 minutes or so. It checks whether knights_server is running and if not, restarts it.) Otherwise, you can just run knights_server directly. You can edit the knights_config.txt to give the path to the knights_data folder if you need to.

Hope this helps.