MegaGlest Forum

Modding and game content creation => Mods => Topic started by: daniel.santos on 21 February 2008, 06:03:48

Title: Compiling on Win32 using no-cost tools (MSVC++ 2008 Express)
Post by: daniel.santos on 21 February 2008, 06:03:48
Last Updated Feb 21, 2008.  Edits:[li]updated [/li][/list]
Code: [Select]
[url=http://glest.codemonger.org/files/glest-vc2008proj.tgz]project files[/url] to use relative paths as well[/li]
[li]g3d_viewer and map_editor require wxWindows, not included in these instructions.  You can omit these subprojects if you wish.[/li][/list]
I finally got a good compile on my work machine (WindowsXP) using MS Visual C++ 2008 Express Edition.  I'll try to keep this guide updated.

1. Prerequisites
Code: [Select]
[url=http://glest.codemonger.org/files/win32-glest-deps.rar]win32-glest-deps.rar[/url]
Code: [Select]
svn co https://glest.svn.sourceforge.net/svnroot/glest/trunk glest2a. Download project files
Are you lazy?  Then download my project files and hope they work:
Code: [Select]
[url=http://glest.codemonger.org/files/glest-vc2008proj.tgz]glest-vc2008proj.tgz[/url].  You extract this in the <root>/glest/source directory.

If you can't get those to work (maybe you're using a different version of VC++), you can omit this step and create your project files following the rest of this article.

2b. Creating the "Solution" and "Projects"
MSVC++ projects are contained in a "solution" (analogous to a "workspace" in other IDEs).  A single solution can contain multiple projects.  We want to create a single solution in the <root>\glest\source directory that contains projects for each of the shared_lib, glest_game and optionally g3d_viewer and map_editor directories.  However, Visual C++ Express Edition is a pain in the ass for stuff like this, probably because they would prefer you to buy their commercial products.  Thus, we have to kludge our way through.

3. Create an empty solution named "Glest"
Since there isn't a simple way to do this, we have to screw with it.Now we have our blank solution that we'll add subprojects to later.

4. Create projects
5. Put it all together
6. Configure project properties
Code: [Select]
..\..\..\deps\include
..\shared_lib\include\sound\ds8
..\shared_lib\include\graphics
..\shared_lib\include\graphics\gl
..\shared_lib\include\platform\win32
..\shared_lib\include\sound
..\shared_lib\include\util
..\shared_lib\include\xml
Code: [Select]
..\..\..\deps\lib
..\shared_lib\$(ConfigurationName)
Code: [Select]
dsound.lib dxguid.lib ogg_static.lib vorbis_static.lib vorbisfile_static.lib xerces-c_2.lib opengl32.lib glu32.lib wsock32.lib libglest.lib mmc.lib7. Removing unused sources & adding glprocs
Not all subdirectories of this project should be compiled on windows.  Additionally, the D3D implementation appears to be/is incomplete.  So select the following subdirectories of shared_lib, right click and select Exclude From Project.Right click on the libglest project, select Add/Existing Item... and browse to deps/src/glprocs.c.

8. Troubleshooting
Code: [Select]
[url=http://www.microsoft.com/downloads/details.aspx?familyid=9b2da534-3e03-4391-8a4d-074b9f2bc1bf&displaylang=en]Microshaft Visual C++ 2008 Redistributable Package (x86)[/url]
Title:
Post by: theotherhiveking on 21 February 2008, 15:23:44
Can someone move this to General?
Title:
Post by: wciow on 21 February 2008, 21:21:08
This seems kinda complex for someone who has never compiled anything before!!
Title:
Post by: martiƱo on 21 February 2008, 21:23:28
Quote from: "wciow"
This seems kinda complex for someone who has never compiled anything before!!


If you haven't compiled anything before, why would you want to compile Glest under windows?
Title:
Post by: ZaggyDad on 22 February 2008, 19:11:02
Do you have hosted a compiled version of it? If so, is it "Glesty"? Because, if it is, it seems to be broken on my computer. It gets "invalid side-by-side configuration", or something like that. :cry:

The specs are: Windows XP pro, 512 MB of memory, nVidia GeForce FX 5200 with 64 MB of memory.

~Zaggy
Title:
Post by: wciow on 22 February 2008, 20:29:16
Look at this thread:

http://www.glest.org/glest_board/viewtopic.php?t=3229 (http://www.glest.org/glest_board/viewtopic.php?t=3229)

It should solve your problem  ;)
Title: -
Post by: daniel.santos on 23 February 2008, 02:29:21
This thread should actually contain pure-Glest instructions, links and such unless I have made an error.  I've been using the name "Glesty" for my mod because I haven't come up with anything that really has seemed to stick.  You could use these instructions to compile "glesty" however.

And yea, what a freakin stupid error message.  Leave it up to the boys in Redmond.  It's trying to say "I need a newer version of mscvrt.dll."  If you want a binary of my mod, I recompiled it with to link the c runtime in statically here:
Code: [Select]
[url=http://glest.codemonger.org/files/glesty-win32_SSE2-static-r17.rar]glesty-win32_SSE2-static-r17.rar[/url],  but these instructions are intended to be generic.
Title:
Post by: hailstone on 24 February 2008, 03:59:22
Quote from: "daniel.santos"
I've been using the name "Glesty" for my mod because I haven't come up with anything that really has seemed to stick.

Sounds a bit like 'Glest E' for Glest Evolution.  :O
Title:
Post by: daniel.santos on 24 February 2008, 20:55:46
Dammit Hailstone!  I had just almost decided on "Glest Advanced Pack"! :) "Glest Evolution" or "Glest Evolved" sounds cool too, but that's a different topic.
Title:
Post by: Duke on 25 February 2008, 16:01:56
And Glest Evolution already exists, i think that was what he meant.
Title:
Post by: ZaggyDad on 26 February 2008, 16:17:08
Could you (daniel.santos) compile (for windows) and host the savegame patch (I've been trying to compile glest for who knows how long, and never succeeded :wink:

~Zaggy
Title:
Post by: hardyvoje on 2 March 2008, 06:21:19
Daniel, this post is great!
Thanks!
Title:
Post by: yaoyansi on 15 March 2008, 06:09:42
i just download glest-vc2008proj.tgz, open the glest.sln, game.vcproj, libsglest.vcproj in notebook, and change the following texts ,if any,and they can be used in vs2005. :)

.........change .........................................to ..............
Format Version 9.00       --->   Format Version 8.00

# Visual Studio 2008     --->     # Visual Studio 2005

Version="9.00"            ---->     Version="8.00"
Title:
Post by: daniel.santos on 15 March 2008, 07:47:38
sweet! thanks for the info.  I've mangled GAE to the point where those project files wont work for it any more, but at least I have the msvc++ project files checked into the GAE repository now.
Title: Re: Compiling on Win32 using no-cost tools (MSVC++ 2008 Express)
Post by: hailstone on 5 November 2008, 00:11:34
The checkout path needs to be updated to the glestmonger url.

Code: [Select]
https://glest.codemonger.org/svn/repos/gae/['branches' or 'tags']/[the branch or release number]
Title: Re: Compiling on Win32 using no-cost tools (MSVC++ 2008 Express)
Post by: Omega on 6 November 2008, 02:13:15
Anyone have something for normal glest?
Title: Re: Compiling on Win32 using no-cost tools (MSVC++ 2008 Express)
Post by: gruese on 21 November 2008, 18:50:55
Hey guys,

this doesn't seem to work without wxwidgets, i followed the instructions using the codemonger repository and got the compile error
"fatal error C1083: Cannot open include file: 'zlib.h': No such file or directory"
on several files in the game project. zlib.h is one of the header files in wxwidgets' source folders.

Can anybody help me with that? Do I need to compile wxwidgets myself? If so, do I put it in as a project in the glest solution?
Thanks
chris
Title: Re: Compiling on Win32 using no-cost tools (MSVC++ 2008 Express)
Post by: hailstone on 21 November 2008, 20:51:11
zlib is a separate library. It should be in the win32-glest-deps.rar now. see viewtopic.php?f=15&t=3921&p=19287#p19202 (http://glest.org/glest_board/viewtopic.php?f=15&t=3921&p=19287#p19202) at the bottom of that post.
Title: Re: Compiling on Win32 using no-cost tools (MSVC++ 2008 Express)
Post by: gruese on 21 November 2008, 22:58:30
Quote from: "hailstone"
zlib is a separate library. It should be in the win32-glest-deps.rar now. see viewtopic.php?f=15&t=3921&p=19287#p19202 (http://glest.org/glest_board/viewtopic.php?f=15&t=3921&p=19287#p19202) at the bottom of that post.

Thanks for the answer, but if it's this file you and Daniel are talking about:
http://glest.codemonger.org/files/win32-glest-deps.rar (http://glest.codemonger.org/files/win32-glest-deps.rar)
I just downloaded it and zlib is not in there yet.

Cheers
gruese
Title: Re: Compiling on Win32 using no-cost tools (MSVC++ 2008 Express)
Post by: hailstone on 22 November 2008, 00:51:40
Ok, try
Code: [Select]
[url=http://www.zlib.net/zlib123-dll.zip]http://www.zlib.net/zlib123-dll.zip[/url]
Title: Re: Compiling on Win32 using no-cost tools (MSVC++ 2008 Express)
Post by: gruese on 22 November 2008, 02:27:16
Quote from: hailstone
Ok, try
Code: [Select]
[url=http://www.zlib.net/zlib123-dll.zip]http://www.zlib.net/zlib123-dll.zip[/url]

Yeah I already downloaded zlib myself and built it in there. Works like a charm now, thanks!
Title: Re: Compiling on Win32 using no-cost tools (MSVC++ 2008 Express)
Post by: mockrocker on 8 March 2010, 14:52:39
My first post here! How's everyone?

I'm trying to recompile the source I got from sourceforge but it doesn't work. There are about 120+ errors about missing files with .h extension. Can anyone help me?

I'm trying to use this guide but I can't make it work. All the download links are dead (are they?).
Title: Re: Compiling on Win32 using no-cost tools (MSVC++ 2008 Express)
Post by: softcoder on 8 March 2010, 17:29:02
A little history:

#1 Glest (original glest) is dead so I doubt you'll get much help with that code base.

That leaves you currently with two options:

a) GAE (Glest Advanced Engine)
or
b) Megaglest

Both of these are attempts to take original glest and add more to it. I cannot speak for GAE (I'm sure some from that team will post a reply) but for Mega-glest we have the VC++ 2008 express solution in SVN on sourceforge. The only missing items are the 3rd party win32 DLL's / Includes (which I have and will post it somewhere for everyone to download). At that point you should easily be able to compile Mega-Glest.

Thanks

EDIT:

Ok to get the win32 dependencies (dll's, libs and header files) for mega-glest you can goto:

https://sourceforge.net/projects/megaglest/files/ (https://sourceforge.net/projects/megaglest/files/)

and get win32_deps.7z and decompress it in the "source" folder (which should create a win32_deps sub folder with tons of stuff. I am updating the VC++ 2008 express solution files to use relative paths so that anyone can just get the code from SVN into ANY folder and place this win32_deps into source and compile (should be done today)

I have now updated the VC++ 2008 express solution files in SVN for mega-glest so anyone should easily be able to produce binaries for windows
Title: Re: Compiling on Win32 using no-cost tools (MSVC++ 2008 Express)
Post by: Super Tom on 9 March 2010, 06:06:12
Hi, softcoder! Sorry, I can not download glest - vc2008proj.tgz, please send to my e-mail address, thank you!
Title: Re: Compiling on Win32 using no-cost tools (MSVC++ 2008 Express)
Post by: softcoder on 9 March 2010, 06:41:38
Sorry Tom I don't understand what you are asking for and what your problem is?
Title: Re: Compiling on Win32 using no-cost tools (MSVC++ 2008 Express)
Post by: Super Tom on 9 March 2010, 06:47:26
Hi, softcder! You can provide glest - vc2008proj.tgz download, thank you!



I can not download this address: http://glest.codemonger.org/files/glest-vc2008proj.tgz
Title: Re: Compiling on Win32 using no-cost tools (MSVC++ 2008 Express)
Post by: softcoder on 9 March 2010, 06:59:31
The VC++ project files for mega-glest are in SVN under mk\windoze. You'll have to checkout the files from SVN to get them.

Thanks
Title: Re: Compiling on Win32 using no-cost tools (MSVC++ 2008 Express)
Post by: Super Tom on 9 March 2010, 07:05:57
mk \ windoze which there is no game.vcproj
By the way: In addition to using vs2008, is also what is required to compile the source code???
Title: Re: Compiling on Win32 using no-cost tools (MSVC++ 2008 Express)
Post by: mockrocker on 10 March 2010, 13:23:11
Thanks, I'll try to look at megaglest.

Title: Re: Compiling on Win32 using no-cost tools (MSVC++ 2008 Express)
Post by: softcoder on 10 March 2010, 15:44:04
Just open Glest.sln and compile all the projects. Output goes into build\Release\<projectname>
Title: Re: Compiling on Win32 using no-cost tools (MSVC++ 2008 Express)
Post by: mockrocker on 11 March 2010, 02:54:30
There seems to be a problem with the codes I got off the SVN repository. I was able to compile it and then build xerces 3.0 dll from the win32 deps i downloaded. The problem was I keep on getting error from glest.ini about unitParticles not existing and the game can't continue. I've noticed there was 8 player slots on custom game, different from the megaglest release. Am I doing it wrong?

Edit:

I added UnitParticles on glest.ini and the game finally loads. I wonder what's this for?
Title: Re: Compiling on Win32 using no-cost tools (MSVC++ 2008 Express)
Post by: softcoder on 11 March 2010, 05:44:48
Its a brand new property added by Titi.. it enables the new particle work he added in this new release.