Let's compile Lugaru together!

Let's compile Lugaru together!

Postby qubodup » 12 May 2010, 12:02

I'm on Arch Linux 64bit and I want to compile Lugaru. This might be a problem, because it does not support 64bit. Let's still try it!
{l Code}: {l Select All Code}
hg clone http://hg.icculus.org/icculus/lugaru
cd lugaru
cd ../libpng-1.2.8
cp scripts/makefile.linux makefile
make
cd ../libvorbis-1.0.1
./configure
make
cd ..
sed -i 's|/opt/crosstool/gcc-4.1.2-glibc-2.3.6/i686-unknown-linux-gnu/i686-unknown-linux-gnu/bin/||' makefile
make

I get error:
{l Code}: {l Select All Code}
Source/OpenGL_Windows.cpp:1525:35: error: invalid conversion from ‘const char*’ to ‘char*’
Source/OpenGL_Windows.cpp: In function ‘bool load_image(const char*, TGAImageRec&)’:
Source/OpenGL_Windows.cpp:2579:39: error: invalid conversion from ‘const char*’ to ‘char*’
Source/OpenGL_Windows.cpp: In function ‘bool save_image(const char*)’:
Source/OpenGL_Windows.cpp:2743:39: error: invalid conversion from ‘const char*’ to ‘char*’
make: *** [bin/Source/OpenGL_Windows.o] Error 1

Anybody made it to a higher level?

I found a fork, maybe it works better?
{l Code}: {l Select All Code}
git clone http://github.com/pvtcupcakes/Lugaru.git
cd Lugaru
make

Simpler, and it compiles! On 64bit!
{l Code}: {l Select All Code}
cd Data
./lugaru-bin

Since there's no game data, all I see is
2010-05-12-125236_1920x1200_scrot.png

I can't start a level, again: no data.
Or am I missing something I could start via console? :)

PS: Since I have the game, I just copy the game Data/ dir into the Data/ dir of the git repo and when I start it, I can see the following:
2010-05-12-125901_1920x1200_scrot.png.jpg

Nice...
It also starts the game, although GLC can't seem to record it and I can't play windowed, so I can't use ffmpeg.
User avatar
qubodup
Global Moderator
 
Posts: 1671
Joined: 08 Nov 2009, 22:52
Location: Berlin, Germany

Re: Let's compile Lugaru together!

Postby Feko » 14 May 2010, 00:52

YeaH, i got those errors during the "make" process.

So, i opened Source/OpenGL_Windows.cpp and in those lines, replace:

From:
char *prt = strrchr(argv0, '/');

To:
char *prt = const_cast<char *>( strrchr(argv0, '/'));

It worked... But there is no rules for "make install" in makefile =[
Feko
 
Posts: 1
Joined: 14 May 2010, 00:49

Re: Let's compile Lugaru together!

Postby qubodup » 14 May 2010, 10:52

Feko {l Wrote}:It worked... But there is no rules for "make install" in makefile =[

You should be able to run the executable (in Data/?) without installing.
User avatar
qubodup
Global Moderator
 
Posts: 1671
Joined: 08 Nov 2009, 22:52
Location: Berlin, Germany

Who is online

Users browsing this forum: No registered users and 1 guest