1
0
Fork 0
Commit graph

2589 commits

Author SHA1 Message Date
Edward d'Auvergne
34daa4de0b HUD fix for MSVC math.h incompatibility with C-99 and the round() function. 2016-02-11 19:36:32 +00:00
Rebecca N. Palmer
16e6009255 Nasal security: give a more user-friendly error on self-check fail
https://sourceforge.net/p/flightgear/mailman/message/34701972/
2016-02-10 22:54:52 +00:00
Edward d'Auvergne
c889198d09 Redesign of the latitude and longitude formatting for the HUD.
This follows from http://thread.gmane.org/gmane.games.flightgear.devel/78650 and
resolves the sign bug https://sourceforge.net/p/flightgear/codetickets/1778/ .

Combined with a matching change to FGData, this changes the HUD formats from the
current set of 3 (note that the text in brackets is not shown in the HUD
preferences PUI dialog, but is show here for reference):

    0) Decimal degrees (37.618890N -122.375000W)
    1) Degrees, minutes (37*37.133N -122*22.500W)
    2) Degrees, minutes, seconds (37*37 08.0 N -122*22 30.0 W)

to (here the text in brackets will be shown in the PUI dialog):

    0) DDD format (37.618890N 122.375000W)
    1) DMM format (37*37.133'N 122*22.500'W)
    2) DMS format (37*37'08.0"N 122*22'30.0"W)
    3) Signed DDD format (37.618890 -122.375000)
    4) Signed DMM format (37*37.133' -122*22.500')
    5) Signed DMS format (37*37'08.0" -122*22'30.0")
    6) Zero padded DDD (51.477500N 000.461389W)
    7) Zero padded DMM (51*28.650'N 000*27.683'W)
    8) Zero padded DMS (51*28'39.0"N 000*27'41.0"W)
    9) Trinity House Navigation (51* 28'.650N 000* 27'.683W)
2016-02-10 21:49:56 +00:00
Rebecca N. Palmer
f749953493 Nasal security: don't break file dialogs
Include the directory itself when allowing reading
Don't kill the script on a denied directory read
2016-02-09 23:17:41 +00:00
James Turner
c72309360e Defensive handling of locales.
- Use setlocale() to ensure consistent handling of locales and
  string handling irrespective of whether or not QCoreApplication
  is invoked. Forces a the C locale for numerics and collation,
  since many pieces of FG assume this.
2016-02-02 20:44:46 +00:00
James Turner
acb630095d Possible fix for Mac strncmp crashes. 2016-01-26 07:48:30 +01:00
James Turner
81792bd6d0 Adjust fg root processing order
- ensure fg-root and FG_ROOT are higher precedence than the Qt gui
2016-01-19 18:32:20 -05:00
James Turner
d81d353940 Improved fg-root control from the Qt Launcher
- add a button to the main dialog, explaining how to adjust the 
  fg-root path via the GUI
- tweak the GUI flow to support explicitly changing the path even
  when the default path is acceptable.
2016-01-18 20:06:43 -05:00
James Turner
e37e0d1bcf New log class for TerraSync 2016-01-16 15:50:13 -06:00
James Turner
e3fe8ae199 Log options to INFO level when processing
- ensures they occur in the fgfs.log which should aid problem
  tracing.
2016-01-12 17:33:57 -06:00
Torsten Dreyer
296849cf3d Fix a bug for allowed paths
Under some conditions on my system
aircraft_paths.begin() was equal to scenery_paths.end()
This resulted in neither of them being added to read_allowed_paths
followed by failure to load Nasal scripts from the aircraft directory.

This might happen, if scenery_paths gets allocated just before aircraft_paths
in memory.
Better loop across the desired lists instead of using fancy tricks with
the iterator.
2016-01-12 11:19:26 +01:00
James Turner
c400405b0a Chatter-queue moved out of globals
- now lives as part of the sound-manager, yay.
2016-01-03 12:00:15 -06:00
James Turner
fc9c43b48d Remove FontCache from globals.
- access via a singleton instead.
2016-01-03 12:00:15 -06:00
James Turner
52fd6986f8 Pull Sound-manager out of FGGlobals 2015-12-31 15:19:57 -06:00
James Turner
ba56c42eb4 Pull Ephemeris out of FGGlobals 2015-12-31 15:19:51 -06:00
James Turner
6da9461f92 Fix a typo 2015-12-19 00:32:25 -08:00
James Turner
c69e6fde12 AI subsystem now does an orderly shutdown
- remove special case logic which is no longer required
2015-12-19 00:30:31 -08:00
James Turner
83ea6d32d0 Make PerformanceDB a real subsystem 2015-12-19 00:29:00 -08:00
James Turner
b7c88e7acc Stop OSG threading earlier on shutdown.
Avoid intermittent race conditions on shutdown when the OSG 
pager/Db thread is running. Ensure the OSG threads are stopped before
we start tearing down any scene graph nodes.
2015-12-18 22:00:37 -08:00
James Turner
0f590280c7 Aircraft-model subsystem behaves better
- make shutdown logic more robust
- shutdown is no longer special cased in globals.
2015-12-18 20:13:23 -08:00
James Turner
89065ea5c2 Proper shutdown() for the model manager
- also move property setup to bind/unbind
2015-12-18 19:56:56 -08:00
James Turner
8877b442f8 ATC/Traffic doesn’t crash reset.
- remove some global headers from AI headers, to avoid pollution
- change how ATC owns the ‘player’ FGAIAircraft so reset works
- ensure AIAircraft controllers are cleared on unbind for reset
2015-12-11 12:11:59 -06:00
James Turner
1544641405 Remove view/tile/scenery members from globals
- also fix sound manager creation
2015-12-11 12:11:59 -06:00
James Turner
43fcbd2246 Progress towards testing
- remove route-manager from global variables
2015-12-10 16:40:22 -06:00
James Turner
76c6665af4 Merge /u/edauvergne/flightgear/ branch lat_lon_precision_fix_v3 into next
http://sourceforge.net/p/flightgear/flightgear/merge-requests/23/
2015-12-10 22:39:31 +00:00
James Turner
d891c5928c Remove /sim/temp/winding-ccw property
- part of work on unit-testing, remove OpenGL usage in fg_props
2015-12-10 15:53:05 -06:00
James Turner
d7a680e848 Templated subsystem handling
- remove explicit FGControls var from globals, as part of work
  towards unit-testing infrastructure.
2015-12-10 15:53:05 -06:00
Edward d'Auvergne
912215e949 The OSG version is now printed with --version.
This adds the OSG version number between the simgear and PLIB versions.
2015-12-05 15:24:47 +01:00
James Turner
2af076e6cb Add airport dynamics manager
- decouple dynamic airport data from the static (nav-db) data.
2015-12-05 00:25:29 +00:00
Edward d'Auvergne
524136d709 Minor rounding error fix for the latitude and longitude strings.
This is for the FGProperties::getLongitudeString() and
FGProperties::getLatitudeString() functions.  The previous algorithm was to
round the degrees up by the smallest fraction required to prevent a round up to
60 minutes or seconds, and then round down the final minutes or seconds by the
same fraction.  The new algorithm is to detect if the final minute or seconds
will be rounded to 60 by the string formatting and, if so, the higher unit
(degrees or minutes) is incremented by one, and the lower unit decremented by
60.
2015-12-02 17:48:02 +01:00
James Turner
fc887b106b Checkpoint - ground-net skips the cache 2015-12-01 14:01:32 +00:00
Rebecca N. Palmer
d56fbfd415 Revert "Initialise Qt earlier, and whenever available"
Temporary workaround for
http://sourceforge.net/p/flightgear/codetickets/1819/

This reverts commit 3e67417bf0.
2015-11-30 23:10:32 +00:00
James Turner
8bfb1c3aa5 Move functionality into clear_fg_scenerey helper. 2015-11-27 23:25:53 +00:00
James Turner
e52e20b54f SHPParser 2015-11-27 23:02:42 +00:00
Rebecca N. Palmer
3e67417bf0 Initialise Qt earlier, and whenever available
(to allow it to be used for error boxes)
2015-11-24 07:21:52 +00:00
James Turner
97a5e15aaf Show paused message when starting frozen. 2015-11-23 00:48:20 +00:00
James Turner
a39df48772 Navaid diagram for launcher
- work in progress, needs labels
2015-11-23 00:47:01 +00:00
James Turner
56d7d049bc Launcher GUI for in-air / navaid starts 2015-11-23 00:46:25 +00:00
James Turner
1e213201cf Work on the launcher 2015-11-23 00:45:21 +00:00
Stuart Buchanan
660c38ce72 Fix for SEGFAULT when using multiple loggers.
Patch from Julian BREITENEICHER.
2015-11-22 17:11:36 +00:00
Rebecca N. Palmer
3e462f3056 fgValidatePath: allow Nasal to read user-set scenery directories
(but not the Terrasync directory, as Nasal can change that)
2015-11-22 11:27:39 +00:00
Rebecca N. Palmer
97f235173e fgValidatePath: documentation improvements 2015-11-22 11:03:00 +00:00
Rebecca N. Palmer
91dc448875 Simplify fgValidatePath + minor fix (requires simgear update)
Drop fgNormalizePath, use realpath() only
As this makes it accept relative paths, always use the returned
(absolute) version for the actual file operation to avoid check-to-use
races, or where this is not possible (NasalSGPath) explicitly reject
relative paths
Fix: do_save is a write, not a read
2015-11-21 21:37:19 +00:00
James Turner
29ef561ed9 Fix some inverted logic
- spotted by Thomas Geymayer!
2015-11-20 21:28:19 +00:00
Thomas Geymayer
fdf4a61ed5 fgcommand remove-subsystem: fix double delete/segfault. 2015-11-19 23:17:58 +01:00
James Turner
f110fc57d6 Fix enable/disable-freeze option.
- set /sim/freeze/clock as well as /sim/freeze/master

Fix by Hamza Alloush
2015-11-13 22:13:44 +00:00
James Turner
bf6ef6664c Fix for OSG 3.5 2015-11-13 22:13:44 +00:00
James Turner
ca1f8cddc9 Fix a package crash on startup. 2015-11-13 22:13:44 +00:00
James Turner
2314ccfe13 Developer-warnings
- make some existing warnings developer-mode only
- add a warning about legacy aircraft path usage
2015-11-13 22:13:44 +00:00
Florent Rougon
7198dec355 Use SGPath::realpath() on the value supplied for --aircraft-dir
* Before setting /sim/aircraft-dir from the --aircraft-dir option,
canonicalize its value with SGPath::realpath() as is already done in
FGGlobals::append_aircraft_path() for the paths given with --fg-aircraft
or via the FG_AIRCRAFT environment variable.

* This fixes a bug when --aircraft-dir is used, due to the fact that
fgValidatePath() canonicalizes its 'path' argument before matching it
against the allowed patterns, and therefore will not validate paths
under the directory specified with --aircraft-dir if this directory has
been given in a non-canonical form by the user (e.g., containing at
least one symlink component).

* This fix does not lower security: the path which is canonicalized has
been explicitely given by the user. This operation is already done for
all paths specified with --fg-aircraft or via the FG_AIRCRAFT
environment variable, via Options::initPaths() which calls
FGGlobals::append_aircraft_paths().

* To reproduce the bug, create a symlink (e.g., /tmp/aircrafts) to a
directory suitable for --fg-aircraft, then run:

  fgfs ... --fg-aircraft=/tmp/aircrafts \
           --aircraft-dir=/tmp/aircrafts/SenecaII --aircraft=SenecaII

This will trigger many failures such as:

  loadxml: reading '/tmp/aircrafts/SenecaII/Dialogs/registration.xml'
  denied (unauthorized directory - authorization no longer follows
  symlinks; to authorize reading additional directories, add them to
  --fg-aircraft)

(from do_load_xml_to_proptree() in flightgear/src/Main/fg_commands.cxx)

I have also tested this with the ec130b4 and the 777-200ER. Same
problem, same fix.
2015-10-06 21:54:50 +02:00
Florent Rougon
1d34b96d49 Don't load resources for the current aircraft from several aircraft dirs
* If one has the same aircraft in several aircraft directories,
  FlightGear should not mix resources from the various aircraft
  directories. For instance, if one starts FG with:

    --fg-aircraft=/my/personal/dir:/path/to/fgaddon/Aircraft

  and one has in /my/personal/dir/ec130 a clone of the upstream
  developer repo, FlightGear should use either the upstream version from
  /my/personal/dir/ec130 or the FGAddon version from
  /path/to/fgaddon/Aircraft/ec130, but not some strange, untested hybrid
  of both.

* This commit makes sure that when the looked-up resource starts with
  Aircraft/<ac>, where <ac> is the current aircraft name [last component
  of aircraftDir = fgGetString("/sim/aircraft-dir")], then
  AircraftResourceProvider::resolve() doesn't search other aircraft
  directories if the resource isn't found under 'aircraftDir'.

* To reproduce the bug before this commit, you may add the following
  code (there is nothing specific about the SenecaII here, it's just the
  aircraft I used for testing):

    var file_path = resolvepath("Aircraft/SenecaII/flo-test");
    if (file_path != "")
      gui.popupTip("flo-test found", 2);
    else
      gui.popupTip("flo-test not found", 2);

  in a keyboard binding for the SenecaII (for instance; you may use the
  F11 binding that otherwise only prints a short message). You should
  add this to the SenecaII/SenecaII-base.xml file *that will be loaded
  by FlightGear*, let's say the one under /my/personal/dir in the
  example above (beware of the <path-cache> in autosave_X_Y.xml). Then,
  by creating or removing a file named "flo-test" in the SenecaII
  subdirectory of other aircraft dirs (for instance,
  /path/to/fgaddon/Aircraft in the example above), you can see that the
  behavior of the loaded aircraft is influenced by the contents of
  unrelated versions of the same aircraft that might be present in other
  aircraft dirs (e.g., loaded /my/personal/dir/SenecaII influenced by
  /path/to/fgaddon/Aircraft/SenecaII).

* Aircrafts loading resources using paths relative to the current
  aircraft directory (e.g., with 'resolvepath("flo-test")') are not
  affected by this kind of problem, because this scheme is handled by
  CurrentAircraftDirProvider, which does not exhibit this bug.
2015-09-26 09:45:33 +02:00
James Turner
18a898f5f9 Lots of work on aircraft package support 2015-09-20 19:46:35 -05:00
Rebecca N. Palmer
e296ea5fe0 Nasal security: document that symlinks are no longer followed 2015-07-25 10:15:31 +01:00
Rebecca N. Palmer
e2cbacff90 fgValidatePath: remove overly fragile test case
Fix failure to start with non-standard TerraSync directory
2015-07-14 19:43:51 +01:00
Rebecca N. Palmer
6957a17434 fgValidatePath: fix \ vs / Windows bug 2015-07-14 08:00:22 +01:00
Rebecca N. Palmer
5b2ae615e5 avoid ERROR: The path '' does not exist... on startup
While harmless, it's an annoying distraction
2015-07-13 23:15:36 +01:00
Rebecca N. Palmer
e090a9da3f fgInitAllowedPaths: remove possibly invalid test paths 2015-07-13 22:53:23 +01:00
Torsten Dreyer
092707e78b Fix #1778: incorrect HUD values
negative latitude/longitude coordinates resulted in negative WEST/
SOUTH coordinates for the default format 0 (zero).
This should be now fixed so that
+12.3 gets formatted as 12.3N/E
-12.3 gets formatted as 12.3S/W
2015-07-13 16:23:56 +02:00
Rebecca N. Palmer
823d57bd53 Security: don't follow symlinks to forbidden directories
https://bugs.debian.org/780867

This messy approach is to minimise changes during freeze; for 3.7,
I plan to make realpath() handle non-existent files as "realpath
they would have if created now" and get rid of fgNormalizePath
2015-07-12 17:57:49 +01:00
Rebecca N. Palmer
1199d6d626 Security: don't pass a string to fgValidatePath then use the original
This is insecure because it always (not just on Windows) converts
\ to / before .. checking.  Either use the path it returns (as in
f_open()) or use an SGPath (where this conversion is already done)

Only a minor problem because the affected functions are limited to
the .sav file type
2015-07-12 17:49:21 +01:00
Torsten Dreyer
36113bf69d Cleanup: remove unused code and includes
no functional change
jpg-httpd functionality was moved into httpd with 3.4
cmd-line option still spits out a warning
2015-07-08 17:24:13 +02:00
James Turner
0f90a2e9f3 FLIGHTGEAR_VERSION is always set. 2015-06-08 10:37:26 +01:00
Durk Talsma
98682c0c68 Fix bug when starting using the --parkpos option. Create a pointer to a ParkingAssignment object, so that the reference counter doesn't get reset to 0 when the local class is destroyed. 2015-05-14 18:15:30 +02:00
James Turner
aa20e0acd8 Work on new download-dir option
- simplify management of a single, user-facing
  location for large downloaded data.
2015-04-10 15:01:54 +01:00
James Turner
73de4aeb86 Fix —show-aircraft with multiple aircraft dirs
Patch from Jens Thoms Toerring
2015-04-09 15:31:09 +01:00
Rebecca N. Palmer
659c5b9676 Fix spelling 2015-04-06 10:28:10 +01:00
Rebecca N. Palmer
14405fe2e3 Fix compile with CMake 3.2.1, by Kevin Seroux
Explicitly link X11, as this no longer comes with OpenGL
2015-04-03 19:15:52 +01:00
James Turner
f2d6b76b13 Portability: Fix compile errors on MSVC (cmath)
From Scott (xDraconian)
2015-03-24 11:11:42 -05:00
Rebecca N. Palmer
6cc98cb995 Improve error messages for system.fgfsrc removal
The original message (b5835c38b4)
was meaningless on Windows
2015-03-20 18:56:13 +00:00
Rebecca N. Palmer
51bfdc21e0 Nasal: remove /tmp/*.xml from allowed paths list
Appears unused, and shouldn't be used on Windows
2015-03-20 18:20:11 +00:00
James Turner
e0274af493 Percentage feedback during nav-cache build.
- also used by the GUI launcher for the same.
2015-03-19 12:01:38 -05:00
Torsten Dreyer
c26fb00049 etxtend "pause" command to force pause/continue 2015-03-14 22:33:06 +01:00
Rebecca N. Palmer
196c667266 Normalize the allowed paths as well (fix Windows breakage) 2015-03-13 22:40:35 +00:00
Torsten Dreyer
817297699f warning fix: use correct type for std::string::find reply 2015-03-13 22:57:03 +01:00
Rebecca N. Palmer
b5835c38b4 Disable system.fgfsrc
Together with the preceding few commits, this is intended
to make security independent of the data package
2015-03-13 18:14:51 +00:00
Rebecca N. Palmer
16784d590a Document that property write-protection is not a security measure
(Nasal can remove it)
2015-03-13 18:11:29 +00:00
Rebecca N. Palmer
9002696195 Make fgValidatePath always return std::string, not char * 2015-03-13 18:07:24 +00:00
Rebecca N. Palmer
6a30e7086e Stop using property listener for fgValidatePath
This was insecure: while removelistener() won't remove it, there are
other ways to remove a listener from Nasal
2015-03-13 17:54:44 +00:00
Torsten Dreyer
f7d476c856 extract RemoteXMLRequest to make it reusable 2015-03-11 18:50:11 +01:00
James Turner
11c2623dec Start wiring package manager into the launcher. 2015-03-11 17:09:59 +00:00
James Turner
2e452e78f3 Fix non-Qt build. 2015-03-08 09:40:44 +00:00
James Turner
c3543f8fdd GUI ‘restore defaults’ support.
- Hold ‘alt’ on launch to restore defaults, including launcher prefs.
2015-03-08 00:42:39 +00:00
James Turner
a466dbce73 Very crude work on GUI base package selection.
- feedback on wording greatly appreciated.
- needed to make nightly builds usable without bundled data.
2015-03-08 00:42:05 +00:00
Rebecca N. Palmer
033957003f Clear GroundLightManager on exit to avoid segfault
While mostly harmless since you're exiting anyway, it's an annoying
distraction when the real problem is "unexpected exit" (e.g.
https://bugs.debian.org/763285 ), and blocks testing with LeakSanitizer
2015-02-12 16:39:28 +00:00
James Turner
1cffd2b8c0 Fix encoding / C++11 compliance
- convert text encoding to UTF-8
- C++11 requires a space between literal and identifier
2015-02-11 16:44:05 +00:00
James Turner
ee61a07636 Restore aircraft-manager location back to FG_HOME 2015-01-10 14:18:32 +00:00
James Turner
7d9609116b - Make Qt check guarded by a CMake option
- Only init QApplication if showing the launcher.
2015-01-10 14:05:23 +00:00
James Turner
1ba62acfcc Fix native menubar in Mac builds with Qt
- where we don’t use the launcher, we must pass tell OSG we
  want to pose as standalone when setting the window traits.
2015-01-07 09:19:04 +00:00
James Turner
78e8f53312 In-app launcher for Mac, based on Qt5.
The old Mac launcher doesn’t work on Yosemite, add a tiny
Qt-based launcher inside the main process (no need to fork /
exec) which runs before the OSG window is created.

Will be merged for 3.4, hopefully with no impact on other
platforms.
2015-01-06 19:13:30 +00:00
James Turner
0a28e95107 Guard against saved bad terrasync path.
- warn when the terrasync path is not writeable, with a message box.
2015-01-04 18:02:26 +00:00
Torsten Dreyer
71eba5e579 Fix #1606, bad ATIS for Japanese locale
Selecting a language for a nonexisting translation did not load the sys and
atc messages.  Better fall back to default (en) locale.
2014-12-04 09:18:41 +01:00
James Turner
cb9919ef74 Drop ground-nets cache on scenery path change.
Unfortunately we can’t drop loaded ones, since the in-memory structures don’t have ref-counting, and we don’t
know what AI plans may be referencing them.
2014-12-02 16:31:34 +00:00
James Turner
729392b1f3 Remove obsolete #define 2014-11-11 22:25:55 +00:00
Torsten Dreyer
e4fd9a6b8f Remove --jpg-httpd option
the original implementation of a screenshot server is now
replaced by the mongoose httpd /screenshot URI which provides
more features.
2014-10-02 11:33:45 +02:00
Thomas Geymayer
0b9e72eb87 Nasal: move IOrules check to better place and exit on failure. 2014-09-19 18:22:47 +02:00
Torsten Dreyer
015ecb54f3 Load a flight recorder tape from the command line
Adds new option --load-tape=foobar to load a flight recorder
tape from the command line. Loads foobar.fgtape from the
directory specified in /sim/replay/tape-directory and starts
replay.
2014-09-17 22:38:40 +02:00
Thomas Geymayer
0f14a2d73b subsystemFactor: name fixing (use same as in fg_init.cxx) and cleanup. 2014-07-12 01:17:35 +02:00
Thomas Geymayer
a52c0882a1 Fix subsystemFactory name fdm -> flight (Thanks to Hooray). 2014-07-11 19:25:26 +02:00
Thomas Geymayer
f7f7be77e5 Remove unused value, formatting. 2014-06-22 15:36:25 +02:00
Gijs de Rooy
8c99d5d9d6 Remove unused --control option 2014-06-19 14:28:14 +02:00
James Turner
7e8d713b28 Pkg: initial support for Variants
- aircraft init code can deal with a variant ID
- Nasal API can return a hash with variant IDs and names
2014-06-15 20:10:24 +02:00
Thomas Geymayer
9604142d09 Fix crash (use iterator of same container for loop) 2014-06-12 16:38:21 +02:00
James Turner
63427fc589 Pkg: Fix loading of non-installed aircraft.
Fallback to the normal code path when a packaged aircraft is
found, but not installed.
2014-06-12 13:06:01 +01:00
James Turner
32f57d0dc1 Aircraft switching command and formal support.
- /sim/aircraft can be set to package ID, including qualified
package ID. If not matching package is found, falls back to
traditional search of fg-aircraft for -set.xml files
2014-06-12 08:17:05 +01:00
James Turner
d1fd5756f6 Initial package-system integration.
- disabled by default
- incomplete, adding so Thomas can see the API
2014-05-31 18:04:56 +01:00
Thomas Geymayer
3b4bb10e4f Canvas: expose layouting to Nasal. 2014-05-31 02:43:03 +02:00
Torsten Dreyer
a5c39e3009 Final log-class cleanup (httpd comes in another commit)
yes, I will use grep next time :-/
2014-05-20 23:12:34 +02:00
Torsten Dreyer
59db0534ff Fix a warning, no functional change 2014-05-05 22:24:47 +02:00
Torsten Dreyer
6ee2fcdd9e Allow using the system version of flite and the HTS engine
By default, if the system version exists and can be used,
then it will be used. Otherwise, the local version will be used

Original patch by  Saikrishna Arcot via
https://gitorious.org/fg/flightgear/merge_requests/1582
slightly modified
2014-04-28 21:33:48 +02:00
James Turner
01dca5e541 Fix link order of HTS / flite for GCC ld
- Clang, gold etc don't care but GCC ld still does.
2014-04-04 11:25:12 +01:00
Torsten Dreyer
44ba076720 allow binding of httpd to an address, not just a port
support --httpd=127.0.0.1:8080
2014-03-29 22:07:12 +01:00
James Turner
ca3cc03fac Ignore not-found 'config file' arguments.
Fixes confusing startup behaviour with malformed args, when
an argument accidentally contains a space (e.g. a park-pos or
protocol desc). In this case we treat the parts after the space as an XML config file name. When we can't find this file, we
completely abandon options setup, which causes many downstream
errors.

Change the behaviour so we warn in this case, but carry on with normal startup.
2014-03-27 08:05:02 +00:00
James Turner
19528fab8c Fix duplicated FGIO channels on reset.
Thanks to Nicholas Scheel for spotting this.
2014-03-26 19:24:00 +00:00
James Turner
487546c848 Fix some leaks on reset
- tilecache 'clear_cache' is poorly named, ensure the destructor
  really deletes all outstanding entries.
2014-03-13 18:19:13 +00:00
James Turner
c7f2992904 Add 'set-scenery-paths' command. 2014-03-12 18:56:19 +00:00
James Turner
afe02b9b36 Reset: tweak property PRESERVE
- ensure options are re-processed before restoring PRESERVEd
properties, so that sessions changes survive a reset.
2014-03-11 22:43:25 +00:00
James Turner
1edffd1d10 Reset: fix OSG stats handling 2014-03-11 16:45:47 +00:00
James Turner
f04d5f8758 Reset: work with threaded OSG modes 2014-03-11 16:45:31 +00:00
James Turner
cc607ae7e4 Save/restore initial state removed. 2014-03-10 17:29:28 +00:00
James Turner
9489009570 Fix fg-aircraft, fg-scenery props after reset.
- restore fg-aircraft properties, and PRESERVE fg-scenery ones,
across reset.
2014-03-10 17:24:42 +00:00
James Turner
03aa642155 Old reset code-path is removed. 2014-03-10 17:24:37 +00:00
James Turner
5e6c2b8e82 Reset the Autopilot on reposition.
- previously we restored AP state to initial; let's
actually re-init it after re-position.
2014-03-10 12:02:10 +00:00
James Turner
a8fe586e48 Revert wiping of /fdm on reposition.
This is too destructive for many established things, so revert it.
Instead, make the FDM shell save /fdm state on postinit(), and
restore it on re-init (which reposition invokes).
2014-03-10 12:00:51 +00:00
James Turner
7b2d710cd0 Add hts_engine 1.08 and flite_hts 1.05 code.
- Not compiled by default, nor hooked up to anything yet.
- Both libraries licensed under modified BSD license.
- Added top-level CMake file for both, to create a plain static
  library for each.
2014-03-10 09:32:43 +00:00
James Turner
86ba2a1628 Throw the reset switch.
- fix up CanvasMgr so canvas works after new reset.
2014-03-07 12:40:14 +00:00
James Turner
5ce2a067ca Fix JSBsim trimming on reposition.
- remove the entire /fdm tree on reposition
- force the initial NED wind values to 0.0 in JSBsim,
pending advice from people who know better.
2014-03-06 22:33:42 +00:00
Torsten Dreyer
b84026ce84 httpd: fix ignored port on --httpd=nnnn
also fix unconditional startup of the daemon
2014-03-06 21:19:49 +01:00
Torsten Dreyer
63e9cbed40 Initial commit for mongoose httpd 2014-03-06 13:19:15 +01:00
Thomas Geymayer
88b7d4f530 Update for SGPropertyNode changes. 2014-03-06 00:41:41 +01:00
James Turner
6493975913 Remove reference to 'old ATIS' from reposition. 2014-03-05 15:16:07 +00:00
Torsten Dreyer
ea13c0f2de Cleanup, no functional change 2014-03-05 14:09:40 +01:00
Torsten Dreyer
dd6cccdda1 A new comm radio and atis implementation 2014-02-28 11:45:49 +01:00
James Turner
99fd9513d9 Metar: finalise-position fast if Metar fails
- when METAR lookup fails (as opposed to timing out), report
this immediately so finalise-position doesn't wait.
2014-02-24 19:43:21 +00:00
James Turner
bd8e43c007 Initial work on 'reposition' command
- use old-style reset as the basis for a lightweight 'reposition' command. This does not restore state, or reset
time management, but does reset the FDM and re-finalize position.
2014-02-24 19:43:21 +00:00
James Turner
b76d255d82 Remove pre-OSG 'enable/disable-textures' option.
These have been non-functional for a long time, remove
to avoid further confusion.
2014-02-21 07:57:35 -08:00
James Turner
39d1b6db38 Re-factor the FPE handling code
* make --enable-fpe work on Linux and MSVC
* standardise the code paths for different platforms
* add an argument finding helper to Options

(This is a basic cleanup, contributions from people with
more experience in this area are welcome)
2014-02-19 13:53:52 -08:00
Christian Schmitt
9d995907db Support helipad names in the --runway startup option
also give better user feedback if runway/helipad ID is unknown
2014-02-14 20:05:11 +01:00
James Turner
7bc7197f6a Use Cmake to generate app-bundle on Mac
- build the .plist using CMake features
- update the nightly Mac packaging script for the new layout
2014-02-14 18:58:36 +00:00
James Turner
4df9c61d2a Check for and warn about old nVidia drivers.
(Had a bug report with someone using 189 drivers on Windows!)
2014-01-27 17:27:12 +00:00
James Turner
1a372d9366 Update image-server logic.
- no dependency on libJpeg or Simgear
- no duplicate rendering of the scene (uses a draw callback)
- supports other image types, eg PNG
- threaded so doesn't block the main loop ever
2014-01-27 09:08:34 +00:00
James Turner
9f3a2ddbdc Change default Windows terrasync path
Now use (new) SGPath::documents helper to download
to a user-visible location: Document\FlightGear.
(Linux & Mac behaviour is unchanged)
2014-01-26 16:07:53 +00:00
James Turner
c8b1655edc Report bad command-line args via message box.
This makes the behaviour when FGRun (or other GUI launchers)
send bad options much more explicable. Non Windows/Mac systems
get an SG_ALERT on the console as before.
2014-01-25 10:36:00 +00:00
James Turner
45d67406a4 CrashRpt tweaks, checking.
- show a message box if setup fails
- log setup status
2014-01-22 22:33:30 +00:00
James Turner
80cc2ff8c3 Adjust fg-aircraft handling back to original style.
- startup code will warn and fix the alternate style
- man page now documents the option
2014-01-22 10:56:04 +00:00
James Turner
a46114da9a Fix typo, add Hudson Build-ID to reports. 2014-01-20 21:54:06 +00:00
James Turner
ce3a7b20fe Crash-fix: mat-lib is now reference-counted.
Adapt to corresponding SG change to make SGMaterialLib be ref-counted,
and have the 'reload-materials' command notify the tile-manager of this,
so it can update the options struct it passes to new tiles.
2014-01-19 16:49:44 +00:00
James Turner
2a460d8e86 Make CrashRpt link optional
(The variable contains -NOTFOUND, not the empty string, so we can't
just link against it regardless)
2014-01-18 15:36:20 +00:00
James Turner
590be3f8ff Initial integration of CrashRpt for Windows. 2014-01-18 14:51:19 +00:00
James Turner
2a354e224c Make Traffic-via-terrasync conditional
GUI dialog already set the property, just need to pick it up.
2014-01-15 22:01:02 +00:00
James Turner
2b55acd3eb Tweaks to fg-aircraft handling.
Warn (but do not require, since people would probably complain) when
added paths do not contain an Aircraft subdir. When people specify
a path which ends in /Aircraft, use the parent directory.
2014-01-15 17:10:12 +00:00