Compiling on Windows

Questions, problems and discussion about compiling FreeOrion.

Moderator: Oberlus

Message
Author
User avatar
Geoff the Medio
Programming, Design, Admin
Posts: 13587
Joined: Wed Oct 08, 2003 1:33 am
Location: Munich

Compiling on Windows

#1 Post by Geoff the Medio »

Toxickilla wrote:...while keeping my fingers crossed that I don't get swamped with stuff way over my head. :lol: :?
Compiling on Windows with the SDK should not be complicated.

Toxickilla
Space Floater
Posts: 17
Joined: Sun Oct 23, 2011 3:57 pm

Re: Colonizing Crash

#2 Post by Toxickilla »

Hmmm, I am embarrassed to admit it, but I think that building this myself may be out of my league.

Don't suppose you are aware of a post somewhere developed for the full-blown lay-man? Or perhaps I should just stick with the precompiled...

User avatar
eleazar
Design & Graphics Lead Emeritus
Posts: 3858
Joined: Sat Sep 23, 2006 7:09 pm
Location: USA — midwest

Re: Colonizing Crash

#3 Post by eleazar »


Toxickilla
Space Floater
Posts: 17
Joined: Sun Oct 23, 2011 3:57 pm

Re: Compiling on Windows

#4 Post by Toxickilla »

Ok, that wasn't quite as painful as I had thought.

I had apparently messed up the part with the SVN on my first go around. So it seems that I have gotten it work ok, though I noticed that I had a few errors during game play, and due to my lack of computer knowledge, I am not sure if they could be compile related.

I had my tech tree set to list, but to the right of where it shows Xenoarcheology, it has an error (Error Short Description) or something like that. Is this a compiling related issue, or something with the game itself?

User avatar
Geoff the Medio
Programming, Design, Admin
Posts: 13587
Joined: Wed Oct 08, 2003 1:33 am
Location: Munich

Re: Compiling on Windows

#5 Post by Geoff the Medio »

Toxickilla wrote:I had my tech tree set to list, but to the right of where it shows Xenoarcheology, it has an error (Error Short Description) or something like that. Is this a compiling related issue, or something with the game itself?
If it's only showing an error message for one tech or just a few techs, it's unlikely to be a compile problem.

Edit: The Xenoarchaeology tech refers to the string XENOARCH_SHORT_DESC for it's short description, but as far as I can see, that string is not present in the stringtable, which would explain an error message being shown where that short description should be in-game.

User avatar
eleazar
Design & Graphics Lead Emeritus
Posts: 3858
Joined: Sat Sep 23, 2006 7:09 pm
Location: USA — midwest

Re: Compiling on Windows

#6 Post by eleazar »

Thanks Toxickilla,
That was my fault.

> Fixed in revision 4448

Toxickilla
Space Floater
Posts: 17
Joined: Sun Oct 23, 2011 3:57 pm

Re: Compiling on Windows

#7 Post by Toxickilla »

Windows 7

I was trying to update and run recently, but had some issues. So I deleted my previous FreeOrion files, and went to start from the beginning.

1. Downloaded and extracted the SDK
2. Selected 'SVN Checkout' after which I get the following error (10 seconds in or so). Using TortoiseSVN

Error: Can't create directory 'C:\Program Files (x86)\FreeOrion\.svn': Access is
Error: denied.

I am administrator, so it shouldn't have issues accessing the files. Ideas?

User avatar
Geoff the Medio
Programming, Design, Admin
Posts: 13587
Joined: Wed Oct 08, 2003 1:33 am
Location: Munich

Re: Compiling on Windows

#8 Post by Geoff the Medio »

Toxickilla wrote:Error: Can't create directory 'C:\Program Files (x86)\FreeOrion\.svn': Access is
Error: denied.

I am administrator, so it shouldn't have issues accessing the files. Ideas?
The problem is that you're trying to modify the contents of Program Files; even administrator accounts have restrictions on doing this in Windows 7 that can lead to weird errors or silent failures to modify files. Move the SDK to the desktop, root directory of the drive, or somewhere else not in a protected directory, and it should be fine.

Toxickilla
Space Floater
Posts: 17
Joined: Sun Oct 23, 2011 3:57 pm

Re: Compiling on Windows

#9 Post by Toxickilla »

[quote=The problem is that you're trying to modify the contents of Program Files; even administrator accounts have restrictions on doing this in Windows 7 that can lead to weird errors or silent failures to modify files. Move the SDK to the desktop, root directory of the drive, or somewhere else not in a protected directory, and it should be fine.[/quote]

Did that. Now I am getting the same issues as this guy:

viewtopic.php?f=24&t=5078

Except I did the SDK first. Updated. Still get these errors:

6> ClientFSMEvents.cpp
6>c:\freeorion\trunk\freeorion\network\networking.h(5): fatal error C1083: Cannot open include file: 'GG/Enum.h': No such file or directory
6> ClientApp.cpp
6>c:\freeorion\trunk\freeorion\universe\enums.h(5): fatal error C1083: Cannot open include file: 'GG/Enum.h': No such file or directory

Loads of them.

Even tried again following your build order:

* Download and unzip the 2010 SDK.

* Within the SDK directory, SVN update to the lastest revision of FreeOrion (which will automatically update to the latest GG).

* Open the msvc2010 .sln file.

* Build Solution.

As always, appreciate the help.

User avatar
Geoff the Medio
Programming, Design, Admin
Posts: 13587
Joined: Wed Oct 08, 2003 1:33 am
Location: Munich

Re: Compiling on Windows

#10 Post by Geoff the Medio »

Toxickilla wrote:6> ClientFSMEvents.cpp
6>c:\freeorion\trunk\freeorion\network\networking.h(5): fatal error C1083: Cannot open include file: 'GG/Enum.h': No such file or directory
6> ClientApp.cpp
6>c:\freeorion\trunk\freeorion\universe\enums.h(5): fatal error C1083: Cannot open include file: 'GG/Enum.h': No such file or directory
Looks like you don't have the GG files in the expected location relative to the FreeOrion solution, for some reason. I'm a bit confused about the "trunk" being there; it shouldn't be if you've just opened the SDK and updated from SVN. Did you just "update" the FreeOrion directory as present in the SDK, or did you do a new checkout over top and in a new location? Regardless, I suggest trying opening the SDK and updating and rebuilding again.

Toxickilla
Space Floater
Posts: 17
Joined: Sun Oct 23, 2011 3:57 pm

Re: Compiling on Windows

#11 Post by Toxickilla »

Looks like you don't have the GG files in the expected location relative to the FreeOrion solution, for some reason.
Then this would have to be true for much more than the GG files. It is popping up for pretty much everything it tries to grab when building the solution.
I'm a bit confused about the "trunk" being there; it shouldn't be if you've just opened the SDK and updated from SVN. Did you just "update" the FreeOrion directory as present in the SDK, or did you do a new checkout over top and in a new location? Regardless, I suggest trying opening the SDK and updating and rebuilding again.
I double checked this. The trunk is gone now (so I must have checked out on top of the SDK the first time). But still, getting the same issues. Here is what I did:

1. Started with the SDK (FreeOrion_Win32_MSVS2010_SDK_3_Oct_2011.zip). It's been extracted to the C:, away from any program files directory

2. Went to update with Tortoise. Before I could, I had to choose "SVN upgrade working copy"

3. I then run SVN Update - Generally ok, but has one "Tree conflict": C:\FreeOrion\FreeOrion\msvc2008. Everything else is just added (most of the line items) or restored (some line items)

4. I open the solution file located in msvc2010, and try to build. I am flooded with errors saying that the file or directory could not be found (not just limited to GG).

Maybe I have done something wrong with the extraction of the SDK, or maybe I am missing a step?



Edit: I did check through the solution window, it seems to be based mostly around these three roots: GG, log4cpp, and boost. The first few lines are:

1>------ Build started: Project: GiGi, Configuration: Debug Win32 ------
2>------ Build started: Project: log4cpp, Configuration: Debug Win32 ------
1>cl : Command line error D8016: '/Ox' and '/RTC1' command-line options are incompatible
2> TimeStamp.cpp
3>------ Build started: Project: GiGiOgre, Configuration: Debug Win32 ------

From here, it does into the whole list of fatal error, file not found errors.

User avatar
Geoff the Medio
Programming, Design, Admin
Posts: 13587
Joined: Wed Oct 08, 2003 1:33 am
Location: Munich

Re: Compiling on Windows

#12 Post by Geoff the Medio »

Toxickilla wrote:2. Went to update with Tortoise. Before I could, I had to choose "SVN upgrade working copy"
You're doing something wrong. All you should need to do is open the SDK directory, right click on the "FreeOrion" directory, go to the TortoiseSVN submenu, and click the "Update" option at the top of that list. Whatever "upgrade working copy" is I don't know, but it may be the cause of subsequent problems.
Maybe I have done something wrong with the extraction of the SDK, or maybe I am missing a step?
Just open the .zip file and move its contained directory "FreeOrion_VS2010_SDK" to the desired location. Don't unzip on top of anything else. The "FreeOrion" directory mentioned above is in that directory.

Toxickilla
Space Floater
Posts: 17
Joined: Sun Oct 23, 2011 3:57 pm

Re: Compiling on Windows

#13 Post by Toxickilla »

Quote:
Maybe I have done something wrong with the extraction of the SDK, or maybe I am missing a step?
Just open the .zip file and move its contained directory "FreeOrion_VS2010_SDK" to the desired location. Don't unzip on top of anything else. The "FreeOrion" directory mentioned above is in that directory.
As far as I can tell, I have been doing exactly that.
Toxickilla wrote:
2. Went to update with Tortoise. Before I could, I had to choose "SVN upgrade working copy"
You're doing something wrong. All you should need to do is open the SDK directory, right click on the "FreeOrion" directory, go to the TortoiseSVN submenu, and click the "Update" option at the top of that list. Whatever "upgrade working copy" is I don't know, but it may be the cause of subsequent problems.
I don't have any option other than to do that.

If you don't mind taking a look, I have developed a .pdf file with my step-by-step process (although, I can't include .pdf as an attachment here, is there a way to do it through another system on FreeOrion?).

User avatar
Geoff the Medio
Programming, Design, Admin
Posts: 13587
Joined: Wed Oct 08, 2003 1:33 am
Location: Munich

Re: Compiling on Windows

#14 Post by Geoff the Medio »

Toxickilla wrote:I don't have any option other than to do that.
After a bit of searching, it appears that there's been some format changes in the latest version of Subversion, which require TortoiseSVN to update the working copy to function. I'm not sure what this does to the pathes of things, but make sure there is a series of nested directories like so:

C:\FreeOrion_VS2010_SDK\FreeOrion\GG\src

If the updating moved things around so those aren't nested like that, then it will cause problems.

Edit: I installed the newest TortoiseSVN myself, and upgraded the working copy, which seemed to work fine. There's a missing file or two in the repository that I forgot to commit, so the Universe project doesn't load correctly, but it appears that all the GG stuff downloads in the right place.

Edit2: The main problem was that there was a Debug build configuration that was the default, but which wasn't being / shouldn't be used, and which didn't have all the relevant info like include directories set. I've removed that configuration from the solution, so things should hopefully work out of the box now.

Toxickilla
Space Floater
Posts: 17
Joined: Sun Oct 23, 2011 3:57 pm

Re: Compiling on Windows

#15 Post by Toxickilla »

Excellent. It is working now. Many thanks for you efforts.

One last question. When I run the updates in the future, am I correct in assuming that I have to always build the solution again?

Post Reply