Page 1 of 2
Simplified builds on Win32
Posted: 10.07.2009, 18:44
by chris
In version 1.6.0, the process for building Celestia on Windows is greatly simplified. All the libraries required to build Celestia are now in the SVN repository, and the project file has been cleaned up and updated for MSVC 2008. To build Celestia now, all that you need to do is download the free compiler and SVN client, checkout the Celestia source code, load the project file in MSVC, and build. No more messing with libraries or compiler settings is required. The WikiBook has details on the new build process and where to get the necessary tools:
http://en.wikibooks.org/wiki/Celestia/D ... 2_platform--Chris
Re: Simplified builds on Win32
Posted: 10.07.2009, 18:54
by t00fri
Yeah!
Come on, guys, just try it!
Fridger
Re: Simplified builds on Win32
Posted: 10.07.2009, 20:02
by abramson
Right. I have been doing it for my last builds, which I continue to provide for the lazy bunch. But everybody should do it by themselves, everybody, it's so easy.
Thanks, Chris,
Guillermo
Re: Simplified builds on Win32
Posted: 13.07.2009, 11:54
by piellepi
Hi Chris!
Thanks a lot!
I succeded in compiling and creating MY celestia, following your instructions!!!! The only problems I had were due to M$oft: I was not able to download neither the compiler nor the SDK in my home notebook...
Here at office I succeeded!
I checked out and updated to the current revision
4757: Guillermo could you please compile this version so I can double check "
my" version with your "
official" one?
Grazie!!
Pierluigi
Re: Simplified builds on Win32
Posted: 13.07.2009, 12:14
by abramson
Done 4757, Pierluigi.
(I do not upload every SVN version because many of them involve only changes in data files, not source files, and then no changes in the executable. I am about to travel to Spain for a month so my builds will stop for some time, but with 1.6.0 out nobody should get excessively anxious.)
G
Re: Simplified builds on Win32
Posted: 13.07.2009, 13:01
by piellepi
Thanks Guillermo for the fast reply!!
I'm a skilled programmer, but I never worked with VC2008: the release version I obtain is a little different from yours. I compared them with Beyond Compare... a crude but intelligent bitwise compare... and it says there are important differences.
I suppose that you build your version with a series of optimizations and with a particular setup: would it be possible to duplicate your build options?
Experience says that I'll be happy only when I'll obtain the same executable as yours!!
Starting from that version, then I'll begin my study of the code...
BTW "my" version runs perfectly, so differences in size (my version is 2 835 968 bytes vs 2 821 632bytes) are only matter of setup and build conditions and optimizations...
Thanks again!
Ciao
Pierluigi
Re: Simplified builds on Win32
Posted: 13.07.2009, 13:33
by abramson
I'm sure it's a difference in compiler options. As to optimizations, I'm using:
/O2 /Oi /Ot /Oy /GT /GL, and Inline function expansion: default. All these set through the right-click command over the "celestia solution" (in the left-hand side tree view of VC++2008) > Properties > Configuration Properties > C/C++ > Optimization. I doubt I have changed anything else from the defaults. Oh, and build "release".
Guillermo
Re: Simplified builds on Win32
Posted: 13.07.2009, 14:31
by t00fri
abramson wrote:I'm sure it's a difference in compiler options. As to optimizations, I'm using:
/O2 /Oi /Ot /Oy /GT /GL, and Inline function expansion: default. All these set through the right-click command over the "celestia solution" (in the left-hand side tree view of VC++2008) > Properties > Configuration Properties > C/C++ > Optimization. I doubt I have changed anything else from the defaults. Oh, and build "release".
Guillermo
These optimizations will be automatically set if one opens the solution file celestia.sln which is now for VC++2008. All which needs to be done is switching to 'Release'.
Let me add that we spent quite a few thoughts to picking a "good" set of optimizations. In particular, since some of us have plenty of experience with the MS IDE.
Note that before using the Eigen library etc later, SSE2 gives NO improvements. Later it will, however. Note also that for more extreme optimizations one should also recompile all libraries in the windows/ subdirectory with the same optimizations...
I think all this would be a pretty bad strategy, since the advantages of everyone compiling with a well thought-off reference configuration are way preferrable.
That would be my advice to
piellepi. Another one perhaps: Vc++2008 requires at least
.Net 2.0, otherwise there will be NO download. I hope this was taken into account by piellepi above... I never encountered any problems downloading any MS compiler. Certainly not Vc++2008. It is also crucial to make sure to download the latest service packs for the various components. Note, there are service packs for ALL of them and there might be a bug wrto particular optimizations in VC++2008
SP1Fridger
Re: Simplified builds on Win32
Posted: 13.07.2009, 17:11
by piellepi
Thanks Guillermo and Fridger for your comments!
I think that there should be a common setup for the compiler.
In my 25 years experience in programming (since DOS times) I know that when you work in a team, it's mandatory that everyone has the same setup, the same compiler and ... the same ideas!!
When I started programming on computers, PCs didn't exist at all, and working in the same project with other people was very difficult, without anything like SVN.
I remember that in order to "check out a file" we had to shout it as voice command:
people were invited not to open that file!!
Now I'll try the optimizations you suggest!
Oh no, I'll try tomorrow in my office!
BTW the problem with my home notebook was not something relate to .NET: I have the version 3.5 installed since its distribution.
M$oft says it's a problem of a service (I don't remember now its name), but this service was obviously started and working!!
I don't trust M$oft very much, but instead I think that Vista is the best OS I've ever worked with...
Ciao
Pierluigi
Re: Simplified builds on Win32
Posted: 13.07.2009, 17:21
by t00fri
piellepi wrote:Thanks Guillermo and Fridger for your comments!
I think that there should be a common setup for the compiler.
In my 25 years experience in programming (since DOS times) I know that when you work in a team, it's mandatory that everyone has the same setup, the same compiler and ... the same ideas!!
When I started programming on computers, PCs didn't exist at all, and working in the same project with other people was very difficult, without anything like SVN.
I remember that in order to "check out a file" we had to shout it as voice command:
people were invited not to open that file!!
Now I'll try the optimizations you suggest!
Oh no, I'll try tomorrow in my office!
BTW the problem with my home notebook was not something relate to .NET: I have the version 3.5 installed since its distribution.
M$oft says it's a problem of a service (I don't remember now its name), but this service was obviously started and working!!
I don't trust M$oft very much, but instead I think that Vista is the best OS I've ever worked with...
Ciao
Pierluigi
To get the above optimizations, you just need to click celestia.sln in the celestia root dir from within the VC++2008 IDE. That's all. We have tried hard to make things
simple and
unified for everyone! Actually, my professional programming experience dates back quite a bit longer than 25 years
Fridger
Re: Simplified builds on Win32
Posted: 13.07.2009, 18:55
by piellepi
Fridger,
that's exactly what I did: I clicked celestia.sln, chose "Release" and at the end "Build".
Easy... terribly easy!!
The compiler found two warnings due to redefinition of FAR, but there was no other problem at all...
I never succeded before in compiling Celestia. Some years ago (I don't remember when), I tried to follow the (long and complicated) instructions about compiling Celestia in Windows, but there was always something that went wrong, missing libraries,
strange libraries and so on, so I abandoned the idea...
Now everything changed! And I am
very happy!
Now, when I have time, I'd consider in changing something here and there: I don't know exactly what! Perhaps I'll start with something I'd liked to change from the first time I used Celestia: the keyboard association to commands... When I worked with an American keyboard I was very satisfied, but that was 5 or 6 keyboards ago! Now and then they broke and I always needed to buy another one: since then I bought only Italian keyboards (just because I write in Italian!).
BTW I'm still wandering why "my" version is different... What is the difference? Just for curiosity!!
I just followed all the instructions...
These are Windows Mysteries!!!
Bye and thanks, my friends!
Pierluigi
Re: Simplified builds on Win32
Posted: 13.07.2009, 19:03
by piellepi
...forgot to say that 25 years are "working" years...
I started programming on the unforgettable TI-59 (Texas Instruments), with a eclipse prediction program (thanks to Meeus!). If I remember well it was in 1977...
But I started my passion for Astronomy just 40 years ago, the day after Armstrong and Collins walked on the moon! Then I was 14 years old...
Pierluigi
Re: Simplified builds on Win32
Posted: 13.07.2009, 19:40
by t00fri
Pierluigi,
piellepi wrote:...forgot to say that 25 years are "working" years...
Pierluigi
I started counting from my degree in Computer Science that I hold besides my various Physics degrees.
My inofficial programming started also much earlier with coding the software for a self-built storage oszilloscope in 6502 assembler (~5000 lines) on my
Commodore 64 Still working today
Fridger
Re: Simplified builds on Win32
Posted: 14.07.2009, 03:51
by ranbudzz
abramson wrote:Done 4757, Pierluigi.
(I do not upload every SVN version because many of them involve only changes in data files, not source files, and then no changes in the executable. I am about to travel to Spain for a month so my builds will stop for some time, but with 1.6.0 out nobody should get excessively anxious.)
G
yeah this same process I did last time to my Win32
_________________
Oklahoma city
Re: Simplified builds on Win32
Posted: 14.07.2009, 09:40
by Vincent
t00fri wrote:To get the above optimizations, you just need to click celestia.sln in the celestia root dir from within the VC++2008 IDE. That's all.
I'm not sure wether this is wanted or not, but celestia.sln is configured to build a
debug version...
To build a
release, right-click on 'celestia' solution > Property > Configuration and switch from 'Debug' to 'Release'.
Re: Simplified builds on Win32
Posted: 14.07.2009, 11:28
by piellepi
hi friends!
the solution file has not all the optimization that Guillermo indicated.
I had to add manually /Ot /Oy /GT and /GL from "properties/C++/optimization"
The configuration is always "Release".
After a rebuild, "my" celestia.exe is 2 819 584 byte, while Guillermo official one is 2 821 632 byte: now the difference is a mere 2kbytes, but still exists!
still investigating...
ciao
Pierluigi
Re: Simplified builds on Win32
Posted: 14.07.2009, 11:43
by piellepi
I'm again here!
right clicking the solution file, in "properties/C++/Command Line" I suppose there is the complete list of optimizations and compile switches!!
My list is the following (obtained with cut and paste)
--------------------------------------------------------------------------------------------------------------------------
/O2 /Oi /Ot /Oy /GT /GL /I ".\src" /I ".\windows\inc" /I ".\windows\inc\libintl" /I ".\windows\inc\libpng" /I ".\windows\inc\libz" /I ".\windows\inc\spice" /I ".\windows\inc\lua-5.1" /I ".\windows\inc\libjpeg" /D "CELX" /D "LUA_VER=0x050100" /D "USE_SPICE" /D "WINVER=0x0400" /D "_WIN32_WINNT=0x0400" /D "_CRT_SECURE_NO_DEPRECATE" /FD /EHsc /MD /Fo"Release\\" /Fd"Release\vc90.pdb" /nologo /c /TP /errorReport:prompt
--------------------------------------------------------------------------------------------------------------------------
I think a quick comparison with Guillermo's list will give the solution!!!
Pierluigi
Re: Simplified builds on Win32
Posted: 14.07.2009, 12:09
by t00fri
Vincent wrote:t00fri wrote:To get the above optimizations, you just need to click celestia.sln in the celestia root dir from within the VC++2008 IDE. That's all.
I'm not sure wether this is wanted or not, but celestia.sln is configured to build a
debug version...
To build a
release, right-click on 'celestia' solution > Property > Configuration and switch from 'Debug' to 'Release'.
The Debug version is usually the default. But I (we) wrote earlier that one has to switch to Release after clicking.
Fridger
Re: Simplified builds on Win32
Posted: 14.07.2009, 12:22
by t00fri
piellepi wrote:I'm again here!
right clicking the solution file, in "properties/C++/Command Line" I suppose there is the complete list of optimizations and compile switches!!
My list is the following (obtained with cut and paste)
--------------------------------------------------------------------------------------------------------------------------
/O2 /Oi /Ot /Oy /GT /GL /I ".\src" /I ".\windows\inc" /I ".\windows\inc\libintl" /I ".\windows\inc\libpng" /I ".\windows\inc\libz" /I ".\windows\inc\spice" /I ".\windows\inc\lua-5.1" /I ".\windows\inc\libjpeg" /D "CELX" /D "LUA_VER=0x050100" /D "USE_SPICE" /D "WINVER=0x0400" /D "_WIN32_WINNT=0x0400" /D "_CRT_SECURE_NO_DEPRECATE" /FD /EHsc /MD /Fo"Release\\" /Fd"Release\vc90.pdb" /nologo /c /TP /errorReport:prompt
--------------------------------------------------------------------------------------------------------------------------
I think a quick comparison with Guillermo's list will give the solution!!!
Pierluigi
Please note that we made a number of last minute changes to the optimizations after extensive discussions in the Dev list. Guillermo may not have these implemented.
I advise to be careful here, since some of the matter is tricky:
-- ChrisL is/was using VC++2008
without service pack when this discussion took place
-- I am using since a while VC++2008
SP1-- it was discussed in the net/MS that there seems to be a bug in SP1 that makes some optimizations uneffective!
To cope with these issues both for no SP and SP1, we have deactivated some optimizations at the very end, just before the release version. However, we made sure by many benchmark runs that with the present celestia.sln, users get optimal performance of celestia.exe.
Presumably, Guillermo was unaware of these subtleties, since he is not a member of the Dev team. Clearly, there may be already small differences in code size due to these facts and the differences between no SP and SP1 compilations.
In general, I would advice to use the optimization flags that we recommend. As I mentioned already, they were carefully chosen...
Fridger
Re: Simplified builds on Win32
Posted: 14.07.2009, 15:23
by piellepi
so, Fridger, what is "your" list of options, as discussed among you developers?
I don't want to change your choices, obviously!!
All I want is to be consistent with the current version of Celestia in order to build the same executable!!!
Thanks
Pierluigi