Compare commits

..

364 Commits

Author SHA1 Message Date
4899cbc634 更新 'build_appimage.sh' 2022-12-21 21:11:44 +08:00
Florent Rougon
d8a16058bf download_and_compile.sh: remove some unnecessary quoting
Only in a few "crowded" places where this improves readability. Note
that in these cases, the quote removal does *not* prevent the parameter
values from containing spaces, tabs or newlines.
2022-12-15 23:10:13 +01:00
Florent Rougon
5e6276bd30 download_and_compile.sh: improve the --help output
Reorder options (most basic and important options first; related options
together; experimental or deprecated options last). Explain a bit more
in some cases. Use the https protocol in the URL of the FlightGear wiki.
2022-12-15 22:27:01 +01:00
Florent Rougon
fe33acae74 download_and_compile.sh: add option --override-repo
This option allows one to override the repository from which a given
component is to be cloned (it doesn't do anything when the repository
for a component is simply updated).

Example that downloads OSG 3.4.2 from James' repository (it has
FlightGear-specific patches applied):

  download_and_compile.sh -j$(nproc) -s --cleanup \
    --override-repo OSG=GitHub:github.com/zakalawe/osg.git \
    --component-branch OSG=fgfs-342-1 SIMGEAR FGFS DATA OSG
2022-12-15 22:18:12 +01:00
Florent Rougon
aa17379ae0 download_and_compile.sh: simplify the definition of _usage() 2022-12-15 22:17:42 +01:00
Florent Rougon
5e71ae60fe download_and_compile.sh: minor change to the --help output
Amend wording to avoid confusion (some people interpret "latest release"
as meaning "development branch"; use "latest stable release" to avoid
this confusion).
2022-12-05 18:23:07 +01:00
Florent Rougon
7469b39cad download_and_compile.sh: changes to the generated scripts
The first goal of this commit was to ensure that the LD_LIBRARY_PATH
setting performed in some of the generated scripts uses absolute paths,
otherwise if a process (such as ctest) changes the current directory
before starting an executable that needs our LD_LIBRARY_PATH setting, we
can have problems (thanks to Patrick Callahan for the report).

Some refactoring of the automated script generation plus a few other
fixes concerning these scripts were done along the way (use here
documents for better readability; don't use 'echo' with options as this
is non-portable; etc.).
2022-11-30 22:13:25 +01:00
Florent Rougon
1e65f0e144 download_and_compile.sh: little optimization 2022-11-25 09:56:14 +01:00
Florent Rougon
14e27756b1 download_and_compile.sh: new generated wrapper script named 'run'
This new script is created by download_and_compile.sh in the same way as
run_fgfs.sh and friends. It changes the current directory to $d/install,
where $d is the directory containing the 'run' script. Then it sets
LD_LIBRARY_PATH in the same way as run_fgfs.sh. Finally, it runs the
command formed of all arguments passed to it.

This can be used for instance to run SimGear tests with the proper
LD_LIBRARY_PATH setting: assuming SimGear has been built by
download_and_compile.sh and you are in the directory from which
download_and_compile.sh was run, you can do:

  cd build/simgear
  ../../run ctest --output-on-failure
2022-11-25 09:03:50 +01:00
Florent Rougon
11949b1e8e download_and_compile.sh: add core file support to run_fgfs_debug.sh
Usage of run_fgfs_debug.sh is slightly changed: you now need to put a
'--' argument before all arguments that you want to pass to fgfs. For
instance:

  ./run_fgfs_debug.sh -- --aircraft=ufo --airport=PMDY

There is also a new option: -c, alias --core-file. This option allows
one to start gdb from an existing fgfs core dump, with appropriate
LD_LIBRARY_PATH setting and --directory options; in this case, don't
specify any fgfs argument (the fgfs arguments used when the core file
was produced have been recorded therein). Example:

  ./run_fgfs_debug.sh -c /path/to/core

All this is documented with './run_fgfs_debug.sh --help'.
2022-11-25 00:38:21 +01:00
Florent Rougon
0ee880c5dc download_and_compile.sh: install libqt5quick5 if available
This should solve a bug where some launcher icons aren't displayed
properly. So far, we had an optional dependency on qml-module-qtquick2,
which depends on libqt5quick5 or libqt5quick5-gles, however only the
former ensures a proper display in the built-in launcher (when
libqt5quick5-gles is installed instead of libqt5quick5, users see black
squares instead of the icons on the left).
2022-10-23 10:08:13 +02:00
Stuart Buchanan
50fd23d72c Include more railway features, don't add tunnels
From mespieler.

8333805787116b9d5cbc91b67f2a6b9bac4922b1
2022-09-25 18:32:25 +01:00
James Hogan
8966dcd737
Windows: Install openxr_loader.dll
Add openxr_loader.dll to the list of 3rd party DLLs that need
installing. The OpenXR loader is now included in windows-3rd-party,
allowing VR support to be enabled, which requires this file.
2022-08-19 23:42:28 +01:00
Stuart Buchanan
382747c2d1 WS30: Improved gencoastlines
Use Overpass API more effectively in 1x1 degree blocks,
using same technique as genroads.py
2022-05-28 20:42:43 +01:00
Automatic Release Builder
5b12f55c3f Add libevent to packaging list 2022-04-20 10:26:52 +01:00
Automatic Release Builder
d043edf9c5 macOS: update for correct libEvent version 2022-04-19 13:48:56 +01:00
Automatic Release Builder
969c2f9788 Add helper script to fix macOS libEvent packaging 2022-03-08 15:14:17 +00:00
Automatic Release Builder
c346526e1b Windows installer: don't copy compiler runtime 2022-02-08 10:30:27 +00:00
Florent Rougon
7bcff8eaf4 i18n.py: declare plural forms for the Turkish language
I'm not quite sure, but it seems to me that Qt Linguist treats the
Turkish language as having one "universal form". We need plural forms
for Turkish since FGData commit c0bb8d8a8d64e1 in branch
'release/2020.3' added a 'tr' translation.
2022-02-03 15:30:46 +01:00
Fahim Imaduddin Dalvi
4730d57d40 WS30: Updated Dockerfile with python scripts
The Dockerfile has been updated to include Python, ws30 line data
generation scripts and their dependencies.
2022-01-22 17:18:23 +03:00
Fahim Imaduddin Dalvi
f672e8451b WS30: Added python dependency requirements file for scripts 2022-01-22 16:25:06 +03:00
Automatic Release Builder
65f2c2e041 Tweak macOS OpenAL packaging 2022-01-07 11:12:56 +00:00
Automatic Release Builder
b1dd31e255 Mac: include OpenAL-soft in the bundle 2022-01-06 14:19:11 +00:00
Automatic Release Builder
9fa81a6ab8 Tweak Mac Jenkins script to optionally use OpenAL-soft 2022-01-06 14:15:51 +00:00
Julian Smith
52c0efedb7 download_and_compile.sh: also install ffmpeg libraries for video encoding support. 2021-12-27 10:31:47 +00:00
Stuart Buchanan
d7abbaa10f WS30: Improved road generation 2021-12-05 20:38:19 +00:00
Fahim Imaduddin Dalvi
f46f25dbaf Updated Dockerfile for more efficient builds.
We now use multi-stage builds so that the build-time dependencies and
code are not included in the final image. Also updated the README with
information about Docker hub, and added a LICENSE file.
2021-11-17 21:39:38 +03:00
Fahim Imaduddin Dalvi
54e68e949f Added Dockerfile for VPB terrain generator
Added a Dockerfile that can be used to build a docker/podman image with
the required environment for VPB terrain generator. A sample generation
script is also included.
2021-11-15 20:23:44 +03:00
Brendan Black
1be19e5f12 Account for differences between test vm & build vm
my test vm has some extra *.so library symlinks so some patchelf commands were failing on the jenkins build vm - this changes the patchelf command to catch all the possible copied libraries
2021-09-25 09:02:16 +02:00
Brendan Black
f135bd8f61 build_appimage.sh: run patchelf on libharfbuzz
run patchelf on libharfbuzz as manjaro needs it now (rolling distros...)
2021-09-24 08:50:40 +01:00
Brendan Black
e36c646caf fix for https://sourceforge.net/p/flightgear/codetickets/2651/
libfreetype 2.11 breaks compatibility with older harfbuzz that we are including to enable backwards compatibility with Ubuntu 16.04 based dists, so we now need to include libfontconfig & libpng15

In future for next we might  not bother with harfbuzz,fontconfig etc as we are compiling OSG with vendor neutral dispatch (libGLvnd) that the older Mesa in 16.04 doesn't support
2021-09-10 11:19:13 +01:00
Automatic Release Builder
61abd3e89e Add serializer plugins to Windows installer
This should enable WS30 support in nightly builds.
2021-09-02 13:41:19 +01:00
Jonas K
232699cb31 Add positional option "--exec-app=" to AppImage launch script
This option allows execution of any application stored in "/usr/bin" of the AppImage.
It has to be used as the first argument handed to the launch script.

Squashed commits:
- Add additional parameter checks and verify executability
- Print help when no value is passed to --exec-app
- Add all packaged executables as "additional executable" arguments to call of linuxdeployqt
  + Required dependencies of other applications will be deployed and library paths updated.
  * Update help text
  * Use find instead of ls to make file name handling robust (special chars, newlines, spaces)
- Modify find command to filter for executable files instead of using find's "-executable" option
  Previously find failed to filter for executable files only when the AppImage was executed.
  When the was AppImage mounted, "ls -al" showed that the file "usr/bin/qt.conf" was not executable.
  However, when executing "find usr/bin/ -type f -executable" the file "usr/bin/qt.conf" still showed up.
  Executing the same find command on the not-mounted source appdir did not show the file.
  The change from "-executable" to logic ands/ors of "-user", "-group" and "-perm" fixes this behaviour.
  Additionally this commit does no longer add "fgfs" to the additional executables since it is the main executable and processed anyways.
- Update find command to properly check permissions
  Read permission and executability are required.
- Minor improvements for basename calls
  * Quotes around basename argument
  - Useless "basename" call
- Fix potential security flaw when matching application name input
  The matching of "/" was erroneous and allowed execution of binaries outside the AppImage's /usr/bin directory.
2021-08-31 11:04:41 +01:00
Florent Rougon
b42f543b93 i18n.py: print the problematic 'trans-unit' id when aborting
It's much easier to locate an error in a .XLF file when one has the id
of the 'trans-unit' element that causes the problem.
2021-08-04 00:07:55 +02:00
Automatic Release Builder
acd34fda78 Linuxdeployqt: Use -qmldir to define plugins
This should copy less stuff, and hopefully fix the reported error 
loading QtQuick Controls-2
2021-06-09 10:50:28 +01:00
Automatic Release Builder
7e26d650bc AppImage: default to launch, fix osgDB plugin loading
When no arguments are pased to the AppImage, start with
the launcher for a pleasant experience.

Adjust the RPath on our copied osgDB plugins, so that dependencies
are found at the bundled lib dir.
2021-06-07 16:54:16 +01:00
Automatic Release Builder
79ee40e885 Fix Ubuntu 16 / Mint 18 support: copy HarfBuzz
Need to include HarfBuzz in the image, which comes from /lib64 on our
build machine

Thanks to Brendan Black for tracking this down

Ticket-Id: https://sourceforge.net/p/flightgear/codetickets/2590/
2021-06-04 10:04:59 +01:00
James Turner
3bf94f7b61 AppImage: use stable 7 version of LinuxDeployQt 2021-05-24 15:46:43 +01:00
James Turner
32cb401c79 Windows: add osgdb_osgterrain loader to installer
Needed for WS3 testing
2021-05-21 09:17:28 +01:00
James Turner
4db42544d2 Fix for 64-bit only Windows build
Remove reference to OSG32 which is now empty
2021-05-20 14:00:09 +01:00
James Turner
9eafe4e274 AppImage: more tweaks to Linux build
Use RelWithDebInfo, switch to ninja, and fix the OSG-36 lib path
2021-05-20 09:31:45 +01:00
James Turner
178cdbe216 AppImage: switch to OSG 3.6.5 2021-05-19 10:16:01 +01:00
Automatic Release Builder
04587d3a39 Remove more files from the base package 2021-05-19 10:13:45 +01:00
Florent Rougon
aaf52f0628 download_and_compile.sh: accept qtchooser as an alternative to qt5-default
This should be more user-friendly, as qt5-default isn't part of recent
Debian/Ubuntu distros.

List discussion: https://sourceforge.net/p/flightgear/mailman/message/37281536/
2021-05-13 14:29:49 +02:00
Stuart Buchanan
bd01aad8e6 WS30 - Scenery features from OSM 2021-05-03 15:59:30 +01:00
Automatic Release Builder
8be5b2fc52 Update post-upload to support more file suffixes 2021-03-22 11:06:24 +00:00
Automatic Release Builder
6eae0403c1 Add this script so it doesn’t get lost 2021-03-22 11:04:05 +00:00
Automatic Release Builder
3d47c15feb Fix LibLZMA path 2021-03-18 15:50:00 +00:00
Florent Rougon
26c859fcbd git-date.py: minor changes
- Special-case Windows for the default config file location (this should
  allow the program to run even if HOME is unset).

- Improve the help text, in particular by reordering some of the
  options.
2021-03-11 21:01:37 +01:00
Florent Rougon
538e89be54 git-date.py: fix test for "no repository was specified"
Also perform miscellaneous minor formatting fixes.
2021-03-10 20:44:13 +01:00
Florent Rougon
b68dc80cb6 git-date.py: minor fix to the help text 2021-03-10 20:14:06 +01:00
Florent Rougon
d817865575 git-date.py: clarify the usage help text 2021-03-10 17:47:06 +01:00
Florent Rougon
d0f4f363d2 Add script git-date.py in directory 'dev-utils'
This script allows one to easily find commits in several Git
repositories around a given date (in any date format accepted by Git).
The repositories may be given labels for easier identification and can
be defined via a configuration file and/or the command-line arguments.

Option --checkout tells git-date.py to automatically perform a
'git checkout' in each of the repositories at the commits that were
found. Options --show-commits and --show-commits-option instruct it to
run 'git show' for each commit found with the options of your choice
(all options can also be set via a configuration file).

This script can be useful to find when a given regression happened in
FlightGear---or any project that makes use of several Git repositories.
For more details, run 'git-date.py --help'.
2021-03-10 17:12:47 +01:00
Automatic Release Builder
53a0c9cc2e Don't wipe all of output/, only data TXZs
Otherwise we wipe source tarballs created by the build script.
2021-02-17 11:04:57 +00:00
Automatic Release Builder
27475c599f Alternate syntax for older Git on Jenkins 2021-02-17 10:35:25 +00:00
Automatic Release Builder
b8bc8301f9 Fix Windows installer to add libLZMA.dll 2021-02-12 22:29:09 +00:00
Automatic Release Builder
411823a24d Add script to create base package and update TXZ 2021-02-12 22:28:52 +00:00
Slawek Mikula
799633854b - build_release_windows.bat - fix for creating InstallConfig.iss file 2021-02-11 21:24:05 +00:00
Slawek Mikula
2b0b734160 - #2524 - fix of FlightGear-files.iss include (after defines) 2021-02-11 15:22:46 +00:00
Slawek Mikula
1b2b8da12f - setupimg.bmp - new last page screen 2021-02-10 14:32:23 +00:00
Slawek Mikula
4e1d247ce3 - info-before-en.txt, info-before-pl.txt - EN/PL information before installation - unstable
- FlightGear-files.iss - removed commented-out files
- FlightGear.iss - add InfoBeforeFile for EN/PL languages
2021-02-10 14:32:23 +00:00
Slawek Mikula
136ef74759 - #2524 - removed unused script (don't know where it comes from :)) 2021-02-10 14:32:23 +00:00
Slawek Mikula
bfe6b6b925 - #2524 - ported changes from release installer to next branch (
split section of ISS installer, additional translated string,
files from flightgear source, removed antivirus message)
2021-02-10 14:32:23 +00:00
Slawek Mikula
7deb727a90 - #2244 - german translations 2021-02-10 14:32:23 +00:00
Slawek Mikula
68f0c9ee74 - #2244 - added spanish & dutch translations 2021-02-10 14:32:23 +00:00
Slawek Mikula
01a6208fa7 - #2244 - added some info about uninstall procedure inside fgfs.exe
(cherry picked from commit af8e8ffb800f8ac02f43bfeb517721f6c2038e80)
2021-02-10 14:25:07 +00:00
Slawek Mikula
fd93c81fbb - #2244 - i18n for windows installer
- build_release_windows.bat - add code to parse FGVersion and provide FGVersionGroup (major.minor) text
 - FlightGear.iss - extend docs, use FGHarnessDir to exclude direct drive mapping, use FGVersionGroup for installer marking, add i18n (en/pl) with custom messages, use %USERPROFILE instead of {userdocs} for additional folders

(cherry picked from commit 5da03d6ae9412afd53452c4e04fb33ca2fe36249)
2021-02-10 14:24:53 +00:00
Automatic Release Builder
4ad749a481 Update catalog compatability versions
Ensure the stable 2020 is only used for the LTS, and
trunk is used for 2020.4 / next
2021-01-24 15:34:20 +00:00
James Turner
0cf47573fb Add LibLZMA to installers
- Windows .ISS script
- AppImage .so copy list
- manual copy on macOS DMG building
2021-01-10 12:02:40 +00:00
Florent Rougon
79642b4d29 download_and_compile.sh: add dependency liblzma-dev for SIMGEAR 2021-01-09 18:53:58 +01:00
Automatic Release Builder
273927d40a Stable 2020 catalog: remove 2020.4 support 2020-12-14 14:30:41 +00:00
Automatic Release Builder
979d8f051e macOS: include osgTerrain in packaging 2020-11-29 16:11:12 +00:00
Automatic Release Builder
c24e3c2aac Fix typo in Windows build .bat 2020-11-21 16:03:31 +00:00
Florent Rougon
fa9550e5e7 download_and_compile.sh: don't install OSG or plib packages if these are built
If the OSG component has been specified, don't attempt to install a
libopenscenegraph...-dev package from the distro. Ditto for the
libplib-dev package when the PLIB component has been specified.
2020-11-16 21:24:07 +01:00
Automatic Release Builder
b11dab8c30 Windows: remove compositor from build script 2020-11-16 18:36:31 +00:00
Florent Rougon
4a82d5e8bc download_and_compile.sh: qml-module-qtquick-controls2 for everything but --old-lts
Require qml-module-qtquick-controls2 when building 'next', or using -s,
or --lts.
2020-11-16 15:06:09 +01:00
legoboyvdlp R
444e8c0338 Add osgTerrain to the Windows install 2020-11-15 09:33:58 +00:00
Florent Rougon
c6dde7ecc5 download_and_compile.sh: make --lts use release/2020.3 and add --old-lts
For SimGear, FlightGear and FGData (i.e., the SIMGEAR, FGFS and DATA
components in download_and_compile.sh-speak), option --lts now means
release/2020.3 and the new option --old-lts means release/2018.3.
2020-11-14 19:08:15 +01:00
Brendan Black
4b45f4224e cp libfreebl* crypto libs so ubuntu 20.10 works 2020-10-28 15:11:57 +00:00
Automatic Release Builder
eea397ed85 Make set-version.sh handle new naming
Now we renamed simgear-version and flightgear-version, this
script needed to get smarter.
2020-10-26 10:09:44 +00:00
Automatic Release Builder
b8a7bf3104 Catalogs: add 2018 -> 2020 migration information 2020-10-25 18:08:44 +00:00
James Turner
00d4c6ec93 Re-enable Ibiblio in update-catalogs.sh 2020-10-22 12:59:24 +00:00
Automatic Release Builder
6435bcbf4f FGAddon trunk catalog: update version options
Mark the trunk catalog as compatible with 2020.4, and remove older
versions from the compat list.
2020-10-22 13:56:38 +01:00
Florent Rougon
c731caa23d download_and_compile.sh: rename --sg-cmake-args to --sg-cmake-arg and --fg-cmake-args to --fg-cmake-arg
This is more logical this way, since every use of such an option
specifies exactly *one* additional argument to pass to CMake.
2020-10-20 10:29:41 +02:00
Florent Rougon
2618144e24 download_and_compile.sh: add support for --sg-cmake-args and --fg-cmake-args
Each of these options may be passed multiple times. The advantage over
the previous interface (environment variables SG_CMAKEARGS and
FG_CMAKEARGS) is that the new interface allows one to pass arguments
containing spaces to CMake, for instance:

  --sg-cmake-args='-DCMAKE_CXX_FLAGS=-Wno-deprecated-declarations -Wall'

(the single quotes here would be interpreted by the user's shell, and
removed before download_and_compile.sh can see them). Setting the
environment variables SG_CMAKEARGS and FG_CMAKEARGS should still work as
before but is now deprecated.

The implementation uses Bash arrays named SG_CMAKE_ARGS and
FG_CMAKE_ARGS, but in order to avoid confusing users about the
deprecated variable names, the log file continues to print
'SG_CMAKEARGS=...' and 'FG_CMAKEARGS=...' (note the different use of
underscores in the names).
2020-10-20 01:39:27 +02:00
Automatic Release Builder
90f951a899 Update VS version for nightly Windows builds
Disable 32-bit builds for the moment.
2020-10-15 12:22:11 +01:00
Automatic Release Builder
ebaa83c483 Update version information 2020-10-13 22:46:05 +01:00
Stuart Buchanan
c2223d4deb Better stats for aircraft_updates.py and set exec 2020-10-13 19:17:34 +01:00
Stuart Buchanan
0472d9483c fgaddon utilities
aircraft_updates.py - list updated aircraft in fgaddon between two date
points.  Useful for release notes.

find_md5file.py - identify identical files based on md5sum.  Useful
for finding license infringement.
2020-10-11 20:21:51 +01:00
James Turner
b86121be85 Add catalog update script
Ensure this doesn't get lost, it's nothing magic but helps
to document+capture what the server is doing, in case
someone needs to replicate it.
2020-09-21 10:16:09 +00:00
James Turner
c5032d816b Fix output path for 2020 stable catalog 2020-09-21 08:33:55 +00:00
Automatic Release Builder
8d558e636a Fix paths for SVN branch 2020-09-19 21:43:42 +01:00
Automatic Release Builder
ebcf07ddaa Ignore catalog md5 sums data 2020-09-19 21:42:46 +01:00
Automatic Release Builder
d6cf56a465 Add 2020 FGaddon catalog 2020-09-19 21:36:21 +01:00
Automatic Release Builder
7d75f46d2c Build_appImage tweaks 2020-09-18 10:46:03 +01:00
Automatic Release Builder
1a76b92300 Fix build_appimage permissions 2020-09-16 13:14:00 +01:00
Florent Rougon
56ae978017 download_and_compile.sh: allow '_', '-' and '.' in usernames
With this commit, option --git-clone-site-params accepts '_', '-' and
'.' in usernames. Thanks to Keith Paterson for the report.
2020-09-02 11:06:05 +02:00
James Turner
bbf956b518 Downloads scripts 2020-08-24 06:43:00 -04:00
Florent Rougon
e78b239597 download_and_compile.sh: require qml-module-qtquick-controls2 when building next 2020-07-14 12:32:27 +02:00
Julian Smith
754b347d7c Cope with renamed version => flightgear-version file. 2020-07-04 09:02:27 +01:00
Florent Rougon
cf95fc3530 download_and_compile.sh: more reliable test in _gitDownload()
Before this change, using OSG with download_and_compile.sh several times
in the same directory would fail because the upstream repo for OSG has
none of README, README.txt and README.rst at top-level (it has a
README.md). Testing for the .git dir is definitely more reliable.
2020-07-03 14:21:05 +02:00
Florent Rougon
25d9d717b5 download_and_compile.sh: no component and only --cleanup -> only do cleanup
If --cleanup is used and no component has been specified on the command
line, run the cleanup routine but don't process any component: no
download, no compilation, no installation. Previously(*), this used to
process the default set of components: SIMGEAR FGFS and DATA.

Therefore, if all you want to do is to remove compiled and installed
files, you can now run:

  download_and_compile.sh --cleanup

(*) During less than 24 hours, as --cleanup was added yesterday.
2020-06-30 15:11:02 +02:00
Florent Rougon
aa563cb5cb download_and_compile.sh: refactoring
Move several chunks of code to their own function. This will make the
code easier to follow when largish chunks are executed only under
certain conditions.

Minor changes unrelated to the refactoring:
  - make _logSep print a larger separator (78 chars);
  - write the SELECTED_SUITE at the top of the log file.
2020-06-30 15:11:02 +02:00
Automatic Release Builder
43082ed65b Add AppImage creation script by Brendan Black
Not fully tested yet but want to get this on Jenkins to see how it
goes.
2020-06-30 11:31:44 +01:00
Florent Rougon
9f710a8c84 download_and_compile.sh: add safety net in _cleanup()
Make sure $INSTALL_DIR is really a harmless 'install' directory before
calling 'rm -rf' on it.
2020-06-29 16:07:09 +02:00
Florent Rougon
3099633675 download_and_compile.sh: fix the order of operations in _gitUpdate()
_gitUpdate() used to call 'git pull' then 'git checkout'. If the latter
command really did a branch switch, this could leave the local branch
behind its remote counterpart (that was hopefully fetched by the
'git pull'). From now on, we do:

  git fetch origin
  git checkout --force "$branch"
  git pull --rebase

(the --force option was already there before in the form of -f). This
way, we can be sure that the local branch we check out is up-to-date
when the function returns.

Also replace short options by long ones for better readability of the
code, and use Bash's [[ ... ]] conditional construct instead of [ ... ]
for more efficiency---I think.

Note: 'git stash save' is documented as deprecated in favor of
      'git stash push', however the latter appears to have been
      introduced in 2017, therefore I believe it is too early to use it
      in download_and_compile.sh.
2020-06-29 15:23:53 +02:00
Florent Rougon
21c13c0886 download_and_compile.sh: add option --cleanup
This option recursively deletes build and install directories, but
preserves FGData if present (FGData is in
<base_dir>/install/flightgear/fgdata, hence the need to take special
care of it).

There is currently no way to trigger this cleanup routine whithout
pretending to act on at least one component, since "no components
specified" implies "SIMGEAR FGFS DATA". That said, using -pn -dn -rn -cn
with one of the components you already have should be close enough to
"only do the cleanup".
2020-06-29 14:23:18 +02:00
Florent Rougon
0972e57a5b download_and_compile.sh: use the set_ld_library_path variable
This improves readability a little bit. set_ld_library_path was defined
but unused since commit a5e4c47f. Note that this variable must be set
*after* the OpenBSD-specific code block because its definition relies on
the value of 'paths', which is modified in said block.
2020-06-23 19:22:45 +02:00
Florent Rougon
3bce994ea8 download_and_compile.sh: prompt when building 'next' and logfile not already present
This ensures that users building 'next' have seen the message that warns
about possible instability and are aware of the other options (--lts for
the latest Long Term Support release, -s for the latest release).

The default answer is to continue. If --non-interactive has been given,
the prompt is skipped and download_and_compile.sh proceeds as usual.

This commit also adds _yes_no_prompt() which makes more sense than
_yes_no_quit_prompt() here, since the 'no' answer implies that the user
wants to quit.
2020-06-23 11:10:25 +02:00
Florent Rougon
fdf98d0ef3 download_and_compile.sh: consistent indentation for long options in _usage() 2020-06-22 20:38:47 +02:00
Florent Rougon
041dc98c9c download_and_compile.sh: don't hardcode the address of the FG repo
When doing the 'git ls-remote' request to find the latest FG release,
d&c was using a hardcoded address for the FG repo. Use
${REPO_ADDRESS[FGFS]} instead.
2020-06-22 20:05:26 +02:00
Florent Rougon
1f3f4ea353 download_and_compile.sh: only print COMPONENT_BRANCH[foo]=bar for built components
Only those components present in WHATTOBUILD are really interesting when
printing and logging COMPONENT_BRANCH[foo]=bar. Inter-component deps are
taken into account before doing that, since they may add components to
WHATTOBUILD.
2020-06-22 19:13:58 +02:00
Florent Rougon
c4c8f0a099 download_and_compile.sh: add options --lts and --component-branch
Option --lts builds the latest LTS release of components SIMGEAR, FGFS
and DATA. The presence of option -s or --lts affects the version or
branch checked out for each component; however, passing none of these
options doesn't imply that development versions will be used for
everything---this selects development versions for FlightGear and
possibly closely-related software, but for the rest, we aim at something
reasonably usable, as in "current release".

For each component, the default version selected depending on whether
-s, --lts or none of these was given, can be overridden using
'--component-branch COMPONENT=BRANCH' (without the quotes). For
instance:

  download_and_compile.sh --lts \
    --component-branch OSG=OpenSceneGraph-3.6 SIMGEAR FGFS DATA OSG

will build the latest LTS release of FlightGear against the
OpenSceneGraph-3.6 branch of OpenSceneGraph. Option --component-branch
may be used several times and always overrides the defaults determined
by the presence or absence of -s or -lts. Thus, the relative order of
-s, --lts and --component-branch options does not matter.

This commit also adds text to the standard output and log file that
tells users:
  - which "suite" they have selected (default=next, -s or --lts) and
    what this implies;
  - which branch will be checked out for each component (i.e., after
    the overrides from all --component-branch options passed have been
    applied).

It is nonsensical to provide both -s and --lts in the same invocation,
but the last one wins.
2020-06-22 18:26:39 +02:00
Automatic Release Builder
28de5426f2 Localized catalogs: fix name/description bug 2020-06-22 10:02:40 +01:00
Florent Rougon
e105274de4 Update catalog/README.md (and fix a typo) 2020-06-22 00:41:05 +02:00
Florent Rougon
8028ce2888 Python: move test modules and data to python3-flightgear/flightgear/meta/tests/
- Move test_catalog.py, test_sgprops.py and catalog/testData/ to
  python3-flightgear/flightgear/meta/tests/.
- Copy catalog/fgaddon-catalog/ to the same place (it is needed by
  test_catalog.py).
- Adapt test_catalog.py and test_sgprops.py accordingly.
- Remove the executable bits from test_catalog.py and test_sgprops.py:
  this is because test_catalog.py can't be run directly anymore; well,
  it can but 3 tests would fail in this setup. No time to investigate
  why (sorry), but this commit adds a README.txt in
  python3-flightgear/flightgear/meta/tests/README.txt that explains how
  to run the tests in a way that works (basically, run
  'python3 -m unittest' from the python3-flightgear directory).

For a bit more context, see
<https://sourceforge.net/p/flightgear/mailman/message/37042247/>.
2020-06-22 00:30:51 +02:00
Automatic Release Builder
cef19a8b13 Catalog I18N support
Read I18N satrings form aircraft data and add to the catalog
2020-06-21 19:25:18 +01:00
Florent Rougon
3a36bdd474 i18n: move the scripts to the top-level 'i18n' directory
Also add a README.md to python3-flightgear explaining how to use the
PYTHONPATH environment variable or a .pth file in order to run the
Python scripts in FGMeta, and pointing to the top-level directories
'catalog' and 'i18n'.
2020-06-19 18:26:43 +02:00
Florent Rougon
b86452cf08 fg-copy-weather-scenarios-to-default-locale: adjust the sgprops import 2020-06-19 18:15:30 +02:00
Florent Rougon
1c2d17d869 Reorganize catalog modules
- Move the support modules inside python3-flightgear/flightgear/ and
  remove their shebang, if any.
- Accordingly adapt the import statements.
- Change shebangs from e.g. '#! /usr/bin/python' to
  '#! /usr/bin/env python3'.
- Small changes to make Python 3 happy with all scripts.

catalog/check_aircraft.py should be run under Python 3 from now on.
2020-06-19 18:15:25 +02:00
Florent Rougon
d259ec0b76 i18n Python scripts: improve fg-copy-weather-scenarios-to-default-locale
- Use the new flightgear.meta.strutils.simplify() function.
- Automatically add a comment to the generated file to indicate that it
  was automatically generated and shouldn't be manually modified, etc.
- Improve error handling: abort with a clear error message if any of the
  'id', 'name' and 'desc' children of a 'scenario' element is
  problematic (empty or missing, for instance).
- Rename make_xml_leaf() to makeXmlLeaf() + other minor renaming.
2020-06-18 14:23:03 +02:00
Florent Rougon
52e84741d0 i18n Python scripts: add module flightgear.meta.strutils
For now, the module only contains the simplify() function, which will be
used by fg-copy-weather-scenarios-to-default-locale.
2020-06-18 14:22:57 +02:00
Automatic Release Builder
c2a241c357 Review feedback from Florent 2020-06-18 10:16:06 +01:00
Florent Rougon
120d02e5fb i18n Python scripts: rename BasicL10NResourceManager._readFgResourceFile()
Class method BasicL10NResourceManager._readFgResourceFile() was not
meant to be private; remove the leading underscore.
2020-06-18 01:06:37 +02:00
Florent Rougon
14eb302022 i18n Python scripts: fix a typo in TranslationUnit._stringsKey()
I believe the problematic code could only be reached when reading buggy
versions (i.e., with duplicate ids) of the legacy FlightGear XML
non-master l10n files, which is why we haven't tripped on it so far.
2020-06-18 00:56:37 +02:00
Automatic Release Builder
d502afa171 Add weather-scenarios to i18n list 2020-06-17 17:08:50 +01:00
Automatic Release Builder
14b3950d44 Script to create default translation for weather 2020-06-17 17:03:25 +01:00
Florent Rougon
eabc8534b0 i18n Python scripts: define the list of basic categories at the top
Introduce a BASIC_CATEGORIES variable at the top of
python3-flightgear/flightgear/meta/i18n.py that lists all categories
handled by BasicL10NResourceManager. Since currently all of our
translation files can be handled this way (the XML master files all have
a flat structure), we only need to say BASIC_CATEGORIES = CATEGORIES.

With this change, adding a new basic category such as
'weather-scenarios' only requires one to add it to CATEGORIES.
2020-06-17 13:12:31 +02:00
Automatic Release Builder
a80917705d Update trunk FGaddon catalog metadata
Ensure next is usable for trunk FGaddon.
2020-06-16 12:54:11 +01:00
Automatic Release Builder
e92948a44e track submodule changes for release 2020-06-15 12:33:58 +01:00
Automatic Release Builder
fd2b26a975 new version: 2020.3.0 2020-06-15 12:33:58 +01:00
Automatic Release Builder
40b6272570 new version: 2020.2.1 2020-06-15 12:33:58 +01:00
Automatic Release Builder
a82e6f7f6b Adjust for new LTS release 2020-06-15 12:33:20 +01:00
legoboyvdlp R
e34d02edbc Windows install: re-add js_demo.exe
The former is an advanced configuration tool for users' joysticks.
2020-05-25 09:26:12 +01:00
Florent Rougon
3810a31230 download_and_compile.sh: improve user-interaction
Since the prompt is repeated by _yes_no_quit_prompt() every time an
invalid answer is given, a short sentence is better than the empty
string.
2020-05-24 16:31:26 +02:00
Florent Rougon
00710497b0 download_and_compile.sh: add missing quoting
This is needed because $answer will be empty in case the default $2 is
empty and the user hits Enter at the prompt.
2020-05-24 11:39:27 +02:00
Florent Rougon
420034d5b5 download_and_compile.sh: make initial cloning of FGData easy and secure
Because cloning FGData from SourceForge using https does not work (this
has been the case for *years*) whereas normal updates of an existing
clone do work, and so does cloning the repository from its official
GitLab mirror using https, this commits implements a special case in
_gitDownload():

  If the assembled clone URL is
  <https://git.code.sf.net/p/flightgear/fgdata>, then ask the user if he
  agrees to automatically clone FGData from GitLab and arrange the
  repository setup to fetch subsequent updates from SourceForge. This
  should be fine because <https://gitlab.com/flightgear/fgdata> is an
  official mirror of FGData. The default answer is thus to do so. It is
  automatically chosen when download_and_compile.sh is called with
  --non-interactive (new option).

This implies that the initial use of download_and_compile.sh is again as
easy as subsequent ones.

This commits also adds the utility function _yes_no_quit_prompt() to
repeatedly ask a question ($1) until a valid answer has been provided.
The function automatically uses the default answer ($2) if
--non-interactive has been passed to download_and_compile.sh. See the
“discussion” at
<https://sourceforge.net/p/flightgear/mailman/message/37017469/>.
2020-05-24 11:14:36 +02:00
Florent Rougon
b3893f7bda i18n Python scripts: allow autodetection of translation files
- Add class method availableTranslations() to AbstractFormatHandler in
  i18n.py.

- Use it in fg-update-translation-files to allow autodetection of the
  available translations when no LANGUAGE_CODE is passed to
  fg-update-translation-files.

This should address James' wish at
<https://sourceforge.net/p/flightgear/mailman/message/37003967/>.
2020-05-08 10:33:35 +02:00
James Turner
4e28b88c22 Windows: fixes for compositor builds 2020-05-03 19:02:26 +01:00
Florent Rougon
fa0dcb5d4d download_and_compile.sh: add libssl-dev as mandatory dep for CMake
Unless SSL support is turned off, libssl-dev is needed to build CMake.
Thanks to Jeff Davis for the report.
2020-05-01 17:39:46 +02:00
James Turner
819074136a Re-enable ‘full-fat’ nightlies for macOS
May need to tweak the bundle IDs for notarization, let’s see.
2020-05-01 12:00:59 +01:00
James Turner
03ac46120c Windows: remove erroneous space breaking build
This was causing to pick the second prefix path as the source dir,
which doesn’t work so well.
2020-05-01 08:46:49 +01:00
James Turner
cc76052038 Trunk FGAddon hangar: support 2020.* versions 2020-04-29 14:58:14 +01:00
legoboyvdlp R
3f38a3cf18 Add support for compositor to windows builds 2020-04-29 08:37:50 +01:00
James Turner
1c7dcaf5d5 macOS: package libSentry 2020-04-29 08:32:15 +01:00
James Turner
dbdfc52a00 Adjust release script 2020-04-27 09:31:38 +01:00
James Turner
d4489091e2 track submodule changes for release 2020-04-27 09:30:09 +01:00
James Turner
6fa2edf9d5 new version: 2020.2.0 2020-04-27 09:30:08 +01:00
James Turner
6e608907b4 new version: 2020.1.1 2020-04-27 09:30:08 +01:00
Florent Rougon
ac504c70a2 download_and_compile.sh: fix typo in help text 2020-04-25 11:17:56 +02:00
Florent Rougon
2bb86ee6ea download_and_compile.sh: update address and branch for CMake
- The old URL for CMake's Git repository doesn't support https anymore;
  update it to match the one given at <https://cmake.org/>.

- Build the 'release' branch rather than 'master':
  download_and_compile.sh is not meant for CMake hackers!
2020-04-25 11:17:56 +02:00
James Turner
a02dc9aad6 Window: update installer script for Sentry
Replace CrashRpt DLL and uploader with the corresponding ones for the
Sentry-native API.
2020-04-18 19:54:00 +01:00
Florent Rougon
69033f37f8 i18n Python scripts: declare plural forms for Catalan and Slovak
Regarding Slovak language, there was enough info in
<https://code.qt.io/cgit/qt/qttools.git/tree/src/linguist/shared/numerus.cpp>.
As for Catalan, I don't see anything there, so I put
"ca": ["singular", "plural"] based on the fact that [1] says:

  "Catalan has an inflectional grammar. Nouns have two genders
   (masculine, feminine), and two numbers (singular, plural)."

I suspect we'll be ahead of Qt Linguist for Catalan.

[1] https://en.wikipedia.org/wiki/Catalan_language
2020-04-15 11:40:26 +02:00
James Turner
aa7770911b Revert "macOS: remove use of Ninja for now"
This reverts commit b954ad8cd7.
2020-04-11 16:38:43 +01:00
James Turner
b954ad8cd7 macOS: remove use of Ninja for now
For some reason the slave doesn’t like Ninja, let’s disable it until
I figure out why.
2020-04-10 12:07:04 +01:00
James Turner
9158b1688e Update macoS/Win build scripts for symbol uploading 2020-04-08 16:14:38 +01:00
James Turner
9effd91f62 macOS: Use different bundle identifiers for nightly builds
Also switch so nightly builds are always ‘lite’ (not full) to save
bandwidth / computational load on Jenkins
2020-04-02 22:21:20 +01:00
James Turner
0ddf75b382 Copy Swift libraries on macOS 2020-03-30 13:32:57 +01:00
Julian Smith
a2eb0d7b4c download_and_compile.sh: added --compositor option. 2020-03-24 22:21:01 +00:00
James Turner
14ee759409 Fix Python3 compatability 2020-03-24 14:27:27 +00:00
James Turner
aff1ac0f69 Add more catalog tags based on what’s used 2020-03-24 14:24:29 +00:00
James Turner
9453e085b3 Add Mespieler aircraft mirror 2020-03-21 18:41:45 +00:00
James Turner
da4cf552cb Bugfix, missed $ on global variable 2020-03-18 12:41:42 +00:00
James Turner
91e0f86a0b macOS: code-signing changes 2020-03-17 16:33:27 +00:00
James Turner
aae488794e Notarization support in macOS packaging scripts 2020-03-13 16:59:14 +00:00
Edward d'Auvergne
4dffeeb56e Catalogs: Addition of an initial README.md file. 2019-11-18 11:23:27 +01:00
Edward d'Auvergne
ed7075f4ba Catalogs: Python 3 compatibility for reading binary data.
IO data needs to be decoded, and the binary zip file needs to be opened in 'rb'
binary mode.
2019-11-18 10:26:40 +01:00
Edward d'Auvergne
185a10f7c5 Catalogs: Python3 does not have a 'long' integer type. 2019-11-18 10:10:22 +01:00
Edward d'Auvergne
5d3fcd3ba0 Catalogs: Converted all print statements into Python 3 compatible functions. 2019-11-18 10:06:24 +01:00
Edward d'Auvergne
3b1a3c51b1 Catalogs: Default to Python 3. 2019-11-18 09:58:58 +01:00
Edward d'Auvergne
ea18939738 Catalogs: Addition of example configuration files for testing a single craft.
This is useful for aircraft authors to see what will be packed into the zip
archive.
2019-11-14 12:00:02 +01:00
Edward d'Auvergne
d22ff42e42 Catalogs: The scm <update> XML tag is now used.
The tag can be overridden on the command line with the --update and --no-update options.
2019-11-14 11:59:56 +01:00
Edward d'Auvergne
190d789a54 Catalogs: Support for <include> tags to allow a subset of craft to be cataloged. 2019-11-13 22:26:11 +01:00
Edward d'Auvergne
8534a8aba4 Catalogs: Modification of the template file parsing.
The code is now a function in the 'catalog' module and checks for the existence
of the file are now performed.
2019-11-13 22:26:11 +01:00
Edward d'Auvergne
9ec3e015b2 Catalogs: Modification of the configuration file parsing.
The code is now a function in the 'catalog' module and checks for the existence
of the file are now performed.
2019-11-13 22:26:10 +01:00
Edward d'Auvergne
b8c05410e3 Catalogs: Rewrite of the craft zip creation using the Python zipfile module.
If a 'zip-excludes.lst' file is found in the craft's base directory, that will
overwrite the global catalog exclusion list.

Three new unit tests have been created to test the functionality.
2019-11-13 22:25:49 +01:00
Edward d'Auvergne
fd6fae3858 Catalogs: Expansion of the zip archive exclusion file.
This includes addition of the craft development directories 'dev', 'Dev',
'development', 'src', and 'Resources' and handling the common compressed gimp
file *.xcf.gz, a capitalised gimp file, and Blender *.blend[1-9] files.
2019-11-13 22:18:43 +01:00
Edward d'Auvergne
ca4a2ca813 Catalogs: Bug fixes allowing the unit tests to pass again.
3 of the tests have been broken since 70dfd6b8d4,
the change to LXML.
2019-11-12 14:26:24 +01:00
Torsten Dreyer
da0d245685 Script to create the scenery pack 2019-11-06 13:51:41 +01:00
Scott Giese
e0568f4f63 Final 'white text' version 2019-09-29 22:41:01 -05:00
Scott Giese
f61d0d35bd Add option for white text fix. 2019-09-29 17:50:58 -05:00
Scott Giese
61fbe94ee2 [fg-from-scratch] curl_debug library 2019-09-21 11:55:29 -05:00
Scott Giese
523fe108be [fg-from-scratch] PLIB and debug modules 2019-09-21 11:12:11 -05:00
Scott Giese
23e6b50aa9 [fg-from-scratch] improved SimGear options 2019-09-21 10:21:14 -05:00
Scott Giese
22337b2bdb [fg-from-scratch] improve FG and TG options 2019-09-19 19:58:26 -05:00
Scott Giese
b38a53490c [fg-from-scratch] improve SimGear options 2019-09-18 23:13:53 -05:00
Scott Giese
326dd6e11d [fg-from-scratch] improve OSG build options 2019-09-18 22:33:33 -05:00
Scott Giese
40e5af8d57 VS2019 defaults to x64 2019-09-17 20:37:46 -05:00
Scott Giese
eea7bac1e8 [fg-from-scratch]
Auto detect Qt5 install path
Auto detect latest VS version
Upgrade to OSG 3.6
Organize folder structure
2019-09-16 23:50:35 -05:00
Julian Smith
a5e4c47f1d download_and_compile.sh: improved generation of run_fgfs*.sh scripts.
Use common code for run_fgfs.sh and run_fgfs_debug.sh. If OpenBSD, also add a
ulimit -d command to increase data segment size.
2019-09-04 13:35:30 +01:00
Julian Smith
9804df24a1 download_and_compile.sh: Added support for building fgfs on OpenBSD.
Added support for building zlib, because current openbsd-6.5's zlib is too old.

If OpenBSD:
    Default to not attempting to update or download packages - for now packages
    have to be installed manually with pkg_add.

    Use gnugetopt.

    Use ZLIB build for simgear and fgfs.

    For fgfs, use -DENABLE_QT=OFF -DENABLE_FGCOM=OFF.

    For run_fgfs_debug.sh, use egdb because default gdb is too old.
2019-09-04 13:34:27 +01:00
Florent Rougon
bad115cac0 download_and_compile.sh: add libopenal-dev as mandatory dependency of SimGear
Thanks to Clm76 for the report.
2019-07-06 12:19:42 +02:00
Florent Rougon
696829a260 download_and_compile.sh: add optional dependency on libevent-dev
This is needed for swift support (thanks to wkitty42 for the report).
2019-05-25 21:28:36 +02:00
James Turner
09cc52296d Put compositor back off for now
Need to figure out a way to handle it as another binary build, since
there is no runtime configuration option.
2019-05-24 13:55:59 +01:00
James Turner
abc616b548 Enable Swift in nightly builds 2019-05-24 09:31:51 +01:00
James Turner
c3b9b9a524 Enable compositor in nightly builds 2019-05-23 12:38:02 +01:00
James Turner
2277ba38c7 Fix a typo in DBus installer spec 2019-05-23 11:02:10 +01:00
Lars Toenning
97a72b4934 Add swift dlls to installer script 2019-05-17 10:54:29 +02:00
Florent Rougon
ecd4b9aab3 download_and_compile.sh: fix path in generated default TerraGearGUI.conf
The 'flightgear' path in ~/.config/TerraGear/TerraGearGUI.conf is
supposed to point to $FG_ROOT, not to the FlightGear repository...
2019-05-02 01:36:00 +02:00
Florent Rougon
882ab6ae59 download_and_compile.sh: small fixes for TerraGear and TerraGear GUI
- make all generated scripts executable;
- use correct path for 'terragear' in the generated default config file
  ~/.config/TerraGear/TerraGearGUI.conf (not the 'bin' subdirectory);
- add default for the 'flightgear' path in the same file;
- don't write temporary TerraGearGUI.conf in $CBD (it's useless and
  might overwrite a user-created file);
- simplify a bit (esp. using a here document for generating
  run_terrageargui.sh).
2019-04-29 22:28:21 +02:00
Florent Rougon
f3423dba60 download_and_compile.sh: respect the selected build type for TerraGear
So far, TerraGear was always built by d&c with
-DCMAKE_BUILD_TYPE="Debug". Following [1], d&c will now use, for
TerraGear, the build type selected with its -b option---which by default
is 'RelWithDebInfo'.

(In short: the 'Debug' build type has a very high negative performance
impact, therefore it should only be done intentionally.)

[1] https://sourceforge.net/p/flightgear/mailman/message/36650766/
2019-04-26 23:01:58 +02:00
Florent Rougon
39c1754a7f download_and_compile.sh: improve management of intercomponent dependencies
- new function _depends() to allow declaring intercomponent dependencies
  using a declarative style;

- declare that FGFS depends on SIMGEAR (TERRAGEAR depends on SIMGEAR as
  well, but this was already there---just not in the new, declarative
  style);

- print and log automatically-added components; when this happens, give
  a hint about --ignore-intercomponent-deps;

- log the value of IGNORE_INTERCOMPONENT_DEPS, which reflects whether
  --ignore-intercomponent-deps was used.
2019-04-26 13:14:38 +02:00
Florent Rougon
f190773790 download_and_compile.sh: use proper string comparison in _elementIn()
In Bash, the [[ <foo> == <bar> ]] and [[ <foo> = <bar> ]] conditionals
interpret <bar> as a shell globbing pattern. This wasn't desired in
_elementIn(), where the <bar> string is provided by the caller, and
might contain pattern metacharacters. Replace this conditional with a
plain string comparison made with '[' (aka, the 'test' command).
2019-04-26 10:44:03 +02:00
Florent Rougon
5b34458439 download_and_compile.sh: add option --ignore-intercomponent-deps
Add option --ignore-intercomponent-deps which does the following:

  Ignore dependencies between components (default: don't).

  Example: TERRAGEAR depends on SIMGEAR. Because of this, running
  'download_and_compile.sh TERRAGEAR' would normally update, rebuild,
  etc. both SIMGEAR and TERRAGEAR. Passing the
  --ignore-intercomponent-deps option can be useful if you want to
  update, rebuild, etc. TERRAGEAR *without* doing the same for SIMGEAR
  (for instance, if you are doing repeated TERRAGEAR builds and you know
  your SIMGEAR is already fine and up-to-date).
2019-04-26 10:30:45 +02:00
Florent Rougon
59c9a55baa download_and_compile.sh: log whether this is a "stable build"
Log "Stable build: yes" or "Stable build: no" depending on whether
option -s has been passed.
2019-04-26 09:29:50 +02:00
Florent Rougon
92f566f1d3 download_and_compile.sh: fix "TERRAGEAR depends on SIMGEAR" implementation
The previous commit enforced this dependency only under the
[[ "$DOWNLOAD_PACKAGES" = "y" ]] condition, which was too restrictive.
2019-04-26 09:25:59 +02:00
Florent Rougon
5b6ba959d9 download_and_compile.sh: update TerraGear dependencies and branch selection
- update dependencies of the TERRAGEAR component (require SimGear,
  libboost-dev and zlib1g-dev apart from what was already listed
  following [0]);

- use TerraGear branch 'scenery/ws2.0' if the -s option has been given,
  otherwise use the 'next' branch.

References: [1] and Scott's reply[2].

[0] 6661d1e10c/
[1] https://sourceforge.net/p/flightgear/mailman/message/36649774/
[2] https://sourceforge.net/p/flightgear/mailman/message/36650028/
2019-04-26 08:40:59 +02:00
Florent Rougon
675e7e6bdc download_and_compile.sh: new generated script: run_ldd.sh
This script can be useful to debug library problems.

$ ./run_ldd.sh --help
Usage: ./run_ldd.sh LDD_ARGUMENT...
Run 'ldd' with the same LD_LIBRARY_PATH setup as done inside run_fgfs.sh.

Examples: 'run_ldd.sh fgfs', 'run_ldd.sh fgcom', etc. (this can be used
for any binary in 'install/flightgear/bin').
2019-04-25 08:29:23 +02:00
Florent Rougon
07d1b0e882 download_and_compile.sh: update warning message 2019-04-24 19:18:57 +02:00
Florent Rougon
f826f8c4b2 download_and_compile.sh: remove useless parameter in URL 2019-04-24 18:56:42 +02:00
Florent Rougon
82f3c85343 download_and_compile.sh: allow setting SG_CMAKEARGS and FG_CMAKEARGS from the environment
This allows one to add custom CMake options for the SG and/or FG
build(s) without modifying download_and_compile.sh.
2019-04-24 18:50:50 +02:00
Florent Rougon
3344c21c71 download_and_compile.sh: add quoting to the generated scripts
run_fgfs.sh and run_fgfs_debug.sh have been tested: now they work fine
when run from a directory whose path contains spaces.

The other scripts have been quickly updated, because the problems were
quite similar, but these haven't been tested (the FGo! startup script
had useless stuff, the FGx one had very weird things like "cd $ " which
probably had not been tested).
2019-04-21 13:37:35 +02:00
Florent Rougon
b2274fbbed download_and_compile.sh: pass -DTRANSLATIONS_SRC_DIR when building FlightGear
When configuring FlightGear, flightgear/CMakeModules/Translations.cmake
checks for the presence of "${FGDATA_SRC_DIR}/Translations/${xlf_file}"
where ${xlf_file} is en_US/FlightGear-Qt.xlf, however this
${FGDATA_SRC_DIR} is *not* initialized from -DFG_DATA_DIR argument
passed on FlightGear's cmake command. The autodetection only works if
FGData is located in ../fgdata from the FlightGear source directory. In
the meantime, make download_and_compile.sh explicitly pass
-DTRANSLATIONS_SRC_DIR:PATH when configuring FG.

The -DFG_DATA_DIR:PATH vs. -DFG_DATA_DIR change is visible in
build/flightgear/CMakeCache.txt but not decisive here.
2019-04-21 11:45:28 +02:00
Florent Rougon
cd80fffbe2 download_and_compile.sh: add quoting around variable expansions
Should behave better in case one of these variables contains whitespace.

Note: I didn't look inside the generated scripts such as run_fgfs.sh,
      they may have similar issues.
2019-04-21 08:39:34 +02:00
Florent Rougon
5e25bc9277 download_and_compile.sh: don't attempt to install libcppunit-dev anymore
According to Edward, installing the system CppUnit library is not really
useful and likely to cause problems.[1]

This reverts commit 6caf43f9e7.

[1] https://sourceforge.net/p/flightgear/mailman/message/36636483/
2019-04-11 10:34:29 +02:00
Florent Rougon
06d84d1d5b download_and_compile.sh: don't install CMake from distro package when we build it
Don't install the 'cmake' distro package when the CMAKE component has
been selected.
2019-04-09 10:34:39 +02:00
Florent Rougon
6661d1e10c download_and_compile.sh: only install dependencies for selected components
For instance, don't attempt to install TerraGear dependencies unless
TERRAGEAR is in WHATTOBUILD. This should significantly reduce the number
of packages downloaded by the first use of download_and_compile.sh that
doesn't have -pn in the options.

We may get reports of missing dependencies for some components as a side
effect of this change; we'll just have to add the missing dependencies
wherever they are required (this can happen if, for instance, some
particular dependency was so far listed in the comments only as a
TERRAGEAR dependency, but was actually required by *another component*
such as FGFS). Incorrect dependency information needs to be fixed,
that's all there is to it.
2019-04-09 10:34:30 +02:00
Florent Rougon
6caf43f9e7 download_and_compile.sh: add optional dependency on libcppunit-dev
The dependency is optional because CppUnit is shipped with the FG
sources. However, when installed via the distro package manager as we
are attempting here:
  - the FG build will be quicker;
  - libcppunit-dev will be updated like other distro packages (e.g.,
    it will receive security updates).
2019-04-09 09:40:28 +02:00
chris_blues
7b51c99439 FGmeta/Nasa2FGearthview
-----------------------
* merge contribution of eatdirt <chris@ringeval.com>
  add download, conversion and generation of normalmaps
  Big thanks Chris!
* update README and some minor updates to the script
2019-03-25 18:20:43 +01:00
Florent Rougon
1cf284bd6f download_and_compile.sh: add optional dependency on qttools5-dev
This package is needed to embed translations in the built-in launcher
(it contains Qt5LinguistToolsConfig.cmake). Thanks to Clm76 for the
feedback.
2019-03-25 11:09:13 +01:00
Florent Rougon
1f27f8e39a download_and_compile.sh: create openscenegraph dir only when OSG build is enabled
Dont create the 'openscenegraph' directory when the OSG build is
not selected (request from user ctesc356 of the French forum).
2019-03-23 14:34:51 +01:00
Torsten Dreyer
caaad41e26 track submodule changes for release 2019-03-13 21:21:07 +01:00
Torsten Dreyer
120055fa43 new version: 2019.2.0 2019-03-13 21:21:07 +01:00
Torsten Dreyer
72bd67c6ef new version: 2019.1.1 2019-03-13 21:21:07 +01:00
Torsten Dreyer
ac35f4d20f Prepare for 2019.1 2019-03-13 21:20:46 +01:00
Florent Rougon
56e1055dec download_and_compile.sh: improvements related to package installation
- When -pn has been passed (i.e., the user wants the 'apt-get install'
  step to be skipped), don't waste time checking the available
  dependencies. Rationale: someone using -pn has probably already
  installed the required packages either manually or during a previous
  run of download_and_compile.sh, and anything missing couldn't be fixed
  under -pn regime anyway, by definition. Assume that users passing -pn
  want to build with the packages they already have, and let them spare
  some time and CPU cycles.

- New options --package-manager and --sudo. The former defaults to
  'apt-get' as usual, but 'aptitude' can be used as well. The --sudo
  option specifies the sudo-like program to use. Passing --sudo=echo
  allows one to see the apt-get or aptitude commands without running
  them. Passing --sudo= or --sudo="" (i.e., giving an empty value)
  causes the package manager to be called directly, without any
  intermediate sudo-like program.

- The PKG variable is now a Bash array, which is a bit cleaner and
  blends better with the new, array-based implementations of
  _aptUpdate() and _aptInstall() (whose purpose is to allow the
  newly-added flexibility without multiplying the code paths).
2019-02-12 00:04:07 +01:00
James Turner
ed88c630ea Add the git-mirror script uses on Jenkins
This is run on one of Jenkins Linux machines to mirror all the
SF repos for faster cloning and builds when SF is offline.
2019-01-14 13:19:01 +00:00
Scott Giese
da0f443f62 Linux::fg-from-scratch
detect chipset architecture for compile/tune optimization
only compile vcpkg when file changes are detected
include cgal library
2019-01-01 14:50:49 -06:00
Scott Giese
2eac2b8546 fg-from-scratch:Linux
Initial commit
2018-12-10 14:40:29 -06:00
Florent Rougon
1d97e9f573 download_and_compile.sh: make generated scripts prepend to LD_LIBRARY_PATH instead of overwriting it
Thanks to Julian Smith for the report.
2018-10-24 11:56:39 +02:00
James Turner
bd7ccccda6 Catalog configs from UKmirror 2018-10-23 12:01:58 +00:00
James Turner
f0f047e6c5 Fix mirror URLs 2018-10-18 12:42:17 +00:00
James Turner
271f103ae3 Update catalogs config after discussion
Legacy catalog keeps the existing ID and URL, to avoid any problems
with older client versions
2018-10-18 13:37:17 +01:00
James Turner
99b893368b Catalogs: multiple download URLs (mirrors) supported 2018-10-17 14:16:40 +01:00
James Turner
e4007bae99 Remove MD5 sum files from Git 2018-10-17 13:00:10 +00:00
James Turner
6e8b4c3ee7 Sharing logic tweaks 2018-10-17 13:00:10 +00:00
James Turner
ccb35c7707 Catalog spec tweaks 2018-10-17 13:00:10 +00:00
James Turner
391ceaea11 Update-catalog.py: —quiet option 2018-10-17 11:04:11 +01:00
James Turner
feae4a2d56 Tweaked catalog definitions 2018-10-17 09:26:08 +00:00
James Turner
70dfd6b8d4 Use LXML everywhere 2018-10-17 09:19:10 +00:00
James Turner
a1f8e52ae8 Add three catalog setups, for UK mirror
The fgaddon-catalog was duplicated to avoid disturbing Curt’s config
he runs locally, until the new setup is working.
2018-10-15 11:39:56 +01:00
Florent Rougon
a5525ba2b3 i18n Python scripts: remove class SysL10NResourceManager from i18n.py
This class isn't needed anymore now that
$FG_ROOT/Translations/default/sys.xml has a flat structure, like the
other FG XML i18n files that define the default translation. This is
related to

  6d6e1809f0/

and more specifically to

  587c601345/
2018-10-12 08:14:01 +02:00
Florent Rougon
1c5449fcd6 download_and_compile.sh: add optional dependencies qtbase5-dev-tools and qttools5-dev-tools
qtbase5-dev-tools contains the 'rcc' tool, and qttools5-dev-tools
contains 'lrelease'. Unless I'm mistaken, both are needed to compile the
Qt resources containing translations in the QM format for FlightGear's
built-in launcher.
2018-10-11 23:07:34 +02:00
Florent Rougon
359152c8d1 i18n Python scripts: fix Translation.__setitem__() and add docstrings
Translation.__setitem__() from flightgear/meta/i18n.py isn't used
anywhere here (it is not very useful), so no harm done, but that could
have confused potential readers.
2018-10-11 20:32:48 +02:00
James Turner
2c41742b99 Add Russian to the language list
Fix provided by Michael Danilov
2018-10-11 13:26:58 +01:00
Florent Rougon
a20342ed48 download_and_compile.sh: cleaner log output, code simplification
The "DIRECTORY=..." was printed too late in the log file (after the apt
stuff). Fix that and make some code a bit easier to follow (e.g.,
LOGFILE is assigned only once now).
2018-10-11 14:07:33 +02:00
Florent Rougon
d424cdaad3 download_and_compile.sh: minor changes
Consistent indentation for _printLog() vs. other functions, safety
measures for arguments possibly containing spaces, etc.
2018-10-11 13:22:49 +02:00
Florent Rougon
141bb7dec4 download_and_compile.sh: new function _log()
Introduce a new function _log() that allows one to factor out the
remaining explicit appends to $LOGFILE. Summary:

  _log        writes its arguments to $LOGFILE
  _printLog   ditto, and also prints them to the terminal
  _logOutput  echoes its standard input to the terminal and/or to $LOGFILE
              (depending on its first argument). Typically used in the
              last component of a pipeline.
2018-10-11 12:48:30 +02:00
Florent Rougon
2874e0eade download_and_compile.sh: new function _logOutput()
Use this function for all commands that produce output we want to see on
the terminal and in the log file. Actually, the first parmeter of the
function, which is optional, allows one to choose where we want the
output to be written to: the terminal and/or the log file (three
possibilities, since for none of these, '>/dev/null' redirection can be
used directly).
2018-10-11 12:48:24 +02:00
Florent Rougon
6520925c5b download_and_compile.sh: use _printLog() wherever appropriate
This is a logical follow-up for commit
8a7fd33b2b, which introduced the
_printLog() function.
2018-10-11 11:53:58 +02:00
James Turner
77384be44a Include the OSG .DDS loader plugin in Mac builds 2018-10-05 13:12:29 +01:00
Florent Rougon
7c5ad2405e download_and_compile.sh: cosmetic changes 2018-09-26 10:02:09 +02:00
Florent Rougon
250c0c54a8 download_and_compile.sh: fix difficult-to-read and sloppy checks
The new function _elementIn allows one to do these checks accurately and
in a more readable way.
2018-09-26 09:55:06 +02:00
Florent Rougon
2930727a87 download_and_compile.sh: take username verbatim (no conversion to lowercase)
Fix for commit 8a7fd33b2b: in argument to --git-clone-site-params,
take the username exactly as provided instead of converting it to
lowercase (the site and protocol are still converted to lowercase, but
*that* is intentional).
2018-09-26 09:27:53 +02:00
Florent Rougon
a281b46214 download_and_compile.sh: add --version option 2018-09-26 00:17:29 +02:00
Florent Rougon
8a7fd33b2b download_and_compile.sh: give control over protocol and username for 'git clone'
This commit adds two new options:

--git-clone-default-proto=PROTO

  Default protocol to use for 'git clone' ('ssh', 'https' or git'). If
  the option is not specified, the default is still 'https'.

--git-clone-site-params=SITE=PROTOCOL[:USERNAME]

  Connect as USERNAME with PROTOCOL when cloning a Git repository hosted
  at SITE (sample sites: 'SourceForge', 'GitHub'; valid protocols:
  'ssh', 'https' and git'). USERNAME is required when using the 'ssh'
  protocol. The hosting site and protocol are matched in a
  case-insensitive way.

  This option may be passed several times with different sites, e.g.

    download_and_compile.sh --git-clone-default-proto=ssh \
                            --git-clone-site-params SourceForge=ssh:frougon \
                            --git-clone-site-params=GitHub=https

 (replace 'frougon' with your username at SourceForge)

  For repositories located at a hosting site specified with
  --git-clone-site-params, the protocol indicated with this option
  overrides the default protocol, be it the script default or the one
  given with --git-clone-default-proto.

  The above example shows that the argument of a long option, namely
  --git-clone-site-params in the example, may be given either separately
  or in the same shell argument as the option name, in which case an '='
  separator is needed.

When using the 'ssh' protocol, ssh-agent may be used to avoid having to
type the password once for each repository fetched with this protocol.
Also note that gpg-agent(1) can act as an SSH agent.
2018-09-26 00:17:29 +02:00
Florent Rougon
305a501ef3 download_and_compile.sh: use getopt instead of bash's getopts. Add --help.
The main advantage of getopt is that it allows one to define long
options. Help can now be obtained with 'download_and_compile.sh --help',
in addition to the already-existing '-h' option.

[ This is the getopt tool shipped in Debian's util-linux package,
  which is marked as Essential, therefore should always be present
  on a Debian system. ]

Try to improve formatting of the --help message, so that it is better
suited to document options that have a short as well as a long form.
Make the presentation of this help message a bit more standard.
2018-09-26 00:17:29 +02:00
Florent Rougon
d073c54c0d download_and_compile.sh: move first main chunk of code after function definitions 2018-09-26 00:17:29 +02:00
Florent Rougon
705bd47bcd download_and_compile.sh: download FGData before building FG
This works better with the new translation system based on XLIFF files.
2018-09-26 00:17:29 +02:00
Florent Rougon
4128259e8e download_and_compile.sh: add missing deps and downgrade qt5-default, qtdeclarative5-dev
- add missing deps as suggested on the list
- downgrade qt5-default and qtdeclarative5-dev from mandatory to
  optional
2018-09-26 00:17:29 +02:00
Scott Giese
44bdb42fd0 fg-from-scratch: Improve handling of missing 'build' folders. 2018-09-24 18:35:57 -05:00
Torsten Dreyer
7de0f9f524 track submodule changes for release 2018-09-21 17:22:27 +02:00
Torsten Dreyer
1e3ac37c96 new version: 2018.4.0 2018-09-21 17:22:27 +02:00
Torsten Dreyer
81d950aee6 new version: 2018.3.1 2018-09-21 17:22:27 +02:00
Torsten Dreyer
9fde4fc6fa Prepare for 2018.3, don't tag version 2018-09-21 17:18:08 +02:00
Scott Giese
7e8a679eb4 fg-from-scratch: plib moved to vcpkg 2018-08-06 21:55:23 -05:00
Scott Giese
a20cdef996 fg-from-scratch: Build Flightgear 2018-08-01 22:00:51 -05:00
James Turner
5be72a84d3 Check-aircraft helper script
Tool to validate aircraft meta-data - basic for now, will expand
to be smarter over time.
2018-07-25 13:42:13 +01:00
James Turner
0b46052259 Catalog generation enhancements 2018-07-25 11:38:52 +01:00
James Turner
0cc48e148f Merge /u/scttgs0/fgmeta/ branch to-be-merged into next
https://sourceforge.net/p/flightgear/fgmeta/merge-requests/27/
2018-07-18 06:51:14 +00:00
James Turner
3cf24d18e7 Silence some noice in mac packaging script 2018-07-17 09:54:59 +01:00
Scott Giese
b765807530 Migrate fg-from-scratch into fgmeta 2018-07-06 18:04:23 -05:00
James Turner
24db98b5e1 Also archive symbols for Windows builds 2018-07-02 11:39:08 +01:00
Torsten Dreyer
5f21b077a6 track submodule changes for release 2018-05-19 21:02:47 +02:00
Torsten Dreyer
72aae21420 new version: 2018.3.0 2018-05-19 21:02:47 +02:00
Torsten Dreyer
b8f206f1d4 new version: 2018.2.1 2018-05-19 21:02:47 +02:00
Torsten Dreyer
69e2ca5ce6 Prepare 2018.2 release 2018-05-19 07:21:49 +02:00
Florent Rougon
1020303fec download_and_compile.sh: clarify what Qt build-dependencies are needed for
Since James' recent FG work, the Qt private headers are not needed
anymore for the Qt launcher; clarify this in the comments (they are
still needed for FGQCANVAS, but it is disabled by default).
2018-05-12 18:09:31 +02:00
James Turner
68dee3f3a4 Catalog support for multiple author tags
This will enable richer author meta-data in aircraft, and hence
nicer GUI presentation of author information. Client-side support
still to be added before this can be used
2018-04-25 21:07:57 +01:00
Florent Rougon
64f3f534a2 download_and_compile.sh: add optional dependency on qml-module-qtquick-dialogs
The qml-module-qtquick-dialogs package is needed for the built-in
launcher's Settings dialog since FlightGear commit
37dc418ce1978a55281cdedf6983e0e3ffea0108.
2018-03-17 15:16:53 +01:00
James Turner
4588c2f1e8 Switch to relative submodule URLs
This will enable the Git mirror on Jenkins to work (and also
resolve some issues with SSH vs Git vs HTTP protocols)
2018-03-16 10:29:57 +00:00
Florent Rougon
5eb7dd3ef7 download_and_compile.sh: prefer libcurl4-openssl-dev to libcurl4-gnutls-dev
Forum user daweed reported[1] a nasty error[2] when doing 'git clone' or
'git pull' for FGData with the HTTPS protocol. This error disappeared as
soon as he replaced libcurl4-gnutls-dev with libcurl4-openssl-dev on his
system.

-> favor installation of libcurl4-openssl-dev over libcurl4-gnutls-dev

[1] https://forum.flightgear.org/viewtopic.php?f=20&p=329326#p329324

[2] "RPC failed; curl 56 GnuTLS recv error (-110): The TLS connection
    was non-properly terminated"
2018-03-13 22:23:04 +01:00
Curtis L. Olson
c548c55274 Add compatibility with 2018 releases. 2018-02-27 05:54:06 -06:00
Torsten Dreyer
fcc7af9991 try git:// protocol for submodules 2018-02-19 10:18:43 +01:00
Torsten Dreyer
e79bb4f8be track submodule changes for release 2018-02-18 21:23:13 +01:00
Torsten Dreyer
e8d25cd78f new version: 2018.2.0 2018-02-18 21:23:13 +01:00
Torsten Dreyer
55408ffda6 new version: 2018.1.1 2018-02-18 21:23:13 +01:00
Torsten Dreyer
803e6ef418 Prepare for 2018.1 2018-02-18 21:21:36 +01:00
Florent Rougon
0b831773af download_and_compile.sh: add optional dependency on qml-module-qtquick-window2
qml-module-qtquick-window2 is needed for the built-in launcher at least
on Linux Mint 18, see Dany's report at:

  https://sourceforge.net/p/flightgear/mailman/message/36224317/
2018-02-12 17:28:11 +01:00
James Turner
bc4bd61de6 Mac: better macdeployqt fix 2018-02-01 09:31:09 +00:00
James Turner
38426b8a64 Mac: fix invocation of macdeployqt 2018-02-01 08:28:53 +00:00
Florent Rougon
e9ebb418f3 python3-flightgear/README-l10n.txt: add a little hint 2018-01-19 12:51:55 +01:00
James Turner
f2cbb733a0 Add 'clean uninstall' option to the Windows uninstaller 2018-01-17 21:48:21 +00:00
James Turner
195f123c05 Set LD_LIBRARY_PATH in the linux build script 2017-12-25 17:04:47 +00:00
James Turner
3408da4f40 Fix a typo in Mac packaging script. 2017-12-24 21:20:24 +00:00
James Turner
ab34ede1ea QML deployment for Mac release/nightlies 2017-12-23 17:01:54 +00:00
James Turner
dddf9dcb83 Fix for windows-nightly. 2017-12-23 11:21:07 +00:00
James Turner
f6cbce7324 Windows installer: fix QML deployment 2017-12-23 08:26:30 +00:00
James Turner
6034143788 Catalogs:-set.xml files cam exclude themselves
Re-add the old feature, that -set.xml files can explicitly opt-out of
being included in the catalog. Useful for some development and helper /
included files in some aircraft.
2017-11-27 17:59:37 +00:00
James Turner
7ad60c4471 Catalogs: skip set files with missing description
This occurs for at least the A320 copilot, for example. We also log a
warning in the catalog creation script
2017-11-27 17:53:46 +00:00
James Turner
4f5fd4bea6 Don’t wipe dist when building, since we need it
OpenSceneGraph is copied into dist, don’t blank it.
2017-11-17 14:26:33 +00:00
Florent Rougon
2ab43e6c0a download_and_compile.sh: add optional dependency on qtbase5-private-dev
qtbase5-private-dev is needed for the built-in launcher, starting from
FG commit 329f8f77ab1a9d0ca2edbbbf23ffbaacaf7b7345.
2017-11-14 14:48:24 +01:00
Florent Rougon
663eaaa65b download_and_compile.sh: other fix for the dpkg-query invocation
Thanks to wkitty42 for pointing it out!
2017-10-03 13:30:04 +02:00
Florent Rougon
e950c89c2f download_and_compile.sh: remove an extraneous space that slipped in 2017-10-03 11:08:36 +02:00
Florent Rougon
bcb4eb6064 download_and_compile.sh: fix detection of whether dctrl-tools is installed
Typical output of:

  dpkg-query --showformat='${Status}\n' --show dctrl-tools

is:

  install ok installed

(three words, not one). Thanks to wkitty42 for the report.
2017-10-03 10:39:36 +02:00
Florent Rougon
c1a00bb944 download_and_compile.sh: write messages to the log file too
Some messages added earlier regarding package alternatives weren't
written to the log file, but only printed to stdout. Fix this.
2017-10-03 09:49:55 +02:00
Florent Rougon
480f8bbb68 download_and_compile.sh: recap unmatched optional pkg alternatives at the end
This way, unmatched optional package alternatives are clearly visible,
on stdout and in the log file -> should ease troubleshooting.
2017-10-03 08:02:26 +02:00
James Turner
f1e8e8b4a2 Change MSVC runtime deployment
Rely on CMake install (in FlightGear) to copy all the required libs
to bin, so we simply grab them as part of that, instead of taking
them from the redist folder.

This relies on a corresponding FLightgear change.
2017-10-02 12:36:40 +01:00
Florent Rougon
4f4a2c9cdd download_and_compile.sh: add two optional deps required for the built-in launcher
Declare qtdeclarative5-private-dev and qml-module-qtquick2 as optional
dependencies, because they are needed for the built-in launcher,
starting from FG commit 3a8d3506d651b770e3173841a034e6203528f465
(committed to FG on 2017-09-26). People who can't install these packages
(oldish systems, etc.) should still be able to build and run FlightGear,
but without the built-in launcher.

See discussion around this message:

  https://sourceforge.net/p/flightgear/mailman/message/36059892/
2017-10-02 09:45:40 +02:00
Florent Rougon
dd510b0286 download_and_compile.sh: add support for optional package alternatives
- Rename _package_alternative_inner() to _find_package_alternative() and
  modify it to make it more useful when called from other functions. If
  a package is found that matches one of the alternatives, its name is
  printed on stdout, otherwise nothing is printed (empty output).

- Adapt _package_alternative() accordingly and rename it
  to _mandatory_pkg_alternative().

- New function _optional_pkg_alternative() based on
  _find_package_alternative(). Contrary to _mandatory_pkg_alternative(),
  if no match is found in _optional_pkg_alternative(), a message is
  printed to stdout but the script doesn't abort.
2017-10-02 09:45:40 +02:00
Curtis L. Olson
018f0907c2 Template tweaks. 2017-09-26 06:32:38 -05:00
Curtis L. Olson
f2a27e592d error catching ++ 2017-09-26 06:31:58 -05:00
Curtis L. Olson
89d526e740 Check if thumbnail exists in package before building thumbnail_url (which
is never actually used by the way.)
2017-09-26 06:30:50 -05:00
Curtis L. Olson
68e2df9db6 verbocity-- 2017-09-26 06:27:47 -05:00
Curtis L. Olson
87c11e7e2f Fix a return bug when len(setDicts) is zero. 2017-09-26 06:26:49 -05:00
Florent Rougon
7142621966 i18n Python scripts: add script fg-merge-xliff-into-xliff
This script is designed for the following use case:

Suppose a translator has been working on a particular translation file,
and meanwhile the official XLIFF file for this translation has been
updated in FGData (new translatable strings added, obsolete strings
marked or removed, etc.). In such a case, 'fg-merge-xliff-into-xliff'
can be used to merge the translator's work into the official XLIFF
translation file. Essentially, this means that for all strings that have
the same source text, plural status, number of plural forms and of
course target language, the target texts, "approved" status and
translator comments will be taken from the first file passed in the
following command:

  fg-merge-xliff-into-xliff TRANSLATOR_FILE PROJECT_FILE

Used like this, PROJECT_FILE will be updated with data from
TRANSLATOR_FILE. If you don't want to modify PROJECT_FILE, use the -o
(--output) option. If '-' is passed as argument to this option, then the
result is written to the standard output.
2017-09-19 22:11:41 +02:00
Florent Rougon
54d6196698 i18n Python scripts: minor changes
- Remove unnecessary imports

  These imports were a leftover from early versions; now, they are done
  in modules such as flightgear.meta.i18n and don't need to be in the
  calling scripts anymore.

- Fix an exception message
2017-09-17 16:18:06 +02:00
Torsten Dreyer
6b970f8e02 track submodule changes for release 2017-09-17 12:14:09 +02:00
Torsten Dreyer
fb28f40b72 new version: 2017.4.0 2017-09-17 12:14:09 +02:00
Torsten Dreyer
efd4f15d9d new version: 2017.3.1 2017-09-17 12:14:09 +02:00
Torsten Dreyer
be74bb8017 Prepare for 2017.3.1 release 2017-09-17 01:21:14 +02:00
Florent Rougon
3acff3caba Initial version of rebuild-fgdata-embedded-resources
This is a simple Python 3 script to ease rebuilding of FGData embedded
resources for FlightGear. It uses fgrcc in conjunction with
<FlightGear-repo>/src/EmbeddedResources/FGData-resources.xml and the
FGData files mentioned therein to (re)create the FGData-resources.[ch]xx
files used in the FlightGear build. The existing files in the FlightGear
repository are always overwritten (namely, FGData-resources.[ch]xx in
<FlightGear-repo>/src/EmbeddedResources).

There are command-line options (--flightgear, --fgdata and --fgrcc) to
indicate where the FlightGear and FGData repositories, as well as the
fgrcc executable can be found. However, it is most convenient to put
these paths once for all in the config file
$HOME/.fgmeta/rebuild-fgdata-embedded-resources.json (use
'rebuild-fgdata-embedded-resources --help' to see an example). This way,
you can invoke the script without any argument whenever you want to
update <FlightGear-repo>/src/EmbeddedResources/FGData-resources.[ch]xx.

This script doesn't depend on any module out of the Python standard
library (intentionally, in case distributors want to use it to recreate
themselves the FGData-resources.[ch]xx files). It should work on Python
3.5 and later versions.
2017-08-18 13:41:21 +02:00
Florent Rougon
c6eb59eb42 Initial version of the Python scripts to manage l10n using the XLIFF format
Add the following files:

  python3-flightgear/README-l10n.txt
  python3-flightgear/fg-convert-translation-files
  python3-flightgear/fg-new-translations
  python3-flightgear/fg-update-translation-files
  python3-flightgear/flightgear/__init__.py
  python3-flightgear/flightgear/meta/__init__.py
  python3-flightgear/flightgear/meta/exceptions.py
  python3-flightgear/flightgear/meta/i18n.py
  python3-flightgear/flightgear/meta/logging.py
  python3-flightgear/flightgear/meta/misc.py

They should work on Python 3.4 and later (tested with 3.5.3). The folder
structure is chosen so that other FG support modules can insert
themselves here, and possibly be used together. I put all of these
inside 'flightgear.meta', because I don't expect them to be needed at FG
runtime (neither now nor in the future), probably not even by the CMake
build system.

To declare that a string has plural forms, simply set the attribute
'with-plural' to 'true' on the corresponding element of the default
translation (and as in Qt, use %n as a placeholder for the number that
determines which singular or plural form to use).
2017-08-04 23:39:05 +02:00
James Turner
89948603de Catalog support for minimum-fg-version
Extend test coverage with a minimal aircraft to exercise more
code paths for this.
2017-07-30 10:38:04 -07:00
Torsten Dreyer
25a9835014 update submodule heads for fg, sg and fgdata 2017-07-08 14:05:50 +02:00
James Turner
70eb74bc09 Better, stronger, faster linking on Windows.
Assume the builds are against a version of OSG with the <fstream>
declspec(export) fix applied, and hence we can use normal linking,
not the /FORCE:MULTIPLE thing which slows down and complains.
2017-06-21 23:04:02 +01:00
James Turner
3e3b63181b Fixing line-endings 2017-06-21 23:00:53 +01:00
Stuart Buchanan
91ea5ba877 Add North American (manufacturer of the P-51 and F-86) 2017-06-16 22:55:28 +01:00
Stuart Buchanan
b2754b573a Add Republic as manufacturer 2017-06-16 20:29:27 +01:00
Automatic Release Builder
6029b13828 Add getstart as a submodule 2017-05-22 21:36:24 +02:00
Stuart Buchanan
6e8acf6fdc Add getstart to list of submodules
This takes advantage of the version support so manuals
will automatically be kept in sync with the latest version.
2017-05-21 21:20:31 +01:00
Florent Rougon
f16831a51d Rewrite catalog/testData/bad-index.xml with consistent line endings.
This file had a mix of LF and CRLF line endings.
2017-05-18 19:34:29 +02:00
Automatic Release Builder
117fffef0b track submodule changes for release 2017-05-18 15:16:00 +02:00
Automatic Release Builder
47570b3676 new version: 2017.3.0 2017-05-18 15:16:00 +02:00
Automatic Release Builder
250152fd7c new version: 2017.2.1 2017-05-18 15:16:00 +02:00
Automatic Release Builder
7dbf960291 release script tweaks for 2017.2 2017-05-18 15:14:46 +02:00
Florent Rougon
5fa23309c5 download_and_compile.sh: replace manually set version with the Git blob ID
By setting the 'ident' attribute for /download_and_compile.sh, this
replacement will be automatic whenever the file is checked out.

Note: the ID is the 40-character hexadecimal blob object name in Git, it
      is *not* the commit ID. 'git show <id>' can be used to obtain the
      script contents from its blob object name (id).

This will avoid spoiling every diff with the version number change, or
alternatively having different versions of the same file displaying and
logging the same version number.

If download_and_compile.sh is moved to a different directory in FGMeta
(or even renamed), then the path in .gitattributes must be adapted for
the substitution to work (the '/' in .gitattributes anchors the match at
the containing directory; I did this because download_and_compile.sh is
a rather generic name, and there *might* be different scripts with the
same name in other dirs...).
2017-05-18 11:32:37 +02:00
Florent Rougon
e8fb2f58f2 Add a basic .gitattributes file to the repository root directory 2017-05-18 10:24:21 +02:00
Florent Rougon
5bf2814178 download_and_compile.sh: dependency changes suggested by Pat Callahan 2017-05-18 10:13:29 +02:00
Florent Rougon
b621bbe3e8 download_and_compile.sh: add function _package_alternative()
- Add function _package_alternative() to select between alternative
  packages (idea of Pat Callahan).

- Split the 'apt-get update' and 'apt-get install' steps to arrange for
  installation of the 'dctrl-tools' prerequisite of
  _package_alternative().

- Add and use functions _aptUpdate() and _aptInstall() for good
  factoring (makes testing easier for people not using sudo, allows one
  to easily switch from 'apt-get' to 'apt' or 'aptitude' if wanted,
  etc.).
2017-05-14 18:58:54 +02:00
portree_kid
9c41bca63f Added manufacturers 2017-05-06 14:01:05 +02:00
portree_kid
efab6d7e51 Added aircraft type racer (ME-209-V1 hard to find otherwise) 2017-05-05 14:08:54 +02:00
portree_kid
910e3ec490 Added more manufacturers to catalog/catalogTags.py 2017-05-05 08:24:29 +02:00
portree_kid
df6d8be57f Replaced TABS by SPACES 2017-05-02 20:46:44 +02:00
portree_kid
b670f096be Added carrier & reconnaissance to aircraft type 2017-04-28 07:26:41 +02:00
portree_kid
b7d27d156f Corrected handley page to handley-page
Added more manufacturers
2017-04-26 16:33:00 +02:00
portree_kid
51e37ac662 Added aircraft manufacturers 2017-04-25 22:25:35 +02:00
Florent Rougon
1d68e73690 download_and_compile.sh: add qtdeclarative5-dev to the list of deps for FG
This was requested by several users; it is now required to compile
FlightGear's built-in launcher.
2017-04-21 18:36:12 +02:00
James Turner
aeaf259c59 Upload PDB files to CrashFix 2017-04-18 08:57:35 +01:00
James Turner
257ba0f733 More tags based on suggestions. 2017-04-13 11:18:29 +01:00
James Turner
7eb3a8886f Improving catalog generation
Support multiple primary aircraft in a package, which has several
aircraft developers have requested. This adjusts the handling of
the variant-of and primary-set tags.

Additionally, this adds partial unit-test coverage for -set.xml
scanning and catalog XML generation. 

Run ./test_catalog to run unit-tests of the catalog generation.
2017-04-12 16:38:58 +01:00
Stuart Buchanan
e86954cc7f Add additional manufacturers and eras.
Note on eras:  I've added every decade since flight started for
consistency and completeness.  For example, the Bell X-1 is from
the 1940s but is post-WW2.
2017-04-02 21:04:01 +01:00
James Turner
f23197f811 Fix a typo. 2017-03-27 13:06:20 +01:00
Stuart Buchanan
f28db85017 Add aerobatic, avro, ultralight and sort lines 2017-03-23 22:50:26 +00:00
James Turner
3f85e1911e Catalog script thumbnails, primary-set fixes.
- extract per-variant thumbnails from -set.xml files
- handle multiple primary aircraft in a directory (this will
  need client-side changes too, eventually)
2017-03-05 21:02:49 +02:00
James Turner
b350cd9827 Adjust build scripts to set FG_BUILD_TYPE
Cmake now has a standard variable to indicate the build type we are
creating. Map the existing settings on each platform to that value
(with varying degrees of nice-ness, further clean-up possible)
2017-02-28 16:25:58 +00:00
James Turner
8e22064b71 Re-add tag validation and support to catalog.
Tags are copied to the catalog.xml again, and validated against
catalogTags.py
2017-02-27 00:32:01 +00:00
James Turner
7a64df78e3 Improve reporting on bad indices. 2017-02-27 00:16:38 +00:00
Automatic Release Builder
493ad2c306 use git:// for fgdata submodule remote to keep jenkins happy 2017-02-22 18:09:42 +01:00
James Turner
533cec6236 Remove FGPanel special case for 64-bits.
We can build a 64-bit FGPanel now, since the issue was GLUT and freeGlut
supports a 64-bit version.

Note the shortcut icon is not disabled automatically, that needs an
additional fix.
2017-02-21 18:17:39 +00:00
Automatic Release Builder
0dd0bf3043 set submodule head for fgdata 2017-02-20 19:30:10 +01:00
Automatic Release Builder
b0594ed4ef track submodule changes for release 2017-02-20 18:52:19 +01:00
Automatic Release Builder
f2e86108d4 new version: 2017.2.0 2017-02-20 18:52:19 +01:00
Automatic Release Builder
8462f3217a new version: 2017.1.1 2017-02-20 18:52:19 +01:00
262 changed files with 26343 additions and 1306 deletions

23
.gitattributes vendored Normal file
View File

@ -0,0 +1,23 @@
# Set default behaviour, in case users don't have core.autocrlf set.
* text=auto
.gitattributes text export-ignore
.gitignore text export-ignore
*.py text
*.txt text
*.rst text
*.xml text
*.desktop text
*.svg text
*.jpg binary
*.png binary
*.gif binary
*.bat text eol=crlf
AUTHORS text
COPYING text
COPYING.* text
README.* text
Makefile text
ChangeLog text
ChangeLog.* text
/download_and_compile.sh text ident

6
.gitignore vendored
View File

@ -1,6 +1,6 @@
dist
.DS_Store
install
install*/
3rdParty
3rdParty.x64
boost_1_44_0
@ -21,3 +21,7 @@ osgbuild
CMakeCache.txt
*.pyc
build-*
testOutput*
md5sum.xml
staging

20
.gitmodules vendored
View File

@ -1,20 +1,24 @@
[submodule "simgear"]
path = simgear
url = https://git.code.sf.net/p/flightgear/simgear
branch = release/2017.1
url = ../simgear
branch = next
[submodule "flightgear"]
path = flightgear
url = https://git.code.sf.net/p/flightgear/flightgear
branch = release/2017.1
url = ../flightgear
branch = next
[submodule "fgrun"]
path = fgrun
url = https://git.code.sf.net/p/flightgear/fgrun
url = ../fgrun
branch = next
[submodule "fgdata"]
path = fgdata
url = git://git.code.sf.net/p/flightgear/fgdata
branch = release/2017.1
url = ../fgdata
branch = next
[submodule "windows-3rd-party"]
path = windows-3rd-party
url = https://git.code.sf.net/p/flightgear/windows-3rd-party
url = ../windows-3rd-party
branch = master
[submodule "getstart"]
path = getstart
url = ../getstart
branch = next

50
FlightGear-files.iss Normal file
View File

@ -0,0 +1,50 @@
[Files]
; 64 bits install
Source: "{#InstallDir64}\bin\*.*"; DestDir: "{app}\bin"; Excludes: "{#ExcludedBinaries}"; Flags: ignoreversion recursesubdirs; Check: Is64BitInstallMode
Source: "{#ThirdPartyDir}\3rdParty.x64\bin\zlib.dll"; DestDir: "{app}\bin"; Check: Is64BitInstallMode
Source: "{#ThirdPartyDir}\3rdParty.x64\bin\OpenAL32.dll"; DestDir: "{app}\bin"; Check: Is64BitInstallMode
Source: "{#ThirdPartyDir}\3rdParty.x64\bin\libpng.dll"; DestDir: "{app}\bin"; Check: Is64BitInstallMode
Source: "{#ThirdPartyDir}\3rdParty.x64\bin\libcurl.dll"; DestDir: "{app}\bin"; Check: Is64BitInstallMode
Source: "{#ThirdPartyDir}\3rdParty.x64\bin\libintl-8.dll"; DestDir: "{app}\bin"; Check: Is64BitInstallMode
Source: "{#ThirdPartyDir}\3rdParty.x64\bin\sentry.dll"; DestDir: "{app}\bin"; Check: Is64BitInstallMode
Source: "{#ThirdPartyDir}\3rdParty.x64\bin\crashpad_handler.exe"; DestDir: "{app}\bin"; Check: Is64BitInstallMode
Source: "{#ThirdPartyDir}\3rdParty.x64\bin\dbus-1-3.dll"; DestDir: "{app}\bin"; Check: Is64BitInstallMode
Source: "{#ThirdPartyDir}\3rdParty.x64\bin\event_core.dll"; DestDir: "{app}\bin"; Check: Is64BitInstallMode
Source: "{#ThirdPartyDir}\3rdParty.x64\bin\liblzma.dll"; DestDir: "{app}\bin"; Check: Is64BitInstallMode
Source: "{#ThirdPartyDir}\3rdParty.x64\bin\openxr_loader.dll"; DestDir: "{app}\bin"; Check: Is64BitInstallMode
; Include the base package
#if IncludeData == "TRUE"
Source: "{#FgHarnessPath}\fgdata\*.*"; DestDir: "{app}\data"; Flags: ignoreversion recursesubdirs skipifsourcedoesntexist
#endif
; 64 bits install
Source: "{#OSG64InstallDir}\bin\osg{#OSGSoNumber}-osg.dll"; DestDir: "{app}\bin"; Check: Is64BitInstallMode
Source: "{#OSG64InstallDir}\bin\osg{#OSGSoNumber}-osgDB.dll"; DestDir: "{app}\bin"; Check: Is64BitInstallMode
Source: "{#OSG64InstallDir}\bin\osg{#OSGSoNumber}-osgGA.dll"; DestDir: "{app}\bin"; Check: Is64BitInstallMode
Source: "{#OSG64InstallDir}\bin\osg{#OSGSoNumber}-osgParticle.dll"; DestDir: "{app}\bin"; Check: Is64BitInstallMode
Source: "{#OSG64InstallDir}\bin\osg{#OSGSoNumber}-osgText.dll"; DestDir: "{app}\bin"; Check: Is64BitInstallMode
Source: "{#OSG64InstallDir}\bin\osg{#OSGSoNumber}-osgUtil.dll"; DestDir: "{app}\bin"; Check: Is64BitInstallMode
Source: "{#OSG64InstallDir}\bin\osg{#OSGSoNumber}-osgViewer.dll"; DestDir: "{app}\bin"; Check: Is64BitInstallMode
Source: "{#OSG64InstallDir}\bin\osg{#OSGSoNumber}-osgSim.dll"; DestDir: "{app}\bin"; Check: Is64BitInstallMode
Source: "{#OSG64InstallDir}\bin\osg{#OSGSoNumber}-osgFX.dll"; DestDir: "{app}\bin"; Check: Is64BitInstallMode
Source: "{#OSG64InstallDir}\bin\osg{#OSGSoNumber}-osgTerrain.dll"; DestDir: "{app}\bin"; Check: Is64BitInstallMode
Source: "{#OSG64InstallDir}\bin\ot{#OTSoNumber}-OpenThreads.dll"; DestDir: "{app}\bin"; Check: Is64BitInstallMode
Source: "{#OSG64PluginsDir}\osgdb_ac.dll"; DestDir: "{app}\bin\osgPlugins-{#OSGVersion}"; Flags: skipifsourcedoesntexist; Check: Is64BitInstallMode
Source: "{#OSG64PluginsDir}\osgdb_osg.dll"; DestDir: "{app}\bin\osgPlugins-{#OSGVersion}"; Flags: skipifsourcedoesntexist; Check: Is64BitInstallMode
Source: "{#OSG64PluginsDir}\osgdb_osga.dll"; DestDir: "{app}\bin\osgPlugins-{#OSGVersion}"; Flags: skipifsourcedoesntexist; Check: Is64BitInstallMode
Source: "{#OSG64PluginsDir}\osgdb_3ds.dll"; DestDir: "{app}\bin\osgPlugins-{#OSGVersion}"; Flags: skipifsourcedoesntexist; Check: Is64BitInstallMode
Source: "{#OSG64PluginsDir}\osgdb_mdl.dll"; DestDir: "{app}\bin\osgPlugins-{#OSGVersion}"; Flags: skipifsourcedoesntexist; Check: Is64BitInstallMode
Source: "{#OSG64PluginsDir}\osgdb_jpeg.dll"; DestDir: "{app}\bin\osgPlugins-{#OSGVersion}"; Flags: skipifsourcedoesntexist; Check: Is64BitInstallMode
Source: "{#OSG64PluginsDir}\osgdb_rgb.dll"; DestDir: "{app}\bin\osgPlugins-{#OSGVersion}"; Flags: skipifsourcedoesntexist; Check: Is64BitInstallMode
Source: "{#OSG64PluginsDir}\osgdb_png.dll"; DestDir: "{app}\bin\osgPlugins-{#OSGVersion}"; Flags: skipifsourcedoesntexist; Check: Is64BitInstallMode
Source: "{#OSG64PluginsDir}\osgdb_dds.dll"; DestDir: "{app}\bin\osgPlugins-{#OSGVersion}"; Flags: skipifsourcedoesntexist; Check: Is64BitInstallMode
Source: "{#OSG64PluginsDir}\osgdb_txf.dll"; DestDir: "{app}\bin\osgPlugins-{#OSGVersion}"; Flags: skipifsourcedoesntexist; Check: Is64BitInstallMode
Source: "{#OSG64PluginsDir}\osgdb_tiff.dll"; DestDir: "{app}\bin\osgPlugins-{#OSGVersion}"; Flags: skipifsourcedoesntexist; Check: Is64BitInstallMode
Source: "{#OSG64PluginsDir}\osgdb_freetype.dll"; DestDir: "{app}\bin\osgPlugins-{#OSGVersion}"; Flags: skipifsourcedoesntexist; Check: Is64BitInstallMode
Source: "{#OSG64PluginsDir}\osgdb_osgterrain.dll"; DestDir: "{app}\bin\osgPlugins-{#OSGVersion}"; Flags: skipifsourcedoesntexist; Check: Is64BitInstallMode
Source: "{#OSG64PluginsDir}\osgdb_serializers_osg.dll"; DestDir: "{app}\bin\osgPlugins-{#OSGVersion}"; Flags: skipifsourcedoesntexist; Check: Is64BitInstallMode
Source: "{#OSG64PluginsDir}\osgdb_serializers_osgterrain.dll"; DestDir: "{app}\bin\osgPlugins-{#OSGVersion}"; Flags: skipifsourcedoesntexist; Check: Is64BitInstallMode

39
FlightGear-i18n.iss Normal file
View File

@ -0,0 +1,39 @@
[Messages]
ConfirmUninstall=Are you sure you want to completely remove %1 {#FGVersion} and all of its components?
pl.ConfirmUninstall=Czy na pewno chcesz całkowicie usunąć %1 {#FGVersion} i wszystkie jego komponenty?
es.ConfirmUninstall=¿ Estás seguro de que quieres borrar completamente %1 {#FGVersion} y todos sus componentes ?
nl.ConfirmUninstall=Weet u zeker dat u %1 {#FGVersion} en alle bijbehorende onderdelen wilt verwijderen?
de.ConfirmUninstall=Bist Du sicher, dass Du %1 {#FGVersion} und alle Komponenten entfernen willst?
[CustomMessages]
CreateDesktopIcon=Create a &desktop icon
CreateDesktopIconGroup=Additional icons:
RemoveAllSettings=Remove all settings, downloaded scenery and aircraft
RemoveAllSettingsDescription=FlightGear stores some settings in your user folder. In addition, scenery or aircraft data may have been downloaded to the download directory. To completely remove all these files, select this option.
FirewallFgException=Allows FlightGear to send and receive data over the multiplayer network and to get METARs.
FirewallFgcomException=Allows FGCom to establish a connection to FlightGear and the VoIP server for voice ATC communication.
pl.CreateDesktopIcon=Utwórz ikony na pulpicie
pl.CreateDesktopIconGroup=Dodatkowe ikony:
pl.RemoveAllSettings=Usuń wszystkie ustawienia, pobraną scenerię i samoloty
pl.RemoveAllSettingsDescription=FlightGear zapisuje niektóre ustawienia w katalogach użytkownika. Dodatkowo, sceneria lub dane statków powietrznych mogą być pobierane do katalogu pobrań. Aby całkowicie usunąć te ustawienia, wybierz tą opcję.
pl.FirewallFgException=Pozwala aplikacji FlightGear na wysyłanie i pobieranie danych przez sieć multiplayer oraz aby pobrać dane pogodowe METAR.
pl.FirewallFgcomException=Pozwala aplikacji FGCom na ustanowienie połączenia do aplikacji FlightGear i do serwerów VoIP dla komunikacji głosowej z ATC (kontrolerem lotów).
es.CreateDesktopIcon=Crear icono en el escritorio
es.RemoveAllSettings=Borrar todos los ajustes, escenarios y aviones descargados
es.RemoveAllSettingsDescription=FlightGear almacena algunos ajustes en tu carpeta de usuario. Adicionalmente, los datos de escenarios y aviones pueden haber sido descargados en el directorio de descargas. Para borrar completamente todos esos archivos, selecciona esta opción.
es.FirewallFgException=Permite a FlightGear mandar y recibir datos a la red multijugador y obtener METAR.
es.FirewallFgcomException=Permite a FGCom establecer una conexión con FlightGear y el servidor VoIP para comunicaciones de voz con el ATC.
nl.CreateDesktopIcon=Maak een snelkoppeling op het &bureaublad
nl.RemoveAllSettings=Verwijder alle instellingen en gedownloade data
nl.RemoveAllSettingsDescription=FlightGear bewaart een aantal instellingen in uw gebruikersmap. Mogelijk is er ook data in de downloadmap opgeslagen. Selecteer deze optie om die bestanden definitief te verwijderen.
nl.FirewallFgException=Sta FlightGear toe om data te verzenden en ontvangen via het multiplayernetwerk en om live weergegevens te downloaden.
nl.FirewallFgcomException=Sta FGCom toe om verbinding met FlightGear en de VoIP server te maken voor op stem gebaseerde ATC-communicatie.
de.CreateDesktopIcon=Ein Desktop-Icon anlegen
de.RemoveAllSettings=Alle Einstellungen und heruntergeladene Daten löschen
de.RemoveAllSettingsDescription=FlightGear speichert seine Einstellungen in deinem User-Verzeichnis. Zusätzlich heruntergeladene Flugzeuge und Szenerie-Daten können sich im Download-Verzeichnis befinden. Wähle diese Option, um alle Daten zu löschen.
de.FirewallFgException=Erlaubt FlightGear die Verbindung zum Multiplayer-Netzwerk und den Download von METAR-Daten.
de.FirewallFgcomException=Erlaubt FGCom die Verbindung zu FlightGear- und VoIP-Servern für den ATC-Sprechfunk.

284
FlightGear.iss Executable file → Normal file
View File

@ -1,4 +1,4 @@
; Script generated by the Inno Setup Script Wizard.
; Script generated by the Inno Setup Script Wizard.
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
;
; This script creates an installable FlightGear package for Win32 using the
@ -7,7 +7,9 @@
;
; http://www.jrsoftware.org/isinfo.php
;
; Note: the files must appear in the X: drive.
; Note: Files root path is defined in the FgHarnessPath (in InstallConfig.iss)
;
; For example if You want to use X: drive as a root path
; You can do this with the command below:
;
; subst X: path_to_files
@ -17,201 +19,98 @@
; C:\> subst X: F:\Path\to\FlightGear\root
; C:\> subst X: F:\
;
; TRANSLATION NOTE:
; - external i18n files HAVE to be UTF-8 with BOM encoded. Otherwise the installer can
; not detect correct file encoding
;
; InstallConfig.iss example content:
;
; #define FGHarnessPath "x:"
; #define FGVersion "2020.4.1"
; #define FGVersionGroup "2020.4"
; #define OSGVersion "3.0.0"
; #define OSGSoNumber "2"
; #define OTSoNumber "3"
; #define FGDetails "-nightly"
; #define IncludeData "FALSE"
;
; Uninstall procedure with --uninstall flag:
; executed by fgfs.exe (fg_init.cxx):
; - removes all under the FG_HOME directory
; - removes all from Download dir/Terrasync
; - removes all from Download dir/Aircraft
#include "InstallConfig.iss"
#include "FlightGear-i18n.iss"
#if GetEnv("VSINSTALLDIR") == ""
#define VSInstallDir "C:\Program Files (x86)\Microsoft Visual Studio 14.0"
#else
#define VSInstallDir GetEnv("VSINSTALLDIR")
#endif
#define VCInstallDir VSInstallDir + "\VC"
#define InstallDir32 "X:\install\msvc140"
#define OSGInstallDir InstallDir32 + "\OpenSceneGraph"
#define OSGPluginsDir OSGInstallDir + "\bin\osgPlugins-" + OSGVersion
#define InstallDir64 "X:\install\msvc140-64"
#define FGSourcePath FgHarnessPath + "\flightgear"
#define InstallDir64 FgHarnessPath + "\install\msvc140-64"
#define OSG64InstallDir InstallDir64 + "\OpenSceneGraph"
#define OSG64PluginsDir OSG64InstallDir + "\bin\osgPlugins-" + OSGVersion
#define ThirdPartyDir "X:\windows-3rd-party\msvc140"
#define ThirdPartyDir FgHarnessPath + "\windows-3rd-party\msvc140"
; we copy everything in install/<arch>/bin except these, which aren't
; useful to the end-user to ship
#define ExcludedBinaries "*smooth.exe,metar.exe,js_demo.exe"
#define ExcludedBinaries "*smooth.exe,metar.exe"
#include "FlightGear-files.iss"
[Setup]
AppId=FlightGear
AppId=FlightGear_{#FGVersionGroup}
AppName=FlightGear
AppPublisher=The FlightGear Team
OutputBaseFilename=FlightGear-{#FGVersion}{#FGDetails}
AppVerName=FlightGear v{#FGVersion}
AppVersion={#FGVersion}
AppPublisherURL=http://www.flightgear.org
AppSupportURL=http://www.flightgear.org
AppUpdatesURL=http://www.flightgear.org
DefaultDirName={pf}\FlightGear {#FGVersion}
DefaultDirName={pf}\FlightGear {#FGVersionGroup}
UsePreviousAppDir=no
DefaultGroupName=FlightGear {#FGVersion}
DefaultGroupName=FlightGear {#FGVersionGroup}
UsePreviousGroup=no
LicenseFile=X:\flightgear\COPYING
LicenseFile={#FGSourcePath}\COPYING
Uninstallable=yes
SetupIconFile=X:\flightgear\package\flightgear.ico
SetupIconFile={#FgHarnessPath}\windows\flightgear.ico
VersionInfoVersion={#FGVersion}.0
InfoBeforeFile=X:\flightgear\package\windows\infobefore.txt
WizardImageFile=X:\flightgear\package\windows\setupimg.bmp
WizardImageFile={#FgHarnessPath}\windows\setupimg.bmp
WizardImageStretch=No
WizardSmallImageFile=X:\flightgear\package\windows\setupsmall.bmp
WizardSmallImageFile={#FgHarnessPath}\windows\setupsmall.bmp
VersionInfoCompany=The FlightGear Team
UninstallDisplayIcon={app}\bin\fgfs.exe
ArchitecturesInstallIn64BitMode=x64
ArchitecturesAllowed=x86 x64
ArchitecturesAllowed=x64
; Sign tool must be defined in the Inno Setup GUI, to avoid
; exposing the certificate password
; SignTool=fg_code_sign1
[Tasks]
; NOTE: The following entry contains English phrases ("Create a desktop icon" and "Additional icons"). You are free to translate them into another language if required.
Name: "desktopicon"; Description: "Create a &desktop icon"; GroupDescription: "Additional icons:"
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:CreateDesktopIconGroup}"
[Files]
; NOTE: run subst X: F:\ (or whatever path the expanded tree resides at)
;Source: "X:\*.txt"; DestDir: "{app}"; Flags: ignoreversion
; 32 bits install
Source: "{#InstallDir32}\bin\*.*"; DestDir: "{app}\bin"; Excludes: "{#ExcludedBinaries}"; Flags: ignoreversion recursesubdirs; Check: not Is64BitInstallMode
;locale only exists for fgrun - which has been disabled
;Source: "{#InstallDir32}\share\locale\*"; DestDir: "{app}\bin\locale"; Flags: ignoreversion recursesubdirs; Check: not Is64BitInstallMode
Source: "{#ThirdPartyDir}\3rdParty\bin\zlib.dll"; DestDir: "{app}\bin"; Check: not Is64BitInstallMode
Source: "{#ThirdPartyDir}\3rdParty\bin\OpenAL32.dll"; DestDir: "{app}\bin"; Check: not Is64BitInstallMode
Source: "{#ThirdPartyDir}\3rdParty\bin\libpng.dll"; DestDir: "{app}\bin"; Check: not Is64BitInstallMode
Source: "{#ThirdPartyDir}\3rdParty\bin\libcurl.dll"; DestDir: "{app}\bin"; Check: not Is64BitInstallMode
Source: "{#ThirdPartyDir}\3rdParty\bin\libintl-8.dll"; DestDir: "{app}\bin"; Check: not Is64BitInstallMode
Source: "{#ThirdPartyDir}\3rdParty\bin\CrashRpt1403.dll"; DestDir: "{app}\bin"; Check: not Is64BitInstallMode
Source: "{#ThirdPartyDir}\3rdParty\bin\crashrpt_lang.ini"; DestDir: "{app}\bin"; Check: not Is64BitInstallMode
Source: "{#ThirdPartyDir}\3rdParty\bin\CrashSender1403.exe"; DestDir: "{app}\bin"; Check: not Is64BitInstallMode
Source: "{#VCInstallDir}\redist\x86\Microsoft.VC140.CRT\*.dll"; DestDir: "{app}\bin"; Check: not Is64BitInstallMode
; 64 bits install
Source: "{#InstallDir64}\bin\*.*"; DestDir: "{app}\bin"; Excludes: "{#ExcludedBinaries}"; Flags: ignoreversion recursesubdirs; Check: Is64BitInstallMode
;locale only exists for fgrun - which has been disabled
;Source: "{#InstallDir64}\share\locale\*"; DestDir: "{app}\bin\locale"; Flags: ignoreversion recursesubdirs; Check: Is64BitInstallMode
Source: "{#ThirdPartyDir}\3rdParty.x64\bin\zlib.dll"; DestDir: "{app}\bin"; Check: Is64BitInstallMode
Source: "{#ThirdPartyDir}\3rdParty.x64\bin\OpenAL32.dll"; DestDir: "{app}\bin"; Check: Is64BitInstallMode
Source: "{#ThirdPartyDir}\3rdParty.x64\bin\libpng.dll"; DestDir: "{app}\bin"; Check: Is64BitInstallMode
Source: "{#ThirdPartyDir}\3rdParty.x64\bin\libcurl.dll"; DestDir: "{app}\bin"; Check: Is64BitInstallMode
Source: "{#ThirdPartyDir}\3rdParty.x64\bin\libintl-8.dll"; DestDir: "{app}\bin"; Check: Is64BitInstallMode
Source: "{#ThirdPartyDir}\3rdParty.x64\bin\CrashRpt1403.dll"; DestDir: "{app}\bin"; Check: Is64BitInstallMode
Source: "{#ThirdPartyDir}\3rdParty.x64\bin\crashrpt_lang.ini"; DestDir: "{app}\bin"; Check: Is64BitInstallMode
Source: "{#ThirdPartyDir}\3rdParty.x64\bin\CrashSender1403.exe"; DestDir: "{app}\bin"; Check: Is64BitInstallMode
Source: "{#VCInstallDir}\redist\x64\Microsoft.VC140.CRT\*.dll"; DestDir: "{app}\bin"; Check: Is64BitInstallMode
; 32/64 bits install
;NOTE: FGPanel has no 64 bits equivalent, so we are using the 32 bits binary for 32&64 bits OS
;Torsten 2017-02-21: currently no FGPanel due to missing glew dependency
;Source: "{#InstallDir32}\bin\fgpanel.exe"; DestDir: "{app}\bin"; Flags: ignoreversion
; Include the base package
#if IncludeData == "TRUE"
Source: "X:\fgdata\*.*"; DestDir: "{app}\data"; Flags: ignoreversion recursesubdirs skipifsourcedoesntexist
#endif
; 32 bits install
Source: "{#OSGInstallDir}\bin\osg{#OSGSoNumber}-osg.dll"; DestDir: "{app}\bin"; Check: not Is64BitInstallMode
Source: "{#OSGInstallDir}\bin\osg{#OSGSoNumber}-osgDB.dll"; DestDir: "{app}\bin"; Check: not Is64BitInstallMode
Source: "{#OSGInstallDir}\bin\osg{#OSGSoNumber}-osgGA.dll"; DestDir: "{app}\bin"; Check: not Is64BitInstallMode
Source: "{#OSGInstallDir}\bin\osg{#OSGSoNumber}-osgParticle.dll"; DestDir: "{app}\bin"; Check: not Is64BitInstallMode
Source: "{#OSGInstallDir}\bin\osg{#OSGSoNumber}-osgText.dll"; DestDir: "{app}\bin"; Check: not Is64BitInstallMode
Source: "{#OSGInstallDir}\bin\osg{#OSGSoNumber}-osgUtil.dll"; DestDir: "{app}\bin"; Check: not Is64BitInstallMode
Source: "{#OSGInstallDir}\bin\osg{#OSGSoNumber}-osgViewer.dll"; DestDir: "{app}\bin"; Check: not Is64BitInstallMode
Source: "{#OSGInstallDir}\bin\osg{#OSGSoNumber}-osgSim.dll"; DestDir: "{app}\bin"; Check: not Is64BitInstallMode
Source: "{#OSGInstallDir}\bin\osg{#OSGSoNumber}-osgFX.dll"; DestDir: "{app}\bin"; Check: not Is64BitInstallMode
Source: "{#OSGInstallDir}\bin\ot{#OTSoNumber}-OpenThreads.dll"; DestDir: "{app}\bin"; Check: not Is64BitInstallMode
Source: "{#OSGPluginsDir}\osgdb_ac.dll"; DestDir: "{app}\bin\osgPlugins-{#OSGVersion}"; Check: not Is64BitInstallMode
Source: "{#OSGPluginsDir}\osgdb_osg.dll"; DestDir: "{app}\bin\osgPlugins-{#OSGVersion}"; Check: not Is64BitInstallMode
Source: "{#OSGPluginsDir}\osgdb_osga.dll"; DestDir: "{app}\bin\osgPlugins-{#OSGVersion}"; Check: not Is64BitInstallMode
Source: "{#OSGPluginsDir}\osgdb_3ds.dll"; DestDir: "{app}\bin\osgPlugins-{#OSGVersion}"; Check: not Is64BitInstallMode
Source: "{#OSGPluginsDir}\osgdb_mdl.dll"; DestDir: "{app}\bin\osgPlugins-{#OSGVersion}"; Check: not Is64BitInstallMode
Source: "{#OSGPluginsDir}\osgdb_jpeg.dll"; DestDir: "{app}\bin\osgPlugins-{#OSGVersion}"; Check: not Is64BitInstallMode
Source: "{#OSGPluginsDir}\osgdb_rgb.dll"; DestDir: "{app}\bin\osgPlugins-{#OSGVersion}"; Check: not Is64BitInstallMode
Source: "{#OSGPluginsDir}\osgdb_png.dll"; DestDir: "{app}\bin\osgPlugins-{#OSGVersion}"; Check: not Is64BitInstallMode
Source: "{#OSGPluginsDir}\osgdb_dds.dll"; DestDir: "{app}\bin\osgPlugins-{#OSGVersion}"; Check: not Is64BitInstallMode
Source: "{#OSGPluginsDir}\osgdb_txf.dll"; DestDir: "{app}\bin\osgPlugins-{#OSGVersion}"; Check: not Is64BitInstallMode
Source: "{#OSGPluginsDir}\osgdb_tiff.dll"; DestDir: "{app}\bin\osgPlugins-{#OSGVersion}"; Check: not Is64BitInstallMode
Source: "{#OSGPluginsDir}\osgdb_freetype.dll"; DestDir: "{app}\bin\osgPlugins-{#OSGVersion}"; Check: not Is64BitInstallMode
;Source: "{#OSGPluginsDir}\osgdb_serializers_osg.dll"; DestDir: "{app}\bin\osgPlugins-{#OSGVersion}"; Check: not Is64BitInstallMode
;Source: "{#OSGPluginsDir}\osgdb_serializers_osganimation.dll"; DestDir: "{app}\bin\osgPlugins-{#OSGVersion}"; Check: not Is64BitInstallMode
;Source: "{#OSGPluginsDir}\osgdb_serializers_osgfx.dll"; DestDir: "{app}\bin\osgPlugins-{#OSGVersion}"; Check: not Is64BitInstallMode
;Source: "{#OSGPluginsDir}\osgdb_serializers_osgmanipulator.dll"; DestDir: "{app}\bin\osgPlugins-{#OSGVersion}"; Check: not Is64BitInstallMode
;Source: "{#OSGPluginsDir}\osgdb_serializers_osgparticle.dll"; DestDir: "{app}\bin\osgPlugins-{#OSGVersion}"; Check: not Is64BitInstallMode
;Source: "{#OSGPluginsDir}\osgdb_serializers_osgshadow.dll"; DestDir: "{app}\bin\osgPlugins-{#OSGVersion}"; Check: not Is64BitInstallMode
;Source: "{#OSGPluginsDir}\osgdb_serializers_osgsim.dll"; DestDir: "{app}\bin\osgPlugins-{#OSGVersion}"; Check: not Is64BitInstallMode
;Source: "{#OSGPluginsDir}\osgdb_serializers_osgterrain.dll"; DestDir: "{app}\bin\osgPlugins-{#OSGVersion}"; Check: not Is64BitInstallMode
;Source: "{#OSGPluginsDir}\osgdb_serializers_osgtext.dll"; DestDir: "{app}\bin\osgPlugins-{#OSGVersion}"; Check: not Is64BitInstallMode
;Source: "{#OSGPluginsDir}\osgdb_serializers_osgvolume.dll"; DestDir: "{app}\bin\osgPlugins-{#OSGVersion}"; Check: not Is64BitInstallMode
;Source: "{#OSGPluginsDir}\osgdb_deprecated_osg.dll"; DestDir: "{app}\bin\osgPlugins-{#OSGVersion}"; Check: not Is64BitInstallMode
;Source: "{#OSGPluginsDir}\osgdb_deprecated_osgparticle.dll"; DestDir: "{app}\bin\osgPlugins-{#OSGVersion}"; Check: not Is64BitInstallMode
; 64 bits install
Source: "{#OSG64InstallDir}\bin\osg{#OSGSoNumber}-osg.dll"; DestDir: "{app}\bin"; Check: Is64BitInstallMode
Source: "{#OSG64InstallDir}\bin\osg{#OSGSoNumber}-osgDB.dll"; DestDir: "{app}\bin"; Check: Is64BitInstallMode
Source: "{#OSG64InstallDir}\bin\osg{#OSGSoNumber}-osgGA.dll"; DestDir: "{app}\bin"; Check: Is64BitInstallMode
Source: "{#OSG64InstallDir}\bin\osg{#OSGSoNumber}-osgParticle.dll"; DestDir: "{app}\bin"; Check: Is64BitInstallMode
Source: "{#OSG64InstallDir}\bin\osg{#OSGSoNumber}-osgText.dll"; DestDir: "{app}\bin"; Check: Is64BitInstallMode
Source: "{#OSG64InstallDir}\bin\osg{#OSGSoNumber}-osgUtil.dll"; DestDir: "{app}\bin"; Check: Is64BitInstallMode
Source: "{#OSG64InstallDir}\bin\osg{#OSGSoNumber}-osgViewer.dll"; DestDir: "{app}\bin"; Check: Is64BitInstallMode
Source: "{#OSG64InstallDir}\bin\osg{#OSGSoNumber}-osgSim.dll"; DestDir: "{app}\bin"; Check: Is64BitInstallMode
Source: "{#OSG64InstallDir}\bin\osg{#OSGSoNumber}-osgFX.dll"; DestDir: "{app}\bin"; Check: Is64BitInstallMode
Source: "{#OSG64InstallDir}\bin\ot{#OTSoNumber}-OpenThreads.dll"; DestDir: "{app}\bin"; Check: Is64BitInstallMode
Source: "{#OSG64PluginsDir}\osgdb_ac.dll"; DestDir: "{app}\bin\osgPlugins-{#OSGVersion}"; Flags: skipifsourcedoesntexist; Check: Is64BitInstallMode
Source: "{#OSG64PluginsDir}\osgdb_osg.dll"; DestDir: "{app}\bin\osgPlugins-{#OSGVersion}"; Flags: skipifsourcedoesntexist; Check: Is64BitInstallMode
Source: "{#OSG64PluginsDir}\osgdb_osga.dll"; DestDir: "{app}\bin\osgPlugins-{#OSGVersion}"; Flags: skipifsourcedoesntexist; Check: Is64BitInstallMode
Source: "{#OSG64PluginsDir}\osgdb_3ds.dll"; DestDir: "{app}\bin\osgPlugins-{#OSGVersion}"; Flags: skipifsourcedoesntexist; Check: Is64BitInstallMode
Source: "{#OSG64PluginsDir}\osgdb_mdl.dll"; DestDir: "{app}\bin\osgPlugins-{#OSGVersion}"; Flags: skipifsourcedoesntexist; Check: Is64BitInstallMode
Source: "{#OSG64PluginsDir}\osgdb_jpeg.dll"; DestDir: "{app}\bin\osgPlugins-{#OSGVersion}"; Flags: skipifsourcedoesntexist; Check: Is64BitInstallMode
Source: "{#OSG64PluginsDir}\osgdb_rgb.dll"; DestDir: "{app}\bin\osgPlugins-{#OSGVersion}"; Flags: skipifsourcedoesntexist; Check: Is64BitInstallMode
Source: "{#OSG64PluginsDir}\osgdb_png.dll"; DestDir: "{app}\bin\osgPlugins-{#OSGVersion}"; Flags: skipifsourcedoesntexist; Check: Is64BitInstallMode
Source: "{#OSG64PluginsDir}\osgdb_dds.dll"; DestDir: "{app}\bin\osgPlugins-{#OSGVersion}"; Flags: skipifsourcedoesntexist; Check: Is64BitInstallMode
Source: "{#OSG64PluginsDir}\osgdb_txf.dll"; DestDir: "{app}\bin\osgPlugins-{#OSGVersion}"; Flags: skipifsourcedoesntexist; Check: Is64BitInstallMode
Source: "{#OSG64PluginsDir}\osgdb_tiff.dll"; DestDir: "{app}\bin\osgPlugins-{#OSGVersion}"; Flags: skipifsourcedoesntexist; Check: Is64BitInstallMode
Source: "{#OSG64PluginsDir}\osgdb_freetype.dll"; DestDir: "{app}\bin\osgPlugins-{#OSGVersion}"; Flags: skipifsourcedoesntexist; Check: Is64BitInstallMode
;Source: "{#OSG64PluginsDir}\osgdb_serializers_osg.dll"; DestDir: "{app}\bin\osgPlugins-{#OSGVersion}"; Flags: skipifsourcedoesntexist; Check: Is64BitInstallMode
;Source: "{#OSG64PluginsDir}\osgdb_serializers_osganimation.dll"; DestDir: "{app}\bin\osgPlugins-{#OSGVersion}"; Flags: skipifsourcedoesntexist; Check: Is64BitInstallMode
;Source: "{#OSG64PluginsDir}\osgdb_serializers_osgfx.dll"; DestDir: "{app}\bin\osgPlugins-{#OSGVersion}"; Flags: skipifsourcedoesntexist; Check: Is64BitInstallMode
;Source: "{#OSG64PluginsDir}\osgdb_serializers_osgmanipulator.dll"; DestDir: "{app}\bin\osgPlugins-{#OSGVersion}"; Flags: skipifsourcedoesntexist; Check: Is64BitInstallMode
;Source: "{#OSG64PluginsDir}\osgdb_serializers_osgparticle.dll"; DestDir: "{app}\bin\osgPlugins-{#OSGVersion}"; Flags: skipifsourcedoesntexist; Check: Is64BitInstallMode
;Source: "{#OSG64PluginsDir}\osgdb_serializers_osgshadow.dll"; DestDir: "{app}\bin\osgPlugins-{#OSGVersion}"; Flags: skipifsourcedoesntexist; Check: Is64BitInstallMode
;Source: "{#OSG64PluginsDir}\osgdb_serializers_osgsim.dll"; DestDir: "{app}\bin\osgPlugins-{#OSGVersion}"; Flags: skipifsourcedoesntexist; Check: Is64BitInstallMode
;Source: "{#OSG64PluginsDir}\osgdb_serializers_osgterrain.dll"; DestDir: "{app}\bin\osgPlugins-{#OSGVersion}"; Flags: skipifsourcedoesntexist; Check: Is64BitInstallMode
;Source: "{#OSG64PluginsDir}\osgdb_serializers_osgtext.dll"; DestDir: "{app}\bin\osgPlugins-{#OSGVersion}"; Flags: skipifsourcedoesntexist; Check: Is64BitInstallMode
;Source: "{#OSG64PluginsDir}\osgdb_serializers_osgvolume.dll"; DestDir: "{app}\bin\osgPlugins-{#OSGVersion}"; Flags: skipifsourcedoesntexist; Check: Is64BitInstallMode
;Source: "{#OSG64PluginsDir}\osgdb_deprecated_osg.dll"; DestDir: "{app}\bin\osgPlugins-{#OSGVersion}"; Flags: skipifsourcedoesntexist; Check: Is64BitInstallMode
;Source: "{#OSG64PluginsDir}\osgdb_deprecated_osgparticle.dll"; DestDir: "{app}\bin\osgPlugins-{#OSGVersion}"; Flags: skipifsourcedoesntexist; Check: Is64BitInstallMode
[Languages]
Name: "en"; MessagesFile: "compiler:Default.isl"; InfoBeforeFile: "{#FgHarnessPath}\windows\info-before-en.txt"
Name: "pl"; MessagesFile: "compiler:Languages\Polish.isl"; InfoBeforeFile: "{#FgHarnessPath}\windows\info-before-pl.txt"
Name: "es"; MessagesFile: "compiler:Languages\Spanish.isl";
Name: "nl"; MessagesFile: "compiler:Languages\Dutch.isl";
Name: "de"; MessagesFile: "compiler:Languages\German.isl";
[Dirs]
; Make the user installable scenery directory
Name: "{userdocs}\FlightGear\Aircraft"; Permissions: everyone-modify; Check: not DirExists(ExpandConstant('{userdocs}\FlightGear\Aircraft'))
Name: "{userdocs}\FlightGear\TerraSync"; Permissions: everyone-modify; Check: not DirExists(ExpandConstant('{userdocs}\FlightGear\TerraSync'))
Name: "{userdocs}\FlightGear\Custom Scenery"; Permissions: everyone-modify; Check: not DirExists(ExpandConstant('{userdocs}\FlightGear\Custom Scenery'))
Name: "{%USERPROFILE}\FlightGear\Downloads"; Permissions: creatorowner-modify; Check: not DirExists(ExpandConstant('{%USERPROFILE}\FlightGear\Downloads'))
Name: "{%USERPROFILE}\FlightGear\Custom Aircraft"; Permissions: creatorowner-modify; Check: not DirExists(ExpandConstant('{%USERPROFILE}\FlightGear\Custom Aircraft'))
Name: "{%USERPROFILE}\FlightGear\Custom Scenery"; Permissions: creatorowner-modify; Check: not DirExists(ExpandConstant('{%USERPROFILE}\FlightGear\Custom Scenery'))
[Icons]
Name: "{userdesktop}\FlightGear {#FGVersion}"; Filename: "{app}\bin\fgfs.exe"; Parameters: "--launcher"; WorkingDir: "{app}\bin"; Tasks: desktopicon;
Name: "{group}\FlightGear"; Filename: "{app}\bin\fgfs.exe"; Parameters: "--launcher"; WorkingDir: "{app}\bin";
Name: "{userdesktop}\FlightGear {#FGVersionGroup}"; Filename: "{app}\bin\fgfs.exe"; Parameters: "--launcher"; WorkingDir: "{app}\bin"; Tasks: desktopicon;
Name: "{group}\FlightGear {#FGVersionGroup}"; Filename: "{app}\bin\fgfs.exe"; Parameters: "--launcher"; WorkingDir: "{app}\bin";
Name: "{group}\FlightGear Manual"; Filename: "{app}\data\Docs\getstart.pdf"
Name: "{group}\FlightGear Documentation"; Filename: "{app}\data\Docs\index.html"
Name: "{group}\Flightgear Wiki"; Filename: "http://wiki.flightgear.org"
Name: "{group}\Tools\Uninstall FlightGear"; Filename: "{uninstallexe}"
Name: "{group}\Tools\Uninstall FlightGear {#FGVersion}"; Filename: "{uninstallexe}"
Name: "{group}\Tools\fgjs"; Filename: "cmd"; Parameters: "/k fgjs.exe ""--fg-root={app}\data"""; WorkingDir: "{app}\bin"
Name: "{group}\Tools\yasim"; Filename: "cmd"; Parameters: "/k ""{app}\bin\yasim.exe"" -h"; WorkingDir: "{app}\bin"
;Name: "{group}\Tools\fgpanel"; Filename: "cmd"; Parameters: "/k ""{app}\bin\fgpanel.exe"" -h"; WorkingDir: "{app}\bin"
Name: "{group}\Tools\fgpanel"; Filename: "cmd"; Parameters: "/k ""{app}\bin\fgpanel.exe"" -h"; WorkingDir: "{app}\bin"
Name: "{group}\Tools\FGCom"; Filename: "{app}\bin\fgcom.exe"; WorkingDir: "{app}\bin"
Name: "{group}\Tools\FGCom-testing"; Filename: "{app}\bin\fgcom.exe"; Parameters: "--frequency=910"; WorkingDir: "{app}\bin"
Name: "{group}\Tools\Explore Documentation Folder"; Filename: "{app}\data\Docs"
@ -334,6 +233,62 @@ begin
end;
end;
var
UninstallCheckCleanPage: TNewNotebookPage;
UninstallBackButton: TNewButton;
UninstallNextButton: TNewButton;
DoCleanCheckbox : TNewCheckBox;
CleanHelp : TNewStaticText;
procedure InitializeUninstallProgressForm();
begin
UninstallCheckCleanPage := TNewNotebookPage.Create(UninstallProgressForm);
UninstallCheckCleanPage.Notebook := UninstallProgressForm.InnerNotebook;
UninstallCheckCleanPage.Parent := UninstallProgressForm.InnerNotebook;
UninstallCheckCleanPage.Align := alClient
DoCleanCheckbox := TNewCheckBox.Create(UninstallProgressForm);
DoCleanCheckbox.Parent := UninstallCheckCleanPage;
DoCleanCheckbox.Caption := ExpandConstant('{cm:RemoveAllSettings}');
DoCleanCheckbox.Left := ScaleX(10);
DoCleanCheckbox.Top := ScaleY(10);
DoCleanCheckbox.Width := UninstallProgressForm.InnerNotebook.Width - ScaleX(20)
DoCleanCheckbox.Height := ScaleY(30)
CleanHelp := TNewStaticText.Create(UninstallProgressForm);
CleanHelp.Parent := UninstallCheckCleanPage;
CleanHelp.Top := DoCleanCheckbox.Top + DoCleanCheckbox.Height + ScaleY(10);
CleanHelp.Left := DoCleanCheckbox.Left;
CleanHelp.Width := DoCleanCheckbox.Width;
CleanHelp.Height := CleanHelp.AdjustHeight();
CleanHelp.WordWrap := True;
CleanHelp.Caption := ExpandConstant('{cm:RemoveAllSettingsDescription}');
UninstallProgressForm.InnerNotebook.ActivePage := UninstallCheckCleanPage;
UninstallNextButton := TNewButton.Create(UninstallProgressForm);
UninstallNextButton.Caption := 'Next';
UninstallNextButton.Parent := UninstallProgressForm;
UninstallNextButton.Left :=
UninstallProgressForm.CancelButton.Left -
UninstallProgressForm.CancelButton.Width -
ScaleX(10);
UninstallNextButton.Top := UninstallProgressForm.CancelButton.Top;
UninstallNextButton.Width := UninstallProgressForm.CancelButton.Width;
UninstallNextButton.Height := UninstallProgressForm.CancelButton.Height;
UninstallNextButton.ModalResult := mrOk;
UninstallProgressForm.CancelButton.Enabled := True;
UninstallProgressForm.CancelButton.ModalResult := mrCancel;
if UninstallProgressForm.ShowModal = mrCancel then Abort;
UninstallProgressForm.InnerNotebook.ActivePage := UninstallProgressForm.InstallingPage;
end;
procedure CurStepChanged(CurStep: TSetupStep);
var
Version: TWindowsVersion;
@ -344,10 +299,10 @@ begin
if (Version.Major >= 6) then
begin
{ IN and OUT rules must be specified separately, otherwise the firewall will create only the IN rule }
AddAdvancedFirewallException('FlightGear', 'Allows FlightGear to send and receive data over the multiplayer network and to get METARs.', ExpandConstant('{app}') + '\bin\fgfs.exe', NET_FW_IP_PROTOCOL_ALL, '', '', NET_FW_RULE_DIR_IN);
AddAdvancedFirewallException('FlightGear', 'Allows FlightGear to send and receive data over the multiplayer network and to get METARs.', ExpandConstant('{app}') + '\bin\fgfs.exe', NET_FW_IP_PROTOCOL_ALL, '', '', NET_FW_RULE_DIR_OUT);
AddAdvancedFirewallException('FlightGear FGCom', 'Allows FGCom to establish a connection to FlightGear and the VoIP server for voice ATC communication.', ExpandConstant('{app}') + '\bin\fgcom.exe', NET_FW_IP_PROTOCOL_ALL, '', '', NET_FW_RULE_DIR_IN);
AddAdvancedFirewallException('FlightGear FGCom', 'Allows FGCom to establish a connection to FlightGear and the VoIP server for voice ATC communication.', ExpandConstant('{app}') + '\bin\fgcom.exe', NET_FW_IP_PROTOCOL_ALL, '', '', NET_FW_RULE_DIR_OUT);
AddAdvancedFirewallException('FlightGear', ExpandConstant('{cm:FirewallFgException}'), ExpandConstant('{app}') + '\bin\fgfs.exe', NET_FW_IP_PROTOCOL_ALL, '', '', NET_FW_RULE_DIR_IN);
AddAdvancedFirewallException('FlightGear', ExpandConstant('{cm:FirewallFgException}'), ExpandConstant('{app}') + '\bin\fgfs.exe', NET_FW_IP_PROTOCOL_ALL, '', '', NET_FW_RULE_DIR_OUT);
AddAdvancedFirewallException('FlightGear FGCom', ExpandConstant('{cm:FirewallFgcomException}'), ExpandConstant('{app}') + '\bin\fgcom.exe', NET_FW_IP_PROTOCOL_ALL, '', '', NET_FW_RULE_DIR_IN);
AddAdvancedFirewallException('FlightGear FGCom', ExpandConstant('{cm:FirewallFgcomException}'), ExpandConstant('{app}') + '\bin\fgcom.exe', NET_FW_IP_PROTOCOL_ALL, '', '', NET_FW_RULE_DIR_OUT);
end
else if (Version.Major = 5) and (((Version.Minor = 1) and (Version.ServicePackMajor >= 2)) or ((Version.Minor = 2) and (Version.ServicePackMajor >= 1))) then
begin
@ -359,7 +314,18 @@ begin
end;
procedure CurUninstallStepChanged(CurUninstallStep: TUninstallStep);
var ResultCode: Integer;
begin
if CurUninstallStep = usUninstall then
begin
if DoCleanCheckbox.Checked = True then
begin
Log('Running clean uninstall');
Exec(ExpandConstant('{app}\bin\fgfs.exe'), '--uninstall', '', SW_HIDE, ewWaitUntilTerminated, ResultCode);
Log('clean uninstall completed');
end;
end;
if CurUninstallStep = usPostUninstall then
begin
RemoveFirewallException('FlightGear', ExpandConstant('{app}') + '\bin\fgfs.exe');

View File

@ -15,7 +15,7 @@
<key>CFBundleExecutable</key>
<string>fgfs</string>
<key>CFBundleIdentifier</key>
<string>org.flightgear.FlightGear</string>
<string><%= fgBundleIdentifier %></string>
<key>CFBundleVersion</key>
<string><%= fgVersion %></string>
<key>CFBundleShortVersionString</key>

View File

@ -1,96 +1,123 @@
# Nasa2FGearthview
A bash-script to convert NASA satellite images to ready-to-use
textures for FG's EarthView using ImageMagick.
textures for FG's EarthView using ImageMagick and normalmap
For info about FGearthview, see the forum thread:
You can get "normalmap" there:
https://github.com/planrich/normalmap
For info about FGearthview, see the forum thread:\
https://forum.flightgear.org/viewtopic.php?f=6&t=15754
or this FG-wiki-page:
or this FG-wiki-page:\
http://wiki.flightgear.org/Earthview
### Caution!
Don't use this script on a server! It will most likely cause
Denial-of-service (DoS). When working on these huge images, the
harddisk throughput will cease occasionally and CPU / RAM usage will
spike tremendously! So, only use this script on your home desktop
computer, or if you don't mind several long server-outages...
------------------------------------
About:
## About:
This script runs on Linux (maybe Mac also?) in a Bash
(Bourne Again Shell) - Windows is not supported (by the nature of the
script). Maybe it works on windows as well, I don't know, feel free
to try, and please let me know! :)
This will download the raw images from http://visibleearth.nasa.gov -
their server is not very fast, so I provide an alternative download
location: https://musicchris.de/download/FG/EarthView/raw-data-NASA.7z
This one is much quicker! If you really want the images directly from
NASA, then provide "nasa" to the script (see below)
In the end you will have 8 world-textures in .png and .dds format.
Generally .dds is better in performance, but it won't work on some
graphics cards. If this is the case for you, then try the .png files.
For further information see:
For further information see:\
http://wiki.flightgear.org/index.php?title=DDS_Textures_in_FlightGear&redirect=no
If you also converted the clouds, then you'll also find 8 cloud-
textures in the format .png. Because the .dds-format has trouble with
rendering heavy alpha images, which is because of it's compression
algorythm [1], I think it's useless to also build faulty files.
However, this is not entirely true! It is possible to switch off the
.dds/DXT compression. But this results in huge files and is rather
heavy on the GPU's RAM.
If you also converted the clouds and the height maps, then you'll also
find 8 cloud- and 8 height textures (as well as their conversion to
normal maps) in the format .png. Because the .dds-format has trouble
with rendering heavy alpha images, which is because of it's
compression algorythm [1], I think it's useless to also build faulty
files. However, this is not entirely true! It is possible to switch
off the .dds/DXT compression. But this results in huge files and is
rather heavy on the GPU's RAM.
Buckaroo has created a nice overview on dds-compression:
[1] http://www.buckarooshangar.com/flightgear/tut_dds.html
------------------------------------
Installation and usage:
## Installation and usage:
Simply copy "convert.sh" into a folder of your liking and run it:
$ ./convert.sh
```shell
./convert.sh
```
This will show a help text, since you didn't specify any target(s).
Possible targets are:
* world
* clouds
* heights
* all
Additionally, there are some options you could specify (further
explained below):
* 1k | 2k | 4k | 8k | 16k
* nasa
* no-download
* download | no-download
* world
* clouds
* heights
* cleanup
* rebuild
* check
So your call could look sth like this:
$ ./convert.sh world no-download cleanup 8k
```shell
./convert.sh world download alt cleanup 8k
```
------------------------------------
Requirements:
## Requirements:
WARNING!
This script uses a *lot* disk space! Make sure you have at least 90GB
available!
This script uses a *lot* disk space! In my last test run, which
generated all maps in all resolutions, the disk usage was about 330GB!
Beware!\
Also, I wouldn't recommend doing this on a SSD! While SSDs are
generally faster, they also get more wear-and-tear when write such
huge files. So this script might cause your SSD to die earlier as it
should. Generally speaking, this won't kill your SSD, but it might
cause it to die earlier. HDDs are much more robust in that respect.
Also, this script will run for a *very long* time! It might be best to
let it run over night - your computer might become unresponsive from
time to time, due to the heavy CPU and memory load, which tends to
occur, when converting 54000x27000 images. ;-)
I also recommend to deactivate swapping!
$ sudo swapoff -a
To reactivate swapping do:
$ sudo swapon -a
This script relies on wget and imagemagick. Both are easily installed
by your systems package-management-system.
(On Debian/Ubuntu this is "apt-get")
I also recommend to deactivate swapping!
```shell
sudo swapoff -a
```
To reactivate swapping do:
```shell
$ sudo swapon -a
```
This script relies on wget, ImageMagick and, for converting the height
maps to normal maps, on "normalmap". Some of these programs are easily
installed by your systems package-management-system.\ (On
Debian/Ubuntu this is "apt-get").
So, on Debian for instance, you only need to put the following into
the console:
$ sudo apt-get install wget imagemagick
```shell
sudo apt-get install wget imagemagick
```
Depending on your distro, the package names might differ slightly! Use
a search engine of your choice to find out, how the packages are named
@ -98,70 +125,92 @@ in your distro!
You may want to check:
$ apt search imagemagick
```shell
apt search imagemagick
```
### IMPORTANT!
Check out your ```/etc/ImageMagick-6/policy.xml```
On some distros, there are limits set, which will cause IM to abort
the conversion of images larger than
[rediculously small images](https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=860763).
Edit and set to our needs:
* width: at least 55000
* height: at least 55000
* area: less than your free RAM
### Normalmap
For normalmap, you can download and compile it from
https://github.com/planrich/normalmap
You can install the binary into your system, or just copy it next to
convert.sh - both should work.
------------------------------------
Targets:
## Targets:
world
Generates the world tiles, needed to run FG with EarthView.
You will find the results in output/[$resolution]/*. Copy
these into $FGDATA/Models/Astro/*. More about the installation
of these textures can be found here:
http://wiki.flightgear.org/Earthview#Customization
**world**\
Generates the world tiles, needed to run FG with EarthView.
You will find the results in output/[$resolution]/\*. Copy
these into $FGDATA/Models/Astro/\*. More about the installation
of these textures can be found here:
http://wiki.flightgear.org/Earthview#Customization
clouds
Generates the cloud tiles, needed to run FG with EarthView.
The locations are the same as the other textures mentioned
above. Note that clouds are only available with up to 8k
resolution, due to the available data at NASA.
**clouds**\
Generates the cloud tiles, needed to run FG with EarthView.
The locations are the same as the other textures mentioned
above. Note that clouds are only available with up to 8k
resolution, due to the available data at NASA.
all
Converts everything needed for a full-blown earthview texture
set. Does the same as:
$ ./convert.sh world clouds
**heights**\
Generates the height tiles, which are then converted to the
normal maps needed to run FG with EarthView. The locations are
the same as the other textures mentioned above. Note that
heights are only available with up to 8k resolution, due to the
available data at NASA.
**all**\
Converts everything needed for a full-blown earthview texture
set. Does the same as:
```./convert.sh world clouds heights```
Options:
## Options:
1k | 2k | 4k | 8k | 16k
Lets you specify a desired resolution of the textures.
Possible values are 1k, 2k, 4k, 8k and 16k. If nothing is
specified, the script will generate all of the resolutions.
16k is only available for earth textures.
**1k | 2k | 4k | 8k | 16k**\
Lets you specify a desired resolution of the textures.
Possible values are 1k, 2k, 4k, 8k and 16k. If nothing is
specified, the script will generate all of the resolutions.
16k is recommended only for earth textures, it will induce
oversampling from clouds and height maps.
nasa
Causes the script to download directly from
http://visibleearth.nasa.gov . If omitted the script will
download from
https://musicchris.de/download/FG/EarthView/raw-data-NASA.7z
which is much faster!
Uses wget either way.
**download**\
Causes the script to download the needed data, this is the
default behavior (and can be omitted).
no-download
Causes the script to skip the download function. If you
already have the source images, then you don't need to
re-download them. (About 2.4GB!)
If omitted, the script will download the source images from
https://musicchris.de/download/FG/EarthView/raw-data-NASA.7z
**no-download**\
Causes the script to skip the download function. If you
already have the source images, then you don't need to
re-download them. (About 2.4GB!)
If omitted, the script will download the source images from
the default location.
cleanup
Deletes the temporary files created during texture generation.
These can be found in tmp/
Note: if for some reason you later want some other resolution,
then it's good to have the data there. So only do this, when
you're quite sure that you're done.
Frees up a lot of disk-space! Which would have to be
regenerated if needed again.
**cleanup**\
Deletes the temporary files created during texture generation.
These can be found in tmp/
Note: if for some reason you later want some other resolution,
then it's good to have the data there. So only do this, when
you're quite sure that you're done.
Frees up a lot of disk-space! Which would have to be
regenerated if needed again.
rebuild
Deletes only the temporary files of the given target. So if
you call './convert.sh rebuild world' the script will delete
all corresponding temp-files of the target world, which will
trigger a complete regeneration of the relevant (instead of
skipping existing files)
**rebuild**\
Deletes only the temporary files of the given target. So if
you call ```./convert.sh rebuild world``` the script will delete
all corresponding temp-files of the target world, which will
trigger a complete regeneration of the relevant (instead of
skipping existing files)
check
Creates mosaics of the tiles, so you can look at them and see
if all went well.
**check**\
Creates mosaics of the tiles, so you can look at them and see
if all went well.

File diff suppressed because it is too large Load Diff

167
build_appimage.sh Executable file
View File

@ -0,0 +1,167 @@
#!/bin/bash
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
# builds Appimage on Centos 7 using linuxdeployqt from continuous build
# expects to work in $WORKSPACE, uses the contents of dist/{bin,share,lib64} copied into an appdir
# missing qt plugins are copied in manually, as are osgPlugins
# libcurl in SIMGEAR needs a setting to find the tls certificate, and OSG needs LD_LIBRARY_PATH so it can find osgPlugins
# currently not including FGDATA, but this could be done easily once FG is updated to change Nav database checks from path to some kind of checksum
#
# issues/errors:
# can't find qt translations - missing something in my build?
#
# errors/comments to enrogue@gmail.com
#clean up any previous build
rm -rf appdir
#create basic structure
mkdir -p appdir/usr/bin
mkdir -p appdir/usr/lib
mkdir -p appdir/usr/share
mkdir -p appdir/usr/qml
mkdir -p appdir/usr/ssl
#copy everything we need in
cp dist/bin/* appdir/usr/bin
cp -d dist/lib64/* appdir/usr/lib
# OSG 3.6 uses lib, not lib64
cp -d dist/lib/* appdir/usr/lib
cp -a dist/lib/osgPlugins-3.6.5 appdir/usr/lib
# adjust the rpath on the copied plugins, so they don't
# require LD_LIBRARY_PATH to be set to load their dependencies
# correctly
patchelf --set-rpath \$ORIGIN/../ appdir/usr/lib/osgPlugins-3.6.5/*.so
cp -r dist/share appdir/usr
# FIXME : only copy the QML plugins we actually need
#cp -a /usr/lib64/qt5/qml/QtQuick* appdir/usr/qml
#cp -a /usr/lib64/qt5/qml/QtQml* appdir/usr/qml
cp /usr/lib64/libsoftokn3.* appdir/usr/lib
cp /usr/lib64/libnsspem.so appdir/usr/lib
cp /usr/lib64/libfreebl* appdir/usr/lib
cp -a /usr/lib64/liblzma* appdir/usr/lib
cp /etc/pki/tls/certs/ca-bundle.crt appdir/usr/ssl/cacert.pem
# HarfBuzz is in /lib64 on CentOS, but still copy it: see
# https://sourceforge.net/p/flightgear/codetickets/2590/
cp -a /lib64/libharfbuzz.so* appdir/usr/lib
# as we are copying over libharfbuzz we need the older libfontconfig,
# libfreetype & libpng15 as 2.11 breaks compatibility: see
# https://sourceforge.net/p/flightgear/codetickets/2651/
cp -a /usr/lib64/libfontconfig.so* appdir/usr/lib
cp -a /usr/lib64/libfreetype.so* appdir/usr/lib
cp -a /usr/lib64/libpng15.so* appdir/usr/lib
patchelf --set-rpath \$ORIGIN appdir/usr/lib/libfontconfig.so*
patchelf --set-rpath \$ORIGIN appdir/usr/lib/libfreetype.so*
patchelf --set-rpath \$ORIGIN appdir/usr/lib/libharfbuzz.so*
#modify the desktop file so that linuxdeployqt doesn't barf (version to 1.0, add semicolon to end of certain line types)
sed -i 's/^Categor.*/&;/ ; s/^Keyword.*/&;/ ; s/1\.1/1\.0/' appdir/usr/share/applications/org.flightgear.FlightGear.desktop
#generate AppRun script
cat << 'EOF' > appdir/AppRun
#!/bin/bash
HERE="$(dirname "$(readlink -f "${0}")")"
BIN_DIR="${HERE}/usr/bin"
EXEC_OPT="--exec-app"
export SIMGEAR_TLS_CERT_PATH=$HERE/usr/ssl/cacert.pem
export OSG_LIBRARY_PATH=${HERE}/usr/lib
export LD_LIBRARY_PATH=${HERE}/usr/lib
# Run launcher directly if no parameters are passed
if [[ "$#" -eq "0" ]]; then
echo "Started with no arguments; assuming --launcher"
exec "${HERE}/usr/bin/fgfs" --launcher
exit "$?"
fi
# Check for special argument "--exec-app=" and execute selected application
if [[ "$1" == ${EXEC_OPT}=* ]] || [[ "$1" == "${EXEC_OPT}" ]]; then
OPT_VAL="${1#*=}"
APP_PATH="${BIN_DIR}/${OPT_VAL}"
# Call without arguments
if [[ "$1" == "${EXEC_OPT}" ]] || [[ -z "${OPT_VAL}" ]]; then
ERROR="1"
# Make sure executable name does not contain any "/"
elif [[ "${OPT_VAL}" == */* ]]; then
echo "Error: path separator \"/\" was used in application name!"
ERROR="1"
# Check if resulting file exists and is executable
elif [[ -z "$(find "${APP_PATH}" -type f \( \( -perm -00005 -a ! -user "$(id -u)" -a ! -group "$(id -g)" \) -o \( -perm -00500 -a -user "$(id -u)" \) -o \( -perm -00050 -a -group "$(id -g)" \) \) 2>/dev/null)" ]]; then
echo "Error: \"${OPT_VAL}\" is not a valid application name or cannot be executed by current user!"
ERROR="1"
fi
# In case of error or no arguments show help
if [[ ! -z "${ERROR}" ]]; then
# Determine AppImage's filename
IMAGE_FILE_NAME="$(basename "${APPIMAGE}" 2>/dev/null)"
if [[ -z "${IMAGE_FILE_NAME}" ]]; then
IMAGE_FILE_NAME="FlightGear.AppImage"
fi
# Print help
echo "Usage: ./${IMAGE_FILE_NAME} ${EXEC_OPT}=<application>"
echo "Pass ${EXEC_OPT} as first positional argument."
echo "Additional arguments are passed to the called application."
echo "Valid values for <application> are:"
while IFS= read -r -d $'\0' bin_exe; do
echo " $(basename "${bin_exe}")"
done < <( find "${BIN_DIR}/" -maxdepth 1 -type f \( \( -perm -00005 -a ! -user "$(id -u)" -a ! -group "$(id -g)" \) -o \( -perm -00500 -a -user "$(id -u)" \) -o \( -perm -00050 -a -group "$(id -g)" \) \) -exec printf "%s\0" "{}" \; )
# We have to use these odd find conditions since "find -executable" also lists non-executables when AppImage is executed. The reason is most likely the way it is mounted.
exit 1
fi
# Execute selected application and pass remaining parameters
# "pop" the first argument
shift
exec "${APP_PATH}" "$@"
else
exec "${HERE}/usr/bin/fgfs" "$@"
fi
EOF
chmod +x appdir/AppRun
#grab continuous linuxdeployqt
wget -c https://github.com/probonopd/linuxdeployqt/releases/download/7/linuxdeployqt-7-x86_64.AppImage
#wget -c https://github.com/probonopd/linuxdeployqt/releases/download/continuous/linuxdeployqt-continuous-x86_64.AppImage
chmod +x linuxdeployqt-7-x86_64.AppImage
#set VERSION for AppImage creation
export VERSION=`cat flightgear/flightgear-version`
# Add all executable binaries as additional binaries to AppImage and use special quoted array expansion
ADDITIONAL_EXES=()
while IFS= read -r -d $'\0' bin_exe; do
ADDITIONAL_EXES+=("-executable=${bin_exe}")
done < <( find "appdir/usr/bin/" -maxdepth 1 -type f \( \( -perm -00500 -o -perm -00050 -o -perm -00005 \) -a ! -name "fgfs" \) -exec printf "%s\0" "{}" \; )
# This find statement filters for all files with at least one executability bit set
./linuxdeployqt-7-x86_64.AppImage appdir/usr/share/applications/org.flightgear.FlightGear.desktop -appimage -qmldir=flightgear/src/GUI/qml/ "${ADDITIONAL_EXES[@]}"

View File

@ -5,7 +5,11 @@ if [ "$WORKSPACE" == "" ]; then
exit 1
fi
VERSION=`cat flightgear/version`
VERSION=`cat flightgear/flightgear-version`
#####################################################################################
# ensure fgrcc can run when linked against libSimGearCore, for example
export LD_LIBRARY_PATH=$WORKSPACE/dist/lib64:$WORKSPACE/dist/lib:$LD_LIBRARY_PATH
#####################################################################################
# remove old and create fresh build directories
@ -14,50 +18,42 @@ mkdir -p sgBuild
mkdir -p fgBuild
mkdir -p output
rm -rf output/*
rm -rf dist/*
#####################################################################################
echo "Starting on SimGear"
cd sgBuild
cmake -DCMAKE_INSTALL_PREFIX:PATH=$WORKSPACE/dist -DENABLE_DNS:BOOL="ON" -DSIMGEAR_SHARED:BOOL="ON" ../simgear
cmake -G Ninja -DCMAKE_INSTALL_PREFIX:PATH=$WORKSPACE/dist -DENABLE_DNS:BOOL="ON" -DSIMGEAR_SHARED:BOOL="ON" -DCMAKE_BUILD_TYPE=RelWithDebInfo ../simgear
# compile
make
ninja
if [ $? -ne '0' ]; then
echo "make simgear failed"
exit 1
fi
make install
ninja install
# build source package and copy to output
make package_source
ninja package_source
cp simgear-*.tar.bz2 ../output/.
#####################################################################################
echo "Starting on FlightGear"
cd ../fgBuild
cmake -DCMAKE_INSTALL_PREFIX:PATH=$WORKSPACE/dist -DSIMGEAR_SHARED:BOOL="ON" ../flightgear
cmake -G Ninja -DCMAKE_INSTALL_PREFIX:PATH=$WORKSPACE/dist -DSIMGEAR_SHARED:BOOL="ON" -DENABLE_SWIFT:BOOL=ON -DCMAKE_BUILD_TYPE=RelWithDebInfo -DFG_BUILD_TYPE=Release ../flightgear
# compile
make
ninja
if [ $? -ne '0' ]; then
echo "make flightgear failed"
exit 1
fi
make install
ninja install
# build source package and copy to output
make package_source
ninja package_source
cp flightgear-*.tar.bz2 ../output/.
#####################################################################################
echo "Assembling base package"
cd $WORKSPACE
tar cjf output/FlightGear-$VERSION-data.tar.bz2 fgdata/

View File

@ -1,5 +1,12 @@
IF NOT DEFINED WORKSPACE SET WORKSPACE=%~dp0
IF NOT DEFINED IS_NIGHTLY_BUILD SET IS_NIGHTLY_BUILD=1
IF %IS_NIGHTLY_BUILD% EQU 1 (
SET FGBUILDTYPE=Nightly
) ELSE (
SET FGBUILDTYPE=Release
)
REM following are for testing the script locally
REM SET PATH=%PATH%;%ProgramFiles%\CMake\bin;%ProgramFiles(x86)%\"Inno Setup 5"\
@ -7,56 +14,42 @@ REM SET QT5SDK32=C:\Qt\5.6\msvc2015
REM SET QT5SDK64=C:\Qt\5.6\msvc2015_64
REM SET IS_NIGHTLY_BUILD=1
SET OSG32=%WORKSPACE%\install\msvc140\OpenSceneGraph
SET OSG64=%WORKSPACE%\install\msvc140-64\OpenSceneGraph
REM 32bits
md build-sg32
md build-fg32
cd build-sg32
cmake ..\simgear -G "Visual Studio 14" ^
-DMSVC_3RDPARTY_ROOT=%WORKSPACE%/windows-3rd-party/msvc140 ^
-DBOOST_ROOT=%WORKSPACE%/windows-3rd-party ^
-DCMAKE_PREFIX_PATH:PATH=%OSG32% ^
-DCMAKE_INSTALL_PREFIX:PATH=%WORKSPACE%/install/msvc140
cmake --build . --config RelWithDebInfo --target INSTALL
SET VSGEN="Visual Studio 16 2019"
cd ..\build-fg32
cmake ..\flightgear -G "Visual Studio 14" ^
-DMSVC_3RDPARTY_ROOT=%WORKSPACE%/windows-3rd-party/msvc140 ^
-DCMAKE_INSTALL_PREFIX:PATH=%WORKSPACE%/install/msvc140 ^
-DCMAKE_PREFIX_PATH:PATH=%WORKSPACE%/install/msvc140/OpenSceneGraph ^
-DBOOST_ROOT=%WORKSPACE%/windows-3rd-party ^
-DCMAKE_PREFIX_PATH=%QT5SDK32%;%OSG32%
cmake --build . --config RelWithDebInfo --target INSTALL
cd ..
REM 64 bits
md build-sg64
md build-fg64
cd build-sg64
cmake ..\SimGear -G "Visual Studio 14 Win64" ^
cmake ..\SimGear -G %VSGEN% -A x64 ^
-DMSVC_3RDPARTY_ROOT=%WORKSPACE%/windows-3rd-party/msvc140 ^
-DBOOST_ROOT=%WORKSPACE%/windows-3rd-party ^
-DOSG_FSTREAM_EXPORT_FIXED=1 ^
-DCMAKE_PREFIX_PATH:PATH=%OSG64% ^
-DCMAKE_INSTALL_PREFIX:PATH=%WORKSPACE%/install/msvc140-64
cmake --build . --config RelWithDebInfo --target INSTALL
cd ..\build-fg64
cmake ..\flightgear -G "Visual Studio 14 Win64" ^
cmake ..\flightgear -G %VSGEN% -A x64 ^
-DMSVC_3RDPARTY_ROOT=%WORKSPACE%/windows-3rd-party/msvc140 ^
-DBOOST_ROOT=%WORKSPACE%/windows-3rd-party ^
-DCMAKE_INSTALL_PREFIX:PATH=%WORKSPACE%/install/msvc140-64 ^
-DCMAKE_PREFIX_PATH=%QT5SDK64%;%OSG64%
-DCMAKE_PREFIX_PATH=%QT5SDK64%;%OSG64% ^
-DOSG_FSTREAM_EXPORT_FIXED=1 ^
-DFG_BUILD_TYPE=%FGBUILDTYPE% ^
-DENABLE_SWIFT:BOOL=ON
cmake --build . --config RelWithDebInfo --target INSTALL
cd ..
REM Qt5 deployment
%QT5SDK32%\bin\windeployqt --release --list target %WORKSPACE%/install/msvc140/bin/fgfs.exe
%QT5SDK64%\bin\windeployqt --release --list target %WORKSPACE%/install/msvc140-64/bin/fgfs.exe
SET QMLDIR=%WORKSPACE%/flightgear/src/GUI/qml
REM Don't copy the compiler runtime libs, since it includes potentially older UCrtbase.
%QT5SDK64%\bin\windeployqt --release --no-compiler-runtime --qmldir %QMLDIR% %WORKSPACE%/install/msvc140-64/bin/fgfs.exe
REM build setup
ECHO Packaging root is %WORKSPACE%
@ -67,21 +60,31 @@ subst X: %WORKSPACE%.
REM ensure output dir is clean since we upload the entirety of it
rmdir /S /Q output
REM archiving PDB files
copy %WORKSPACE%\build-fg32\src\Main\RelWithDebInfo\fgfs.pdb %WORKSPACE%\Output\fgfs-x86-%BUILD_NUMBER%.pdb
copy %WORKSPACE%\build-fg64\src\Main\RelWithDebInfo\fgfs.pdb %WORKSPACE%\Output\fgfs-x64-%BUILD_NUMBER%.pdb
SET FGFS_PDB=src\Main\RelWithDebInfo\fgfs.pdb
SET SENTRY_ORG=flightgear
SET SENTRY_PROJECT=flightgear
REM ensure SENTRY_AUTH_TOKEN is set in the environment
sentry-cli upload-dif --include-sources %WORKSPACE%\build-fg64\%FGFS_PDB%
REM indirect way to get command output into an environment variable
set PATH=%OSG32%\bin;%PATH%
set PATH=%OSG64%\bin;%PATH%
osgversion --so-number > %TEMP%\osg-so-number.txt
osgversion --version-number > %TEMP%\osg-version.txt
osgversion --openthreads-soversion-number > %TEMP%\openthreads-so-number.txt
SET /P FLIGHTGEAR_VERSION=<flightgear\version
SET /P FLIGHTGEAR_VERSION=<flightgear\flightgear-version
SET /P OSG_VERSION=<%TEMP%\osg-version.txt
SET /P OSG_SO_NUMBER=<%TEMP%\osg-so-number.txt
SET /P OT_SO_NUMBER=<%TEMP%\openthreads-so-number.txt
for /F "tokens=1,2,3 delims=." %%a in ("%FLIGHTGEAR_VERSION%") do (
set FLIGHTGEAR_VERSION_MAJOR=%%a
set FLIGHTGEAR_VERSION_MINOR=%%b
set FLIGHTGEAR_VERSION_PATCH=%%c
)
IF %IS_NIGHTLY_BUILD% EQU 1 (
REM FlightGear nightly: with fgdata, output filename would be "FlightGear-x.x.x-nightly-full.exe"
CALL :writeBaseConfig
@ -101,7 +104,9 @@ IF %IS_NIGHTLY_BUILD% EQU 1 (
GOTO End
:writeBaseConfig
ECHO #define FGVersion "%FLIGHTGEAR_VERSION%" > InstallConfig.iss
ECHO #define FGHarnessPath "x:" > InstallConfig.iss
ECHO #define FGVersion "%FLIGHTGEAR_VERSION%" >> InstallConfig.iss
ECHO #define FGVersionGroup "%FLIGHTGEAR_VERSION_MAJOR%.%FLIGHTGEAR_VERSION_MINOR%" >> InstallConfig.iss
ECHO #define OSGVersion "%OSG_VERSION%" >> InstallConfig.iss
ECHO #define OSGSoNumber "%OSG_SO_NUMBER%" >> InstallConfig.iss
ECHO #define OTSoNumber "%OT_SO_NUMBER%" >> InstallConfig.iss

66
catalog/README.md Normal file
View File

@ -0,0 +1,66 @@
Introduction
============
This is the directory containing the script for updating aircraft, or other
craft, catalogs. It will create the `catalog.xml` file used to add a hangar to
FlightGear, as well as the zip archives of each craft in the hangar and the
md5sums, thumbnails, and previews of these. It consists of the script:
* update-catalog.py
It uses Python modules located under `python3-flightgear/flightgear/meta/`:
* aircraft_catalogs/catalog.py
* aircraft_catalogs/catalogTags.py
* sgprops.py
Usage
=====
The script can be run directly from this directory, or the script and its
modules can be copied together and run from any location. The steps to use
these are:
* Have something like `export PYTHONPATH="/path/to/fgmeta/python3-flightgear"`
in your shell setup or use a .pth file (see `python3-flightgear/README.md`
for more details).
* Create an output directory where the catalog and zip files will be located.
* Copy the configuration files `catalog.config.xml`, `template.xml`, and
`zip-excludes.lst` from one of the `*catalog*` example directories into the
output directory.
* Modify these files as required.
Then run the script with:
`$ $FGMETA/catalog/update-catalog.py dir`
where `dir` is the output directory. The script will create the following
files:
* `md5sum.xml`: A file containing checksums of all craft zip archives in the
base output directory.
* `ftp/catalog.xml`: The XML catalog to upload to a server and advertise to
FlightGear users.
* `ftp/*.zip`: The zip archives of each craft in the hangar.
* `ftp/previews/*_Splashs/`: A directory per craft containing the splash screen
graphics.
* `ftp/thumbnails/`: The collection of thumbnail graphics for the hangar.
The `ftp` directory is to be uploaded to a server which can be configured via
the `catalog.config.xml` file.
Examples
========
A number of example configuration files are located in this directory. These
include:
* `fgaddon-catalog/`: The configuration files used for the [official FGAddon
hangar](http://wiki.flightgear.org/FGAddon).
* `stable-2018-catalog/': The configuration files used for the 2018 long term
stability release.
* `single-craft-catalog-test/`: Configuration files used for testing the
catalog and zip archive creation for a single craft. These are for content
developers to test their craft.

View File

@ -1,80 +0,0 @@
aircraftTypeTags = [
"ga", "fighter", "helicopter", "glider", "spaceship", "bomber", "groundvehicle",
"tanker", "cargo", "transport", "bizjet", "trainer", "airship", "balloon"
]
manufacturerTags = [
"boeing", "cessna", "diamond", "douglas", "bell", "piper",
"airbus", "vickers", "lockheed", "fokker",
"embraer", "bombardier", "pilatus", "robin",
"eurocopter"
]
eraTags = [
"early-pioneers",
"ww1",
"1920s",
"1930s",
"golden-age",
"ww2",
"coldwar", "vietnam",
"1950s",
"1960s",
"1970s",
"1980s",
"1990s",
"2000s",
"gulfwar1",
"gulfwar2"
]
featureTags = [
"ifr",
"retractable-gear",
"fixed-gear",
"tail-dragger",
"seaplane",
"vtol",
"stol",
"experimental",
"prototype",
"fictional",
"biplane",
"triplane",
"supersonic",
"t-tail",
"v-tail",
"high-wing",
"cannard",
"tail-hook",
"refuel",
"delta",
"variable-geometry",
"glass-cockpit",
"hud",
"etops",
"floats",
"amphibious",
"airship",
"aerobatic"
]
propulsionTags = [
"piston", "radial",
"diesel",
"variable-pitch",
"supercharged",
"turboprop",
"jet", "afterburner", "rocket",
"electric",
"twin-engine",
"single-engine"
]
simFeatureTags = [
"tow",
"dual-controls",
"rembrandt"
]
tags = aircraftTypeTags + manufacturerTags + eraTags + simFeatureTags + propulsionTags + featureTags

76
catalog/check_aircraft.py Executable file
View File

@ -0,0 +1,76 @@
#! /usr/bin/env python3
import argparse
import os
from flightgear.meta import sgprops
def check_meta_data(aircraft_dir, set_file, includes):
base_file = os.path.basename(set_file)
base_id = base_file[:-8]
set_path = os.path.join(aircraft_dir, set_file)
includes.append(aircraft_dir)
root_node = sgprops.readProps(set_path, includePaths = includes)
if not root_node.hasChild("sim"):
print("-set.xml has no <sim> node:", set_path)
return
sim_node = root_node.getChild("sim")
if not sim_node.hasChild('description'):
print("-set.xml missing <description>:", set_path)
if not sim_node.hasChild('long-description'):
print("-set.xml missing <long-description>:", set_path)
if not sim_node.hasChild('authors'):
print("-set.xml is missing structured <authors> data:", set_path)
if not sim_node.hasChild('tags'):
print("-set.xml does not define any tags", set_path)
# check for non-standard tags
if not sim_node.hasChild('thumbnail'):
print("-set.xml does not define a thumbnail", set_path)
# check thumbnail size and format
if not sim_node.hasChild('rating'):
print("-set.xml does not define any ratings", set_path)
if not sim_node.hasChild('minimum-fg-version'):
print("-set.xml does not define a minimum FG version", set_path)
# check all the -set.xml files in an aircraft directory.
def check_aircraft_dir(d, includes):
if not os.path.isdir(d):
return
files = os.listdir(d)
for f in sorted(files, key=lambda s: s.lower()):
if f.endswith('-set.xml'):
check_meta_data(d, f, includes)
parser = argparse.ArgumentParser()
parser.add_argument("--include", help="Include directory to validate -set.xml parsing",
action="append", dest='include', default=[])
parser.add_argument("dir", nargs='+', help="Aircraft directory")
args = parser.parse_args()
for d in args.dir:
if not os.path.isdir(d):
print("Skipping missing directory:", d)
names = os.listdir(d)
for name in sorted(names, key=lambda s: s.lower()):
# if name in skip_list:
# print "skipping:", name
# continue
acftDir = os.path.join(d, name)
check_aircraft_dir(acftDir, args.include)

View File

@ -0,0 +1,33 @@
<?xml version="1.0" encoding="UTF-8"?>
<PropertyList>
<local-output>/home/fgaddon/output/Aircraft-trunk</local-output>
<download-url n="0">http://mirrors.ibiblio.org/flightgear/ftp/Aircraft-trunk/</download-url>
<download-url n="1">http://ukmirror.flightgear.org/fgaddon/Aircraft-trunk/</download-url>
<download-url n="2">https://cdn.merspieler.tk/fgaddon/Aircraft-trunk/</download-url>
<thumbnail-url n="0">http://mirrors.ibiblio.org/flightgear/ftp/Aircraft-trunk/thumbnails</thumbnail-url>
<thumbnail-url n="1">http://ukmirror.flightgear.org/fgaddon/Aircraft-trunk/thumbnails</thumbnail-url>
<thumbnail-url n="2">https://cdn.merspieler.tk/fgaddon/Aircraft-trunk/thumbnails</thumbnail-url>
<scm>
<type>svn</type>
<path>/home/fgaddon/fgaddon-trunk/Aircraft</path>
<skip>NTPS</skip>
<skip>c172</skip>
<skip>tu134</skip>
</scm>
<include-dir>/home/fgaddon/fgdata</include-dir>
<include-dir>/home/fgaddon/fgaddon-trunk</include-dir>
<!-- <scm>
<type>git</type>
<update type="bool">false</update>
<path>/Users/jmt/FGFS/fgdata</path>
<url>git://git.code.sf.net/p/flightgear/fgdata</url>
</scm> -->
<upload n="0">
<enabled type="bool">true</enabled>
<type>rsync-ssh</type>
<remote>ibiblio:/public/mirrors/flightgear/ftp/Aircraft</remote>
</upload>
</PropertyList>

View File

@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<PropertyList>
<template>
<!-- if we break trunk compat in a substantial way, consider removing these -->
<version n="2">2020.4.*</version>
<version n="3">2021.*</version>
<id>org.flightgear.fgaddon.trunk</id>
<license>GPL</license>
<url>http://mirrors.ibiblio.org/flightgear/ftp/Aircraft-trunk/catalog.xml</url>
<name>FlightGear aircraft distribution from fgaddon</name>
<description>This hangar provides aircraft officially supported and maintained by the FlightGear project,
under a free-software license. It tracks latest aircraft developments in the FGaddon repository.</description>
<!-- <de>
<description>Auf Deutsch</description>
</de>
<fr>
<description>En Francais</description>
</fr> -->
</template>
</PropertyList>

View File

@ -0,0 +1,11 @@
*/.svn/*
*.xcf*
*.XCF*
*.blend*
*.psd
*~
*/dev/*
*/Dev/*
*/development/*
*/src/*
*/Resources/*

View File

@ -6,13 +6,13 @@
<version n="1">3.5.*</version>
<version n="2">3.6.*</version>
<version n="3">3.7.*</version>
<version n="4">2016.1.*</version>
<version n="5">2016.*.*</version>
<version n="6">2017.*.*</version>
<version n="7">2018.*.*</version>
<id>org.flightgear.fgaddon</id>
<license>GPL</license>
<url>http://mirrors.ibiblio.org/flightgear/ftp/Aircraft/catalog.xml</url>
<name>FlightGear Aircraft Distribution From fgaddon</name>
<name>FlightGear aircraft distribution from fgaddon</name>
<description>This hangar provides aircraft officially supported and maintained by the FlightGear project, under a free-software license.</description>
<de>
<description>Auf Deutsch</description>

View File

@ -1,5 +1,11 @@
*/.svn/*
*.xcf
*.blend
*.xcf*
*.XCF*
*.blend*
*.psd
*~
*/dev/*
*/Dev/*
*/development/*
*/src/*
*/Resources/*

View File

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<PropertyList>
<local-output>/home/fgaddon/output/Aircraft</local-output>
<download-url n="0">http://mirrors.ibiblio.org/flightgear/ftp/Aircraft/</download-url>
<download-url n="1">http://ukmirror.flightgear.org/fgaddon/Aircraft/</download-url>
<thumbnail-url n="0">http://mirrors.ibiblio.org/flightgear/ftp/Aircraft/thumbnails</thumbnail-url>
<thumbnail-url n="1">http://ukmirror.flightgear.org/fgaddon/Aircraft/thumbnails</thumbnail-url>
<scm>
<type>svn</type>
<path>/home/fgaddon/fgaddon-legacy/Aircraft</path>
<skip>NTPS</skip>
<skip>c172</skip>
<skip>tu134</skip>
</scm>
<include-dir>/home/fgaddon/fgdata-legacy</include-dir>
<include-dir>/home/fgaddon/fgaddon-legacy</include-dir>
<upload n="0">
<enabled type="bool">true</enabled>
<type>rsync-ssh</type>
<remote>ibiblio:/public/mirrors/flightgear/ftp/Aircraft-legacy</remote>
</upload>
</PropertyList>

View File

@ -0,0 +1,38 @@
<?xml version="1.0" encoding="UTF-8"?>
<PropertyList>
<template>
<version n="0">3.4.*</version>
<version n="1">3.5.*</version>
<version n="2">3.6.*</version>
<version n="3">3.7.*</version>
<version n="5">2016.*.*</version>
<version n="6">2017.*.*</version>
<version n="7">2018.*.*</version>
<!-- the legacy catalog has to have this ID, becuase this is what older FG
clients expect -->
<id>org.flightgear.fgaddon</id>
<license>GPL</license>
<url>http://mirrors.ibiblio.org/flightgear/ftp/Aircraft/catalog.xml</url>
<name>FlightGear aircraft(legacy support)</name>
<description>This hangar provides aircraft officially supported and maintained by the
FlightGear project, under a free-software license. Aircraft are intended for
use with FlightGear versions 2018.2 and older.</description>
<!-- <alternate-version>
<version>2019.*</version>
<version>2018.4.*</version>
<url>http://mirrors.ibiblio.org/flightgear/ftp/Aircraft-trunk/catalog.xml</url>
<id>org.flightgear.fgaddon.trunk</id>
</alternate-version>
<alternate-version>
<version>2018.3.*</version>
<url>http://mirrors.ibiblio.org/flightgear/ftp/Aircraft-2018/catalog.xml</url>
<id>org.flightgear.fgaddon.stable_2018</id>
</alternate-version>
-->
</template>
</PropertyList>

View File

@ -0,0 +1,5 @@
*/.svn/*
*.xcf
*.blend
*.psd
*~

View File

@ -0,0 +1,6 @@
Configuration files for testing the catalog updating script on a single aircraft. This is useful for seeing what will be packed into the zip archive. To use these:
* Copy all *.xml and *.lst files into a local testing directory X.
* Modify the *.xml files:
* Replace all instances of '/data/fgaddon_catalog_p51d/' with the directory X.
* Update any other tags as necessary.

View File

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--Template catalog - copy and modify for your site as required-->
<PropertyList>
<local-output>/data/fgaddon-catalog_p51d/ftp</local-output>
<download-url n="0">/data/fgaddon-catalog_p51d/ftp/Aircraft/</download-url>
<scm>
<type>svn</type>
<update type="bool">false</update>
<path>/flightgear/flightgear-fgaddon/Aircraft</path>
<include>p51d</include>
</scm>
</PropertyList>

View File

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--Template catalog - copy and modify for your site as required-->
<PropertyList>
<template>
<version n="0">HEAD</version>
<id>localhost</id>
<license>GPL</license>
<url>/data/fgaddon-catalog_p51d/ftp/Aircraft/catalog.xml</url>
<name>p51d FGAddon aircraft test</name>
<description>This is a test of the catalog updating script to allow aircraft authors to see what will be present in the zip archive of their aircraft.</description>
</template>
</PropertyList>

View File

@ -0,0 +1,11 @@
*/.svn/*
*.xcf*
*.XCF*
*.blend*
*.psd
*~
*/dev/*
*/Dev/*
*/development/*
*/src/*
*/Resources/*

View File

@ -0,0 +1,34 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--Template catalog - copy and modify for your site as required-->
<PropertyList>
<local-output>/home/fgaddon/output/Aircraft-2018</local-output>
<download-url n="0">http://mirrors.ibiblio.org/flightgear/ftp/Aircraft-2018/</download-url>
<download-url n="1">http://ukmirror.flightgear.org/fgaddon/Aircraft-2018/</download-url>
<download-url n="2">https://cdn.merspieler.tk/fgaddon/Aircraft-2018/</download-url>
<thumbnail-url n="0">http://mirrors.ibiblio.org/flightgear/ftp/Aircraft-2018/thumbnails</thumbnail-url>
<thumbnail-url n="1">http://ukmirror.flightgear.org/official/Aircraft-2018/thumbnails</thumbnail-url>
<thumbnail-url n="2">https://cdn.merspieler.tk/fgaddon/Aircraft-2018/thumbnails</thumbnail-url>
<!-- share zips with the trunk catalog where possible -->
<share-output>/home/fgaddon/output/Aircraft</share-output>
<share-md5-sums>/home/fgaddon/fgmeta/catalog/fgaddon-catalog-ukmirror/md5sum.xml</share-md5-sums>
<scm>
<type>svn</type>
<path>/home/fgaddon/fgaddon-release-2018.3/Aircraft</path>
<skip>NTPS</skip>
<skip>c172</skip>
<skip>tu134</skip>
</scm>
<include-dir>/home/fgaddon/fgdata-release_2018.3</include-dir>
<include-dir>/home/fgaddon/fgaddon-release-2018.3</include-dir>
<upload n="0">
<enabled type="bool">true</enabled>
<type>rsync-ssh</type>
<remote>ibiblio:/public/mirrors/flightgear/ftp/Aircraft-2018</remote>
</upload>
</PropertyList>

View File

@ -0,0 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>
<PropertyList>
<template>
<version n="0">2018.*</version>
<id>org.flightgear.fgaddon.stable_2018</id>
<license>GPL</license>
<url>http://mirrors.ibiblio.org/flightgear/ftp/Aircraft-2018/catalog.xml</url>
<name>FlightGear aircraft distribution for 2018.x versions</name>
<description>This hangar provides aircraft officially supported and maintained
by the FlightGear project, under a free-software license. These aircraft
are compatible with FlightGear versions from 2018.</description>
<!-- migration to new stable catalog for 2020.3 release -->
<alternate-version>
<version>2020.3.*</version>
<id>org.flightgear.fgaddon.stable_2020</id>
<url>http://mirrors.ibiblio.org/flightgear/ftp/Aircraft-2020/catalog.xml</url>
</alternate-version>
</template>
</PropertyList>

View File

@ -0,0 +1,5 @@
*/.svn/*
*.xcf
*.blend
*.psd
*~

View File

@ -0,0 +1,34 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--Template catalog - copy and modify for your site as required-->
<PropertyList>
<local-output>/home/fgaddon/output/Aircraft-2020</local-output>
<download-url n="0">http://mirrors.ibiblio.org/flightgear/ftp/Aircraft-2020/</download-url>
<download-url n="1">http://ukmirror.flightgear.org/fgaddon/Aircraft-2020/</download-url>
<download-url n="2">https://cdn.merspieler.tk/fgaddon/Aircraft-2020/</download-url>
<thumbnail-url n="0">http://mirrors.ibiblio.org/flightgear/ftp/Aircraft-2020/thumbnails</thumbnail-url>
<thumbnail-url n="1">http://ukmirror.flightgear.org/official/Aircraft-2020/thumbnails</thumbnail-url>
<thumbnail-url n="2">https://cdn.merspieler.tk/fgaddon/Aircraft-2020/thumbnails</thumbnail-url>
<!-- share zips with the trunk catalog where possible -->
<share-output>/home/fgaddon/output/Aircraft</share-output>
<share-md5-sums>/home/fgaddon/fgmeta/catalog/fgaddon-catalog-ukmirror/md5sum.xml</share-md5-sums>
<scm>
<type>svn</type>
<path>/home/fgaddon/fgaddon-release-2020.3/Aircraft</path>
<skip>NTPS</skip>
<skip>c172</skip>
<skip>tu134</skip>
</scm>
<include-dir>/home/fgaddon/fgdata-release_2020.2</include-dir>
<include-dir>/home/fgaddon/fgaddon-release-2020.3</include-dir>
<upload n="0">
<enabled type="bool">true</enabled>
<type>rsync-ssh</type>
<remote>ibiblio:/public/mirrors/flightgear/ftp/Aircraft-2020</remote>
</upload>
</PropertyList>

View File

@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<PropertyList>
<template>
<version n="0">2020.3.*</version>
<id>org.flightgear.fgaddon.stable_2020</id>
<license>GPL</license>
<url>http://mirrors.ibiblio.org/flightgear/ftp/Aircraft-2020/catalog.xml</url>
<name>FlightGear aircraft distribution for 2020.x versions</name>
<description>This hangar provides aircraft officially supported and maintained
by the FlightGear project, under a free-software license. These aircraft
are compatible with FlightGear versions from 2020.</description>
</template>
</PropertyList>

View File

@ -0,0 +1,5 @@
*/.svn/*
*.xcf
*.blend
*.psd
*~

View File

@ -1,4 +1,4 @@
#!/usr/bin/python
#! /usr/bin/env python3
import argparse
import datetime
@ -8,12 +8,21 @@ import os
import re
import shutil
import subprocess
import time
import sgprops
import sys
import time
from flightgear.meta import sgprops
from flightgear.meta.aircraft_catalogs import catalogTags
from flightgear.meta.aircraft_catalogs import catalog
from flightgear.meta.aircraft_catalogs.catalog import make_aircraft_node, \
make_aircraft_zip, parse_config_file, parse_template_file
CATALOG_VERSION = 4
# The Python version.
PY_VERSION = sys.version_info[0]
parser = argparse.ArgumentParser()
parser.add_argument("--update", help="Update/pull SCM source",
action="store_true")
@ -22,10 +31,13 @@ parser.add_argument("--no-update",
action="store_true")
parser.add_argument("--clean", help="Force regeneration of all zip files",
action="store_true")
parser.add_argument("--quiet", help="Only print warnings and errors",
action="store_true")
parser.add_argument("dir", help="Catalog directory")
args = parser.parse_args()
includes = []
mirrors = [] # mirror base URLs
# xml node (robust) get text helper
def get_xml_text(e):
@ -34,131 +46,15 @@ def get_xml_text(e):
else:
return ''
# create an xml node with text content
def make_xml_leaf(name, text):
leaf = ET.Element(name)
if text != None:
if isinstance(text, (int, long)):
leaf.text = str(text)
else:
leaf.text = text
else:
leaf.text = ''
return leaf
# return all available aircraft information from the set file as a
# dict
def scan_set_file(aircraft_dir, set_file):
global includes
base_file = os.path.basename(set_file)
base_id = base_file[:-8]
set_path = os.path.join(aircraft_dir, set_file)
local_includes = includes
local_includes.append(aircraft_dir)
root_node = sgprops.readProps(set_path, includePaths = local_includes)
if not root_node.hasChild("sim"):
return None
sim_node = root_node.getChild("sim")
if sim_node == None:
return None
variant = {}
variant['name'] = sim_node.getValue("description", None)
variant['status'] = sim_node.getValue("status", None)
variant['author'] = sim_node.getValue("author", None)
variant['description'] = sim_node.getValue("long-description", None)
variant['id'] = base_id
# allow -set.xml files to declare themselves as primary.
# we use this avoid needing a variant-of in every other -set.xml
variant['primary-set'] = sim_node.getValue('primary-set', False)
# extract and record previews for each variant
if sim_node.hasChild('previews'):
print "has previews ..."
variant['previews'] = extract_previews(sim_node.getChild('previews'), aircraft_dir)
if sim_node.hasChild('rating'):
rating_node = sim_node.getChild("rating")
variant['rating_FDM'] = rating_node.getValue("FDM", 0)
variant['rating_systems'] = rating_node.getValue("systems", 0)
variant['rating_cockpit'] = rating_node.getValue("cockpit", 0)
variant['rating_model'] = rating_node.getValue("model", 0)
variant['variant-of'] = sim_node.getValue("variant-of", None)
#print ' ', variant
return variant
def extract_previews(previews_node, aircraft_dir):
result = []
for node in previews_node.getChildren("preview"):
previewType = node.getValue("type", None)
previewPath = node.getValue("path", None)
# check path exists in base-name-dir
fullPath = os.path.join(aircraft_dir, previewPath)
if not os.path.isfile(fullPath):
print "Bad preview path, skipping:" + fullPath
continue
result.append({'type':previewType, 'path':previewPath})
return result
# scan all the -set.xml files in an aircraft directory. Returns a
# package dict and a list of variants.
def scan_aircraft_dir(aircraft_dir):
# old way of finding the master aircraft: it's the only one whose
# variant-of is empty. All the others have an actual value
# newer alternative is to specify one -set.xml as the primary. All the
# others are therefore variants.
setDicts = []
found_master = False
package = None
files = os.listdir(aircraft_dir)
for file in sorted(files, key=lambda s: s.lower()):
if file.endswith('-set.xml'):
try:
d = scan_set_file(aircraft_dir, file)
if d == None:
continue
except:
print "Skipping set file since couldn't be parsed:", os.path.join(aircraft_dir, file), sys.exc_info()[0]
continue
setDicts.append(d)
if d['primary-set']:
found_master = True
package = d
# didn't find a dict identified explicitly as the primary, look for one
# with an undefined variant-of
if not found_master:
for d in setDicts:
if d['variant-of'] == '':
found_master = True
package = d
break
if not found_master:
if len(setDicts) > 1:
print "Warning, no explicit primary set.xml in " + aircraft_dir
# use the first one
package = setDicts[0]
# variants is just all the set dicts except the master
variants = setDicts
variants.remove(package)
return (package, variants)
# use svn commands to report the last change date within dir
def last_change_date_svn(dir):
command = [ 'svn', 'info', dir ]
result = subprocess.check_output( command )
# Python 3 compatibility.
if PY_VERSION == 3:
result = result.decode('utf8')
match = re.search('Last Changed Date: (\d+)\-(\d+)\-(\d+)', result)
if match:
rev_str = match.group(1) + match.group(2) + match.group(3)
@ -182,39 +78,13 @@ def scan_dir_for_change_date_mtime(path):
maxsec = mtime
return maxsec
def make_aircraft_zip(repo_path, name, zip_file):
print "Updating:", name + '.zip'
savedir = os.getcwd()
os.chdir(repo_path)
if os.path.exists(zip_file):
os.remove(zip_file)
command = ['zip', '-rq', '-9']
if os.path.exists(zip_excludes):
command += ['-x@' + zip_excludes]
else:
print "warning: no zip-excludes.lst file provided", zip_excludes
command += [zip_file, name]
subprocess.call(command)
os.chdir(savedir)
def get_md5sum(file):
f = open(file, 'r')
f = open(file, 'rb')
md5sum = hashlib.md5(f.read()).hexdigest()
f.close()
return md5sum
def append_preview_nodes(node, variant, download_base, package_name):
if not 'previews' in variant:
return
for preview in variant['previews']:
preview_node = ET.Element('preview')
preview_url = download_base + 'previews/' + package_name + '_' + preview['path']
preview_node.append( make_xml_leaf('type', preview['type']) )
preview_node.append( make_xml_leaf('url', preview_url) )
preview_node.append( make_xml_leaf('path', preview['path']) )
node.append(preview_node)
def copy_previews_for_variant(variant, package_name, package_dir, previews_dir):
if not 'previews' in variant:
return
@ -222,7 +92,7 @@ def copy_previews_for_variant(variant, package_name, package_dir, previews_dir):
for preview in variant['previews']:
preview_src = os.path.join(package_dir, preview['path'])
preview_dst = os.path.join(previews_dir, package_name + '_' + preview['path'])
#print preview_src, preview_dst, preview['path']
#print(preview_src, preview_dst, preview['path'])
dir = os.path.dirname(preview_dst)
if not os.path.isdir(dir):
os.makedirs(dir)
@ -234,6 +104,115 @@ def copy_previews_for_package(package, variants, package_name, package_dir, prev
for v in variants:
copy_previews_for_variant(v, package_name, package_dir, previews_dir)
def copy_thumbnail_for_variant(variant, package_name, package_dir, thumbnails_dir):
if not 'thumbnail' in variant:
return
thumb_src = os.path.join(package_dir, variant['thumbnail'])
thumb_dst = os.path.join(thumbnails_dir, package_name + '_' + variant['thumbnail'])
dir = os.path.dirname(thumb_dst)
if not os.path.isdir(dir):
os.makedirs(dir)
if os.path.exists(thumb_src):
shutil.copy2(thumb_src, thumb_dst)
def copy_thumbnails_for_package(package, variants, package_name, package_dir, thumbnails_dir):
copy_thumbnail_for_variant(package, package_name, package_dir, thumbnails_dir)
# and now each variant in turn
for v in variants:
copy_thumbnail_for_variant(v, package_name, package_dir, thumbnails_dir)
def process_aircraft_dir(name, repo_path):
global includes
global download_base
global output_dir
global valid_zips
global previews_dir
global mirrors
aircraft_dir = os.path.join(repo_path, name)
if not os.path.isdir(aircraft_dir):
return
(package, variants) = catalog.scan_aircraft_dir(aircraft_dir, includes)
if package == None:
if not args.quiet:
print("skipping: %s (no -set.xml files)" % name)
return
if not args.quiet:
print("%s:" % name)
package_node = make_aircraft_node(name, package, variants, download_base, mirrors)
download_url = download_base + name + '.zip'
if 'thumbnail' in package:
# this is never even used, but breaks the script by assuming
# all aircraft packages have thumbnails defined?
thumbnail_url = download_base + 'thumbnails/' + name + '_' + package['thumbnail']
# get cached md5sum if it exists
md5sum = get_xml_text(md5sum_root.find(str('aircraft_' + name)))
# now do the packaging and rev number stuff
dir_mtime = scan_dir_for_change_date_mtime(aircraft_dir)
if repo_type == 'svn':
rev = last_change_date_svn(aircraft_dir)
else:
d = datetime.datetime.utcfromtimestamp(dir_mtime)
rev = d.strftime("%Y%m%d")
package_node.append( catalog.make_xml_leaf('revision', rev) )
#print("rev: %s" % rev)
#print("dir mtime: %s" % dir_mtime)
zipfile = os.path.join( output_dir, name + '.zip' )
valid_zips.append(name + '.zip')
if not os.path.exists(zipfile) \
or dir_mtime > os.path.getmtime(zipfile) \
or args.clean:
# rebuild zip file
if not args.quiet:
print("updating: %s" % zipfile)
make_aircraft_zip(repo_path, name, zipfile, zip_excludes, verbose=not args.quiet)
md5sum = get_md5sum(zipfile)
else:
if not args.quiet:
print("(no change)")
if md5sum == "":
md5sum = get_md5sum(zipfile)
filesize = os.path.getsize(zipfile)
package_node.append( catalog.make_xml_leaf('md5', md5sum) )
package_node.append( catalog.make_xml_leaf('file-size-bytes', filesize) )
# handle md5sum cache
node = md5sum_root.find('aircraft_' + name)
if node != None:
node.text = md5sum
else:
md5sum_root.append( catalog.make_xml_leaf('aircraft_' + name, md5sum) )
# handle sharing
if share_md5sum_root != None:
sharedNode = share_md5sum_root.find(str('aircraft_' + name))
if node != None:
shared_md5 = get_xml_text(sharedNode)
if shared_md5 == md5sum:
if not args.quiet:
print("Sharing zip with share catalog for: %s" % name)
os.remove(zipfile)
os.symlink(os.path.join( share_output_dir, name + '.zip' ), zipfile)
# handle thumbnails
copy_thumbnails_for_package(package, variants, name, aircraft_dir, thumbnail_dir)
catalog_node.append(package_node)
# copy previews for the package and variants into the
# output directory
copy_previews_for_package(package, variants, name, aircraft_dir, previews_dir)
#def get_file_stats(file):
# f = open(file, 'r')
# md5 = hashlib.md5(f.read()).hexdigest()
@ -241,19 +220,12 @@ def copy_previews_for_package(package, variants, package_name, package_dir, prev
# return (md5, file_size)
if not os.path.isdir(args.dir):
print "A valid catalog directory must be provided"
print("A valid catalog directory must be provided")
exit(0)
parser = ET.XMLParser(remove_blank_text=True)
config_file = os.path.join(args.dir, 'catalog.config.xml')
config = ET.parse(config_file, parser)
config_node = config.getroot()
template_file = os.path.join(args.dir, 'template.xml')
template = ET.parse(template_file, parser)
template_root = template.getroot()
template_node = template_root.find('template')
config_node = parse_config_file(parser=parser, file_name=os.path.join(args.dir, 'catalog.config.xml'))
template_node = parse_template_file(parser=parser, file_name=os.path.join(args.dir, 'template.xml'))
md5sum_file = os.path.join(args.dir, 'md5sum.xml')
if os.path.exists(md5sum_file):
@ -263,9 +235,32 @@ else:
md5sum_root = ET.Element('PropertyList')
md5sum_tree = ET.ElementTree(md5sum_root)
# share .zip files with other output dirs
share_output_dir = get_xml_text(config_node.find('share-output'))
share_md5_file = get_xml_text(config_node.find('share-md5-sums'))
if share_output_dir != '' and share_md5_file != '':
print("Output shared with: %s" % share_output_dir)
share_md5sum_tree = ET.parse(share_md5_file, parser)
share_md5sum_root = share_md5sum_tree.getroot()
else:
share_md5sum_root = None
# SCM providers
scm_list = config_node.findall('scm')
upload_node = config_node.find('upload')
download_base = get_xml_text(config_node.find('download-url'))
download_base = None
for i in config_node.findall("download-url"):
url = get_xml_text(i)
if not url.endswith('/'):
url += '/'
if download_base == None:
# download_base is the first entry
download_base = url
else:
mirrors.append(url)
output_dir = get_xml_text(config_node.find('local-output'))
if output_dir == '':
output_dir = os.path.join(args.dir, 'output')
@ -286,31 +281,37 @@ zip_excludes = os.path.realpath(tmp)
for i in config_node.findall("include-dir"):
path = get_xml_text(i)
if not os.path.exists(path):
print "Skipping missing include path:", path
print("Skipping missing include path: %s" % path)
continue
includes.append(path)
# freshen repositories
if args.no_update:
print 'Skipping repository updates.'
print('Skipping repository updates.')
else:
cwd = os.getcwd()
for scm in scm_list:
# XML mandated skip, with command line override.
if not args.update:
skip = get_xml_text(scm.find('update'))
if skip == 'false':
continue
repo_type = get_xml_text(scm.find('type'))
repo_path = get_xml_text(scm.find('path'))
includes.append(repo_path)
if repo_type == 'svn':
print 'SVN update:', repo_path
print("SVN update: %s" % repo_path)
subprocess.call(['svn', 'update', repo_path])
elif repo_type == 'git':
print 'GIT pull:', repo_path
print("GIT pull: %s" % repo_path)
os.chdir(repo_path)
subprocess.call(['git','pull'])
elif repo_type == 'no-scm':
print "No update of unmannaged files:", repo_path
print("No update of unmannaged files: %s" % repo_path)
else:
print "Unknown scm type:", scm, repo_path
print("Unknown scm type: %s %s" % (scm, repo_path))
os.chdir(cwd)
# names of zip files we want (so we can identify/remove orphans)
@ -332,124 +333,39 @@ for scm in scm_list:
skip_list = []
for s in skip_nodes:
skip_list.append(get_xml_text(s))
print 'skip list:', skip_list
# Selective list of craft to include, overriding the skip list.
include_nodes = scm.findall('include')
include_list = []
for node in include_nodes:
include_list.append(get_xml_text(node))
if len(include_list):
skip_list = []
print("Skip list: %s" % skip_list)
print("Include list: %s" % include_list)
names = os.listdir(repo_path)
for name in sorted(names, key=lambda s: s.lower()):
if name in skip_list:
print "skipping:", name
if name in skip_list or (len(include_list) and name not in include_list):
if not args.quiet:
print("Skipping: %s" % name)
continue
aircraft_dir = os.path.join(repo_path, name)
if os.path.isdir(aircraft_dir):
print "%s:" % name,
(package, variants) = scan_aircraft_dir(aircraft_dir)
if package == None:
print "skipping:", name, "(no -set.xml files)"
continue
#print "package:", package
#print "variants:", variants
package_node = ET.Element('package')
package_node.append( make_xml_leaf('name', package['name']) )
package_node.append( make_xml_leaf('status', package['status']) )
package_node.append( make_xml_leaf('author', package['author']) )
package_node.append( make_xml_leaf('description', package['description']) )
if 'rating_FDM' in package or 'rating_systems' in package \
or 'rating_cockpit' in package or 'rating_model' in package:
rating_node = ET.Element('rating')
package_node.append(rating_node)
rating_node.append( make_xml_leaf('FDM',
package['rating_FDM']) )
rating_node.append( make_xml_leaf('systems',
package['rating_systems']) )
rating_node.append( make_xml_leaf('cockpit',
package['rating_cockpit']) )
rating_node.append( make_xml_leaf('model',
package['rating_model']) )
package_node.append( make_xml_leaf('id', package['id']) )
for variant in variants:
variant_node = ET.Element('variant')
package_node.append(variant_node)
variant_node.append( make_xml_leaf('id', variant['id']) )
variant_node.append( make_xml_leaf('name', variant['name']) )
if 'description' in variant:
variant_node.append( make_xml_leaf('description', variant['description']) )
if 'author' in variant:
variant_node.append( make_xml_leaf('author', variant['author']) )
append_preview_nodes(variant_node, variant, download_base, name)
package_node.append( make_xml_leaf('dir', name) )
if not download_base.endswith('/'):
download_base += '/'
download_url = download_base + name + '.zip'
thumbnail_url = download_base + 'thumbnails/' + name + '_thumbnail.jpg'
package_node.append( make_xml_leaf('url', download_url) )
package_node.append( make_xml_leaf('thumbnail', thumbnail_url) )
append_preview_nodes(package_node, package, download_base, name)
# todo: url (download), thumbnail (download url)
# get cached md5sum if it exists
md5sum = get_xml_text(md5sum_root.find(str('aircraft_' + name)))
# now do the packaging and rev number stuff
dir_mtime = scan_dir_for_change_date_mtime(aircraft_dir)
if repo_type == 'svn':
rev = last_change_date_svn(aircraft_dir)
else:
d = datetime.datetime.utcfromtimestamp(dir_mtime)
rev = d.strftime("%Y%m%d")
package_node.append( make_xml_leaf('revision', rev) )
#print "rev:", rev
#print "dir mtime:", dir_mtime
zipfile = os.path.join( output_dir, name + '.zip' )
valid_zips.append(name + '.zip')
if not os.path.exists(zipfile) \
or dir_mtime > os.path.getmtime(zipfile) \
or args.clean:
# rebuild zip file
print "updating:", zipfile
make_aircraft_zip(repo_path, name, zipfile)
md5sum = get_md5sum(zipfile)
else:
print "(no change)"
if md5sum == "":
md5sum = get_md5sum(zipfile)
filesize = os.path.getsize(zipfile)
package_node.append( make_xml_leaf('md5', md5sum) )
package_node.append( make_xml_leaf('file-size-bytes', filesize) )
# handle md5sum cache
node = md5sum_root.find('aircraft_' + name)
if node != None:
node.text = md5sum
else:
md5sum_root.append( make_xml_leaf('aircraft_' + name, md5sum) )
# handle thumbnails
thumbnail_src = os.path.join(aircraft_dir, 'thumbnail.jpg')
thumbnail_dst = os.path.join(thumbnail_dir, name + '_thumbnail.jpg')
if os.path.exists(thumbnail_src):
shutil.copy2(thumbnail_src, thumbnail_dst)
catalog_node.append(package_node)
package_node.append( make_xml_leaf('thumbnail-path', 'thumbnail.jpg') )
# copy previews for the package and variants into the
# output directory
copy_previews_for_package(package, variants, name, aircraft_dir, previews_dir)
# process each aircraft in turn
# print("%s %s" % (name, repo_path))
process_aircraft_dir(name, repo_path)
# write out the master catalog file
cat_file = os.path.join(output_dir, 'catalog.xml')
catalog_root.write(cat_file, encoding='utf-8', xml_declaration=True, pretty_print=True)
# write out the md5sum cache file
print md5sum_file
print(md5sum_file)
md5sum_tree.write(md5sum_file, encoding='utf-8', xml_declaration=True, pretty_print=True)
# look for orphaned zip files
files = os.listdir(output_dir)
for file in files:
if file.endswith('.zip')and not file in valid_zips:
print "orphaned zip:", file
print("orphaned zip: %s" % file)

51
catalog/update_catalogs.sh Executable file
View File

@ -0,0 +1,51 @@
#!/bin/bash
# can't rely on $HOME in cron scripts
script_home=/home/fgaddon
# we assume fgmeta is checked out to $script_home/fgmeta
# add the scripts to the path
catalog_dir=$script_home/fgmeta/catalog
local_www_dir=/var/www/uk-mirror/fgaddon
output_dir=$script_home/output
rsync_args="-avz"
# this assumes there is an 'ibiblio' entry setup in $HOME/.ssh/config with the appropriate
# credentials
ibiblio_prefix=ibiblio:/public/mirrors/flightgear/ftp/
alias python=python3
export PATH=$PATH:$catalog_dir
export PYTHONPATH=$script_home/fgmeta/python3-flightgear
echo "Generating trunk catalog"
update-catalog.py --quiet --update $catalog_dir/fgaddon-catalog-ukmirror
# at some point, we can disable updating the 2018 catalog
echo "Generating stable catalog 2018"
update-catalog.py --quiet --update $catalog_dir/stable-2018-catalog
echo "Generating stable catalog 2020"
update-catalog.py --quiet --update $catalog_dir/stable-2020-catalog
echo "Coping to WWW dir"
rsync -avz $output_dir/Aircraft-trunk $local_www_dir/
rsync -avz $output_dir/Aircraft-2018 $local_www_dir/
rsync -avz $output_dir/Aircraft-2020 $local_www_dir/
# temporarily disabled
echo "Syncing to Ibiblio"
rsync $rsync_args $output_dir/Aircraft-trunk $ibiblio_prefix
rsync $rsync_args $output_dir/Aircraft-2018 $ibiblio_prefix
rsync $rsync_args $output_dir/Aircraft-2020 $ibiblio_prefix
echo "All done"

345
dev-utils/git-date.py Executable file
View File

@ -0,0 +1,345 @@
#! /usr/bin/env python3
# -*- coding: utf-8 -*-
# git-date.py --- Find Git commits around some date in one or more repositories.
# Copyright (c) 2021, Florent Rougon
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright notice,
# this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions and the following disclaimer in the documentation
# and/or other materials provided with the distribution.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
#
# The views and conclusions contained in the software and documentation are
# those of the authors and should not be interpreted as representing official
# policies, either expressed or implied, of the FlightGear project.
# The idea and some Git-fu of this script are from Edward d'Auvergne:
# <https://sourceforge.net/p/flightgear/mailman/message/37004175/>.
import argparse
import locale
import os
import platform
import re
import subprocess
import sys
from collections import namedtuple, OrderedDict
PROGNAME = os.path.basename(sys.argv[0])
PROGVERSION = "0.2"
COPYRIGHT = "Copyright (c) 2021, Florent Rougon"
LICENSE_SUMMARY = """\
This program is free software. It comes without any warranty, to
the extent permitted by applicable law. See the top of {progname}
for more details on the licensing conditions.""".format(progname=PROGNAME)
# Very simple Repository type
Repository = namedtuple('Repository', ['label', 'path'])
class CommitFinder:
def __init__(self, branch, date):
self.branch = branch
self.date = date
def findCommit(self, repo_path):
"""Return a commit ID that belongs to 'repo_path'."""
args = ["git", "rev-list", "--max-count=1",
"--before={}".format(self.date), self.branch]
p = subprocess.run(args, cwd=repo_path, capture_output=True,
check=True, encoding="utf-8")
return p.stdout.strip()
def action(self, repositories):
"""Act on one or more repositories.
'repositories' should be an OrderedDict whose keys are
repository labels and values Repository objects.
"""
for label, repo in repositories.items():
commitId = self.findCommit(repo.path)
if params.let_me_breathe: self.print("-" * 78)
if not params.checkout: # the output would be redundant
if params.only_label:
# Useful with --show-commits
# --show-commits-option='--no-patch'
# --show-commits-option='--format=oneline'
self.print("{}: ".format(label), end='')
else:
self.print("{}: {}".format(label, commitId))
if params.let_me_breathe: self.print()
if params.show_commits:
args = ["git", "-c", "pager.show=false", "show"] + \
params.show_commits_options + [commitId]
subprocess.run(args, cwd=repo.path, check=True)
if params.checkout:
args = ["git", "checkout", commitId]
self.print("{}: checking out commit {}...".format(label,
commitId))
subprocess.run(args, cwd=repo.path, check=True)
if params.let_me_breathe: self.print()
def print(self, *args, **kwargs):
"""Wrapper for print() that defaults to flushing the output stream.
This is particularly useful when stdout is fully buffered (e.g.,
when piping the output of the script through a pager). Without
this 'flush=True' setting, output from Git commands would bypass
the high-level buffering layer in sys.stdout and could come out
before the output of some *later* non-flushed print()
statements.
"""
print(*args, flush=True, **kwargs)
def parseConfigFile(cfgFile, configFileOptSpecified, recognizedParams):
namespace = argparse.Namespace()
l = {}
if configFileOptSpecified or os.path.exists(cfgFile):
# Read the configuration file (i.e., execute it)
with open(cfgFile, "r") as f:
exec(f.read(), {"OrderedDict": OrderedDict}, l)
for p in recognizedParams:
if p in l:
setattr(namespace, p, l[p])
return namespace
def processCommandLineAndConfigFile():
if platform.system() == "Windows":
defaultCfgFile = os.path.join(os.getenv("APPDATA", "C:/"), PROGNAME,
"config.py")
else:
defaultCfgFile = os.path.join(os.getenv('HOME'), ".config", PROGNAME,
"config.py")
parser = argparse.ArgumentParser(
usage="""\
%(prog)s [OPTION ...] DATE [REPOSITORY...]
Find Git commits before DATE in one or more repositories.""",
description="""\
Print information about, and possibly check out the most recent commit
before DATE in each of the specified repositories. By default, commits
are searched for in the 'next' branch, however this can be changed using
the --branch option or the 'branch' variable in the configuration file.
DATE can be in any date format accepted by Git (see the examples below).
If option --repo-args-are-just-paths has been given, each REPOSITORY
argument is literally treated as a path to a repository. Otherwise, each
REPOSITORY argument that has the form LABEL=PATH defines a repository
rooted at PATH with associated LABEL (using this special syntax is not
mandatory, but allows {progname} to refer to your repositories using the
provided labels, which is more user-friendly in general).
Examples (the backslashes just introduce continuation lines):
# One output line per repository (terse)
{progname} "2021-02-28 23:12:00" SG=/path/to/SG \\
FG=/path/to/FG FGData=/path/to/FGData
# Ditto without providing the repository labels
{progname} "2021-02-28 23:12:00" /path/to/SG \\
/path/to/FG /path/to/FGData
# Run 'git show' with the specified options for each commit found.
{progname} --let-me-breathe --show-commits \\
--show-commits-option='--no-patch' \\
--show-commits-option='--format=medium' \\
'2021-02-28 23:12:00' SG=/path/to/SG \\
FG=/path/to/FG FGData=/path/to/FGData
# Run 'git checkout' for each commit found.
{progname} --checkout --let-me-breathe "2021-01-01" SG=/path/to/SG \\
FG=/path/to/FG FGData=/path/to/FGData
# For each repository, print the label, commit ID and one-line description.
{progname} --only-label --show-commits \\
--show-commits-option='--no-patch' \\
--show-commits-option='--format=oneline' \\
"2021-02-28" SG=/path/to/SG \\
FG=/path/to/FG FGData=/path/to/FGData
Note: --show-commits and --show-commits-option may be used in conjunction with
--checkout if so desired.
If $HOME/.config/{progname}/config.py exists or if the --config-file option
has been given, a configuration file is read. This file is executed by
the Python interpreter and must therefore adhere to Python 3 syntax.
Here is a sample configuration file:
------------------------------------------------------------------------------
branch = 'release/2020.3'
# checkout = True
# show_commits = True
# show_commits_options = ['--no-patch', '--format=medium']
# let_me_breathe = True
# only_label = True
# repo_args_are_just_paths = True
# collections.OrderedDict is available for use here:
repositories = OrderedDict(
SimGear = "/path/to/simgear",
FlightGear = "/path/to/flightgear",
FGData = "/path/to/fgdata")
# Same list of repositories but without user-defined labels:
# repositories = [
# "/path/to/simgear",
# "/path/to/flightgear",
# "/path/to/fgdata"]
------------------------------------------------------------------------------
Command-line options take precedence over their counterparts found in
the configuration file. On the other hand, REPOSITORY arguments *extend*
the list of repositories that may be defined in the configuration file
using the 'repositories' variable.""".format(progname=PROGNAME),
formatter_class=argparse.RawDescriptionHelpFormatter,
# I want --help but not -h (it might be useful for something else)
add_help=False)
# This option is actually handled by configFileOptParser because we want to
# treat it before all other options.
parser.add_argument('--config-file', metavar="FILE", default=defaultCfgFile,
help="""\
load configuration from FILE (default: %(default)s)""")
parser.add_argument('-b', '--branch', default="next", help="""\
search the history of BRANCH (default: %(default)s)""")
parser.add_argument('-c', '--checkout', action='store_true', help="""\
run 'git checkout' for the commit found in each repository""")
parser.add_argument('-s', '--show-commits', action='store_true', help="""\
run 'git show' for the commit found in each repository""")
parser.add_argument('-S', '--show-commits-option', action='append',
dest='show_commits_options', help="""\
option passed to 'git show' when --show-commits is used (may be
specified multiple times, as in: --show-commits-option='--no-patch'
--show-commits-option='--format=medium')""")
parser.add_argument('--repo-args-are-just-paths',
action='store_true', help="""\
don't try to recognize and special-case the LABEL=PATH syntax for
repository arguments; treat them literally as paths and simply assign
labels 'Repo 1', 'Repo 2', etc., to the specified repositories""")
parser.add_argument('--let-me-breathe', action='store_true', help="""\
add blank lines and other separators to make the output hopefully more
readable when Git prints a lot of things""")
parser.add_argument('--only-label', action='store_true', help="""\
don't print the commit ID after the repository label (this is useful
when the Git output that comes next already contains the commit ID)""")
parser.add_argument('date', metavar="DATE", help="""\
find commits before this date (any format accepted by Git can be used)""")
parser.add_argument('cmdRepos', metavar="REPOSITORY", nargs='*',
help="""\
path to a repository to act on (actually, each REPOSITORY argument may be
of the form LABEL=PATH in order to assign a label to the repository).
There can be an arbitrary number of such arguments.""")
parser.add_argument('--help', action="help",
help="display this message and exit")
parser.add_argument('--version', action='version',
version="{name} version {version}\n{copyright}\n\n"
"{license}".format(
name=PROGNAME, version=PROGVERSION,
copyright=COPYRIGHT,
license=LICENSE_SUMMARY))
# Find which config file to read and note whether the --config-file option
# was given.
configFileOptParser = argparse.ArgumentParser(add_help=False)
configFileOptParser.add_argument('--config-file')
ns, remaining = configFileOptParser.parse_known_args()
if ns.config_file is not None:
configFileOptSpecified = True
else:
configFileOptSpecified = False
ns.config_file = defaultCfgFile
recognizedParams = ("repo_args_are_just_paths", "branch", "checkout",
"show_commits", "show_commits_options",
"let_me_breathe", "only_label", "repositories")
# Read the config file into 'params' (an argparse.Namespace object)
params = parseConfigFile(ns.config_file, configFileOptSpecified,
recognizedParams)
# Process the rest of the command-line
parser.parse_args(namespace=params)
if "repositories" not in params:
params.repositories = []
# Prepare the list of repositories based on the config file and the command
# line arguments.
params.repositories = initListOfRepositories(
params.repositories, params.cmdRepos, params.repo_args_are_just_paths)
if not params.repositories:
sys.exit(f"{PROGNAME}: no repository was specified, neither in the "
"configuration file\nnor on the command line; exiting.")
return params
# Returns an OrderedDict whose keys are repository labels and values Repository
# objects.
def initListOfRepositories(reposFromCfgFile, reposFromCmdLineArgs,
repoArgsAreJustPaths):
res = OrderedDict()
reposLeftToAdd = []
if isinstance(reposFromCfgFile, OrderedDict):
for label, path in reposFromCfgFile.items():
res[label] = Repository(label, path)
elif isinstance(reposFromCfgFile, list):
reposLeftToAdd.extend(reposFromCfgFile)
else:
sys.exit(f"{PROGNAME}: in the configuration file, 'repositories' must "
"be either an\nOrderedDict or a list.")
repoNum = len(res)
for elt in reposLeftToAdd + reposFromCmdLineArgs:
repoNum += 1
mo = re.match(r"^(?P<label>\w+)=(?P<path>.*)", elt)
if mo is None or repoArgsAreJustPaths:
label = "Repo {}".format(repoNum)
path = elt
else:
label, path = mo.group("label", "path")
res[label] = Repository(label, path)
return res
def main():
global params
locale.setlocale(locale.LC_ALL, '')
# Require Python 3.6 or later because we rely on the retained order for
# keyword arguments passed to the OrderedDict constructor.
if sys.hexversion < 0x030600F0:
sys.exit(f"{PROGNAME}: exiting because Python >= 3.6 is required.")
params = processCommandLineAndConfigFile()
commitFinder = CommitFinder(params.branch, params.date)
commitFinder.action(params.repositories)
sys.exit(0)
if __name__ == "__main__": main()

File diff suppressed because it is too large Load Diff

2
fg-from-scratch/.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
scratch-*/
vcpkg-git/

481
fg-from-scratch/COPYING Normal file
View File

@ -0,0 +1,481 @@
GNU LIBRARY GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1991 Free Software Foundation, Inc.
51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
[This is the first released version of the library GPL. It is
numbered 2 because it goes with version 2 of the ordinary GPL.]
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
Licenses are intended to guarantee your freedom to share and change
free software--to make sure the software is free for all its users.
This license, the Library General Public License, applies to some
specially designated Free Software Foundation software, and to any
other libraries whose authors decide to use it. You can use it for
your libraries, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if
you distribute copies of the library, or if you modify it.
For example, if you distribute copies of the library, whether gratis
or for a fee, you must give the recipients all the rights that we gave
you. You must make sure that they, too, receive or can get the source
code. If you link a program with the library, you must provide
complete object files to the recipients so that they can relink them
with the library, after making changes to the library and recompiling
it. And you must show them these terms so they know their rights.
Our method of protecting your rights has two steps: (1) copyright
the library, and (2) offer you this license which gives you legal
permission to copy, distribute and/or modify the library.
Also, for each distributor's protection, we want to make certain
that everyone understands that there is no warranty for this free
library. If the library is modified by someone else and passed on, we
want its recipients to know that what they have is not the original
version, so that any problems introduced by others will not reflect on
the original authors' reputations.
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that companies distributing free
software will individually obtain patent licenses, thus in effect
transforming the program into proprietary software. To prevent this,
we have made it clear that any patent must be licensed for everyone's
free use or not licensed at all.
Most GNU software, including some libraries, is covered by the ordinary
GNU General Public License, which was designed for utility programs. This
license, the GNU Library General Public License, applies to certain
designated libraries. This license is quite different from the ordinary
one; be sure to read it in full, and don't assume that anything in it is
the same as in the ordinary license.
The reason we have a separate public license for some libraries is that
they blur the distinction we usually make between modifying or adding to a
program and simply using it. Linking a program with a library, without
changing the library, is in some sense simply using the library, and is
analogous to running a utility program or application program. However, in
a textual and legal sense, the linked executable is a combined work, a
derivative of the original library, and the ordinary General Public License
treats it as such.
Because of this blurred distinction, using the ordinary General
Public License for libraries did not effectively promote software
sharing, because most developers did not use the libraries. We
concluded that weaker conditions might promote sharing better.
However, unrestricted linking of non-free programs would deprive the
users of those programs of all benefit from the free status of the
libraries themselves. This Library General Public License is intended to
permit developers of non-free programs to use free libraries, while
preserving your freedom as a user of such programs to change the free
libraries that are incorporated in them. (We have not seen how to achieve
this as regards changes in header files, but we have achieved it as regards
changes in the actual functions of the Library.) The hope is that this
will lead to faster development of free libraries.
The precise terms and conditions for copying, distribution and
modification follow. Pay close attention to the difference between a
"work based on the library" and a "work that uses the library". The
former contains code derived from the library, while the latter only
works together with the library.
Note that it is possible for a library to be covered by the ordinary
General Public License rather than by this special one.
GNU LIBRARY GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License Agreement applies to any software library which
contains a notice placed by the copyright holder or other authorized
party saying it may be distributed under the terms of this Library
General Public License (also called "this License"). Each licensee is
addressed as "you".
A "library" means a collection of software functions and/or data
prepared so as to be conveniently linked with application programs
(which use some of those functions and data) to form executables.
The "Library", below, refers to any such software library or work
which has been distributed under these terms. A "work based on the
Library" means either the Library or any derivative work under
copyright law: that is to say, a work containing the Library or a
portion of it, either verbatim or with modifications and/or translated
straightforwardly into another language. (Hereinafter, translation is
included without limitation in the term "modification".)
"Source code" for a work means the preferred form of the work for
making modifications to it. For a library, complete source code means
all the source code for all modules it contains, plus any associated
interface definition files, plus the scripts used to control compilation
and installation of the library.
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running a program using the Library is not restricted, and output from
such a program is covered only if its contents constitute a work based
on the Library (independent of the use of the Library in a tool for
writing it). Whether that is true depends on what the Library does
and what the program that uses the Library does.
1. You may copy and distribute verbatim copies of the Library's
complete source code as you receive it, in any medium, provided that
you conspicuously and appropriately publish on each copy an
appropriate copyright notice and disclaimer of warranty; keep intact
all the notices that refer to this License and to the absence of any
warranty; and distribute a copy of this License along with the
Library.
You may charge a fee for the physical act of transferring a copy,
and you may at your option offer warranty protection in exchange for a
fee.
2. You may modify your copy or copies of the Library or any portion
of it, thus forming a work based on the Library, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) The modified work must itself be a software library.
b) You must cause the files modified to carry prominent notices
stating that you changed the files and the date of any change.
c) You must cause the whole of the work to be licensed at no
charge to all third parties under the terms of this License.
d) If a facility in the modified Library refers to a function or a
table of data to be supplied by an application program that uses
the facility, other than as an argument passed when the facility
is invoked, then you must make a good faith effort to ensure that,
in the event an application does not supply such function or
table, the facility still operates, and performs whatever part of
its purpose remains meaningful.
(For example, a function in a library to compute square roots has
a purpose that is entirely well-defined independent of the
application. Therefore, Subsection 2d requires that any
application-supplied function or table used by this function must
be optional: if the application does not supply it, the square
root function must still compute square roots.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Library,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Library, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote
it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Library.
In addition, mere aggregation of another work not based on the Library
with the Library (or with a work based on the Library) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may opt to apply the terms of the ordinary GNU General Public
License instead of this License to a given copy of the Library. To do
this, you must alter all the notices that refer to this License, so
that they refer to the ordinary GNU General Public License, version 2,
instead of to this License. (If a newer version than version 2 of the
ordinary GNU General Public License has appeared, then you can specify
that version instead if you wish.) Do not make any other change in
these notices.
Once this change is made in a given copy, it is irreversible for
that copy, so the ordinary GNU General Public License applies to all
subsequent copies and derivative works made from that copy.
This option is useful when you wish to copy part of the code of
the Library into a program that is not a library.
4. You may copy and distribute the Library (or a portion or
derivative of it, under Section 2) in object code or executable form
under the terms of Sections 1 and 2 above provided that you accompany
it with the complete corresponding machine-readable source code, which
must be distributed under the terms of Sections 1 and 2 above on a
medium customarily used for software interchange.
If distribution of object code is made by offering access to copy
from a designated place, then offering equivalent access to copy the
source code from the same place satisfies the requirement to
distribute the source code, even though third parties are not
compelled to copy the source along with the object code.
5. A program that contains no derivative of any portion of the
Library, but is designed to work with the Library by being compiled or
linked with it, is called a "work that uses the Library". Such a
work, in isolation, is not a derivative work of the Library, and
therefore falls outside the scope of this License.
However, linking a "work that uses the Library" with the Library
creates an executable that is a derivative of the Library (because it
contains portions of the Library), rather than a "work that uses the
library". The executable is therefore covered by this License.
Section 6 states terms for distribution of such executables.
When a "work that uses the Library" uses material from a header file
that is part of the Library, the object code for the work may be a
derivative work of the Library even though the source code is not.
Whether this is true is especially significant if the work can be
linked without the Library, or if the work is itself a library. The
threshold for this to be true is not precisely defined by law.
If such an object file uses only numerical parameters, data
structure layouts and accessors, and small macros and small inline
functions (ten lines or less in length), then the use of the object
file is unrestricted, regardless of whether it is legally a derivative
work. (Executables containing this object code plus portions of the
Library will still fall under Section 6.)
Otherwise, if the work is a derivative of the Library, you may
distribute the object code for the work under the terms of Section 6.
Any executables containing that work also fall under Section 6,
whether or not they are linked directly with the Library itself.
6. As an exception to the Sections above, you may also compile or
link a "work that uses the Library" with the Library to produce a
work containing portions of the Library, and distribute that work
under terms of your choice, provided that the terms permit
modification of the work for the customer's own use and reverse
engineering for debugging such modifications.
You must give prominent notice with each copy of the work that the
Library is used in it and that the Library and its use are covered by
this License. You must supply a copy of this License. If the work
during execution displays copyright notices, you must include the
copyright notice for the Library among them, as well as a reference
directing the user to the copy of this License. Also, you must do one
of these things:
a) Accompany the work with the complete corresponding
machine-readable source code for the Library including whatever
changes were used in the work (which must be distributed under
Sections 1 and 2 above); and, if the work is an executable linked
with the Library, with the complete machine-readable "work that
uses the Library", as object code and/or source code, so that the
user can modify the Library and then relink to produce a modified
executable containing the modified Library. (It is understood
that the user who changes the contents of definitions files in the
Library will not necessarily be able to recompile the application
to use the modified definitions.)
b) Accompany the work with a written offer, valid for at
least three years, to give the same user the materials
specified in Subsection 6a, above, for a charge no more
than the cost of performing this distribution.
c) If distribution of the work is made by offering access to copy
from a designated place, offer equivalent access to copy the above
specified materials from the same place.
d) Verify that the user has already received a copy of these
materials or that you have already sent this user a copy.
For an executable, the required form of the "work that uses the
Library" must include any data and utility programs needed for
reproducing the executable from it. However, as a special exception,
the source code distributed need not include anything that is normally
distributed (in either source or binary form) with the major
components (compiler, kernel, and so on) of the operating system on
which the executable runs, unless that component itself accompanies
the executable.
It may happen that this requirement contradicts the license
restrictions of other proprietary libraries that do not normally
accompany the operating system. Such a contradiction means you cannot
use both them and the Library together in an executable that you
distribute.
7. You may place library facilities that are a work based on the
Library side-by-side in a single library together with other library
facilities not covered by this License, and distribute such a combined
library, provided that the separate distribution of the work based on
the Library and of the other library facilities is otherwise
permitted, and provided that you do these two things:
a) Accompany the combined library with a copy of the same work
based on the Library, uncombined with any other library
facilities. This must be distributed under the terms of the
Sections above.
b) Give prominent notice with the combined library of the fact
that part of it is a work based on the Library, and explaining
where to find the accompanying uncombined form of the same work.
8. You may not copy, modify, sublicense, link with, or distribute
the Library except as expressly provided under this License. Any
attempt otherwise to copy, modify, sublicense, link with, or
distribute the Library is void, and will automatically terminate your
rights under this License. However, parties who have received copies,
or rights, from you under this License will not have their licenses
terminated so long as such parties remain in full compliance.
9. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Library or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Library (or any work based on the
Library), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Library or works based on it.
10. Each time you redistribute the Library (or any work based on the
Library), the recipient automatically receives a license from the
original licensor to copy, distribute, link with or modify the Library
subject to these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
11. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Library at all. For example, if a patent
license would not permit royalty-free redistribution of the Library by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Library.
If any portion of this section is held invalid or unenforceable under any
particular circumstance, the balance of the section is intended to apply,
and the section as a whole is intended to apply in other circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
12. If the distribution and/or use of the Library is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Library under this License may add
an explicit geographical distribution limitation excluding those countries,
so that distribution is permitted only in or among countries not thus
excluded. In such case, this License incorporates the limitation as if
written in the body of this License.
13. The Free Software Foundation may publish revised and/or new
versions of the Library General Public License from time to time.
Such new versions will be similar in spirit to the present version,
but may differ in detail to address new problems or concerns.
Each version is given a distinguishing version number. If the Library
specifies a version number of this License which applies to it and
"any later version", you have the option of following the terms and
conditions either of that version or of any later version published by
the Free Software Foundation. If the Library does not specify a
license version number, you may choose any version ever published by
the Free Software Foundation.
14. If you wish to incorporate parts of the Library into other free
programs whose distribution conditions are incompatible with these,
write to the author to ask for permission. For software which is
copyrighted by the Free Software Foundation, write to the Free
Software Foundation; we sometimes make exceptions for this. Our
decision will be guided by the two goals of preserving the free status
of all derivatives of our free software and of promoting the sharing
and reuse of software generally.
NO WARRANTY
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
DAMAGES.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Libraries
If you develop a new library, and you want it to be of the greatest
possible use to the public, we recommend making it free software that
everyone can redistribute and change. You can do so by permitting
redistribution under these terms (or, alternatively, under the terms of the
ordinary General Public License).
To apply these terms, attach the following notices to the library. It is
safest to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least the
"copyright" line and a pointer to where the full notice is found.
<one line to give the library's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
Also add information on how to contact you by electronic and paper mail.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the library, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the
library `Frob' (a library for tweaking knobs) written by James Random Hacker.
<signature of Ty Coon>, 1 April 1990
Ty Coon, President of Vice
That's all there is to it!

View File

@ -0,0 +1,56 @@
## Test Scenery Project
An example to demostrate the usage of the TerraGear Scenery tools. By studying this example, you should gain a better understanding of the tool workflow.
Copyright (C) 2018 Scott Giese (xDraconian) scttgs0@gmail.com
### Purpose:
Most users could benefit from the availability of a reference example to gain a working understanding of scenery generation. I am hopeful you gain value from this example and i would like to see this lead toward encouraging more Windows users to get involved in contributing to scenery development.
### Supported Platform:
Windows 10
### Prerequisites:
SimGear
TerraGear
### Installation Instructions:
None
### Usage:
Below is an explaination of the files provided:
| File | Description |
|-----:|------------|
|**generate.cmd** | A command script containing calls to the various TerraGear tools to produce scenery for Oahu |
|**test.apt.dat** | Contains all airport data for those located on Oahu |
|**/data** | Folder containing files you provide to the TerraGear tools |
|**/data/SRTM-3** | Terrain data for Oahu |
|**/data/fg_* ** | Shapefiles. These define the type of terrain (grass, lake, forest, etc.) - Items typically defined by a polygon area |
|**/data/osm_* ** | OpenStreetMap files. These represent roadways, rivers, etc. - Items typically defined by "lines" |
| **/work** | Files produced by the TerraGear tools |
| **/output** | Final resulting files. These are the scenery files that will be loaded into FlightGear |
Run the command script interactively. No log is produced.
generate.cmd
Runs the command script and routes STDOUT and STDERR to a log file. You will miss the prompts, so it is important that you monitor the log while it is running.
generate.cmd > generate.log 2>&1
Options for monitoring the log file while the script is running:
Start the script and then
- Load the log file into Notepad++ (https://notepad-plus-plus.org/).
- Turn on feature "Monitor" via Notepad++
- **[Preferred]** Load the log file into WinTail (http://www.baremetalsoft.com/wintail/)
### Testing the Scenery:
Configure fgfs or the Flightgear Launcher to look in **/CustomSeneryProjects/Test/output** for additional scenery files.
Choose as a starting location from any of the airports present on Oahu (e.g. PHNL or PHNG.)
Note: You will find that all the buildings, radio towers, smoke stacks, etc. are missing. This is expected since your *output* folder doesn't contain any of these items.
### Known Issues:
There is a bug in the toolchain that prevents the airport BTG files from being copied to the */output* folder. You will need to copy these files manually until the issue is resolved. Copy the files you find in the */work/AirportObj* folder to your */output* folder.

View File

@ -0,0 +1 @@
GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]]

View File

@ -0,0 +1 @@
GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]]

View File

@ -0,0 +1 @@
GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]]

View File

@ -0,0 +1 @@
GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]]

View File

@ -0,0 +1 @@
GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]]

View File

@ -0,0 +1 @@
GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4326"]]

View File

@ -0,0 +1 @@
GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]]

View File

@ -0,0 +1 @@
GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4326"]]

View File

@ -0,0 +1 @@
GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]]

View File

@ -0,0 +1 @@
GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]]

View File

@ -0,0 +1 @@
GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]]

View File

@ -0,0 +1 @@
GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4326"]]

View File

@ -0,0 +1 @@
GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]]

View File

@ -0,0 +1 @@
GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4326"]]

View File

@ -0,0 +1 @@
GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]]

View File

@ -0,0 +1 @@
GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]]

View File

@ -0,0 +1 @@
GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]]

View File

@ -0,0 +1 @@
GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]]

Some files were not shown because too many files have changed in this diff Show More