Compiling the sources

From World Wind Wiki

(Difference between revisions)
Jump to: navigation, search
Revision as of 10:59, 10 May 2005 (edit)
Nosilleg (Talk | contribs)
(adjusted markup so page flows properly)
← Previous diff
Revision as of 14:04, 10 May 2005 (edit) (undo)
Nosilleg (Talk | contribs)
(rewritten, please see discussion page.)
Next diff →
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 CVS repositories.
-===Microsoft .Net SDK (free)===+ 
-*Download and install [http://www.microsoft.com/downloads/details.aspx?FamilyId=9B3A2CA6-3647-4070-9F41-A333C6B9181D&displaylang=en .NET Framework SDK Version 1.1]+==Compiling with NAnt==
-*Download and install [http://nant.sourceforge.net/ NAnt]+ 
-*Add the /bin directories of both of the above to your path+===Install Software===
-*Download and install [http://msdn.microsoft.com/directx/directxdownloads/ DirectX SDK Dec 2004 or later]+The following software must be installed before starting. See [[DevTools]] for download locations.
-*Remove all other DirectX directories from C:\WINNT\Microsoft.NET\Managed DirectX except for the one you installed (v9.03.91=Dec 2004, this step seemed to be important for me [[user:Adamhill]])+*[[NASA World Wind Download | Latest World Wind]]
-*Open a command shell (Start->Run: cmd.exe)+*.NET Framework SDK
-*Change to the World Wind root directory and type 'nant'+*DirectX SDK
-===Visual Studio===+*WinCVS
-#Install [http://go.microsoft.com/?linkid=2676891 Microsoft Visual C# Express Edition Beta 2] or equivalent+*NAnt
-##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+===Get the Source Code===
-##Install it in default location:+See [[Source Code]] for more information.
-#Download and install WinCVS+ 
-##Launch WinCVS+#Create a directory on your drive where you'd like to develop from (eg C:\wwdev)
-##(from : http://worldwind.arc.nasa.gov/forums/index.php?showtopic=1658&st=0&p=9218&#entry9218)+#Launch WinCVS
-##Create a directory on your drive where you'd like to develop from (eg C:\app\ww\src-cvs)+#Select your directory in the directory pane on the left side
-##Launch WinCVS+#Right Click and choose "<code>Checkout Module...</code>"
-##Select your directory in the directory pane on the left side+#Type "<code>WorldWind</code>" in "Module Name and path on the server"
-##Right Click the directory in the pane and choose "Checkout Module..."+#Type "<code>:pserver;username=anonymous;hostname=cvs.sourceforge.net:/cvsroot/nasa-exp</code>" in "CVSROOT"
-##Type "WorldWind" in "Module Name and path on the server"+#Click OK. CVS Will now check out the source code for WorldWind in a "<code>WorldWind</code>" directory under your chosen one. (A window may come up asking for your default directory. Just click OK)
-##Type ":pserver;username=anonymous;hostname=cvs.sourceforge.net:/cvsroot/nasa-exp" in "CVSROOT"+#Close WinCVS
-##Click OK. + 
-##A window will pop up, navigate to the same folder from step c.+===Compile the Code===
-##Click OK, CVS software will start download.+Open a Command Prompt and cd to your work directory (<code>cd \wwdev\WorldWind</code>)
-##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)+Type "<code>c:\nant-0.85-rc2\bin\nant</code>" (change the path to reflect where you installed Nant)
-##Close WinCVS+If all goes well, you should get <tt>BUILD SUCCEEDED</tt> in the end
 + 
 +===Copy Data===
 +Now copy the "<code>C:\Program Files\NASA\World Wind 1.3\Data\Earth</code>" directory to "<code>C:\wwdev\WorldWind\bin\Debug\Data</code>"
 + 
 +===Run Your Compiled Code===
 +Your newly built WorldWind should now be ready to go. Double click on "<code>WorldWind.exe</code>" in "<code>C:\wwdev\WorldWind\bin\Debug</code>"
 +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. [http://go.microsoft.com/?linkid=2676891 Microsoft Visual C# Express Edition Beta 2]) instead of NAnt.
 + 
 +===Get the Source Code===
 +The same as above.
 + 
 +===Compile the Code within Studio===
#Navigate to the following file (double click it): #Navigate to the following file (double click it):
##C:\app\ww\src-cvs\WorldWind\WorldWindow.sln ##C:\app\ww\src-cvs\WorldWind\WorldWindow.sln
Line 41: Line 60:
##Now retry step 5.3, it should launch ##Now retry step 5.3, it should launch
##Final step MSVS->Main Menu->File->Save or Save as. ##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. 
- 
- 
-Resources: 
-irc.freenode.net, #worldwind #worldwind-dev 
- 
- 
-This text describes how to retrieve, compile and run the World Wind (V1.3 as of this writing) source code from SourceForge. 
- 
-It assumes you've already got CVS access working - this page describes setting up anonymous CVS access (http://sourceforge.net/cvs/?group_id=69528). 
- 
-For read-write CVS access, check out these instructions (http://worldwind.arc.nasa.gov/forums/index.php?showtopic=851). 
- 
-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 
- 
-In the following, <CVS> refers to your CVS working directory or sandbox. 
- 
-* Retrieve the source code tree from CVS as a clean update into an empty sandbox. 
-* Open <cvs>\WorldWind\WorldWindow.sln and compile it. 
-* 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) 
-** 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)+===Compile the Code from the commandline===
 +# 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'
 +# Run 'Devenv.exe WorldWind.sln /build Debug'
-* 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)+===Run Your Compiled Code===
-* Added Nant build scripts to CVS. (25/03/05 adamhill) +Same as above.
[[Category:Dev]] [[Category:Dev]]

Revision as of 14:04, 10 May 2005

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

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;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

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