1
0
Fork 0
Commit graph

83 commits

Author SHA1 Message Date
Florent Rougon
a137aed541 Add-ons: move parsing of the metadata file to a separate translation unit
This will be tidier, esp. since I am going to introduce another XML
config file.
2018-01-10 01:25:36 +01:00
Florent Rougon
4d36082398 Add-ons: detailed, machine-parseable metadata for authors and maintainers
(everything described here lives in the namespace flightgear::addons)

New classes: Author, Maintainer, and Contact. Author and Maintainer
derive from Contact. For each contact, the following can be defined in
addon-metadata.xml: name, email, and url. See [1] for details about the
syntax and usage policy. Nasal bindings have been updated accordingly,
there are three new ghosts: addons.Contact, addons.Author and
addons.Maintainer.

The enum class UrlType has two new members: author and maintainer. The
Addon::getUrls() method has a new signature:

  std::multimap<UrlType, QualifiedUrl> getUrls() const;

because non-empty 'url' fields for authors and maintainers contribute to
the result, and there can be an arbitrary number of authors and an
arbitrary number of maintainers defined for a given add-on---therefore,
std::map can't be used anymore.

Finally, QualifiedUrl has a new field (detail) which stores the author
name (resp. maintainer name) when the QualifiedUrl type is
UrlType::author (resp. UrlType::maintainer). Currently, this 'detail'
field is not used for other URL types, but this could be changed if
desired.

[1] https://sourceforge.net/p/flightgear/fgdata/ci/next/tree/Docs/README.add-ons
2018-01-02 21:57:35 +01:00
Florent Rougon
d81599efd1 Add-ons: move exceptions to their own translation unit 2017-12-25 21:24:26 +01:00
James Turner
e920dc7509 Event input layer based on HID-Api
Thus runs in parallel to the existing implementation on Linux and Mac,
but can (soon) replace the Mac code and will run on Windows eventually.
2017-12-18 17:15:55 +00:00
Florent Rougon
48f52f14c4 Improved infrastructure for add-ons: C++ classes, metadata file, Nasal interface
This commit adds C++ classes for add-on management, most notably
AddonManager, Addon and AddonVersion. The AddonManager is used to
register add-ons. It relies on an std::map<std::string, AddonRef> to
hold the metadata of each registered add-on (keys of the std::map are
add-on identifiers, and AddonRef is currently SGSharedPtr<Addon>).
Accessor methods are available for:

  - retrieving the list of registered or loaded add-ons (terminology
    explained in $FG_ROOT/Docs/README.add-ons);

  - checking if a particular add-on has already been registered or
    loaded;

  - for each add-on, obtaining an Addon instance which can be queried
    for its name, id, version, base path, the minimum and maximum
    FlightGear versions it requires, its base node in the Property Tree,
    its order in the load sequence, short and long description strings,
    home page, etc.

The most important metadata is made accessible in the Property Tree
under /addons/by-id/<addon-id> and the property
/addons/by-id/<addon-id>/loaded can be checked or listened to, in
order to determine when a particular add-on is loaded. There is also a
Nasal interface to access add-on metadata in a convenient way.

In order to provide this metadata, each add-on must from now on have in
its base directory a file called 'addon-metadata.xml'.

All this is documented in much more detail in
$FG_ROOT/Docs/README.add-ons.

Mailing-list discussion:

  https://sourceforge.net/p/flightgear/mailman/message/36146017/
2017-12-08 00:36:41 +01:00
Bertrand Coconnier
c1313f2ecb Added the core of the AI wake computations with its tests.
At the moment, this is dead code: only the tests are compiled. FG is still compiled without this code.

A new directory is created that contains all the numerical computations made to estimate the wake induced by AI aircrafts. This is based on the venerable Vortex Lattice Method (VLM) which was all the rage in the 60's Computational Fluid Dynamics (CFD).

Even though quite old, the method is relevant to compute aircrafts wake in real time since 3D Navier-Stokes (NS3D) is out of reach for real time computations even with modern multicore personal computers and their GPUs.
2017-06-10 18:27:19 +02:00
Bertrand Coconnier
1a0e5a20ae Fixed LaRCSim matrix computation routines.
There was a couple of typos in the routine. This code will be used by the AI wake feature.
Also added a test for the matrix code to make sure they will be no regression.
2017-06-05 17:18:52 +02:00
Torsten Dreyer
7d12c9fe36 Fix broken build due to undef'd ref in test_flightplan 2017-05-12 09:22:41 +02:00
Florent Rougon
4b494a69bd Rename fatalMessageBox() to fatalMessageBoxWithoutExit(), add exiting variant
- Rename fatalMessageBox() to fatalMessageBoxWithoutExit(). This should
  prevent the kind of bug that prompted this set of changes: someone
  calling fatalMessageBox(), assuming the program would stop at that
  point, whereas in reality it did not.

- Add new function fatalMessageBoxThenExit(). This is not vital of
  course, but allows one to spare one line here and there and to apply
  the DRY principle for such fatal exits.

- Replace every existing call to fatalMessageBox() with one or the other
  of the two new functions. Improve formatting along the way. This
  fixes a few bugs of the kind explained above.
2017-04-10 02:29:48 +02:00
Florent Rougon
680f940378 Revert commit "Make fatalMessageBox() end with std::abort() [...]"
This reverts commit 9e6a3ebc6b ("Make
fatalMessageBox() end with std::abort() and declare it [[noreturn]]").

After reflexion, it seems better to let fatalMessageBox() return,
because there is existing code that appears to be relying on this aspect
to do some work after having called fatalMessageBox() (cf. main() in
bootstrap.cxx). Also, the way of exiting from fatalMessageBox() after
commit 9e6a3ebc6b (std::abort()) was probably too brutal for a
controlled exit---as opposed to a terminate handler.
2017-04-10 02:29:48 +02:00
Florent Rougon
9e6a3ebc6b Make fatalMessageBox() end with std::abort() and declare it [[noreturn]]
Many places calling fatalMessageBox() assume it doesn't return, so make
it behave this way. See discussion around:

  https://sourceforge.net/p/flightgear/mailman/message/35766691/

for some context.
2017-04-08 14:34:26 +02:00
Gary Preston
5e5699c4d8 Return reference to non temporary string. 2017-04-06 18:26:26 +09:00
Gary Preston
fd7bea6453 Retain signedness of numLegs to avoid unsigned/signed comparison. 2017-04-06 18:26:09 +09:00
James Turner
58a7f2c5c2 Unit-test for initPosition.
Only basic, but can be expanded incrementally now
2017-03-27 15:38:05 +01:00
James Turner
09fe744de0 Test helper CMake macro.
Also build the test code first, so tests can reside in source tree as
well as the test tree.

Finally, build local Sqlite with -fpic to give consistent linkage when
using either built-in or system sqlite.
2017-03-26 12:15:29 +01:00
Alessandro Menti
7db8ed17c4
Test suite: add GPerfTools and system SQLite linking fixes
If GPerfTools and/or the SYSTEM_SQLITE options are enabled, the test
suite fails to build (GPerfTools is not linked explicitly in CMakeLists.txt,
but becomes required by SimGear, so the linker failes with an "undefined
reference" error; the SQLite library the test suite links against is always
hardcoded to the FG-provided one).

This patch adds the GPerfTools library to the target link libraries
(if the profiler is enabled) and links to the system SQLite library
whenever SYSTEM_SQLITE is enabled.
2017-03-26 12:10:15 +02:00
James Turner
27baca4826 Linux fixes for tests compilation 2017-03-25 17:09:18 +00:00
James Turner
9e122eaf81 Partial testing framework.
Compile a useful subset of FG as a shared library, and add two basic
uses of this to exercise some Flightplan / RoutePath / navaid
functions.

The test framework can/will be expanded incrementally from here, this
is just a starting point.
2017-03-25 15:35:26 +00:00
Bertrand Coconnier
227087b3a8 Automatic detection of the ENABLE_SIMD setting for SG:
* Scrapped the previous code
* Instead use the symbol value imported from SG via the "CONFIG" mode of CMake find_package()
2017-02-07 00:04:56 +01:00
Bertrand Coconnier
80b8a298e1 Fix for when SimGear headers are not installed system wide (as is the case for Jenkins) 2017-02-04 21:53:18 +01:00
Bertrand Coconnier
4ab0b71fa8 The flag ENABLE_SIMD is now automatically carried over from SimGear. Mixed configurations between FG & SG could crash FG so this should not be allowed. 2017-02-04 20:21:19 +01:00
James Turner
c06ab52c55 KIll off ALUT now it's gone from SimGear 2012-08-22 00:10:00 +01:00
ThorstenB
a3e76909ee Christoph Korn/PlayDeb.net: fix typos 2012-08-17 23:51:30 +02:00
James Turner
70b4f38ebc Goodbye automake. 2011-11-01 11:15:53 +00:00
Christian Schmitt
0a5e86f4e6 remove old .cvsignore files 2010-11-11 01:16:29 +01:00
James Turner
239fea1b54 Even more imlicit includes becoming explicit. 2010-08-07 14:07:17 +01:00
James Turner
f6a87ec75c Disable a test built entirely on Point3D and PLIB/SG 2010-07-30 10:49:58 +01:00
Torsten Dreyer
c89b18ddbd Ignore generated files
add generated files to gitignore that has also been in cvsignore
remove generated config.h-msvc* from source control
2010-06-02 11:27:16 +02:00
Tim Moore
b770e22a48 Merge branch 'ehofman/rename' 2010-01-11 09:08:41 +01:00
Tim Moore
b5c46a8d59 Merge branch 'ehofman/sound' 2009-12-20 11:11:16 +01:00
ehofman
0dc35c8d38 John Denker:
Suggestion:  It might be helpful to promote each of
 the .c files to .cxx.

 Rationale:
 -- The configure/makefile system handles CFLAGS
    differently from CXXFLAGS.
 -- It is important for the *info programs to
    compiled and run in exactly the same environment
    as the main fgfs program.  Some users depend on
    compiler or linker flags such as rpath that
    strongly affect the results of the *info programs.
 -- There is no downside;  you code compiles just
    fine as-is under the c++ compiler.

second part of the original commit, for ehofman/sound
2009-12-09 08:15:37 +01:00
ehofman
dea145b921 John Denker:
Suggestion:  It might be helpful to promote each of
 the .c files to .cxx.

 Rationale:
 -- The configure/makefile system handles CFLAGS
    differently from CXXFLAGS.
 -- It is important for the *info programs to
    compiled and run in exactly the same environment
    as the main fgfs program.  Some users depend on
    compiler or linker flags such as rpath that
    strongly affect the results of the *info programs.
 -- There is no downside;  you code compiles just
    fine as-is under the c++ compiler.

timoore split the original patch so that alcinfo.cxx can be commited to
the ehofman/sound branch seperately.
2009-12-09 08:15:09 +01:00
ehofman
64de526267 Fix for older OpenAL versions. 2009-11-30 22:45:07 +01:00
ehofman
b4b3f62717 add alcinfo instead. 2009-11-30 09:38:57 +01:00
torsten
3d34133e1e This is one leftover from Tat's patch from 2009-09-16:
I believe these patches are really important for Mac users since they don't have to wait for my updating xcode project files.
these also saves up to 50% of build time since most of users don't have to make universal binaries.
2009-10-22 23:26:02 +02:00
ehofman
7e07b57d92 test for the presence of alut.h. if it's not found only display a warning message in gl-info and test-env-map. A clean build without glut installed is now possible. 2009-09-09 08:56:32 +02:00
Tim Moore
b1a3d8ba16 more warning fixes
flightgear compiles with gcc -Wall -Werror
2009-08-24 00:01:37 +02:00
ehofman
429f2530de James Turner:
* experimental clean-up / reduction on two of the FG headers:
   (I'm going to await feedback on the developers list before doing more of
    these, to avoiding going over files multiple times, but in principle it
    seems pretty straightforward.)

 * final fixes for SG_USING_STD removal
2008-07-29 08:27:48 +00:00
ehofman
667e64e1eb - remove the SG_GLxxxx_H #defines, since OSG provides its own versions
- this exposed a bizarre issue on Mac where dragging in <AGL/agl.h> in
   extensions.hxx was pulling in all of Carbon to the global namespace
   - very scary. As a result, I now need to explicitly include CoreFoundation
   in fg_init.cxx.
 - change SG_USING_STD(x) to using std::x
2008-07-27 16:25:13 +00:00
ehofman
d9bfd5a425 This should apply, and everything should build cleanly, in isolation from the
SimGear change. It changes all the SG_xxxx to be the 'real' includes, and gets
rid of many #ifdef SG_HAVE_STD_INCLUDES. As an added bonus, rather than
replacing 'SG_USING_NAMESPACE(std)' with 'using namespace std', I just fixed
the small number of places to use std:: explicitly. So we're no longer polluting
the global namespace with the entire contents of std, in many cases.

There is one more 'mechanical' change to come - getting rid of SG_USING_STD(X),
but I want to keep that separate from everything else. (There's another
mechnical change, replacing <math.h> with <cmath> and so on *everywhere*, but
one step at a time)
2008-07-25 18:38:29 +00:00
curt
9a5840f6e7 Type consistency. 2007-05-16 16:47:13 +00:00
daveluff
8bfd913e0c Oops - I think I introduced some dos line endings - this should fix it 2006-02-22 20:27:00 +00:00
daveluff
44a375520a A couple of hacks to fix cygwin compilation. These may not be the correct fix, but they prevent new cygwin users getting an almost instant compile error following make 2006-02-22 19:21:29 +00:00
mfranz
3b3df3cb01 add al-info 2006-02-05 16:41:47 +00:00
ehofman
f2f960f4f4 Add OpenAL 1.0 backwards compatibility and OS-X support. 2006-02-01 13:27:36 +00:00
ehofman
dff558dcec Add a gl-info equivalent for OpenAL. 2006-01-31 18:20:49 +00:00
ehofman
f057fd0d48 Martin Spott: Use standardized Sun directive. 2005-10-06 11:08:26 +00:00
ehofman
62bb2277bc MingW32 fixes. 2005-09-11 09:53:55 +00:00
curt
d05121ef46 Fix my mailing address by replacing it with my web page. 2004-11-19 22:10:41 +00:00
curt
4214cd6c10 Migrate FlightGear code to use "#include SG_GL*" defined in
"#include <simgear/compiler.h>".
2004-11-18 19:53:00 +00:00