Compiling the sources

From World Wind Wiki

(Difference between revisions)
Jump to: navigation, search
Revision as of 14:04, 10 May 2005 (edit)
Nosilleg (Talk | contribs)
(rewritten, please see discussion page.)
← Previous diff
Revision as of 23:16, 10 May 2005 (edit) (undo)
Nosilleg (Talk | contribs)
(moved stuff around)
Next diff →
Line 1: Line 1:
'''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 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==+==Preparation==
===Install Software=== ===Install Software===
Line 9: Line 9:
*DirectX SDK *DirectX SDK
*WinCVS *WinCVS
-*NAnt+*NAnt OR Visual Studio (e.g. [http://go.microsoft.com/?linkid=2676891 Microsoft Visual C# Express Edition Beta 2])
===Get the Source Code=== ===Get the Source Code===
Line 22: Line 22:
#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) #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)
#Close WinCVS #Close WinCVS
- 
-===Compile the Code=== 
-Open a Command Prompt and cd to your work directory (<code>cd \wwdev\WorldWind</code>) 
-Type "<code>c:\nant-0.85-rc2\bin\nant</code>" (change the path to reflect where you installed Nant) 
-If all goes well, you should get <tt>BUILD SUCCEEDED</tt> in the end 
===Copy Data=== ===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>" 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===+==Compile the 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 NAnt===
 +#Open a Command Prompt and cd to your work directory (<code>cd \wwdev\WorldWind</code>)
 +#Type "<code>c:\nant-0.85-rc2\bin\nant</code>" (change the path to reflect where you installed Nant)
 +If all goes well, you should get <tt>BUILD SUCCEEDED</tt> in the end
-==Compiling with Visual Studio==+===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===+====Compile 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 55: Line 45:
##If using MS VS 2005 it will ask to convert the file, NEXT->NEXT->FINISH ##If using MS VS 2005 it will ask to convert the file, NEXT->NEXT->FINISH
##F5 to build and start ##F5 to build and start
 +<!-- Safe to remove?
##You may now get an error due to a missing file ##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 ###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 ###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 ##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.
-===Compile the Code from the commandline===+====Compile from the commandline====
# Launch the 'Visual Studio .NET 2003 Command Prompt' (under Start / Programs / Visual Studio .NET / Visual Studio .NET Tools) # Launch the 'Visual Studio .NET 2003 Command Prompt' (under Start / Programs / Visual Studio .NET / Visual Studio .NET Tools)
# CD to the WorldWind source root. # CD to the WorldWind source root.
Line 67: Line 59:
# Run 'Devenv.exe WorldWind.sln /build Debug' # Run 'Devenv.exe WorldWind.sln /build Debug'
-===Run Your Compiled Code===+ 
-Same as above.+==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 follow the [[#Compile the Code|Compile the Code]] instructions again to recompile.
[[Category:Dev]] [[Category:Dev]]

Revision as of 23:16, 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

Preparation

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

Copy Data

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

Compile the Code

Compiling with 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)

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

Compiling with Visual Studio

Compile 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. Final step MSVS->Main Menu->File->Save or Save as.

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'


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 follow the Compile the Code instructions again to recompile.

Personal tools