Pink Petal Games

Game Discussion => General Discussion & Download => Topic started by: crazy on July 05, 2010, 02:01:51 AM

Title: Building the game with SVN source code.
Post by: crazy on July 05, 2010, 02:01:51 AM
Download the source code off SVN and can't get it to build gives   Error    1    error PRJ0019: A tool returned an error code from   "Performing Pre-Build Event..."    Whore Master    Whore Master
 
  Umm basically have extreme amounts of free time right now and wanted to   mess around with the game just for fun and maybe learn a few things about coding so if anyone knows how to make the game build and has a few minutes to explain that would be great.
 
Title: Re: Building the game with SVN source code.
Post by: DocClox on July 05, 2010, 04:51:06 AM
Apologies - thought I'd replied to this.

How are you building it? Visual Studio on XP?
Title: Re: Building the game with SVN source code.
Post by: crazy on July 05, 2010, 05:09:34 AM
visual 2008 express on vista
Title: Re: Building the game with SVN source code.
Post by: DocClox on July 05, 2010, 05:14:11 AM
Well, it's not a build enviroment I use, so I don't know how useful I can be, but:

http://msdn.microsoft.com/en-us/library/yzk29wdw%28VS.80%29.aspx

In particular

Quote
This error can also occur when you are running as a member of the Users   group and Administrative access is needed. For more information, see Running   as a Member of the Users Group (http://msdn.microsoft.com/en-us/library/ms173360%28v=VS.80%29.aspx).
Title: Re: Building the game with SVN source code.
Post by: crazy on July 05, 2010, 05:39:12 AM
I think that means i need to be the computer administrative which i am.. if it means something else then i don't know lol what.. anything i can post that might help this?  And thanks for helping me
Title: Re: Building the game with SVN source code.
Post by: DocClox on July 05, 2010, 06:07:31 AM
well ... there is a way to turn on logging for the build, which might at least tell us what is failing.

http://msdn.microsoft.com/en-us/library/b0bktkzs%28v=VS.80%29.aspx
Title: Re: Building the game with SVN source code.
Post by: crazy on July 05, 2010, 06:21:24 AM
Should have posted that before figured thats what I would need to post.
Title: Re: Building the game with SVN source code.
Post by: DocClox on July 05, 2010, 07:14:29 AM
OK, Cool. It looks like the thing that's blowing up is the magic thingambob that Dagoth put in to put the svn revision number into the title bar.

I'm not sure how to fix that offhand, however. You could try creating it manually - or else Dagoth may have some better advice on how to procede when he's next online. Failing that, I'll take another look when I get home and can get to my laptop.

Title: Re: Building the game with SVN source code.
Post by: dalmedya on July 06, 2010, 02:35:26 AM
I had this problem at one point.
Project properties -> Configuration -> Build Events -> Pre-Build Event -> Excluded From Build: Yes
I can't guarantee this will work as I don't have the entire source ready for compilation, but I think it worked last time I tried.
-edit
Nope. main.ccp can't find Revision.h, likely because the pre-build event isn't generating it.
I'll just comment it out and try again once I fix this stupid 'cannot modify database' error.
Title: Re: Building the game with SVN source code.
Post by: crazy on July 06, 2010, 03:29:12 AM
Thanks dalmedya that got it to start building but now something else is wrong.. any help would be great.
Title: Re: Building the game with SVN source code.
Post by: DocClox on July 06, 2010, 03:42:08 AM
OK. It looks like VS2008 can't find the SDL include files. First question - do you have the SDL development libraries downloaded?

Code: [Select]
c:\users\justin\documents\visual studio 2008\projects\trunk\brothelmaster\SDLStuff.h(22) : fatal error C1083: Cannot open include file: 'SDL.h': No such file or directory
Title: Re: Building the game with SVN source code.
Post by: dalmedya on July 06, 2010, 03:51:08 AM
Code: [Select]
Error    1    fatal error LNK1181: cannot open input file 'SDL_image.lib'    Whore Master    Whore MasterLe fucking sigh.
I swear I got this working on my old machine, but since I got this new laptop with Win 7 everything is broken.
I hate computers.

-edit
Oh right. Gotta download dem libraries again. Happy fun times.
-mo' edit
http://www.libsdl.org/projects/SDL_image/release/SDL_image-devel-1.2.10-VC.zip
http://www.libsdl.org/projects/SDL_ttf/release/SDL_ttf-devel-2.0.9-VC8.zip
Download, extract, copy .lib files.
Code: [Select]
Build succeeded(http://crescentcityshapers.files.wordpress.com/2009/10/borat_great_success-450x337.jpg)

Code: [Select]
<< " Svn: " << svn_revisionThis is in main.cpp, and needs to be commented out to compile. svn_revision is obviously in Revision.h.
Maybe we should figure out how you dev guys can get it to compile without disabling the pre-build?

- edit again
In case anyone is wondering, I fixed the 'cannot access database file' error by Build -> Configuration Manager -> Configuration: Release. I fixed a bug by not looking for bugs. Go fig.
Title: Re: Building the game with SVN source code.
Post by: DocClox on July 06, 2010, 04:14:46 AM
Yeah, that is a bit fragile. On the other hand, it's useful to have the revision number somewhere in the game so we can be sure which version a bug appears in.

As for making it work on Win7, you'll need to talk to Dagoth about that one. On the bright side, the game will run just fine without it - you just won't see the svn release number n the title bar.

Title: Re: Building the game with SVN source code.
Post by: crazy on July 06, 2010, 04:19:20 AM
Found the SDL thing after posting searched for awhile and found it.  I think its working but have something else maybe i just didn't do SDL right.  I know other then messing up the code i wont be able to anything but at this point just making it build would feel like an accomplishment lol.
Title: Re: Building the game with SVN source code.
Post by: DocClox on July 06, 2010, 04:22:40 AM
Hmm... It's finding SDL.h but not the SDL image or SDL_ttf libraries. I see you downloaded them, so probably you need to add the include folders to studio's search path.
Title: Re: Building the game with SVN source code.
Post by: crazy on July 06, 2010, 04:47:05 AM
Finally got it working had to download a few other SDL files but the Dependencies.txt tells where to get them i just missed it the 1st time.  Thanks for help the Doc and dalmedya.   :)
Title: Re: Building the game with SVN source code.
Post by: Dagoth on July 07, 2010, 05:57:42 AM
Maybe we should figure out how you dev guys can get it to compile without disabling the pre-build?

The pre-build event for Visual Studio on Windows uses a component of TortoiseSVN to get the revision number, so it assumes two things:
1. You have TortoiseSVN installed.
2. You have left the SVN folders in the source directory, so an SVN revision number is available.