Commit Graph
100 Commits
Author SHA1 Message Date
James Turner bab083d072 For static builds, ensure we find the sound library
Should fix Erik’s issue with AeonWave.
2020-08-23 18:10:49 +01:00
James Turner 2c4120974c Follow rule of three for HTTPRepo:ChildInfo 2020-08-23 18:10:17 +01:00
James Turner 8b14e56f88 HTTPRepo: Fix ownership of HTTPDirectory 2020-08-23 18:08:49 +01:00
James Turner e85a3207ac Add newer FindGDAL with imported target support 2020-08-19 09:22:52 +01:00
James Turner 2846c5e579 Ensure simgear_config.h is round when building HLA 2020-08-19 09:22:33 +01:00
James Turner 456c63935c Cmake refresh
Use target objects everywhere, and simplify handling of system vs
local dependencies.
2020-08-18 11:40:27 +01:00
James Turner 3b41b0c6d3 Particles: fix a deadlock condition 2020-08-17 15:04:16 +01:00
James Turner 84c15f6384 Enable ASan for clang 2020-08-17 10:20:26 +01:00
James Turner 209b60504d Particles: rewrite global manager for thread-safety
Avoid re-registering the global node callback each time a new particle
animation is loaded, and use mutexes to protected all shared data.
2020-08-16 19:49:26 +01:00
James Turner 297e509576 Avoid a race in MatModels loading
Add a mutex to ensure an SGMatModels only loads its models once. Caught
be ASan, hurrah.
2020-08-14 16:48:51 +01:00
James Turner b874201806 API to reset the shared tree geometry 2020-08-14 15:40:47 +01:00
James Turner e659ad3872 Destructor tweaks from some animation nodes 2020-08-14 11:12:51 +01:00
James Turner b8182a4d29 Fix for sprintf of nil numeric in Nasal
Spotted by valgrind, w00t. If you used a numerical formatter, such
as f,d or g, with. a nil value, we would read uninitialised data, and
generally get confused.
2020-08-14 09:42:14 +01:00
James Turner 7234b57288 Set OSG Object names on SGSky stuff
This is to help with debugging when nodes/effects dangle.
2020-08-11 17:19:01 +01:00
James Turner bf7b064bbe Ensure SGTerraSync::unbind drops all properties
Avoid some noise on reset, by dropping /all/ our SGPropertyNodes
2020-08-11 17:17:58 +01:00
James Turner abb1cd02cd SGBuildingBin: avoid read of un-inited memory
Where the building line is not as long as expected, ensure we read
valid memory.
2020-08-07 17:48:21 +01:00
James Turner 57c7d58f79 HTTP: Use curl_multi_wait everywhere
Also check the result of the curl methods, in case they fail
2020-08-07 17:47:34 +01:00
James Turner 7943353a2a Terraysnc: fix incorrect handling of ‘entirely ocean’ tiles
We had some confusion between two error codes, meaning we would log an
error (and treat as a failure) a pure ocean 1x1 area, even though this
was entirely correct and expected behaviour.

Terrasync.cxx expected REPO_ERROR_NOT_FOUND, we need to convert the
file-level error to that, and avoid logging a warning.
2020-08-05 15:20:55 +01:00
James Turner f72e2ae644 TerraSync: restart after max-errors is exceeded.
When we trip the max-error count for a session, back off for a period
of time and then retry (selecting a new TerraSync server).
2020-08-05 15:18:30 +01:00
James Turner ece7dab47c TerraSync: handle reinit better
Fix various cases where re-init could get things blocked. Remove the
duplicate storage of the active paths; now we always check the primary
data, and hence it can’t be out of sync.

Also remove the obsolete persistent cache code.

Fixes some of the issues discussed in:
https://sourceforge.net/p/flightgear/codetickets/2308/

Further improvements still to come, especially to retry on a better
schedule for intermittent connections.
2020-08-03 18:01:34 +01:00
James Turner 2622004af4 Logging: add log overload which copies filename
This is needed to fix a Valgrind error in the test-cases, due to logging
Nasal filenames which are GCed.
2020-07-17 11:54:50 +01:00
James Turner ec36ca8e71 Nasal CppBind: restrict which exceptions are caught
The previous catch policy breaks unit-testing, since CppUnit relies
on a special Exception type.

This could be made conditional based on testing or not, but trying the
simple way initially.
2020-07-08 15:16:27 +01:00
James Turner 286e2967fd Fix compilation for some MSVC versions 2020-07-04 14:43:44 +01:00
James Turner 3fccee6e38 HTTP: allow CAINFO to be set
Env var is SIMGEAR_TLS_CERT_PATH
2020-06-25 16:13:09 +01:00
James Turner 7fc82a26bf Helper to map string to log priority 2020-06-25 11:00:27 +01:00
James Turner a128272816 Fix CMake include paths 2020-06-24 13:57:27 +01:00
James Turner 2b391ef671 Bundle Cmake FindCURL, for imported target support
This is the one from CMake 3.17, it should work fine with 3.10 but
let’s see.
2020-06-24 11:12:01 +01:00
James Turner abb73c566e Update to C++17.
This can be reverted easily, but let’s see if it goes.
2020-06-22 20:39:45 +01:00
James Turner 346344ee09 C++17: use an OBJECT_LIBRARY to build HLA
This allows us to easily have different CXX version for the HLA code,
to the rest of the project.
2020-06-21 19:31:35 +01:00
James Turner 9ccbf539c1 Raise minimum OSG version to 3.4.1 2020-06-18 17:22:55 +01:00
James Turner 720f681e0f Raise Cmake/Compiler versions for Next 2020-06-18 12:58:47 +01:00
James Turner aa0f02706f API to reset the resource manager, and remove
providers.

Needed to fix a bug with parsing -set.xml files in the launcher;
correctly loading XML needs the resource paths to be defined.
2020-06-17 11:48:59 +01:00
James Turner 60dcf00f2b Fix zero-interval repeat on pick/knob animation
See:
https://sourceforge.net/p/flightgear/codetickets/2241/

Note did not adjust bug in knob-animation ignoring repeatable flag
(always marked repeatable) since this might break some aircraft.
2020-06-15 16:11:18 +01:00
James Turner 3075b8bcc4 new version: 2020.3.0 2020-06-15 12:33:50 +01:00
James Turner 751cdc32a8 new version: 2020.2.1 2020-06-15 12:33:50 +01:00
James Turner 01ab3b2385 New SGGeodesy::advance, taking degrees 2020-05-30 16:27:42 +01:00
James Turner 11cf87951c SIMD flags: ensure we respect other compiler flags
Ensure we only ever extend the currently set compile flags when
ENABLE_SIMD is requested
2020-05-28 10:46:18 +01:00
James Turner 7c004a4c90 Fix compilation with Boost >= 1.73 2020-05-28 10:45:47 +01:00
James Turner a48693d273 Kill explicit setting of compiler flags in Debug
Use the CMake defaults for this.
2020-05-24 14:32:13 +01:00
James Turner 12d57a6373 Adjust RelWithDebInfo optimisation for Clang
This should give a bit of speed boost to macOS official builds.
2020-05-13 14:23:00 +01:00
James Turner c7c8fc7777 Better RelWithDebInfo flags for CL.exe 2020-05-08 14:31:44 +01:00
James Turner 6e054e57ef Windows: ensure RelWithDebInfo is fast
Default CMake RelWithDebInfo pessimizes inlining
2020-05-07 14:13:54 +01:00
James Turner 1d89a76d13 Old-style texture compression: better check
Make even more sure new-style texture-compression is active, before
deciding which old-style mode to use.
2020-05-07 11:47:25 +01:00
James Turner 65925cccdf Enable old-style texture compression
Thanks to Dany for tracking this down!
2020-05-05 20:40:29 +01:00
James Turner 898559ab31 Add copyPropertiesIf helper 2020-05-03 12:21:36 +01:00
James Turner ad3621e23b Add Canvas::Image.dirtyPixels() 2020-04-28 09:36:40 +01:00
James Turner 57b0f70a55 Nasal: improve message for non-object member access
Based on some discussion on this ticket:

https://sourceforge.net/p/flightgear/codetickets/2186/

Make this message slightly clearer.
2020-04-28 09:36:40 +01:00
James Turner bd93fb279b new version: 2020.2.0 2020-04-27 09:29:55 +01:00
James Turner 81bdae283a new version: 2020.1.1 2020-04-27 09:29:54 +01:00
James Turner 00e25404c7 Add simgear::optional
This is a poor-man’s proxy for std::optional until we have it.
2020-04-25 18:05:59 +01:00
James Turner 5c52cdc255 Fix for crash on reset:
https://sourceforge.net/p/flightgear/codetickets/2217/

Ensure that subsystem lookup during its own removal, returns nullptr.
Otherwise we cache an about-to-be dead pointer, which is Bad (TM)
2020-04-22 10:55:41 +01:00
James Turner 17d7808200 Remove a log message 2020-04-22 10:54:44 +01:00
James Turner f144bd5a89 CanvasImage: fix updating after fillRect / setPixel 2020-04-18 21:31:16 +01:00
James Turner b72553f6f0 Nasal: add isscalar() for Henning 2020-04-18 18:06:35 +01:00
James Turner c82a14c252 Nasal: fix build on non-C99 mode
It seems GCC at least is strict about C99 mode.
2020-04-16 16:44:20 +01:00
James Turner faa559e9af Nasal: add vecindex() built-in 2020-04-16 13:40:41 +01:00
James Turner c51c0c43ed Nasal: add more isTYPE helpers from Henning 2020-04-16 11:42:41 +01:00
James Turner 8626e0482d Nasal: add some type-check helpers.
These avoid building a string for the result, as typeof() does
2020-04-14 13:24:06 +01:00
James Turner c62c080a4b Logging: enable the WinDebug callback using an env var.
Instead of hard-coding, add an env-var SG_WINDEBUG to enable the
logging to the Windows debug stream.
2020-04-10 19:50:58 +01:00
James Turner c90ab3df5b Packages: consider checksum failures for retry.
This means an out-of-sync mirror causes a retry on a different
mirror server.
2020-04-10 15:03:17 +01:00
James Turner 21e21a1fa8 Allow TiedPropertyList to fire valueChanged 2020-04-10 10:41:00 +01:00
James Turner 92ebdbfacc Expose compare-version helper publicly.
This helper was added for Catalog version checking, but will be used in
FlightGear now, so move it to strutils.
2020-04-09 14:39:12 +01:00
James Turner 8dbabc8b43 Texture-compression fixes
Rename a highly confusing method, and disable the older texture-
compression code since it interacts badly with the new texture-cache.
2020-04-07 12:12:52 +01:00
James Turner c83dc79357 Revert to C++11 for now, found an alternative solution. 2020-04-06 10:44:23 +01:00
James Turner a53c1bfe8b CMake logic to export debug symbols 2020-04-05 14:04:19 +01:00
James Turner 6185b8fd0d Fix crash with Touch animation mouse-up 2020-04-05 14:04:19 +01:00
James Turner 9cdec99fa4 Quiet some warnings 2020-04-03 10:00:22 +01:00
James Turner e9e2053c64 Strutils: add hex-decoding helper
This will be used to allow entering hex bytes in XML files, for HID
descriptor support on Windows.
2020-03-31 10:09:47 +01:00
James Turner ec315bf26d Fix thumbnail cache retrieval
Use direct reading of thumbnail-cache files, instead of using libCurl
2020-03-26 16:51:00 +00:00
James Turner 74c304097d Fix for older libCurl versions 2020-03-26 16:51:00 +00:00
James Turner d65bb58317 HTTP: increase the Curl download buffer size
This improves download performance with large files, i.e,
most of them.
2020-03-24 20:34:49 +00:00
James Turner 8cf11f9208 Packages: fix handling of unsafe paths in zips
This was breaking the P-51D which contains a mis-named PNG file which
tripped the unsafe path detection.
2020-03-24 13:51:57 +00:00
James Turner 40725a76ab Packages: randomise mirror URL selection
Also add retry on mirrors when a download fails.
2020-03-21 18:31:53 +00:00
James Turner c8d802bc1d More SGPath / UTF-8 fixes
Use SGPath in more public APIs, so FlightGear doesn’t have to convert
and guess the conversion itself.
2020-03-15 14:26:42 +00:00
James Turner c3a169319c Fix UTF-8 shader path support
Work around osg::Shader::loadShaderFromSourceFile ’s lack of UTF-8
support by loading using our own istream, and then setting the text
directly.
2020-03-15 14:26:42 +00:00
James Turner 87da4680c7 Tweaks to Windows string conversion
Avoid use of code-cvt, and tolerate differences in compiler handling of
string literals (tested Clanged and MSVC, hopefully GCC is kind)
2020-03-14 20:10:20 +00:00
James Turner b258bc598e Load time-zones from UTF-8 paths correctly
Use _wfopen on Windows, after converting UTF-8 paths to wchar
2020-03-13 16:48:12 +00:00
James Turner f25c0c60a8 Use UTF8 paths in nearly all places, for OSG
We already request OSG to use UTF8 paths, so ensure whenever we pass
an SGPath to OSG, we use the correct conversion function.
2020-03-13 09:50:43 +00:00
James Turner f350bd31bd CanvasImage: fillRect / setPixel tweaks
Fix image dirtying and allocation without an underlying fike
2020-03-11 17:12:42 +00:00
James Turner 3e4d528859 Additional install / download failure test
Ensure we can install again on a previously failed URL.
2020-03-09 15:00:23 +00:00
James Turner d670cc13ac testHTTP mods to investigate macOS failure.
Disabled one test for now, since it’s blocking macOS release process
2020-02-25 16:12:12 +00:00
James Turner 43699d039f Track package install status persistently. 2020-02-25 14:27:48 +00:00
James Turner 9192b009e1 Catalog enable/disable feature 2020-02-24 11:35:04 +00:00
James Turner 0cf9dd165e Add NetBeans .gitignore 2019-12-24 20:58:48 +00:00
James Turner ec19dfc2f2 Fix Windows build
__PRETTY_FUNCTION__ is not portable, alas.
2019-12-18 23:43:40 +00:00
James Turner da45c26e7d Adding pixel manipulators to canvas::Image 2019-12-17 22:32:25 +00:00
James Turner c39a5fd8c0 Fix some Clang warnings 2019-12-17 22:32:25 +00:00
James Turner 0a7514c47b Add new ‘listener-safe’ SGProperty attribute
Used in FG to make certain tied properties as safe to use with
listeners, and hence suppress the warning.
2019-10-20 13:03:15 +01:00
James Turner 4b1a53367f Runway lights improvements from Sascha Reißner
(Sascha Reißner <reiszner@novaplan.at>)
2019-10-20 13:02:30 +01:00
James Turner ca97b4371b Use alternative name for internal expat_config.h
Avoid clashes when system has expat installed.
2019-10-05 17:19:09 +01:00
James Turner 93995cd742 Nasal GC : Fix crash running FG unit-tests
When freeing a context, clear its stack so that anything dangling in
them (especially the opStack) is GCed.
2019-09-19 08:05:55 +01:00
James Turner 114ddcff52 Tweak code for older GCC 2019-04-11 21:39:41 +01:00
James Turner 57339486d9 Flip the default meaning of alternate-mouse-wheel-dir 2019-04-11 20:37:47 +01:00
James Turner 5fdf6ef4f3 Simgear parts of queued command execution
Extend the command API to allow posting commands from arbitrary threads,
for deferred execution on the main thread. Additional pieces on the FG
side to follow shortly.
2019-03-24 14:13:42 +00:00
James Turner 7e969f4e28 Updated star rendering phases/parameters
As part of this, adjust the normalisation so the active cutoff value
corresponds to 0.0 normalised intensity.
2019-02-25 16:12:41 +00:00
James Turner 10a701308d Make star cutoff controllable at runtime.
When a new property /environment/star-magnitude-cutoff is defined,
use this to set an upper bound on the magnitude of stars displayed.
2019-02-25 16:12:41 +00:00
James Turner 6197098541 Guard against a potential race init-ing libCurl 2019-02-13 12:49:21 +00:00
James Turner 34b3c52a28 Improve HTTP redirect handling, and add test.
Ensure we get the final status code for the request after redirecting.
2019-02-13 12:34:17 +00:00
James Turner 95d065b3d7 Add strutils::iequals helper
Replaces another boost method
2019-02-06 12:35:08 +00:00
James Turner df6ec4f94c Property alias loop protection
Patch by Henning Stahlke
2019-01-22 17:24:21 +01:00