-
Notifications
You must be signed in to change notification settings - Fork 49
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
Compiling Guide for Linux #177
Comments
Nice! Thank you for writing this :) Do you mind if I include it in the documentation? |
Nice work! Reading this and the quoted forum thread after few months, I am thinking that maybe things are too complex, maybe a coder (me?) sh/could make it easier? A more usable solution for end user would be: creating a meta-project that uses the git submodule feature, and a cmake that does the git submodule sync and builds? I'll admit I don't know how to do that with cmake... shell would be easier for me. And still, it would not work on windows. |
is this way still work for the current version. i see that the author says its for version 3.5.5. also im trying to see if i can get it to work on a Pi4. so before i even started messing and getting angry. i thought i would ask |
One thing to note, unzipping oamldev from https://github.com/oamldev/oaml doesn't get oaml-master but oaml-1.3.4. Also there is no Wyrmgus-master but Wyrmgus-5.3.4. Had to make a directory called oaml inside of src/
|
The engine used to require the OAML library, but no longer does. So in the current version that step isn't needed :) |
There seem to be some issues while compiling, can you help ???
FWIW, did see https://stackoverflow.com/questions/65194181/unknown-modules-in-qt-location-private-positioning-private but there doesn't seem to be a debian positioning-private package at all. FWIW, I'm on Debian-testing with access to both debisn sid and experimental but can't find any sort of package in both the above package archives. |
Setting the WITH_GEOJSON option to OFF should solve the issue. It's not really necessary for playing (it's used only for development), since the map data is pre-generated and checked in the data repository (Wyrmsun). I should probably set that option to OFF by default. |
That would be in cmakelists.txt ??? |
Yes, but it's an option, so you can pass it to CMake, e.g.:
In any case, I've made that option be false by default now with this commit: ...so you can just use the latest master and it should work. |
damn, I downloaded the release, not the git repo :( Also was looking for this - https://stackoverflow.com/a/25317844/3597669 as there isn't a cmake clean command :( |
Also came across this -
Dunno if the tolua warning is significant or not. |
Good question. That warning has been in Stratagus for as long as I know the engine. It is unlikely to be an actual issue, I think. It's probably due to C++ global variables which are exposed to Lua via tolua++, but there are very few of them, and none of them are used in performance-critical code. |
In make after 72% -
|
Which compiler are you using? And which version? |
And cmake is -
Sharing both as I first used cmake and then make on the above. GCC is -
|
@shirishag75 Thanks! I've made some commits which might fix this issue: Let me know if it works! |
That worked.
Now I'm unsure what the next steps are, This is how it looks -
I want to play the game without installing it either in /usr/local/bin/ or /usr/local/games/. Any help would be useful. |
Could you share a snapshot or a release of the latest master so I could give a try again, thank you. |
I'm not entirely sure what you mean. Do you mean providing binaries of the latest master? |
npt binaries per-se but zip files, so I can just do as shared by OP. The only difference is no oaml needed :) |
Oh... well, why not just go to the repository, click on the "Code" button, and then "Download ZIP"? |
OMG, my bad sorry. Any answers to this though |
I would just try to scroll up after doing "cmake ." to read the rest of the output. Is that not viable for some reason? |
I use guake and in guake, yukake you just can't do it like that. Also I have a small monitor :( |
You could pipe the output to |
I have some trouble updating https://github.com/flathub/io.github.Andrettin.Wyrmsun because you require Boost 1.69, but also get |
This was requested in forum thread https://forum.freegamedev.net/viewtopic.php?f=94&t=12106
The following is my attempt. If it is OK, then I can sign up for the forum & add in this compiling guide. I raise the issue on GitHub because maybe this guide should go into readme.txt -- maybe people who are going to compile Wyrmsun are more likely to visit GitHub than to find the forum on FreeGameDev.net?
Written for Wyrmsun version 3.5.5
To compile Wyrmsun from GitHub on Linux, by downloading .ZIP files rather than cloning any Git repos:
Download the ZIP file from each of the following 3 GitHub pages:
https://github.com/Andrettin/Wyrmgus
https://github.com/oamldev/oaml
https://github.com/Andrettin/Wyrmsun
Unzip the 3 files. This will make folders called oaml-master/, Wyrmgus-master/, Wyrmsun-master/
All files that are in
oaml-master/
, copy them intoWyrmgus-master/src/oaml/
Open a terminal window in folder
Wyrmgus-master/
Begin the following 2-step loop, until
cmake
finishes without error:Step 1:
cmake .
The full-stop character (.) is needed !
Step 2: Look at the error message to find out which package of header files to install from your Linux distro's package-management system. On Debian-based distros, header-file package names end in “-dev”. Some examples are:
If CMake can't find Lua, try installing
liblua5.1-0-dev
If CMake can't find SDL, try installing
libsdl1.2-dev
If CMake can't find ToLua++, try installing
libtolua++5.1-dev
The one header package that wasn't in my distro was a recent enough version of Boost (Wyrmsun requires version 1.69 or higher). I installed
libboost1.70
ANDlibboost1.70-dev
fromppa:mhier/libboost-latest
If you aren't familiar with PPAs, you can verify what this PPA is by visiting https://launchpad.net/~mhier/+archive/ubuntu/libboost-latest
I needed to install
libboost1.70
(without the -dev suffix) because of the nature of header files. Header files just tell the compiler how to call routines that are in an installed library. If the library itself isn't installed, then the header files allow your app to be compiled, but when you run your app, your app will try to call the library & will fail because the library isn't there. ...... Libraries that are already installed by your distro (such as Lua and SDL) you don't need to install manually when you install the
-dev
header packages. Boost 1.70, on the other hand, wasn't installed by my distro, so I needed to install it (the library, in addition to the header files).An exception to that rule seems to be ToLua++: It seems to have only a “-dev” package; there isn't a non-“-dev” package.
In order to install Boost 1.70, I needed to un-install
libboost-dev
ANDlibboost1.58-dev
that had been provided by my distro.End loop.
Type the following in your terminal window:
make
This will make an executable called
stratagus
Copy that file to
/usr/local/bin/
and rename the file towyrmgus
(
/usr/local/bin/
should already be one of the folders listed in your PATH environment-variable. This way, when Wyrmsun tries to run an executable calledwyrmgus
, Linux will find the file that you copied to/usr/local/bin/
.)sudo make install
This will copy the
stratagus
executable to/usr/local/games/
, leaving the filename asstratagus
, which is the wrong filename. Thestratagus
executable needs to be calledwyrmgus
because the executablewyrmsun
, that will be made in the next few steps, is just a shell script that runswyrmgus
with a command-line parameter that points to thewyrmsun
data files.I left in the above
sudo make install
in case, now or in the future, that command does anything other than copy thestratagus
executable with the wrong filename.I happen to prefer installing games to
/usr/local/bin/
, but you can use/usr/local/games/
instead of/usr/local/bin/
if you want.cd ../Wyrmsun-master
Repeat the same “cmake .” loop as for Wyrmgus
(Apparently, with Wyrmsun, unlike Wyrmgus, the
make
step isn't used, because no code is compiled for Wyrmsun. Wyrmsun consists of data files that are simply copied from your local Git repo or .ZIP file into/usr/local/
subfolders on your computer; this copying is done in the next step.)sudo make install
You should now find Wyrmsun in the applications menu of your desktop environment.
The text was updated successfully, but these errors were encountered: