Author Topic: How do I compile the AGS source?  (Read 2210 times)  Share 

icey games

  • Official Nintendo Dev, Square Enix affiliate next
    • I can help with backgrounds
    •  
    • I can help with characters
    •  
    • I can help with play testing
    •  
    • I can help with story design
    •  
    • I can help with voice acting
    •  
How do I compile the AGS source?
« on: 23 Sep 2012, 05:20 »
Well I had opened up the AGS source today so I could increase the number of objects and backgrounds in a room. However it told me I had to update the AGS.Native.DLL which I don't really know what to do in there or if it's really necessary to edit. I think when I opened it though it was talking about a missing source control.

Basically I just need to know what it is that I need to do to get this stuff together and how to compile it all.

monkey_05_06

  • AGS Project Tracker Admins
  • Tasting the banhammer. Strangely, tastes like ham.
Re: How do I compile the AGS source?
« Reply #1 on: 23 Sep 2012, 06:32 »
Considering both the editor and the engine need to know how many objects a room can have, it would make sense that AGS.Native would need to be rebuilt. Since AGS.Native is a mixed-mode assembly, then you either need a full version of Visual Studio, or you can use Visual Studio 2012 Express (for Desktop) which is free.

Edit: This thread might actually be better suited to the Editor Development forum, but... Yes.
User was banned for this post.

Crimson Wizard

  • AGS Project Tracker Admins
    • Best Innovation Award Winner 2013, for spearheading the AGS 3.3.0 project
    •  
Re: How do I compile the AGS source?
« Reply #2 on: 23 Sep 2012, 11:19 »
Icey games, you must give more information really.
First, where exactly did you get the source? Sometimes this matters because different versions of the AGS source may require different approaches to build them.
Second, what platform are you building on? Well, I guess that might be Windows, but still.
Third. What IDE are you using, where did you "open" the source in? Is it Microsoft Visual Studio? or else?
Fourth. What project you are actually trying to build? There are three possible known: Full Editor, Editor without AGS.Native and Engine.

Regarding "update DLL" I guess this is an indication that you should build AGS.Native.dll prior to building Editor application.
Message about source control is actually something you may simply ignore. It warns you that the source you got keep traces of being under source control one day but it's not anymore.


EDIT: now... I remember BigMC once asked me to write an instruction on building AGS source under Win... but I completely forgot about that. Shame on me :).
« Last Edit: 23 Sep 2012, 11:31 by Crimson Wizard »

icey games

  • Official Nintendo Dev, Square Enix affiliate next
    • I can help with backgrounds
    •  
    • I can help with characters
    •  
    • I can help with play testing
    •  
    • I can help with story design
    •  
    • I can help with voice acting
    •  
Re: How do I compile the AGS source?
« Reply #3 on: 23 Sep 2012, 17:19 »
Sorry guys, I didn't know it was this much to do as I thought it would be like AGS. Open something, edit it, compile it and boom it's done but everything in the source just seems so spread out.
 
I had got the source from somewhere on the forum, most likely from the main source post. I also have the Skygoblin source code and the one that you(Crimson) have put up but I haven't unzipped it. I have Visual Studio 2010.

And I really don't know what I'm trying to build. Just want my own version of the editor that I can edit if I can learn how to but mainly for increased object(40 - 80) and background amount (5 - 20).

Crimson Wizard

  • AGS Project Tracker Admins
    • Best Innovation Award Winner 2013, for spearheading the AGS 3.3.0 project
    •  
Re: How do I compile the AGS source?
« Reply #4 on: 23 Sep 2012, 18:23 »
Sorry guys, I didn't know it was this much to do as I thought it would be like AGS. Open something, edit it, compile it and boom it's done but everything in the source just seems so spread out.
Well, generally speaking it is true - you open, edit, compile and boom!... (lots of bugs :))... but in practice it's usually more work.
Never hurry when dealing with program source for the first time. Usually it takes some time to know what's what, but after you gathered all the knowledge it's much simplier (at least until you start to edit the code).
If you got the older source from CJ's SVN, that should be simplier, because there is only windows version of the engine.
If you got the source from github (https://github.com/adventuregamestudio/ags) - it has more folders because it supports more platforms (linux, macos etc), but if you build for Windows you should not really care about these (not at the start anyway).

In general AGS source contains following:
- AGS engine files: Common and Engine folders.
- AGS editor files: Editor folder.
There are two projects (for two programs):
- AGS Engine - that's the thing that runs games. It uses the code from Common and Engine folders.
- AGS Editor - that's the editor application. It uses the code from Editor folder, as well as some code from Common and Engine folders (but in refactored branch on github it does not take code from Engine anymore).

Now, depending on what source you got, the project file (*.sln for MSVS) places may be different.
Originally Editor project (AGS.Editor.Full.sln) was in Editor folder and Engine project (acwin.sln) in Engine folder.
In refactored branch I moved all the MSVS projects into separate Solutions folder (but I am still not sure what version do you use).

I had got the source from somewhere on the forum, most likely from the main source post. I also have the Skygoblin source code and the one that you(Crimson) have put up but I haven't unzipped it.
Sorry, that does not say anything to me, except for *maybe* you are speaking about original CJ's SVN source. Skygoblin's source does not have much difference from that, relatively speaking. And I do not know what "my" version do you speak about, because I can't recall I ever uploaded any "zipped" source code... so I am a bit confused :/.

I have Visual Studio 2010 {I think Ultimate if there is such thing but my version is free...I think I may torrented it)
Okaaay.... If you have VS Ultimate, that will work for building editor (although I remember there were few problems related to building in VS2010; I think some changes must be made to project settings first).
That's not related, but I do not think you may call it "free version"... you pirated got it for free, allright :P.
BTW you may check the version at "Help" -> "About Microsoft Visual Studio" in VS main menu.

And I really don't know what I'm trying to build. Just want my own version of the editor that I can edit if I can learn how to but mainly for increased object(40 - 80) and background amount (5 - 20).

First of all, you must understand that this is not a trivial task. If you want to increase number of objects, you should edit not only editor, but also the engine, otherwise your games will fail to run.
For starters I may tell you this: Editor uses some code from the Engine folders, and when you edit these you practically change two programs at once: editor and engine. So take care and spend some time on research and planning.

If you give me more details on the source contents (e.g. what folders do you have in there) I may make better guess on what version have you got and therefore give more accurate advices - what project to open, how to build, etc.

JJS

  • AGS Project Tracker Admins
    • Best Innovation Award Winner 2012, for his efforts in porting AGS to multiple platforms
    •  
Re: How do I compile the AGS source?
« Reply #5 on: 23 Sep 2012, 18:29 »
If you want to compile with anything but Visual Studio 2008 you will get linker errors. This is because the libraries (especially Allegro) are built with that version and expect a certain version of the VC runtime. Building the debug configuration probably works with few tweaks but the release configuration does not link with anything but VC 2008.
Ask me about AGS on PSP, Android and iOS! Source, Daily builds

Crimson Wizard

  • AGS Project Tracker Admins
    • Best Innovation Award Winner 2013, for spearheading the AGS 3.3.0 project
    •  
Re: How do I compile the AGS source?
« Reply #6 on: 23 Sep 2012, 18:37 »
If you want to compile with anything but Visual Studio 2008 you will get linker errors. This is because the libraries (especially Allegro) are built with that version and expect a certain version of the VC runtime. Building the debug configuration probably works with few tweaks but the release configuration does not link with anything but VC 2008.

You may install minimal version of 2008 (Express) and still work in 2010 by doing this:
Quote
Open Project properties for the Engine project, "General" -> "Platform Toolset" -> should be set to v90.
« Last Edit: 23 Sep 2012, 18:48 by Crimson Wizard »

icey games

  • Official Nintendo Dev, Square Enix affiliate next
    • I can help with backgrounds
    •  
    • I can help with characters
    •  
    • I can help with play testing
    •  
    • I can help with story design
    •  
    • I can help with voice acting
    •  
Re: How do I compile the AGS source?
« Reply #7 on: 23 Sep 2012, 21:00 »
Wow I did not expect it to be this hard, but it's cool cause at lest I'm learning something from this just please do keep in mind I have never really touched MSVS so I have absolutely no clue how to use it.

I got the date+name, AGS-SourceCode-27-4-2011 is the name of the folder. 4/27/11 must be the date....But I grabbed it on Oct 2.

Inside I see:
Common
Editor
Engine
Manual
NativeLab

Also @Crimson, what I was referring to is the recent AGS source you just shared, that one had the mac, psp folders in it.

Crimson Wizard

  • AGS Project Tracker Admins
    • Best Innovation Award Winner 2013, for spearheading the AGS 3.3.0 project
    •  
Re: How do I compile the AGS source?
« Reply #8 on: 23 Sep 2012, 21:29 »
That's definitely original CJ's code.

Editor VC solution is Editor/AGS.Editor.Full.sln
Engine VC solution is Engine/acwin.sln

Editor uses all the code from Editor folder + some files from Common and Engine folders (I cannot remember which exactly though, it's been too long, but MSVS should take care of it anyway).
Engine uses almost all the code from Common and Engine except for one or two files that contain Script Compiler (which is used only by Editor).

In Editor solution the actual application is AGSEditor, but it requires everything else built beforehand (AGS.Types, AGS.Native, etc). When built the executable appears in Editor\AGS.Editor\bin\Debug\ or \Editor\AGS.Editor\bin\Release\.
Engine solution has only one project - acwin. When built, executable appears in Engine\acwin___Win32_DebugWorking\ and Engine\Release\.

I suggest you try to build and run everything at least once to be sure you have all set up before editing anything.

please do keep in mind I have never really touched MSVS so I have absolutely no clue how to use it.
Ouch... okay :). I hope that does not sound rude and all, but can you at least program in C++ and/or C#?
« Last Edit: 23 Sep 2012, 21:31 by Crimson Wizard »

Re: How do I compile the AGS source?
« Reply #9 on: 23 Sep 2012, 23:09 »
Nice, one more link for our main README.md. :)

abstauber

  • Mittens Knight
  • Order of the Maggot
  • less colors, more fun
  • abstauber worked on a game that was nominated for an AGS Award!abstauber worked on a game that won an AGS Award!
Re: How do I compile the AGS source?
« Reply #10 on: 18 Apr 2014, 14:50 »
sorry to bump this. I'd just wanted to add that it has to VS2008 SP1 to avoid linker errors. Also glext.h is missing which I got from http://www.opengl.org/registry/ and put it into my VS2008 installation.