Free Windows-based compiling for Celestia.
Posted: 16.11.2004, 21:50
The purpose of this thread is to provide a walkthrough for installing a free Windows based development environment for Celestia. This project was largely inspired by Paolo Angeli’s primer for compiling Celestia under Visual Studio C++. Some steps require large downloads; where applicable I will give approximate completion times for broadband installation. The entire process start to finish should take 1-2 hours on broadband.
If anyone has problems following these instructions then you can inquire on this thread or by sending me a PM. Hopefully I got it right the first time.
cheers,
Walton Comer
- I. Acquiring the Celestia CVS.
II. Installing MS Visual C++ Toolkit 2003.
III. Installing Microsoft Platform SDK.
IV. Installing miscellaneous utilities.
V. Setting up your working directory.
VI. Compiling Celestia.
VII. Subsequent Compiles.
- The CVS is the online repository for Celestia code base. You will need a CVS client in order to easily acquire the Celestia source code. Two popular windows CVS clients are WinCVS and TortoiseCVS. I have used both, but recommend the Tortoise interface as it is somewhat simpler to use.
Acquiring Celestia CVS with WinCVS:
See Paolo's detailed explanations (Phase I: get the code)
http://shatters.net/forum/viewtopic.php?t=3637
Note - Paolo’s instructions are not compatible with the WinCVS 1.3.x, so download WinCVS version 1.2.
Acquiring Celestia CVS with TortoiseCVS:
1) Download the latest version here: (1-2 min, 3.7 MB)
http://www.tortoisecvs.org/download.shtml
2) Follow the TortoiseCVS installation instructions. Note – you may be asked to reboot your machine but in my experience this wasn’t necessary.
3) Create a new folder on your hard drive. Mine is called “C:\TortoiseCVS”. This will be your CVS repository
4) right-click your CVS repository folder and select “CVS Checkout”. If you do not see this option, then you must reboot your machine and try again.
5) Enter “:pserver:anonymous@cvs.sourceforge.net:/cvsroot/celestia” as your CVSROOT. This should cause several other fields to fill in. Protocol - “Password server (:pserver:)”; Server – “cvs.sourceforge.net”; Repository folder – “/cvsroot/celestia”; and User name – “anonymous”.
6) Enter “celestia” as your Module.
7) Press OK. Now the CVS client will attempt to download the Celestia source code. I'm ballparking the download time at 20 minutes mostly because the CVS server is a bit slow. If it is successful then there will be a subfolder called “celestia” within your CVS repository which will contain the current celestia cvs.
- 1) The Installation package can be found here: (<10 min, 32 MB)
http://www.microsoft.com/downloads/details.aspx?FamilyId=272BE09D-40BB-49FD-9CB0-4BFA122FA91B&displaylang=en
2) Run VCToolkitSetup.exe
3) Make a note of the installation directory. Mine was,
“C:\Program Files\Microsoft Visual C++ Toolkit 2003\”
- 1) The Installation is found at this website: (Note - this site seems to require internet explorer.)
http://www.microsoft.com/msdownload/platformsdk/sdkupdate/
2) Select the "Downloads" tab and the "Install" submenu.
2a) From "Core SDK (Windows Server 2003)": Select "Build environment" and "Build environment (Intel 64-bit)".
2b) From "Microsoft Data Access Components)": Select "Build Environment".
3) Click Start Installation and follow the remaining prompts. Note - this is the most time consuming step; give yourself 30 minutes even on broadband.
If you have difficulties with the net installation due to a dial up connection, then the local installation can be found at http://www.microsoft.com/msdownload/platformsdk/sdkupdate/psdk-full.htm (thanks, Maxim.)
4) Make a note of the installation directory. Mine was,
“C:\Program Files\Microsoft SDK\”
- 1) Move Nmake.exe, cvtres.exe, lib.exe from "Microsoft SDK\bin\Win64\" to "Microsoft Visual C++ Toolkit 2003\bin\"
2) Move RC.exe, RcDll.Dll from "Microsoft SDK\bin\" to "Microsoft Visual C++ Toolkit 2003\bin\"
3) Download http://download.microsoft.com/download/vc15/patch/1.52/w95/en-us/nmake15.exe (50 kB)
4) Unzip nmake15.exe
5) Put nmake.err in the folder "Microsoft Visual C++ Toolkit\bin".
6) Discard the rest of the nmake15.exe files.
- 1) Make a copy of your Celestia CVS to a new folder. Mine is, “C:\MyCelestia”
2) Download extra libraries from Chris,
http://shatters.net/celestia/files/winlibs-new.zip (2-3 minutes, 900 kB)
3) Unzip winlibs-new.zip
4) Move both subfolders (lib and inc) into "C:\MyCelestia"
5) Copy the files libpng1.dll and zlib.dll from your actual Celestia installation into "C:\MyCelestia". Celestia.exe will not run without them.
6) Copy vcvars32.bat from "Microsoft Visual C++ Toolkit 2003\" to "C:\MyCelestia"
7) Rename the new .bat file "celvars.bat"
8 ) Edit celvars.bat to read (right-click the file and select ‘edit’.)
Code: Select all
@echo off
Set PATH=C:\Program Files\Microsoft Visual C++ Toolkit 2003\bin
Set INCLUDE=C:\Program Files\Microsoft Visual C++ Toolkit 2003\include
Set LIB=C:\Program Files\Microsoft Visual C++ Toolkit 2003\lib
Set INCLUDE=C:\Program Files\Microsoft SDK\include;%INCLUDE%
Set LIB=C:\Program Files\Microsoft SDK\Lib;%LIB%
Set INCLUDE=C:\Program Files\Microsoft SDK\include\Win64\mfc;%INCLUDE%
Set LIB=C:\Program Files\Microsoft SDK\Lib\IA64\mfc;%LIB%
- 1) Click on the Start Menu and select “Run...”
2) Type cmd into the prompt and hit enter. This opens a new command prompt.
3) Type C:\MyCelestia [enter]
4) Type celvars [enter]
5) Type makerelease [enter]. If all has gone according to plan, then celestia should begin compiling. This takes about 10 minutes on my 600 MHz PIII.
6) Using the graphical interface open “C:\MyCelestia”. If the compile was successful then there will be a new “celestia.exe” in the folder. Double-click on it and you will be running the base install of the latest pre-release of Celestia. Congratulations!
- 1) Right-click “C:\MyCelestia”. Select “CVS Update” and click OK when done. (<1 minute)
2) Repeat step VI (Compiling Celestia.) This time around Celestia should compile very quickly.
If anyone has problems following these instructions then you can inquire on this thread or by sending me a PM. Hopefully I got it right the first time.
cheers,
Walton Comer