How do I compile the AGS source?

Started by Icey, Sun 23/09/2012 05:20:24

Previous topic - Next topic

Icey

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.

monkey0506

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.

Crimson Wizard

#2
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 :).

Icey

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

Quote from: icey games on Sun 23/09/2012 17:19:26
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).

Quote from: icey games on Sun 23/09/2012 17:19:26
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 :/.

Quote from: icey games on Sun 23/09/2012 17:19:26
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.

Quote from: icey games on Sun 23/09/2012 17:19:26
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

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

#6
Quote from: JJS on Sun 23/09/2012 18:29:30
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.

Icey

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

#8
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.

Quote from: icey games on Sun 23/09/2012 21:00:44
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#?

BigMc


abstauber

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.


playtolose

#11
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!

Crimson Wizard

#12
Quote from: playtolose on Sat 20/09/2014 18:02:06
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.

playtolose

#13
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.

Crimson Wizard

#14
Quote from: playtolose on Sat 20/09/2014 18:39:56
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.

Quote from: playtolose on Sat 20/09/2014 18:39:56
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.

playtolose

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

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.

Gord10

I'm currently integrating my older changes to the new engine version. And I'm having a difficulty compiling 3.3.2.0 in Visual Studio 2010.

Code: ags
1>Compiling...
1>ali3dogl.cpp
1>..\..\Engine\gfx\ali3dogl.cpp(58) : error C2146: syntax error : missing ';' before identifier 'glGenFramebuffersEXT'
1>..\..\Engine\gfx\ali3dogl.cpp(58) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>..\..\Engine\gfx\ali3dogl.cpp(58) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>..\..\Engine\gfx\ali3dogl.cpp(59) : error C2146: syntax error : missing ';' before identifier 'glDeleteFramebuffersEXT'
1>..\..\Engine\gfx\ali3dogl.cpp(59) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>..\..\Engine\gfx\ali3dogl.cpp(59) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>..\..\Engine\gfx\ali3dogl.cpp(60) : error C2146: syntax error : missing ';' before identifier 'glBindFramebufferEXT'
1>..\..\Engine\gfx\ali3dogl.cpp(60) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>..\..\Engine\gfx\ali3dogl.cpp(60) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>..\..\Engine\gfx\ali3dogl.cpp(61) : error C2146: syntax error : missing ';' before identifier 'glCheckFramebufferStatusEXT'
1>..\..\Engine\gfx\ali3dogl.cpp(61) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>..\..\Engine\gfx\ali3dogl.cpp(61) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>..\..\Engine\gfx\ali3dogl.cpp(62) : error C2146: syntax error : missing ';' before identifier 'glGetFramebufferAttachmentParameterivEXT'
1>..\..\Engine\gfx\ali3dogl.cpp(62) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>..\..\Engine\gfx\ali3dogl.cpp(62) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>..\..\Engine\gfx\ali3dogl.cpp(63) : error C2146: syntax error : missing ';' before identifier 'glGenerateMipmapEXT'
1>..\..\Engine\gfx\ali3dogl.cpp(63) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>..\..\Engine\gfx\ali3dogl.cpp(63) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>..\..\Engine\gfx\ali3dogl.cpp(64) : error C2146: syntax error : missing ';' before identifier 'glFramebufferTexture2DEXT'
1>..\..\Engine\gfx\ali3dogl.cpp(64) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>..\..\Engine\gfx\ali3dogl.cpp(64) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>..\..\Engine\gfx\ali3dogl.cpp(65) : error C2146: syntax error : missing ';' before identifier 'glFramebufferRenderbufferEXT'
1>..\..\Engine\gfx\ali3dogl.cpp(65) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>..\..\Engine\gfx\ali3dogl.cpp(65) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>..\..\Engine\gfx\ali3dogl.cpp(692) : error C2146: syntax error : missing ';' before identifier 'wglGetProcAddress'
1>..\..\Engine\gfx\ali3dogl.cpp(693) : error C2146: syntax error : missing ';' before identifier 'wglGetProcAddress'
1>..\..\Engine\gfx\ali3dogl.cpp(694) : error C2146: syntax error : missing ';' before identifier 'wglGetProcAddress'
1>..\..\Engine\gfx\ali3dogl.cpp(695) : error C2146: syntax error : missing ';' before identifier 'wglGetProcAddress'
1>..\..\Engine\gfx\ali3dogl.cpp(696) : error C2146: syntax error : missing ';' before identifier 'wglGetProcAddress'
1>..\..\Engine\gfx\ali3dogl.cpp(697) : error C2146: syntax error : missing ';' before identifier 'wglGetProcAddress'
1>..\..\Engine\gfx\ali3dogl.cpp(698) : error C2146: syntax error : missing ';' before identifier 'wglGetProcAddress'
1>..\..\Engine\gfx\ali3dogl.cpp(699) : error C2146: syntax error : missing ';' before identifier 'wglGetProcAddress'
1>..\..\Engine\gfx\ali3dogl.cpp(797) : error C2064: term does not evaluate to a function taking 2 arguments
1>..\..\Engine\gfx\ali3dogl.cpp(798) : error C2065: 'GL_FRAMEBUFFER_EXT' : undeclared identifier
1>..\..\Engine\gfx\ali3dogl.cpp(799) : error C2065: 'GL_FRAMEBUFFER_EXT' : undeclared identifier
1>..\..\Engine\gfx\ali3dogl.cpp(799) : error C2065: 'GL_COLOR_ATTACHMENT0_EXT' : undeclared identifier
1>..\..\Engine\gfx\ali3dogl.cpp(801) : error C2065: 'GL_FRAMEBUFFER_EXT' : undeclared identifier
1>..\..\Engine\gfx\ali3dogl.cpp(1171) : error C2065: 'GL_FRAMEBUFFER_EXT' : undeclared identifier
1>..\..\Engine\gfx\ali3dogl.cpp(1224) : error C2065: 'GL_FRAMEBUFFER_EXT' : undeclared identifier
Games are art!
My horror game, Self

Crimson Wizard

#18
Quote from: Crimson Wizard on Sat 20/09/2014 18:17:54
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

Direct link: https://www.opengl.org/registry/api/GL/glext.h

Gord10

Ahh, I didn't see this documentation anywhere. Thank you for quick reply, I resolved the problem by replacing my old GL/glext.h file (in VS's own include\GL folder) with the new one.
Games are art!
My horror game, Self

SMF spam blocked by CleanTalk