Howto:Build FlightGear with NetBeans using CMake: Difference between revisions

Jump to navigation Jump to search
m
Small cleanups
mNo edit summary
m (Small cleanups)
Line 1: Line 1:
{{WIP}}
* Last updated: 12/2012
* Last updated: 12/2012
* Contributors: Macnab, Callahanp, Hooray
* Contributors: Macnab, Callahanp, Hooray
Line 7: Line 9:




= Important =
== Important ==
The latest CMake-specific build instructions can be found in $FG_SRC/README.cmake: http://gitorious.org/fg/flightgear/blobs/next/README.cmake
The latest CMake-specific build instructions can be found in $FG_SRC/README.cmake: http://gitorious.org/fg/flightgear/blobs/next/README.cmake


Line 16: Line 18:
Don't worry if you don't know how to embed these images, you can simply leave a few comments on the article's talk page, so that we can update the article accordingly. Thanks!
Don't worry if you don't know how to embed these images, you can simply leave a few comments on the article's talk page, so that we can update the article accordingly. Thanks!


= Todo =
== Todo ==
* The instructions in their current form don't cover building with libsvn, this would be required for [[TerraSync]] support though.
* The instructions in their current form don't cover building with libsvn, this would be required for [[TerraSync]] support though.
* Add an outline of the steps to create and use the build environment.
* Add an outline of the steps to create and use the build environment.
Line 25: Line 27:




= Windows: Getting a compiler =
== Windows: Getting a compiler ==
On Windows, people need to download and install a C++ compiler separately. NetBeans supports a number of different compilers. Installing and setting up compilers on Windows is covered here: http://netbeans.org/community/releases/71/cpp-setup-instructions.html
On Windows, people need to download and install a C++ compiler separately. NetBeans supports a number of different compilers. Installing and setting up compilers on Windows is covered here: http://netbeans.org/community/releases/71/cpp-setup-instructions.html


Line 44: Line 46:




= Windows: Getting CMake =
== Windows: Getting CMake ==
Go to [http://www.cmake.org CMake] and click the download icon. You can download the installer or the zip package. If you use the zip package, extract to a folder of your choice, and then add whereextracted\bin to your path, as explained in the section above.
Go to [http://www.cmake.org CMake] and click the download icon. You can download the installer or the zip package. If you use the zip package, extract to a folder of your choice, and then add whereextracted\bin to your path, as explained in the section above.




= Download and install NetBeans =
== Download and install NetBeans ==


NetBeans is a multi-platform IDE (integrated development environment) that supports a number of programming languages, C and C++ among them.
NetBeans is a multi-platform IDE (integrated development environment) that supports a number of programming languages, C and C++ among them.
Line 61: Line 63:




= Installing required modules (plugins) =
== Installing required modules (plugins) ==
After starting NB for the first time, it needs to be extended with required plugins.
After starting NB for the first time, it needs to be extended with required plugins.
Using the plugin installer, you need to install the following plugins in order to work with repositories:
Using the plugin installer, you need to install the following plugins in order to work with repositories:
Line 77: Line 79:
go to the Available Plugins tab, select the ones needed and click Install.
go to the Available Plugins tab, select the ones needed and click Install.


= Checking out the required dependencies =
== Checking out the required dependencies ==


All important FlightGear repositories are hosted at gitorious: http://gitorious.org/fg/
All important FlightGear repositories are hosted at gitorious: http://gitorious.org/fg/
Line 131: Line 133:




= Creating new projects from existing sources =
== Creating new projects from existing sources ==


After checking out the repository, you'll want to use the NetBeans project wizard to CREATE A NEW PROJECT FROM EXISTING SOURCES for each dependency:  
After checking out the repository, you'll want to use the NetBeans project wizard to CREATE A NEW PROJECT FROM EXISTING SOURCES for each dependency:  
Line 162: Line 164:
[[File:Plib-osg-simgear-flightgear-in-netbeans.png]]
[[File:Plib-osg-simgear-flightgear-in-netbeans.png]]


= Setting up project dependencies =
== Setting up project dependencies ==


You only need to know that there's a dependency chain: SimGear depends on BOOST, OpenAL, PLIB and OSG, while FlightGear depends on SimGear and OSG.
You only need to know that there's a dependency chain: SimGear depends on BOOST, OpenAL, PLIB and OSG, while FlightGear depends on SimGear and OSG.
Line 176: Line 178:




= Disable code indexing =
== Disable code indexing ==
By default, NetBeans will keep on trying and index all your sources, this may slow down the IDE considerably, so it's a good idea to disable this feature if you don't need it (CONTEXT MENU/RIGHT CLICK on project, go to CODE ASSISTANCE and then uncheck the marked entry):
By default, NetBeans will keep on trying and index all your sources, this may slow down the IDE considerably, so it's a good idea to disable this feature if you don't need it (CONTEXT MENU/RIGHT CLICK on project, go to CODE ASSISTANCE and then uncheck the marked entry):


Line 182: Line 184:




= Staying up to date =
== Staying up to date ==
Staying "up to date" is actually fairly easy once everything is set up, you only need to right click on each repository (project/dependency)  and go to the SCM sub menu (i.e. "Git" for FlightGear/SimGear and "Subversion" for OSG) and then click on "pull" or "update" accordingly:  
Staying "up to date" is actually fairly easy once everything is set up, you only need to right click on each repository (project/dependency)  and go to the SCM sub menu (i.e. "Git" for FlightGear/SimGear and "Subversion" for OSG) and then click on "pull" or "update" accordingly:  


Line 188: Line 190:




= Setting up the Jenkins build server =
== Setting up the Jenkins build server ==


Jenkins/Hudson are "continuous integration" servers, i.e. they can be configured to check out and build sources automatically. NetBeans comes with built-in support for Jenkins/Hudson, this means that the official FlightGear build server at http://flightgear.simpits.org:8080 can be directly integrated into your IDE.
Jenkins/Hudson are "continuous integration" servers, i.e. they can be configured to check out and build sources automatically. NetBeans comes with built-in support for Jenkins/Hudson, this means that the official FlightGear build server at http://flightgear.simpits.org:8080 can be directly integrated into your IDE.
Line 209: Line 211:




= Setting up remote development =
== Setting up remote development ==


Remote development involves setting up a SSH connection profile in NetBeans in order to connect to a Unix/Linux server so that you can remotely build FlightGear and its dependencies, this can for example be useful for cross-compilation, but also if you don't want to, or cannot, set up all required tools, such as compilers, locally.
Remote development involves setting up a SSH connection profile in NetBeans in order to connect to a Unix/Linux server so that you can remotely build FlightGear and its dependencies, this can for example be useful for cross-compilation, but also if you don't want to, or cannot, set up all required tools, such as compilers, locally.
Line 226: Line 228:
[[File:Netbeans-set-up-remote-building-step2.png]]
[[File:Netbeans-set-up-remote-building-step2.png]]


{{Building}}


[[Category:Howto]]
[[Category:Howto]]
{{Building}}
{{WIP}}

Navigation menu