Compare commits

..

479 Commits

Author SHA1 Message Date
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
Automatic Release Builder
735f5160e4 some tweaks to the release_branch builder scripts 2017-02-20 18:51:44 +01:00
Curtis L. Olson
a5949431b1 A couple cleanups .... 2017-02-12 09:44:02 -06:00
Curtis L. Olson
0622410e4a Create the preview directory if it doesn't already exist. 2017-02-12 09:14:05 -06:00
James Turner
acb8a7a793 Fix catalog parsing, add unit-tests
Fixes issues with conflated nodes and skipped previews in the
catalog XML.
2017-02-10 11:55:30 +00:00
Torsten Dreyer
93b71e29e6 looks like sf doesnt like git protocol anymore.
Use anonymous https instead
2017-02-09 17:46:55 +01:00
Torsten Dreyer
fcf5087da9 use release instead of -rc suffix 2017-02-09 17:46:09 +01:00
James Turner
2c7e8318db OpenAL-soft doesn’t need oalinst
Simplifies our install, nice.
2017-02-08 11:49:02 +00:00
Rebecca N. Palmer
157ce05c69 d&c.sh security: use https to prevent MITM attacks
(SourceForge now allows anonymous https fetching)
2017-01-28 17:17:44 +00:00
James Turner
799b0b4ad6 Fix merging of includes when parsing XML.
Incorrect use of addChild was causing overlaid properties not to be
merged correctly when performing an include.
2017-01-20 21:43:19 +00:00
Torsten Dreyer
c9f7483fc4 Merge /u/chrisblues/flightgearMeta/ branch next into next
https://sourceforge.net/p/flightgear/fgmeta/merge-requests/19/
2017-01-13 14:29:06 +00:00
James Turner
4d3a5fb528 Remove my catalog scripts in favour of Curt’s
(But preserve the catalog-tags list for future re-use)
2017-01-12 21:43:02 +00:00
James Turner
e8a6c477cc Preview support. 2017-01-12 21:12:57 +00:00
James Turner
21a53b3537 Update-catalog does SGProps parsing of -set.xml
This restores the ability to use includes in -set.xml files visible
to the catalog code, and also exposes some problems / validation
issues in our -set.xml files. (Which can of course be fixed)
2017-01-12 14:39:35 +00:00
chris_blues
37ff25cfe4 Add Nasa2FGEarthview
a converter script (bash) to download sattelite images from NASA or a mirror
and convert them to usable FGearthview format. Supports different
resolutions.
See:
https://github.com/chris-blues/Nasa2FGearthview
2017-01-12 10:44:40 +01:00
James Turner
0409f339ae Tweaks to my Mac build script. 2017-01-10 18:12:12 +00:00
James Turner
771c2a2abe Windows builds create PDBs again. 2016-12-13 11:32:33 +00:00
James Turner
224a9a0b18 Add my Mac and Linux build helpers.
This is to save new contributors some time getting a build env, since
download-and-compile produces a slightly Baroque setup for day-to-day
development.
2016-12-11 00:18:45 +00:00
James Turner
08cb5c481b Add my Windows build script for posterity.
Linux/Mac coming shortly.
2016-12-10 23:57:11 +00:00
James Turner
c23ec2827f Ignore Windows build directories. 2016-12-09 14:59:57 +00:00
James Turner
ba8feb7d6f Submdoule updates. 2016-12-09 14:56:33 +00:00
James Turner
f1f612206f Re-enable CrashRpt in Windows installers. 2016-12-09 14:50:03 +00:00
Florent Rougon
ef36d50d9b Add directory changes-in-dat-files/apt.dat with two patches for apt.dat
000-general-modify-header.patch:
  indicate that apt.dat has been modified by the FlightGear team

001-CCC5-fix-missing-Unicom-frequency.patch:
  add missing Unicom frequency for CCC5 (Havelock), thanks to wkitty42

The patch files have LF line endings (otherwise this is a mess: some
lines ending with LF and others with CRLF inside the same file). In
order to obtain this, apt.dat has been recoded to LF line endings (Unix
and MacOS X), then the changes have been made, the diff commands run,
and finally the resulting file has been recoded with CRLF line endings
(Windows) before being gzipped and written to FGData. This was done so
in order to preserve compatibility with software that could not handle a
change in $FG_ROOT/Airports/apt.dat.gz's line ending style.
2016-12-08 19:20:06 +01:00
James Turner
5b969d37ec Correct way to invoke ISCC in quiet mode! 2016-12-02 16:59:07 +00:00
James Turner
8e82d4e1fb Revert "Reduce logging level of NSIS."
This reverts commit 2dfbc989ba.
2016-12-02 16:58:15 +00:00
James Turner
2dfbc989ba Reduce logging level of NSIS. 2016-11-29 16:30:01 +00:00
James Turner
93b085f441 Fix a typo 2016-11-25 21:52:42 +00:00
James Turner
52bceabab7 Catalog includes description / authors per variant. 2016-11-25 21:51:46 +00:00
James Turner
cee226183c Official catalog supports 2017.* versions. 2016-11-25 17:20:31 +00:00
Torsten Dreyer
6cb7d12ec1 Remove locale folder from install
After removal of fgrun, this folder does not exist anymore
2016-11-18 11:06:36 +01:00
Automatic Release Builder
16a42dfc6b Add the scripts to automize the release process 2016-11-17 15:38:09 +01:00
Automatic Release Builder
9d6ce08430 track submodule changes for release 2016-11-17 13:43:40 +01:00
Automatic Release Builder
95b7ef534b new version: 2017.1.0 2016-11-17 13:43:39 +01:00
Automatic Release Builder
b03d12313a new version: 2016.4.1 2016-11-17 13:43:39 +01:00
James Turner
13137727b0 Remove FGRun from Windows packaging. 2016-11-14 22:29:04 +01:00
Rebecca N. Palmer
7e30b2f87a d&c.sh: make setting build type work, default to RelWithDebInfo
Partly based on work by waldo kitty <wkitty42>
2016-10-30 22:01:36 +00:00
Rebecca N. Palmer
6a356f7e18 download_and_compile: use our previously compiled cmake if it exists 2016-10-29 22:15:32 +01:00
Rebecca N. Palmer
b2743b92f3 download_and_compile: add option to build CMake from source
(we may soon require a newer version than e.g. Debian stable has)
2016-10-20 22:42:18 +01:00
Rebecca N. Palmer
f57a5ed4cb fgdata_checkers: update comments 2016-10-20 22:42:01 +01:00
James Turner
249f00dd32 Reenable OpenAL installation 2016-09-28 17:11:14 -05:00
Torsten Dreyer
f581b93d9b Fix #1898: wrong order of pull and checkout 2016-09-18 15:46:33 +02:00
Automatic Release Builder
2a1b666a5e track submodule changes for release 2016-09-06 13:16:39 +02:00
Automatic Release Builder
92864a4c1a track submodule changes for release 2016-09-06 12:59:53 +02:00
Automatic Release Builder
03ef344ada new version: 2016.4.0 2016-09-06 12:51:05 +02:00
Automatic Release Builder
b81e7868e7 new version: 2016.3.1 2016-09-06 12:51:05 +02:00
Curtis L. Olson
a64e172c00 Merge branch 'next' of ssh://git.code.sf.net/p/flightgear/fgmeta into next 2016-08-19 06:31:57 -05:00
Curtis L. Olson
6927ffb67c Fix a cwd/path issue when building zip files. 2016-08-19 06:29:50 -05:00
James Turner
6ae033aa68 Don't install osg serializers.
Current OSG build excludes serializers, so don't try to install them.
2016-08-18 11:18:08 +01:00
Curtis L. Olson
d60b866718 Merge branch 'next' of ssh://git.code.sf.net/p/flightgear/fgmeta into next 2016-08-17 13:35:27 -05:00
Curtis L. Olson
57e20e046a Aircraft catalog update script with example catalog configuration. 2016-08-17 13:33:10 -05:00
James Turner
914241cc79 Disable signing for now, something not correct. 2016-08-17 15:38:54 +01:00
James Turner
6e61261a52 Enable Windows code-signing. 2016-08-17 13:43:40 +01:00
Richard Senior
cd41e9713f Parse new NOAA METAR index page format 2016-08-08 23:49:34 +01:00
Alessandro Menti
78a51fb6e1 Make the NOAA METAR URL point to the new address 2016-08-04 21:35:11 +02:00
James Turner
5a64d51e10 Further Windows build fixes
Adjust OSG install location to match existing Jenkins setup.
2016-08-03 10:39:32 +01:00
James Turner
32738decf4 Change Windows build script for VS2015 2016-08-02 11:18:42 +01:00
Torsten Dreyer
378b261aaa Remove obsolete ENABLE_CURL flag from build scripts 2016-05-17 10:57:42 +02:00
Automatic Release Builder
20f6511228 track submodule changes for release 2016-05-17 10:12:02 +02:00
Automatic Release Builder
8f8b7b24c1 new version: 2016.3.0 2016-05-17 10:07:30 +02:00
Automatic Release Builder
c9fc223310 new version: 2016.2.1 2016-05-17 10:07:30 +02:00
Alessandro Menti
067afcd2b3 Windows setup: fix wrong fgdata path in links
Fix several Start menu links which still had references to the old
FGData path ("fgdata" instead of the new "data").
2016-05-16 23:17:27 +02:00
Torsten Dreyer
e61ebfae25 Fix linux release/nightly build 2016-05-06 11:06:27 +02:00
Richard Senior
bbceb8429c Add script to recreate metar.dat.gz 2016-04-27 17:11:10 +01:00
James Turner
450ab705d2 Remove standalone TerraSync from Windows installer. 2016-04-15 16:16:59 +01:00
James Turner
e50b26e537 Use libCurl for night / release builds. 2016-04-15 16:12:51 +01:00
James Turner
30f7151599 Merge /u/elgaton/fgmeta/ branch fgrun-data-path-fix into next
https://sourceforge.net/p/flightgear/fgmeta/merge-requests/12/
2016-04-02 09:10:13 +00:00
Alessandro Menti
4a557f9ff8 FlightGear Windows setup: fix default data path for FGRun
Fix the default fgdata path so that FGRun will use the correct one.

Thanks to gfox1, PINTO and wkitty42 for the bug report:
http://forum.flightgear.org/viewtopic.php?f=22&t=29241
2016-04-01 18:40:12 +02:00
Jasin Colegrove
58e822462a Windows Icon/Shortcut 'Start in' fix 2016-03-31 14:15:54 -04:00
Automatic Release Builder
3ff1d47aa6 fix "stable" version for download_and_compile.sh
Always use latest release branch for stable build
2016-02-21 17:40:10 +01:00
Automatic Release Builder
4106b73f36 track submodule changes for release 2016-02-17 21:16:35 +01:00
Automatic Release Builder
0cd4679fbc new version: 2016.2.0 2016-02-17 21:16:35 +01:00
Automatic Release Builder
f65a068fe4 new version: 2016.1.1 2016-02-17 21:16:35 +01:00
Automatic Release Builder
7e5ea0e055 Initial commit of the version file 2016-02-17 21:01:20 +01:00
Torsten Dreyer
5c8b686cde Make submodules tracking branch 2016-02-17 19:25:41 +01:00
James Turner
92b7ab1b09 Remove the old catalog-creation logic
- avoid confusing people by having both the old and new logic
  in the same place.
2016-01-14 10:32:57 -06:00
James Turner
99026272a1 Catalog-creation tweaks. 2016-01-14 10:30:34 -06:00
James Turner
d930779381 Packaging updates 2016-01-13 19:47:13 -06:00
James Turner
141be1410a Fix adding of variants to catalog property-list 2016-01-03 19:49:54 -06:00
James Turner
5b1b01bb0f Don’t need MAKEOPTIONS
- we already set official MAKEFLAGs on the Jenkins slave.
2015-12-08 18:55:37 +00:00
James Turner
0c36cc3eef Use make instead of xcodebuild to compile Mac.
Xcode seems to be overriding the setting of min-macos-version,
which is causing 10.7 and 10.8 support to fail. See if using
make resolves this.
2015-12-08 18:40:02 +00:00
James Turner
3aacabdfd0 Catalog tag changes
- fix spelling of ‘Embraer’
- add airship feature type
2015-12-08 18:28:49 +00:00
James Turner
9d00aec7dd Tweak Qt-path setting for Mac nightly. 2015-11-15 00:11:25 +00:00
James Turner
6f54db6d76 Fix zip-name specification in packages 2015-09-27 23:15:44 -05:00
James Turner
b11fae7f37 Fix paths inside created zips 2015-09-24 20:39:03 -05:00
James Turner
8823d89f42 Add ‘force’ option to update every package 2015-09-24 20:38:54 -05:00
James Turner
c19096b0af Fixes to package generation tooling 2015-09-24 19:45:42 -05:00
James Turner
d943076183 Adjust package IDs, use primary -set.xml
- previously directory name was used, but this caused problems
for aircraft with certain combinations of dir/-set.xml name
2015-09-20 09:20:43 -05:00
James Turner
955fa86000 Archive windows PDB files. 2015-09-04 08:34:05 +01:00
James Turner
c67f750862 Archive PDB files inside the build script. 2015-09-02 11:41:49 +01:00
James Turner
5d112a90d4 Whoops, don’t block on user input.
/Q to rmdir avoids an ‘are you sure’ prompt
2015-09-02 11:38:50 +01:00
James Turner
b75295f647 Fix nightly build uploads. 2015-09-02 11:35:06 +01:00
James Turner
4ac12095a6 Fix data destination on Windows
- ensures default path logic works.
2015-09-02 11:27:50 +01:00
James Turner
deeeddbfbb Additional debug output from post_upload.py 2015-09-02 11:26:39 +01:00
James Turner
e0504be7cf Mac release builds tweaks 2015-08-31 23:29:35 +01:00
James Turner
3c0683185f Post-upload tweaks to support RC builds. 2015-08-31 23:29:20 +01:00
Torsten Dreyer
a28832b029 Correct version numbers for start menu entries
Patch submitted by Alessandro Menti
2015-08-04 10:24:12 +02:00
James Turner
2d119001c6 Fix creation of nodes with existing index. 2015-08-03 17:59:41 -05:00
James Turner
dec3202ba6 Merge /u/hamzaalloush/flightgear/ branch release_version_3.6 into next
http://sourceforge.net/p/flightgear/fgmeta/merge-requests/7/
2015-08-02 23:40:28 +00:00
James Turner
479a175587 Support a global exclude file for zip creation. 2015-07-30 12:04:17 -05:00
James Turner
f61ceb1293 Support a per-aircraft exclude file.
- needed to make the P51D not be crazy large.
2015-07-29 15:09:01 -05:00
James Turner
d2cb130135 Fix existing catalog 2015-07-29 11:54:45 -07:00
James Turner
bd453e4a3e Drive scan from SCM repos.
- reduces repetition in the config XML.
2015-07-28 15:26:00 -05:00
Hamza Alloush
8b62b242a4 upgrade the stable version of the -s swotch to the download_and_compile.sh script to 3.6 2015-07-28 15:59:20 +03:00
James Turner
80f7a7f2d3 Mirror URLs written correctly. 2015-07-27 22:39:32 -05:00
James Turner
78de3e4243 More control over updating SCM repos. 2015-07-27 21:45:55 -05:00
James Turner
565feadfa6 Support for multiple upload targets
- also option to update the SCM repo
2015-07-27 21:40:00 -05:00
James Turner
242c0f9172 Move PackageData to its own file. 2015-07-25 22:45:01 -05:00
James Turner
651482a0df Maintain catalog: argument parsing 2015-07-22 23:35:57 -04:00
James Turner
f0fff6d16e Catalog creation work
- XML scanning works
- thumbnail extraction progressing
2015-07-18 15:30:20 -05:00
James Turner
8d1e9abcc9 Catalogs: Thumbnail extraction works. 2015-07-14 21:37:39 -05:00
James Turner
5944ad64d9 Improved bool parsing 2015-07-11 22:23:14 +01:00
James Turner
cf1afee705 maintain catalog: Mirror URLs generated 2015-07-11 22:23:05 +01:00
James Turner
548de8bd2d OS-X: Adapt package script for @rpath
Since the Mac build sets @rpath correctly now, no longer
need to fix install names during package creation.
2015-07-11 21:48:24 +01:00
James Turner
f390d16625 Ignore .pyc files 2015-07-11 21:47:38 +01:00
James Turner
fbda7475f0 Maintain catalog script starting to work. 2015-07-11 21:47:13 +01:00
James Turner
287380d98d Work on catalog creation. 2015-06-04 22:09:46 +01:00
Torsten Dreyer
355a88d0cd Replace old gitorious urls with new locations 2015-05-27 10:40:34 +02:00
Hamza Alloush
245ab83192 restore Openscenegraph compile functionality 2015-05-11 09:16:25 +03:00
James Turner
0c3bf73b01 Refresh superbuild
- remove FGRun
- remove Windows-3rd-party-dep download
- disable OpenRTI for now
- Pull OSG from Git
- Don't build Boost on Mac
2015-05-06 21:38:07 +01:00
Hamza Alloush
689f73ef76 use $SG_CMAKEARGS and $FG_CMAKEARGS. 2015-04-13 05:35:30 +03:00
Hamza Alloush
4bf8367d3c restore openRTI -i switch functionality, add additional CMake argument variable 2015-04-13 05:32:20 +03:00
James Turner
d4890af978 Missed add of submodule dir
- thanks to Alessandro Menti for catching
2015-04-06 09:32:39 +01:00
James Turner
c2ef0ba2dc Add windows 3rd party repo as a submodule 2015-04-03 10:52:29 +01:00
James Turner
fae026da99 Post-upload script for Mac & Win
Runs on download.flightgear.org, as part of the SFTP upload step of
the Jenkins jobs, to deal with changing version, creation of symlinks
and mirroring to SourceForge.
2015-03-23 11:36:39 -05:00
Clement de l'Hamaide
18889da1dc Windows: set Qt5 launcher as default launcher 2015-03-16 18:40:34 +01:00
Clement de l'Hamaide
3977bab348 Windows: fix Qt5 launcher shortcut 2015-03-16 18:34:33 +01:00
Clement de l'Hamaide
db21783c26 Add libintl-8.dll for FGRun 2015-03-16 18:02:25 +01:00
Clement de l'Hamaide
ede6d2fe85 Fix Qt5 deployment on Windows 2015-03-16 17:49:57 +01:00
Clément de l'Hamaide
20d4f3def3 Implement InnoSetup changes for Qt5 support 2015-03-16 11:18:13 +01:00
Clément de l'Hamaide
853ca8b713 Windows release: add Qt5 deployment step 2015-03-16 11:06:06 +01:00
Clément de l'Hamaide
7e25d81d12 Linux build: do not remove build dirs and clean up dist/ dir 2015-03-14 22:43:18 +01:00
Clément de l'Hamaide
2b98575f39 Windows release script: debugging 2015-03-13 19:23:21 +01:00
Clément de l'Hamaide
1e5f4a4881 Windows release script: debugging 2015-03-13 19:13:19 +01:00
Clément de l'Hamaide
62f47ccd9d Windows release script: debugging 2015-03-13 18:58:01 +01:00
otto
f16cdc0c80 Windows release build: try to simplify this spaghetti code 2015-03-13 14:51:49 +01:00
Clément de l'Hamaide
d4b6eae8ee Windows release build: fix -nightly tag detection 2015-03-13 09:28:16 +01:00
Clément de l'Hamaide
c7b112e8f4 Windows release build: fix typo 2015-03-13 09:16:13 +01:00
Clément de l'Hamaide
3e739e8a0c Debug Windows nightly 2015-03-12 19:58:21 +01:00
Clément de l'Hamaide
9f542a9108 bump d&c version (easier to track bug report) 2015-03-12 19:34:48 +01:00
Clément de l'Hamaide
600d6cfb5f update submodule URL to SF.net 2015-03-12 18:06:15 +01:00
Clément de l'Hamaide
d001ca1263 d&c: change gitorious.org to sourceforge.net 2015-03-12 18:03:16 +01:00
James Turner
e80520c9ac Initial hacking on a post-upload script.
- this will live on download.flightgear.org, but adding
here so it can be maintained visibly.
2015-03-11 17:48:33 +00:00
Clément de l'Hamaide
e70381a0b9 Windows: fix typo 2015-03-10 12:23:10 +01:00
Clément de l'Hamaide
7db79e8414 Windows: fix env variable use 2015-03-10 00:24:06 +01:00
Clément de l'Hamaide
0e24b325f4 Windows: add Qt5 SDK path to CMake (again) 2015-03-09 23:36:33 +01:00
Clément de l'Hamaide
9b72febb48 Windows: add Qt5 SDK path to CMake 2015-03-09 23:29:55 +01:00
Clément de l'Hamaide
aed93a2267 Windows: add shortcut for the new Qt launcher + implement diet & full nightlies 2015-03-09 22:38:51 +01:00
James Turner
1758cee3f3 Remove old data rsync code. 2015-03-09 16:35:18 +00:00
Clément de l'Hamaide
c70b71d843 Set executable flag on build_release_* scripts 2015-03-08 17:36:11 +01:00
Clément de l'Hamaide
df541b96c8 Even better fix! 2015-03-08 12:51:15 +01:00
Clément de l'Hamaide
09e7086560 Well certainly the biggest fix of the year :) 2015-03-08 12:43:19 +01:00
Clément de l'Hamaide
a7162574b3 Move git:// to https:// for submodule 2015-03-08 07:39:19 +01:00
James Turner
444d6be8ad Mac nightly creates full and lite DMGs. 2015-03-08 01:01:03 +00:00
Clément de l'Hamaide
0136cf6849 Implement the necessary change for the new FGData for Linux and Windows 2015-03-08 01:19:10 +01:00
Clément de l'Hamaide
8f5a14dc93 d&c: update for new FGData repository 2015-03-07 23:58:58 +01:00
Clément de l'Hamaide
0bde0fbce9 Update d&c script to 2.32 2015-03-06 19:28:55 +01:00
James Turner
e3d55cf136 Fix nightly build rsync source.
Rsync can’t rename the root folder, so moved things on Sphere into
a subdirectory.
2015-02-28 11:42:36 +00:00
James Turner
e57f5f761c Use correct FGData branch for nightlies. 2015-02-24 12:56:22 +00:00
James Turner
c68585096d Setup submodule branch tracking.
(Maybe already done by Clement but making sure)
2015-02-24 11:53:36 +00:00
James Turner
0856c9827f Remove maclauncher submodule 2015-02-24 11:50:53 +00:00
James Turner
a54e3c43cb Tweaks for nightly build packaging 2015-02-24 11:47:15 +00:00
James Turner
7c6278a7ff Fix Info.plist template 2015-02-24 11:44:05 +00:00
James Turner
cb1819693d Code-signing v2 2015-02-24 11:43:51 +00:00
James Turner
c09266504a Revised Mac package script 2015-02-24 11:41:58 +00:00
James Turner
3f2d05e183 Remove old Mac launcher. 2015-02-24 11:39:55 +00:00
Clément de l'Hamaide
ed043cd81c Windows installer: do not use previous App dir for new installation 2015-02-12 18:57:18 +01:00
Clément de l'Hamaide
8ca2beb4cb Revert "Mac-release: Use local base-package"
This reverts commit 223e0b9fdb.
2015-01-19 00:37:36 +01:00
Clément de l'Hamaide
bf9c4d93c0 Revert "Linux-release: use local base-package"
This reverts commit 4e343a57e8.
2015-01-19 00:37:19 +01:00
Torsten Dreyer
85081d90e5 Reflect changes for 3.4.0 release 2015-01-17 20:18:05 +01:00
Alessandro Menti
2eafcdbd90 Add firewall exception when installing FlightGear on Windows
Following executable are handled:
* fgfs.exe
* fgcom.exe
* metar.exe
* terrasync.exe
2014-12-20 19:50:08 +01:00
James Turner
cc7bc8fdbf Fixes for tag extraction in catalog building. 2014-10-18 11:37:43 +01:00
Clément de l'Hamaide
dc11e32420 d&c: compile in Release mode for FG 2014-10-11 14:06:08 +02:00
Clément de l'Hamaide
308f9bd6f9 Bump FG/SG revision in :next 2014-10-11 14:02:47 +02:00
Clément de l'Hamaide
aa74c27f0f d&c: remove SG hack 2014-09-13 21:48:34 +02:00
Rebecca Palmer
ccc94446df fgdata_checkers: don't convert ocean_depth_1 to dds
(fix for black water near shore at effects>=4)
2014-09-10 20:13:24 +01:00
Rebecca Palmer
39a3312d35 fgdata_checkers: various improvements
create_reduced_fgdata: add parallelism,
add options to use or overwrite existing .dds,
don't include alpha when not needed
fgdata_size: output more statistics, improve formatting
find_unused_textures: add used_dds comparison strip
2014-09-09 22:21:51 +01:00
Clément de l'Hamaide
8c6b73ba36 Introduce post-commit webhook 2014-09-07 23:39:40 +02:00
Rebecca Palmer
80df632a34 fgdata_checkers: create_reduced_fgdata add texture format conversion 2014-09-05 19:00:48 +01:00
Clément de l'Hamaide
020969d8a7 Remove UIUC aircraft from base package (larcsim is not enable in release binary) 2014-08-31 13:43:03 +02:00
Clément de l'Hamaide
4cb8332ef4 Remove Textures.high from base package 2014-08-31 13:42:19 +02:00
Clément de l'Hamaide
742fe828b9 Bump FG/SG/FGRun revision 2014-08-25 21:31:11 +02:00
Clément de l'Hamaide
9291d90763 Bump FG/FGRUN revision 2014-08-19 21:51:35 +02:00
Clément de l'Hamaide
035b7f567b Win setup: update for the new FGCom standalone 2014-08-19 21:51:35 +02:00
Clément de l'Hamaide
2855f5a3a3 Win setup: use the new package folder 2014-08-19 21:51:35 +02:00
Clément de l'Hamaide
4e343a57e8 Linux-release: use local base-package 2014-08-17 12:30:00 +02:00
Clément de l'Hamaide
223e0b9fdb Mac-release: Use local base-package 2014-08-17 12:20:37 +02:00
Clément de l'Hamaide
4c73bad839 Fix mac release build 2014-08-14 13:47:42 +02:00
Clément de l'Hamaide
38277ea867 Win installer: fix a wrong copy/paste 2014-08-14 01:13:57 +02:00
Clément de l'Hamaide
d586f9043c FG win installer: add missing 3rd party files 2014-08-13 10:38:16 +02:00
Clément de l'Hamaide
c6a4485de4 Superbuild: help OSG to find some libs 2014-08-11 23:48:22 +02:00
Clément de l'Hamaide
e9593dbe5b Fix Win32 release build 2014-08-11 23:41:07 +02:00
Clément de l'Hamaide
f8bd1181b1 Bump fgrun, fg, sg revision 2014-08-11 23:39:26 +02:00
Rebecca Palmer
2ddba10a14 fgdata_checkers: create_reduced_fgdata fix bugs & add new option 2014-07-28 20:47:43 +01:00
Rebecca Palmer
841a58097b fgdata_checkers: add text encoding checker,
add more options to create_reduced_fgdata
2014-07-28 09:10:12 +01:00
Torsten Dreyer
1514eaee73 Set stable version for download_and_compile.sh 2014-07-17 15:04:31 +02:00
Rebecca Palmer
d498ebbe61 create_reduced_fgdata: add option to omit regional textures 2014-06-17 21:35:49 +01:00
Rebecca Palmer
74a0c9c4ab fgdata_checkers: add exclusion for splash screens 2014-06-16 08:11:47 +01:00
Rebecca Palmer
0db50a95a3 fgdata_checkers: fix create_reduced_fgdata, add unused models check 2014-06-13 22:38:48 +01:00
Rebecca Palmer
75c90bfb3f fgdata_checkers: rename, add more functions
Previously textures_used_checker, now also has:
size calculators
(not-yet-working) minimal fgdata generator
2014-06-12 23:39:02 +01:00
James Turner
8e52a6a247 Catalog creation tweaks:
- add file-size-bytes
- cache zips locally for MD5 generation
- audit tags against known list
2014-06-12 10:34:31 +01:00
Rebecca Palmer
5b5d2865a6 add script for checking for unused or dds-only textures 2014-06-06 09:45:18 +01:00
James Turner
6109e8717d catalog: filename / md5 fixes.
- script downloads every zip now, so run with care.
2014-06-01 22:44:35 +01:00
James Turner
4abdf82598 Closer to working catalog creation. 2014-06-01 20:45:41 +01:00
James Turner
1ab162d4d6 Hacking on catalog-creation script.
Only appropriate for official FlightGear aircraft right now, needs
additional work to be useful for other hangars.
2014-06-01 15:44:52 +01:00
Clément de l'Hamaide
c25db033d6 Superbuild: don't search for Qt deps 2014-05-29 20:31:27 +02:00
Clément de l'Hamaide
06619741c4 Superbuild: help Windows to find PNG lib 2014-05-29 13:48:12 +02:00
Clément de l'Hamaide
4f7be59b0d Superbuild: fix OSG build for Win 2014-05-27 22:19:50 +02:00
Clément de l'Hamaide
d54ef9f452 d&c: and bump version 2014-05-22 22:12:21 +02:00
Clément de l'Hamaide
82931efe42 d&c: looks like git status is not the same everywhere so use another trick 2014-05-22 22:08:08 +02:00
Clément de l'Hamaide
0e925e2b65 d&c: don't exit after script conversion 2014-05-21 11:03:41 +02:00
Clément de l'Hamaide
62a773ed04 d&c: add CGAL in default build list 2014-05-20 13:08:50 +02:00
Clément de l'Hamaide
b1f695a89c d&c: new version, thanks to Pat 2014-05-20 13:06:19 +02:00
Clément de l'Hamaide
036899c620 CMakeLists.txt: help CMake to find FreeType include dirs 2014-05-12 12:35:06 +02:00
Clément de l'Hamaide
636d71da45 CMakeLists.txt: fix typo 2014-05-12 12:27:06 +02:00
Clément de l'Hamaide
b4ef60ce93 CMakelists.txt: update OSG Win dependences 2014-05-12 10:12:24 +02:00
Clément de l'Hamaide
3eda43fa69 Bump fg/sg/maclauncher revision 2014-05-12 10:06:02 +02:00
Clément de l'Hamaide
82feb39e2a Win installer: Add TS dir to --fg-scenery during installation 2014-05-11 21:09:04 +02:00
Thomas Geymayer
15b395c983 CMakeLists patch not needed/fails with flightgear next 2014-05-06 01:31:49 +02:00
Clément de l'Hamaide
65dbc2051a download_and_compile: OSG 3.2.0 is officialy the version supported by FG + update FGCom compilation 2014-04-30 21:20:53 +02:00
Clément de l'Hamaide
36ab364a91 Install only required .dll + add OSG deps for OSGEarth 2014-04-30 21:02:51 +02:00
James Turner
9d1862e591 Bug 1344 - remove old files from base package
- pass '--delete' to rsync so files removed from the source
tree are also removed on the destination side.
2014-03-28 08:06:21 +00:00
James Turner
70ee8107b1 Update to v1.9.14 of the script
(same version as on master now)
2014-03-04 09:10:52 +00:00
Clement de l'Hamaide
8639e504c3 Remove 32 bits install option 2014-02-14 23:10:58 +01:00
Clement de l'Hamaide
4a114eb43d bump fgrun/fgfs/sg revision 2014-02-14 23:00:56 +01:00
Clement de l'Hamaide
156a3e1cf1 Revert "Add an info page"
This reverts commit 2f9d983441.
2014-02-14 22:55:59 +01:00
Clément de l'Hamaide
1aa9ff4e84 Bump FGRun, SG, FGFS revision 2014-02-14 14:05:40 +01:00
Clément de l'Hamaide
2f9d983441 Add an info page filled by flightgear/package/Win32-Inno/infobefore.txt before installation 2014-02-14 14:04:45 +01:00
Clement de l'Hamaide
4c8174014e FlightGear.iss: check if {userdocs}\FlightGear\* exists & install fgpanel for 64 bits OS 2014-02-05 23:07:04 +01:00
Clement de l'Hamaide
586daede43 Doesn't ask for TerraSync path during installation
We are setting a correct default TerraSync path (
C:\Users\username\Documents\FlightGear\TerraSync ) and FGRun has an input
if the user want to change it (Advanced > General > TerraSync directory)
2014-02-04 15:03:39 +01:00
Clement de l'Hamaide
0940dca867 Bump fgrun, simgear, flightgear, maclauncher revisions 2014-02-04 02:47:13 +01:00
Clement de l'Hamaide
783a8a8ee6 FlightGear.iss: update for FGRun + remove Win32/Win64 folder
Ok, some love for our Windows users:
- FlightGear uninstaller is now displayed with his icon in the Software
  manager
- The default installation path contains the version number now (
  C:\Program Files\FlightGear 3.0.0\ )
- Force 32 bits install on 64 bits system is unchecked by default now
- The Win32/Win64 folder is gone
- Automatic creation of C:\Users\username\Documents\FlightGear\Aircraft (A
  place where our users have write access, and easy to find/access for installing new aircraft)
- Automatic creation of C:\Users\username\Documents\FlightGear\Custom
  Scenery (A place where our users have write access, and easy to
  find/access for installin new scenery)
- Automatic creation of TerraSync folder (by default:
  C:\Users\username\Documents\FlightGear\TerraSync)
- Update terrasync.exe params for using the TerraSync folder
- Pre-configure FGRun with the new --terrasync-dir and --fg-aircraft
  options
- Update the pre-configuration of --fg-scenery for FGRun (adding Custom
  Scenery folder + usual $fg-root\data\Scenery)
- Add a new step in the installer (InfoBeforeFile) who display the message
  available in flightgear/package/Win32-Inno/infobefore.txt (mainly a
  warning about Antivirus)
2014-02-04 02:22:06 +01:00
Clement de l'Hamaide
4c227f76e4 Add 3rdParty.x64 in .gitignore 2014-02-04 02:19:46 +01:00
Clément de l'Hamaide
13cc7d5e50 bump maclauncher revision 2014-01-20 13:32:50 +01:00
Clément de l'Hamaide
67bfe88597 Bump submodule revisions 2014-01-18 10:50:07 +01:00
James Turner
f98529dbce Bump submodule revisions. 2014-01-04 16:19:21 +00:00
James Turner
2e4f0171eb Updated download_and_compile script.
From Pat Callahan.
2014-01-04 16:16:57 +00:00
Clément de l'Hamaide
75cc4a410c Bump FGRun/FG/SG commit 2013-12-24 12:58:54 +01:00
James Turner
fe39e97c2e Bump for FGRun windows fixes 2013-12-02 22:03:40 +00:00
James Turner
5f94a6d623 Superbuild tweaks
- fix download/configure of Boost on Windows
- attempt to use custom build steps to fix re-builds.
2013-12-02 22:02:24 +00:00
Clément de l'Hamaide
102f797cc3 Bump FG, SG, FGrun commit 2013-12-01 11:01:57 +01:00
Clément de l'Hamaide
247ca7b113 Sync 3rdParty folder with SVN repo 2013-11-30 16:25:12 +01:00
James Turner
0a81018df9 Sync download&compile
Copy from master -> next since next is the new default branch.
2013-11-24 21:57:21 +00:00
James Turner
784a595e82 Updated maclauncher SHA 2013-11-24 21:55:06 +00:00
James Turner
95d0692b0e Keep Windows script in sync with new data name. 2013-11-22 22:48:56 +01:00
James Turner
af9a7e9bd2 Tweak data file name (.tar.bz to .tar.bz2)
This simplifies life for the upload step which only needs to deal
with one file suffix, not two.
2013-11-22 22:48:41 +01:00
Clément de l'Hamaide
a16f37e678 Bump to the last SG, FG and FGRun commit 2013-11-20 18:48:36 +01:00
Clement de l'Hamaide
4a10d32c61 Superbuild: Fix 3rdParty for FGRun x64 2013-11-20 18:33:50 +01:00
Clement de l'Hamaide
a2a2d6f354 Superbuild: compatible for Linux and Windows 2013-11-18 22:24:31 +01:00
Clément de l'Hamaide
866a234822 Bump submodule commits 2013-11-17 19:52:32 +01:00
Clément de l'Hamaide
57dfbfe524 ignore build/ directory 2013-11-17 19:50:33 +01:00
Clement de l'Hamaide
fe838ad8e8 Superbuild: revert SVN use for Boost (SVN throws too many unnecessary lines) 2013-11-16 00:40:02 +01:00
Clement de l'Hamaide
ba53b4ce5f Superbuild: use SVN for 3rdParty and Boost + add exit code in installWinDeps.bat if xcopy fails 2013-11-16 00:07:57 +01:00
Clément de l'Hamaide
e5531723b8 Update submodules to last commit 2013-11-15 21:01:19 +01:00
Clément de l'Hamaide
9a1a5ce7a6 Superbuild: fix flightgear 64 compilation 2013-11-15 20:58:05 +01:00
Clément de l'Hamaide
758488cd6d Make sumodule trancking next branch but maclauncher tracks master 2013-11-15 16:37:54 +01:00
Clément de l'Hamaide
4ba10aafda Superbuild: typo 2013-11-14 21:28:10 +01:00
Clément de l'Hamaide
9e8fc07ea1 Superbuild: FGRun tweak 2013-11-14 21:15:31 +01:00
Clément de l'Hamaide
9763440ef4 Superbuild: add FGRun compilation for Windows 2013-11-14 20:57:54 +01:00
Clément de l'Hamaide
c78949fd4a Superbuild: fix SimGear path for FG build - bis 2013-11-14 20:39:34 +01:00
Clément de l'Hamaide
7d21138771 Superbuild: fix SimGear path for FG build 2013-11-14 17:58:10 +01:00
Clément de l'Hamaide
0b5855fdee Superbuild: fix 3rdParty 32/64 compatibility 2013-11-14 02:35:33 +01:00
Clément de l'Hamaide
d627ec7360 Superbuild: make CMAKE_INSTALL_PREFIX usable for Unix and Win 2013-11-13 23:21:18 +01:00
Clément de l'Hamaide
56e9eb4b6a Superbuild: oops forget a level in path 2013-11-13 21:10:20 +01:00
Clément de l'Hamaide
24e55d6b92 Superbuild: add 64bits support for 3rdParty 2013-11-13 17:45:48 +01:00
Clément de l'Hamaide
f625f7b5e5 Superbuild: Fix and cleanup
- Fix OSG_INSTALL_PREFIX path
- Fix missing OSG_INSTALL_PREFIX for flightgear
- Add 64 bits support
- Don't override OSG install dir
- Fix CMAKE_INSTALL_PREFIX path for SG and FG
- Indentation cleanup
2013-11-13 17:34:29 +01:00
Clément de l'Hamaide
2f97b62112 Upgrade win package release adding FGCom installation 2013-11-01 19:02:33 +01:00
James Turner
3378b289aa Bump to latest SG+FG 2013-10-30 14:52:36 +00:00
James Turner
8fe9281692 Update superbuild
- remove libSvn
- compile Boost ourselves on Windows
- tweak OSG detection
2013-10-21 22:19:45 +01:00
James Turner
5610f352af Use OSG 3.2 for superbuild.
Bump to current FG+SG head revisions on next
2013-09-15 22:04:58 +01:00
James Turner
19e9e62ba6 Add data package extraction to Windows script 2013-08-28 13:12:14 +01:00
Pat
75f1a35520 Version 1.9.12 see release notes on
http://wiki.flightgear.org/Scripted_Compilation_on_Linux_Debian/Ubuntu
2013-08-01 13:32:32 +01:00
Pat
1e183ed9de Cumulative Changes from versions 1.9.5 through 1.9.10
Changes 1.9.5 through 1.9.10
Multiple changes restructuring parts of the script
FGRUN added to ALL list
Regular expression used to determine if a component is to be built
OPENRTI added

Fixes and changes in 1.9.10
url for plib has / at the end to prevent problems with svn
url for osg has been updated to http://svn.openscenegraph.org/osg/OpenSceneGraph/tags/OpenSceneGraph-3.0.1/
x and v options added to aid in script debugging
w option added to aid in cmake debugging
2013-06-15 12:38:49 +01:00
James Turner
8f53e02e26 Bump to latest 'next' heads. 2013-03-28 11:11:24 +00:00
James Turner
19705077f5 Bump to latest fg+sg 2013-03-10 15:10:15 +00:00
James Turner
5e82468203 Use Boost from Jenkins, on Windows. 2013-03-06 12:38:22 +00:00
James Turner
40b0daec9f Bump SG+FG versions. 2013-03-03 16:09:41 +00:00
James Turner
9019d3c49c More Super-build tweaks.
Download and extract libsvn files on Mac, and enable RTI on non-Windows builds. Factor dependencies so they work for all platforms.
2013-03-01 17:55:55 +00:00
James Turner
530e41f1b0 Catalog XML creation basically works.
Still need to write <aircraft> entries.
2013-03-01 16:34:50 +00:00
James Turner
c20802b84f XML write-out improving.
Use existing catalog for static data, revision counting.
2013-03-01 16:34:49 +00:00
James Turner
b4b5f665c1 Metabuild starting to work on Windows 2013-03-01 16:26:38 +00:00
James Turner
e5f6218be9 SuperBuild tweaks 2013-02-24 21:14:08 +00:00
James Turner
3c32c48955 RTI support 2013-02-21 14:21:26 +00:00
James Turner
8fc045b409 Latest SG+FG 2013-02-21 11:08:06 +00:00
James Turner
ecd1537a61 SuperBuild file 2013-02-21 11:06:29 +00:00
James Turner
82fedc7362 Work-in-progress on Python script to create catalog.xml
Script to generate tarballs and serve directory from an Aircraft folder. Includes
thumbnail extraction, MD5 creation, tarball creation and -set.xml parsing, but
still some further work to be done.
2013-02-17 17:19:57 +00:00
James Turner
958a9ac2ba Merge branch 'refs/heads/release/2.10.0' into next 2013-02-17 12:02:25 +00:00
James Turner
9a02d6ecb7 Mac launcher tweaks for release. 2013-02-09 11:04:50 +00:00
James Turner
20fffd5b2e Extend Linux release script: create base package.
This uses the same tactic as Mac-release; a filtered rsync from the map server's git checkout.
2013-02-09 10:34:26 +00:00
James Turner
bd19b4a2bd Update for revised nav-cache rebuild. 2013-02-04 08:40:44 +00:00
James Turner
cf425684a6 DMG file naming tweaks. 2013-02-01 14:45:30 +00:00
James Turner
ace2336cde Fixed MSAA option in Mac launcher 2013-02-01 10:00:59 +00:00
James Turner
abe9cb809a Bump to include Mac keypad fix. 2013-01-31 18:49:09 +00:00
James Turner
e72e6c5621 Mac launcher tweaks. 2013-01-31 14:02:02 +00:00
James Turner
33693907c3 Include the Options html file in the Mac DMG. 2013-01-31 09:26:45 +00:00
James Turner
55933a7621 Include GetStart and Short-Ref PDFs in the DMG.
Rather than hiding these inside the bundle, lift them up to a visible place.
2013-01-30 15:46:15 +00:00
James Turner
91fdda387d Bump to include Ati viewport hack. 2013-01-28 23:42:06 +00:00
James Turner
c2edd66b51 Updated Maclauncher version. 2013-01-28 16:14:16 +00:00
James Turner
94ea65ec2e Build Mac release build with debugInfo.
(Experimental, let's see if this helps testing)
2013-01-28 16:14:16 +00:00
James Turner
df6ee9a211 One more bump of the fg release branch. 2013-01-25 13:18:11 +01:00
James Turner
60c95026ec Bump FlightGear version for release branch. 2013-01-24 11:38:12 +01:00
James Turner
24fd57edd3 Bump to flightgear branch head. 2013-01-19 16:29:52 +00:00
James Turner
ecbee417b8 Use 2.10.0 branch for maclauncher too. 2013-01-19 16:28:58 +00:00
James Turner
2c2c819a44 Initial release-branch heads. 2013-01-18 13:17:41 +00:00
James Turner
bac9b55f06 Disable explicit SDK setting for Mac launcher.
Setting an SDK is breaking, but since the build slave is running our lowest supported OS version anyway, we can live with the default setting.
2013-01-18 13:13:22 +00:00
James Turner
4e9ab5aa80 Maclauncher: No 32-bit anymore! 2013-01-18 13:13:16 +00:00
James Turner
6380e284c2 Bump FG & SG to latest, testing release build. 2013-01-04 10:43:24 +00:00
James Turner
e27bfc00cf Remove any references to ALUT from Mac build. 2013-01-04 10:40:43 +00:00
James Turner
f165971a23 Merge branch 'refs/heads/release/2.8.0' 2013-01-04 10:37:42 +00:00
Frederic Bouvier
2ffc2e2161 Bump fgmeta to latest sources 2012-12-20 08:46:41 +01:00
Frederic Bouvier
675d32f137 Update to latest sources 2012-12-04 09:18:56 +01:00
Frederic Bouvier
24b0e27fee Fix the windows 64 release build 2012-12-04 09:18:22 +01:00
Frederic Bouvier
76abd56d61 Build release with last Boost 2012-11-30 19:52:22 +01:00
Frederic Bouvier
b60191638b Bump fgmeta to latest next 2012-11-30 16:30:35 +01:00
ThorstenB
73fac5dd6a Francesco Brisa: d&c script update
* fix OpenRTI support for simgear.
* fix package management on debian 6.0
2012-11-27 22:09:03 +01:00
ThorstenB
6941d72b9f Francesco Brisa: d&c script, F-JJTH has done some big improvements
Added OpenRTI to compilation list
Added FGX to compilation list
Simgear now can be compiled with openrti option.
Minor minor fixes for plib
2012-11-22 20:38:51 +01:00
ThorstenB
1b1be1678e Francesco Angelo Brisa: plib update for d&c script. 2012-11-20 19:40:35 +01:00
ThorstenB
babafbb198 Francesco Angelo Brisa: FGRun update for d&c script.
Also pulls FGrun from git repository now, thanks to Pac.
2012-11-01 13:28:51 +01:00
James Turner
a717c77ee9 Mac launcher fixes. 2012-09-17 23:02:55 +01:00
ThorstenB
48ad2d326f Bump sg+fg. 2012-09-04 00:00:42 +02:00
Frederic Bouvier
7cbc6a0439 Update fgmeta master to latest sources 2012-09-03 10:51:33 +02:00
James Turner
81f5a48973 Changes to Info.plist creation, fix copyright.
Info.plist now generates correct copyright strings based on the current year.
2012-08-28 13:47:37 +01:00
James Turner
f1f4fcb0d8 Bump FG version. 2012-08-25 14:55:34 +01:00
James Turner
083269de80 Fix ALUT naming, ooops. 2012-08-25 14:55:20 +01:00
ThorstenB
9a80c0103e Francesco Angelo Brisa: Updated d_and_c script for FG2.8.0 2012-08-23 20:49:07 +02:00
James Turner
23b0f4eea4 Bump flightgear head to 2.8.1 to get ATC crash fix. 2012-08-23 08:15:24 +01:00
James Turner
e13daffc46 Fix SV renaming for Mac release. 2012-08-22 22:34:27 +01:00
James Turner
154afebc45 Tweaks for building on different Jenkins slave. 2012-08-22 18:35:52 +01:00
James Turner
302b1ff5b7 Bump for Mac launcher tweak. 2012-08-19 20:25:34 +01:00
Frederic Bouvier
9ca5e06578 Give FG version to fgrun to control what path should be set and overwrite a previous installation in the preference file 2012-08-17 22:27:48 +02:00
Frederic Bouvier
c7ef5567d3 Bump for fgrun 2012-08-17 21:12:25 +02:00
Frederic Bouvier
78dfd31128 Build embedded fgrun 2012-08-17 21:07:05 +02:00
Frederic Bouvier
9fc39e9575 Bump master for test purposes 2012-08-15 23:55:23 +02:00
James Turner
2cb313c6f1 Bump for new Mac launcher head. 2012-08-14 19:51:50 +01:00
James Turner
3ea2728b69 Mac: Keychain unlock needs to happen later.
Apparently the keychain re-locks fairly rapidly, so run the unlock script
right before running the packaging script. This is non-portable to another Mac slave, but will do for now.
2012-08-14 12:11:48 +01:00
James Turner
0d7f99e261 Tweak Mac code-signing for 2.8 release. 2012-08-14 10:46:00 +01:00
James Turner
2382a0600a Bump to latest Mac launcher. 2012-08-13 14:26:47 +01:00
James Turner
41356c1aba Code-sign using the identity from the environment. 2012-08-13 14:26:33 +01:00
Frederic Bouvier
0a40a36041 Bump for rembrandt fix 2012-08-12 19:10:53 +02:00
James Turner
b400a2adc1 Bump release heads, enable SVN packaging. 2012-08-12 17:03:10 +01:00
Frederic Bouvier
3b202ff607 Bump for missing rembrandt uniforms 2012-08-11 12:30:38 +02:00
James Turner
69c46231d7 FGCom data copying for release package 2012-08-08 16:27:04 +01:00
James Turner
d8897780d2 Mac packaging tweaks
Pieces for libsvn deployment, code-signing and FGCom
2012-08-08 14:43:45 +01:00
Frederic Bouvier
dd0bbe0a05 Add fgrun git repository as git module for future release (not 2.8). Hand edited .gitmodules as msysgit doesn't modify that file 2012-08-05 23:24:00 +02:00
Frederic Bouvier
86d0cef390 Add fgrun git repository as git module for future release (not 2.8) 2012-08-05 22:47:38 +02:00
James Turner
f15b661076 Bump release head for PUI menubar crash fix. 2012-08-05 21:38:08 +01:00
Frederic Bouvier
e25d5289e2 Bump for another Rembrandt fix 2012-08-02 23:24:06 +02:00
Frederic Bouvier
e528468bd4 Bump for Rembrandt fix 2012-08-02 23:04:23 +02:00
James Turner
022f1791d9 Update Mac release build to sync from Telascience 2012-08-02 10:34:00 +01:00
James Turner
05f4f85b27 Bump for updated Mac launcher 2012-07-31 19:04:45 +01:00
James Turner
e7011cab66 Updates for Mac packaging.
Note this is currently hard-coding a source path for rsync which only works on my machine - which is the Mac jenkins slave. This will be updated shortly.
2012-07-31 19:02:26 +01:00
James Turner
8b782ce69b Add the Mac launcher as an external.
Folks on other platforms, it's tiny - and this is the simplest way to manage things for the release builds. If you strongly object please let me know and we can figure out an alternate approach.
2012-07-31 11:02:38 +01:00
James Turner
7190575775 Bump Simgear head for Clang templates fix. 2012-07-31 09:02:46 +01:00
James Turner
06800a6c56 Bump FG release for Mac fixes. 2012-07-30 18:09:12 +01:00
James Turner
3e0eefa8f5 Bump release head for metar.exe fix on Windows. 2012-07-27 17:52:34 +01:00
Frederic Bouvier
5a31e3133f Give FG version to fgrun to control what path should be set and overwrite a previous installation in the preference file 2012-07-20 00:40:03 +02:00
ThorstenB
3d99ef3ea2 knock knock: 2.8.0 fg head 2012-07-20 00:25:52 +02:00
ThorstenB
a3c2a9424a Switch fgmeta's existing 2.8.0 branch to now track new sg/fg 2.8.0 branches 2012-07-17 19:01:58 +02:00
Frederic Bouvier
eebf4dbcaf Bump 2012-07-14 14:24:25 +02:00
Frederic Bouvier
868f7df661 Bump 2012-07-13 18:59:26 +02:00
Frederic Bouvier
26e6b859a5 Bump to latest next 2012-07-13 16:11:47 +02:00
ThorstenB
72d2bb9044 Bump 2.8.0 release head. 2012-07-04 22:26:39 +02:00
ThorstenB
7ef17cc4b2 Bump to 2.8.0 head 2012-06-26 23:25:33 +02:00
James Turner
9c0ccec847 Bump 2.8 fg+sg commits (still on next)
Checking that Mac release build increments ok.
2012-06-26 15:21:51 +01:00
James Turner
35bc589a04 Git-ignore updates for Mac build 2012-06-26 10:23:40 +01:00
James Turner
57cafd62e1 Fix DMG output path, oops. 2012-06-26 10:22:46 +01:00
James Turner
561b221448 Mac release builds should use static SimGear 2012-06-26 10:22:32 +01:00
James Turner
4c54c5feb6 Skip missing OSG plugins silently in Mac packaging 2012-06-26 09:17:42 +01:00
James Turner
1ff0264a57 Updated Mac release build script.
Capture most of the build logic in a script (ie. visible to Git, and outside Jenkins). use XCodebuild to run the actual compiles, so we get Clang. Use the Xcode 4.3 SDK paths.
2012-06-25 14:14:58 +01:00
ThorstenB
4eb511c33d Prepare 2.8.0 branch.
fg/sg submodules still tracking "next" (until sg/fg are branched, too).
2012-06-23 14:28:42 +02:00
ThorstenB
ffa12d720b Francesco Brisa & F-JJTH: d&c script bugfixes 2012-04-20 19:28:06 +02:00
ThorstenB
45a38fe121 Francesco Angelo Brisa: d_and_compile now using out-of-directory builds
Building binaries in a separate directory keeps the original source
directory clean.
2012-04-18 10:38:22 +02:00
ThorstenB
eaed135885 Francesco Angelo Brisa: download_and_compile now using cmake for fgrun 2012-04-12 19:58:37 +02:00
ThorstenB
444ebf92e7 Merge branch 'release/2.6.0' 2012-03-01 22:51:57 +01:00
Frederic Bouvier
7f31b781cd Fix Win64 packaging (include win32 dlls for tools that are not available in 64bit) 2012-02-27 23:25:54 +01:00
Frederic Bouvier
a0b8fdd867 Add fgpanel to the release on Windows 2012-02-27 23:25:30 +01:00
Frederic Bouvier
a226592697 Call vcredist*.exe and oalinst.exe when available 2012-02-27 23:25:07 +01:00
Frederic Bouvier
0dc89062f2 Fix Win64 packaging (include win32 dlls for tools that are not available in 64bit) 2012-02-27 23:19:49 +01:00
ThorstenB
beb8dfebc8 Francesco Angelo Brisa: d&c script update for FG2.6.0
updated all the 2.4.0-final tags to 2.6.0-final.
compilation runs fine (2.7 version).
compilation using -s switch (2.6 version) runs fine.
2012-02-21 09:24:37 +01:00
ThorstenB
cd10243834 Francesco Angelo Brisa: add required package for Atlas compilation 2012-02-06 21:22:38 +01:00
Frederic Bouvier
39924c29ee Working dual (32/64bit) setup on windows 2012-01-27 09:10:26 +01:00
Frederic Bouvier
675002e298 Improve dual (32/64bit) setup on windows (not complete) 2012-01-27 09:10:26 +01:00
Frederic Bouvier
a71117b58f Try to fix fgsetup build by Inno Setup 2012-01-27 09:10:26 +01:00
Frederic Bouvier
3a9abdb092 Second try at building a 64-bit version of the release : flightgear 2012-01-27 09:10:26 +01:00
Frederic Bouvier
bea03a5011 First try at building a 64-bit version of the release : simgear 2012-01-27 09:10:26 +01:00
Frederic Bouvier
1e00b6a679 Move setting environment variable out of the build script 2012-01-27 09:10:26 +01:00
Frederic Bouvier
4d3fffd8e4 Adapt Inno-setup packaging to new build system 2012-01-27 09:10:25 +01:00
Frederic Bouvier
ad3595fdc6 First try at building Windows release with VS2010 and Cmake 2012-01-27 09:09:18 +01:00
ThorstenB
c90b114ac9 Update downl_and_comp script to version of Francesco Brisa 2012-01-22 19:19:02 +01:00
Torsten Dreyer
ecc8111986 Fix typo in hudson win32/64 build scripts
Also remove obsolete build of SimGear which is included
in the build of the solution.
2011-07-29 14:12:32 +02:00
James Turner
5c289cb98c Set next versions of FG/SG, for testing 2011-05-21 15:11:57 +01:00
James Turner
8302a21ef7 Pickup SimGear version from its workspace (only works with 2.3.0 or higher) 2011-05-21 15:11:22 +01:00
81 changed files with 10254 additions and 1459 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

14
.gitignore vendored
View File

@@ -2,9 +2,23 @@ dist
.DS_Store
install
3rdParty
3rdParty.x64
boost_1_44_0
InstallConfig.iss
Output
output
fgBuild
sgBuild
image
build
macflightgear
src
tmp
Makefile
CMakeFiles
archivebuild
osgbuild
CMakeCache.txt
*.pyc
build-*
testOutput*

22
.gitmodules vendored
View File

@@ -1,6 +1,24 @@
[submodule "simgear"]
path = simgear
url = git://gitorious.org/fg/simgear.git
url = ../simgear
branch = next
[submodule "flightgear"]
path = flightgear
url = git://gitorious.org/fg/flightgear.git
url = ../flightgear
branch = next
[submodule "fgrun"]
path = fgrun
url = ../fgrun
branch = next
[submodule "fgdata"]
path = fgdata
url = ../fgdata
branch = next
[submodule "windows-3rd-party"]
path = windows-3rd-party
url = ../windows-3rd-party
branch = master
[submodule "getstart"]
path = getstart
url = ../getstart
branch = next

168
CMakeLists.txt Normal file
View File

@@ -0,0 +1,168 @@
cmake_minimum_required (VERSION 2.8.0)
include (ExternalProject)
project(FlightGear-Meta)
if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
set(CMAKE_INSTALL_PREFIX ${CMAKE_BINARY_DIR}/install)
message(STATUS "Default install dir set to ${CMAKE_INSTALL_PREFIX}")
endif()
set(SG_DEPS OSG)
set(FG_DEPS SimGear)
set(SG_CMAKE_ARGS "")
set(FG_CMAKE_ARGS "")
set(OSG_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX})
set(SG_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX})
set(FG_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX})
set(PLIB_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX})
set(RTI_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX})
# OpenSceneGraph configuration
#set(OSG_SOURCE http://www.openscenegraph.org/downloads/developer_releases/OpenSceneGraph-3.2.0.zip)
set(OSG_SOURCE https://github.com/openscenegraph/osg.git)
set(OSG_TAG OpenSceneGraph-3.2)
if (APPLE)
# force disable Qt and Jasper
set(OSG_CMAKE_ARGS
-DOSG_USE_QT=0
-DJASPER_LIBRARY=
)
# OSG with some patches applied for Mac
set(OSG_SOURCE https://github.com/zakalawe/osg.git)
set(OSG_TAG fgfs-osg-32)
elseif(MSVC)
set(OSG_MSVC "msvc")
if (${MSVC_VERSION} EQUAL 1700)
set(OSG_MSVC ${OSG_MSVC}110)
elseif (${MSVC_VERSION} EQUAL 1600)
set(OSG_MSVC ${OSG_MSVC}100)
else (${MSVC_VERSION} EQUAL 1700)
set(OSG_MSVC ${OSG_MSVC}90)
endif (${MSVC_VERSION} EQUAL 1700)
if (CMAKE_CL_64)
set(OSG_MSVC ${OSG_MSVC}-64)
set(RDPARTY_DIR 3rdParty.x64)
list(APPEND FG_CMAKE_ARGS -DWITH_FGPANEL=OFF)
else ()
set(RDPARTY_DIR 3rdParty)
endif (CMAKE_CL_64)
SET(OSG_CMAKE_ARGS
-DOSG_USE_QT:BOOL=OFF
-DBUILD_OSG_APPLICATIONS:BOOL=ON
-DOSG_PLUGIN_SEARCH_INSTALL_DIR_FOR_PLUGINS:BOOL=OFF
-DACTUAL_3RDPARTY_DIR:PATH=${CMAKE_BINARY_DIR}/${RDPARTY_DIR}
-DCMAKE_LIBRARY_PATH:STRING=${CMAKE_BINARY_DIR}/${RDPARTY_DIR}/lib
-DCMAKE_INCLUDE_PATH:STRING=${CMAKE_BINARY_DIR}/${RDPARTY_DIR}/include;${CMAKE_BINARY_DIR}/${RDPARTY_DIR}/include/freetype
-DCURL_INCLUDE_DIR:PATH=${CMAKE_BINARY_DIR}/${RDPARTY_DIR}/include
-DTIFF_INCLUDE_DIR:PATH=${CMAKE_BINARY_DIR}/${RDPARTY_DIR}/include
-DGDAL_INCLUDE_DIR:PATH=${CMAKE_BINARY_DIR}/${RDPARTY_DIR}/include
-DGDAL_LIBRARY:FILEPATH=${CMAKE_BINARY_DIR}/${RDPARTY_DIR}/lib/gdal_i.lib
-DTIFF_LIBRARY:FILEPATH=${CMAKE_BINARY_DIR}/${RDPARTY_DIR}/lib/libtiff.lib
-DCURL_LIBRARY:FILEPATH=${CMAKE_BINARY_DIR}/${RDPARTY_DIR}/lib/libcurl_imp.lib
-DFREETYPE_LIBRARY:FILEPATH=${CMAKE_BINARY_DIR}/${RDPARTY_DIR}/lib/freetype.lib
-DFREETYPE_INCLUDE_DIR:PATH=${CMAKE_BINARY_DIR}/${RDPARTY_DIR}/include;${CMAKE_BINARY_DIR}/${RDPARTY_DIR}/include/freetype
)
# for compatability with MSVC directory layout
set(OSG_INSTALL_PREFIX ${OSG_INSTALL_PREFIX}/${OSG_MSVC}/OpenSceneGraph)
set(FGRUN_INSTALL_PREFIX ${FGRUN_INSTALL_PREFIX}/${OSG_MSVC}/FGRun)
set(FG_INSTALL_PREFIX ${FG_INSTALL_PREFIX}/${OSG_MSVC}/FlightGear)
set(SG_INSTALL_PREFIX ${SG_INSTALL_PREFIX}/${OSG_MSVC}/SimGear)
list(APPEND OSG_DEPS WinDeps)
else()
# normal OSG
endif()
ExternalProject_Add(OSG
DEPENDS ${OSG_DEPS}
PREFIX ${CMAKE_BINARY_DIR}
GIT_REPOSITORY ${OSG_SOURCE}
GIT_TAG ${OSG_TAG}
BINARY_DIR osgbuild
CMAKE_ARGS ${OSG_CMAKE_ARGS} -DCMAKE_INSTALL_PREFIX=${OSG_INSTALL_PREFIX}
)
# Because OSG install the libraries in lib64/ instead of lib/
if (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
ExternalProject_Add_Step(OSG after_install
COMMAND ${CMAKE_COMMAND} -E create_symlink ${OSG_INSTALL_PREFIX}/lib64 ${OSG_INSTALL_PREFIX}/lib
DEPENDEES install
)
endif()
# FIXME install of OpenRTI is failing on Windows, files in PREFIX/share which
# are ending up in C:/Program Files/OpenRTI
if (FALSE)
ExternalProject_Add(OpenRTI
PREFIX ${CMAKE_BINARY_DIR}
DOWNLOAD_COMMAND GIT_REPOSITORY git://git.code.sf.net/p/openrti/OpenRTI
BINARY_DIR rtibuild
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${RTI_INSTALL_PREFIX}
)
list(APPEND SG_DEPS OpenRTI)
list(APPEND SG_CMAKE_ARGS -DENABLE_RTI=1)
list(APPEND FG_CMAKE_ARGS -DENABLE_RTI=1)
endif()
ExternalProject_Add(SimGear
PREFIX ${CMAKE_BINARY_DIR}
DEPENDS ${SG_DEPS}
DOWNLOAD_COMMAND "" # no need to download
UPDATE_COMMAND "" # or update.
SOURCE_DIR ${CMAKE_CURRENT_LIST_DIR}/simgear
BINARY_DIR sgbuild
CMAKE_ARGS ${SG_CMAKE_ARGS} -DCMAKE_INSTALL_PREFIX=${SG_INSTALL_PREFIX} -DCMAKE_PREFIX_PATH=${OSG_INSTALL_PREFIX}
)
# because we download SimGear externally (via Git submodules),
# the change-detection doesn't work. Ensure we always change
# for changes
ExternalProject_Add_Step(SimGear forcebuild
ALWAYS 1
COMMAND ${CMAKE_COMMAND} -E echo foo
DEPENDERS build
)
# on Windows, PLIB is in the 3rd-party dependencies zip
if (NOT WIN32)
set(PLIB_ARGS --disable-pw --disable-sl --disable-psl --disable-ssg --disable-ssgaux)
ExternalProject_Add(PLIB
PREFIX ${CMAKE_BINARY_DIR}
URL http://plib.sourceforge.net/dist/plib-1.8.5.tar.gz
URL_HASH MD5=47a6fbf63668c1eed631024038b2ea90
CONFIGURE_COMMAND <SOURCE_DIR>/configure --prefix=${PLIB_INSTALL_PREFIX} ${PLIB_ARGS}
BUILD_IN_SOURCE 1
)
list(APPEND FG_DEPS PLIB)
endif()
ExternalProject_Add(FlightGear
PREFIX ${CMAKE_BINARY_DIR}
DEPENDS ${FG_DEPS}
DOWNLOAD_COMMAND "" # no need to download
UPDATE_COMMAND "" # or update.
SOURCE_DIR ${CMAKE_CURRENT_LIST_DIR}/flightgear
BINARY_DIR fgbuild
CMAKE_ARGS ${FG_CMAKE_ARGS} -DCMAKE_INSTALL_PREFIX=${FG_INSTALL_PREFIX} -DCMAKE_PREFIX_PATH=${OSG_INSTALL_PREFIX} -DADDITIONAL_LIBRARY_PATHS=${SG_INSTALL_PREFIX}
)
# because we download FlightGear externally (via Git submodules),
# the change-detection doesn't work. Ensure we always change
# for changes
ExternalProject_Add_Step(FlightGear forcebuild
ALWAYS 1
COMMAND ${CMAKE_COMMAND} -E echo foo
DEPENDERS build
)

View File

@@ -1,293 +1,424 @@
; 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
; "Inno Setup" package builder. Inno Setup is free (but probably not open
; source?.) The official web site for this package building software is:
;
; http://www.jrsoftware.org/isinfo.php
;
; Note: the files must appear in the X: drive.
; You can do this with the command below:
;
; subst X: path_to_files
;
; For example:
;
; C:\> subst X: F:\Path\to\FlightGear\root
; C:\> subst X: F:\
;
#include "InstallConfig.iss"
#if GetEnv("VSINSTALLDIR") == ""
#define VSInstallDir "C:\Program Files (x86)\Microsoft Visual Studio 10.0"
#else
#define VSInstallDir GetEnv("VSINSTALLDIR")
#endif
#define VCInstallDir VSInstallDir + "\VC"
#define OSGInstallDir "X:\install\msvc100\OpenSceneGraph"
#define OSGPluginsDir OSGInstallDir + "\bin\osgPlugins-" + OSGVersion
#define OSG64InstallDir "X:\install\msvc100-64\OpenSceneGraph"
#define OSG64PluginsDir OSG64InstallDir + "\bin\osgPlugins-" + OSGVersion
[Setup]
AppId=FlightGear
AppName=FlightGear
AppPublisher=The FlightGear Team
OutputBaseFilename=fgsetup-{#FGVersion}
AppVerName=FlightGear v{#FGVersion}
AppPublisherURL=http://www.flightgear.org
AppSupportURL=http://www.flightgear.org
AppUpdatesURL=http://www.flightgear.org
DefaultDirName={pf}\FlightGear
DefaultGroupName=FlightGear {#FGVersion}
LicenseFile=X:\flightgear\COPYING
Uninstallable=yes
SetupIconFile=X:\flightgear\projects\VC90\flightgear.ico
VersionInfoVersion={#FGVersion}.0
WizardImageFile=X:\flightgear\package\Win32-Inno\setupimg.bmp
WizardImageStretch=No
WizardSmallImageFile=X:\flightgear\package\Win32-Inno\setupsmall.bmp
VersionInfoCompany=The FlightGear Team
UninstallDisplayIcon=X:\flightgear\projects\VC90\flightgear.ico
ArchitecturesInstallIn64BitMode=x64
ArchitecturesAllowed=x86 x64
[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: "insoal"; Description: "Install OpenAL (the sound engine)"
Name: "force32"; Description: "Force 32bit install on 64bit system"; Check: Is64BitInstallMode
[Files]
; NOTE: run subst X: F:\ (or whatever path the expanded tree resides at)
;Source: "X:\*.txt"; DestDir: "{app}"; Flags: ignoreversion
Source: "X:\install\msvc100\FlightGear\bin\fgfs.exe"; DestDir: "{app}\bin\Win32"; Flags: ignoreversion; Check: not Is64BitInstallMode or IsTaskSelected('force32')
Source: "X:\install\msvc100-64\FlightGear\bin\fgfs.exe"; DestDir: "{app}\bin\Win64"; Flags: ignoreversion skipifsourcedoesntexist; Check: Is64BitInstallMode and not IsTaskSelected('force32')
;Unconditional install
Source: "X:\install\msvc100\FlightGear\bin\fgadmin.exe"; DestDir: "{app}\bin\Win32"; Flags: ignoreversion
Source: "X:\install\msvc100\FlightGear\bin\terrasync.exe"; DestDir: "{app}\bin\Win32"; Flags: ignoreversion
Source: "X:\install\msvc100\FlightGear\bin\js_demo.exe"; DestDir: "{app}\bin\Win32"; Flags: ignoreversion
Source: "X:\install\msvc100\FlightGear\bin\fgjs.exe"; DestDir: "{app}\bin\Win32"; Flags: ignoreversion
Source: "X:\install\msvc100\FlightGear\bin\fgpanel.exe"; DestDir: "{app}\bin\Win32"; Flags: ignoreversion
Source: "X:\install\msvc100\FlightGear\bin\GPSsmooth.exe"; DestDir: "{app}\bin\Win32"; Flags: ignoreversion
Source: "X:\install\msvc100\FlightGear\bin\UGsmooth.exe"; DestDir: "{app}\bin\Win32"; Flags: ignoreversion
Source: "X:\install\msvc100\FlightGear\bin\MIDGsmooth.exe"; DestDir: "{app}\bin\Win32"; Flags: ignoreversion
Source: "X:\install\msvc100\FlightGear\bin\metar.exe"; DestDir: "{app}\bin\Win32"; Flags: ignoreversion
Source: "X:\install\msvc100\FlightGear\bin\yasim.exe"; DestDir: "{app}\bin\Win32"; Flags: ignoreversion
Source: "X:\install\msvc100\FGRun\bin\fgrun.exe"; DestDir: "{app}\bin\Win32"; Flags: ignoreversion ; Check: not Is64BitInstallMode or IsTaskSelected('force32')
Source: "X:\install\msvc100\FGRun\share\locale\*"; DestDir: "{app}\bin\Win32\locale"; Flags: ignoreversion recursesubdirs; Check: not Is64BitInstallMode or IsTaskSelected('force32')
Source: "X:\install\msvc100-64\FGRun\bin\fgrun.exe"; DestDir: "{app}\bin\Win64"; Flags: ignoreversion skipifsourcedoesntexist; Check: Is64BitInstallMode and not IsTaskSelected('force32')
Source: "X:\install\msvc100-64\FGRun\share\locale\*"; DestDir: "{app}\bin\Win64\locale"; Flags: ignoreversion recursesubdirs skipifsourcedoesntexist; Check: Is64BitInstallMode and not IsTaskSelected('force32')
Source: "X:\3rdParty\bin\*.dll"; DestDir: "{app}\bin\Win32"; Check: not Is64BitInstallMode or IsTaskSelected('force32')
Source: "X:\3rdParty.x64\bin\*.dll"; DestDir: "{app}\bin\Win64"; Flags: skipifsourcedoesntexist; Check: Is64BitInstallMode and not IsTaskSelected('force32')
Source: "{#VCInstallDir}\redist\x86\Microsoft.VC100.CRT\*.dll"; DestDir: "{app}\bin\Win32"
Source: "{#VCInstallDir}\redist\x64\Microsoft.VC100.CRT\*.dll"; DestDir: "{app}\bin\Win64"; Flags: skipifsourcedoesntexist; Check: Is64BitInstallMode and not IsTaskSelected('force32')
Source: "X:\3rdParty\bin\vcredist_x86.exe"; DestDir: "{app}\bin\Win32"; Flags: skipifsourcedoesntexist
Source: "X:\3rdParty.x64\bin\vcredist_x64.exe"; DestDir: "{app}\bin\Win64"; Flags: skipifsourcedoesntexist; Check: Is64BitInstallMode and not IsTaskSelected('force32')
Source: "X:\3rdParty\bin\oalinst.exe"; DestDir: "{app}\bin\Win32"; Flags: ignoreversion skipifsourcedoesntexist
Source: "X:\data\*.*"; DestDir: "{app}\data"; Flags: ignoreversion recursesubdirs skipifsourcedoesntexist
Source: "{#OSGInstallDir}\bin\osg{#OSGSoNumber}-osg.dll"; DestDir: "{app}\bin\Win32"; Check: not Is64BitInstallMode or IsTaskSelected('force32')
Source: "{#OSGInstallDir}\bin\osg{#OSGSoNumber}-osgDB.dll"; DestDir: "{app}\bin\Win32"; Check: not Is64BitInstallMode or IsTaskSelected('force32')
Source: "{#OSGInstallDir}\bin\osg{#OSGSoNumber}-osgGA.dll"; DestDir: "{app}\bin\Win32"; Check: not Is64BitInstallMode or IsTaskSelected('force32')
Source: "{#OSGInstallDir}\bin\osg{#OSGSoNumber}-osgParticle.dll"; DestDir: "{app}\bin\Win32"; Check: not Is64BitInstallMode or IsTaskSelected('force32')
Source: "{#OSGInstallDir}\bin\osg{#OSGSoNumber}-osgText.dll"; DestDir: "{app}\bin\Win32"; Check: not Is64BitInstallMode or IsTaskSelected('force32')
Source: "{#OSGInstallDir}\bin\osg{#OSGSoNumber}-osgUtil.dll"; DestDir: "{app}\bin\Win32"; Check: not Is64BitInstallMode or IsTaskSelected('force32')
Source: "{#OSGInstallDir}\bin\osg{#OSGSoNumber}-osgViewer.dll"; DestDir: "{app}\bin\Win32"; Check: not Is64BitInstallMode or IsTaskSelected('force32')
Source: "{#OSGInstallDir}\bin\osg{#OSGSoNumber}-osgSim.dll"; DestDir: "{app}\bin\Win32"; Check: not Is64BitInstallMode or IsTaskSelected('force32')
Source: "{#OSGInstallDir}\bin\osg{#OSGSoNumber}-osgFX.dll"; DestDir: "{app}\bin\Win32"; Check: not Is64BitInstallMode or IsTaskSelected('force32')
Source: "{#OSGInstallDir}\bin\ot12-OpenThreads.dll"; DestDir: "{app}\bin\Win32"; Check: not Is64BitInstallMode or IsTaskSelected('force32')
Source: "{#OSGPluginsDir}\osgdb_ac.dll"; DestDir: "{app}\bin\Win32\osgPlugins-{#OSGVersion}"; Check: not Is64BitInstallMode or IsTaskSelected('force32')
Source: "{#OSGPluginsDir}\osgdb_osg.dll"; DestDir: "{app}\bin\Win32\osgPlugins-{#OSGVersion}"; Check: not Is64BitInstallMode or IsTaskSelected('force32')
Source: "{#OSGPluginsDir}\osgdb_osga.dll"; DestDir: "{app}\bin\Win32\osgPlugins-{#OSGVersion}"; Check: not Is64BitInstallMode or IsTaskSelected('force32')
Source: "{#OSGPluginsDir}\osgdb_3ds.dll"; DestDir: "{app}\bin\Win32\osgPlugins-{#OSGVersion}"; Check: not Is64BitInstallMode or IsTaskSelected('force32')
Source: "{#OSGPluginsDir}\osgdb_mdl.dll"; DestDir: "{app}\bin\Win32\osgPlugins-{#OSGVersion}"; Check: not Is64BitInstallMode or IsTaskSelected('force32')
Source: "{#OSGPluginsDir}\osgdb_jpeg.dll"; DestDir: "{app}\bin\Win32\osgPlugins-{#OSGVersion}"; Check: not Is64BitInstallMode or IsTaskSelected('force32')
Source: "{#OSGPluginsDir}\osgdb_rgb.dll"; DestDir: "{app}\bin\Win32\osgPlugins-{#OSGVersion}"; Check: not Is64BitInstallMode or IsTaskSelected('force32')
Source: "{#OSGPluginsDir}\osgdb_png.dll"; DestDir: "{app}\bin\Win32\osgPlugins-{#OSGVersion}"; Check: not Is64BitInstallMode or IsTaskSelected('force32')
Source: "{#OSGPluginsDir}\osgdb_dds.dll"; DestDir: "{app}\bin\Win32\osgPlugins-{#OSGVersion}"; Check: not Is64BitInstallMode or IsTaskSelected('force32')
Source: "{#OSGPluginsDir}\osgdb_txf.dll"; DestDir: "{app}\bin\Win32\osgPlugins-{#OSGVersion}"; Check: not Is64BitInstallMode or IsTaskSelected('force32')
Source: "{#OSGPluginsDir}\osgdb_freetype.dll"; DestDir: "{app}\bin\Win32\osgPlugins-{#OSGVersion}"; Check: not Is64BitInstallMode or IsTaskSelected('force32')
Source: "{#OSGPluginsDir}\osgdb_serializers_osg.dll"; DestDir: "{app}\bin\Win32\osgPlugins-{#OSGVersion}"; Check: not Is64BitInstallMode or IsTaskSelected('force32')
Source: "{#OSGPluginsDir}\osgdb_serializers_osganimation.dll"; DestDir: "{app}\bin\Win32\osgPlugins-{#OSGVersion}"; Check: not Is64BitInstallMode or IsTaskSelected('force32')
Source: "{#OSGPluginsDir}\osgdb_serializers_osgfx.dll"; DestDir: "{app}\bin\Win32\osgPlugins-{#OSGVersion}"; Check: not Is64BitInstallMode or IsTaskSelected('force32')
Source: "{#OSGPluginsDir}\osgdb_serializers_osgmanipulator.dll"; DestDir: "{app}\bin\Win32\osgPlugins-{#OSGVersion}"; Check: not Is64BitInstallMode or IsTaskSelected('force32')
Source: "{#OSGPluginsDir}\osgdb_serializers_osgparticle.dll"; DestDir: "{app}\bin\Win32\osgPlugins-{#OSGVersion}"; Check: not Is64BitInstallMode or IsTaskSelected('force32')
Source: "{#OSGPluginsDir}\osgdb_serializers_osgshadow.dll"; DestDir: "{app}\bin\Win32\osgPlugins-{#OSGVersion}"; Check: not Is64BitInstallMode or IsTaskSelected('force32')
Source: "{#OSGPluginsDir}\osgdb_serializers_osgsim.dll"; DestDir: "{app}\bin\Win32\osgPlugins-{#OSGVersion}"; Check: not Is64BitInstallMode or IsTaskSelected('force32')
Source: "{#OSGPluginsDir}\osgdb_serializers_osgterrain.dll"; DestDir: "{app}\bin\Win32\osgPlugins-{#OSGVersion}"; Check: not Is64BitInstallMode or IsTaskSelected('force32')
Source: "{#OSGPluginsDir}\osgdb_serializers_osgtext.dll"; DestDir: "{app}\bin\Win32\osgPlugins-{#OSGVersion}"; Check: not Is64BitInstallMode or IsTaskSelected('force32')
Source: "{#OSGPluginsDir}\osgdb_serializers_osgvolume.dll"; DestDir: "{app}\bin\Win32\osgPlugins-{#OSGVersion}"; Check: not Is64BitInstallMode or IsTaskSelected('force32')
Source: "{#OSGPluginsDir}\osgdb_deprecated_osg.dll"; DestDir: "{app}\bin\Win32\osgPlugins-{#OSGVersion}"; Check: not Is64BitInstallMode or IsTaskSelected('force32')
Source: "{#OSGPluginsDir}\osgdb_deprecated_osgparticle.dll"; DestDir: "{app}\bin\Win32\osgPlugins-{#OSGVersion}"; Check: not Is64BitInstallMode or IsTaskSelected('force32')
Source: "{#OSG64InstallDir}\bin\osg{#OSGSoNumber}-osg.dll"; DestDir: "{app}\bin\Win64"; Flags: skipifsourcedoesntexist; Check: Is64BitInstallMode and not IsTaskSelected('force32')
Source: "{#OSG64InstallDir}\bin\osg{#OSGSoNumber}-osgDB.dll"; DestDir: "{app}\bin\Win64"; Flags: skipifsourcedoesntexist; Check: Is64BitInstallMode and not IsTaskSelected('force32')
Source: "{#OSG64InstallDir}\bin\osg{#OSGSoNumber}-osgGA.dll"; DestDir: "{app}\bin\Win64"; Flags: skipifsourcedoesntexist; Check: Is64BitInstallMode and not IsTaskSelected('force32')
Source: "{#OSG64InstallDir}\bin\osg{#OSGSoNumber}-osgParticle.dll"; DestDir: "{app}\bin\Win64"; Flags: skipifsourcedoesntexist; Check: Is64BitInstallMode and not IsTaskSelected('force32')
Source: "{#OSG64InstallDir}\bin\osg{#OSGSoNumber}-osgText.dll"; DestDir: "{app}\bin\Win64"; Flags: skipifsourcedoesntexist; Check: Is64BitInstallMode and not IsTaskSelected('force32')
Source: "{#OSG64InstallDir}\bin\osg{#OSGSoNumber}-osgUtil.dll"; DestDir: "{app}\bin\Win64"; Flags: skipifsourcedoesntexist; Check: Is64BitInstallMode and not IsTaskSelected('force32')
Source: "{#OSG64InstallDir}\bin\osg{#OSGSoNumber}-osgViewer.dll"; DestDir: "{app}\bin\Win64"; Flags: skipifsourcedoesntexist; Check: Is64BitInstallMode and not IsTaskSelected('force32')
Source: "{#OSG64InstallDir}\bin\osg{#OSGSoNumber}-osgSim.dll"; DestDir: "{app}\bin\Win64"; Flags: skipifsourcedoesntexist; Check: Is64BitInstallMode and not IsTaskSelected('force32')
Source: "{#OSG64InstallDir}\bin\osg{#OSGSoNumber}-osgFX.dll"; DestDir: "{app}\bin\Win64"; Flags: skipifsourcedoesntexist; Check: Is64BitInstallMode and not IsTaskSelected('force32')
Source: "{#OSG64InstallDir}\bin\ot12-OpenThreads.dll"; DestDir: "{app}\bin\Win64"; Flags: skipifsourcedoesntexist; Check: Is64BitInstallMode and not IsTaskSelected('force32')
Source: "{#OSG64PluginsDir}\osgdb_ac.dll"; DestDir: "{app}\bin\Win64\osgPlugins-{#OSGVersion}"; Flags: skipifsourcedoesntexist; Check: Is64BitInstallMode and not IsTaskSelected('force32')
Source: "{#OSG64PluginsDir}\osgdb_osg.dll"; DestDir: "{app}\bin\Win64\osgPlugins-{#OSGVersion}"; Flags: skipifsourcedoesntexist; Check: Is64BitInstallMode and not IsTaskSelected('force32')
Source: "{#OSG64PluginsDir}\osgdb_osga.dll"; DestDir: "{app}\bin\Win64\osgPlugins-{#OSGVersion}"; Flags: skipifsourcedoesntexist; Check: Is64BitInstallMode and not IsTaskSelected('force32')
Source: "{#OSG64PluginsDir}\osgdb_3ds.dll"; DestDir: "{app}\bin\Win64\osgPlugins-{#OSGVersion}"; Flags: skipifsourcedoesntexist; Check: Is64BitInstallMode and not IsTaskSelected('force32')
Source: "{#OSG64PluginsDir}\osgdb_mdl.dll"; DestDir: "{app}\bin\Win64\osgPlugins-{#OSGVersion}"; Flags: skipifsourcedoesntexist; Check: Is64BitInstallMode and not IsTaskSelected('force32')
Source: "{#OSG64PluginsDir}\osgdb_jpeg.dll"; DestDir: "{app}\bin\Win64\osgPlugins-{#OSGVersion}"; Flags: skipifsourcedoesntexist; Check: Is64BitInstallMode and not IsTaskSelected('force32')
Source: "{#OSG64PluginsDir}\osgdb_rgb.dll"; DestDir: "{app}\bin\Win64\osgPlugins-{#OSGVersion}"; Flags: skipifsourcedoesntexist; Check: Is64BitInstallMode and not IsTaskSelected('force32')
Source: "{#OSG64PluginsDir}\osgdb_png.dll"; DestDir: "{app}\bin\Win64\osgPlugins-{#OSGVersion}"; Flags: skipifsourcedoesntexist; Check: Is64BitInstallMode and not IsTaskSelected('force32')
Source: "{#OSG64PluginsDir}\osgdb_dds.dll"; DestDir: "{app}\bin\Win64\osgPlugins-{#OSGVersion}"; Flags: skipifsourcedoesntexist; Check: Is64BitInstallMode and not IsTaskSelected('force32')
Source: "{#OSG64PluginsDir}\osgdb_txf.dll"; DestDir: "{app}\bin\Win64\osgPlugins-{#OSGVersion}"; Flags: skipifsourcedoesntexist; Check: Is64BitInstallMode and not IsTaskSelected('force32')
Source: "{#OSG64PluginsDir}\osgdb_freetype.dll"; DestDir: "{app}\bin\Win64\osgPlugins-{#OSGVersion}"; Flags: skipifsourcedoesntexist; Check: Is64BitInstallMode and not IsTaskSelected('force32')
Source: "{#OSG64PluginsDir}\osgdb_serializers_osg.dll"; DestDir: "{app}\bin\Win64\osgPlugins-{#OSGVersion}"; Flags: skipifsourcedoesntexist; Check: Is64BitInstallMode and not IsTaskSelected('force32')
Source: "{#OSG64PluginsDir}\osgdb_serializers_osganimation.dll"; DestDir: "{app}\bin\Win64\osgPlugins-{#OSGVersion}"; Flags: skipifsourcedoesntexist; Check: Is64BitInstallMode and not IsTaskSelected('force32')
Source: "{#OSG64PluginsDir}\osgdb_serializers_osgfx.dll"; DestDir: "{app}\bin\Win64\osgPlugins-{#OSGVersion}"; Flags: skipifsourcedoesntexist; Check: Is64BitInstallMode and not IsTaskSelected('force32')
Source: "{#OSG64PluginsDir}\osgdb_serializers_osgmanipulator.dll"; DestDir: "{app}\bin\Win64\osgPlugins-{#OSGVersion}"; Flags: skipifsourcedoesntexist; Check: Is64BitInstallMode and not IsTaskSelected('force32')
Source: "{#OSG64PluginsDir}\osgdb_serializers_osgparticle.dll"; DestDir: "{app}\bin\Win64\osgPlugins-{#OSGVersion}"; Flags: skipifsourcedoesntexist; Check: Is64BitInstallMode and not IsTaskSelected('force32')
Source: "{#OSG64PluginsDir}\osgdb_serializers_osgshadow.dll"; DestDir: "{app}\bin\Win64\osgPlugins-{#OSGVersion}"; Flags: skipifsourcedoesntexist; Check: Is64BitInstallMode and not IsTaskSelected('force32')
Source: "{#OSG64PluginsDir}\osgdb_serializers_osgsim.dll"; DestDir: "{app}\bin\Win64\osgPlugins-{#OSGVersion}"; Flags: skipifsourcedoesntexist; Check: Is64BitInstallMode and not IsTaskSelected('force32')
Source: "{#OSG64PluginsDir}\osgdb_serializers_osgterrain.dll"; DestDir: "{app}\bin\Win64\osgPlugins-{#OSGVersion}"; Flags: skipifsourcedoesntexist; Check: Is64BitInstallMode and not IsTaskSelected('force32')
Source: "{#OSG64PluginsDir}\osgdb_serializers_osgtext.dll"; DestDir: "{app}\bin\Win64\osgPlugins-{#OSGVersion}"; Flags: skipifsourcedoesntexist; Check: Is64BitInstallMode and not IsTaskSelected('force32')
Source: "{#OSG64PluginsDir}\osgdb_serializers_osgvolume.dll"; DestDir: "{app}\bin\Win64\osgPlugins-{#OSGVersion}"; Flags: skipifsourcedoesntexist; Check: Is64BitInstallMode and not IsTaskSelected('force32')
Source: "{#OSG64PluginsDir}\osgdb_deprecated_osg.dll"; DestDir: "{app}\bin\Win64\osgPlugins-{#OSGVersion}"; Flags: skipifsourcedoesntexist; Check: Is64BitInstallMode and not IsTaskSelected('force32')
Source: "{#OSG64PluginsDir}\osgdb_deprecated_osgparticle.dll"; DestDir: "{app}\bin\Win64\osgPlugins-{#OSGVersion}"; Flags: skipifsourcedoesntexist; Check: Is64BitInstallMode and not IsTaskSelected('force32')
[Dirs]
; Make the user installable scenery directory
Name: "{app}\scenery"; Permissions: everyone-modify
Name: "{code:TerrasyncDir}"; Permissions: everyone-modify
[Icons]
Name: "{group}\FlightGear Launcher"; Filename: "{app}\bin\Win32\fgrun.exe"; WorkingDir: "{app}"; Check: not Is64BitInstallMode or IsTaskSelected('force32')
Name: "{group}\FlightGear Launcher"; Filename: "{app}\bin\Win64\fgrun.exe"; WorkingDir: "{app}"; Check: Is64BitInstallMode and not IsTaskSelected('force32')
; Name: "{group}\FlightGear"; Filename: "{app}\bin\Win32\fgfs.exe"; Parameters: "--fg-root=."; WorkingDir: "{app}";
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: "{userdesktop}\FlightGear {#FGVersion}"; Filename: "{app}\bin\Win32\fgrun.exe"; WorkingDir: "{app}"; Tasks: desktopicon; Check: not Is64BitInstallMode or IsTaskSelected('force32')
Name: "{userdesktop}\FlightGear {#FGVersion}"; Filename: "{app}\bin\Win64\fgrun.exe"; WorkingDir: "{app}"; Tasks: desktopicon; Check: Is64BitInstallMode and not IsTaskSelected('force32')
Name: "{group}\Tools\Install & Uninstall Scenery"; Filename: "{app}\bin\Win32\fgadmin.exe"; WorkingDir: "{app}"
Name: "{group}\Tools\TerraSync"; Filename: "{app}\bin\Win32\terrasync.exe"; Parameters: "-S -p 5505 -d ""{app}\terrasync"""; WorkingDir: "{app}"
Name: "{group}\Tools\Uninstall FlightGear"; Filename: "{uninstallexe}"
Name: "{group}\Tools\js_demo"; Filename: "{app}\bin\Win32\js_demo.exe"
Name: "{group}\Tools\fgjs"; Filename: "cmd"; Parameters: "/k fgjs.exe ""--fg-root={app}\data"""; WorkingDir: "{app}\bin\Win32";
Name: "{group}\Tools\GPSsmooth"; Filename: "cmd"; Parameters: "/k ""{app}\bin\Win32\GPSsmooth.exe"" -h"; WorkingDir: "{app}\bin\Win32";
Name: "{group}\Tools\UGsmooth"; Filename: "cmd"; Parameters: "/k ""{app}\bin\Win32\UGsmooth.exe"" -h"; WorkingDir: "{app}\bin\Win32";
Name: "{group}\Tools\MIDGsmooth"; Filename: "cmd"; Parameters: "/k ""{app}\bin\Win32\MIDGsmooth.exe"" -h"; WorkingDir: "{app}\bin\Win32";
Name: "{group}\Tools\metar"; Filename: "cmd"; Parameters: "/k ""{app}\bin\Win32\metar.exe"" -h"; WorkingDir: "{app}\bin\Win32";
Name: "{group}\Tools\yasim"; Filename: "cmd"; Parameters: "/k ""{app}\bin\Win32\yasim.exe"" -h"; WorkingDir: "{app}\bin\Win32";
Name: "{group}\Tools\fgpanel"; Filename: "cmd"; Parameters: "/k ""{app}\bin\Win32\fgpanel.exe"" -h"; WorkingDir: "{app}\bin\Win32";
Name: "{group}\Tools\Explore Documentation Folder"; Filename: "{app}\data\Docs"
; For running flightgear directly
; Name: "{userdesktop}\FlightGear v2.0.0"; Filename: "{app}\bin\Win32\fgfs.exe"; Parameters: "--fg-root=."; WorkingDir: "{app}"; Tasks: desktopicon
[Run]
filename: "cmd.exe"; WorkingDir: "{app}\bin\Win32"; Parameters: "/C del msvc*.dll"; Check: FileExists(ExpandConstant('{app}\bin\Win32\vcredist_x86.exe'))
filename: "cmd.exe"; WorkingDir: "{app}\bin\Win64"; Parameters: "/C del msvc*.dll"; Check: FileExists(ExpandConstant('{app}\bin\Win64\vcredist_x64.exe'))
filename: "{app}\bin\Win32\vcredist_x86.exe"; WorkingDir: "{app}\bin\Win32"; Parameters: "/passive /norestart"; Description: "Installing MS Visual C++ runtime components"; Check: FileExists(ExpandConstant('{app}\bin\Win32\vcredist_x86.exe'))
filename: "{app}\bin\Win64\vcredist_x64.exe"; WorkingDir: "{app}\bin\Win64"; Parameters: "/passive /norestart"; Description: "Installing MS Visual C++ runtime components"; Check: Is64BitInstallMode and not IsTaskSelected('force32') and FileExists(ExpandConstant('{app}\bin\Win64\vcredist_x64.exe'))
filename: "{app}\bin\Win32\oalinst.exe"; WorkingDir: "{app}\bin\Win32"; Description: "Installing OpenAL"; Check: IsTaskSelected('insoal') and FileExists(ExpandConstant('{app}\bin\Win32\oalinst.exe'))
; Put installation directory into the fgrun.prefs
filename: "{app}\bin\Win32\fgrun.exe"; WorkingDir: "{app}\bin\Win32"; Parameters: "--silent ""--fg-exe={app}\bin\Win32\fgfs.exe"" ""--ts-exe={app}\bin\Win32\terrasync.exe"" ""--fg-root={app}\data"" ""--fg-scenery={app}\data\Scenery;{app}\scenery;{code:TerrasyncDir}"" --ts-dir=3"; Check: not Is64BitInstallMode or IsTaskSelected('force32')
filename: "{app}\bin\Win64\fgrun.exe"; WorkingDir: "{app}\bin\Win64"; Parameters: "--silent ""--fg-exe={app}\bin\Win64\fgfs.exe"" ""--ts-exe={app}\bin\Win64\terrasync.exe"" ""--fg-root={app}\data"" ""--fg-scenery={app}\data\Scenery;{app}\scenery;{code:TerrasyncDir}"" --ts-dir=3"; Check: Is64BitInstallMode and not IsTaskSelected('force32')
; Put installation and source directories into the fgadmin.prefs
filename: "{app}\bin\Win32\fgadmin.exe"; WorkingDir: "{app}\bin\Win32"; Parameters: "--silent ""--install-source={src}\..\Scenery"" ""--scenery-dest={app}\scenery"""
[Registry]
Root: HKLM; Subkey: "Software\flightgear.org"; ValueType: string; ValueName: "TerrasyncDir"; ValueData: "{code:TerrasyncDir}"
[Code]
var
TerrasyncDirPage: TInputDirWizardPage;
procedure URLLabelOnClick(Sender: TObject);
var
ErrorCode: Integer;
begin
ShellExec('open', 'http://www.flightgear.org', '', '', SW_SHOWNORMAL, ewNoWait, ErrorCode);
end;
procedure CreateURLLabel(ParentForm: TSetupForm; CancelButton: TNewButton);
var
URLLabel: TNewStaticText;
begin
URLLabel := TNewStaticText.Create(ParentForm);
URLLabel.Caption := 'www.flightgear.org';
URLLabel.Cursor := crHand;
URLLabel.OnClick := @URLLabelOnClick;
URLLabel.Parent := ParentForm;
{ Alter Font *after* setting Parent so the correct defaults are inherited first }
URLLabel.Font.Style := URLLabel.Font.Style + [fsUnderline];
URLLabel.Font.Color := clBlue;
URLLabel.Top := CancelButton.Top + CancelButton.Height - URLLabel.Height - 2;
URLLabel.Left := ScaleX(20);
end;
procedure InitializeWizard();
begin
TerrasyncDirPage := CreateInputDirPage(wpSelectDir,
'Select Terrasync Directory', 'Where should scenery downloaded by Terrasync be put?',
'Select the folder in which Terrasync would download additional scenery, then click Next.',
False, 'Terrasync Folder');
TerrasyncDirPage.Add('');
CreateURLLabel(WizardForm, WizardForm.CancelButton);
end;
function NextButtonClick(CurPageID: Integer): Boolean;
begin
if CurPageID = wpSelectDir then begin
TerrasyncDirPage.Values[0] := GetPreviousData( 'TerrasyncDir', ExpandConstant('{reg:HKLM\Software\flightgear.org,TerrasyncDir|{app}\terrasync}') );
end;
Result := True;
end;
function TerrasyncDir(Param: String): String;
begin
Result := TerrasyncDirPage.Values[0];
end;
procedure RegisterPreviousData(PreviousDataKey: Integer);
begin
{ Store the settings so we can restore them next time }
SetPreviousData(PreviousDataKey, 'TerrasyncDir', TerrasyncDirPage.Values[0]);
end;
function UpdateReadyMemo(Space, NewLine, MemoUserInfoInfo, MemoDirInfo, MemoTypeInfo, MemoComponentsInfo, MemoGroupInfo, MemoTasksInfo: String): String;
var
S: String;
begin
S := '';
S := S + MemoDirInfo + NewLine + NewLine;
S := S + 'Terrasync folder:' + NewLine;
S := S + Space + TerrasyncDirPage.Values[0] + NewLine + NewLine;
S := S + MemoGroupInfo + NewLine + NewLine;
S := S + MemoTasksInfo + NewLine + NewLine;
Result := S;
end;
; 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
; "Inno Setup" package builder. Inno Setup is free (but probably not open
; source?.) The official web site for this package building software is:
;
; http://www.jrsoftware.org/isinfo.php
;
; Note: the files must appear in the X: drive.
; You can do this with the command below:
;
; subst X: path_to_files
;
; For example:
;
; C:\> subst X: F:\Path\to\FlightGear\root
; C:\> subst X: F:\
;
#include "InstallConfig.iss"
#define InstallDir32 "X:\install\msvc140"
#define OSGInstallDir InstallDir32 + "\OpenSceneGraph"
#define OSGPluginsDir OSGInstallDir + "\bin\osgPlugins-" + OSGVersion
#define InstallDir64 "X:\install\msvc140-64"
#define OSG64InstallDir InstallDir64 + "\OpenSceneGraph"
#define OSG64PluginsDir OSG64InstallDir + "\bin\osgPlugins-" + OSGVersion
#define ThirdPartyDir "X:\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"
[Setup]
AppId=FlightGear
AppName=FlightGear
AppPublisher=The FlightGear Team
OutputBaseFilename=FlightGear-{#FGVersion}{#FGDetails}
AppVerName=FlightGear v{#FGVersion}
AppPublisherURL=http://www.flightgear.org
AppSupportURL=http://www.flightgear.org
AppUpdatesURL=http://www.flightgear.org
DefaultDirName={pf}\FlightGear {#FGVersion}
UsePreviousAppDir=no
DefaultGroupName=FlightGear {#FGVersion}
UsePreviousGroup=no
LicenseFile=X:\flightgear\COPYING
Uninstallable=yes
SetupIconFile=X:\flightgear\package\flightgear.ico
VersionInfoVersion={#FGVersion}.0
InfoBeforeFile=X:\flightgear\package\windows\infobefore.txt
WizardImageFile=X:\flightgear\package\windows\setupimg.bmp
WizardImageStretch=No
WizardSmallImageFile=X:\flightgear\package\windows\setupsmall.bmp
VersionInfoCompany=The FlightGear Team
UninstallDisplayIcon={app}\bin\fgfs.exe
ArchitecturesInstallIn64BitMode=x64
ArchitecturesAllowed=x86 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:"
[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
; 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
; 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
[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'))
[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: "{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\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\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"
[Code]
const
NET_FW_SCOPE_ALL = 0;
NET_FW_IP_VERSION_ANY = 2;
NET_FW_ACTION_ALLOW = 1;
NET_FW_RULE_DIR_ALL = 0;
NET_FW_RULE_DIR_IN = 1;
NET_FW_RULE_DIR_OUT = 2;
NET_FW_IP_PROTOCOL_ALL = 0;
NET_FW_IP_PROTOCOL_TCP = 6;
NET_FW_IP_PROTOCOL_UDP = 17;
NET_FW_PROFILE2_DOMAIN = 1;
NET_FW_PROFILE2_PRIVATE = 2;
NET_FW_PROFILE2_PUBLIC = 4;
procedure URLLabelOnClick(Sender: TObject);
var
ErrorCode: Integer;
begin
ShellExec('open', 'http://www.flightgear.org', '', '', SW_SHOWNORMAL, ewNoWait, ErrorCode);
end;
procedure CreateURLLabel(ParentForm: TSetupForm; CancelButton: TNewButton);
var
URLLabel: TNewStaticText;
begin
URLLabel := TNewStaticText.Create(ParentForm);
URLLabel.Caption := 'www.flightgear.org';
URLLabel.Cursor := crHand;
URLLabel.OnClick := @URLLabelOnClick;
URLLabel.Parent := ParentForm;
{ Alter Font *after* setting Parent so the correct defaults are inherited first }
URLLabel.Font.Style := URLLabel.Font.Style + [fsUnderline];
URLLabel.Font.Color := clBlue;
URLLabel.Top := CancelButton.Top + CancelButton.Height - URLLabel.Height - 2;
URLLabel.Left := ScaleX(20);
end;
function UpdateReadyMemo(Space, NewLine, MemoUserInfoInfo, MemoDirInfo, MemoTypeInfo, MemoComponentsInfo, MemoGroupInfo, MemoTasksInfo: String): String;
var
S: String;
begin
S := '';
S := S + MemoDirInfo + NewLine + NewLine;
S := S + MemoGroupInfo + NewLine + NewLine;
S := S + MemoTasksInfo + NewLine + NewLine;
Result := S;
end;
procedure AddBasicFirewallException(AppName, FileName: String);
var
FirewallObject: variant;
RuleObject: variant;
begin
try
FirewallObject := CreateOleObject('HNetCfg.FwMgr');
RuleObject := CreateOleObject('HNetCfg.FwAuthorizedApplication');
RuleObject.ProcessImageFileName := FileName;
RuleObject.Name := AppName;
RuleObject.Scope := NET_FW_SCOPE_ALL;
RuleObject.IpVersion := NET_FW_IP_VERSION_ANY;
RuleObject.Enabled := true;
FirewallObject.LocalPolicy.CurrentProfile.AuthorizedApplications.Add(RuleObject);
except
end;
end;
procedure AddAdvancedFirewallException(AppName, AppDescription, FileName: String; Protocol: Integer; LocalPorts, RemotePorts: String; Direction: Integer);
var
FirewallObject: variant;
RuleObject: variant;
begin
try
FirewallObject := CreateOleObject('HNetCfg.FwPolicy2');
RuleObject := CreateOleObject('HNetCfg.FWRule');
RuleObject.Name := AppName;
RuleObject.Description := AppDescription;
RuleObject.ApplicationName := FileName;
if (Protocol <> NET_FW_IP_PROTOCOL_ALL) then
RuleObject.Protocol := Protocol;
if (LocalPorts <> '') then
RuleObject.LocalPorts := LocalPorts;
if (RemotePorts <> '') then
RuleObject.RemotePorts := RemotePorts;
if (Direction <> NET_FW_RULE_DIR_ALL) then
RuleObject.Direction := Direction;
RuleObject.Enabled := true;
RuleObject.Grouping := 'FlightGear';
RuleObject.Profiles := NET_FW_PROFILE2_DOMAIN + NET_FW_PROFILE2_PRIVATE + NET_FW_PROFILE2_PUBLIC;
RuleObject.Action := NET_FW_ACTION_ALLOW;
RuleObject.RemoteAddresses := '*';
FirewallObject.Rules.Add(RuleObject);
except
end;
end;
procedure RemoveFirewallException(AppName, FileName: String);
var
FirewallObject: variant;
Version: TWindowsVersion;
begin
GetWindowsVersionEx(Version);
try
if (Version.Major >= 6) then
begin
FirewallObject := CreateOleObject('HNetCfg.FwPolicy2');
FirewallObject.Rules.Remove(AppName);
end
else if (Version.Major = 5) and (((Version.Minor = 1) and (Version.ServicePackMajor >= 2)) or ((Version.Minor = 2) and (Version.ServicePackMajor >= 1))) then
begin
FirewallObject := CreateOleObject('HNetCfg.FwMgr');
FirewallObject.LocalPolicy.CurrentProfile.AuthorizedApplications.Remove(FileName);
end;
except
end;
end;
var
UninstallCheckCleanPage: TNewNotebookPage;
UninstallBackButton: TNewButton;
UninstallNextButton: TNewButton;
DoCleanCheckbox : TNewCheckBox;
CleanHelp : TNewStaticText;
procedure InitializeUninstallProgressForm();
begin
UninstallProgressForm
UninstallCheckCleanPage := TNewNotebookPage.Create(UninstallProgressForm);
UninstallCheckCleanPage.Notebook := UninstallProgressForm.InnerNotebook;
UninstallCheckCleanPage.Parent := UninstallProgressForm.InnerNotebook;
UninstallCheckCleanPage.Align := alClient
DoCleanCheckbox := TNewCheckBox.Create(UninstallProgressForm);
DoCleanCheckbox.Parent := UninstallCheckCleanPage;
DoCleanCheckbox.Caption := 'Remove all settings, downloaded scenery and aircraft';
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 := '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.';
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;
begin
if CurStep = ssPostInstall then
begin
GetWindowsVersionEx(Version);
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);
end
else if (Version.Major = 5) and (((Version.Minor = 1) and (Version.ServicePackMajor >= 2)) or ((Version.Minor = 2) and (Version.ServicePackMajor >= 1))) then
begin
{ The Windows XP/Server 2003 firewall does not block outgoing connections at all, so only listening processes should be added }
AddBasicFirewallException('FlightGear', ExpandConstant('{app}') + '\bin\fgfs.exe');
AddBasicFirewallException('FlightGear FGCom', ExpandConstant('{app}') + '\bin\fgcom.exe');
end;
end;
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');
RemoveFirewallException('FlightGear FGCom', ExpandConstant('{app}') + '\bin\fgcom.exe');
end;
end;

View File

@@ -2,16 +2,18 @@
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleIconFile</key>
<string>FlightGear.icns</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleGetInfoString</key>
<string>FlightGear nightly build</string>
<string>FlightGear, the open-source flight simulator, <%= fgVersion %>. ©1996-<%= fgCurrentYear%>, The FlightGear Project</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleExecutable</key>
<string>FlightGear</string>
<string>fgfs</string>
<key>CFBundleIdentifier</key>
<string>org.flightgear.FlightGear</string>
<key>CFBundleVersion</key>
@@ -19,11 +21,20 @@
<key>CFBundleShortVersionString</key>
<string><%= fgVersion %></string>
<key>LSMinimumSystemVersion</key>
<string>10.5.0</string>
<string>10.7.0</string>
<key>NSMainNibFile</key>
<string>MainMenu</string>
<key>NSPrincipalClass</key>
<string>NSApplication</string>
<key>NSHumanReadableCopyright</key>
<string>©1996-<%= fgCurrentYear%>, The FlightGear Project</string>
<!-- when launched via LaunchServices, run the launcher GUI -->
<key>LSEnvironment</key>
<dict>
<key>FG_LAUNCHER</key>
<string>1</string>
</dict>
</dict>
</plist>

339
Nasa2FGearthview/LICENSE Normal file
View File

@@ -0,0 +1,339 @@
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc., <http://fsf.org/>
51 Franklin Street, 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.
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Lesser General Public License instead.) You can apply it to
your programs, 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 software, or if you modify it.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must show them these terms so they know their
rights.
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, 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 redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in
the term "modification".) Each licensee is addressed as "you".
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.
1. You may copy and distribute verbatim copies of the Program's
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 give any other recipients of the Program a copy of this License
along with the Program.
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 Program or any portion
of it, thus forming a work based on the Program, 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) You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.
b) You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.
c) If the modified program normally reads commands interactively
when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
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 Program, 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 Program.
In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:
a) 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; or,
b) Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your
cost of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,
c) Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form with such
an offer, in accord with Subsection b above.)
The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, 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 executable. 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.
If distribution of executable or 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 counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program 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.
5. 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 Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.
6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program 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.
7. 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 Program at all. For example, if a patent
license would not permit royalty-free redistribution of the Program 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 Program.
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.
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program 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.
9. The Free Software Foundation may publish revised and/or new versions
of the 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 Program
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 Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.
10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, 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
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "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 PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.
12. 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 PROGRAM 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 PROGRAM (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 PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), 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 Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. 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.
{description}
Copyright (C) {year} {fullname}
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 2 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, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) year name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, the commands you use may
be called something other than `show w' and `show c'; they could even be
mouse-clicks or menu items--whatever suits your program.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
`Gnomovision' (which makes passes at compilers) written by James Hacker.
{signature of Ty Coon}, 1 April 1989
Ty Coon, President of Vice
This General Public License does not permit incorporating your program into
proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License.

167
Nasa2FGearthview/README.md Normal file
View File

@@ -0,0 +1,167 @@
# Nasa2FGearthview
A bash-script to convert NASA satellite images to ready-to-use
textures for FG's EarthView using ImageMagick.
For info about FGearthview, see the forum thread:
https://forum.flightgear.org/viewtopic.php?f=6&t=15754
or this FG-wiki-page:
http://wiki.flightgear.org/Earthview
------------------------------------
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:
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.
Buckaroo has created a nice overview on dds-compression:
[1] http://www.buckarooshangar.com/flightgear/tut_dds.html
------------------------------------
Installation and usage:
Simply copy "convert.sh" into a folder of your liking and run it:
$ ./convert.sh
This will show a help text, since you didn't specify any target(s).
Possible targets are:
* world
* clouds
* all
Additionally, there are some options you could specify (further
explained below):
* 1k | 2k | 4k | 8k | 16k
* nasa
* no-download
* cleanup
* rebuild
* check
So your call could look sth like this:
$ ./convert.sh world no-download cleanup 8k
------------------------------------
Requirements:
WARNING!
This script uses a *lot* disk space! Make sure you have at least 90GB
available!
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")
So, on Debian for instance, you only need to put the following into
the console:
$ 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
in your distro!
You may want to check:
$ apt search imagemagick
------------------------------------
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
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
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.
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.
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
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)
check
Creates mosaics of the tiles, so you can look at them and see
if all went well.

1403
Nasa2FGearthview/convert.sh Executable file

File diff suppressed because it is too large Load Diff

View File

@@ -5,20 +5,24 @@ if [ "$WORKSPACE" == "" ]; then
exit 1
fi
VERSION=`cat 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
rm -rf sgBuild
rm -rf fgBuild
cd $WORKSPACE
mkdir -p sgBuild
mkdir -p fgBuild
mkdir -p output
rm -rf output/*
rm -rf $WORKSPACE/dist/include/simgear $WORKSPACE/dist/libSim* $WORKSPACE/dist/libsg*.a
#####################################################################################
echo "Starting on SimGear"
cd sgBuild
cmake -DCMAKE_INSTALL_PREFIX:PATH=$WORKSPACE/dist -DSIMGEAR_SHARED:BOOL="ON" ../simgear
cmake -DCMAKE_INSTALL_PREFIX:PATH=$WORKSPACE/dist -DENABLE_DNS:BOOL="ON" -DSIMGEAR_SHARED:BOOL="ON" ../simgear
# compile
make
@@ -37,7 +41,7 @@ cp simgear-*.tar.bz2 ../output/.
#####################################################################################
echo "Starting on FlightGear"
cd ../fgBuild
cmake -DCMAKE_INSTALL_PREFIX:PATH=$WORKSPACE/dist -DSIMGEAR_SHARED:BOOL="ON" ../flightgear
cmake -DCMAKE_INSTALL_PREFIX:PATH=$WORKSPACE/dist -DSIMGEAR_SHARED:BOOL="ON" -DFG_BUILD_TYPE=Release ../flightgear
# compile
make
@@ -53,3 +57,9 @@ make install
make package_source
cp flightgear-*.tar.bz2 ../output/.
#####################################################################################
echo "Assembling base package"
cd $WORKSPACE
tar cjf output/FlightGear-$VERSION-data.tar.bz2 fgdata/

0
build_release_mac.sh Executable file
View File

143
build_release_windows.bat Executable file
View File

@@ -0,0 +1,143 @@
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"\
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 ^
-DOSG_FSTREAM_EXPORT_FIXED=1 ^
-DCMAKE_PREFIX_PATH:PATH=%OSG32% ^
-DCMAKE_INSTALL_PREFIX:PATH=%WORKSPACE%/install/msvc140
cmake --build . --config RelWithDebInfo --target INSTALL
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 ^
-DOSG_FSTREAM_EXPORT_FIXED=1 ^
-DCMAKE_PREFIX_PATH=%QT5SDK32%;%OSG32% ^
-DFG_BUILD_TYPE=%FGBUILDTYPE%
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" ^
-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" ^
-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% ^
-DOSG_FSTREAM_EXPORT_FIXED=1 ^
-DFG_BUILD_TYPE=%FGBUILDTYPE%
cmake --build . --config RelWithDebInfo --target INSTALL
cd ..
REM Qt5 deployment
SET QMLDIR=%WORKSPACE%/flightgear/src/GUI/qml
%QT5SDK32%\bin\windeployqt --release --list target --qmldir %QMLDIR% %WORKSPACE%/install/msvc140/bin/fgfs.exe
%QT5SDK64%\bin\windeployqt --release --list target --qmldir %QMLDIR% %WORKSPACE%/install/msvc140-64/bin/fgfs.exe
REM build setup
ECHO Packaging root is %WORKSPACE%
subst X: /D
subst X: %WORKSPACE%.
REM ensure output dir is clean since we upload the entirety of it
rmdir /S /Q output
SET CRASHFIX_UPLOAD_URL=http://crashes.flightgear.org/index.php/debugInfo/uploadExternal
SET FGFS_PDB=src\Main\RelWithDebInfo\fgfs.pdb
ECHO Uploading PDB files to %CRASHFIX_UPLOAD_URL%
upload -v -u %CRASHFIX_UPLOAD_URL% FlightGear %WORKSPACE%\build-fg32\%FGFS_PDB% %WORKSPACE%\build-fg64\%FGFS_PDB%
REM indirect way to get command output into an environment variable
set PATH=%OSG32%\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 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
IF %IS_NIGHTLY_BUILD% EQU 1 (
REM FlightGear nightly: with fgdata, output filename would be "FlightGear-x.x.x-nightly-full.exe"
CALL :writeBaseConfig
CALL :writeNightlyFullConfig
iscc /Q FlightGear.iss
REM FlightGear nightly: without fgdata, output filename would be "FlightGear-x.x.x-nightly.exe"
CALL :writeBaseConfig
CALL :writeNightlyDietConfig
iscc /Q FlightGear.iss
) ELSE (
REM FlightGear release: with fgdata, output filename would be "FlightGear-x.x.x.exe"
CALL :writeBaseConfig
CALL :writeReleaseConfig
iscc /Q FlightGear.iss
)
GOTO End
:writeBaseConfig
ECHO #define FGVersion "%FLIGHTGEAR_VERSION%" > 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
GOTO End
:writeReleaseConfig
CALL :writeBaseConfig
ECHO #define FGDetails "" >> InstallConfig.iss
ECHO #define IncludeData "TRUE" >> InstallConfig.iss
GOTO End
:writeNightlyFullConfig
CALL :writeBaseConfig
ECHO #define FGDetails "-nightly-full" >> InstallConfig.iss
ECHO #define IncludeData "TRUE" >> InstallConfig.iss
GOTO End
:writeNightlyDietConfig
CALL :writeBaseConfig
ECHO #define FGDetails "-nightly" >> InstallConfig.iss
ECHO #define IncludeData "FALSE" >> InstallConfig.iss
GOTO End
:End

306
catalog/catalog.py Normal file
View File

@@ -0,0 +1,306 @@
#!/usr/bin/python
import argparse
import datetime
import lxml.etree as ET
import os
import re
import sgprops
import sys
import catalogTags
CATALOG_VERSION = 4
quiet = False
verbose = False
def warning(msg):
if not quiet:
print(msg)
def log(msg):
if verbose:
print(msg)
# xml node (robust) get text helper
def get_xml_text(e):
if e != None and e.text != None:
return e.text
else:
return ''
# return all available aircraft information from the set file as a
# dict
def scan_set_file(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"):
return None
sim_node = root_node.getChild("sim")
if sim_node == None:
return None
# allow -set.xml files to specifcially exclude themselves from
# the creation process, by setting <exclude-from-catalog>true</>
if (sim_node.getValue("exclude-from-catalog", False) == True):
return None
variant = {}
name = sim_node.getValue("description", None)
if (name == None or len(name) == 0):
warning("Set file " + set_file + " is missing a <description>, skipping")
return None
variant['name'] = name
variant['status'] = sim_node.getValue("status", None)
if sim_node.hasChild('authors'):
# aircraft has structured authors data, handle that
variant['authors'] = extract_authors(sim_node.getChild('authors'))
elif sim_node.hasChild('author'):
variant['author'] = sim_node.getValue("author", None)
if sim_node.hasChild('long-description'):
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'):
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)
if sim_node.hasChild('tags'):
variant['tags'] = extract_tags(sim_node.getChild('tags'), set_file)
if sim_node.hasChild('thumbnail'):
variant['thumbnail'] = sim_node.getValue("thumbnail", None)
variant['variant-of'] = sim_node.getValue("variant-of", None)
if sim_node.hasChild('minimum-fg-version'):
variant['minimum-fg-version'] = sim_node.getValue('minimum-fg-version', 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):
warning("Bad preview path, skipping:" + fullPath)
continue
result.append({'type':previewType, 'path':previewPath})
return result
def extract_tags(tags_node, set_path):
result = []
for node in tags_node.getChildren("tag"):
tag = node.value
# check tag is in the allowed list
if not catalogTags.isValidTag(tag):
warning("Unknown tag value:" + tag + " in " + set_path)
result.append(tag)
return result
def extract_authors(authors_node):
result = []
for author in authors_node.getChildren("author"):
authorName = author.getValue("name", None)
if (authorName == None):
continue
authorNick = author.getValue("nick", None)
authorEmail = author.getValue("email", None)
authorDesc = author.getValue("description", None)
result.append({'name':authorName, 'nick':authorNick, 'email':authorEmail, 'description':authorDesc})
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, includes):
setDicts = []
primaryAircraft = []
package = None
files = os.listdir(aircraft_dir)
for file in sorted(files, key=lambda s: s.lower()):
if file.endswith('-set.xml'):
# print 'trying:', file
try:
d = scan_set_file(aircraft_dir, file, includes)
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']:
# ensure explicit primary-set aircraft goes first
primaryAircraft.insert(0, d)
elif d['variant-of'] == None:
primaryAircraft.append(d)
# print setDicts
if len(setDicts) == 0:
return None, None
# use the first one
if len(primaryAircraft) == 0:
print "Aircraft has no primary aircraft at all:", aircraft_dir
primaryAircraft = [setDicts[0]]
package = primaryAircraft[0]
if not 'thumbnail' in package:
if (os.path.exists(os.path.join(aircraft_dir, "thumbnail.jpg"))):
package['thumbnail'] = "thumbnail.jpg"
# variants is just all the set dicts except the first one
variants = setDicts
variants.remove(package)
return (package, variants)
# 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
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 append_tag_nodes(node, variant):
if not 'tags' in variant:
return
for tag in variant['tags']:
node.append(make_xml_leaf('tag', tag))
def append_author_nodes(node, info):
if 'authors' in info:
authors_node = ET.Element('authors')
for a in info['authors']:
a_node = ET.Element('author')
a_node.append(make_xml_leaf('name', a['name']))
if (a['email'] != None):
a_node.append(make_xml_leaf('email', a['email']))
if (a['nick'] != None):
a_node.append(make_xml_leaf('nick', a['nick']))
if (a['description'] != None):
a_node.append(make_xml_leaf('description', a['description']))
authors_node.append(a_node)
node.append(authors_node)
elif 'author' in info:
# traditional single author string
node.append( make_xml_leaf('author', info['author']) )
def make_aircraft_node(aircraftDirName, package, variants, downloadBase):
#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']) )
append_author_nodes(package_node, package)
if 'description' in package:
package_node.append( make_xml_leaf('description', package['description']) )
if 'minimum-fg-version' in package:
package_node.append( make_xml_leaf('minimum-fg-version', package['minimum-fg-version']) )
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']) )
if 'thumbnail' in variant:
# note here we prefix with the package name, since the thumbnail path
# is assumed to be unique within the package
thumbUrl = downloadBase + "thumbnails/" + aircraftDirName + '_' + variant['thumbnail']
variant_node.append(make_xml_leaf('thumbnail', thumbUrl))
variant_node.append(make_xml_leaf('thumbnail-path', variant['thumbnail']))
variantOf = variant['variant-of']
if variantOf is None:
variant_node.append(make_xml_leaf('variant-of', '_primary_'))
else:
variant_node.append(make_xml_leaf('variant-of', variantOf))
append_preview_nodes(variant_node, variant, downloadBase, aircraftDirName)
append_tag_nodes(variant_node, variant)
append_author_nodes(variant_node, variant)
package_node.append( make_xml_leaf('dir', aircraftDirName) )
download_url = downloadBase + aircraftDirName + '.zip'
package_node.append( make_xml_leaf('url', download_url) )
if 'thumbnail' in package:
thumbnail_url = downloadBase + 'thumbnails/' + aircraftDirName + '_' + package['thumbnail']
package_node.append( make_xml_leaf('thumbnail', thumbnail_url) )
package_node.append( make_xml_leaf('thumbnail-path', package['thumbnail']))
append_preview_nodes(package_node, package, downloadBase, aircraftDirName)
append_tag_nodes(package_node, package)
return package_node

164
catalog/catalogTags.py Normal file
View File

@@ -0,0 +1,164 @@
aircraftTypeTags = [
"aerobatic",
"airship",
"balloon",
"bizjet",
"bomber",
"cargo",
"carrier",
"fighter",
"ga",
"glider",
"groundvehicle",
"helicopter",
"racer",
"spaceship",
"tanker",
"trainer",
"transport",
"ultralight",
"reconnaissance",
"seacraft",
"crop-duster",
"bush-plane"
]
manufacturerTags = [
"airbus",
"antonov",
"atr",
"avro",
"bell",
"bleriot",
"boeing",
"bombardier",
"caudron",
"cessna",
"consolidated",
"dassault",
"diamond",
"dornier",
"douglas",
"embraer",
"eurocopter",
"fairchild",
"fairey",
"focke-wulf",
"fokker",
"general-dynamics",
"gotha",
"grumman",
"handley-page",
"hawker",
"heinkel",
"ilyushin",
"junkers",
"lockheed",
"mc-donnell-douglas",
"messerschmitt",
"mikoyan-gurevich",
"mitsubishi",
"north-american",
"northrop",
"pilatus",
"piper",
"republic",
"robin",
"saab",
"short",
"sopwith",
"spad",
"sukhoi",
"supermarine",
"tupolev",
"vickers",
"vought",
"yakovlev"
]
eraTags = [
"1910s",
"1920s",
"1930s",
"1940s",
"1950s",
"1960s",
"1970s",
"1980s",
"1990s",
"2000s",
"2010s",
"coldwar",
"early-pioneers",
"golden-age",
"gulfwar1",
"gulfwar2",
"vietnam",
"ww1",
"ww2"
]
featureTags = [
"aerobatic",
"airship",
"amphibious",
"biplane",
"canard",
"castering-wheel",
"delta",
"etops",
"experimental",
"fictional",
"fixed-gear",
"floats",
"glass-cockpit",
"high-wing",
"h-tail",
"hud",
"ifr",
"prototype",
"refuel",
"retractable-gear",
"seaplane",
"skis",
"stol",
"supersonic",
"t-tail",
"tail-dragger",
"tricycle",
"tail-hook",
"triplane",
"v-tail",
"variable-geometry",
"vtol",
"wing-fold"
]
propulsionTags = [
"afterburner",
"diesel",
"electric",
"jet",
"propeller",
"piston",
"radial",
"rocket",
"single-engine",
"supercharged",
"turboprop",
"twin-engine",
"variable-pitch",
"fixed-pitch"
]
simFeatureTags = [
"dual-controls",
"rembrandt",
"tow",
"wildfire"
]
tags = aircraftTypeTags + manufacturerTags + eraTags + simFeatureTags + propulsionTags + featureTags
def isValidTag(maybeTag):
return maybeTag in tags

View File

@@ -0,0 +1,28 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--Template catalog - copy and modify for your site as required-->
<PropertyList>
<local-output>/home/curt/Projects/FlightGear/ftp/Aircraft</local-output>
<download-url n="0">http://mirrors.ibiblio.org/flightgear/ftp/Aircraft/</download-url>
<thumbnail-url n="0">http://mirrors.ibiblio.org/flightgear/ftp/Aircraft/thumbnails</thumbnail-url>
<scm>
<type>svn</type>
<path>/home/curt/Projects/FlightGear/flightgear-fgaddon/Aircraft</path>
<skip>NTPS</skip>
<skip>c172</skip>
<skip>tu134</skip>
</scm>
<include-dir>/home/curt/Projects/FlightGear/flightgear-fgdata</include-dir>
<include-dir>/home/curt/Projects/FlightGear/flightgear-fgaddon</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>fgfs:/home/fgfs/fgfs.goneabitbursar.com/official</remote>
</upload>
</PropertyList>

View File

@@ -0,0 +1,516 @@
<?xml version='1.0' encoding='UTF-8'?>
<PropertyList>
<aircraft_14bis>8a4ea48a3bb83b608386f942a85100c9</aircraft_14bis>
<aircraft_21>057bfdb3c3fcfba3f8d31723a77df277</aircraft_21>
<aircraft_707>088f6c3850d9c3f8e94ced2bfc2a65db</aircraft_707>
<aircraft_717>abc393890f7ab49f32c6a2adc01b7823</aircraft_717>
<aircraft_727-230>8e93ee83c42f77db9881f9ca0f00cf8b</aircraft_727-230>
<aircraft_737-100>45fc009e9323de75e477b2548c79cb9a</aircraft_737-100>
<aircraft_737-200>3fb8820c373e78bcd52981293e2d46e8</aircraft_737-200>
<aircraft_737-300>c974d9b2e7c5feba195563433a4c5bc2</aircraft_737-300>
<aircraft_737NG>dd9ab7cb3fb27a4acfc7b634fa9ec396</aircraft_737NG>
<aircraft_747>5779ec5bdab4e9405d0db447c5a73df4</aircraft_747>
<aircraft_747-200>e3565e459436a5e4dcdd260a095c28b2</aircraft_747-200>
<aircraft_747-400>ce6c904cb23df6337ed6bdc1dcf6d68e</aircraft_747-400>
<aircraft_747-8i>92161d0ef86048c0c859241abd64ffcd</aircraft_747-8i>
<aircraft_757-200>9f5841317f4ed65fc815517c6770affd</aircraft_757-200>
<aircraft_767-300>89c1b762b8b58fee4772a94d3c9b81d8</aircraft_767-300>
<aircraft_777>693bf6470439f876edced4bd558b69a1</aircraft_777>
<aircraft_787-8>f450b755c5bad640d8c2ef7312b1a6fb</aircraft_787-8>
<aircraft_A-10>4aaca65794466d8cbf8e9ab29ef1b47b</aircraft_A-10>
<aircraft_A-26-Invader>c57f1d877e851f2164f292997508dd36</aircraft_A-26-Invader>
<aircraft_A-6E>86b52be36911fd0ee5d0b93d4b70a087</aircraft_A-6E>
<aircraft_A24-Viking>904f23999e33d323d3f7a09c1807b71a</aircraft_A24-Viking>
<aircraft_A300>3ae04898384a6531fa2edac2fcd508e9</aircraft_A300>
<aircraft_A320-family>c9ec3df5ce80cbbbec9e39a849877ceb</aircraft_A320-family>
<aircraft_A340-600>f015a7d2c8bde1224298261ae34e04c2</aircraft_A340-600>
<aircraft_A380>4951432b9d39c142e891da3209e3ad32</aircraft_A380>
<aircraft_a4>f175e90ccf2c3ae5118cf6eb1a43867e</aircraft_a4>
<aircraft_A6M2>dfb5b7f4f7233d854dca45ae4521e080</aircraft_A6M2>
<aircraft_Aermacchi-MB-339>f6757f3a4f78364c0439fd7d488c4330</aircraft_Aermacchi-MB-339>
<aircraft_Aero-Commander>021be8bd26c7aa03093e5e356d8c7ef2</aircraft_Aero-Commander>
<aircraft_Aerocar>89c4f1663f6b65ca1f70184dd8886f8b</aircraft_Aerocar>
<aircraft_Aerostar-700>9049ec76bddd80abff57a837313771d8</aircraft_Aerostar-700>
<aircraft_AG-14>4f9c9c24e662036de1cd85ed528c3d4e</aircraft_AG-14>
<aircraft_Aichi-D3A>766eb03f38f36190de94422b5481ce4b</aircraft_Aichi-D3A>
<aircraft_Aichi-M6A>14219343b589d8610da96f7a8ec16cdc</aircraft_Aichi-M6A>
<aircraft_Airco-DH2>67689844de14068b7e95e675c0da6c17</aircraft_Airco-DH2>
<aircraft_AirCrane>44fd70dc27b3d36bbde5766ac528d095</aircraft_AirCrane>
<aircraft_Airspeed-Horsa>dae16af174310b492c4412e0c77593e8</aircraft_Airspeed-Horsa>
<aircraft_airwaveXtreme150>64c7f53c6dac1b4da3813661f7455faf</aircraft_airwaveXtreme150>
<aircraft_Albatros-BII>7ccb293d5808ca0b9c48271a6398de94</aircraft_Albatros-BII>
<aircraft_Albatross>61af35090bbc722076353d1496c2d82f</aircraft_Albatross>
<aircraft_Allegro-2000>edae78dee86c3c0cb741bc4ea8793162</aircraft_Allegro-2000>
<aircraft_Alouette-II>94d5008f7bbfb65a56cff0694983d8ff</aircraft_Alouette-II>
<aircraft_Alouette-III>c267be9f90def2460ff53649c6fee2f0</aircraft_Alouette-III>
<aircraft_Alphajet>3fd4701f2363c41de0374c4703b88e83</aircraft_Alphajet>
<aircraft_AN-225>87a1ad2288b56c71559549d55b93cccd</aircraft_AN-225>
<aircraft_an2>37ccf863b017f0b773885619a671f8f7</aircraft_an2>
<aircraft_an24b>3e26ca3bf5296630eebbcd82859d5ac4</aircraft_an24b>
<aircraft_ANT-20>add26dd267eca688d4a88b672749a155</aircraft_ANT-20>
<aircraft_Antoinette>75e69854bf9d09d16cbd5147926ba7fd</aircraft_Antoinette>
<aircraft_Antonov-An-12>457f71d5be8ec8c3e42c6919b226b549</aircraft_Antonov-An-12>
<aircraft_Antonov-An-22>4a27ba4bb53f82bf2a4b325cd3405a89</aircraft_Antonov-An-22>
<aircraft_apache>b7e3e73c98d17006e984e056442c29ce</aircraft_apache>
<aircraft_AR-234>c0c500c55706fc18d93817ebc3b6e83b</aircraft_AR-234>
<aircraft_Arsenal-VG33>c883cde7942cdcfb8cd69c135c4d29f7</aircraft_Arsenal-VG33>
<aircraft_Arup-S2>70db9ed1cb09e1442e22d020a9dc3069</aircraft_Arup-S2>
<aircraft_as332>c62f9ee3f78c98a6342a6a337089fd10</aircraft_as332>
<aircraft_ASK13>264d821437a558cf71c9209f466f6103</aircraft_ASK13>
<aircraft_ASK21>27923bdc9f0f3ae3449f5d7a17744da5</aircraft_ASK21>
<aircraft_ASK21-MI>023bbe168eb0babb4a68963edffc273b</aircraft_ASK21-MI>
<aircraft_asw20>0926a8a021c4e11fa2610cbb5f6f11b3</aircraft_asw20>
<aircraft_ATC>846d8156216e434e789f5d2b7432b68f</aircraft_ATC>
<aircraft_ATC-ML>887c1bc8ab679604031f983ab6c67974</aircraft_ATC-ML>
<aircraft_ATI-Resolution>915cd6323c113bb2a8b57e4c08900f3e</aircraft_ATI-Resolution>
<aircraft_ATR-72-500>c0fe4169db9a338f5beec102f1efe301</aircraft_ATR-72-500>
<aircraft_Avro-Arrow>4b2acc554752df97194e0da1a1c8638c</aircraft_Avro-Arrow>
<aircraft_AVRO-IV-Triplane>9d3c4b4b66a7140628b79c4f142cc0f4</aircraft_AVRO-IV-Triplane>
<aircraft_Avro-Lancaster>611d6172991766b32a43d19bfb06bbb2</aircraft_Avro-Lancaster>
<aircraft_B-17>7cf94e2ee2c76783bf17c845e12e48cb</aircraft_B-17>
<aircraft_B-1B>6407f6fd1bfe031b280639d20dfe100f</aircraft_B-1B>
<aircraft_B-2>04db71541bc7099383524080a2c64012</aircraft_B-2>
<aircraft_B-24-Liberator>2bdd09054c9c92088ff297d6358a05a8</aircraft_B-24-Liberator>
<aircraft_B-25>51c6e9397e1e8fff65eb1d1671d18067</aircraft_B-25>
<aircraft_B-36D-Peacemaker>3d1883d3213d2b5f7d39ec5221cd4eb2</aircraft_B-36D-Peacemaker>
<aircraft_B-52F>d172dc57ce4e2c15f7f550a5c0c734a8</aircraft_B-52F>
<aircraft_b1900d>db7301be7b428db2070e27a5fe7ee06e</aircraft_b1900d>
<aircraft_b26>a71912ae798780eba390f9b27638b139</aircraft_b26>
<aircraft_b29>7dd2ae465a7710921d11c6c18aa0c0e7</aircraft_b29>
<aircraft_BAC-TSR2>6aaa660040bd40facf28fc68220b3cfc</aircraft_BAC-TSR2>
<aircraft_BAe-125>2a3387f97647ad875060bac1284cfcbd</aircraft_BAe-125>
<aircraft_Beagle-Pup>46a6f17c638e177421d1afc559b9d66a</aircraft_Beagle-Pup>
<aircraft_beaufighter>50af4a2d301fafb2a3e13fe96e9215be</aircraft_beaufighter>
<aircraft_beech99>6395fcaf780d6e43b4dd9f215a24e718</aircraft_beech99>
<aircraft_Beechcraft-C18S>5a133a789694642b9f3e611ddf23d3d6</aircraft_Beechcraft-C18S>
<aircraft_Beechcraft-Staggerwing>b668b91e67ef10757839da013faee44b</aircraft_Beechcraft-Staggerwing>
<aircraft_Bell-222X>635dc4a39a43814f2885d59b1dda8a9d</aircraft_Bell-222X>
<aircraft_Bell-P-39>aba5e103f315014925dff3b39bd2d648</aircraft_Bell-P-39>
<aircraft_Bell-P-59>ba6e32553464e03fe6392303a2072631</aircraft_Bell-P-59>
<aircraft_Bell-X1>3c10ccdf2775cad485bb394d5b1e56eb</aircraft_Bell-X1>
<aircraft_Bell-XFL-1>167d03a6eafc1a3780f6fdf733fc7c6e</aircraft_Bell-XFL-1>
<aircraft_Bernard-HV220>0579472d3185c8beba310aef9bf65f5d</aircraft_Bernard-HV220>
<aircraft_bf109>cb732caa641493f07c4cc564018dd481</aircraft_bf109>
<aircraft_Bleriot-125>21b170a0f9dae055d5c1d1af9946515e</aircraft_Bleriot-125>
<aircraft_Bleriot-5190>4fdcfd3aa209318c07c779e408e81df2</aircraft_Bleriot-5190>
<aircraft_Bleriot-SPAD-S.510>aef8c5f5f68349a7ae804df1d6d07e3f</aircraft_Bleriot-SPAD-S.510>
<aircraft_bleriot-XI>e499504fcba1e95e0cca9c4418bfee23</aircraft_bleriot-XI>
<aircraft_bluebird>a9af2d04a1e7bf279d135a4a06b11181</aircraft_bluebird>
<aircraft_bo105>506a63476d00ef552b8adc3260ba1fa4</aircraft_bo105>
<aircraft_bocian>9a3fd12ef60228dca05efa4ff694a882</aircraft_bocian>
<aircraft_Boeing-247>152fcac32e4bb9f7fce5b6894b6da08b</aircraft_Boeing-247>
<aircraft_Boeing-P26>97a640a4f9eddc33ac626f78adfaecb9</aircraft_Boeing-P26>
<aircraft_Boeing314>f00599943616e14682c2baea90e6173a</aircraft_Boeing314>
<aircraft_Bombardier-415>787d13e37c31fbf894d5a25091e4befc</aircraft_Bombardier-415>
<aircraft_Br-761>78d4695d2466f50d3c45e0374809b386</aircraft_Br-761>
<aircraft_Brabazon>6d0e61e40af698ea72e2978ed50e3a49</aircraft_Brabazon>
<aircraft_Breda-B.Z.308>b3e9444c45cc9c445961b726429c0c7e</aircraft_Breda-B.Z.308>
<aircraft_Breguet-XIX>a230231691ebc4df86e7d645f31a0f07</aircraft_Breguet-XIX>
<aircraft_Buccaneer>84362d957e9dae0e5abc70ba4cb9816e</aircraft_Buccaneer>
<aircraft_Bugatti>311a00f90c55c01980688c1d5504df64</aircraft_Bugatti>
<aircraft_Burnelli-CBY-3>cb75a6990af600c666b02398cf77d6d1</aircraft_Burnelli-CBY-3>
<aircraft_BV-141>a191302bdfb1faff1c6f2dd8a5494381</aircraft_BV-141>
<aircraft_BV-170>258b971dd3041a49a816a2150d7e7125</aircraft_BV-170>
<aircraft_C-160-Transall>695ce9bf3221055eecd24be01acb57e2</aircraft_C-160-Transall>
<aircraft_C-2A>3c341ded96ce7c8832738c34c5c115f8</aircraft_C-2A>
<aircraft_C130>c954a3ab900676c0cbabb1bada93754b</aircraft_C130>
<aircraft_c150>270cabd6289080468d29a807f612cb4c</aircraft_c150>
<aircraft_c172r>60bb07c7cefe930145d4b199b63842a7</aircraft_c172r>
<aircraft_c182>fd61954ffdd247b47fec0fc9074aa40b</aircraft_c182>
<aircraft_c182rg>171f7d74d45a50804c8111f5fab29543</aircraft_c182rg>
<aircraft_c310>604cd9887e8f1c9011581348feca1e3c</aircraft_c310>
<aircraft_c310u3a>80756d598e81a6a09217da9025e6284f</aircraft_c310u3a>
<aircraft_C460>b465d263b244c5860ce010371032b5d3</aircraft_C460>
<aircraft_C561>60cb1a6effe4e0023edd1bfdc109aed3</aircraft_C561>
<aircraft_C684>e2881ea7546775db6847bb3890c04a03</aircraft_C684>
<aircraft_Campini-Caproni-N1>68ec43ed98164bef020452e3758ec22f</aircraft_Campini-Caproni-N1>
<aircraft_CanberraBI8>a865e922bec69cf8a6fe1f8d53dbc71b</aircraft_CanberraBI8>
<aircraft_Cap10B>4a7cb6a6f5f6d71d5eb2da025b42d71f</aircraft_Cap10B>
<aircraft_Cap10C>bd103f5fa8a8ac980b8c4ed3a041ff6b</aircraft_Cap10C>
<aircraft_Caproni-C22J>d4eb3933d210d1a8f1deaf8b43a65960</aircraft_Caproni-C22J>
<aircraft_Caproni-Ca3>0ad6cdbf91f37b6c71f94268914d2615</aircraft_Caproni-Ca3>
<aircraft_Caproni-Stipa>d94119914089db0f7b6d43ddf20cb302</aircraft_Caproni-Stipa>
<aircraft_Caravelle>826b017ad5bc1c77c65959367f41415f</aircraft_Caravelle>
<aircraft_Carreidas>4cc78b3c9c421c382b4e197de6589535</aircraft_Carreidas>
<aircraft_Caudron-G3>6c8b251c720301a00276f91db736ee85</aircraft_Caudron-G3>
<aircraft_Caudron-G4>28ebd3b1236a53a0b15bf9c6f5cc79d6</aircraft_Caudron-G4>
<aircraft_Cessna-208-Caravan>edbaa02c5b837b9522ad8d0fd7da81e8</aircraft_Cessna-208-Caravan>
<aircraft_Cessna-421-Golden-Eagle>e16b7b135dbe3fa75539931c950116b6</aircraft_Cessna-421-Golden-Eagle>
<aircraft_Cessna337>bf3b60a808daefd7b7374f934e7b10bf</aircraft_Cessna337>
<aircraft_ch47>d46d6e08cd90412088abffe2dbd03982</aircraft_ch47>
<aircraft_ch53e>55d564ff1b335a723d144e423b9a3c10</aircraft_ch53e>
<aircraft_Cirrus-SR22>a3bbd80a8c11bea16f567eafa898db8f</aircraft_Cirrus-SR22>
<aircraft_Citation>c6f74c5596f959608e1810004abba534</aircraft_Citation>
<aircraft_Citation-Bravo>a6743e193bb01776107fec98595555e4</aircraft_Citation-Bravo>
<aircraft_CitationX>8bf718df53a6af7777f087a302641061</aircraft_CitationX>
<aircraft_Coanda-1910>b66f175629a52396dd1db3f1718d2028</aircraft_Coanda-1910>
<aircraft_colditz>77100ce686eee7ae2b5950df44a38709</aircraft_colditz>
<aircraft_Commonwealth-Ca-12>f132805e11b1c1e60908080b9b6533ad</aircraft_Commonwealth-Ca-12>
<aircraft_ComperSwift>8b227cd83d5f1f3b3b44bb7b46714349</aircraft_ComperSwift>
<aircraft_Concorde>566f1dc35ae741cdeee125111f1e0c20</aircraft_Concorde>
<aircraft_Convair-XFY-1-Pogo>633550eae44633a9b23777ffab527f1b</aircraft_Convair-XFY-1-Pogo>
<aircraft_couzinet70>d8fa7f026fc404ad20b7c7f6a11619ee</aircraft_couzinet70>
<aircraft_cri-cri>bc2267347bc48ba2377926a7a6515274</aircraft_cri-cri>
<aircraft_CRJ-200>0d500b113ae2d633e5f0bf36a1d19fd9</aircraft_CRJ-200>
<aircraft_CRJ700-family>d935f718bed4a71069122fe5214ecd2e</aircraft_CRJ700-family>
<aircraft_Curtiss-Jenny>6062a91295fbf99801e65197a71451c5</aircraft_Curtiss-Jenny>
<aircraft_Curtiss-Model-F>8ca56323ab3db01ec034f231490a7702</aircraft_Curtiss-Model-F>
<aircraft_Curtiss-P40>a0d00a78d80e4a621a1cfb55c0658fe3</aircraft_Curtiss-P40>
<aircraft_D510>8b09cc7658164d311f4e70e36f463cde</aircraft_D510>
<aircraft_D520>b967ca884dd02b37ad9c247d31bdf1c7</aircraft_D520>
<aircraft_DaSH>f9c33778a3805892fbd0e6de35e54e91</aircraft_DaSH>
<aircraft_Dassault-Mystere-IV>387fd1c59b2e5934ffcd888df39b7174</aircraft_Dassault-Mystere-IV>
<aircraft_Dauphin>bdc3b2e695db1588827d000b55bbebda</aircraft_Dauphin>
<aircraft_DC-10-30>1d37211f993a920b0806b95db0f8ea7c</aircraft_DC-10-30>
<aircraft_dc2>77f9e6a9e1647dcd012966af7df1d4be</aircraft_dc2>
<aircraft_dc6>dbfd9548db8318098daa75733171a18e</aircraft_dc6>
<aircraft_dc8-63>70cff7394ced9ab348653ad82ece3c10</aircraft_dc8-63>
<aircraft_dc8-73>26883edc54c7a02e208ce51e7b964e2e</aircraft_dc8-73>
<aircraft_Deperdussin>00fc8120294619b97ccf0e04a6145c1f</aircraft_Deperdussin>
<aircraft_DerKleineUhu>9003650773fd4933b40089d146484045</aircraft_DerKleineUhu>
<aircraft_Deuche>033799e2157ac9ffc6ac04fcdfeafe04</aircraft_Deuche>
<aircraft_DG-101G>02e81c7a33551c2581f8d5767e464518</aircraft_DG-101G>
<aircraft_DH-106>f7ac35642502a83a265f7b6594650279</aircraft_DH-106>
<aircraft_DH-88>be3e5fcef3000c72a2d85fb9eb827793</aircraft_DH-88>
<aircraft_DH-89>c745759b0e259323b20ba2e535284e7d</aircraft_DH-89>
<aircraft_DH-91>8b24f65ff28f7c66e65bcf7025582575</aircraft_DH-91>
<aircraft_dhc1>14b8d09e2debfdfd9cac81b8b67c9498</aircraft_dhc1>
<aircraft_dhc2>ff6f3470289772182d931daa00f6057f</aircraft_dhc2>
<aircraft_dhc3>a0506714e972c2a58f745c6bd7cc4fe2</aircraft_dhc3>
<aircraft_dhc4>4a792858aa65aada7cb91a47a9cf8c5d</aircraft_dhc4>
<aircraft_dhc6>81fb6e7b8ff50d43180bb758d1a56121</aircraft_dhc6>
<aircraft_dhc8>cca58285c8c814dfe923aaec656b1d9c</aircraft_dhc8>
<aircraft_Diamond-Da40>26885d6e6a849ad9dd54829baa26daee</aircraft_Diamond-Da40>
<aircraft_Diamond-Da42>e9992fcecbc66640a932c1c8fb7e71ae</aircraft_Diamond-Da42>
<aircraft_DO-228>8915f9465c563740f9f8f2cf32f1dd74</aircraft_DO-228>
<aircraft_DO-26>80757f34ea04417b6b30d65092ce50ab</aircraft_DO-26>
<aircraft_DO-335>ba8bbc9e04405db298beb9c24c6200c3</aircraft_DO-335>
<aircraft_DO-X>41356deabb2cd689393f36b96123a330</aircraft_DO-X>
<aircraft_Douglas-Dc3>b57c14a1791a20bccbf23db826a22dbb</aircraft_Douglas-Dc3>
<aircraft_Douglas-Dolphin>578771e25e6d7d81e5574d8cd1d19de0</aircraft_Douglas-Dolphin>
<aircraft_DR400>01c814d7ddeb0adcee0ed58022ebf6a8</aircraft_DR400>
<aircraft_DR400-dauphin>259cd05cfbf4b80b2cb4be07cf4bf781</aircraft_DR400-dauphin>
<aircraft_Dragonfly>012f8917ef6d7ec50d8a73c0508e5b47</aircraft_Dragonfly>
<aircraft_Dromader>9f77b8fbf981c4d761d8c497b6ef0868</aircraft_Dromader>
<aircraft_Dunne-D.5>48795402cda50957be7b7504b4d82389</aircraft_Dunne-D.5>
<aircraft_E-2C>d015100dfb5381135d221f41b293584d</aircraft_E-2C>
<aircraft_E3B>894c16ccfa5aed2778c7be4873947b69</aircraft_E3B>
<aircraft_eastbourne_mono>a99c8114ca48074fea2c675a8e6908e0</aircraft_eastbourne_mono>
<aircraft_ec130>684d979f81bf15b2adf47b52d6ca21f7</aircraft_ec130>
<aircraft_ec135>39631381049db9e54655c499f91bfb31</aircraft_ec135>
<aircraft_Embraer-ERJ-145>ef5ed515fe8f93876137bb6b27f3b158</aircraft_Embraer-ERJ-145>
<aircraft_ercoupe>bdaa474d4be6e51b21266ce0c8782c2c</aircraft_ercoupe>
<aircraft_Etrich-Taube>f6ba735798172b43abf417c80c1c4db4</aircraft_Etrich-Taube>
<aircraft_eurofighter>0f915d06528b1cc2dcc16f7be3b9ab37</aircraft_eurofighter>
<aircraft_extra500>72a8b154cda42a2ec507b6a4c604afcb</aircraft_extra500>
<aircraft_F-106-dart>84bfa325c11d56920062e8516bfc146e</aircraft_F-106-dart>
<aircraft_F-117>ba904d06c2ddb28a7fd3f95ac344de7a</aircraft_F-117>
<aircraft_f-14b>3c0963e6203c4a6315155012bbbb8096</aircraft_f-14b>
<aircraft_F-15>43f556905826c6ad5c80af409eb8a76c</aircraft_F-15>
<aircraft_F-35B>e1875c6efdc7ffe1160d8e64ac5f5fd7</aircraft_F-35B>
<aircraft_F-86>ea67ec6bb6c981dbbd391003f997c6ef</aircraft_F-86>
<aircraft_F-8E-Crusader>41b4502a287018e27402925094324209</aircraft_F-8E-Crusader>
<aircraft_f16>25805162fbd9d4d00e09c814f0beef9b</aircraft_f16>
<aircraft_f18>45264d8293d22533f56f571283940754</aircraft_f18>
<aircraft_F4U>fb47e4425240141a45818dcdc8060a4b</aircraft_F4U>
<aircraft_F6F-Hellcat>b4fcbc6e73565001d25f3cd64fb85a77</aircraft_F6F-Hellcat>
<aircraft_F7F-Tigercat>0ea6ad997b8595f97530d9aed5529ec9</aircraft_F7F-Tigercat>
<aircraft_F80C>9a7c5ac1aabe992abf14fd4b53c1712c</aircraft_F80C>
<aircraft_F9F-Panther>305fc09e91c52fefd2b67d6925baff38</aircraft_F9F-Panther>
<aircraft_fa223>3746de4faf66266399a9273321088ce2</aircraft_fa223>
<aircraft_Fairchild-C119>ec397cdc0f61d78ecc28d2cc564becd6</aircraft_Fairchild-C119>
<aircraft_Fairchild-Metroliner>3248a3f496cc146fcd95c61ec2538ae7</aircraft_Fairchild-Metroliner>
<aircraft_Fairey-Gannet>96e43cd67c0c8b9fd6e158a3ee46fbdc</aircraft_Fairey-Gannet>
<aircraft_Falcon-50>6d78633d200d8f945be6400027116539</aircraft_Falcon-50>
<aircraft_Farman-III>3e0a4af617e2064e78cee25e1d8af653</aircraft_Farman-III>
<aircraft_Farman-IV>42f45908ac131a855f66e63c09279562</aircraft_Farman-IV>
<aircraft_Fiat-G55>15f03458e112d4d7d3ff674dc20286c2</aircraft_Fiat-G55>
<aircraft_Fiat-G91>a3854718af2cf6c4c0512a166e283b4c</aircraft_Fiat-G91>
<aircraft_FK9MK2>24144321fdadaf71e81f8b014ad0e16b</aircraft_FK9MK2>
<aircraft_fkdr1>2294512dc1cdb63a8b90a21ba48875c7</aircraft_fkdr1>
<aircraft_flash2a>c56ee7fbdb10b1ba979d019cc26972cf</aircraft_flash2a>
<aircraft_Focke-Wulf-F19-ente>8bd5f800b24dbfc37f59fe368a748af1</aircraft_Focke-Wulf-F19-ente>
<aircraft_Focke-Wulf-Ta.154>f926af126c01eabd3ceb0398b178519a</aircraft_Focke-Wulf-Ta.154>
<aircraft_Fokker-Eindecker-EIII>29cd9e7ea06489595979f3df518813dd</aircraft_Fokker-Eindecker-EIII>
<aircraft_Fokker-G1>ea6025e2b6cdffc86764c5ee5a949c9a</aircraft_Fokker-G1>
<aircraft_Fokker-S-11>c3f68417e01ab653e66131bd446f8940</aircraft_Fokker-S-11>
<aircraft_Fokker-Spin>2fc955ad2ecb4ba0a7899097e7e4b226</aircraft_Fokker-Spin>
<aircraft_fokker100>83874804ebae4b77f6ac92f55c19ba91</aircraft_fokker100>
<aircraft_fokker50>da5fc6e9761203e6dd26dc3f01a2fe68</aircraft_fokker50>
<aircraft_followme>6b17d6d7bc78b5424420d47c0d737fa9</aircraft_followme>
<aircraft_Ford-Trimotor>83743f288a09c89716ac2a2e212b11bc</aircraft_Ford-Trimotor>
<aircraft_Fouga-Magister>866329f60e90f3404a6bace54e733b73</aircraft_Fouga-Magister>
<aircraft_fw190>449953e8d06e61e78e94e520d8fbc3e3</aircraft_fw190>
<aircraft_Fw200>5179bd127ee44112ec06887e322725aa</aircraft_Fw200>
<aircraft_Fw61>049759aaa0c615f71b0e1e2d683cb3ba</aircraft_Fw61>
<aircraft_G-164>977f70220ecee03ef7367b940956122a</aircraft_G-164>
<aircraft_Gee-Bee>bf993f8a5499538d2b5f5f5ec0c7574d</aircraft_Gee-Bee>
<aircraft_Gloster-Gladiator>65223229f5f8adc17c534412fb1b2bc8</aircraft_Gloster-Gladiator>
<aircraft_Gloster-Meteor>9905dc7569bc1e9cf750e47cc138dbeb</aircraft_Gloster-Meteor>
<aircraft_Gloster-Whittle>ef530cb8d0f3b53b83d993f4284bc4c3</aircraft_Gloster-Whittle>
<aircraft_Gotha-G-V>d18ed659fb34df8e078b36d0156de731</aircraft_Gotha-G-V>
<aircraft_Grob-Astir>57ada6ce17e8dda569e49ef29a517b90</aircraft_Grob-Astir>
<aircraft_Grob-G109>65c28732f4909889ca9739953c7b2032</aircraft_Grob-G109>
<aircraft_Grob-G115>82ca3e94ee5a1ee711fbc73e7ab99645</aircraft_Grob-G115>
<aircraft_Grob-Gf200>b80921cb1ec91813ba6912abf8d3d73c</aircraft_Grob-Gf200>
<aircraft_Grumman-American-AA1>40f6523b7cc0aff71281820d54bdaa0f</aircraft_Grumman-American-AA1>
<aircraft_H-21C-Shawnee>515e08d2a12b2cc1891f23e086aa5933</aircraft_H-21C-Shawnee>
<aircraft_H1-Racer>d8250d2d9f842108ffed965ced81ab64</aircraft_H1-Racer>
<aircraft_H4-Hercules>34ea914ec8c9f7c85ba3c243c6d0f981</aircraft_H4-Hercules>
<aircraft_Handley-Page-Halifax>837d0bc1db372b8d18e251fb63aa13ea</aircraft_Handley-Page-Halifax>
<aircraft_Hansajet>98a417480a3126432d9214fe0efb83c9</aircraft_Hansajet>
<aircraft_harrier>568eeccd7ffc3b08937fdf2da81a972a</aircraft_harrier>
<aircraft_Harrier-GR1>8f90009d9f8c66ba0dafc1c05ff2c685</aircraft_Harrier-GR1>
<aircraft_Harrier-GR3>b3d6038ff416a64372b663e9f3ccc137</aircraft_Harrier-GR3>
<aircraft_Hawker-Siddeley-Nimrod>e78cd169d9423dc9a9126d51fbeeb91e</aircraft_Hawker-Siddeley-Nimrod>
<aircraft_He-111>febb50152f339e23040815432e8fd6d4</aircraft_He-111>
<aircraft_He162>a27b2dd3efe6a362d135d55eca70d134</aircraft_He162>
<aircraft_Heinkel-He-111>941ab65d0ee6a8c0578e87b8d881ffc0</aircraft_Heinkel-He-111>
<aircraft_Heinkel-He-177>3bc698cc3b8937609e715c12fb135ca0</aircraft_Heinkel-He-177>
<aircraft_Heinkel-He-178>8a646c02ac858485f683301e5d98adb5</aircraft_Heinkel-He-178>
<aircraft_Heinkel-He-280>f4656701178b9d1eea30aa73b6a96ea2</aircraft_Heinkel-He-280>
<aircraft_Heston-Type5>11ef72971dce2d4b47f9899fabc4e591</aircraft_Heston-Type5>
<aircraft_HM-14>aa1c16c7731e99ebc6cd536ce26daa14</aircraft_HM-14>
<aircraft_Hornet>5dacabf98fe85149246cd5fc9bae6c39</aircraft_Hornet>
<aircraft_Horsa>1ddf68bca0c4a97d263a2d1718f87d2e</aircraft_Horsa>
<aircraft_Horten-Ho-IX>e8e04eb1d9bd25e270944775d8cb4100</aircraft_Horten-Ho-IX>
<aircraft_HS-P-75>90f738b3a6362f787e2170cb3d7317f0</aircraft_HS-P-75>
<aircraft_Hughes-XF11>bcf549f662ba17ac5896ef38b824f13e</aircraft_Hughes-XF11>
<aircraft_Hunter>608118d1e8019c92a22c275b8ce02c4a</aircraft_Hunter>
<aircraft_HUP-Retriever>5a2683f3d5a170495dc0ed3ed8cfa3f2</aircraft_HUP-Retriever>
<aircraft_Hurricane>0f64845ba2b2a4bc6a5f5637d261b93b</aircraft_Hurricane>
<aircraft_Icaro_MRX13>5f873b418694a01d049664ae58ad69a8</aircraft_Icaro_MRX13>
<aircraft_IL-2>cdc9eeae48d8760204735cf3dfdfbec9</aircraft_IL-2>
<aircraft_j22>14d705864d455ec73ca9c373f6d61d58</aircraft_j22>
<aircraft_J3Cub>f978f4a979edc6b3ac3c6b0cbd631c83</aircraft_J3Cub>
<aircraft_j7w>b777fc0d1a2c85ce6c0a03dfd90df48b</aircraft_j7w>
<aircraft_JA37>ef141db8c2469b1421c8e74f018ee8a4</aircraft_JA37>
<aircraft_Jaguar>7a0a5d5f93e34dd40fcdce3f06848908</aircraft_Jaguar>
<aircraft_JAS39-Gripen>ed3685660909e7e831d7711a2cc7b7b0</aircraft_JAS39-Gripen>
<aircraft_jeep>59341e0675583a826c34c625ba277345</aircraft_jeep>
<aircraft_jetman>67a0cbf1e934dd6552cf3f231ed65964</aircraft_jetman>
<aircraft_Jodel-D140>0cfed1923e5d2b849760df5ced30a175</aircraft_Jodel-D140>
<aircraft_JT-5B>0650d1a62cce431fa07e64bf8845a904</aircraft_JT-5B>
<aircraft_Ju-87>91a6f9e779d641b451efa777b6f81e81</aircraft_Ju-87>
<aircraft_Ju-88>ebdd6f04edccd2205bcaed1e845b567d</aircraft_Ju-88>
<aircraft_ju52>ee7f03a89cabb1370183f8a88dad1e9d</aircraft_ju52>
<aircraft_Junkers-F13>f88670ae7d834818ba14d71a7e0036e3</aircraft_Junkers-F13>
<aircraft_Junkers-G.38ce>7ad891738873394a7626882fd86e2031</aircraft_Junkers-G.38ce>
<aircraft_Junkers-Ju-390>be9047b6412830adcf9a7d68cb4574d1</aircraft_Junkers-Ju-390>
<aircraft_Junkers-W34>b5e96c226c4a2277b34dee97efc1d960</aircraft_Junkers-W34>
<aircraft_K-7>cb160921e2c703bbbdafcb51d49c266f</aircraft_K-7>
<aircraft_K5Y1>f72439b0db6a44fde139cb7651c28207</aircraft_K5Y1>
<aircraft_Ka-50>96aae67efd76fb6bfce1a97b1fbdbefd</aircraft_Ka-50>
<aircraft_Katana>151fbc5f85a7acd78039d2f074901028</aircraft_Katana>
<aircraft_Kawasaki-Ki-61-Hien>4ab8429c7200f96c144439fe50cda12d</aircraft_Kawasaki-Ki-61-Hien>
<aircraft_KC135>28519bdf05d7b1c5601ebfe9b7d95c0d</aircraft_KC135>
<aircraft_Ki-84>fbee5f8f188262cf1e09c168dd1014db</aircraft_Ki-84>
<aircraft_KM>3031820f648fe2fb15f8c9d64c104387</aircraft_KM>
<aircraft_kodiak>947daecf702214b7708c8d7df872366b</aircraft_kodiak>
<aircraft_L-1011-500>14670bbba47068cc5914c399c51a20e3</aircraft_L-1011-500>
<aircraft_l39>1d42f9adf23bf70ef1f9ba1695b9f794</aircraft_l39>
<aircraft_La-5>75204b0421e9835bf3ac3d2a0d198163</aircraft_La-5>
<aircraft_Lancair-235>6fbd208db0830b462fe2d105d1924f1e</aircraft_Lancair-235>
<aircraft_LATE-29>5ad79d5b9a17f3ac79b71722547fb6ff</aircraft_LATE-29>
<aircraft_Late-631>421b4ec83fe86c82e0bb952d3ee08780</aircraft_Late-631>
<aircraft_Leduc-022>2d3c15a8151e86b497900f6873b1875b</aircraft_Leduc-022>
<aircraft_Lightning>b80a9a8c89b05c4fa22a314ea56b32ab</aircraft_Lightning>
<aircraft_Lionceau>93a573bcf722ce69de872674b3f9dd27</aircraft_Lionceau>
<aircraft_Lockheed-Martin-FA-22A-Raptor>97c2da3770e378b72637b09c0475156f</aircraft_Lockheed-Martin-FA-22A-Raptor>
<aircraft_Lockheed-NF104>572acc2315b077411699eba35c0655d1</aircraft_Lockheed-NF104>
<aircraft_Lockheed-NF104A>41347e33250b355077aba64c671a44ce</aircraft_Lockheed-NF104A>
<aircraft_Lockheed-P38>53cd0af0a81de17378a7d3201c31dbb9</aircraft_Lockheed-P38>
<aircraft_Lockheed-SR71>99485aa18c25c0e6537334d63ccfe2c6</aircraft_Lockheed-SR71>
<aircraft_Lockheed-U-2S>b00db640f9f0f490b0bfa7d6d8b40163</aircraft_Lockheed-U-2S>
<aircraft_Lockheed-Vega>04e530018ec557294dd90128fc0c4a56</aircraft_Lockheed-Vega>
<aircraft_Lockheed1049>99539707fa1c283b6513be48996d8d14</aircraft_Lockheed1049>
<aircraft_Lockheed1049h>8da4141b5716e4321d1d5dcf3cfd30e6</aircraft_Lockheed1049h>
<aircraft_Long-EZ>6e5a8b2abc701632f9b9ab7a839eee4d</aircraft_Long-EZ>
<aircraft_Lynx-WG13>9add8ac0325547a52fa53e03b06d23b9</aircraft_Lynx-WG13>
<aircraft_M-XE>1978498650f9f5ae335cfd702a6d16f6</aircraft_M-XE>
<aircraft_Macchi-Castoldi-MC72>6952026a71d24cf0b11baca0320ab087</aircraft_Macchi-Castoldi-MC72>
<aircraft_Macchi-M33>90dc0d1bce4c19822312f51be82e9c98</aircraft_Macchi-M33>
<aircraft_marchetti>b6959644da3e1acbdd2f63af0cc529f0</aircraft_marchetti>
<aircraft_Martin-Baker-MB5>5c21bdb968a38b57b911aa998b9db99d</aircraft_Martin-Baker-MB5>
<aircraft_MB326>1a61bc6d32a3ed512b51535c46dc6991</aircraft_MB326>
<aircraft_MD-312-Flamant>be65efca7b7d7fc246c373e391996978</aircraft_MD-312-Flamant>
<aircraft_MD11>e772e7fae851948c6f6b19c0191821aa</aircraft_MD11>
<aircraft_ME-209-V1>3de79c61240e8e04a24d95c707a61a2b</aircraft_ME-209-V1>
<aircraft_ME-262>9960374b772e64e5ad75e0d3b6e12f08</aircraft_ME-262>
<aircraft_ME-262HGIII>3dfa621d920cecce3585b0f1ccb6be72</aircraft_ME-262HGIII>
<aircraft_me163>687309052c27966bd4d3bbd023237c17</aircraft_me163>
<aircraft_me323>0d615e9e715d3d4e150e836fbf43f426</aircraft_me323>
<aircraft_Messerschmitt-BF110>39b9d8b0a4aafa4e1b25992520deb011</aircraft_Messerschmitt-BF110>
<aircraft_Messerschmitt-Libelle>ed7ad8c54b6c2d9d1727e85a1a198a31</aircraft_Messerschmitt-Libelle>
<aircraft_Messerschmitt-P1101>3b989b232dd121eff6b0b230e9e85f6c</aircraft_Messerschmitt-P1101>
<aircraft_MFI-9>a566bad5dc6de5bc8d782c4f292e34ed</aircraft_MFI-9>
<aircraft_MiG-15>9bb9d2c8983b99f4f74e063f3d1e3479</aircraft_MiG-15>
<aircraft_MiG-21bis>d749c64a1fa96fbb0f13fc3d41b646e9</aircraft_MiG-21bis>
<aircraft_Mig-29>c6b9271b94abdf0770612a5cf4555f91</aircraft_Mig-29>
<aircraft_Mil-Mi-12>e1d83cafee3b3cecfdc3e473913df264</aircraft_Mil-Mi-12>
<aircraft_Mil-Mi-24>9fe6b04de733a20290141310f02abdcf</aircraft_Mil-Mi-24>
<aircraft_Mirage-2000>7bf582dfc110cfe38d616b1cdeed91ee</aircraft_Mirage-2000>
<aircraft_mirage2000>faa0e38bdadaadb61fa28e968f8a2122</aircraft_mirage2000>
<aircraft_Mirage_F1>dc188baadc7e6b3033845cfd48a14163</aircraft_Mirage_F1>
<aircraft_MirageIII>9f814e7ec8180ca71bbaf721d9337e70</aircraft_MirageIII>
<aircraft_MirageIV>a969aedf03beddd8ee89367d6179e1a4</aircraft_MirageIV>
<aircraft_mosquito>15eac7459f9aeafabdce72df42a4ba69</aircraft_mosquito>
<aircraft_MPCarrier>280758b9c9b1ec90f2010f1b1ab06ba7</aircraft_MPCarrier>
<aircraft_MRJ>ad879791f1e9d0e2d719d6a4518bbe2c</aircraft_MRJ>
<aircraft_MS-406>4507e58972e6bc69ba4f46ea3db455ec</aircraft_MS-406>
<aircraft_Nakajima-B5N>02e681d40a2427610dd55c643e89b01d</aircraft_Nakajima-B5N>
<aircraft_Nieuport-11>701b0401fb152e87a40c8b5babe87798</aircraft_Nieuport-11>
<aircraft_Noratlas>b177adbf225feca2f7d39f80d5acc352</aircraft_Noratlas>
<aircraft_Nord-1405-Gerfaut-II>a862bcf397791708ef2e0441282b2b69</aircraft_Nord-1405-Gerfaut-II>
<aircraft_Nord-2502>c6f4dc65ba8177e50ef5742b3ecb52b7</aircraft_Nord-2502>
<aircraft_Nordstern>6df28cb4a7d5e8907391c3ed8e70b6e0</aircraft_Nordstern>
<aircraft_North-American-T28D-Trojan>5fee1165f23a11eeca4d24d766117377</aircraft_North-American-T28D-Trojan>
<aircraft_North-American-T6-Texan>7ee82c752779d1c51f7b92660006aad2</aircraft_North-American-T6-Texan>
<aircraft_Northrop-P61>23a394d7e36aa653bff9b32fc9548250</aircraft_Northrop-P61>
<aircraft_Northrop-xb35>e4ec374be03638c10a88f351e8f09bad</aircraft_Northrop-xb35>
<aircraft_ogel>26e51eabb21a9a71f1b5a685e3061843</aircraft_ogel>
<aircraft_OH-1>49259a0e7725bb2c6809e1aae15e8fac</aircraft_OH-1>
<aircraft_OH-58D>40801a1693b0b8bd33178d4a5bf67765</aircraft_OH-58D>
<aircraft_ornithopter>7b0c70f7b8de3e1a5c19d32c36fa7d00</aircraft_ornithopter>
<aircraft_OV10>74faff4f12efb353ccc61689fe96c46c</aircraft_OV10>
<aircraft_P-38-Lightning>43c98dfe30fecc4c2448dc51750154ee</aircraft_P-38-Lightning>
<aircraft_P130UL>ea0a540d06226687e3409c1226a1cc1d</aircraft_P130UL>
<aircraft_P180>ab8760c0219835fe97dcbbf698b39fa4</aircraft_P180>
<aircraft_P47>cc9b6238b260d924338d2c4ee2dafc95</aircraft_P47>
<aircraft_p51d>7caa4abbdb5dba23edbdc02cf2693909</aircraft_p51d>
<aircraft_pa22>da2990b33cef4afe7d629530b274632a</aircraft_pa22>
<aircraft_pa24-250>65a95dd87096e2377dff6fe917befb8a</aircraft_pa24-250>
<aircraft_pa28-161>02f4a01e218da00e8969d4ae52c84193</aircraft_pa28-161>
<aircraft_PaperAirplane>2b7fbfc1efdf6ab2663e8b3d7cd3daed</aircraft_PaperAirplane>
<aircraft_Parachutist>79da74f4e265f5290b4cf35b740663a7</aircraft_Parachutist>
<aircraft_paraglider>6531e09545716af63e4ef5cf8feb8ec1</aircraft_paraglider>
<aircraft_payen-pa100>2f86aa5353798f3a4202e403bfa12c02</aircraft_payen-pa100>
<aircraft_payen-pa350cd>b6e5e2bb9985effc63bdcb2177ec681b</aircraft_payen-pa350cd>
<aircraft_PBY-Catalina>937f55e89ec3df58c2d0339f9a1dd622</aircraft_PBY-Catalina>
<aircraft_PC-12>70352371bec5bee2af6bfa7fceb7da5e</aircraft_PC-12>
<aircraft_PC-21>a53d16394c2492eb0a713ecfd8dbaf8e</aircraft_PC-21>
<aircraft_PC-6>b4fbd66018b94d83d11e3e6e7e0fac1d</aircraft_PC-6>
<aircraft_PC-9M>7c90665c0c85a3e81b15a0ea69befeeb</aircraft_PC-9M>
<aircraft_pc7>6eea7be83224abc9a1c3da0ce2fe6c82</aircraft_pc7>
<aircraft_Percival-Mew-Gull>e2e0f33e2d38ad747f5c738230439ad6</aircraft_Percival-Mew-Gull>
<aircraft_Piaggio-P166>66de4194f057e4a5248d19c5d51f88ca</aircraft_Piaggio-P166>
<aircraft_Piaggio-Pegna-Pc-7>6944e2533d7ddca2752df6300a281b16</aircraft_Piaggio-Pegna-Pc-7>
<aircraft_Pioneer-200>8e89696bf062126e4fe969a65ea5da1f</aircraft_Pioneer-200>
<aircraft_Piper-PA-18>466c8c681f2c6c942668d769e79defba</aircraft_Piper-PA-18>
<aircraft_Piper-PA-28>f7f176d0ff24d09134c43f0e0bc57d5b</aircraft_Piper-PA-28>
<aircraft_Piper-PA-32>601545618b8fe3c210b4514a25242faf</aircraft_Piper-PA-32>
<aircraft_pittss1c>427efb1a07d99ca6c99698de322b7d74</aircraft_pittss1c>
<aircraft_Polikarpov-I16>3926f7b7e584ad63327a622dbac60564</aircraft_Polikarpov-I16>
<aircraft_Pond-Racer>46e6876c63888a593dd46307b7fe0965</aircraft_Pond-Racer>
<aircraft_Potez-630>228dab05bac8112a51265a509d28adc3</aircraft_Potez-630>
<aircraft_Pterodactyl>aa747cdb68e4ce5bcf3fcf3a7fa9b371</aircraft_Pterodactyl>
<aircraft_Pterosaur>fec9ddaa76f650624821341e07c32ef5</aircraft_Pterosaur>
<aircraft_pushback>8fa3ff17dbf4f5216d2b038af30b6d4b</aircraft_pushback>
<aircraft_Quickie>9e12e7ae2a644e77749efb5d5c4d0917</aircraft_Quickie>
<aircraft_R22>7c66503ed0253f16ad021be72e4abfa7</aircraft_R22>
<aircraft_R44>4db8a423cab299263b5139e0b44c4884</aircraft_R44>
<aircraft_RAF-S-E-5>267a979bb7fcadac5698365c158f8fbf</aircraft_RAF-S-E-5>
<aircraft_rah-66>14d8af5d3bc22ac49c5bdfcb8f63c9d8</aircraft_rah-66>
<aircraft_rallye-MS893>7afb876e7a2e7b7bfaa8619bf0c07265</aircraft_rallye-MS893>
<aircraft_Rascal>640eafc8068633c0e48ed3a569d18870</aircraft_Rascal>
<aircraft_RV-6A>27238520cd1123eb6e832489ed6d5a65</aircraft_RV-6A>
<aircraft_Ryan-Navion>e64d386ede9f5d1ab93bbe212246086f</aircraft_Ryan-Navion>
<aircraft_Ryan-PT22>dee77f1d0d3de7f0ce6859006e0ba642</aircraft_Ryan-PT22>
<aircraft_Ryan-SoSL>93e380e1b639a5d063be34521ef058a1</aircraft_Ryan-SoSL>
<aircraft_S-51-Dragonfly>fa4c3f5a64725039c6ac69dc817d0861</aircraft_S-51-Dragonfly>
<aircraft_SaabJ35F>d9c356d0f282204a451c7acb86a0df95</aircraft_SaabJ35F>
<aircraft_santa>cd6232d913be2a512d2e8fcae806afad</aircraft_santa>
<aircraft_Saunders-Roe-Princess>a6cef52c80b2fd0ebc43e26183d9a668</aircraft_Saunders-Roe-Princess>
<aircraft_seahawk>792aa8e491c51b10898600e5fce883fd</aircraft_seahawk>
<aircraft_SeaVixen>21e9817040f8a9ab9160745591915f28</aircraft_SeaVixen>
<aircraft_SenecaII>a769ea7ad74deb9a793966b98be001a0</aircraft_SenecaII>
<aircraft_sf25b>664ad64136e6958a39b292ec54607037</aircraft_sf25b>
<aircraft_sgs233>86308422b554356c850dffb9d0c90b2a</aircraft_sgs233>
<aircraft_Short-Stirling>96a0604d6e963d36a35e919f3ca01310</aircraft_Short-Stirling>
<aircraft_Short_Empire>868a7faef6fb3bca64a0bcb19b32840c</aircraft_Short_Empire>
<aircraft_shuttle>4e24a9c27d36afaec32256a211bef2c3</aircraft_shuttle>
<aircraft_SIAI-Marchetti-S.205R>2771caeaa310c1a6970e95c0ea403f3a</aircraft_SIAI-Marchetti-S.205R>
<aircraft_SIAI-Marchetti-SF.260>dcab556a830e493703640fd1fdad70eb</aircraft_SIAI-Marchetti-SF.260>
<aircraft_Sikorsky-76C>679c00028ac62b9aa3368840147170b5</aircraft_Sikorsky-76C>
<aircraft_Sikorsky-S38>3856921a90f947ec2f3e70fa23a1f6ea</aircraft_Sikorsky-S38>
<aircraft_Sikorsky-S58>9abb2fc4e373ab4431920fdaf45d8a87</aircraft_Sikorsky-S58>
<aircraft_Sky-sportster>d9b9c033f30335a81558a201810f862e</aircraft_Sky-sportster>
<aircraft_Skyranger>0a7450c02b7ff3de085087668ba975e7</aircraft_Skyranger>
<aircraft_Skyvan>712723a74eaa5f47d905c5938d1ecfa3</aircraft_Skyvan>
<aircraft_SM-55>dad894bca78456b5e2ba2e2005d2f29a</aircraft_SM-55>
<aircraft_sm79>626844492e56226455fa3a399f41c9e9</aircraft_sm79>
<aircraft_snowplow>e9eb491ec0bf4d3ad2c2690b94a9be95</aircraft_snowplow>
<aircraft_Socata-ST10>37b95c63434f398743ebbdfd2bee8089</aircraft_Socata-ST10>
<aircraft_sopwithCamel>7792f06b71703a39936f75eb1f0f1e05</aircraft_sopwithCamel>
<aircraft_SpaceShip-One>d082a2f287fc96ade10753e47cff2977</aircraft_SpaceShip-One>
<aircraft_SpaceShuttle>39c46f24941da46177122a83f119e8b7</aircraft_SpaceShuttle>
<aircraft_SPAD-VII>f250ae8d2a2b28eb4f736aa28e8f6abf</aircraft_SPAD-VII>
<aircraft_Spitfire>ca055bf7c4d39b07a40bb465ad635146</aircraft_Spitfire>
<aircraft_spitfireIX>690b3c6a74770738d2d5173fefb48e61</aircraft_spitfireIX>
<aircraft_sr20>cbecc0a364fbe6a7aa0c0ea683ce62ea</aircraft_sr20>
<aircraft_SR71-BlackBird>29a5495e10aa160cf94b0b9a06e94b48</aircraft_SR71-BlackBird>
<aircraft_Stampe-SV4>54ed408f46a6ae86d2b609c58caa2348</aircraft_Stampe-SV4>
<aircraft_Starship>078d68204b7b7d11103f97d6067693d2</aircraft_Starship>
<aircraft_Stearman>791b0a572eba95a6d0fcfdee605b284e</aircraft_Stearman>
<aircraft_Stieglitz>7c5d4939a29bbde445fa5a51a806a600</aircraft_Stieglitz>
<aircraft_Stiletto>f469bf3d05e34508c4644c9f21adde9b</aircraft_Stiletto>
<aircraft_Storch>987d5891ea899b92697b3dbae69f4290</aircraft_Storch>
<aircraft_Su-25>fc53b9f9e774bf455099a41e44f163e0</aircraft_Su-25>
<aircraft_SU-37>f0f2e74ef26520d16f11c26adcfa7244</aircraft_SU-37>
<aircraft_Submarine_Scout>57853593a2c72148f0de00faa70d67d4</aircraft_Submarine_Scout>
<aircraft_Super-Etendard>ea86ee06b4d358790036fe22ae8673a3</aircraft_Super-Etendard>
<aircraft_Super-Frelon>92a9c71fb1666816273b3283e7d02504</aircraft_Super-Frelon>
<aircraft_superguppySGT>86c50734cf3e657a4bb0646ae4848af3</aircraft_superguppySGT>
<aircraft_Supermarine-S.6B>b59d6790040c27853338b680067edc52</aircraft_Supermarine-S.6B>
<aircraft_Superwal>92158d7e55f4a892b3d3640cf0b254f0</aircraft_Superwal>
<aircraft_T-4>8518cfd8bec8278d0681f67dc7293906</aircraft_T-4>
<aircraft_T-50>2e45346a0f377bcb6adc59be3c05d72a</aircraft_T-50>
<aircraft_T37>7607a3732fee1ad3b43d44875764afe0</aircraft_T37>
<aircraft_T38>1039def0bf9d28ef2cc3a4b5649a9bcb</aircraft_T38>
<aircraft_TBM-Avenger>3118e96ceee1f63c4c5f916e48a62e3c</aircraft_TBM-Avenger>
<aircraft_Tecnam-P2006T>45daae280d68e757730051ce96933435</aircraft_Tecnam-P2006T>
<aircraft_Tecnam-P2010>d27cfef60c88f2785585db762aff50c0</aircraft_Tecnam-P2010>
<aircraft_Tecnam-P92>eefbe319cbc34fed4d63ace54f2fc1c8</aircraft_Tecnam-P92>
<aircraft_Tigre>806acc4c1616d1d940e61d27737e39f6</aircraft_Tigre>
<aircraft_TU-114>f6ce2c5a24ea1545e1d22956017e31b0</aircraft_TU-114>
<aircraft_Tu-134>66cee3c0d3e34c4bd97599c1a633c7db</aircraft_Tu-134>
<aircraft_TU-95>71c35b11bb1662bd612bc8e3e21232e5</aircraft_TU-95>
<aircraft_Tu-SB2bis-M103>50cd266f7a98b7d19ec75b9be804e715</aircraft_Tu-SB2bis-M103>
<aircraft_tu154>e5fd32dabb3412be5797805b5b00c002</aircraft_tu154>
<aircraft_tu154b>7a7bd91ea1d3c40e3f52a3453f6d5789</aircraft_tu154b>
<aircraft_UH-1>0c2692680244c3848e16c5f5cc6e525f</aircraft_UH-1>
<aircraft_UH-60>3126bd7f0dc24fb15fbaa6516bbc08d9</aircraft_UH-60>
<aircraft_V22-Osprey>1b1eb3803d01ea5dbfaee1836c9efb02</aircraft_V22-Osprey>
<aircraft_Velocity-XL>85770badb88a7a876bb828718cc4a30f</aircraft_Velocity-XL>
<aircraft_Vickers-Vanguard>1c9f328d29ee7e2453bf30a6b05939f4</aircraft_Vickers-Vanguard>
<aircraft_Vickers-Vimy>5d6709607fc95b3867fc491c0fe5e5e3</aircraft_Vickers-Vimy>
<aircraft_victor>ee0b3f5284765e02f1357f1cf7071ee1</aircraft_victor>
<aircraft_VMX22-Osprey>39f6e98033e45e3b599cdff5b72d7328</aircraft_VMX22-Osprey>
<aircraft_Vostok-1>9dc57923ec3e984723338db44460b4fe</aircraft_Vostok-1>
<aircraft_vulcanb2>f2eabbfcc31b0ab183fb4b91ba4f19c4</aircraft_vulcanb2>
<aircraft_Westland-Whirlwind>cce4ae63928058699f87b61a9604d1b1</aircraft_Westland-Whirlwind>
<aircraft_wrightFlyer1903>04d855def138064915a06781720d33cc</aircraft_wrightFlyer1903>
<aircraft_X15>a4e382d1493412f3d5cb1e06f9ec9b88</aircraft_X15>
<aircraft_x24b>c209d368e99561002a43697c0496d87d</aircraft_x24b>
<aircraft_XB-70>749a85a21354df350ddb8c50a5561b22</aircraft_XB-70>
<aircraft_XP-67>83cebd2f3cf663215a8bb97dcd38b13e</aircraft_XP-67>
<aircraft_Yak-130>b867555c6e06befe0715665c2a10931d</aircraft_Yak-130>
<aircraft_Yak-18T>e514c7719ac869a86ff466a22de3554d</aircraft_Yak-18T>
<aircraft_Yak-23>c1e1b2a685c99e73720bca83f0c01405</aircraft_Yak-23>
<aircraft_Yak-36>2db3c206f581c88c329567013d16aca3</aircraft_Yak-36>
<aircraft_yak3>62ff0d85b3b5d71c2854623bcad155cb</aircraft_yak3>
<aircraft_YardStik>44106df1f8f1145bb7f9d465a3d85233</aircraft_YardStik>
<aircraft_YF-23>bf82709deb10a369d7eaa23d623f631a</aircraft_YF-23>
<aircraft_YS-11>f32ab303e103ceeb6ca46926f2c1f510</aircraft_YS-11>
<aircraft_ZF_Navy_free_balloon>d6d11bb00006f7b6da2f4939ef06af23</aircraft_ZF_Navy_free_balloon>
<aircraft_ZivkoEdge>01893b6c69d97c42f223d95ff8595ff7</aircraft_ZivkoEdge>
<aircraft_Zlin-50lx>ec52deb7d44c5186c324ac0532ff2bc8</aircraft_Zlin-50lx>
<aircraft_ZLT-NT>60ffdd2bd30dc4a02dfca2ced49bbec5</aircraft_ZLT-NT>
<aircraft_IL-76>4a8d5a29427d179a6b0566d79555cbad</aircraft_IL-76>
<aircraft_SuperGuepard912>eedc5b614bac903c03dfdd287dc0123a</aircraft_SuperGuepard912>
<aircraft_Heinkel-He-111Z>e1f2b5c9d0a65366efd6f4840725d3c5</aircraft_Heinkel-He-111Z>
<aircraft_c182s>e307c8d98edfad2432ceea160a5b455d</aircraft_c182s>
<aircraft_Cessna-L19>3c40924714e6511a2c7c2e8d64a22e4c</aircraft_Cessna-L19>
<aircraft_Boomerang>e9c38c20924902a8cb168d69adf028c5</aircraft_Boomerang>
<aircraft_Arsenal-Delanne-10>e01bdd83f13783e98eae4d89d7c55405</aircraft_Arsenal-Delanne-10>
</PropertyList>

View File

@@ -0,0 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--Template catalog - copy and modify for your site as required-->
<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>
<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>
<description>This hangar provides aircraft officially supported and maintained by the FlightGear project, under a free-software license.</description>
<de>
<description>Auf Deutsch</description>
</de>
<fr>
<description>En Francais</description>
</fr>
</template>
</PropertyList>

View File

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

305
catalog/sgprops.py Normal file
View File

@@ -0,0 +1,305 @@
# SAX for parsing
from xml.sax import make_parser, handler, expatreader
# ElementTree for writing
import xml.etree.cElementTree as ET
import re, os
class Node(object):
def __init__(self, name = '', index = 0, parent = None):
self._parent = parent
self._name = name
self._value = None
self._index = index
self._children = []
@property
def value(self):
return self._value
@value.setter
def value(self, v):
self._value = v
@property
def name(self):
return self._name
@property
def index(self):
return self._index
@property
def parent(self):
return self._parent
def getChild(self, n, i=None, create = False):
if i is None:
i = 0
# parse name as foo[999] if necessary
m = re.match(R"(\w+)\[(\d+)\]", n)
if m is not None:
n = m.group(1)
i = int(m.group(2))
for c in self._children:
if (c.name == n) and (c.index == i):
return c
if create:
c = Node(n, i, self)
self._children.append(c)
return c
else:
raise IndexError("no such child:" + str(n) + " index=" + str(i))
def addChild(self, n):
# adding an existing instance
if isinstance(n, Node):
n._parent = self
n._index = self.firstUnusedIndex(n.name)
self._children.append(n)
return n
i = self.firstUnusedIndex(n)
# create it via getChild
return self.getChild(n, i, create=True)
def firstUnusedIndex(self, n):
usedIndices = frozenset(c.index for c in self.getChildren(n))
i = 0
while i < 1000:
if i not in usedIndices:
return i
i += 1
raise RuntimeException("too many children with name:" + n)
def hasChild(self, nm):
for c in self._children:
if (c.name == nm):
return True
return False
def getChildren(self, n = None):
if n is None:
return self._children
return [c for c in self._children if c.name == n]
def getNode(self, path, cr = False):
axes = path.split('/')
nd = self
for ax in axes:
nd = nd.getChild(ax, create = cr)
return nd
def getValue(self, path, default = None):
try:
nd = self.getNode(path)
return nd.value
except:
return default
def write(self, path):
root = self._createXMLElement('PropertyList')
t = ET.ElementTree(root)
t.write(path, 'utf-8', xml_declaration = True)
def _createXMLElement(self, nm = None):
if nm is None:
nm = self.name
n = ET.Element(nm)
# value and type specification
try:
if self._value is not None:
if isinstance(self._value, basestring):
# don't call str() on strings, breaks the
# encoding
n.text = self._value
else:
# use str() to turn non-string types into text
n.text = str(self._value)
if isinstance(self._value, int):
n.set('type', 'int')
elif isinstance(self._value, float):
n.set('type', 'double')
elif isinstance(self._value, bool):
n.set('type', "bool")
except UnicodeEncodeError:
print "Encoding error with", self._value, type(self._value)
except:
print "Some other exceptiong in sgprops._createXMLElement()"
# index in parent
if (self.index != 0):
n.set('n', str(self.index))
# children
for c in self._children:
n.append(c._createXMLElement())
return n;
class ParseState:
def __init__(self):
self._counters = {}
def getNextIndex(self, name):
if name in self._counters:
self._counters[name] += 1
else:
self._counters[name] = 0
return self._counters[name]
def recordExplicitIndex(self, name, index):
if not name in self._counters:
self._counters[name] = index
else:
self._counters[name] = max(self._counters[name], index)
class PropsHandler(handler.ContentHandler):
def __init__(self, root = None, path = None, includePaths = []):
self._root = root
self._path = path
self._basePath = os.path.dirname(path)
self._includes = includePaths
self._locator = None
self._stateStack = [ParseState()]
if root is None:
# make a nameless root node
self._root = Node("", 0)
self._current = self._root
def setDocumentLocator(self, loc):
self._locator = loc
def startElement(self, name, attrs):
self._content = None
if (name == 'PropertyList'):
# still need to handle includes on the root element
if 'include' in attrs.keys():
self.handleInclude(attrs['include'])
return
currentState = self._stateStack[-1]
if 'n' in attrs.keys():
try:
index = int(attrs['n'])
except:
print "Invalid index at line:", self._locator.getLineNumber(), "of", self._path
raise IndexError("Invalid index at line:", self._locator.getLineNumber(), "of", self._path)
currentState.recordExplicitIndex(name, index)
self._current = self._current.getChild(name, index, create=True)
else:
index = currentState.getNextIndex(name)
# important we use getChild here, so that includes are resolved
# correctly
self._current = self._current.getChild(name, index, create=True)
self._stateStack.append(ParseState())
if 'include' in attrs.keys():
self.handleInclude(attrs['include'])
self._currentTy = None;
if 'type' in attrs.keys():
self._currentTy = attrs['type']
def handleInclude(self, includePath):
if includePath.startswith('/'):
includePath = includePath[1:]
p = os.path.join(self._basePath, includePath)
if not os.path.exists(p):
found = False
for i in self._includes:
p = os.path.join(i, includePath)
if os.path.exists(p):
found = True
break
if not found:
raise RuntimeError("include file not found", includePath, "at line", self._locator.getLineNumber())
readProps(p, self._current, self._includes)
def endElement(self, name):
if (name == 'PropertyList'):
return
try:
# convert and store value
self._current.value = self._content
if self._currentTy == "int":
self._current.value = int(self._content) if self._content is not None else 0
if self._currentTy == "bool":
self._current.value = self.parsePropsBool(self._content)
if self._currentTy == "double":
if self._content is None:
self._current.value = 0.0
else:
if self._content.endswith('f'):
self._content = self._content[:-1]
self._current.value = float(self._content)
except:
print "Parse error for value:", self._content, "at line:", self._locator.getLineNumber(), "of:", self._path
self._current = self._current.parent
self._content = None
self._currentTy = None
self._stateStack.pop()
def parsePropsBool(self, content):
if content == "True" or content == "true":
return True
if content == "False" or content == "false":
return False
try:
icontent = int(content)
if icontent is not None:
if icontent == 0:
return False
else:
return True;
except:
return False
def characters(self, content):
if self._content is None:
self._content = ''
self._content += content
def endDocument(self):
pass
@property
def root(self):
return self._root
def readProps(path, root = None, includePaths = []):
parser = make_parser()
locator = expatreader.ExpatLocator( parser )
h = PropsHandler(root, path, includePaths)
h.setDocumentLocator(locator)
parser.setContentHandler(h)
parser.parse(path)
return h.root
def copy(src, dest):
dest.value = src.value
# recurse over children
for c in src.getChildren() :
dc = dest.getChild(c.name, i = c.index, create = True)
copy(c, dc)

View File

@@ -0,0 +1,8 @@
<?xml version='1.0' encoding='UTF-8'?>
<PropertyList>
<sim>
<name>c150</name>
<description>Cessna 150</description>
</sim>
</PropertyList>

View File

@@ -0,0 +1,9 @@
<?xml version='1.0' encoding='UTF-8'?>
<PropertyList>
<sim>
<name>c172</name>
<description>Cessna 172P</description>
<author>Wilbur Wright</author>
</sim>
</PropertyList>

View File

@@ -0,0 +1,24 @@
<?xml version='1.0' encoding='UTF-8'?>
<PropertyList>
<sim include="settings-common.xml">
<authors>
<author n="0">
<name>Wilbur Wright</name>
<email>ww@wright.com</email>
<nick>wilburw</nick>
<description>Model, FDM and cockpit</description>
</author>
<author n="1">
<name>Orville Wright</name>
<description>Testing and systems</description>
</author>
</authors>
<tags>
<tag>fighter</tag>
<tag>1980s</tag>
<tag>glass-cockpit</tag>
</tags>
<minimum-fg-version>2017.4</minimum-fg-version>
</sim>
</PropertyList>

View File

@@ -0,0 +1,11 @@
<?xml version='1.0' encoding='UTF-8'?>
<PropertyList include="f16-common.xml">
<sim>
<exclude-from-catalog type="bool">true</exclude-from-catalog>
<name>f16-excluded</name>
<description>Fine</description>
<long-description>Blah blah blah</long-description>
<variant-of>f16a</variant-of>
</sim>
</PropertyList>

View File

@@ -0,0 +1,11 @@
<?xml version='1.0' encoding='UTF-8'?>
<PropertyList include="f16-common.xml">
<sim>
<name>f16-trainer</name>
<description>F16 Trainer</description>
<long-description>Twin-seat trainer version of the F16</long-description>
</sim>
</PropertyList>

View File

@@ -0,0 +1,36 @@
<?xml version='1.0' encoding='UTF-8'?>
<PropertyList include="f16-common.xml">
<sim>
<name>f16a</name>
<description>F16-A</description>
<long-description>The F16 is compact, light-weight multi-role fighter used around the world</long-description>
<primary-set type="bool">true</primary-set>
<rating>
<FDM type="int">3</FDM>
<systems type="int">1</systems>
<cockpit type="int">2</cockpit>
<model type="int">5</model>
</rating>
<previews>
<preview>
<type>exterior</type>
<splash type="bool">true</splash>
<path>Previews/exterior-1.png</path>
</preview>
<preview>
<type>exterior</type>
<splash type="bool">true</splash>
<path>Previews/exterior-f16a-2.png</path>
</preview>
<preview>
<type>panel</type>
<splash type="bool">false</splash>
<path>Previews/cockpit.png</path>
</preview>
</previews>
</sim>
</PropertyList>

View File

@@ -0,0 +1,19 @@
<?xml version='1.0' encoding='UTF-8'?>
<PropertyList include="f16-common.xml">
<sim>
<name>f16b</name>
<description>F16-B</description>
<long-description>The F16-B is an upgraded version of the F16A.</long-description>
<variant-of>f16a</variant-of>
<authors n="0">
<author n="0">
<name>James T Kirk</name>
<email>shatner@enterprise.com</email>
<nick>starlover</nick>
<description>Everything</description>
</author>
</authors>
</sim>
</PropertyList>

View File

@@ -0,0 +1,11 @@
<?xml version='1.0' encoding='UTF-8'?>
<PropertyList include="f16-common.xml">
<sim>
<name>f16broken</name>
<!-- <description></description> -->
<description></description>
<long-description>Blah blah blah</long-description>
<variant-of>f16a</variant-of>
</sim>
</PropertyList>

View File

@@ -0,0 +1,10 @@
<?xml version='1.0' encoding='UTF-8'?>
<PropertyList include="f16-common.xml">
<sim>
<name>f16c</name>
<description>F16-C</description>
<long-description>The F16-C is an upgraded version of the F16A.</long-description>
<variant-of>f16a</variant-of>
</sim>
</PropertyList>

View File

@@ -0,0 +1,12 @@
<?xml version='1.0' encoding='UTF-8'?>
<!-- this file exists to test including + overlaying in the set XML -->
<PropertyList>
<views>
<view n="0">
<foo>dsdddd</foo>
</view>
</views>
</PropertyList>

View File

@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<PropertyList>
<sim>
<!-- found in the F-15 XML -->
<uhf n="[0]">
<frequencies>
<selected-mhz type="int">225000</selected-mhz>
</frequencies>
</uhf>
</sim>
</PropertyList>

View File

@@ -0,0 +1,25 @@
<?xml version='1.0' encoding='UTF-8'?>
<PropertyList>
<value type="int">42</value>
<thing>
<value>apple</value>
</thing>
<thing>
<value>lemon</value>
</thing>
<thing>
<value>pear</value>
</thing>
<!-- ensure explicit indexing works -->
<sub>
<value n="1">a</value>
<value n="3">b</value>
<value n="99">c</value>
<value>d</value> <!-- should be assigned n=100 -->
</sub>
</PropertyList>

View File

@@ -0,0 +1,20 @@
<?xml version='1.0' encoding='UTF-8'?>
<PropertyList include="root-include.xml">
<value type="int">33</value>
<thing>
<value>apple</value>
</thing>
<thing>
<value>lemon</value>
</thing>
<sub include ="sub-include.xml">
<!-- different index to avoid being included over -->
<widget n="100" type="int">99</widget>
</sub>
</PropertyList>

View File

@@ -0,0 +1,22 @@
<?xml version='1.0' encoding='UTF-8'?>
<PropertyList>
<value type="int">42</value>
<value type="int">43</value>
<value type="int">44</value>
<sim>
<views>
</views>
<preview>
</preview>
<preview>
</preview>
</sim>
<payload>
<weight>
</weight>
</payload>
</PropertyList>

View File

@@ -0,0 +1,6 @@
<?xml version='1.0' encoding='UTF-8'?>
<PropertyList>
<widget type="int">42</widget>
<widget type="int">43</widget>
<widget type="int">44</widget>
</PropertyList>

197
catalog/test_catalog.py Executable file
View File

@@ -0,0 +1,197 @@
#!/usr/bin/python
import unittest
import sgprops
import os
import catalog
import lxml.etree as ET
catalog.quiet = True
class UpdateCatalogTests(unittest.TestCase):
def test_scan_set(self):
info = catalog.scan_set_file("testData/Aircraft/f16", "f16a-set.xml", ["testData/OtherDir"])
self.assertEqual(info['id'], 'f16a')
self.assertEqual(info['name'], 'F16-A')
self.assertEqual(info['primary-set'], True)
self.assertEqual(info['variant-of'], None)
self.assertEqual(info['rating_FDM'], 3)
self.assertEqual(info['rating_model'], 5)
self.assertEqual(len(info['tags']), 3)
self.assertEqual(info['minimum-fg-version'], '2017.4')
authorsArray = info['authors']
self.assertNotIn('author', info)
self.assertEqual(len(authorsArray), 2)
author0 = authorsArray[0]
self.assertEqual(author0['name'], 'Wilbur Wright')
self.assertEqual(author0['nick'], 'wilburw')
self.assertEqual(author0['email'], 'ww@wright.com')
author1 = authorsArray[1]
self.assertEqual(author1['name'], 'Orville Wright')
# self.assertNotIn('nick', author1)
# self.assertNotIn('email', author1)
def test_scan_dir(self):
(pkg, variants) = catalog.scan_aircraft_dir("testData/Aircraft/f16", ["testData/OtherDir"])
self.assertEqual(pkg['id'], 'f16a')
f16trainer = next(v for v in variants if v['id'] == 'f16-trainer')
self.assertEqual(len(variants), 3)
self.assertEqual(pkg['minimum-fg-version'], '2017.4')
# test variant relatonship between
self.assertEqual(pkg['variant-of'], None)
self.assertEqual(pkg['primary-set'], True)
self.assertEqual(f16trainer['variant-of'], None)
self.assertEqual(f16trainer['primary-set'], False)
f16b = next(v for v in variants if v['id'] == 'f16b')
self.assertEqual(f16b['variant-of'], 'f16a')
self.assertEqual(f16b['primary-set'], False)
authorsArray = f16b['authors']
self.assertNotIn('author', f16b)
self.assertEqual(len(authorsArray), 2)
author0 = authorsArray[0]
self.assertEqual(author0['name'], 'James T Kirk')
self.assertEqual(author0['nick'], 'starlover')
f16c = next(v for v in variants if v['id'] == 'f16c')
self.assertEqual(f16c['variant-of'], 'f16a')
self.assertEqual(f16c['primary-set'], False)
authorsArray = f16c['authors']
self.assertNotIn('author', f16c)
self.assertEqual(len(authorsArray), 2)
# test some older constructs for compat
def test_scan_dir_legacy(self):
(pkg, variants) = catalog.scan_aircraft_dir("testData/Aircraft/c172", [])
self.assertEqual(pkg['id'], 'c172')
self.assertEqual(pkg['author'], 'Wilbur Wright')
def test_extract_previews(self):
info = catalog.scan_set_file("testData/Aircraft/f16", "f16a-set.xml", ["testData/OtherDir"])
previews = info['previews']
self.assertEqual(len(previews), 3)
self.assertEqual(2, len([p for p in previews if p['type'] == 'exterior']))
self.assertEqual(1, len([p for p in previews if p['type'] == 'panel']))
self.assertEqual(1, len([p for p in previews if p['path'] == 'Previews/exterior-1.png']))
def test_extract_tags(self):
info = catalog.scan_set_file("testData/Aircraft/f16", "f16a-set.xml", ["testData/OtherDir"])
tags = info['tags']
def test_node_creation(self):
(pkg, variants) = catalog.scan_aircraft_dir("testData/Aircraft/f16", ["testData/OtherDir"])
catalog_node = ET.Element('PropertyList')
catalog_root = ET.ElementTree(catalog_node)
pkgNode = catalog.make_aircraft_node('f16', pkg, variants, "http://foo.com/testOutput/")
catalog_node.append(pkgNode)
# write out so we can parse using sgprops
# yes we are round-tripping via the disk, if you can improve
# then feel free..
if not os.path.isdir("testOutput"):
os.mkdir("testOutput")
cat_file = os.path.join("testOutput", 'catalog_fragment.xml')
catalog_root.write(cat_file, encoding='utf-8', xml_declaration=True, pretty_print=True)
parsed = sgprops.readProps(cat_file)
parsedPkgNode = parsed.getChild("package")
self.assertEqual(parsedPkgNode.name, "package");
self.assertEqual(parsedPkgNode.getValue('id'), pkg['id']);
self.assertEqual(parsedPkgNode.getValue('dir'), 'f16');
self.assertEqual(parsedPkgNode.getValue('url'), 'http://foo.com/testOutput/f16.zip');
self.assertEqual(parsedPkgNode.getValue('thumbnail'), 'http://foo.com/testOutput/thumbnails/f16_thumbnail.jpg');
self.assertEqual(parsedPkgNode.getValue('thumbnail-path'), 'thumbnail.jpg');
self.assertEqual(parsedPkgNode.getValue('name'), pkg['name']);
self.assertEqual(parsedPkgNode.getValue('description'), pkg['description']);
self.assertEqual(parsedPkgNode.getValue('minimum-fg-version'), "2017.4");
parsedVariants = parsedPkgNode.getChildren("variant")
self.assertEqual(len(parsedVariants), 3)
# author data verification
self.assertFalse(parsedPkgNode.hasChild('author'));
parsedAuthors = parsedPkgNode.getChild("authors").getChildren('author')
self.assertEqual(len(parsedAuthors), 2)
author1 = parsedAuthors[0]
self.assertEqual(author1.getValue("name"), "Wilbur Wright")
self.assertEqual(author1.getValue("nick"), "wilburw")
self.assertEqual(author1.getValue("email"), "ww@wright.com")
author2 = parsedAuthors[1]
self.assertEqual(author2.getValue("name"), "Orville Wright")
f16ANode = parsedPkgNode
self.assertEqual(f16ANode.getValue('name'), 'F16-A');
for index, pv in enumerate(parsedVariants):
var = variants[index]
self.assertEqual(pv.getValue('name'), var['name']);
self.assertEqual(pv.getValue('description'), var['description']);
if (var['id'] == 'f16-trainer'):
self.assertEqual(pv.getValue('variant-of'), '_primary_')
# self.assertEqual(pv.getValue('author'), "Wilbur Wright");
elif (var['id'] == 'f16b'):
self.assertEqual(pv.getValue('variant-of'), 'f16a')
self.assertEqual(pv.getValue('description'), 'The F16-B is an upgraded version of the F16A.')
# variant author verification
parsedAuthors = pv.getChild("authors").getChildren('author')
author1 = parsedAuthors[0]
self.assertEqual(author1.getValue("name"), "James T Kirk")
self.assertEqual(author1.getValue("nick"), "starlover")
self.assertEqual(author1.getValue("email"), "shatner@enterprise.com")
self.assertEqual(author1.getValue("description"), "Everything")
def test_minimalAircraft(self):
# test an aircraft with a deliberately spartan -set.xml file with
# most interesting data missing
(pkg, variants) = catalog.scan_aircraft_dir("testData/Aircraft/c150", ["testData/OtherDir"])
catalog_node = ET.Element('PropertyList')
catalog_root = ET.ElementTree(catalog_node)
pkgNode = catalog.make_aircraft_node('c150', pkg, variants, "http://foo.com/testOutput/")
catalog_node.append(pkgNode)
if not os.path.isdir("testOutput2"):
os.mkdir("testOutput2")
cat_file = os.path.join("testOutput2", 'catalog_fragment.xml')
catalog_root.write(cat_file, encoding='utf-8', xml_declaration=True, pretty_print=True)
parsed = sgprops.readProps(cat_file)
parsedPkgNode = parsed.getChild("package")
self.assertEqual(parsedPkgNode.getValue('id'), pkg['id'])
self.assertEqual(parsedPkgNode.getValue('dir'), 'c150')
self.assertEqual(parsedPkgNode.getValue('url'), 'http://foo.com/testOutput/c150.zip')
self.assertFalse(parsedPkgNode.hasChild('thumbnail'))
self.assertFalse(parsedPkgNode.hasChild('thumbnail-path'));
self.assertEqual(parsedPkgNode.getValue('name'), pkg['name']);
self.assertFalse(parsedPkgNode.hasChild('description'));
self.assertFalse(parsedPkgNode.hasChild('author'));
self.assertFalse(parsedPkgNode.hasChild('minimum-fg-version'));
self.assertFalse(parsedPkgNode.hasChild('variant'));
if __name__ == '__main__':
unittest.main()

61
catalog/test_sgprops.py Executable file
View File

@@ -0,0 +1,61 @@
import unittest
import types
import sgprops
class SGProps(unittest.TestCase):
def test_parse(self):
parsed = sgprops.readProps("testData/props1.xml")
self.assertEqual(parsed.getValue("value"), 42)
self.assertEqual(type(parsed.getValue("value")), types.IntType)
valNode = parsed.getChild("value")
self.assertEqual(valNode.parent, parsed)
self.assertEqual(valNode.name, "value")
self.assertEqual(valNode.value, 42)
self.assertEqual(type(valNode.value), types.IntType)
with self.assertRaises(IndexError):
missingNode = parsed.getChild("missing")
things = parsed.getChildren("thing")
self.assertEqual(len(things), 3)
self.assertEqual(things[0], parsed.getChild("thing", 0));
self.assertEqual(things[1], parsed.getChild("thing", 1));
self.assertEqual(things[2], parsed.getChild("thing", 2));
self.assertEqual(things[0].getValue("value"), "apple");
self.assertEqual(things[1].getValue("value"), "lemon");
self.assertEqual(things[2].getValue("value"), "pear");
def test_create(self):
pass
def test_invalidIndex(self):
with self.assertRaises(IndexError):
parsed = sgprops.readProps("testData/bad-index.xml")
def test_include(self):
parsed = sgprops.readProps("testData/props2.xml")
# test that value in main file over-rides the one in the include
self.assertEqual(parsed.getValue("value"), 33)
# but these come from the included file
self.assertEqual(parsed.getValue("value[1]"), 43)
self.assertEqual(parsed.getValue("value[2]"), 44)
subNode = parsed.getChild("sub")
widgets = subNode.getChildren("widget")
self.assertEqual(len(widgets), 4)
self.assertEqual(widgets[2].value, 44)
self.assertEqual(widgets[3].value, 99)
if __name__ == '__main__':
unittest.main()

322
catalog/update-catalog.py Executable file
View File

@@ -0,0 +1,322 @@
#!/usr/bin/python
import argparse
import datetime
import hashlib # md5
import lxml.etree as ET
import os
import re
import shutil
import subprocess
import time
import sgprops
import sys
import catalogTags
import catalog
CATALOG_VERSION = 4
parser = argparse.ArgumentParser()
parser.add_argument("--update", help="Update/pull SCM source",
action="store_true")
parser.add_argument("--no-update",
help="Disable updating from SCM source",
action="store_true")
parser.add_argument("--clean", help="Force regeneration of all zip files",
action="store_true")
parser.add_argument("dir", help="Catalog directory")
args = parser.parse_args()
includes = []
# xml node (robust) get text helper
def get_xml_text(e):
if e != None and e.text != None:
return e.text
else:
return ''
# 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 )
match = re.search('Last Changed Date: (\d+)\-(\d+)\-(\d+)', result)
if match:
rev_str = match.group(1) + match.group(2) + match.group(3)
return int(rev_str)
# find the most recent mtime within a directory subtree
def scan_dir_for_change_date_mtime(path):
maxsec = 0
names = os.listdir(path)
for name in names:
fullname = os.path.join(path, name)
if name == '.' or name == '..':
pass
elif os.path.isdir( fullname ):
mtime = scan_dir_for_change_date_mtime( fullname )
if mtime > maxsec:
maxsec = mtime
else:
mtime = os.path.getmtime( fullname )
if mtime > maxsec:
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')
md5sum = hashlib.md5(f.read()).hexdigest()
f.close()
return md5sum
def copy_previews_for_variant(variant, package_name, package_dir, previews_dir):
if not 'previews' in variant:
return
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']
dir = os.path.dirname(preview_dst)
if not os.path.isdir(dir):
os.makedirs(dir)
if os.path.exists(preview_src):
shutil.copy2(preview_src, preview_dst)
def copy_previews_for_package(package, variants, package_name, package_dir, previews_dir):
copy_previews_for_variant(package, package_name, package_dir, previews_dir)
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
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:
print "skipping:", name, "(no -set.xml files)"
return
print "%s:" % name,
package_node = catalog.make_aircraft_node(name, package, variants, download_base)
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:", 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( 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 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()
# file_size = os.path.getsize(file)
# return (md5, file_size)
if not os.path.isdir(args.dir):
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')
md5sum_file = os.path.join(args.dir, 'md5sum.xml')
if os.path.exists(md5sum_file):
md5sum_tree = ET.parse(md5sum_file, parser)
md5sum_root = md5sum_tree.getroot()
else:
md5sum_root = ET.Element('PropertyList')
md5sum_tree = ET.ElementTree(md5sum_root)
scm_list = config_node.findall('scm')
upload_node = config_node.find('upload')
download_base = get_xml_text(config_node.find('download-url'))
if not download_base.endswith('/'):
download_base += '/'
output_dir = get_xml_text(config_node.find('local-output'))
if output_dir == '':
output_dir = os.path.join(args.dir, 'output')
if not os.path.isdir(output_dir):
os.mkdir(output_dir)
thumbnail_dir = os.path.join(output_dir, 'thumbnails')
if not os.path.isdir(thumbnail_dir):
os.mkdir(thumbnail_dir)
previews_dir = os.path.join(output_dir, 'previews')
if not os.path.isdir(previews_dir):
os.mkdir(previews_dir)
tmp = os.path.join(args.dir, 'zip-excludes.lst')
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
continue
includes.append(path)
# freshen repositories
if args.no_update:
print 'Skipping repository updates.'
else:
cwd = os.getcwd()
for scm in scm_list:
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
subprocess.call(['svn', 'update', repo_path])
elif repo_type == 'git':
print 'GIT pull:', repo_path
os.chdir(repo_path)
subprocess.call(['git','pull'])
elif repo_type == 'no-scm':
print "No update of unmannaged files:", repo_path
else:
print "Unknown scm type:", scm, repo_path
os.chdir(cwd)
# names of zip files we want (so we can identify/remove orphans)
valid_zips = []
# create the catalog tree
catalog_node = ET.Element('PropertyList')
catalog_root = ET.ElementTree(catalog_node)
# include the template configuration
for child in template_node:
catalog_node.append(child)
# scan repositories for catalog information
for scm in scm_list:
repo_type = get_xml_text(scm.find('type'))
repo_path = get_xml_text(scm.find('path'))
skip_nodes = scm.findall('skip')
skip_list = []
for s in skip_nodes:
skip_list.append(get_xml_text(s))
print 'skip list:', skip_list
names = os.listdir(repo_path)
for name in sorted(names, key=lambda s: s.lower()):
if name in skip_list:
print "skipping:", name
continue
# process each aircraft in turn
# print 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
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

View File

@@ -0,0 +1,9 @@
--- apt.dat 2016-12-08 18:43:50.000000000 +0100
+++ apt.dat-000 2016-12-08 18:56:02.310707492 +0100
@@ -1,5 +1,5 @@
I
-1000 Version - data cycle 2013.10, build 20131335, metadata AptXP1000. Copyright <20> 2013, Robin A. Peel (robin@x-plane.com). This data 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 2 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 ("AptNavGNULicence.txt"); if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
+1000 Version - data cycle 2013.10, build 20131335, metadata AptXP1000, further modified by the FlightGear team (cf. <https://sourceforge.net/p/flightgear/fgmeta/ci/next/tree/changes-in-dat-files/apt.dat>). Copyright <20> 2013, Robin A. Peel (robin@x-plane.com). This data 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 2 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 ("AptNavGNULicence.txt"); if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
1 15 1 0 VHXX [X] CLOSED Kai Tak

View File

@@ -0,0 +1,11 @@
--- apt.dat 2016-12-08 18:56:02.310707492 +0100
+++ apt.dat-001 2016-12-08 19:01:00.082169377 +0100
@@ -926129,7 +926129,7 @@
19 45.98520090 -065.30815534 1 WS
19 45.98509598 -065.29620316 1 WS
19 45.98776000 -065.29826459 1 WS
-51 12320
+51 12320 CTAF/UNICOM
1 1000 0 1 3MN7 Haven
100 22.86 3 0 0.25 0 0 0 15 45.49243037 -094.12309108 0.00 0.00 1 0 0 0 33 45.48749963 -094.11966060 0.00 0.00 1 0 0 0

21
compile-scripts/README.md Normal file
View File

@@ -0,0 +1,21 @@
This is the scripts I (James) use to maintain my builds on each platform.
They're much less clever than 'download and compile' but they do enough for me
and probably most other people, if you tweak the paths accordingly. The Mac
and Linux ones require Ruby (which is usually pre-installed). There are no
instructions - if you can't figure out what these do from reading the scripts,
you almost certainly should not be using them!
They all assume a top-level folder which contains
checkouts of simgear, flightgear, fgdata, OpenSceneGraph (into a dir named
'osg') and the windows-3rd-party dir in the case of Windows. It's assumed
you copy the script to that same dir, edit paths and run from there.
The Mac and Linux scripts will do the checkout for you - the Windows is not
so smart because Window batch scripts are not my friend.
On Mac you will need to grab the 3rdparty-dependency-build from Jenkins, or
build PLIB manually yourself, either should be straightforward. For all other
dependencies on Mac / Linux use your package manager / Homebrew.
Files will be installed into a subdir called 'dist'

130
compile-scripts/commands-linux.rb Executable file
View File

@@ -0,0 +1,130 @@
#!/usr/bin/ruby
require 'fileutils'
require 'optparse'
include FileUtils
baseDir = Dir.pwd
gitArgs = ""
qtPath = ""
doPull = false
doCMake = false
doInit = false
doClean = false
doPackage = false
cmakeCommonArgs = "-DCMAKE_INSTALL_PREFIX=#{baseDir}/dist -DSIMGEAR_SHARED=1"
cmakeFGArgs = ""
sfUser = "jmturner"
OptionParser.new do |opts|
opts.banner = "Usage: commands.rb [options]"
opts.on("", "--init", "Setup empty") do |v|
doInit = v
end
opts.on("-p", "--[no-]pull", "Pull from Git") do |v|
doPull = v
end
opts.on("-c", "--cmake", "Run Cmake") do |v|
doCMake = v
end
opts.on("", "--clean", "Clean build dirs") do |v|
doClean = v
end
opts.on("-r", "--rebase", "Rebase when pulling") do |v|
gitArgs += "--rebase"
end
opts.on("", "--qt=QTPATH", "Set Qt path when running cmake") do |v|
qtPath = v
end
end.parse!(ARGV)
def cloneEverything()
puts "Initialising"
if File.exist?("#{Dir.pwd}/simgear") or File.exist?("#{Dir.pwd}/flightgear")
puts "Checkout already exists"
return
end
`git clone ssh://#{sfUser}@git.code.sf.net/p/flightgear/simgear simgear`
`git clone ssh://#{sfUser}@git.code.sf.net/p/flightgear/flightgear flightgear`
`git clone ssh://#{sfUser}@git.code.sf.net/p/flightgear/fgdata fgdata`
`git clone https://github.com/openscenegraph/osg.git osg`
end
def createDirs()
`mkdir -p sgbuild`
`mkdir -p fgbuild`
`mkdir -p osg_release_build`
end
# path is needed for Cmake & running macdeployqt
if qtPath != ""
ENV['PATH'] = "#{ENV['PATH']}:#{qtPath}/bin"
end
if doClean
puts "Cleaning build dirs"
`rm -r sgbuild`
`rm -r fgbuild`
`rm -r osg_release_build`
createDirs()
end
if doInit
puts "Doing init"
cloneEverything()
createDirs();
end
if doPull
puts "Pulling from Git"
dataPull = Thread.new do
puts "Syncing FGData"
Dir.chdir "#{baseDir}/fgdata"
`git pull #{gitArgs}`
end
Dir.chdir "#{baseDir}/simgear"
`git pull #{gitArgs}`
Dir.chdir "#{baseDir}/flightgear"
`git pull #{gitArgs}`
end
Dir.chdir "#{baseDir}/osg_release_build"
if doCMake or !File.exist?("#{Dir.pwd}/Makefile")
`cmake ../osg -DCMAKE_INSTALL_PREFIX=#{baseDir}/dist`
end
puts "Building OpenSceneGraph"
`make`
`make install`
Dir.chdir "#{baseDir}/sgbuild"
if doCMake or !File.exist?("#{Dir.pwd}/Makefile")
`cmake ../simgear #{cmakeCommonArgs}`
end
puts "Building SimGear"
`make`
`make install`
Dir.chdir "#{baseDir}/fgbuild"
if doCMake or !File.exist?("#{Dir.pwd}/Makefile")
if qtPath != ""
cmakeFGArgs = '-DENABLE_QT=1'
end
`cmake ../flightgear #{cmakeCommonArgs} #{cmakeFGArgs}`
end
puts "Building FlightGear"
`make`
`make install`
puts "All done."

135
compile-scripts/commands-mac.rb Executable file
View File

@@ -0,0 +1,135 @@
#!/usr/bin/ruby
require 'fileutils'
require 'optparse'
include FileUtils
baseDir = Dir.pwd
gitArgs = ""
qtPath = ""
doPull = false
doCMake = false
doInit = false
doClean = false
doPackage = false
cmakePlatformArgs = "-G Xcode"
cmakeCommonArgs = "-DCMAKE_INSTALL_PREFIX=#{baseDir}/dist"
cmakeSGArgs = "-DSIMGEAR_SHARED=1"
cmakeFGArgs = "-DSIMGEAR_SHARED=1"
sfUser = "jmturner"
OptionParser.new do |opts|
opts.banner = "Usage: commands.rb [options]"
opts.on("", "--init", "Setup empty") do |v|
doInit = v
end
opts.on("-p", "--[no-]pull", "Pull from Git") do |v|
doPull = v
end
opts.on("-c", "--cmake", "Run Cmake") do |v|
doCMake = v
end
opts.on("", "--clean", "Clean build dirs") do |v|
doClean = v
end
opts.on("-r", "--rebase", "Rebase when pulling") do |v|
gitArgs += "--rebase"
end
opts.on("", "--qt=QTPATH", "Set Qt path when running cmake") do |v|
qtPath = v
end
end.parse!(ARGV)
def cloneEverything()
puts "Initialising"
if File.exist?("#{Dir.pwd}/simgear") or File.exist?("#{Dir.pwd}/flightgear")
puts "Checkout already exists"
return
end
`git clone ssh://#{sfUser}@git.code.sf.net/p/flightgear/simgear simgear`
`git clone ssh://#{sfUser}@git.code.sf.net/p/flightgear/flightgear flightgear`
`git clone git@github.com:zakalawe/osg.git osg`
end
def createDirs()
`mkdir -p sgbuild`
`mkdir -p fgbuild`
`mkdir -p osg_fg_build`
end
# path is needed for Cmake & running macdeployqt
if qtPath != ""
ENV['PATH'] = "#{ENV['PATH']}:#{qtPath}/bin"
end
if doClean
puts "Cleaning build dirs"
`rm -r sgbuild`
`rm -r fgbuild`
`rm -r osg_fg_build`
end
if doInit
puts "Doing init"
cloneEverything()
end
if doPull
puts "Pulling from Git"
dataPull = Thread.new do
puts "Syncing FGData"
Dir.chdir "#{baseDir}/fgdata"
`git pull #{gitArgs}`
end
Dir.chdir "#{baseDir}/simgear"
`git pull #{gitArgs}`
Dir.chdir "#{baseDir}/flightgear"
`git pull #{gitArgs}`
end
createDirs()
Dir.chdir "#{baseDir}/osg_fg_build"
if doCMake or !File.exist?("#{Dir.pwd}/Makefile")
`cmake ../osg #{cmakeCommonArgs}`
end
puts "Building OpenSceneGraph"
`make -j4`
`make install`
Dir.chdir "#{baseDir}/sgbuild"
if doCMake or !File.exist?("#{Dir.pwd}/SimGear.xcodeproj")
`cmake ../simgear #{cmakePlatformArgs} #{cmakeCommonArgs} #{cmakeSGArgs}`
end
puts "Building SimGear Debug"
`xcodebuild -target install -configuration Debug`
puts "Building SimGear Release"
`xcodebuild -target install -configuration Release`
Dir.chdir "#{baseDir}/fgbuild"
if doCMake or !File.exist?("#{Dir.pwd}/FlightGear.xcodeproj")
if qtPath != ""
cmakeFGArgs = '-DENABLE_QT=1'
end
`cmake ../flightgear #{cmakePlatformArgs} #{cmakeCommonArgs} #{cmakeFGArgs}`
end
puts "Building FlightGear Debug"
`xcodebuild -target fgfs -configuration Debug`
puts "Building FlightGear Release"
`xcodebuild -target fgfs -configuration Release`
puts "All done."

View File

@@ -0,0 +1,52 @@
SET PATH=%PATH%;%ProgramFiles%\CMake\bin
SET QT5SDK64=C:\Qt\5.6\msvc2015_64
SET CMAKE_TOOLCHAIN="Visual Studio 14 Win64"
SET ROOT_DIR=%CD%
md osgbuild
md sgbuild
md fgbuild
REM md fgrun-build
cd simgear
git pull --rebase
cd ..\flightgear
git pull --rebase
REM cd ..\fgrun
REM git pull --rebase
cd ..\osgbuild
cmake ..\osg -G %CMAKE_TOOLCHAIN% ^
-DACTUAL_3RDPARTY_DIR:PATH=%ROOT_DIR%\windows-3rd-party\msvc140\3rdparty.x64 ^
-DCMAKE_INSTALL_PREFIX:PATH=%ROOT_DIR%\dist ^
-DOSG_USE_UTF8_FILENAME:BOOL=ON
cmake --build . --config Release --target INSTALL
cmake --build . --config Debug --target INSTALL
cd ..\sgbuild
cmake ..\simgear -G %CMAKE_TOOLCHAIN% ^
-DMSVC_3RDPARTY_ROOT=%ROOT_DIR%\windows-3rd-party\msvc140 ^
-DOSG_FSTREAM_EXPORT_FIXED:BOOL=ON ^
-DCMAKE_INSTALL_PREFIX:PATH=%ROOT_DIR%\dist
cmake --build . --config Release --target INSTALL
cmake --build . --config Debug --target INSTALL
cd ..\fgbuild
cmake ..\flightgear -G %CMAKE_TOOLCHAIN% ^
-DMSVC_3RDPARTY_ROOT=%ROOT_DIR%\windows-3rd-party\msvc140 ^
-DCMAKE_INSTALL_PREFIX:PATH=%ROOT_DIR%\dist ^
-DCMAKE_PREFIX_PATH=%QT5SDK64% ^
-DOSG_FSTREAM_EXPORT_FIXED:BOOL=ON
cmake --build . --config Release --target INSTALL
cmake --build . --config Debug --target INSTALL
REM cd ..\fgrun-build
REM cmake ..\fgrun -G %CMAKE_TOOLCHAIN% ^
REM -DMSVC_3RDPARTY_ROOT=C:\FGFS\windows-3rd-party\msvc140 ^
REM -DCMAKE_INSTALL_PREFIX:PATH=C:\FGFS\dist
REM cmake --build . --config Release --target INSTALL
REM cmake --build . --config Debug --target INSTALL

80
create_metar_dat.py Executable file
View File

@@ -0,0 +1,80 @@
#!/usr/bin/env python3
#
# create_metar_dat.py
#
# Script to create metar.dat.gz by checking tgftp.nws.noaa.gov for stations
# that have reported recently.
#
# Usage: create_metar_dat.py [OUTPUT_FILENAME]
#
# If OUTPUT_FILENAME is omitted, creates metar.dat.gz in working directory.
#
# Copyright (c) 2016 Richard Senior
#
# 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 2
# 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, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
# MA 02110-1301, USA.
import datetime
import dateutil.parser
import gzip
import os
import re
import sys
import urllib.request
filename = "metar.dat.gz" if len(sys.argv) <= 1 else sys.argv[1]
max_age_days = 7
url = "http://tgftp.nws.noaa.gov/data/observations/metar/stations/"
now = datetime.datetime.now()
script = os.path.basename(__file__)
class ParseException(Exception):
pass
def stations():
for line in urllib.request.urlopen(url).readlines():
if b".TXT" in line:
yield line
def active_stations():
cutoff = now - datetime.timedelta(max_age_days)
icao_pattern = re.compile("[A-Z][A-Z0-9]{3}")
for station in stations():
tokens = station.split()
last_modified = tokens[2][14:25]
if dateutil.parser.parse(last_modified) > cutoff:
icao = tokens[1][16:20:].decode()
# Sanity check on parsed ICAO code.
if not icao_pattern.match(icao):
raise ParseException("Dubious ICAO code: " + icao)
yield icao
# Run through the active stations before opening the file so that a file
# is not created (or overwritten) if an exception is thrown.
active = [icao + "\n" for icao in active_stations()]
# Sanity check on the number of stations.
if len(active) < 5000:
raise ParseException("Expected more than " + str(len(active)) + " stations")
with gzip.open(filename, "wt") as f:
print("# List of airports known to have metar data available", file=f)
print("# Generated by", script, "on", now.strftime("%Y-%m-%d"), file=f)
print("#", url, file=f)
f.writelines(active)
print(script + ": Wrote", len(active), "stations to", filename)

1790
download_and_compile.sh Normal file → Executable file

File diff suppressed because it is too large Load Diff

1
fgdata Submodule

Submodule fgdata added at b6df0ded76

646
fgdata_checkers.py Normal file
View File

@@ -0,0 +1,646 @@
#!/usr/bin/env python3
from __future__ import print_function#defaults to Python 3, but should also work in 2.7
"""Functions for checking fgdata for various problems (and one for creating smaller/split versions of it)
By Rebecca Palmer"""
import os
import os.path
import re
from collections import defaultdict
import subprocess
import multiprocessing
import math
import tarfile
import tempfile
import gzip
import shutil
import time
try:
devnull=subprocess.DEVNULL#hide annoying nvcompress messages
except (AttributeError,NameError):#pre-3.3 Python
devnull=None
def path_join(*args):
"""Unlike plain os.path.join, this always uses forward slashes, and doesn't add a trailing / if the last component is empty"""
return os.path.normpath(os.path.join(*args)).replace('\\','/')
def rfilelist(path,exclude_dirs=[]):
"""Dict of files/sizes in path, including those in any subdirectories (as relative paths)"""
files=defaultdict(int)
if not os.path.exists(path):
return files
dirs=[""]
while dirs:
cdir=dirs.pop()
cdirfiles=os.listdir(path_join(path,cdir))
for file in cdirfiles:
if os.path.isdir(path_join(path,cdir,file)):
if path_join(cdir,file) not in exclude_dirs:
dirs.append(path_join(cdir,file))
else:
files[path_join(cdir,file)]=os.path.getsize(path_join(path,cdir,file))
return files
def strip_comments(text,comment_types=None,filename=None):
"""Remove comments from text
Assumes comments don't nest (including different types of comments: will be wrong for e.g. /* aaa // bbb */ will-remove-this in C++ if // are removed first)
Doesn't check for being inside a string literal, and doesn't check for line-start * in C /* ... */"""
if comment_types is None:
if filename is None:
raise TypeError("must give either filename or comment_types")
if os.path.splitext(filename)[1] in (".xml",".eff"):
comment_types=(("<!--","-->",""),)
elif os.path.splitext(filename)[1] in (".c",".cpp",".cxx",".h",".hpp",".hxx",".frag",".vert"):
comment_types=(("//","\n","\n"),("/*","*/",""))
elif os.path.splitext(filename)[1] in (".nas",):
comment_types=(("#","\n","\n"),)
else:
comment_types=[]
if type(text) in (bytes,bytearray):
comment_types=[[bytes(c,encoding="ascii") for c in ct] for ct in comment_types]
for comment_type in comment_types:
text=text.split(comment_type[0],maxsplit=1)[0]+comment_type[2].join(s.split(comment_type[1],maxsplit=1)[1] for s in text.split(comment_type[0])[1:] if comment_type[1] in s)
return text
def files_used(pattern,path,exclude_dirs=[],filelist=None,filetypes=None,relative_path=False):
"""Files used by an element matching pattern, in a file in path or filelist"""
textures=[]
if filelist is None:
filelist=rfilelist(path,exclude_dirs).keys()
if filetypes is not None:
filelist=[f for f in filelist if os.path.splitext(f)[1] in filetypes]
texfind=re.compile(pattern)
for file in filelist:
try:
f=open(path_join(path,file),'r',errors='replace')
except FileNotFoundError:
continue
for line in f:
tex=texfind.search(line)
if tex:
if relative_path:
textures.append(os.path.normpath(path_join(os.path.dirname(file),tex.group(1).replace('\\','/'))).replace('\\','/'))
else:
textures.append(os.path.normpath(tex.group(1).replace('\\','/')).replace('\\','/'))
return textures
def find_unused_textures(basedir,output_lists=True,grep_check=False,output_rsync_rules=False,output_comparison_strips=False, output_removal_commands=False,return_used_noregions=False):
"""Checks if any textures are unused (wasting space), and if any textures are only available as .dds (not recommended in the source repository, as it is a lossy-compressed format)
Set basedir to your fg-root, and enable the kind(s) of output you want:
output_lists prints lists of unused textures, and of dds-only textures
grep_check checks for possible use outside the normal directories; requires Unix shell and assumes side-by-side fgdata,flightgear,simgear
output_rsync_rules prints rsync rules for excluding unused textures from the release flightgear-data. Warning: if you use this, re-run this script regularly, in case they start being used
output_comparison_strips creates thumbnail strips, unused_duplicate.png/unused_dds.png/high_low.png, for visually checking whether same-name textures are the same (remove the unused one entirely) or different (move it to Unused); requires imagemagick or graphicsmagick
output_removal_commands creates another script, delete_unused_textures.sh, which will remove unused textures when run in a Unix shell"""
false_positives=set(['buildings-lightmap.png','buildings.png','Credits','Globe/00README.txt', 'Globe/01READMEocean_depth_1png.txt', 'Globe/world.topo.bathy.200407.3x4096x2048.png','Trees/convert.pl','Splash1.png','Splash2.png','Splash3.png','Splash4.png','Splash5.png'])#these either aren't textures, or are used where we don't check; 'unknown.rgb','Terrain/unknown.rgb' are also referenced, but already don't exist
used_textures=set(files_used(path=path_join(basedir,'Materials'),pattern=r'<(?:texture|object-mask|tree-texture).*?>(\S+?)</(texture|object-mask|tree-texture)'))|false_positives
used_textures_noregions=set(files_used(path=path_join(basedir,'Materials'),exclude_dirs=['regions'],pattern=r'<(?:texture|object-mask|tree-texture).*?>(\S+?)</(texture|object-mask|tree-texture)'))|false_positives#this pattern matches a <texture> (possibly with number), <tree-texture> or <object-mask> element
used_effectslow=set(files_used(path=path_join(basedir,'Effects'),pattern=r'image.*?>[\\/]?Textures[\\/](\S+?)</.*?image'))|set(files_used(path=path_join(basedir,'Materials'),pattern=r'<building-(?:texture|lightmap).*?>Textures[\\/](\S+?)</building-(?:texture|lightmap)'))#Effects (<image>), and Materials <building-texture>/<building-lightmap>, explicitly includes the Textures/ or Textures.high/
used_effectshigh=set(files_used(path=path_join(basedir,'Effects'),pattern=r'image.*?>[\\/]?Textures.high[\\/](\S+?)</.*?image'))|set(files_used(path=path_join(basedir,'Materials'),pattern=r'<building-(?:texture|lightmap).*?>Textures.high[\\/](\S+?)</building-(?:texture|lightmap)'))
high_tsizes=rfilelist(path_join(basedir,'Textures.high'))
high_textures=set(high_tsizes.keys())
low_tsizes=rfilelist(path_join(basedir,'Textures'),exclude_dirs=['Sky','Unused'])#sky textures are used where we don't check
low_textures=set(low_tsizes.keys())
only_high=high_textures-low_textures
used_noreg_onlyhigh=(only_high&used_textures_noregions)|used_effectshigh
used_noreg_onlyhighsize=sum(high_tsizes[t] for t in used_noreg_onlyhigh)
used_noreg_low=(low_textures&used_textures_noregions)|used_effectslow
used_noregions=used_textures_noregions|used_effectshigh|used_effectslow
used_noreg_lowsize=sum(low_tsizes[t] for t in used_noreg_low)
used_noreg_defsize=sum(low_tsizes[t] for t in (used_textures_noregions-high_textures)|used_effectslow)+sum(high_tsizes[t] for t in used_textures_noregions|used_effectshigh)
used_defsize=sum(low_tsizes[t] for t in (used_textures-high_textures)|used_effectslow)+sum(high_tsizes[t] for t in used_textures|used_effectshigh)
unused=(high_textures|low_textures)-used_textures-used_effectslow-used_effectshigh
t_size=lambda tset: sum(high_tsizes[t] for t in tset)+sum(low_tsizes[t] for t in tset)
missing=(used_textures-(high_textures|low_textures))|(used_effectslow-low_textures)|(used_effectshigh-high_textures)
if missing:
raise ValueError("Some used textures not found: "+repr(missing))
sourceless=[f for f in (high_textures|low_textures) if (f[-4:]==".dds" and f[:-4]+".png" not in high_textures and (f in high_textures or f[:-4]+".png" not in low_textures) )]+['Terrain/airport.dds']#airport.dds isn't the same as airport.png; crop-colors.dds/cropgrass-colors.dds/rock-colors.dds/forest-colors.dds also differ but only in strip width, which doesn't matter as they are 1D color strips
sourceless_used=set(sourceless)-unused
needed_as_source=[f for f in unused if (f[-4:]!=".dds" and f[:-4]+".png" in (used_textures|used_effectslow|used_effectshigh) or f[:-4]+".dds" in (used_textures|used_effectslow|used_effectshigh))]+['Runway/designation_letters.svg']
known_non_duplicates=['deciduous.png','drycrop.png','irrcrop.png','marsh1.png','gravel.png','Town.png','grass.png','mixedcrop.png','resgrid.png']+['glacier.png','rock.png','cropgrass.png']#first group real winter textures, second group unrelated textures
unused_duplicate=[f for f in unused if (f[0:14]=="Terrain.winter" and "Terrain"+f[14:] in (high_textures|low_textures) and f[15:] not in known_non_duplicates)]
unused_dds=set(f for f in (unused-set(unused_duplicate)) if (f[-4:]==".dds" and f[:-4]+".png" in (high_textures|low_textures) and f!='Terrain/airport.dds'))#airport.dds isn't the same as airport.png; crop-colors.dds/cropgrass-colors.dds/rock-colors.dds/forest-colors.dds also differ but only in strip width, which doesn't matter as they are 1D color strips
unused_other=unused-set(unused_duplicate)-set(unused_dds)-set(needed_as_source)
known_highlow_mismatch=set(['Terrain.winter/mixedcrop4.png','Terrain.winter/cropgrass3.png','Terrain.winter/drycrop4.png','Terrain.winter/irrcrop2.png','Terrain.winter/drycrop1.png','Terrain.winter/drycrop3.png','Terrain.winter/mixedcrop1.png','Terrain.winter/ mixedforest2.png','Terrain.winter/cropgrass2.png','Terrain.winter/cropgrass1.png','Terrain.winter/tundra.png','Terrain.winter/mixedforest3.png','Terrain.winter/shrub2.png','Terrain.winter/drycrop2.png','Terrain.winter/deciduous1.png','Terrain.winter/ mixedcrop3.png','Terrain.winter/naturalcrop1.png']+['Terrain.winter/tundra3.png','Terrain.winter/forest1c.png','Terrain.winter/herbtundra.png']+['Terrain/grass_rwy.dds','Terrain/cropwood.dds','Terrain/herbtundra.dds','Terrain/irrcrop.dds','Terrain/shrub.dds','Terrain.winter/mixedforest.png','Runway/pa_taxiway.png','Runway/pc_taxiway.png'])#first group are different degrees of snow cover on the same base texture, last group unrelated textures, middle group hard to tell; p{a,c}_taxiway (only low-res has side lines) are also mismatched in .dds, but as each .dds matches its size .png, only the .png needs to be kept in Unused
lowres_maybe_source=['Terrain/lava1.png','Terrain/lava2.png','Terrain/lava3.png','Terrain/sand4.png','Terrain/sand5.png','Terrain/sand6.png']#these are clearly related, but the high-res version has unnatural-looking high-frequency noise, suggesting that the low-res version might be the original: keep it
unused_dds_matchhigh=set(f for f in (unused_dds&known_highlow_mismatch) if f[:-4]+".png" not in low_textures)
unused_dds_matchlow=set(f for f in (unused_dds&known_highlow_mismatch) if f[:-4]+".png" not in high_textures)
low_unneeded=(high_textures&low_textures)-used_effectslow-unused-set(lowres_maybe_source)
low_unneeded_duplicate=low_unneeded-set(known_highlow_mismatch)
low_unneeded_nondup=low_unneeded&set(known_highlow_mismatch)
def image_check_strip(basedir,index_fname,ilist1,ilist2=None,size=128):
"""Generate two rows of thumbnails, for easy visual comparison (between the two lists given, or if a single list is given, between low and high resolution)"""
if not ilist1:
print(index_fname," empty, skipping")
return
if ilist2 is None:
ipairs=[[path_join(basedir,'Textures',f),path_join(basedir,'Textures.high',f)] for f in ilist1]
else:
ipairs=[]
for f1,f2 in zip(ilist1,ilist2):
if f1 in low_textures:
ipairs.append([path_join(basedir,'Textures',f1),path_join(basedir,'Textures',f2) if f2 in low_textures else path_join(basedir,'Textures.high',f2)])
if f1 in high_textures:
ipairs.append([path_join(basedir,'Textures.high',f1),path_join(basedir,'Textures.high',f2) if f2 in high_textures else path_join(basedir,'Textures',f2)])
ilist_f=[f[0] for f in ipairs]+[f[1] for f in ipairs]
subprocess.call(['montage','-label',"'%f'"]+ilist_f+['-tile','x2','-geometry',str(size)+'x'+str(size)]+[index_fname])
def rsync_rules(basedir,flist,include=False,high=None):
"""Output rsync rules to exclude/include the specified textures from high/low/both (high=True/False/None) resolutions"""
for f in flist:
if high!=True and f in low_textures:
print("+" if include else "-",path_join('/fgdata/Textures',f))
if high!=False and f in high_textures:
print("+" if include else "-",path_join('/fgdata/Textures.high',f))
def removal_command(basedir,flist,high=None):
"""Return command to delete the specified textures from high/low/both (high=True/False/None) resolutions"""
if not flist:
return ""
a="rm"
for f in flist:
if high!=True and f in low_textures:
a=a+" "+path_join('Textures',f)
if high!=False and f in high_textures:
a=a+" "+path_join('Textures.high',f)
a=a+"\n"
return a
def move_command(basedir,flist,high=None,comment=False):
"""Return command to move the specified textures to Unused from high/low/both (high=True/False/None) resolutions"""
if not flist:
return ""
dirset_low=set() if high==True else set(os.path.dirname(f) for f in set(flist)&low_textures)
dirset_high=set() if high==False else set(os.path.dirname(f) for f in set(flist)&high_textures)
a=""
for d in dirset_low:
a=a+("#" if comment else "")+"mv --target-directory="+path_join("Textures/Unused",d)+" "+(" ".join(path_join("Textures",f) for f in flist if (os.path.dirname(f)==d and f in low_textures)))+"\n"
for d in dirset_high:
a=a+("#" if comment else "")+"mv --target-directory="+path_join("Textures/Unused",d+".high")+" "+(" ".join(path_join("Textures.high",f) for f in flist if (os.path.dirname(f)==d and f in high_textures)))+"\n"
return a
if output_comparison_strips:
image_check_strip(basedir,"unused_duplicate.png",unused_duplicate,["Terrain"+f[14:] for f in unused_duplicate])
image_check_strip(basedir,"unused_dds.png",unused_dds,[f[:-4]+".png" for f in unused_dds])
dds_skip=set(['Runway/rwy-normalmap.dds','Water/perlin-noise-nm.dds','Water/water_sine_nmap.dds','Water/waves-ver10-nm.dds'])
used_dds_withpng=set(f for f in (high_textures|low_textures) if (f[-4:]==".dds" and f[:-4]+".png" in (high_textures|low_textures)))-unused_dds-dds_skip
print(".dds omitted from comparison strip (normal maps etc): ",dds_skip)
#used_dds_withpng different: p{a,c}_taxiway.dds and possibly more runway markings (darker),sand{4,5,6}.dds(less high-freq noise),water.dds(more high-freq noise),grass_rwy.dds (has stripes),cropwood.dds,irrcrop.dds,shrub.dds,herbtundra.dds,cropgrass.dds(unrelated)
#water-reflection.{png,dds} really are plain white (so do match), not an alpha map
image_check_strip(basedir,"used_dds.png",used_dds_withpng,[f[:-4]+".png" for f in used_dds_withpng])
image_check_strip(basedir,"high_low.png",high_textures&low_textures)
#image_check_strip(basedir,"high_low2.png",[f for f in high_textures&low_textures if (f[0:14]=="Terrain.winter" or "_taxiway." in f or "lava" in f or "sand" in f)],size=512)#closer look at the doubtful cases
if output_lists:
print("\n\nunused-winter same as normal:",sorted(unused_duplicate),"\nsize=",t_size(unused_duplicate),"\n\nunused-dds with matching png:",sorted(unused_dds),"\nsize=",t_size(unused_dds),"\n\nunused-unique:",sorted(unused_other),"\nsize=",t_size(unused_other),"\n\nnot directly used but keep as source:",sorted(needed_as_source),"\nsize=",t_size(needed_as_source),"\n\nunused low, matches high:",sorted(low_unneeded_duplicate),"\nsize=",sum(low_tsizes[f] for f in low_unneeded_duplicate),"\n\nunused low, unique:",sorted(low_unneeded_nondup),"\nsize=",sum(low_tsizes[f] for f in low_unneeded_nondup),"\n\nall non-sky textures size=",sum(high_tsizes.values())+sum(low_tsizes.values()),"used size=",used_defsize,"used no-regions size=",used_noreg_defsize,"\n\nnot found:",sorted(missing),"\n\n.dds only/highest-res:",sorted(sourceless),"\n\n.dds only/highest-res, used:",sorted(sourceless_used))
#not really meaningful after removing low-res duplicates: ,"\n\nused high-only, not regions:",sorted(used_noreg_onlyhigh),"\nsize=",used_noreg_onlyhighsize,"these+used low (i.e. minimal flightgear-data) size=",used_noreg_onlyhighsize+used_noreg_lowsize
if grep_check:
unused_f=[os.path.basename(f) for f in unused]
all_f=[os.path.basename(f) for f in (high_textures|low_textures)]
print("\n\nPossible use outside main search:")#used to set false_positives
subprocess.call(["grep","-r","-E","--exclude-dir=Aircraft","--exclude-dir=.git","-e","("+")|(".join(unused)+")",basedir,path_join(basedir,"../flightgear"),path_join(basedir,"../simgear")])#everywhere using full names
subprocess.call(["grep","-r","-E","--exclude-dir=Aircraft","--exclude-dir=Textures.high","--exclude-dir=Models","--exclude-dir=Materials","--exclude-dir=Effects","--exclude-dir=.git","-e","("+")|(".join(all_f)+")",basedir,path_join(basedir,"../flightgear"),path_join(basedir,"../simgear")])#restricted (to avoid false positives from Terrain.winter vs Terrain) using filenames
subprocess.call(["grep","-r","-E","--exclude-dir=Aircraft","--exclude-dir=Textures.high","--exclude-dir=Models","--exclude-dir=Materials","--exclude-dir=Effects","--exclude-dir=.git","-e",'[."\']dds',basedir,path_join(basedir,"../flightgear"),path_join(basedir,"../simgear")])#check for programmatic .png -> .dds swap; none found
print("\n\nUse of sourceless textures:")
subprocess.call(["grep","-r","-E","--exclude-dir=Aircraft","--exclude-dir=.git","-e","("+")|(".join(sourceless)+")",basedir,path_join(basedir,"../flightgear"),path_join(basedir,"../simgear")])
if output_rsync_rules:
print("\n\nFull flightgear-data:\n")
rsync_rules(basedir,unused)
rsync_rules(basedir,low_unneeded,high=False)
print("\n\nMinimal flightgear-data:\n")
rsync_rules(basedir,low_textures-used_noreg_low,high=False)
rsync_rules(basedir,high_textures-used_noreg_onlyhigh,high=True)
if output_removal_commands:
r_script=open('delete_unused_textures.sh','w')
r_script.write("cd "+basedir+"\n")
r_script.write("#Unused duplicates\n")
r_script.write(removal_command(basedir,unused_duplicate))
r_script.write("#Unused .dds versions\n")
r_script.write(removal_command(basedir,unused_dds-unused_dds_matchhigh,high=False))
r_script.write(removal_command(basedir,unused_dds-unused_dds_matchlow,high=True))
r_script.write("#Unused reduced-resolution versions\n")
r_script.write(removal_command(basedir,low_unneeded_duplicate|(unused_other&high_textures&low_textures)-set(lowres_maybe_source),high=False))
r_script.write("#Unused unique .png (move to Unused)\n")
r_script.write("\n".join(["mkdir -p Textures/Unused/"+d for d in ['Terrain','Terrain.winter','Trees','Terrain.high','Terrain.winter.high','Trees.high','Runway','Water']])+"\n")
r_script.write(move_command(basedir,[f for f in unused_other&high_textures if (f[-4:]!=".dds" and f[:5]!="Signs" and f[:6]!="Runway")],high=True))
r_script.write(move_command(basedir,[f for f in (unused_other-high_textures)|low_unneeded_nondup if (f[-4:]!=".dds" and f[:5]!="Signs" and f[:6]!="Runway")],high=False))
r_script.write("#Unused unique .dds\n")
r_script.write("#It is my opinion that these should go, but if you'd prefer to move them to Unused I won't argue further\n")
r_script.write(removal_command(basedir,[f for f in (unused_other&high_textures)|unused_dds_matchlow if (f[-4:]==".dds" and f[:5]!="Signs" and f[:6]!="Runway")],high=True))
r_script.write(removal_command(basedir,[f for f in (unused_other-high_textures)|low_unneeded_nondup|unused_dds_matchhigh if f[-4:]==".dds"],high=False))
r_script.write(move_command(basedir,[f for f in (unused_other&high_textures)|unused_dds_matchlow if (f[-4:]==".dds" and f[:5]!="Signs" and f[:6]!="Runway")],high=True,comment=True))
r_script.write(move_command(basedir,[f for f in (unused_other-high_textures)|low_unneeded_nondup|unused_dds_matchhigh if (f[-4:]==".dds" and f[:5]!="Signs" and f[:6]!="Runway")],high=False,comment=True))
r_script.close()
if return_used_noregions:
return used_noregions|set([path_join('Sky',f) for f in rfilelist(path_join(basedir,'Textures/Sky'))])
def find_locally_unused_models(basedir):
"""Find models not used in the base scenery (these do need to be in Terrasync as they may well be used in other locations, but don't need to be in the base flightgear-data package)
Known bug: doesn't search everywhere: check /Nasal,.eff <image>,<inherits-from>,/(AI/)Aircraft not referenced in AI scenarios, unusual tags in Aircraft/Generic/Human/Models/walker.xml,HLA/av-aircraft.xml,/Environment,MP/aircraft_types.xml,preferences.xml"""
models_allfiles={path_join('Models',f):s for f,s in rfilelist(path_join(basedir,'Models')).items()}
t_size=lambda flist: sum(models_allfiles[f] for f in flist if f in models_allfiles)
used_models=set(files_used(path=path_join(basedir,'Scenery'),filetypes=".stg",pattern=r'OBJECT_SHARED (\S+?) '))|set(files_used(path=path_join(basedir,'AI'),exclude_dirs=["Aircraft","Traffic"],pattern=r'<model>[\\/]?(\S+?)</model>'))|set(f for f in files_used(path=path_join(basedir,'Materials'),filetypes=".xml",pattern=r'<path>[\\/]?(\S+?)</path>') if f[-4:]==".xml")
n=0
while n!=len(used_models):
n=len(used_models)
used_models=used_models|set(f for f in files_used(path=basedir,filelist=used_models,filetypes=".xml",pattern=r'<path>[\\/]?(\S+?)</path>') if f[-4:]==".xml")
used_textures=set(files_used(path=basedir,filelist=used_models,filetypes=".ac",pattern=r'texture "(\S+?)"',relative_path=True))|set(files_used(path=basedir,filelist=used_models,filetypes=".xml",pattern=r'<texture>[\\/]?(\S+?)</texture>',relative_path=True))
extra_used_models=set()
for f1 in used_models:
if f1[-4:]!=".xml":
continue
for f2 in files_used(path=basedir,filelist=[f1],pattern=r'<path>[\\/]?(\S+?)</path>',relative_path=True):
if f2[-3:]!=".ac":
continue
extra_used_models=extra_used_models|set([f2])
p2=[f for f in files_used(path=basedir,filelist=[f1],pattern=r'<texture-path>[\\/]?(\S+?)</texture-path>',relative_path=True)]
if len(p2)==0:
p2=[os.path.dirname(f1)]
if len(p2)!=1:
print("non-unique/not found:",f1,f2,p2)
continue
try:
used_textures=used_textures|set(os.path.normpath(path_join(p2[0],f)) for f in files_used(path=basedir,filelist=[f2],filetypes=".ac",pattern=r'texture "(\S+?)"'))
except (IOError,OSError):
print("not found",f1,f2,p2)
used_models=used_models|extra_used_models
unused=set(models_allfiles.keys())-(used_models|used_textures)
missing=set(f for f in (used_models|used_textures) if ((f.startswith('Models') and f not in models_allfiles.keys()) or not os.path.isfile(path_join(basedir,f))))
print("used\n",sorted(used_models),"\nsize=",t_size(used_models),"\n\n",sorted(used_textures),"\nsize=",t_size(used_textures),"\n\nunused\n",sorted(unused),"\nsize=",t_size(unused),"\n\nmissing\n",sorted(missing),"\nsize=",t_size(missing))
class FilesetSizes:
def __init__(self):
self.count=0
self.ncsize=0
self.csize=0
@property
def size(self):
if self.csize>0:
return self.csize
else:
return self.ncsize
def __str__(self):
if self.csize>0:
return "{0:10,} {1:15,} {2:15,}".format(self.count,self.ncsize,self.csize)
else:
return "{0:10,} {1:15,}".format(self.count,self.ncsize)
def __add__(self,other):
result=FilesetSizes()
result.count=self.count+other.count
result.ncsize=self.ncsize+other.ncsize
result.csize=self.csize+other.csize
return result
def size_by_category(path,exclude_dirs,keyfn,compressed_size=False):
"""Total size of files, in each category returned from keyfn"""
files=rfilelist(path,exclude_dirs)
result=defaultdict(FilesetSizes)
gzdir=tempfile.TemporaryDirectory()
gzpath=gzdir.name
gzcount=0
for file,size in files.items():
cat=keyfn(file,size)
if cat is None:
continue
result[cat].count=result[cat].count+1
result[cat].ncsize=result[cat].ncsize+size
if compressed_size:
try:
result[cat].targz.add(path_join(path,file))
except AttributeError:
result[cat].targzname=path_join(gzpath,str(gzcount)+".tar.gz")
result[cat].targz=tarfile.open(result[cat].targzname,mode="w:gz")
gzcount=gzcount+1
result[cat].targz.add(path_join(path,file))
if compressed_size:
for cat in result:
result[cat].targz.close()
result[cat].csize=os.path.getsize(result[cat].targzname)
return result
def fgdata_size(path,by_size=False,exclude_dirs=None,compressed_size=False,min_size=1e6,include_aircraft=['UIUC','777','777-200','b1900d','CitationX','ZLT-NT','dhc2','Cub','sopwithCamel','f-14b','ASK13','bo105','Dragonfly','SenecaII','A6M2'],sections={"Aircraft/c172p":"Aircraft-base","Aircraft/Generic":"Aircraft-base","Aircraft/Instruments":"Aircraft-base","Aircraft/Instruments-3d":"Aircraft-base","Aircraft/ufo":"Aircraft-base","Aircraft/777":"Aircraft-777","Aircraft/777-200":"Aircraft-777","Aircraft":"Aircraft-other","Textures":"Textures","Textures.high":"Textures","AI/Aircraft":"AI-aircraft","AI":"AI-other","Scenery":"scenery","Models":"models"}):
if any('\\' in s for s in sections):
raise ValueError("sections always uses forward slashes")
if "" not in sections:
sections[""]="Other"
if exclude_dirs is None:
if os.path.exists(path_join(path,".git")):
exclude_dirs=[".git","Textures/Unused"]+[path_join("Aircraft",d) for d in os.listdir(path_join(path,"Aircraft")) if d not in ["c172p","ufo","Generic","Instruments","Instruments-3d"]+include_aircraft]
else:
exclude_dirs=[]
if by_size:
keyfn=lambda file,size: ("texture",math.frexp(size)[1]) if os.path.splitext(file)[1] in [".png",".dds",".rgb",".jpg"] else ("nontexture",math.frexp(size)[1])
else:
def keyfn(file,size):
file_ext=os.path.splitext(file)[1]
if file_ext==".gz":
file_ext=os.path.splitext(os.path.splitext(file)[0])[1]+file_ext
file0=file.replace('\\','/')
section=sections[max((s for s in sections if file0.startswith(s)),key=len)]
return (section,file_ext)
result=size_by_category(path,exclude_dirs,keyfn,compressed_size)
#print(result)
totals1=defaultdict(FilesetSizes)
totals2=defaultdict(FilesetSizes)
other=defaultdict(FilesetSizes)
for cat in result:
totals1[cat[0]]=totals1[cat[0]]+result[cat]
totals2[cat[1]]=totals2[cat[1]]+result[cat]
if (not by_size) and (result[cat].size<min_size):
other[cat[0]]=other[cat[0]]+result[cat]
print("{0:>10} {1:>15} {2:>15}".format("Count","Size","Compr.size"))
for cat0,r0 in sorted(totals1.items(),key=lambda p:-p[1].size):
print(cat0)
for cat,r in sorted([(c[1],r) for (c,r) in result.items() if (c[0]==cat0 and (by_size or r.size>min_size))],key=(lambda p:p[0]) if by_size else (lambda p:-p[1].size)):
print(r,cat)
if not by_size:
print(other[cat0],"other")
print(totals1[cat0],"all")
print("All")
for cat,r in sorted([(c,r) for (c,r) in totals2.items() if (by_size or r.size>min_size)],key=(lambda p:p[0]) if by_size else (lambda p:-p[1].size)):
print(r,cat)
if not by_size:
print(sum((r for r in totals2.values() if r.size<min_size),FilesetSizes()),"other")
print(sum(totals1.values(),FilesetSizes()),"all")
def create_reduced_file(input_path,output_path,temp_path,cdir,file,downsample_this,compress_this,compress_names_find, compressed_format,texture_filetypes,binary_types,fclass):
"""Process a single file in create_reduced_fgdata. (Separate function to allow parallel processing)"""
retcode=0
if downsample_this or compress_this:
image_type=texture_filetypes[os.path.splitext(file)[1]]
output_image_type=compressed_format if compress_this else os.path.splitext(file)[1]
output_file=os.path.splitext(file)[0]+output_image_type
output_image_type=texture_filetypes[output_image_type]
if "{0}" in output_path and fclass=="base-textures":#downsampled in base-textures, full resolution in extra-textures
shutil.copy(path_join(input_path,cdir,file),path_join(output_path.format("extra-textures"),cdir,file))
if output_image_type=="DDS":# in Ubuntu, neither imagemagick nor graphicsmagick can write .dds
#doesn't work (for dds -> smaller dds): subprocess.call(["nvzoom","-s","0.5","-f","box",path_join(input_path,cdir,file),path_join(output_path.format(fclass),cdir,file)])
if subprocess.call(["convert",image_type+":"+path_join(input_path,cdir,file)]+(["-flip"] if ((image_type=="DDS")!=(output_image_type=="DDS")) else [])+(["-sample","50%"] if downsample_this else [])+[path_join(temp_path,cdir,os.path.splitext(file)[0]+".png")]):#fails on some DDS formats, so just copy them
shutil.copy(path_join(input_path,cdir,file),path_join(output_path.format(fclass),cdir,file))
print(path_join(cdir,file),"unsupported type, probably normal map")
if compress_this:
raise TypeError#copy will have the wrong name
else:
try:
image_properties=subprocess.check_output(["identify","-verbose",path_join(temp_path,cdir,os.path.splitext(file)[0]+".png")])
except subprocess.CalledProcessError as err:
print("identify error on",path_join(cdir,file),"after ",["convert",image_type+":"+path_join(input_path,cdir,file)]+(["-flip"] if ((image_type=="DDS")!=(output_image_type=="DDS")) else [])+(["-sample","50%"] if downsample_this else [])+[path_join(temp_path,cdir,os.path.splitext(file)[0]+".png")],["identify","-verbose",path_join(temp_path,cdir,os.path.splitext(file)[0]+".png")],err)
raise
has_alpha=b"Alpha" in image_properties
needs_alpha=has_alpha
if has_alpha and re.search(rb"Alpha:\s*min: 255 \(1\)",image_properties):
print(path_join(cdir,file),"has always-255 alpha")
needs_alpha=False
retcode=subprocess.call(["nvcompress","-bc3" if needs_alpha else "-bc1",path_join(temp_path,cdir,os.path.splitext(file)[0]+".png"),path_join(output_path.format(fclass),cdir,output_file)],stdout=devnull)
else:
retcode=subprocess.call(["convert",image_type+":"+path_join(input_path,cdir,file)]+(["-sample","50%"] if downsample_this else [])+[output_image_type+":"+path_join(output_path.format(fclass),cdir,output_file)])#we use sample rather than an averaging filter to not break mask/rotation/... maps
else:#not to be downsampled/compressed
if os.path.splitext(file)[1] in binary_types:#just copy
shutil.copy(path_join(input_path,cdir,file),path_join(output_path.format(fclass),cdir,file))
else:#texture name replacement
file_in=open(path_join(input_path,cdir,file),'rb')
file_out=open(path_join(output_path.format(fclass),cdir,file),'wb')
file_str=file_in.read(None)
file_in.close()
(file_strout,num_matches)=compress_names_find.subn(lambda mf: os.path.splitext(mf.group(0))[0]+(compressed_format.encode('utf-8')),file_str)
file_out.write(file_strout)
file_out.close()
#if ((os.path.splitext(file)[1] not in textureuser_types) and num_matches>0):
#print("Warning: ",num_matches," unexpected use(s) in ",path_join(cdir,file))
#if compress_names_find0.search(file_strout):
#print("Warning: unreplaced match(es) in ",path_join(cdir,file),compress_names_find0.search(file_strout).group(0))
"""Warning: unreplaced match(es) in... correct rejections of match within a filename:
Aircraft/Instruments-3d/AN-APS-13.ac b'panel.png'
Aircraft/Instruments-3d/magneto-switch/mag_switch.ac b'black.png'
Nasal/canvas/map/Images/chart_symbols.svg b'wash.png'
Models/Airport/blast-deflector49m.ac b'generic.png'
Models/Airport/blast-deflector63m.ac b'generic.png'
Models/Industrial/oilrig09.ac b'yellow.png'
Models/Industrial/oilrig10.ac b'yellow.png'
Models/Industrial/oilrig09.ac.before-color-change b'yellow.png'
Models/Industrial/oilrig10.ac.before-color-change b'yellow.png'
Models/Maritime/Civilian/Tanker.ac b'black.png'
Models/Transport/flatcar.xml b'evergreen.png'
Models/Commercial/tower-grey-black.ac b'black.png'
Materials/base/materials-base.xml b'yellow.png'
Warning: unexpected use(s) in...
Docs/README.local_weather.html (the only one that looke like an actual problem; hence, Docs is now skipped)
Nasal/canvas/map/Images/chart_symbols.svg (probably inkscape:export-filename, which are creator-specific absolute paths anyway, but now skipped)
oilrig09.ac.before-color-change,oilrig10.ac.before-color-change,stbd_coaming_panel.ac.bak (presumably backup files)
"""
if retcode:
print("Error ",retcode," in ",path_join(cdir,file))
def create_reduced_fgdata(input_path,output_path,reject_positional_args=None,split_textures=False,exclude_parts=[],include_aircraft=['UIUC','777','777-200','b1900d','CitationX','ZLT-NT','dhc2','Cub','sopwithCamel','f-14b','ASK13','bo105','Dragonfly','SenecaII','A6M2'],dirs_to_downsample=(),dirs_to_compress=(),compressed_format=".dds",downsample_min_filesize=1e5,compress_min_filesize=3e4,use_ready_compressed=True):
"""Create a smaller, reduced-quality flightgear-data package
Can downsample textures 50%, change texture format, and/or omit sections (region-specific textures, aircraft, AI traffic)
Downsampling and format change require imagemagick or graphicsmagick (for convert) and libnvtt-bin (for nvcompress)
Optional parts, use exclude_parts to omit:
ai: no background traffic, but tankers etc do still work
extra-textures (requires split_textures=True): no region-specific textures
The c172p and ufo are always included; other aircraft are added by include_aircraft
Texture downsampling: textures in dirs_to_downsample and larger than downsample_min_filesize downsampled 50%
Texture format conversion: textures in dirs_to_compress and larger than compress_min_filesize converted to compressed_format
use_ready_compressed determines what happens if a same-basename file in compressed_format already exists: True uses the already-compressed one, False uses the uncompressed one, None keeps both
Suggested dirs_to_downsample:
3.2: ('Textures.high/Terrain','Textures.high/Trees','Textures.high/Terrain.winter','AI/Aircraft','Models')
3.3: ('Textures/Terrain','Textures/Trees','Textures/Terrain.winter','AI/Aircraft','Models')
To do "everything" (a few are always skipped due to potential breakage), use dirs_to_compress=('',)
To put each section in its own directory (e.g. for building a Debian-style flightgear-data-* set of packages) use {0} in output_path, e.g.
python3 -c "import fgdata_checkers; fgdata_checkers.create_reduced_fgdata(input_path='/home/rnpalmer/fs_dev/git/fgdata',output_path='/home/rnpalmer/fs_dev/flightgear/data_split/debian/flightgear-data-{0}/usr/share/games/flightgear',include_aircraft=['UIUC','b1900d','CitationX','ZLT-NT','dhc2','Cub','sopwithCamel','f-14b','ASK13','bo105','Dragonfly','SenecaII','A6M2'])"
This creates separate preferences-regions.xml and preferences-noregions.xml files for with and without regional textures; you need to handle symlinking preferences.xml to the correct one
"""
start_time=time.time()
if reject_positional_args is not None:
raise TypeError("Keyword arguments only please: this is not a stable API")
if use_ready_compressed not in (True,False,None):
raise TypeError("invalid use_ready_compressed setting")
texture_filetypes={".png":"PNG",".dds":"DDS",".jpg":"JPEG"}#,".rgb":"SGI" loses cloud transparency
if compressed_format not in texture_filetypes:
raise ValueError("Invalid compressed_format (include the .)")
textureuser_types={".eff",".xml",".ac",".nas"}
binary_types={".png",".dds",".rgb",".RGB",".jpg",".wav",".WAV",".btg.gz",".zip",".tar.gz"}#don't search these for texture name replacement
"""Textures named directly in flightgear/simgear code:
gui/images/shadow.png,gui/cursor-spin-cw.png (probably safest to treat this as gui/*, they're all small)
Textures/Globe/world.topo.bathy.200407.3x4096x2048.png
Textures/buildings.png,Textures/buildings-lightmap.png
Textures/Sky/*
Textures/Splash*.png
unknown.rgb (probably Textures/ or Textures/Terrain/, neither exists)
Aircraft/Instruments/Textures/nd-symbols.png (doesn't actually exist),Aircraft/Instruments/Textures/compass-ribbon.rgb,Aircraft/Instruments/Textures/od_wxradar.rgb,Aircraft/Instruments/Textures/od_wxradar.rgb,Aircraft/Instruments/Textures/wxecho.rgb,Aircraft/Instruments/Textures/od_groundradar.rgb (doesn't actually exist)
also, Aircraft/{Instruments,Instruments-3d,Generic} may be used by downloaded aircraft, and Docs images are used in .html
Nasal (Canvas map) probably wouldn't break anything, but guessing it's a bad idea visually"""
no_compress_pattern=re.compile(r'mask|light|relief|nmap|nm\.|normal|dudv|^Splash[0-9].png$|^buildings.png$|^buildings-lightmap.png$|^world.topo.bathy.200407.3x4096x2048.png$|^ocean_depth_1.png$')#edge blurring from lossy compression may break masks (converting ocean_depth_1.png is known to give black water near shore at effects>=4), and this script doesn't know how to create DDS normal maps
no_compress_dirs=("gui","Docs","webgui","Nasal","Textures/Sky","Aircraft/Instruments","Aircraft/Instruments-3d","Aircraft/Generic")
exclude_dirs=[".git","Textures/Unused"]
exclude_unnamed_subdirs=["Aircraft"]#these are a separate mechanism from subtree_class/exclude_parts mostly to save time (subtree_class still fully scans excluded directories because the class may change again further down the tree, e.g. AI/Aircraft ai -> performancedb.xml base; these don't)
subtree_class={"Aircraft/c172p":"base","Aircraft/Generic":"base","Aircraft/Instruments":"base","Aircraft/Instruments-3d":"base","Aircraft/ufo":"base","Textures":"textures","Textures.high":"textures","AI/Aircraft":"ai","AI/Traffic":"ai","AI/Aircraft/performancedb.xml":"base","Scenery":"scenery","Models":"models"}
for aircraft in include_aircraft:
if "Aircraft/"+aircraft not in subtree_class:
subtree_class["Aircraft/"+aircraft]="aircraft"
include_files=[]
if split_textures:
base_texture_files=[]
for t in find_unused_textures(input_path,return_used_noregions=True):
base_texture_files.extend([path_join("Textures",t),path_join("Textures.high",t)])
#no longer a significant problem with exclude_dirs, and no longer exists for new fgdata: if os.path.exists(path_join(input_path,".git")):
#print(input_path,"""appears to be a git clone; this will work, but the result will be larger than starting from a standard flightgear-data package.\nTo create this use (adjusting paths as necessary) rsync -av --filter="merge /home/rnpalmer/FlightGear/source/fgmeta/base-package.rules" ~/FlightGear/source/fgdata ~/FlightGear/data_full""")
if os.path.exists(output_path.format("base")) and os.listdir(output_path.format("base")):
print("output path",output_path,"non-empty, aborting to avoid data loss\nIf you did want to lose its previous contents, run:\nrm -r",output_path,"\nthen re-run this script")
return
if compressed_format==".jpg":
print("Warning: selected compression format does not support transparency")
compress_names=set()
if dirs_to_compress:#need this preliminary pass to get names to change in .xml,etc
no_compress_names=set()
dirs={"":"base"}
while dirs:
cdir,cclass=dirs.popitem()
cdirfiles=os.listdir(path_join(input_path,cdir))
for file in cdirfiles:
fclass=subtree_class.get(path_join(cdir,file),cclass)
if os.path.isdir(path_join(input_path,cdir,file)):
if (path_join(cdir,file) not in exclude_dirs) and (cdir not in exclude_unnamed_subdirs or path_join(cdir,file) in subtree_class):
dirs[path_join(cdir,file)]=fclass
else:#file
compress_this=cdir.startswith(dirs_to_compress) and (os.path.splitext(file)[1] in texture_filetypes) and (os.path.splitext(file)[1]!=compressed_format) and (os.path.getsize(path_join(input_path,cdir,file))>compress_min_filesize) and not no_compress_pattern.search(file) and not cdir.startswith(no_compress_dirs) and (file not in no_compress_names) and ((use_ready_compressed is not None) or not os.path.exists(path_join(input_path,cdir,os.path.splitext(file)[0]+compressed_format)))
if compress_this:
compress_names.add(file)
else:
no_compress_names.add(file)
compress_names.discard(file)#if there are two with the same name in different directories, compress both or neither, to simplify name replacement
compress_names_find=re.compile(('(?<=["\'>/\\\\ \\n])('+'|'.join(re.escape(f) for f in compress_names)+')($|(?=["\'< \\n]))').encode('utf-8'))
compress_names_find0=re.compile(('|'.join(re.escape(f) for f in compress_names)).encode('utf-8'))
#print(compress_names,"\n\n",no_compress_names,"\n\n",'(?<=["\'>/\\\\ \\n])('+'|'.join(re.escape(f) for f in compress_names)+')($|(?=["\'< \\n]))',"\n\n",'|'.join(re.escape(f) for f in compress_names),"\n\n")
print("Starting conversion...",len(compress_names),"files to change format, runtime so far=",int(time.time()-start_time),"sec")
dirs={"":"base"}
subprocess_pool=multiprocessing.Pool(processes=8)
subprocess_list=[]
temp_dir=tempfile.TemporaryDirectory()
temp_path=temp_dir.name
while dirs:
cdir,cclass=dirs.popitem()
cdirfiles=os.listdir(path_join(input_path,cdir))
for file in cdirfiles:
fclass=subtree_class.get(path_join(cdir,file),cclass)
if os.path.isdir(path_join(input_path,cdir,file)):
if (path_join(cdir,file) not in exclude_dirs) and (cdir not in exclude_unnamed_subdirs or path_join(cdir,file) in subtree_class):
dirs[path_join(cdir,file)]=fclass
else:#file
if split_textures and fclass=="textures":
if path_join(cdir,file) in base_texture_files:
fclass="base-textures"
else:
fclass="extra-textures"
if fclass in exclude_parts:
continue
if not os.path.exists(path_join(output_path.format(fclass),cdir)):
os.makedirs(path_join(output_path.format(fclass),cdir))#errors out if the directory does exist, so calling it in the per-file subprocess would be a race condition
if "{0}" in output_path and fclass=="base-textures" and not os.path.exists(path_join(output_path.format("extra-textures"),cdir)):#downsampled in base-textures, full resolution in extra-textures
os.makedirs(path_join(output_path.format("extra-textures"),cdir))
if not os.path.exists(path_join(temp_path,cdir)):
os.makedirs(path_join(temp_path,cdir))
downsample_this=(cdir.startswith(dirs_to_downsample)) and (os.path.splitext(file)[1] in texture_filetypes) and (os.path.getsize(path_join(input_path,cdir,file))>downsample_min_filesize)
compress_this=(file in compress_names)
if compress_this and use_ready_compressed==True and os.path.exists(path_join(input_path,cdir,os.path.splitext(file)[0]+compressed_format)):
continue
if (not compress_this) and use_ready_compressed==False and os.path.splitext(file)[1]==compressed_format and any((os.path.exists(path_join(input_path,cdir,os.path.splitext(file)[0]+f)) and os.path.splitext(file)[0]+f in compress_names) for f in texture_filetypes if f!=os.path.splitext(file)[1]):
continue
subprocess_list.append(subprocess_pool.apply_async(create_reduced_file,args=(input_path,output_path,temp_path,cdir,file,downsample_this,compress_this,compress_names_find, compressed_format,texture_filetypes,binary_types,fclass)))
print(len(subprocess_list),"file tasks started...runtime so far=",int(time.time()-start_time),"sec\n(Not a linear progress indicator: they are different lengths.)")
last_report=time.time()-100#print first report immediately
for s0 in subprocess_list:
if time.time()>last_report+60:
print("Waiting for",len([s for s in subprocess_list if not s.ready()]),"file tasks...runtime so far=",int(time.time()-start_time),"sec")
last_report=time.time()
s0.get()
subprocess_pool.close()
subprocess_pool.join()
if "{0}" in output_path:
os.rename(path_join(output_path.format("base"),"preferences.xml"),path_join(output_path.format("base"),"preferences-regions.xml"))
if "extra-textures" in exclude_parts or "{0}" in output_path:
prefs_in=open(path_join(input_path,"preferences.xml"),'r')
prefs_out=open(path_join(output_path.format("base"),"preferences-noregions.xml" if "{0}" in output_path else "preferences.xml"),'w')
prefs_str=prefs_in.read(None)
prefs_in.close()
prefs_str=prefs_str.replace("Materials/regions/materials.xml","Materials/default/materials.xml")#turn off regional textures
prefs_out.write(prefs_str)
prefs_out.close()
print("Total runtime=",int(time.time()-start_time),"sec")
def check_text_encoding(path,filelist=None,binary_types=(".png",".dds",".rgb",".RGB",".jpg",".wav",".WAV",".btg.gz",".xcf.gz",".xcf",".XCF","Thumbs.db",".blend",".bmp",".gif", ".3ds",".3DS",".pdf",".ttf",".txf",".htsvoice",".odt",".ods",".xls",".mp3",".zip",".tar.gz"),exclude_dirs=[".git","Timezone"]):
"""filelist is intended for quick testing: see fgdata_nonascii_filelist.py"""
def err_context(err):
start=max(err.object.rfind(b'\n',0,err.start)+1,err.start-30,0)
end=min(err.object.find(b'\n',err.start),err.start+30,len(err.object))
if end<0:#not found
end=err.start+30
return err.object[start:end]
def dict_print(d):
return "".join(i[0]+"\n\t"+str(i[1])+"\n\t"+(str(i[1],encoding="utf-8",errors="replace")+"\n\t"+str(i[1],encoding="latin-1") if type(i[1])==bytes else "")+"\n" for i in sorted(d.items()))
if filelist is None:
filelist=[f for f in rfilelist(path,exclude_dirs) if not f.endswith(tuple(binary_types))]
utf8_files={}
withnulls_files=[]
othertext_files={}
mislabeled_xml={}
mislabeled_xml_nocomments={}
xml_encoding_pattern=re.compile(r'<\?xml.*?encoding="(\S+?)".*?\?>')
xml_noencoding_pattern=re.compile(r'<\?xml.*?\?>')
utf8_files_nocomments={}
othertext_files_nocomments={}
for fname in filelist:
if os.path.splitext(fname)[1]==".gz":
fobj=gzip.open(path_join(path,fname),mode='rb')
else:
fobj=open(path_join(path,fname),mode='rb')
fdata=fobj.read()
if b"\0" in fdata:
withnulls_files.append(fname)#two look like corrupted files: Aircraft/p51d/Resources/WIP/P-51D-25NA.ac (hangs gedit,large block of nulls in middle) Docs/Serial/nmeafaq.txt (block of nulls at end), rest are probably-binary types
continue
if os.path.splitext(fname)[1] in (".xml",".svg",".xhtml"):
encoding_mark=xml_encoding_pattern.search(str(fdata.split(b'\n',maxsplit=1)[0],encoding="utf-8"))
if encoding_mark:
encoding_mark=encoding_mark.group(1)
if encoding_mark not in ("utf-8","UTF-8","ISO-8859-1"):
mislabeled_xml_nocomments[fname]="unrecognised encoding "+encoding_mark
encoding_mark=None
else:
if xml_noencoding_pattern.search(str(fdata.split(b'\n',maxsplit=1)[0],encoding="utf-8")):
encoding_mark="utf-8"#XML standard allows either UTF-8 or UTF-16 (with BOM) in unlabeled files, but we only use -8
else:
encoding_mark=None
#mislabeled_xml_nocomments[fname]="no xml header"
else:
encoding_mark=None
try:
fdata.decode(encoding="ascii")
continue
except UnicodeError as err:
errline=err_context(err)
try:
fdata.decode(encoding="utf-8")
utf8_files[fname]=errline
if encoding_mark not in ("utf-8","UTF-8",None):
mislabeled_xml[fname]=bytes(encoding_mark,encoding="ascii")+errline
except UnicodeError as err:
errline=err_context(err)
othertext_files[fname]=errline
if encoding_mark not in ("ISO-8859-1",None):
mislabeled_xml[fname]=bytes(encoding_mark,encoding="ascii")+errline
if os.path.basename(fname) in ("Read-Me.txt","README.txt","Readme.txt","readme.txt","LIS-MOI_GNU-GPL"):
continue
fdata_nocomments=strip_comments(fdata,filename=fname)
if fdata_nocomments.startswith(bytes([0xef,0xbb,0xbf])) and fname not in mislabeled_xml:#UTF-8 BOM
fdata_nocomments=fdata_nocomments[3:]
try:
fdata_nocomments.decode(encoding="ascii")
continue
except UnicodeError as err:
errline=err_context(err)
try:
fdata_nocomments.decode(encoding="utf-8")
if encoding_mark is None:
utf8_files_nocomments[fname]=errline
if encoding_mark not in ("utf-8","UTF-8",None):
mislabeled_xml_nocomments[fname]=bytes(encoding_mark,encoding="ascii")+errline
except UnicodeError as err:
errline=err_context(err)
if encoding_mark is None:
othertext_files_nocomments[fname]=errline
if encoding_mark not in ("ISO-8859-1",None):
mislabeled_xml_nocomments[fname]=bytes(encoding_mark,encoding="ascii")+errline
print("non-ASCII valid UTF-8:",dict_print(utf8_files),"\n\nother:",dict_print(othertext_files),"\n\nmislabeled/unrecognised",dict_print(mislabeled_xml),"\n\nwith nulls (binary or UTF-16/32):",sorted(withnulls_files),"\n\nnon-ASCII valid UTF-8 (outside BOM/comments):",dict_print(utf8_files_nocomments),"\n\nother (outside comments):",dict_print(othertext_files_nocomments),"\n\nmislabeled/unrecognised (outside comments)",dict_print(mislabeled_xml_nocomments))

1
fgrun Submodule

Submodule fgrun added at 3fb3be1935

1
getstart Submodule

Submodule getstart added at 7b216d458f

View File

@@ -1,15 +0,0 @@
#!/bin/sh
SDK_PATH="/Developer/SDKs/MacOSX10.6.sdk"
OSX_TARGET="10.6"
svn co https://macflightgear.svn.sourceforge.net/svnroot/macflightgear/trunk/FlightGearOSX macflightgear
pushd macflightgear
# compile the stub executable
gcc -o FlightGear -mmacosx-version-min=$OSX_TARGET -isysroot $SDK_PATH -arch i386 main.m \
-framework Cocoa -framework RubyCocoa -framework Foundation -framework AppKit
popd

72
hudson_mac_build_release.sh Executable file
View File

@@ -0,0 +1,72 @@
#!/bin/sh
if [ "$WORKSPACE" == "" ]; then
echo "ERROR: Missing WORKSPACE environment variable."
exit 1
fi
###############################################################################
# remove old and create fresh build directories
rm -rf sgBuild
rm -rf fgBuild
mkdir -p sgBuild
mkdir -p fgBuild
mkdir -p output
rm -rf output/*
rm -rf $WORKSPACE/dist/include/simgear $WORKSPACE/dist/libSim* $WORKSPACE/dist/libsg*.a
PATH=$PATH:$QTPATH
echo "Build path is: $PATH"
###############################################################################
echo "Starting on SimGear"
pushd sgBuild
cmake -DCMAKE_INSTALL_PREFIX:PATH=$WORKSPACE/dist -DCMAKE_BUILD_TYPE=RelWithDebInfo ../simgear
# compile
make
if [ $? -ne '0' ]; then
echo "make simgear failed"
exit 1
fi
make install
popd
################################################################################
echo "Starting on FlightGear"
pushd fgBuild
if [ $FG_IS_RELEASE == '1' ]; then
FGBUILDTYPE=Release
else
FGBUILDTYPE=Nightly
fi
cmake -DFG_BUILD_TYPE=$FGBUILDTYPE -DCMAKE_INSTALL_PREFIX:PATH=$WORKSPACE/dist -DCMAKE_BUILD_TYPE=RelWithDebInfo ../flightgear
make
if [ $? -ne '0' ]; then
echo "make flightgear failed"
exit 1
fi
make install
popd
chmod +x $WORKSPACE/dist/bin/osgversion
################################################################################
# run the unlock script now - we need to do this right before code-signing,
# or the keychain may automatically re-lock after some period of time
unlock-keychain.sh
echo "Running package script"
./hudson_mac_package_release.rb

View File

@@ -1,9 +1,24 @@
#!/usr/bin/ruby
require 'ERB'
require 'fileutils' #I know, no underscore is not ruby-like
include FileUtils
$osgLibs = ['osgFX', 'osgParticle', 'osg', 'osgGA', 'osgText', 'osgUtil', 'osgSim', 'osgViewer', 'osgDB']
$osgPlugins = ['ac', 'osg', 'freetype', 'qt', 'imageio', 'rgb', 'txf', 'mdl', '3ds']
$osgPlugins = ['ac', 'osg', 'freetype', 'imageio', 'rgb', 'txf', 'mdl', '3ds']
# from http://drawingablank.me/blog/ruby-boolean-typecasting.html
class String
def to_bool
return true if self == true || self =~ (/^(true|t|yes|y|1)$/i)
return false if self == false || self.blank? || self =~ (/^(false|f|no|n|0)$/i)
raise ArgumentError.new("invalid value for Boolean: \"#{self}\"")
end
end
class NilClass
def to_bool; false; end
end
def runOsgVersion(option)
env = "export DYLD_LIBRARY_PATH=#{Dir.pwd}/dist/lib"
@@ -15,89 +30,92 @@ osgVersion = runOsgVersion('version-number')
$osgSoVersion=runOsgVersion('so-number')
$openThreadsSoVersion=runOsgVersion('openthreads-soversion-number')
$codeSignIdentity = ENV['FG_CODESIGN_IDENTITY']
puts "Code signing identity is #{$codeSignIdentity}"
puts "osgVersion=#{osgVersion}, so-number=#{$osgSoVersion}"
$alutSourcePath='/Library/Frameworks/ALUT.framework'
$isRelease = ENV['FG_IS_RELEASE'].to_bool
puts "Is-release? : ##{$isRelease}"
def fix_install_names(object)
#puts "fixing install names for #{object}"
$osgLibs.each do |l|
oldName = "lib#{l}.#{$osgSoVersion}.dylib"
newName = "@executable_path/../Frameworks/#{oldName}"
`install_name_tool -change #{oldName} #{newName} #{object}`
end
oldName = "libOpenThreads.#{$openThreadsSoVersion}.dylib"
newName= "@executable_path/../Frameworks/#{oldName}"
`install_name_tool -change #{oldName} #{newName} #{object}`
alutBundlePath = "@executable_path/../Frameworks/Alut.framework"
alutLib = "Versions/A/ALUT"
`install_name_tool -change #{$alutSourcePath}/#{alutLib} #{alutBundlePath}/#{alutLib} #{object}`
end
prefixDir=Dir.pwd + "/dist"
$prefixDir=Dir.pwd + "/dist"
dmgDir=Dir.pwd + "/image"
srcDir=Dir.pwd + "/flightgear"
qmlDir=srcDir + "/src/GUI/qml"
puts "Erasing previous image dir"
`rm -rf #{dmgDir}`
bundle=dmgDir + "/FlightGear.app"
# run macdeployt before we rename the bundle, otherwise it
# can't find the bundle executable
# also note if adding options here, the bundle path has to be
# the first argument to macdeployqt
puts "Running macdeployqt on the bundle to copy Qt libraries"
`macdeployqt #{$prefixDir}/fgfs.app -qmldir=#{qmlDir}`
puts "Moving & renaming app bundle"
`mkdir -p #{dmgDir}`
`mv #{$prefixDir}/fgfs.app #{bundle}`
bundle=dmgDir + "/FlightGear.app"
contents=bundle + "/Contents"
macosDir=contents + "/MacOS"
frameworksDir=contents +"/Frameworks"
$frameworksDir=contents +"/Frameworks"
resourcesDir=contents+"/Resources"
osgPluginsDir=contents+"/PlugIns/osgPlugins-#{osgVersion}"
osgPluginsDir=contents+"/PlugIns/osgPlugins"
# for writing copyright year to Info.plist
t = Time.new
fgCurrentYear = t.year
fgVersion = File.read("#{srcDir}/version").strip
volName="\"FlightGear #{fgVersion}\""
dmgPath = Dir.pwd + "/fg_mac_#{fgVersion}.dmg"
if $isRelease
dmgPath = "" # no 'lite' build for release candidates
dmgFullPath = Dir.pwd + "/output/FlightGear-#{fgVersion}.dmg"
else
dmgPath = Dir.pwd + "/output/FlightGear-#{fgVersion}-nightly.dmg"
dmgFullPath = Dir.pwd + "/output/FlightGear-#{fgVersion}-nightly-full.dmg"
end
puts "Creating directory structure"
`mkdir -p #{macosDir}`
`mkdir -p #{frameworksDir}`
`mkdir -p #{$frameworksDir}`
`mkdir -p #{resourcesDir}`
`mkdir -p #{osgPluginsDir}`
puts "Copying binaries"
bins = ['fgfs', 'terrasync']
puts "Copying auxilliary binaries"
bins = ['fgjs', 'fgcom']
bins.each do |b|
`cp #{prefixDir}/bin/#{b} #{resourcesDir}/#{b}`
fix_install_names("#{resourcesDir}/#{b}")
if !File.exist?("#{$prefixDir}/bin/#{b}")
next
end
outPath = "#{macosDir}/#{b}"
`cp #{$prefixDir}/bin/#{b} #{outPath}`
end
puts "copying libraries"
$osgLibs.each do |l|
libFile = "lib#{l}.#{$osgSoVersion}.dylib"
`cp #{prefixDir}/lib/#{libFile} #{frameworksDir}`
fix_install_names("#{frameworksDir}/#{libFile}")
`cp #{$prefixDir}/lib/#{libFile} #{$frameworksDir}`
end
# and not forgetting OpenThreads
libFile = "libOpenThreads.#{$openThreadsSoVersion}.dylib"
`cp #{prefixDir}/lib/#{libFile} #{frameworksDir}`
`cp #{$prefixDir}/lib/#{libFile} #{$frameworksDir}`
$osgPlugins.each do |p|
pluginFile = "osgdb_#{p}.so"
`cp #{prefixDir}/lib/osgPlugins-#{osgVersion}/#{pluginFile} #{osgPluginsDir}`
fix_install_names("#{osgPluginsDir}/#{pluginFile}")
pluginFile = "osgdb_#{p}.dylib"
`cp #{$prefixDir}/lib/osgPlugins/#{pluginFile} #{osgPluginsDir}`
end
# custom ALUT
# must copy frameworks using ditto
`ditto #{$alutSourcePath} #{frameworksDir}/ALUT.framework`
# Macflightgear launcher
puts "Copying Macflightgear launcher files"
Dir.chdir "macflightgear" do
`cp FlightGear #{macosDir}`
`rsync -a --exclude=\".svn\" *.rb *.lproj *.sh *.tiff #{resourcesDir}`
if File.exist?("#{$prefixDir}/bin/fgcom-data")
puts "Copying FGCom data files"
`ditto #{$prefixDir}/bin/fgcom-data #{resourcesDir}/fgcom-data`
end
# Info.plist
@@ -111,9 +129,33 @@ File.open("#{contents}/Info.plist", 'w') { |f|
`cp #{srcDir}/package/mac/FlightGear.icns #{resourcesDir}/FlightGear.icns`
`cp #{srcDir}/COPYING #{dmgDir}`
puts "Creating DMG"
# move documentation to a public place
`cp fgdata/Docs/FGShortRef.pdf "#{dmgDir}/Quick Reference.pdf"`
`cp fgdata/Docs/getstart.pdf "#{dmgDir}/Getting Started.pdf"`
createArgs = "-format UDBZ -imagekey bzip2-level=9 -quiet -volname #{volName}"
`rm #{dmgPath}`
`hdiutil create -srcfolder #{dmgDir} #{createArgs} #{dmgPath}`
if !$isRelease
# create the 'lite' DMG without the base files
# code sign the entire bundle once complete - v2 code-signing
puts "Signing #{bundle}"
`codesign --deep -s "#{$codeSignIdentity}" #{bundle}`
puts "Creating DMG"
`rm #{dmgPath}`
`hdiutil create -srcfolder #{dmgDir} #{createArgs} #{dmgPath}`
end
puts "Creating full image with data"
puts "Copying base package files into the image"
`rsync -a fgdata/ #{resourcesDir}/data`
# re-sign the entire bundle
puts "Re-signing full #{bundle}"
`codesign --force --deep -s "#{$codeSignIdentity}" #{bundle}`
`rm #{dmgFullPath}`
`hdiutil create -srcfolder #{dmgDir} #{createArgs} #{dmgFullPath}`

View File

@@ -1,15 +0,0 @@
IF NOT DEFINED WORKSPACE SET WORKSPACE=%~dp0
ECHO #define SIMGEAR_VERSION "2.6.0" > %WORKSPACE%\simgear\simgear\version.h
rem set PATH=%PATH%;D:\Program Files (x86)\CMake 2.8\bin
rem call "C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\Tools\vsvars32.bat"
md build-sg
md build-fg
cd build-sg
cmake ..\simgear -G "Visual Studio 10" -DMSVC_3RDPARTY_ROOT=%WORKSPACE% -DCMAKE_INSTALL_PREFIX:PATH=%WORKSPACE%/install/msvc100/SimGear
cmake --build . --config Release --target INSTALL
cd ..\build-fg
cmake ..\flightgear -G "Visual Studio 10" -DMSVC_3RDPARTY_ROOT=%WORKSPACE% -DCMAKE_INSTALL_PREFIX:PATH=%WORKSPACE%/install/msvc100/FlightGear -DFLTK_FLUID_EXECUTABLE=%WORKSPACE%/3rdParty/bin/fluid.exe
cmake --build . --config Release --target INSTALL

View File

@@ -1,15 +0,0 @@
IF NOT DEFINED WORKSPACE SET WORKSPACE=%~dp0
ECHO #define SIMGEAR_VERSION "2.6.0" > %WORKSPACE%\simgear\simgear\version.h
rem set PATH=%PATH%;D:\Program Files (x86)\CMake 2.8\bin
rem call "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\vcvarsall.bat" amd64
md build-sg64
md build-fg64
cd build-sg64
cmake ..\SimGear -G "Visual Studio 10 Win64" -DMSVC_3RDPARTY_ROOT=%WORKSPACE% -DCMAKE_INSTALL_PREFIX:PATH=%WORKSPACE%/install/msvc100-64/SimGear
cmake --build . --config Release --target INSTALL
cd ..\build-fg64
cmake ..\flightgear -G "Visual Studio 10 Win64" -DMSVC_3RDPARTY_ROOT=%WORKSPACE% -DCMAKE_INSTALL_PREFIX:PATH=%WORKSPACE%/install/msvc100-64/FlightGear -DFLTK_FLUID_EXECUTABLE=%WORKSPACE%/3rdParty/bin/fluid.exe
cmake --build . --config Release --target INSTALL

View File

@@ -1,30 +0,0 @@
ECHO OFF
IF NOT DEFINED WORKSPACE SET WORKSPACE=%~dp0
ECHO Packaging root is %WORKSPACE%
subst X: /D
subst X: %WORKSPACE%.
REM construct information file to be read by Inno-setup
set PATH=%WORKSPACE%\install\msvc100\OpenSceneGraph\bin;%PATH%
REM indirect way to get command output into an environment variable
osgversion --so-number > %TEMP%\osg-so-number.txt
osgversion --version-number > %TEMP%\osg-version.txt
SET /P FLIGHTGEAR_VERSION=<flightgear\version
SET /P OSG_VERSION=<%TEMP%\osg-version.txt
SET /P OSG_SO_NUMBER=<%TEMP%\osg-so-number.txt
ECHO #define FGVersion "%FLIGHTGEAR_VERSION%" > InstallConfig.iss
ECHO #define OSGVersion "%OSG_VERSION%" >> InstallConfig.iss
ECHO #define OSGSoNumber "%OSG_SO_NUMBER%" >> InstallConfig.iss
REM run Inno-setup!
Compil32 /cc FlightGear.iss

20
installWinDeps.bat Normal file
View File

@@ -0,0 +1,20 @@
REM ExternalProject can't cleanly extract a zip into an existing directory
REM Instead we extract to a subdir, and then move the directories we want
REM using this bat file.
REM This script is used by the SuperBuild CMakeLists.txt
echo %CD%
IF EXIST winDeps/3rdParty (
md 3rdParty
xcopy /Y /E winDeps/3rdParty 3rdParty
echo "Done copying Windows deps"
) ELSE (
IF EXIST winDeps/3rdParty.x64 (
md 3rdParty.x64
xcopy /Y /E winDeps/3rdParty.x64 3rdParty.x64
echo "Done copying Windows deps"
) ELSE (
echo "Error: Windows deps not found"
exit -1
)
)

133
post_upload.py Normal file
View File

@@ -0,0 +1,133 @@
#!/usr/bin/python
# this file runs on the download server (download.flightgear.org)
# from the Jenkins upload-via-ssh jobs. It ensures that only complete
# uploads are visible (and mirrored to SF).
import os, sys, re, fnmatch
from subprocess import call
suffix = '.dmg'
release_version = "unknown"
if sys.argv[1] == 'windows':
suffix = '.exe'
if sys.argv[1] == 'linux':
suffix = '.tar.bz2'
isRelease = False
if len(sys.argv) > 2 and sys.argv[2] == 'release':
isRelease = True
if len(sys.argv) > 3:
release_version = sys.argv[3]
allSuffix = '*' + suffix
print "Wildcard pattern is:" + allSuffix
pattern = r'\w+-(?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)([\w-]*)' + suffix
sourceForgeUserHost = "jmturner@frs.sourceforge.net"
sftpCommandFile = "sftp-commands"
symbolDir = "/home/jenkins/symbols"
if isRelease:
publicRoot = "/var/www/html/builds/rc"
incomingDir = "/home/jenkins/incoming"
sourceForgePath = "/home/frs/project/f/fl/flightgear/release-" + release_version + "/"
else:
publicRoot = "/var/www/html/builds/nightly"
incomingDir = "/home/jenkins/nightly-incoming"
sourceForgePath = "/home/frs/project/f/fl/flightgear/unstable/"
os.chdir(publicRoot)
def findFileVersion(dir):
for file in os.listdir(dir):
if fnmatch.fnmatch(file, allSuffix):
m = re.match(pattern, file)
if (m is not None):
return (m.group('major'), m.group('minor'), m.group('patch'))
return None
incomingVer = findFileVersion(incomingDir)
if incomingVer is None:
print "No incoming files found matching " + allSuffix
exit()
existingVer = findFileVersion('.')
# if files in dest location mis-match the version, archive them
# and re-create the symlinks
versionChange = (existingVer != incomingVer)
oldFiles = []
incomingFiles = []
newFiles = []
if versionChange:
print "Version number changing"
for file in os.listdir('.'):
if fnmatch.fnmatch(file, allSuffix):
if not os.path.islink(file):
oldFiles.append(file)
os.remove(file)
for file in os.listdir(incomingDir):
if fnmatch.fnmatch(file, allSuffix):
incomingFiles.append(file)
# copy and symlink
for file in incomingFiles:
# move it to the public location
srcFile = os.path.join(incomingDir, file)
outFile = file
# insert -rc before suffix
#if isRelease:
#m = re.match(r'(\w+-\d+\.\d+\.\d+[\w-]*)' + suffix, file)
#outFile = m.group(1) + '-rc' + suffix
#print "RC out name is " + outFile
os.rename(srcFile, outFile)
newFiles.append(outFile)
if not isRelease:
# symlink for stable web URL
m = re.match(r'(\w+)-\d+\.\d+\.\d+-([\w-]+)' + suffix, file)
latestName = m.group(1) + '-latest-' + m.group(2) + suffix
print "Creating symlink from " + file + " to " + latestName
if os.path.exists(latestName):
print "\tremoving existing target"
os.remove(latestName)
os.symlink(file, latestName)
# remove files from SF
#if len(oldFiles) > 0:
# f = open(sftpCommandFile, 'w')
# f.write("cd " + sourceForgePath + '\n')
# for file in oldFiles:
# print "Removing file " + file + " from SourceForge"
# f.write("rm " + file + '\n')
# f.write("bye\n")
# f.close()
#
# call(["sftp", "-b", sftpCommandFile, sourceForgeUserHost])
# os.remove(sftpCommandFile)
# upload to SourceForge
for file in newFiles:
print "Uploading " + file + " to SourceForge"
call(["scp", file, sourceForgeUserHost + ":" + sourceForgePath + file])
if sys.argv[1] == 'windows':
print "Archiving PDB files"
for file in os.listdir(incomingDir):
if fnmatch.fnmatch(file, "*.pdb"):
srcFile = os.path.join(incomingDir, file)
outFile = os.path.join(symbolDir, file)
os.rename(srcFile, outFile)

View File

@@ -0,0 +1,126 @@
-*- coding: utf-8 -*-
Quick start for the localization (l10n) scripts
===============================================
The following assumes that all of these are in present in
$FG_ROOT/Translations:
- the default translation (default/*.xml);
- the legacy FlightGear XML localization files (<language_code>/*.xml);
- except for 'fg-convert-translation-files' which creates them, existing
XLIFF 1.2 files (<language_code>/FlightGear-nonQt.xlf).
Note: the legacy FlightGear XML localization files are only needed by
'fg-convert-translation-files' when migrating to the XLIFF format. The
other scripts only need the default translation and obviously, for
'fg-update-translation-files', the current XLIFF files[1].
Creating XLIFF files from existing FlightGear legacy XML translation files
--------------------------------------------------------------------------
To get the initial XLIFF files (generated from the default translation in
$FG_ROOT/Translations/default as well as the legacy FlightGear XML
localization files in $FG_ROOT/Translations/<language_code>):
languages="de en_US es fr it nl pl pt zh_CN"
# Your shell must expand $languages as several words for the following
# commands to work. POSIX shell does that, Bash too apparently, but not Zsh
# (by default). In Zsh, you can use $=languages or ${=languages} to ensure
# the expansion uses word splitting.
fg-convert-translation-files --transl-dir="$FG_ROOT/Translations" $languages
# Add strings found in the default translation but missing in the legacy FG
# XML l10n files
fg-update-translation-files --transl-dir="$FG_ROOT/Translations" \
merge-new-master $languages
Updating XLIFF files to reflect changes in the default translation
------------------------------------------------------------------
When master strings[2] have changed (in a large sense, i.e.: strings added,
modified or removed, or categories added or removed[3]):
fg-update-translation-files --transl-dir="$FG_ROOT/Translations" \
merge-new-master $languages
Updating XLIFF files to mark or remove obsolete translated strings
------------------------------------------------------------------
To remove unused translated strings (not to be done too often in my opinion):
fg-update-translation-files --transl-dir="$FG_ROOT/Translations" \
remove-unused $languages
(you may replace 'remove-unused' with 'mark-unused' to just mark the strings
as not-to-be-translated, however 'merge-new-master' presented above already
does that)
Merging contents from an XLIFF file into another one
----------------------------------------------------
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 project 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.
Creating skeleton XLIFF files for new translations
--------------------------------------------------
To create skeleton translations for new languages (e.g., for fr_BE, en_AU and
ca):
1) Check (add if necessary) that flightgear/meta/i18n.py knows the plural
forms used in the new languages. This is done by editing PLURAL_FORMS
towards the top of this i18n.py file (very easy). If the existing entry
for, e.g., "zh" is sufficient for zh_TW or zh_HK, just let "zh" handle
them: it will be tried as fallback if there is no perfect match on
language and territory.
2) Run a command such as:
fg-new-translations --transl-dir="$FG_ROOT/Translations" fr_BE en_AU ca
(if you do this for only one language at a time, you can use the -o
option to precisely control where the output goes, otherwise
fg-new-translations chooses an appropriate place based on the value
specified for --transl-dir)
Getting more information on the scripts
---------------------------------------
fg-convert-translation-files, fg-update-translation-files,
fg-merge-xliff-into-xliff and fg-new-translations all support the --help
option for more detailed information.
Footnotes
---------
[1] Except for the fg-merge-xliff-into-xliff script, which doesn't have any
of these requirements.
[2] Strings in the default translation.
[3] Only empty categories are removed by this command. An obsolete category
can be made empty by manual editing (easy, just locate the right
<group>) or this way:
fg-update-translation-files --transl-dir=... mark-unused
fg-update-translation-files --transl-dir=... remove-unused
(note that this will remove *all* strings marked as unused in the first
step, not only those in some particular category!)

View File

@@ -0,0 +1,181 @@
#! /usr/bin/env python3
# -*- coding: utf-8 -*-
# fg-convert-translation-files --- Convert FlightGear's translation files
# Copyright (C) 2017 Florent Rougon
#
# 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 2 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, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
import argparse
import collections
import locale
import os
import sys
import flightgear.meta.logging
import flightgear.meta.i18n as fg_i18n
PROGNAME = os.path.basename(sys.argv[0])
# Only messages with severity >= info will be printed to the terminal (it's
# possible to also log all messages to a file regardless of their level, see
# the Logger class). Of course, there is also the standard logging module...
logger = flightgear.meta.logging.Logger(
progname=PROGNAME,
logLevel=flightgear.meta.logging.LogLevel.info,
defaultOutputStream=sys.stderr)
debug = logger.debug
info = logger.info
notice = logger.notice
warning = logger.warning
error = logger.error
critical = logger.critical
# We could use Translation.__str__(): not as readable (for now) but more
# accurate on metadata
def printPlainText(l10nResPoolMgr, translations):
"""Print output suitable for a quick review (by the programmer)."""
firstLang = True
for langCode, (transl, nbWhitespacePbs) in translations.items():
# 'transl' is a Translation instance
if firstLang:
firstLang = False
else:
print()
print("-" * 78 + "\n" + langCode + "\n" + "-" * 78)
print("\nNumber of leading and/or trailing whitespace problems: {}"
.format(nbWhitespacePbs))
for cat in transl:
print("\nCategory: {cat}\n{underline}".format(
cat=cat, underline="~"*(len("Category: ") + len(cat))))
t = transl[cat]
for tid, translUnit in sorted(t.items()):
# - Using '{master!r}' and '{transl!r}' prints stuff such as
# \xa0 for nobreak spaces, which can lead to the erroneous
# conclusion that there was an encoding problem.
# - Only printing the first target text here (no plural forms)
print("\n{id}\n '{sourceText}'\n '{targetText}'"
.format(id=tid.id(), sourceText=translUnit.sourceText,
targetText=translUnit.targetTexts[0]))
def writeXliff(l10nResPoolMgr, translations):
formatHandler = fg_i18n.XliffFormatHandler()
for langCode, translData in translations.items():
translation = translData.transl # Translation instance
if params.output_dir is None:
# Use default locations for the written xliff files
l10nResPoolMgr.writeTranslation(formatHandler, translation)
else:
basename = "{}-{}.{}".format(
formatHandler.defaultFileStem(langCode),
langCode,
formatHandler.standardExtension)
filePath = os.path.join(params.output_dir, basename)
formatHandler.writeTranslation(translation, filePath)
def processCommandLine():
params = argparse.Namespace()
parser = argparse.ArgumentParser(
usage="""\
%(prog)s [OPTION ...] LANGUAGE_CODE...
Convert FlightGear's old XML translation files into other formats.""",
description="""\
Most notably, XLIFF format can be chosen for output. The script performs
a few automated checks on the input files too.""",
formatter_class=argparse.RawDescriptionHelpFormatter,
# I want --help but not -h (it might be useful for something else)
add_help=False)
parser.add_argument("-t", "--transl-dir",
help="""\
directory containing all translation subdirs (such as
{default!r}, 'en_GB', 'fr_FR', 'de', 'it'...). This
"option" MUST be specified.""".format(
default=fg_i18n.DEFAULT_LANG_DIR))
parser.add_argument("lang_code", metavar="LANGUAGE_CODE", nargs="+",
help="""\
codes of languages to read translations for (don't
specify {default!r} this way, it is special and not a
language code)"""
.format(default=fg_i18n.DEFAULT_LANG_DIR))
parser.add_argument("-o", "--output-dir",
help="""\
output directory for written XLIFF files
(default: for each output file, use a suitable location
under TRANSL_DIR)""")
parser.add_argument("-f", "--output-format", default="xliff",
choices=("xliff", "text"), help="""\
format to use for the output files""")
parser.add_argument("--help", action="help",
help="display this message and exit")
params = parser.parse_args(namespace=params)
if params.transl_dir is None:
error("--transl-dir must be given, aborting")
sys.exit(1)
return params
def main():
global params
locale.setlocale(locale.LC_ALL, '')
params = processCommandLine()
l10nResPoolMgr = fg_i18n.L10NResourcePoolManager(params.transl_dir, logger)
# English version of all translatable strings
masterTransl, nbWhitespaceProblemsInMaster = \
l10nResPoolMgr.readFgMasterTranslation()
translations = collections.OrderedDict()
# Sort elements of 'translations' according to language code (= the keys)
for langCode in sorted(params.lang_code):
translationData = l10nResPoolMgr.readFgTranslation(masterTransl,
langCode)
translations[translationData.transl.targetLanguage] = translationData
if params.output_format == "xliff":
writeFunc = writeXliff # write to files
elif params.output_format == "text":
writeFunc = printPlainText # print to stdout
else:
assert False, \
"Unexpected output format: '{}'".format(params.output_format)
writeFunc(l10nResPoolMgr, translations)
nbWhitespaceProblemsInTransl = sum(
(translData.nbWhitespacePbs for translData in translations.values() ))
info("total number of leading and/or trailing whitespace problems: {}"
.format(nbWhitespaceProblemsInMaster + nbWhitespaceProblemsInTransl))
sys.exit(0)
if __name__ == "__main__": main()

View File

@@ -0,0 +1,123 @@
#! /usr/bin/env python3
# -*- coding: utf-8 -*-
# fg-merge-xliff-into-xliff --- Merge translations from one XLIFF file into
# another one
# Copyright (C) 2017 Florent Rougon
#
# 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 2 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, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
import argparse
import locale
import os
import sys
import flightgear.meta.logging
import flightgear.meta.i18n as fg_i18n
PROGNAME = os.path.basename(sys.argv[0])
# Only messages with severity >= info will be printed to the terminal (it's
# possible to also log all messages to a file regardless of their level, see
# the Logger class). Of course, there is also the standard logging module...
logger = flightgear.meta.logging.Logger(
progname=PROGNAME,
logLevel=flightgear.meta.logging.LogLevel.info,
defaultOutputStream=sys.stderr)
def processCommandLine():
params = argparse.Namespace()
parser = argparse.ArgumentParser(
usage="""\
%(prog)s [OPTION ...] SOURCE INTO
Merge strings from a FlightGear XLIFF localization file into another one.""",
description="""\
This program merges a FlightGear XLIFF localization file into another one.
This means that every translatable string that:
(1) exists in both SOURCE and INTO;
(2) has the same target language, source text, plural status and number of
plural forms in SOURCE and in INTO;
is updated from SOURCE, i.e.: the target texts, 'approved' status and
translator comments are copied from SOURCE.
The result is written to INTO unless the -o (--output) option is given.
Note that this program is different from fg-update-translation-files's
'merge-new-master' command, which is for updating an XLIFF file according to
the default translation ("master").
Expected use case: suppose that a translator is working on a translation
file, and meanwhile the official XLIFF file for this translation is updated
in the project repository (new translatable strings added, obsolete strings
marked or removed, etc.). This program can then be used to merge the
translator work into the project file for all strings for which it makes
sense (source text unchanged, same plural status, etc.).""",
formatter_class=argparse.RawDescriptionHelpFormatter,
# I want --help but not -h (it might be useful for something else)
add_help=False)
parser.add_argument("source", metavar="SOURCE",
help="""\
input XLIFF file; read updated translated strings
from this file""")
parser.add_argument("into", metavar="INTO",
help="""\
XLIFF file to compare to SOURCE in order to decide
which translated strings to update; unless the -o
option is used, updated strings are written to this
file""")
parser.add_argument("-o", "--output",
help="""\
write the XLIFF merged output to OUTPUT instead of
INTO. When this option is used, INTO is read but not
modified. If OUTPUT is '-', write the XLIFF merged
output to the standard output.""")
parser.add_argument("--help", action="help",
help="display this message and exit")
return parser.parse_args(namespace=params)
def mergeXliffIntoXliff(source, into, output):
formatHandler = fg_i18n.XliffFormatHandler()
srcTransl = formatHandler.readTranslation(source)
transl = formatHandler.readTranslation(into)
# Merge 'srcTransl' into 'transl'
transl.mergeNonMasterTransl(srcTransl, logger=logger)
# File path, or '-' for the standard output
outputFile = into if output is None else output
formatHandler.writeTranslation(transl, outputFile)
def main():
global params
locale.setlocale(locale.LC_ALL, '')
params = processCommandLine()
mergeXliffIntoXliff(params.source, params.into, params.output)
sys.exit(0)
if __name__ == "__main__": main()

View File

@@ -0,0 +1,120 @@
#! /usr/bin/env python3
# -*- coding: utf-8 -*-
# fg-new-translations --- Create new translations for FlightGear
# Copyright (C) 2017 Florent Rougon
#
# 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 2 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, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
import argparse
import collections
import locale
import os
import sys
import flightgear.meta.logging
import flightgear.meta.i18n as fg_i18n
PROGNAME = os.path.basename(sys.argv[0])
# Only messages with severity >= info will be printed to the terminal (it's
# possible to also log all messages to a file regardless of their level, see
# the Logger class). Of course, there is also the standard logging module...
logger = flightgear.meta.logging.Logger(
progname=PROGNAME,
logLevel=flightgear.meta.logging.LogLevel.info,
defaultOutputStream=sys.stderr)
def processCommandLine():
params = argparse.Namespace()
parser = argparse.ArgumentParser(
usage="""\
%(prog)s [OPTION ...] LANGUAGE_CODE...
Write the skeleton of XLIFF translation files.""",
description="""\
This program writes XLIFF translation files with the strings to translate
for the specified languages (target strings are empty). This is what you need
to start a translation for a new language.""",
formatter_class=argparse.RawDescriptionHelpFormatter,
# I want --help but not -h (it might be useful for something else)
add_help=False)
parser.add_argument("-t", "--transl-dir",
help="""\
directory containing all translation subdirs (such as
{default!r}, 'en_GB', 'fr_FR', 'de', 'it'...). This
"option" MUST be specified.""".format(
default=fg_i18n.DEFAULT_LANG_DIR))
parser.add_argument("lang_code", metavar="LANGUAGE_CODE", nargs="+",
help="""\
codes of languages to create translations for (e.g., fr,
fr_BE, en_GB, it, es_ES...)""")
parser.add_argument("-o", "--output-file",
help="""\
where to write the output to (use '-' for standard
output); if not specified, a suitable file under
TRANSL_DIR will be chosen for each LANGUAGE_CODE.
Note: this option can only be given when exactly one
LANGUAGE_CODE has been specified on the command
line (it doesn't make sense otherwise).""")
parser.add_argument("--output-format", default="xliff",
choices=fg_i18n.FORMAT_HANDLERS_NAMES,
help="format to use for the output files")
parser.add_argument("--help", action="help",
help="display this message and exit")
params = parser.parse_args(namespace=params)
if params.transl_dir is None:
logger.error("--transl-dir must be given, aborting")
sys.exit(1)
if params.output_file is not None and len(params.lang_code) > 1:
logger.error("--output-file can only be given when exactly one "
"LANGUAGE_CODE has been specified on the command line "
"(it doesn't make sense otherwise)")
sys.exit(1)
return params
def main():
global params
locale.setlocale(locale.LC_ALL, '')
params = processCommandLine()
l10nResPoolMgr = fg_i18n.L10NResourcePoolManager(params.transl_dir, logger)
xliffFormatHandler = fg_i18n.FORMAT_HANDLERS_MAP[params.output_format]()
if params.output_file is not None:
assert len(params.lang_code) == 1, params.lang_code
# Output to one file or to stdout
l10nResPoolMgr.writeSkeletonTranslation(
xliffFormatHandler, params.lang_code[0],
filePath=params.output_file)
else:
# Output to several files
for langCode in params.lang_code:
l10nResPoolMgr.writeSkeletonTranslation(xliffFormatHandler,
langCode)
sys.exit(0)
if __name__ == "__main__": main()

View File

@@ -0,0 +1,179 @@
#! /usr/bin/env python3
# -*- coding: utf-8 -*-
# fg-update-translation-files --- Merge new default translation,
# remove obsolete strings from a translation
# Copyright (C) 2017 Florent Rougon
#
# 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 2 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, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
import argparse
import enum
import locale
import os
import sys
import flightgear.meta.logging
import flightgear.meta.i18n as fg_i18n
PROGNAME = os.path.basename(sys.argv[0])
# Only messages with severity >= info will be printed to the terminal (it's
# possible to also log all messages to a file regardless of their level, see
# the Logger class). Of course, there is also the standard logging module...
logger = flightgear.meta.logging.Logger(
progname=PROGNAME,
logLevel=flightgear.meta.logging.LogLevel.info,
defaultOutputStream=sys.stderr)
def processCommandLine():
params = argparse.Namespace()
parser = argparse.ArgumentParser(
usage="""\
%(prog)s [OPTION ...] ACTION LANGUAGE_CODE...
Update FlightGear XLIFF localization files.""",
description="""\
This program performs the following operations (actions) on FlightGear XLIFF
translation files (*.xlf):
- [merge-new-master]
Read the default translation[1], add new translated strings it contains to
the XLIFF localization files corresponding to the specified language(s),
mark the translated strings in said files that need review (modified in
the default translation) as well as those that are not used anymore
(disappeared in the default translation, or marked in a way that says they
don't need to be translated);
- [mark-unused]
Read the default translation and mark translated strings (in the XLIFF
localization files corresponding to the specified language(s)) that are
not used anymore;
- [remove-unused]
In the XLIFF localization files corresponding to the specified
language(s), remove all translated strings that are marked as unused.
A translated string that is marked as unused is still present in the XLIFF
localization file; it is just presented in a way that tells translators they
don't need to worry about it. On the other hand, when a translated string is
removed, translators don't see it anymore and the translation is lost, except
if rescued by external means such as backups or version control systems (Git,
Subversion, etc.)
Note that the 'remove-unused' action does *not* imply 'mark-unused'. It only
removes translation units that are already marked as unused (i.e., with
translate="no"). Thus, it makes sense to do 'mark-unused' followed by
'remove-unused' if you really want to get rid of old translations (you need to
invoke the program twice, or make a small change for this). Leaving unused
translated strings marked as such in XLIFF files shouldn't harm much in
general on the short or mid-term: they only take some space.
[1] FlightGear XML files in $FG_ROOT/Translations/default containing strings
used for the default locale (English).""",
formatter_class=argparse.RawDescriptionHelpFormatter,
# I want --help but not -h (it might be useful for something else)
add_help=False)
parser.add_argument("-t", "--transl-dir",
help="""\
directory containing all translation subdirs (such as
{default!r}, 'en_GB', 'fr_FR', 'de', 'it'...). This
"option" MUST be specified.""".format(
default=fg_i18n.DEFAULT_LANG_DIR))
parser.add_argument("action", metavar="ACTION",
choices=("merge-new-master",
"mark-unused",
"remove-unused"),
help="""\
what to do: merge a new default (= master)
translation, or mark unused translation units, or
remove those already marked as unused from the XLIFF
files corresponding to each given LANGUAGE_CODE (i.e.,
those that are not in the default translation)""")
parser.add_argument("lang_code", metavar="LANGUAGE_CODE", nargs="+",
help="""\
codes of languages to operate on (e.g., fr, en_GB, it,
es_ES...)""")
parser.add_argument("--help", action="help",
help="display this message and exit")
params = parser.parse_args(namespace=params)
if params.transl_dir is None:
logger.error("--transl-dir must be given, aborting")
sys.exit(1)
return params
class MarkOrRemoveUnusedAction(enum.Enum):
mark, remove = range(2)
def markOrRemoveUnused(l10nResPoolMgr, action):
formatHandler = fg_i18n.XliffFormatHandler()
masterTransl = l10nResPoolMgr.readFgMasterTranslation().transl
for langCode in params.lang_code:
xliffPath = formatHandler.defaultFilePath(params.transl_dir, langCode)
transl = formatHandler.readTranslation(xliffPath)
if action == MarkOrRemoveUnusedAction.mark:
transl.markObsoleteOrVanished(masterTransl, logger=logger)
elif action == MarkOrRemoveUnusedAction.remove:
transl.removeObsoleteOrVanished(logger=logger)
else:
assert False, "unexpected action: {!r}".format(action)
l10nResPoolMgr.writeTranslation(formatHandler, transl,
filePath=xliffPath)
def mergeNewMaster(l10nResPoolMgr):
formatHandler = fg_i18n.XliffFormatHandler()
masterTransl = l10nResPoolMgr.readFgMasterTranslation().transl
for langCode in params.lang_code:
xliffPath = formatHandler.defaultFilePath(params.transl_dir, langCode)
transl = formatHandler.readTranslation(xliffPath)
transl.mergeMasterTranslation(masterTransl, logger=logger)
l10nResPoolMgr.writeTranslation(formatHandler, transl,
filePath=xliffPath)
def main():
global params
locale.setlocale(locale.LC_ALL, '')
params = processCommandLine()
l10nResPoolMgr = fg_i18n.L10NResourcePoolManager(params.transl_dir, logger)
if params.action == "mark-unused":
markOrRemoveUnused(l10nResPoolMgr, MarkOrRemoveUnusedAction.mark)
elif params.action == "remove-unused":
markOrRemoveUnused(l10nResPoolMgr, MarkOrRemoveUnusedAction.remove)
elif params.action == "merge-new-master":
mergeNewMaster(l10nResPoolMgr)
else:
assert False, "Bug: unexpected action: {!r}".format(params.action)
sys.exit(0)
if __name__ == "__main__": main()

View File

@@ -0,0 +1,58 @@
# -*- coding: utf-8 -*-
# exceptions.py --- Simple, general-purpose subclass of Exception
#
# Copyright (C) 2015, 2017 Florent Rougon
#
# 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 2 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, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
"""Simple, general-purpose Exception subclass."""
class FGPyException(Exception):
def __init__(self, message=None, *, mayCapitalizeMsg=True):
"""Initialize an FGPyException instance.
Except in cases where 'message' starts with a proper noun or
something like that, its first character should be given in
lower case. Automated treatments of this exception may print the
message with its first character changed to upper case, unless
'mayCapitalizeMsg' is False. In other words, if the case of the
first character of 'message' must not be changed under any
circumstances, set 'mayCapitalizeMsg' to False.
"""
self.message = message
self.mayCapitalizeMsg = mayCapitalizeMsg
def __str__(self):
return self.completeMessage()
def __repr__(self):
return "{}.{}({!r})".format(__name__, type(self).__name__, self.message)
# Typically overridden by subclasses with a custom constructor
def detail(self):
return self.message
def completeMessage(self):
if self.message:
return "{shortDesc}: {detail}".format(
shortDesc=self.ExceptionShortDescription,
detail=self.detail())
else:
return self.ExceptionShortDescription
ExceptionShortDescription = "FlightGear Python generic exception"

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,95 @@
# -*- coding: utf-8 -*-
# logging.py --- Simple logging infrastructure (mostly taken from FFGo)
# Copyright (C) 2015, 2017 Florent Rougon
#
# 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 2 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, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
import sys
from . import misc
class LogLevel(misc.OrderedEnum):
debug, info, notice, warning, error, critical = range(6)
# List containing the above log levels as strings in increasing priority order
allLogLevels = [member.name for member in LogLevel]
allLogLevels.sort(key=lambda n: LogLevel[n].value)
def _logFuncFactory(level):
def logFunc(self, *args, **kwargs):
self.log(LogLevel[level], True, *args, **kwargs)
def logFunc_noPrefix(self, *args, **kwargs):
self.log(LogLevel[level], False, *args, **kwargs)
return (logFunc, logFunc_noPrefix)
class Logger:
def __init__(self, progname=None, logLevel=LogLevel.notice,
defaultOutputStream=sys.stdout, logFile=None):
self.progname = progname
self.logLevel = logLevel
self.defaultOutputStream = defaultOutputStream
self.logFile = logFile
def setLogFile(self, *args, **kwargs):
self.logFile = open(*args, **kwargs)
def log(self, level, printLogLevel, *args, **kwargs):
if printLogLevel and level >= LogLevel.warning and args:
args = [level.name.upper() + ": " + args[0]] + list(args[1:])
if level >= self.logLevel:
if (self.progname is not None) and args:
tArgs = [self.progname + ": " + args[0]] + list(args[1:])
else:
tArgs = args
kwargs["file"] = self.defaultOutputStream
print(*tArgs, **kwargs)
if self.logFile is not None:
kwargs["file"] = self.logFile
print(*args, **kwargs)
# Don't overload log() with too many tests or too much indirection for
# little use
def logToFile(self, *args, **kwargs):
kwargs["file"] = self.logFile
print(*args, **kwargs)
# NP functions are “no prefix” variants which never prepend the log level
# (otherwise, it is only prepended for warning and higher levels).
debug, debugNP = _logFuncFactory("debug")
info, infoNP = _logFuncFactory("info")
notice, noticeNP = _logFuncFactory("notice")
warning, warningNP = _logFuncFactory("warning")
error, errorNP = _logFuncFactory("error")
critical, criticalNP = _logFuncFactory("critical")
class DummyLogger(Logger):
def setLogFile(self, *args, **kwargs):
pass
def log(self, *args, **kwargs):
pass
def logToFile(self, *args, **kwargs):
pass

View File

@@ -0,0 +1,81 @@
# -*- coding: utf-8 -*-
# misc.py --- Miscellaneous classes and/or functions
# Copyright (C) 2015-2017 Florent Rougon
#
# 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 2 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, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
import enum
# Based on an example from the 'enum' documentation
class OrderedEnum(enum.Enum):
"""Base class for enumerations whose members can be ordered.
Contrary to enum.IntEnum, this class maintains normal enum.Enum
invariants, such as members not being comparable to members of other
enumerations (nor of any other class, actually).
"""
def __ge__(self, other):
if self.__class__ is other.__class__:
return self.value >= other.value
return NotImplemented
def __gt__(self, other):
if self.__class__ is other.__class__:
return self.value > other.value
return NotImplemented
def __le__(self, other):
if self.__class__ is other.__class__:
return self.value <= other.value
return NotImplemented
def __lt__(self, other):
if self.__class__ is other.__class__:
return self.value < other.value
return NotImplemented
def __eq__(self, other):
if self.__class__ is other.__class__:
return self.value == other.value
return NotImplemented
def __ne__(self, other):
if self.__class__ is other.__class__:
return self.value != other.value
return NotImplemented
# Taken from <http://effbot.org/zone/element-lib.htm#prettyprint> and modified
# by Florent Rougon
def indentXmlTree(elem, level=0, basicOffset=2, lastChild=False):
def indentation(level):
return "\n" + level*basicOffset*" "
if len(elem):
if not elem.text or not elem.text.strip():
elem.text = indentation(level+1)
for e in elem[:-1]:
indentXmlTree(e, level+1, basicOffset, False)
if len(elem):
indentXmlTree(elem[-1], level+1, basicOffset, True)
if level and (not elem.tail or not elem.tail.strip()):
if lastChild:
elem.tail = indentation(level-1)
else:
elem.tail = indentation(level)

View File

@@ -0,0 +1,172 @@
#! /usr/bin/env python3
# -*- coding: utf-8 -*-
# rebuild-fgdata-embedded-resources -- Rebuild FGData-resources.[ch]xx
# Copyright (C) 2017 Florent Rougon
#
# 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 2 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, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
# Only standard modules so that distributors can easily run this script, in
# case they want to recreate FGData-resources.[ch]xx from source.
import argparse
import json
import locale
import logging
import os
import subprocess
import sys
PROGNAME = os.path.basename(sys.argv[0])
CONFIG_FILE = os.path.join(os.path.expanduser('~'),
".fgmeta",
PROGNAME + ".json")
# chLevel: console handler level
def setupLogging(level=logging.NOTSET, chLevel=None):
global logger
if chLevel is None:
chLevel = level
logger = logging.getLogger(__name__)
# Effective level for all child loggers with NOTSET level
logger.setLevel(level)
# Create console handler and set its level
ch = logging.StreamHandler() # Uses sys.stderr by default
ch.setLevel(chLevel) # NOTSET, DEBUG, INFO, WARNING, ERROR, CRITICAL
# Logger name with :%(name)s... many other things available, including
# %(levelname)s
formatter = logging.Formatter("{}: %(message)s".format(PROGNAME))
# Add formatter to ch
ch.setFormatter(formatter)
# Add ch to logger
logger.addHandler(ch)
# Modifies 'params' in-place
def loadCfgFileSection(params, jsonTree, title, items):
# NB: !!! each item is subject to os.path.expanduser() !!!
try:
section = jsonTree[title]
except KeyError:
pass
else:
for name in items:
try:
path = section[name]
except KeyError:
pass
else:
setattr(params, name.lower(), os.path.expanduser(path))
# Modifies 'params' in-place
def loadConfigFile(params):
if not os.path.isfile(CONFIG_FILE):
return
# The log level is set too late for this one -> commented out
# logger.info("Loading config file {}...".format(CONFIG_FILE))
with open(CONFIG_FILE, "r", encoding="utf-8") as cfgFile:
tree = json.load(cfgFile)
loadCfgFileSection(params, tree, "repositories", ("FlightGear", "FGData"))
loadCfgFileSection(params, tree, "executables", ("fgrcc",))
def processCommandLine(params):
parser = argparse.ArgumentParser(
usage="""\
%(prog)s [OPTION ...]
Rebuild FGData embedded resources for FlightGear.""",
description="""\
Use fgrcc with FGData-resources.xml and the corresponding files in FGData to
(re)create the FGData-resources.[ch]xx files used in the FlightGear build. The
existing files in the FlightGear repository are always overwritten
(FGData-resources.[ch]xx in <FlightGear-repo>/src/EmbeddedResources).
This is a dumb script that simply calls fgrcc with appropriate parameters. In
order to save some typing, you may want to use a configuration file like this
(~/.fgmeta/%(prog)s.json):
{"repositories": {"FlightGear": "~/flightgear/src/flightgear",
"FGData": "~/flightgear/src/fgdata"},
"executables": {"fgrcc":
"~/flightgear/src/build-fg/src/EmbeddedResources/fgrcc"
}
}""",
formatter_class=argparse.RawDescriptionHelpFormatter,
# I want --help but not -h (it might be useful for something else)
add_help=False)
parser.add_argument('--flightgear', action='store', help="""\
Path to the FlightGear repository""")
parser.add_argument('--fgdata', action='store', help="""\
Path to the FGData repository""")
parser.add_argument('--fgrcc', action='store', help="""\
Path to the fgrcc executable""")
parser.add_argument('--log-level', action='store',
choices=("debug", "info", "warning", "error",
"critical"),
default=None, help="""Set the log level""")
parser.add_argument('--help', action="help",
help="display this message and exit")
parser.parse_args(namespace=params)
# Don't use the 'default' argparse mechanism for this, in order to allow
# the config file to set the log level in a meaningful way if we want (not
# implemented at the time of this writing).
if params.log_level is not None:
logger.setLevel(getattr(sys.modules["logging"],
params.log_level.upper()))
def main():
locale.setlocale(locale.LC_ALL, '')
setupLogging(level=logging.INFO) # may be overridden by options
params = argparse.Namespace()
loadConfigFile(params) # could set the log level
processCommandLine(params)
if (params.flightgear is None or params.fgdata is None or
params.fgrcc is None):
logger.error(
"--flightgear, --fgdata and --fgrcc must all be specified (they "
"may be set in the config file; use --help for more info)")
sys.exit(1)
resDir = os.path.join(params.flightgear, "src", "EmbeddedResources")
inputXMLFile = os.path.join(resDir, "FGData-resources.xml")
cxxFile = os.path.join(resDir, "FGData-resources.cxx")
hxxFile = os.path.join(resDir, "FGData-resources.hxx")
args = [params.fgrcc,
"--root={}".format(params.fgdata),
"--output-cpp-file={}".format(cxxFile),
"--init-func-name=initFGDataEmbeddedResources",
"--output-header-file={}".format(hxxFile),
"--output-header-identifier=_FG_FGDATA_EMBEDDED_RESOURCES",
inputXMLFile]
# encoding="utf-8" requires Python >= 3.6 -> will add it later
# (it's not really needed, as we don't process the output)
subprocess.run(args, check=True)
sys.exit(0)
if __name__ == "__main__": main()

View File

@@ -0,0 +1,71 @@
#!/bin/bash
#This file is part of FlightGear
#
#FlightGear 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 2 of the License, or
#(at your option) any later version.
#
#FlightGear 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 FlightGear If not, see <http://www.gnu.org/licenses/>.
if [ -z "$1" -o -z "$2" ]; then
echo "usage: thismajor.thisminor nextmajor.nextminor path"
exit
fi
IFS='.' read -r -a VERSION_A <<< "$1"
shift
if [ ${#VERSION_A[@]} != 2 ]; then
echo "Need version as 'number.number'"
exit
fi
THIS_MAJOR_VERSION=${VERSION_A[0]}
THIS_MINOR_VERSION=${VERSION_A[1]}
RELEASE_BRANCH="release/${THIS_MAJOR_VERSION}.${THIS_MINOR_VERSION}"
IFS='.' read -r -a VERSION_A <<< "$1"
shift
if [ ${#VERSION_A[@]} != 2 ]; then
echo "Need version as 'number.number'"
exit
fi
NEXT_MAJOR_VERSION=${VERSION_A[0]}
NEXT_MINOR_VERSION=${VERSION_A[1]}
setVersionTo() {
local V="$1"
echo "setting version to $V"
echo "$V" > version
git add version
echo "new version: $V" | git commit --file=-
git tag "version/$V"
}
createBranch() {
echo "Preparing release in `pwd`"
git checkout next
git pull --rebase
setVersionTo "${THIS_MAJOR_VERSION}.${THIS_MINOR_VERSION}.1"
echo "Creating branch $RELEASE_BRANCH for version $(cat version) in `pwd`"
git branch "$RELEASE_BRANCH"
setVersionTo "${NEXT_MAJOR_VERSION}.${NEXT_MINOR_VERSION}.0"
}
while [ $# -gt 0 ]; do
echo "Processing $1"
pushd $1 > /dev/null
createBranch
popd > /dev/null
shift
done

View File

@@ -0,0 +1,44 @@
#!/bin/bash
THIS_RELEASE="2018.2"
NEXT_RELEASE="2018.3"
SUBMODULES="simgear flightgear fgdata getstart"
#:<< 'COMMENT_END'
git checkout next
git pull --rebase
$(dirname $0)/create-release-branch-for.sh "$THIS_RELEASE" "$NEXT_RELEASE" $SUBMODULES .
# use release branch for submodules
git checkout release/${THIS_RELEASE}
for f in $SUBMODULES; do
git config -f .gitmodules submodule.${f}.branch release/${THIS_RELEASE}
done
git add .gitmodules && echo "set correct release-branch for submodules" | git commit --file=-
# track submodule changes
git checkout next
git add $SUBMODULES && echo "track submodule changes for release" | git commit --file=-
#COMMENT_END
echo "Check this and submodules $SUBMODULES - hit <enter> to push or <ctrl-c> to cancel"
read something
for f in $SUBMODULES .; do
pushd "$f"
echo "Pushing $f"
git checkout release/${THIS_RELEASE} && git push origin release/${THIS_RELEASE} && git push origin version/${THIS_RELEASE}.1 && git push origin version/${NEXT_RELEASE}.0 && git checkout next && git push
popd
done
#this needs ~/.ssh/config to contain this
#HOST sf svn.code.sf.net
# HOSTNAME svn.code.sf.net
# IdentityFile ~/.ssh/your_sf_keyfile
# IdentitiesOnly yes
# User user_sf_username
svn copy svn+ssh://svn.code.sf.net/p/flightgear/fgaddon/trunk \
svn+ssh://svn.code.sf.net/p/flightgear/fgaddon/branches/release-${THIS_RELEASE} \
-m "branching for release ${THIS_RELEASE}"

Submodule simgear updated: cfda390557...489573329e

1
version Normal file
View File

@@ -0,0 +1 @@
2018.2.1

19
webhooks.xml Normal file
View File

@@ -0,0 +1,19 @@
<?xml version="1.0"?>
<!--
The <regex> field is evaluated by preg_match
http://php.net/manual/en/function.preg-match.php
-->
<PropertyList>
<webhook>
<regex>/^Merge branch/</regex>
<description>Detect merge branch when rebase has been ommited</description>
</webhook>
<webhook>
<regex>/^test$/</regex>
<description>Detect for dummy message</description>
</webhook>
<webhook>
<regex>/blabla/</regex>
<description>Detect for bad commit description</description>
</webhook>
</PropertyList>

1
windows-3rd-party Submodule

Submodule windows-3rd-party added at 790648cd69