-
Notifications
You must be signed in to change notification settings - Fork 58
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Game does not compile on Linux out of the box for several reasons #4
Comments
The game still does not start though, after I have copied ./HostileTakeover executable to ~/Games/HostileTakeover/ along with two files which were copied by script install.sh with this error message:
Apparently it can't find this file: htdata832.pdb. I thought that it's because of makefile having hardcoded path: -rpath ~/Games/HostileTakeover -lcurl -lpthread but I'm not sure. I didn't get REL=1 build to start but debug build shows a window. |
Files game/sdl/sdlpackfile.cpp and mpshared/packinfomanager.cpp have lines "return false;" which cause type mismatch:
|
To get past "Incorrect game graphics version or no game graphics installed" for the release build, the database version check must be more permissive. That can be done by sending in true for fUpwardCompatOK for the last call to Game::CheckDatabaseVersion(). So change line 1438 in game.cpp from: |
sathisse, thanks. Your suggestion worked, now release build works for me. |
It's been a while since I've had the time to work on this project. I didn't work much with the Linux port and makefile beyond getting it to build/run on my machine. Feel free to send pull requests. |
what about the web version? |
First of all, you hardcode "g++-5" in game/sdl/linux/makefile
To continue compilation I had to remove -5 from several places on top of the make file so that executable is just "g++".
Then build has stopped because of missing #include <stdio.h> in several files:
game/httppackinfomanager.cpp with error: 'fopen' was not declared in this scope
game/httppackmanager.cpp:54:51: error: 'fopen' was not declared in this scope
mpshared/packinfomanager.cpp:43:54: error: 'fopen' was not declared in this scope
mpshared/indexloader.cpp:12:38: error: 'fopen' was not declared in this scope
Next problem was:
../../gameform.cpp:4:30: fatal error: game/Multiplayer.h: No such file or directory
compilation terminated.
../../Multiplayer.cpp:2:30: fatal error: game/Multiplayer.h: No such file or directory
compilation terminated.
In fact this file does not exist, however file game/multiplayer.h does. So changing this two files to multiplayer.h did work.
After those five files the game compile successfully.
Another problem is with file game/sdl/linux/install.sh
It uses
if ! dpkg -l | grep libsdl2-dev > /dev/null ; then
This line which would only work in distributions based on deb packages, such as Debian and Ubuntu but not in other distributions. I think it's better to say that SDL2 is required for building and recommend to install this two packages: libsdl2-dev libcurl4-openssl-dev in your readme file
(though in my distribution -dev packages are not separated from main packages)
The text was updated successfully, but these errors were encountered: