Compiling the sources

From World Wind Wiki

(Difference between revisions)
Jump to: navigation, search
Revision as of 13:12, 14 March 2005 (edit)
194.66.147.38 (Talk)
(Fixed important typo)
← Previous diff
Current revision (10:58, 30 January 2018) (edit) (undo)
Bull (Talk | contribs)
m (Reverted edits by Monday (Talk); changed back to last version by Mkpl)
 
(35 intermediate revisions not shown.)
Line 1: Line 1:
-WORLD WIND 1.3 CVS Build Instructions+'''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.
-#Install Microsoft Visual Studio C# .NET 2005 Express or equivalent+==Preparation==
-##Recommend building the 60 second program to verify everything works.+
-#Install World Wind 1.3 from web site. http://worldwind.arc.nasa.gov/download.html+
-##Install it in default location:+
-#Download and install WinCVS+
-##Launch WinCVS+
-##(from : http://worldwind.arc.nasa.gov/forums/index.php?showtopic=1658&st=0&p=9218&#entry9218)+
-##Create a directory on your drive where you'd like to develop from (eg C:\app\ww\src-cvs)+
-##Launch WinCVS+
-##Select your directory in the directory pane on the left side+
-##Right Click the directory in the pane and choose "Checkout Module..."+
-##Type "WorldWind" in "Module Name and path on the server"+
-##Type ":pserver;username=anonymous;hostname=cvs.sourceforge.net:/cvsroot/nasa-exp" in "CVSROOT"+
-##Click OK. +
-##A window will pop up, navigate to the same folder from step c.+
-##Click OK, CVS software will start download.+
-##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)+
-##Close WinCVS+
-#Navigate to the following file (double click it):+
-##C:\app\ww\src-cvs\WorldWind\WorldWindow.sln+
-##If using MS VS 2005 it will ask to convert the file, NEXT->NEXT->FINISH+
-##F5 to build+
-##Close MS VS+
-#Navigate to the following file (double click it):+
-##C:\app\ww\src-cvs\WorldWind\WorldWind.sln+
-##If using MS VS 2005 it will ask to convert the file, NEXT->NEXT->FINISH+
-##F5 to build+
-##You may now get an error due to a missing file +
-###Could not find a part of the path C:\app\ww\src-cvs\WorldWind\bin\Debug\Data\Earth\Placenmaes\Country\ww.wpl+
-###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+
-##Now retry step 5.3, it should launch+
-##Final step MSVS->Main Menu->File->Save or Save as.+
-##You can now navigate to the C:\app\ww\src-cvs\WorldWind\bin\Debug directory and launch your compiled version.+
 +===Install Software===
 +The following software must be installed before starting.
 +See [[Development Tools]] for download locations.
 +*.NET Framework SDK 2.0 ([http://www.microsoft.com/downloads/details.aspx?familyid=fe6f2099-b7b4-4f47-a244-c96d69c35dec&displaylang=en NET Framework 2.0 Software Development Kit (SDK) (x86)])
 +: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.
 +*Managed DirectX ([http://www.microsoft.com/downloads/details.aspx?FamilyID=4B1F5D0C-5E44-4864-93CD-464EF59DA050&displaylang=en DirectX 9.0c Redistributable (February 2007)])
 +:Note: Above is the latest version. World Wind should compile with [http://www.microsoft.com/downloads/details.aspx?FamilyID=9930efa6-9f7b-4c8a-aea2-97dd6ab307a2&DisplayLang=en October 2005 version]
 +*A SVN client (e.g. [http://tortoisesvn.tigris.org/ TortoiseSVN])
 +*Visual Studio 2005 (free Visual C# Express version available from [http://msdn.microsoft.com/vstudio/express/visualcsharp/default.aspx Microsoft])
-Resources:+===Get the Source Code===
- irc.freenode.net, #worldwind #worldwind-dev+See [[source code]] for more information.
 +====Using TortoiseSVN====
 +#Create a directory on your drive where you'd like to develop from (eg C:\wwdev)
 +#Right-click in that directory and select "SVN Checkout"
 +##Repository:
 +###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
 +##Click OK, and the source code should be downloaded
 +##Click OK to close the TortoiseSVN window
 +==Compile the Source Code==
 +===Compiling using Visual Studio===
-This text describes how to retrieve, compile and run the World Wind (V1.3 as of this writing) source code from SourceForge.+====Compile within Visual C# Express====
 +Replace C:\wwdev\ with your source directory:
 +#Navigate to the following file and double click it:
 +##C:\wwdev\WorldWind\WorldWindow.csproj
 +##or C:\wwdev\WorldWind.sln
 +#From the Build menu, select Build Solution, and in the Output window you should get a message that the build succeeded.
 +#Close Visual Studio
 +:You may choose 'Debug' or 'Release' from the Build->Configuration Manager menu.
 +=====Importing into Visual C# 2008 Express=====
 +#Click ''File->Open Project''
 +#Navigate to the source directory
 +#Choose ''WorldWind.sln'' and click ''Open''
 +#In the Conversion Wizard click ''Next''
 +##You can create a backup before converting the project.
 +#Click ''Next'' again, review the summary and click ''Finish''
 +##Here you can review coversion errors - just ignore them, WW should compile fine.
 +#Click ''Close''... Voilà! You can compile WW now. Make sure to choose 'Debug' or 'Release' from the Build->Configuration Manager menu as some of the other configurations will give errors.
-It assumes you've already got CVS access working - this page describes setting up anonymous CVS access (http://sourceforge.net/cvs/?group_id=69528).+====Compile from the commandline====
 +# Launch the 'Visual Studio .NET 2005 Command Prompt' (under Start / Programs / Visual Studio .NET / Visual Studio .NET Tools)
 +# CD to the WorldWind source root.
 +# Run 'Devenv.exe WorldWindow.sln /build Debug'
 +# 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.
-For read-write CVS access, check out these instructions (http://worldwind.arc.nasa.gov/forums/index.php?showtopic=851).+==Data Setup==
 +Select one of the following options:
 +#Use a fresh copy of imagery and terrain data - just proceed to the next section to run the compiled code
 +#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:
 +##Cache files - use either of the following:
 +###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)
 +###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.
-Note that you'll end up with two seperate WorldWind installations: 1.2e retail, and the current version with the source code, with its binaries in \bin\Debug+==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.
-In the following, <CVS> refers to your CVS working directory or sandbox.+If you make changes to the source files that you would like to compile, just follow the [[#Compile the Code|Compile the Code]] instructions again to recompile, and after the compile, make sure to save the changes.
- * Retrieve the source code tree from CVS as a clean update into an empty sandbox.+==See also==
- * Open <cvs>\WorldWind\WorldWindow.sln and compile it.+*[[Latest builds]] to get already compiled builds
- * Open <cvs>\WorldWind\WorldWind.sln and compile it.+
- * Either: +
- * Uninstall any older "retail" copy of WorldWind 1.2. (Skip if you haven't got it installed yet)+[[Category:Dev]]
- * Download and install World Wind 1.2e full (http://worldwind.arc.nasa.gov/download.html) (or the latest available retail version) +
- +
- * Or: +
- +
- * Patch your WorldWind install to 1.2e with the World Wind 1.2e patch (http://worldwind.arc.nasa.gov/download.html) +
- +
- * In <CVS>\WorldWind\bin\Debug\Data create a directory "Earth"+
- * From the \Data directory of the "retail" install (usually C:\Program Files\NASA\WorldWind v<version>\Data) copy the following directories to the newly +
- +
-created "Earth":+
- +
-BlueMarbleTextures+
-Boundaries+
-Placenames+
- +
- * In Visual Studio, open <CVS>\WorldWind\v1_3QuadTileDirectoryFixer\v1_3QuadTileDirectoryFixer.sln, compile, and run it.+
- * QuadTileDirectoryFixer will ask for a directory - point it to <CVS>\WorldWind\bin\Debug\Data\Earth\BlueMarbleTextures and press "Fix".+
- * Launch <CVS>\WorldWind\bin\Debug\WorldWind.exe - good luck! +
- +
- +
-(gillesk, 05-feb-05)+
- +
-To build from the command line.+
- +
- * Launch the 'Visual Studio .NET 2003 Command Prompt' (under Start / Programs / Visual Studio .NET / Visual Studio .NET Tools)+
- * CD to the WorldWind source root.+
- * Run 'Devenv.exe WorldWindow.sln /build Debug' and 'Devenv.exe WorldWind.sln /build Debug' +
- +
-(Replace 'Debug' with 'Release' as desired)+
- +
-(adamhill 17-feb-05)+
- +
- * As of 1.3.0 the references in the Release build point to /Debug dll's. So to /rebuild a release, /rebuild debug first. (02/03/05 adamhill)+

Current revision

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

[edit] Preparation

[edit] 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)

[edit] Get the Source Code

See source code for more information.

[edit] 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

[edit] Compile the Source Code

[edit] Compiling using Visual Studio

[edit] 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.
[edit] Importing into Visual C# 2008 Express
  1. Click File->Open Project
  2. Navigate to the source directory
  3. Choose WorldWind.sln and click Open
  4. In the Conversion Wizard click Next
    1. You can create a backup before converting the project.
  5. Click Next again, review the summary and click Finish
    1. Here you can review coversion errors - just ignore them, WW should compile fine.
  6. Click Close... Voilà! You can compile WW now. Make sure to choose 'Debug' or 'Release' from the Build->Configuration Manager menu as some of the other configurations will give errors.

[edit] 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.

[edit] 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.

[edit] 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.

[edit] See also

Personal tools