Compiling the sources

From World Wind Wiki

Revision as of 14:04, 10 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.


Compiling with NAnt

Install Software

The following software must be installed before starting. See DevTools 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;" 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

Compile the Code

Open a Command Prompt and cd to your work directory (cd \wwdev\WorldWind) 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

Copy Data

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

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 run the nant command again to recompile.

Compiling with Visual Studio

Install Software

The same as above, but with a version of Visual Studio (e.g. Microsoft Visual C# Express Edition Beta 2) instead of NAnt.

Get the Source Code

The same as above.

Compile the Code 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. You may now get an error due to a missing file
      1. Could not find a part of the path C:\app\ww\src-cvs\WorldWind\bin\Debug\Data\Earth\Placenmaes\Country\ww.wpl
      2. Copy the (Earth) folder from the 1.3 install of the full application directory start from C:\Program Files\NASA\World Wind 1.3\Data TO C:\app\ww\src-cvs\WorldWind\bin\Debug\Data
    5. Now retry step 5.3, it should launch
    6. Final step MSVS->Main Menu->File->Save or Save as.

Compile the Code 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'

Run Your Compiled Code

Same as above.

Personal tools