Wargus / wargus

Importer and scripts for Warcraft II: Tides of Darkness, the expansion Beyond the Dark Portal, and Aleonas Tales
GNU General Public License v2.0
357 stars 55 forks source link

Compiling Wargus in Linux not working right #280

Closed DinkyDyeAussie closed 5 years ago

DinkyDyeAussie commented 6 years ago

I have successfully compiled stratagus no problem, using the following

cmake .. && make

while in the build folder inside the stratagus folder.

However it is a different story when I try to compile Wargus. Using the above parameter causes an error where it cannot find the 'stratagus-game-launcher.h' file, so I point to it with the follow parameters, because it also needs the stratagus binary, or Linux equivelent...Also I am in the Wargus folder, inside the build folder when using these parameters.

cmake .. -DCMAKE_INCLUDE_PATH= ../../stratagus -DCMAKE_PROGRAM_PATH= ../../stratagus/build

They don't error out, but instead of build the Wargus binaries, they rebuild the Stratagus ones instead, which shouldn't happen. I have already successfully built Wargus in Linux once before, but cannot remember how I did it.

I am using Linux Mint v19 xfce 64bit

timfel commented 6 years ago

Take a look at the .travis.yml, the variable to set for the stratagus-game-launcher.h file to be found is -DSTRATAGUS=stratagus -DSTRATAGUS_INCLUDE_DIR="../../stratagus/gameheaders". If you also want to build with Battle.net CD support, you also need to build StormLib and pass: -DSTORMLIB_INCLUDE_DIR="path/to/StormLib/src" -DSTORMLIB_LIBRARY="storm-lib-library-name"

DinkyDyeAussie commented 6 years ago

Followed all that script and did what was written - basically copied the parts I needed to run in the terminal. It all worked but right at the end it shows this text:

travis@travis:~/wargus/build$ cmake $EXTRA_CMAKE_FLAGS -DSTORMLIB_INCLUDE_DIR="$PWD/StormLib/src" -DSTORMLIB_LIBRARY="$STORMLIB" -DSTRATAGUS=stratagus -DSTRATAGUS_INCLUDE_DIR="$PWD/stratagus-master/gameheaders" ..

-- Found StormLib: /home/travis/wargus/build/"/home/travis/wargus/build/StormLib/libStorm.a" -- Configuring done -- Generating done -- Build files have been written to: /home/travis/wargus/build

then I type in 'make'

and then it starts compiling and then gets to rip-music.cpp and throws this error

make[2]: No rule to make target '"/home/travis/wargus/build/StormLib/libStorm.a"', needed by 'wartool'. Stop. CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/wartool.dir/all' failed make[1]: [CMakeFiles/wartool.dir/all] Error 2 Makefile:129: recipe for target 'all' failed make: *** [all] Error 2

What now? This is all really complex. I swear the other method is easier - the second one in the FAQ on wargus.github.io

timfel commented 5 years ago

You're stormlib path is wrong, it should not be quoted and relative to your build dir

timfel commented 5 years ago

I've now included StormLib with this repository and it is built automatically during cmake configure step on Linux and Mac