* 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.
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
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
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
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
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.
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.
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.
- /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
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
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.
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).
- 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.
- 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.
* 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)
- 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
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.
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.
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.
- borrow some code from the new reset codepath to cleanly stop the
OSG pager thread during normal shutdown. Avoids a race-condition
destroying various structures the pager thread might be modifying.
This was previously done only if Terrasync was on, but this made
it impossible to use the GUI dialog to turn it on for the first
time in a fresh install
Had to add this to FGGlobals, since it needs to be cleaned up
alongside the sound manager (which ideally it would be owned by,
but that's a change for another day)
Write PID file to FG_HOME, use this to detect multiple launches.
When this situation is detected, set a marker property and place various
objects into read-only mode, such as the NavCache and TerraSync.
PID file is created using open+unlink semantics on POSIX, and
DELETE_ON_CLOSE on Windows, so it will be removed when fgfs exits,
even if killed or crashes.
This allows us to display a platform-native dialog for problems
which occur early in startup (before we can show a PUI/Canvas dialog).
In particular this improves feedback where FG_HOME, FG_DATA or
aircraft selection is wrong, all of which happen very early in startup.
Requesting 16-bit is probably doing more harm than good on modern
hardware. Command line switch to change works as before.
Also update the default window size, although this is actually
set by preferences.xml
- default to SUBSYSTEM:WINDOWS (we can still AllocConsole if needed)
- add --console option to get a console on Windows
- ensure --show-aircraft and --help modes show the console automatically.
- restore-defaults kills the nav cache, terra-sync cache
- new ignore-autosave option bypasses autosave.xml and leaves it
untouched (does not over-write on exit)
Replace many lingering calls to exit() from the code,
replacing most with exception throws, which can be
caught by the existing mechanisms.
Update the option-parsing code to return an explicit
value indicating what to do (e.g., exit status to return
to the shell).
Many light aircraft include GPS loggers capable of recording the flight
path using IGC records. Lots of third party utilities are available to
analyze, process and convert igc files.
Usage: "fgfs --igc=file,out,1,OutputFile.igc"
- Enable the terrasync persistent cache
- Ensure terraysync scenery dirs exist before NavCache init, so the paths are stable
- Notify TerraSync on reposition, so we sync the full 3x3 set of tiles.
Move sqlite source to a separate location, and build with
an intermediate library target. This permits us to set compile options
easier, including an important one, NDEBUG, which improves performance.
Sqlite 3.8.0.2 also includes an updated query planner which may improve
some queries, to be tested.
If you want a scenario in a particular session of the sim, ask for
it on the command line / config files, or enable in the GUI.
Note if you had previously 'sticky' scenarios in your autosave.xml, you
will still get them until you clean your autosave, or disable them in
the GUI.
Respect the user's language selection in the system settings, and try those languages in turn. If a language is explicitly specified, try that first regardless.
Allow for advanced animations using easing functions and adapters
for interpolating specific property types (eg. CSS colors).
Old behavior should not have changed.
This adds the framework for platform cursor implementations; Windows and X11 to be done.
It also extend the mouse-input code to generate hover events suitable for driving tooltips.
Note there should be no visible functionality change from this commit, since everything
is inactive until fgdata changes are made.