Compiling the sources

From World Wind Wiki

(Difference between revisions)
Jump to: navigation, search
Revision as of 11:24, 15 February 2007 (edit)
Mkpl (Talk | contribs)
m (updated for 1.4)
← Previous diff
Revision as of 14:12, 10 July 2007 (edit) (undo)
Mkpl (Talk | contribs)
m (Using TortoiseSVN - new svn url)
Next diff →
Line 20: Line 20:
#Right-click in that directory and select "SVN Checkout" #Right-click in that directory and select "SVN Checkout"
##Repository: ##Repository:
-###URL of repository = https://svn.sourceforge.net/svnroot/nasa-exp/trunk/WorldWind+###URL of repository = https://nasa-exp.svn.sourceforge.net/svnroot/nasa-exp/trunk/WorldWind
##Revision: if you want to use anything other than SVN HEAD revision, you'll have to select "Revision" radio button, then click the "Show log" button, then select the revision from the list ##Revision: if you want to use anything other than SVN HEAD revision, you'll have to select "Revision" radio button, then click the "Show log" button, then select the revision from the list
##Click OK, and the source code should be downloaded ##Click OK, and the source code should be downloaded

Revision as of 14:12, 10 July 2007

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

Contents

Preparation

Install Software

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

Note: If you have already installed Microsoft Visual Studio .NET 2005, you do not need to install the .NET Framework SDK separately. Visual Studio .NET 2005 includes the SDK.
Note: Above is the latest version. World Wind should compile with October 2005 version
  • A SVN client (e.g. TortoiseSVN)
  • Visual Studio 2005 (free Visual C# Express version available from Microsoft)

Get the Source Code

See source code for more information.

Using TortoiseSVN

  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 "SVN Checkout"
    1. Repository:
      1. URL of repository = https://nasa-exp.svn.sourceforge.net/svnroot/nasa-exp/trunk/WorldWind
    2. Revision: if you want to use anything other than SVN HEAD revision, you'll have to select "Revision" radio button, then click the "Show log" button, then select the revision from the list
    3. Click OK, and the source code should be downloaded
    4. Click OK to close the TortoiseSVN window

Compile the Source Code

Compiling using Visual Studio

Compile within Visual C# Express

Replace C:\wwdev\ with your source directory:

  1. Navigate to the following file and double click it:
    1. C:\wwdev\WorldWind\WorldWindow.csproj
    2. or C:\wwdev\WorldWind.sln
  2. From the Build menu, select Build Solution, and in the Output window you should get a message that the build succeeded.
  3. Close Visual Studio
You may choose 'Debug' or 'Release' from the Build->Configuration Manager menu.

Compile from the commandline

  1. Launch the 'Visual Studio .NET 2005 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\bin\debug\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. Run World Wind, press Alt+Q, then change the Cache path to point to your exisiting Cache directory, close the window, then restart World Wind.

Run Your Compiled Code

Your newly built World Wind should now be ready to go. Double click on WorldWind.exe (e.g. C:\wwdev\bin\Debug\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