User:Callahanp/Flightgear and Simgear Code/Tools for a Flightgear Developer

From FlightGear wiki
Jump to navigation Jump to search

These are just notes. No intro, just jump in

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.

These are what I'm using as a bare minimum. I'll assume since you are here, you know how to obtain, install and at least start these tools. Feel free to substitute your favorites:

  • git
  • gitg
  • Atom
  • gdbgui
  • Doxygen

For Future Possible use

  • QTCreator
  • Eclipse

Keeping Flighgear materials out of $HOME:

I keep some things under $HOME on a separate disk. This prevents me from running out of disk space simply because I took on a large build project

Flightgear is one example.

cd ~/
ln -s /work/fg fg

Here's my directory structure for building with

  • $HOME
    • A separate disk to make it easy to reinstall linux. $HOME is the same as /home/$USER
  • $HOME/fg
    • Scripts I need to build and flightgear such as, and /run/debug script
    • This is actually a symlink to a folder on a separate disk from /home.
    • I do this so I can build the software I want without continually expanding my home disk's size.
    • The fg directory contains a folder for each different build of Flightgear.
      • next for running next
      • nextrti for running next with OpenRTI
      • nextd for debugging next
      • stable
      • stabled for debugging stable
    • Each of these directories contains git clones for flightgear, simgear and other projects like OSG and OpenRTI as needed.

Rather than use excessive bandwidth, when I need a fresh copy, I just run in a folder that already has a copy of the sources. Then I copy the folder over to the one I want to refresh and remove the build folder within the new one. Then run the script again to produce the executable version I want. As currently structured, requires a separate set of sources for each different version built.

Here's the atom/run/debug script I use for debugging cd $HOME/fg/

# ~/fg/debug 
$cmd = "$HOME/fg/nextd/install/flightgear/bin/fgfs \
  --fg-root=$HOME/fg/nextd/install/flightgear/bin/../fgdata/ \
  --log-level=2 \
  --fg-scenery=$HOME/fg/nextd/install/flightgear/bin/../fgdata/Scenery \
  --fg-aircraft=$HOME/fg/nextd/install/flightgear/bin/../fgdata/Aircraft \
  --fg-aircraft=$HOME/.fgfs/Aircraft/org.flightgear.fgaddon/Aircraft \
  --httpd=5401 --telnet=5400 --airport=KSFO"
 $gdbgui "$cmd"

When the source window appears, press the "r" key to start debugging.

To just look at code:

cd ~/fg atom next/flightgear/src next/simgear/simgear next/install/flightgear/fgdata

We are now ready for: Flightgear_and_Simgear_Code: From_Command_Line_to_Holding_Short