Page 1 of 1

Problem compiling latest svn (r.237)

PostPosted: 03 Feb 2012, 20:00
by ctdabomb
How do you update this? uninstall and redo the process? or what?

Problem compiling svn (r.237)

PostPosted: 03 Feb 2012, 20:07
by Edward_Lii
Hello ctdabomb,

ctdabomb {l Wrote}:How do you update this? uninstall and redo the process? or what?

IIRC you have compiled the source archive, which is the stable release.
That will mean that in order to update you'll have to wait for version 0.3 :p

I assume you want to try the latest svn version?
To do this you have to run this command from terminal:
{l Code}: {l Select All Code}
svn co https://meandmyshadow.svn.sourceforge.net/svnroot/meandmyshadow meandmyshadow

Make sure that subversion is installed, it will download the source and data files.
If there are no errors you'll have a folder named meandmyshadow in the folder you ran the command.
Enter this folder by running this command:
{l Code}: {l Select All Code}
cd meandmyshadow


Now it's exactly the same as the source archive:
{l Code}: {l Select All Code}
cmake .

{l Code}: {l Select All Code}
make


There is however a new dependency named openssl.
Not sure how the package is named under Ubuntu, but whatever it is make sure you got the -dev(el) package too.

The next time you want to update you can simply run this command in the meandmyshadow folder:
{l Code}: {l Select All Code}
svn up


If you've got any questions or encounter any problems just ask. ;)

Re: Problem compiling V0.2rc1

PostPosted: 03 Feb 2012, 20:21
by ctdabomb
I already have svn.
Edward_Lii {l Wrote}: The next time you want to update you can simply run this command in the meandmyshadow folder:
{l Code}: {l Select All Code}
svn up


If you've got any questions or encounter any problems just ask. ;)

Thanks

Re: Problem compiling V0.2rc1

PostPosted: 03 Feb 2012, 20:44
by ctdabomb
I get this error. :(
{l Code}: {l Select All Code}
/home/ctdabomb/meandmyshadow/src/Functions.cpp: In function ‘void drawGUIBox(int, int, int, int, SDL_Surface*, Uint32)’:
/home/ctdabomb/meandmyshadow/src/Functions.cpp:84: error: ‘roundedBoxRGBA’ was not declared in this scope
/home/ctdabomb/meandmyshadow/src/Functions.cpp:87: error: ‘roundedRectangleRGBA’ was not declared in this scope
make[2]: *** [CMakeFiles/meandmyshadow.dir/src/Functions.cpp.o] Error 1
make[1]: *** [CMakeFiles/meandmyshadow.dir/all] Error 2
make: *** [all] Error 2

Re: Problem compiling V0.2rc1

PostPosted: 03 Feb 2012, 21:10
by MCMic
wrong topic, you should talk about this in a new one.

Re: Problem compiling V0.2rc1

PostPosted: 03 Feb 2012, 21:12
by Edward_Lii
Hello ctdabomb,

ctdabomb {l Wrote}:I get this error. :(

Oh, you should also have sdl_gfx and its development package installed.
CMake should have warned/thrown an error if SDL_gfx is missing.

MCMic {l Wrote}:wrong topic, you should talk about this in a new one.

I will split this topic. ;)

Re: Problem compiling svn (r.237)

PostPosted: 03 Feb 2012, 21:21
by ctdabomb
hmmm.... okay I will fix that.

Re: Problem compiling svn (r.237)

PostPosted: 04 Feb 2012, 18:12
by odamite
It turns out that older versions of SDL_gfx doesn't support rounded rectangle/box functions. Should we make those borders sharp or draw them without SDL_gfx functions?

Here's that function which works with older versions:
{l Code}: {l Select All Code}
void drawGUIBox(int x,int y,int w,int h,SDL_Surface* dest,Uint32 color){
   boxRGBA(screen,x+1,y+1,x+w-2,y+h-2,color >> 24,color >> 16,color >> 8,color >> 0);
   rectangleRGBA(screen,x,y,x+w-1,y+h-1,0,0,0,160);
   rectangleRGBA(screen,x+1,y+1,x+w-2,y+h-2,0,0,0,64);
   rectangleRGBA(screen,x,y,x+w-1,y+h-1,0,0,0,255);
}

Re: Problem compiling svn (r.237)

PostPosted: 04 Feb 2012, 22:40
by Edward_Lii
Hello odamite,

odamite {l Wrote}:It turns out that older versions of SDL_gfx doesn't support rounded rectangle/box functions. Should we make those borders sharp or draw them without SDL_gfx functions?

I think there's a way for cmake to check if a function exists.
We could use this and then have two code blocks (one with the rounded rectangles and one without).

Or select one of the both code blocks depending on the version of SDL_gfx?

Re: Problem compiling svn (r.237)

PostPosted: 05 Feb 2012, 07:50
by acme_pjz
Hi Edward_Lii,

I have a solution that is include some SDL_gfx code in out source code, we only need 2 .c files

Re: Problem compiling svn (r.237)

PostPosted: 05 Feb 2012, 08:26
by Edward_Lii
Hello acme_pjz,

acme_pjz {l Wrote}:I have a solution that is include some SDL_gfx code in out source code, we only need 2 .c files

Not sure that is what we want. :think:
Perhaps some Linux distributions use an older version of SDL_gfx for compatibility reasons, because they use an older/different version of SDL.
If we include the source of SDL_gfx we might lose compatibility with some SDL versions.