Howto talk:Build FlightGear with Any IDE: Difference between revisions

From FlightGear wiki
Jump to navigation Jump to search
Line 132: Line 132:
Most of the workflow tasks you do in an IDE may already be familiar to you.  If not, here's a list of what developers typically do in an IDE
Most of the workflow tasks you do in an IDE may already be familiar to you.  If not, here's a list of what developers typically do in an IDE


* Research to locate code related to some specific feature of the application by searching the entire project for one or more strings.
* Provide ways to use specific test, code analysis or other tools and libra/ries either with the IDE or externally.
* Making changes to one or more files in the project
* Locate code related to some specific feature of the application by searching the entire project for one or more strings.
* Finding changes already made
* Making changes to one or more files in the project, lin by line or using global search and replace.
* Running the application with a debugger
* Find changes already made
* Running application tests built with tools like cppUnit
* Run the application with a debugger
* Running Code Analysis tools to profile the application in some way
* Run application tests built with tools like cppUnit
* Producing API or other documentation
* Run Code or Performance Analysis and tracing tools to profile the application in some way
* Produce API or other documentation
* Submit changes to a personal or project source archive, usually github or sourceforge.
* Request merging changes from personal github or sourceforge projects to the application's main codebase.


Newcomers to an IDE or IDE's in general may find instructions for these kind of workflows useful.  If called for, we can provide them, otherwise google it.
Newcomers to an IDE or IDE's in general may find instructions for these kind of workflows useful.  If called for, we can provide them, for now, google it.


[https://stackoverflow.com/questions/38131663/qt-development-on-linux-using-eclipse/38140914#38140914]
[https://stackoverflow.com/questions/38131663/qt-development-on-linux-using-eclipse/38140914#38140914]


== Additional Software Development Tools ==
== Additional Software Development Tools ==

Revision as of 15:32, 5 September 2018

WIP.png Work in progress
This article or section will be worked on in the upcoming hours or days.
See history for the latest developments.

Overview

There are several capabilities that any IDE should have to support various parts of the development workflow.

  • An IDE should work smoothly with the underlying software tools you use to edit, manage, store, build, test and analyse your code.
  • IDE setup may have to take into account any standard software libraries used by the application.
  • The IDE should be capable of building and then using any libraries that are either specific to the application or those that need a specific version or modification.
  • There should be the capability of building both the debug and non-debug versions of executables and libraries.
  • If there is more than one executable in the project, you build be able to build them all within the IDE.
  • The IDE should be capable of starting the application's executables with debugging and possibly with testing, code analysis, path tracing and performance tools.

In most IDEs, your code can be set up in the usual way for building, with separate source, build and install directory trees. These should be configured in the IDE to allow IDE specific files in the project directory while keeping the application's code separated from the IDE specific files by using links within the project directory or a feature of the IDE that allows importing the code without making a separate copy.

In this development phase my goal is to get Eclipse and QTCreator set up for debugging the flightgear executable under Ubuntu with code man. Once this is complete, the main page will be populated with the content developed here.

Content development can proceed on this talk page, with additional phases to cover additional distributions, other operating Systems; testing; additional executables; code analysis; path tracing and performance tools. We can release to the main page, the content for the additional phases as soon as they are usable.

IDEs


Prerequisite supporting packages

Flightgear and its various supporting executables use a number of standard libraries and development tools that can be obtained by simply installing the distribution's current version. It also uses additional libraries listed in the next section which need to built for use with flightgear.

Flightgear components: plib, OSG, OpenRTI, simgear, flightgear

To create a flightgear executable, you will need to build four required components and on optional component: Plib, OSG, simgear and flightgear must be built and OpenRTI is optional.

All the known flightgear components are described below with Links to web pages describing them. Instead of exploring these components individually and setting up source, build and install directories for them, you may want to use the results of a build using download_and_compile.sh as a basis for your IDE's configuration. (will that work?) otherwise you can download each source code repository to folders of your choice. Each component will be treated as a separate project by the IDE.

Specifics are provided for each IDE.

cmake

At some point in it's history the flightgear project needed to work with a specific version of cmake was not available in one or more Linux distributions. This appears to no longer be the case and cmake installed from most linux distributions will be sufficient.

When cmake had to be built, the following were relevant:

cmake.org website: [1] cmake.org git repository: [2]

plib

Plib is a library almost exclusively used by Flightgear. It is considered obsolete and there are a few things the Flightgear project needs to do to eliminate it from our codebase. Search the mailing list for plib to find out what needs to be done.

plib at Sourceforge: [3]

Open Scene Graph

The OpenSceneGraph library version 3.4 is used, with some current features backported in our custom source directory from later versions. Later versions have a different API, and at some point there will be an effort to convert Flightgear's code to use the API of the then current version. Flightgear developers get to decide when this work gets done.

Open Scene Graph Website: [4] Open Scene Graph at Github [5]

OpenRTI

An open source HLA/RTI implementation.

OpenRTI
OpenRTI Wiki
Flightgear HLA Wiki Page
Wikipedia page on RTI

Simgear

Simgear is a library of supporting functions that can be used by any kind of simulator. It is part of the Flightgear Project.

Simgear at SourceForge: [6]

Flightgear

Flightgear is the main executable for the Simulator. FGData is its supporting data.

Flightgear at Sourceforge: [7] fgdata on SourceForge: [8] FGData on Flightgear Wiki: [9] further explained in [10]

Additional Flightgear and ATC Projects

Flightgear Terragear: [11] Flightgear Terragear GUI: https://sourceforge.net/p/flightgear/fgscenery/terrageargui/ci/master/tree/] Flightgear Scenery: [12] FGX: [13] ATC-pie: [14] FGRun: [15]


Source, Build and Install Directories

The download_and_compile.sh script works with the following directory tree, by default in the directory where the script runs:

download_and_compile.sh

Directory Name Description
./ any directory containing the download_and_compile.sh script
./plib Downloaded sources
./openscenegraph
./simgear
./flightgear
./build directory used for separately building each component from it's sources
./install directory for FlightGear executables and data

I hope that this directory structure will suffice for each IDE. There may have to be a level of indirection in the IDE project directories so that the application code is kept separate from IDE configuration files.

If at some point we want to add IDE project files to the flightgear source repository, the place to do it is fgmeta. Some scripting may be needed to manage the configuration file or files as part of fgmeta. But we're getting ahead of ourselves by mentioning this. Forget I said anything about it. Lets just make it work first.

Installing the IDE

This topic is pretty well covered on the Web. We don't need to explain things here, except to note that you can go with a distribution's current version, obtain the latest built version directly or build the IDE yourself. Pick your poison.

Configuring an IDE

Although the details may vary from IDE to IDE, the process of configuring them has similar requirements. Git, Cmake and other tools may need to be configured within the IDE or externally. Any step in the development workflow that can't be handled directly in an IDE will likely need to be done using a script, possibly but not necessarily called from within the IDE. Finally, IDE projects will have to be created, linking to Source, Build and Install directories.

Again, you can find specific information about configuring most IDE's with a number of software tools on the web. Here, we'll provide links to information on several aspects of configuring. Remember that these links will eventually need maintenance to stay fresh. In that case, Google the name of the ide with "Cmake", "GIT", "CPPUnit" or other tools along with the name of your OS.

IDE Usage

Most of the workflow tasks you do in an IDE may already be familiar to you. If not, here's a list of what developers typically do in an IDE

  • Provide ways to use specific test, code analysis or other tools and libra/ries either with the IDE or externally.
  • Locate code related to some specific feature of the application by searching the entire project for one or more strings.
  • Making changes to one or more files in the project, lin by line or using global search and replace.
  • Find changes already made
  • Run the application with a debugger
  • Run application tests built with tools like cppUnit
  • Run Code or Performance Analysis and tracing tools to profile the application in some way
  • Produce API or other documentation
  • Submit changes to a personal or project source archive, usually github or sourceforge.
  • Request merging changes from personal github or sourceforge projects to the application's main codebase.

Newcomers to an IDE or IDE's in general may find instructions for these kind of workflows useful. If called for, we can provide them, for now, google it.

[16]

Additional Software Development Tools

Path Tracing

Performance Monitoring

Code Analaysis

Additional Environments

Many IDEs are suitable for cross platform work. The details of installation and configuration might differ between platforms, but the IDE will work similarly. Cross Platform work may be done by using an IDE on each platform, or by cross compiling on one platform for execution on another.

Is there IDE support for Cross Compiling?

Linux Distributions

Windows

Mac

Eclipse Configuration

git

cmake

Qt

Project Directories

Building, Running and Debuging

Test Suites

QTCreator configuration

git

cmake

Qt

Project Directories

Building, Running and Debuging

Test Suites

CodeBlocks Configuration

NetBeans Configuration

Additional Software Development Tools

Path Tracing

Performance Monitoring

Code Analaysis

Running Flightgear

Additional Environments

Linux Distributions

Windows

Mac

Callahanp (talk) 11:19, 4 September 2018 (EDT)