Compiling the sources

From World Wind Wiki

(Difference between revisions)
Jump to: navigation, search
Revision as of 15:55, 31 October 2005 (edit)
Horizon (Talk | contribs)
m (Compile within Studio - - same paragraph twice, one removed)
← Previous diff
Revision as of 12:40, 12 April 2006 (edit) (undo)
Nosilleg (Talk | contribs)
m (Get the Source Code - source code)
Next diff →
Line 13: Line 13:
===Get the Source Code=== ===Get the Source Code===
-See [[Source Code]] for more information.+See [[source code]] for more information.
====Using WinCVS==== ====Using WinCVS====

Revision as of 12:40, 12 April 2006

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.



Install Software

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

  • .NET Framework SDK (1.1)
  • DirectX SDK (current project standard: 9.0 SDK December 2004)
  • A CVS client (e.g. TortoiseCVS or WinCVS)
  • A .NET 'make' style utility (e.g. Visual Studio.NET or NAnt)

Note: with VS.NET you will be loading the project(s) into a GUI and compiling, with Nant you will be compiling from the command line

Get the Source Code

See source code for more information.

Using WinCVS

  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

Using TortoiseCVS

  1. Create a directory on your drive where you'd like to develop from (eg C:\wwdev)
  2. Right-click in that directory and select "CVS Checkout"
    1. On the Module tab:
      1. CVSROOT =
      2. Server =
      3. Repository folder = /cvsroot/nasa-exp
      4. User name = anonymous
      5. Module = WorldWind
    2. On the Revision tab, if you want to use anything other than CVS HEAD, you'll have to select "Choose branch or tag", then click the "Update list" button, then select the branch/tag from the list
    3. On the Options tab, you may want to change "Name of folder to create" to use the tag/branch/revision in the folder name
    4. Click OK, and the source code should be downloaded
    5. Click OK to close the TortoiseCVS window

Compile the Source Code

Compiling using 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)
    or "c:\nant-0.85-rc2\bin\nant" for non-debug binaries

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

Compiling using Visual Studio

Compile within Studio

Replace C:\wwdev\WorldWind\ with your source directory:

  1. Navigate to the following file and double click it:
    1. C:\wwdev\WorldWind\WorldWindow.sln
    2. If using MS VS 2005 it will ask to convert the file, NEXT->NEXT->FINISH
    3. From the Build menu, select Build WorldWindow, and in the Output window you should get a message that the build succeeded
    4. Close Visual Studio

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.

Data Setup

Select one of the following options:

  1. Use a fresh copy of imagery and terrain data - just proceed to the next section to run the compiled code
  2. If you already have a version of World Wind installed, and you already have files on your PC's harddisk that you want to make use of:
    1. Cache files - use either of the following:
      1. Copy your existing Cache directory (e.g. C:\Program FIles\NASA\World Wind\Cache) to be a subdirectory of the directory containing your compiled source code's executable file (e.g. C:\wwdev\WorldWind\Cache)
      2. If you already have a version of World Wind installed, and you already have files cached on your PC's harddisk that you want to make use of, then you can change your compiled version of World Wind to point to that existing directory. Following the instructions above, open WorldWind.sln, then edit the App.Config file key "CacheDirectory" to point to your exisiting Cache directory, save the change, then compile WorldWind.
    2. Blue Marble files:
      1. The following is subject to the resolution of Issue WW-196.
      2. There should be two DDS files in your C:\wwdev\WorldWind\bin\Debug\Data\Earth\BlueMarbleTextures directory
      3. In the \Data\Earth\BlueMarbleTextures directory located in the program directory for your existing copy of World Wind, there should be directories named 0, 1, 2, 3. Copy these directories to your C:\wwdev\WorldWind\bin\Debug\Data\Earth\BlueMarbleTextures directory
      4. Edit the C:\wwdev\WorldWind\bin\Debug\Config\Earth\Images.xml file:
        1. On the line immediately above <Name>Blue Marble Tiled (1km per pixel) Local</Name> change ShowAtStartup="false" to ShowAtStartup="true"
        2. On the line immediately above <Name>Blue Marble Tiled (1km per pixel) Online</Name> change ShowAtStartup="true" to ShowAtStartup="false"
        3. Save the changes to Images.xml

Run Your Compiled Code

Your newly built WorldWind should now be ready to go. Double click on WorldWind.exe (e.g. C:\wwdev\WorldWind\WorldWind.exe) 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, and after the compile, make sure to save the changes.

Personal tools