Saturday 31 January 2009

Wednesday 28 January 2009

yay first page

ok this is rather old news but i wanted to put it in this blog all the same

the efforts i put for getting a testing bundle package of the hedegwars game were recognized and i was cited in the front page as "cool contributor" yay!


go hedge team!!

ps if you want to try the mac bundle of version 0.9.9 you can! the link is hidden somewhere in the general discussion forum! just take in consideration that it's still in testing

Tuesday 13 January 2009

HEDGEWARS finally compiles on Mac OS X

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_DIR

4 - 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.dpr

you 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/lib

5 - 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



All the projects here are under a Creative Commons 3.0 licence! You can use and distribute them as you like (just quote the author so he knows his work is not useless)!

If you wish to get in touch with me write at projectsymphony@gmail.com