Page 1 of 1

How to get the C++ source code

Posted: 14.12.2005, 20:02
by GlobeMaker
How to get the C++ source code for Celestia with the latest WinCVS

The latest WinCVS has different menus than those described in a previous post on this subject by Paolo. That is why this new description is needed.


Step 1 Get Python. To download Python, go to the official Website. http://www.python.org/

Step 2 Get WinCVS, the Concurrent Versions System 2.0.51d http://www.wincvs.org/

Step 3 Enter info into WinCVS to prepare for getting source code

Step 3b Create a new folder on your Hard Disk. I suggest to use a folder in the root. As an example my folder is: C:\CVS. This folder will be the base for our local CVS tree.

Step 3c Use menu Admin:Preferences to set Home to c:\CVS

Step 3d Understand that the Sourceforge Repository is a remote website. You will get your own copies of the source code into your computer directory c:\CVS\celestia (or c:\celestia if
you make a mistake like I did).


Step 4 Communicate with the SourceForge website where the C++ source code is kept

Step 4a Use the WinCVS menu Admin:Login...
A dialog window appears called Login settings.
Put a checkmark in the CVSROOT box

Step 4b
Paste this line in the login line for cvsroot
:pserver:anonymous@cvs.sourceforge.net:/cvsroot/celestia



Step 4c
When you are prompted for a password, do not type in anything, just hit the OK button

The console should report your success with code 0, as shown on 3 lines here:

cvs -d :pserver:anonymous@cvs.sourceforge.net:/cvsroot/celestia login
Logging in to :pserver:anonymous@cvs.sourceforge.net:2401:/cvsroot/celestia

***** CVS exited normally with code 0 *****

If you get code 1, try again. Maybe the connection is too busy to
service your login.


Step 4d Checkout the files with these commands. The first time this is a checkout. Future times are updates, and the commands are the same.

Step 4e Use the menu Admin:Command Line...

Step 4f check the box for CVSROOT and put this line in the space next to that box:
:pserver:anonymous@cvs.sourceforge.net:/cvsroot/celestia

Step 4f2 : check the box for Execute in directory, enter c:\CVS

Step 4g paste the command on the next line into the big empty command line box:
cvs -z3 -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/celestia co -P celestia



Wait while files are then listed as they are sent to your computer. The console will show stuff like this :


cvs -d :pserver:anonymous@cvs.sourceforge.net:/cvsroot/celestia -z3 -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/celestia co -P celestia (in directory C:\CVS)
cvs checkout: cwd=C:\CVS ,current=C:\CVS
cvs checkout: Updating celestia
U celestia/ABOUT-NLS
U celestia/AUTHORS
.
.
.

The files were put in c:\CVS\celestia

Also, download the Windows-specific shared libraries that aren't included with Celestia on SourcForge. http://celestiaproject.net/celestia/files/winlibs-new.zip
Unzip those files and put them in a directory (I don't know where).

Now you have the files. There are many files to understand. You can verify that the files have C++ code by looking at one important looking file, like C:\CVS\celestia\src\celengine\render.cpp

The source code is being studied by the author of these notes to produce a rocket motor to move .3ds objects in Celestia. There is a virtually unlimited supply of fuel for the virtual motor.