Compiling the sources

From World Wind Wiki

Revision as of 14:25, 12 May 2005 by Nosilleg (Talk | contribs)
Jump to: navigation, search

Compiling the sources allows you to create executables from modified code. The instructions below show you how to compile the lastest code from the CVS repositories.

Contents

Preparation

Install Software

The following software must be installed before starting. See Development Tools for download locations.

Get the Source Code

See Source Code for more information.

  1. Create a directory on your drive where you'd like to develop from (eg C:\wwdev)
  2. Launch WinCVS
  3. Select your directory in the directory pane on the left side
  4. Right Click and choose "Checkout Module..."
  5. Type "WorldWind" in "Module Name and path on the server"
  6. Type ":pserver;username=anonymous;hostname=cvs.sourceforge.net:/cvsroot/nasa-exp" in "CVSROOT"
  7. Click OK. CVS Will now check out the source code for WorldWind in a "WorldWind" directory under your chosen one. (A window may come up asking for your default directory. Just click OK)
  8. Close WinCVS

Copy Data

Now copy the "C:\Program Files\NASA\World Wind 1.3\Data\Earth" directory to "C:\wwdev\WorldWind\bin\Debug\Data"

Compile the Code

Compiling with NAnt

  1. Open a Command Prompt and cd to your work directory (cd \wwdev\WorldWind)
  2. Type "c:\nant-0.85-rc2\bin\nant" (change the path to reflect where you installed Nant)

If all goes well, you should get BUILD SUCCEEDED in the end

Compiling with Visual Studio

Compile within Studio

  1. Navigate to the following file (double click it):
    1. C:\app\ww\src-cvs\WorldWind\WorldWindow.sln
    2. If using MS VS 2005 it will ask to convert the file, NEXT->NEXT->FINISH
    3. F6 to build
    4. Close MS VS
  2. Navigate to the following file (double click it):
    1. C:\app\ww\src-cvs\WorldWind\WorldWind.sln
    2. If using MS VS 2005 it will ask to convert the file, NEXT->NEXT->FINISH
    3. F5 to build and start
    4. Final step MSVS->Main Menu->File->Save or Save as.

Compile from the commandline

  1. Launch the 'Visual Studio .NET 2003 Command Prompt' (under Start / Programs / Visual Studio .NET / Visual Studio .NET Tools)
  2. CD to the WorldWind source root.
  3. Run 'Devenv.exe WorldWindow.sln /build Debug'
  4. Run 'Devenv.exe WorldWind.sln /build Debug'
  • Replace 'Debug' with 'Release' as desired
  • As of 1.3.0 the references in the Release build point to /Debug dll's. So to /rebuild a release, /rebuild debug first.


Run Your Compiled Code

Your newly built WorldWind should now be ready to go. Double click on "WorldWind.exe" in "C:\wwdev\WorldWind\bin\Debug" and it should start.

If you make changes to the source files that you would like to compile, just follow the Compile the Code instructions again to recompile.

Personal tools