Hi all!
I believe that Hedgewars is really a neat game and i'm sure it will increasly become more popular with such development pace.
I really like the development choices like QT4 and cmake because with them it's really easy to port to several archs.
In fact the linux and windows builds are there and work fine! What about MacOSX?
i've seen many others in the forums asking this question and so i started looking at the problem, making up my mind that i had to find it!
It was a long night, but completely worth it :)
The problem is at the linking stage for the final hwengine executable! the freepasacal compiler seems to forget every library path that was configured; so with a small modification we finally get the mac executable!
LETS START
1 - download and install MacPorts from
www.macports.org to the default install dir
2 - from a Terminal, install all the necessary software
sudo port install qt4-mac libsdl libsdl_mixer libsdl_image libsdl_ttf libsdl_net cmake
it is a rather long procedure, manly due to qt framework; if you're an impatient guy there are some builds around (
like these)
i also installed SDL (and all its friends) from the SDL homepage (
http://www.libsdl.org/) just to be on the safe side... i don't know whether they're compulsory or not
3 - unpack the hedgewars source and run this command
cmake ../hedgewars-src-0.9.8 -DCMAKE_CXX_FLAGS="-O2" -DQT_QMAKE_EXECUTABLE=/opt/local/bin/qmake-mac -Wno-dev -DCMAKE_BUILD_TYPE=Release
if you like, you can change the default install location by setting
-DCMAKE_INSTALL_PREFIX and
-DDATA_INSTALL_DIR4 - before running make, you have to modify the following file:
CMakeFiles/hwengine.dir/build.make, so open it and find the line that invokes the freepascal compiler
mine was like this
/usr/local/bin/fpc -B -FE../bin -Cs2000000 -vwi -O2 /(path-to-sources)/hedgewars-src-0.9.8/hedgewars/hwengine.dpryou just have to add
-Fl/opt/local/lib at the end, like
/usr/local/bin/fpc -B -FE../bin -Cs2000000 -vwi -O2 /(path-to-sources)/hedgewars-src-0.9.8/hedgewars/hwengine.dpr -Fl/opt/local/lib5 - run make and sudo make install
6 - PLAY!!! just open terminal and write hedgewars
it's rather long for an install procedure but it really works :)
right now i'm working on the bundle archive, but i believe it'll take from me more than i thought
i hope that someone can find it useful :)
(and that the dev correct the workaround at 4)
Vitto