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

icey games

  • Official Nintendo Dev...
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.
I'll find you in the Crucible and send you into Oblivion!!!

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...
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).
I'll find you in the Crucible and send you into Oblivion!!!

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...
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.
I'll find you in the Crucible and send you into Oblivion!!!

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

  • Point & Click Association (PCA)
  • Mittens Knight
  • Order of the Maggot
  • ... the joy of brainsss
  • 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.


Re: How do I compile the AGS source?
« Reply #11 on: 20 Sep 2014, 18:02 »
So, I know this thread has been quiet for a good while, but any chance of a more complete walkthrough on compiling AGS from source? I've just moved from Mac to Windows (mostly for AGS as it happens!) and have zero experience with this kind of thing. Been bouncing through the forums for a few days now....

[[Edit]]
I should probably clarify: I'm working in windows 8.1, I've downloaded the entire repo from https://github.com/adventuregamestudio (got latest about two weeks ago). I've also (after much hunting) downloaded VS2008 Express (SP1). Which, as I understand from what I've been reading, is the minimum (and free-est) requirement to build any of the AGS projects from source.

I'm not 100% on how the build process works with VS2008, but have tried adding Native.dll as a project and attempted to build from there. This has given me an error - unable to find \UpdateCPPVersion\Debug\bin\UpdateCPPVersion.exe
But to be honest I haven't a clue what's happening here at all, so even if I could fix that particular error, I'd be stuck the second I hit another one.

My main hope here is to get to grips with building the editor first, then working towards building the engines so I can build/port my game to mobile.
I'm happy to start a new thread for this if it's better off elsewhere, but this topic seemed the most appropriate to post on.
Any help would be much appreciated!
« Last Edit: 20 Sep 2014, 18:34 by playtolose »

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 #12 on: 20 Sep 2014, 18:17 »
So, I know this thread has been quiet for a good while, but any chance of a more complete walkthrough on compiling AGS from source?

No :(. I keep getting distracted from this.

I wonder what "zero experience" means... :-\.

Basically you need:
Official repository with all the source code:
https://github.com/adventuregamestudio/ags

For effectively working with repository, Git:
http://git-scm.com/
And/or any GUI application for working with Git, for example this:
https://code.google.com/p/gitextensions/

To build Editor only:
1. Microsoft Visual Studio 2008 or higher.
2. Run Solutions/AGS.Editor.NoNative.sln
3. AGS.Native.dll may be acquired from the latest public release.

To build Editor with AGS.Native.dll (if you want to work with more low-level stuff):
1. Precisely Microsoft Visual Studio 2008 SP1.
2. Run Solutions/AGS.Editor.Full.sln

To build Engine:
1. Precisely Microsoft Visual Studio 2008 SP1.
2. DirectX SDK.
3. Download "glext.h" from http://www.opengl.org/registry/ and put somewhere where MSVS can find it (or add the path to MSVS settings).
4. Run Solutions/Engine.sln


Also I propose to discuss this in "AGS Development" forum section; "Advanced Tech" is for "help with scripting your AGS game".

EDIT: whooops. How did this happen? :D.
« Last Edit: 20 Sep 2014, 18:23 by Crimson Wizard »

Re: How do I compile the AGS source?
« Reply #13 on: 20 Sep 2014, 18:39 »
Lol looks like were both typing at the same time.
I'll start a new thread in "AGS Development > Editor Development" so.

[[Edit]]
Just saw Snarky has already moved this. No new thread so.
« Last Edit: 20 Sep 2014, 18:46 by playtolose »

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 #14 on: 20 Sep 2014, 18:48 »
Lol looks like were both typing at the same time.
I'll start a new thread in "AGS Development > Editor Development" so.
Snarky already moved the topic to the right place.

You won't be able to build full editor with 2008 express version, because express version cannot make mixed (C# + C++) projects. You would need full 2008 version for that.

My main hope here is to get to grips with building the editor first, then working towards building the engines so I can build/port my game to mobile.
There are already mobile engine ports: Android and iOS. Have you tried using them?
You do not need to build Editor to make a game port in any case. Game is just a data file, which is read by engine, and the same data can be used by any port. If there's engine port, you can run any game on given platform.
You would only need to use engine source code if you want to make an alternate port, or port to different platform.
« Last Edit: 20 Sep 2014, 18:51 by Crimson Wizard »

Re: How do I compile the AGS source?
« Reply #15 on: 20 Sep 2014, 19:18 »
Ah, I was afraid I'd need the full version :sad:
I'll have a nose around and see if I can grab a copy somewhere and then have a crack at it.

I was hoping to get to grips with the build process mainly as a way of understanding a little better how AGS comes together, and to be able to rebuild and keep up with latest from this lovely active community.

I figured once I'd gotten that down, I'd have a look at running the game using the engine ports (bundling them together into a single .apk etc) and then building the engine ports from source (again to keep up with latest & to look at the possibility of integrating other SDKs for analytics or what have you).

If I manage to get the full VS2008 *and* get the the editor build from source then I'll do up a step by step here. If not, I'll just stick with the existing engine ports.

Thanks for the help and clarification!

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 #16 on: 20 Sep 2014, 19:26 »
To elaborate: I think you CAN build main C# part of the Editor with Express version. But you would need to get existing AGS.Native.dll, for example, from recent public release. Use AGS.Editor.NoNative.sln solution for this.

I am not sure if it is possible to build Engine with Express version, maybe not, because there are pre-built libraries linking which would require certain version of MSVS.
You may try working on Linux, though, which is free and does not have such problem because it builds all libraries from sources.