Compare commits

..

42 Commits

Author SHA1 Message Date
James Turner
fe461bbdcb New version: 2019.1.2 2019-08-09 14:08:58 +02:00
Torsten Dreyer
216a0ac75b set correct release-branch for submodules 2019-03-13 21:21:07 +01:00
Torsten Dreyer
72bd67c6ef new version: 2019.1.1 2019-03-13 21:21:07 +01:00
Torsten Dreyer
ac35f4d20f Prepare for 2019.1 2019-03-13 21:20:46 +01:00
Florent Rougon
56e1055dec download_and_compile.sh: improvements related to package installation
- When -pn has been passed (i.e., the user wants the 'apt-get install'
  step to be skipped), don't waste time checking the available
  dependencies. Rationale: someone using -pn has probably already
  installed the required packages either manually or during a previous
  run of download_and_compile.sh, and anything missing couldn't be fixed
  under -pn regime anyway, by definition. Assume that users passing -pn
  want to build with the packages they already have, and let them spare
  some time and CPU cycles.

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

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

  6d6e1809f0/

and more specifically to

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

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

--git-clone-default-proto=PROTO

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

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

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

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

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

 (replace 'frougon' with your username at SourceForge)

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

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

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

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

Try to improve formatting of the --help message, so that it is better
suited to document options that have a short as well as a long form.
Make the presentation of this help message a bit more standard.
2018-09-26 00:17:29 +02:00
Florent Rougon
d073c54c0d download_and_compile.sh: move first main chunk of code after function definitions 2018-09-26 00:17:29 +02:00
Florent Rougon
705bd47bcd download_and_compile.sh: download FGData before building FG
This works better with the new translation system based on XLIFF files.
2018-09-26 00:17:29 +02:00
Florent Rougon
4128259e8e download_and_compile.sh: add missing deps and downgrade qt5-default, qtdeclarative5-dev
- add missing deps as suggested on the list
- downgrade qt5-default and qtdeclarative5-dev from mandatory to
  optional
2018-09-26 00:17:29 +02:00
Scott Giese
44bdb42fd0 fg-from-scratch: Improve handling of missing 'build' folders. 2018-09-24 18:35:57 -05:00
Torsten Dreyer
7de0f9f524 track submodule changes for release 2018-09-21 17:22:27 +02:00
Torsten Dreyer
1e3ac37c96 new version: 2018.4.0 2018-09-21 17:22:27 +02:00
28 changed files with 1135 additions and 390 deletions

2
.gitignore vendored
View File

@@ -1,6 +1,6 @@
dist
.DS_Store
install
install*/
3rdParty
3rdParty.x64
boost_1_44_0

8
.gitmodules vendored
View File

@@ -1,11 +1,11 @@
[submodule "simgear"]
path = simgear
url = ../simgear
branch = release/2018.3
branch = release/2019.1
[submodule "flightgear"]
path = flightgear
url = ../flightgear
branch = release/2018.3
branch = release/2019.1
[submodule "fgrun"]
path = fgrun
url = ../fgrun
@@ -13,7 +13,7 @@
[submodule "fgdata"]
path = fgdata
url = ../fgdata
branch = release/2018.3
branch = release/2019.1
[submodule "windows-3rd-party"]
path = windows-3rd-party
url = ../windows-3rd-party
@@ -21,4 +21,4 @@
[submodule "getstart"]
path = getstart
url = ../getstart
branch = release/2018.3
branch = release/2019.1

View File

@@ -2,7 +2,8 @@
import argparse
import datetime
import xml.etree.cElementTree as ET
#import xml.etree.cElementTree as ET
import lxml.etree as ET
import os
import re
import sgprops
@@ -212,7 +213,7 @@ def append_author_nodes(node, info):
# traditional single author string
node.append( make_xml_leaf('author', info['author']) )
def make_aircraft_node(aircraftDirName, package, variants, downloadBase):
def make_aircraft_node(aircraftDirName, package, variants, downloadBase, mirrors):
#print "package:", package
#print "variants:", variants
package_node = ET.Element('package')
@@ -261,9 +262,15 @@ def make_aircraft_node(aircraftDirName, package, variants, downloadBase):
package_node.append( make_xml_leaf('dir', aircraftDirName) )
# primary URL is first
download_url = downloadBase + aircraftDirName + '.zip'
package_node.append( make_xml_leaf('url', download_url) )
for m in mirrors:
mu = m + aircraftDirName + '.zip'
package_node.append( make_xml_leaf('url', mu) )
if 'thumbnail' in package:
thumbnail_url = downloadBase + 'thumbnails/' + aircraftDirName + '_' + package['thumbnail']
package_node.append( make_xml_leaf('thumbnail', thumbnail_url) )

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -2,7 +2,8 @@
from xml.sax import make_parser, handler, expatreader
# ElementTree for writing
import xml.etree.cElementTree as ET
#import xml.etree.cElementTree as ET
import lxml.etree as ET
import re, os

View File

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

View File

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

View File

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

View File

@@ -24,10 +24,13 @@ parser.add_argument("--no-update",
action="store_true")
parser.add_argument("--clean", help="Force regeneration of all zip files",
action="store_true")
parser.add_argument("--quiet", help="Only print warnings and errors",
action="store_true")
parser.add_argument("dir", help="Catalog directory")
args = parser.parse_args()
includes = []
mirrors = [] # mirror base URLs
# xml node (robust) get text helper
def get_xml_text(e):
@@ -64,7 +67,8 @@ def scan_dir_for_change_date_mtime(path):
return maxsec
def make_aircraft_zip(repo_path, name, zip_file):
print "Updating:", name + '.zip'
if (not args.quiet):
print "Updating:", name + '.zip'
savedir = os.getcwd()
os.chdir(repo_path)
if os.path.exists(zip_file):
@@ -129,6 +133,7 @@ def process_aircraft_dir(name, repo_path):
global output_dir
global valid_zips
global previews_dir
global mirrors
aircraft_dir = os.path.join(repo_path, name)
if not os.path.isdir(aircraft_dir):
@@ -136,12 +141,14 @@ def process_aircraft_dir(name, repo_path):
(package, variants) = catalog.scan_aircraft_dir(aircraft_dir, includes)
if package == None:
print "skipping:", name, "(no -set.xml files)"
if not args.quiet:
print "skipping:", name, "(no -set.xml files)"
return
print "%s:" % name,
if not args.quiet:
print "%s:" % name,
package_node = catalog.make_aircraft_node(name, package, variants, download_base)
package_node = catalog.make_aircraft_node(name, package, variants, download_base, mirrors)
download_url = download_base + name + '.zip'
if 'thumbnail' in package:
@@ -168,11 +175,13 @@ def process_aircraft_dir(name, repo_path):
or dir_mtime > os.path.getmtime(zipfile) \
or args.clean:
# rebuild zip file
print "updating:", zipfile
if not args.quiet:
print "updating:", zipfile
make_aircraft_zip(repo_path, name, zipfile)
md5sum = get_md5sum(zipfile)
else:
print "(no change)"
if not args.quiet:
print "(no change)"
if md5sum == "":
md5sum = get_md5sum(zipfile)
filesize = os.path.getsize(zipfile)
@@ -186,6 +195,18 @@ def process_aircraft_dir(name, repo_path):
else:
md5sum_root.append( catalog.make_xml_leaf('aircraft_' + name, md5sum) )
# handle sharing
if share_md5sum_root != None:
sharedNode = share_md5sum_root.find(str('aircraft_' + name))
if node != None:
shared_md5 = get_xml_text(sharedNode)
if shared_md5 == md5sum:
if not args.quiet:
print "Sharing zip with share catalog for:",name
os.remove(zipfile)
os.symlink(os.path.join( share_output_dir, name + '.zip' ), zipfile)
# handle thumbnails
copy_thumbnails_for_package(package, variants, name, aircraft_dir, thumbnail_dir)
@@ -224,11 +245,31 @@ else:
md5sum_root = ET.Element('PropertyList')
md5sum_tree = ET.ElementTree(md5sum_root)
# share .zip files with other output dirs
share_output_dir = get_xml_text(config_node.find('share-output'))
share_md5_file = get_xml_text(config_node.find('share-md5-sums'))
if share_output_dir != '' and share_md5_file != '':
print 'Output shared with:', share_output_dir
share_md5sum_tree = ET.parse(share_md5_file, parser)
share_md5sum_root = share_md5sum_tree.getroot()
else:
share_md5sum_root = None
# SCM providers
scm_list = config_node.findall('scm')
upload_node = config_node.find('upload')
download_base = get_xml_text(config_node.find('download-url'))
if not download_base.endswith('/'):
download_base += '/'
download_base = None
for i in config_node.findall("download-url"):
url = get_xml_text(i)
if not url.endswith('/'):
url += '/'
if download_base == None:
# download_base is the first entry
download_base = url
else:
mirrors.append(url)
output_dir = get_xml_text(config_node.find('local-output'))
if output_dir == '':
@@ -300,7 +341,8 @@ for scm in scm_list:
names = os.listdir(repo_path)
for name in sorted(names, key=lambda s: s.lower()):
if name in skip_list:
print "skipping:", name
if not args.quiet:
print "skipping:", name
continue
# process each aircraft in turn

File diff suppressed because it is too large Load Diff

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

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

View File

@@ -46,8 +46,10 @@ IF NOT EXIST vcpkg-git/NUL (
)
cd %ROOT_DIR%
IF NOT EXIST openscenegraph-3.4-git/NUL (
IF NOT EXIST openscenegraph-3.4-build/NUL (
mkdir openscenegraph-3.4-build
)
IF NOT EXIST openscenegraph-3.4-git/NUL (
echo Downloading OpenSceneGraph . . .
git clone -b OpenSceneGraph-3.4 https://github.com/openscenegraph/OpenSceneGraph.git openscenegraph-3.4-git
) ELSE (
@@ -57,8 +59,10 @@ IF NOT EXIST openscenegraph-3.4-git/NUL (
)
cd %ROOT_DIR%
IF NOT EXIST simgear-git/NUL (
IF NOT EXIST simgear-build/NUL (
mkdir simgear-build
)
IF NOT EXIST simgear-git/NUL (
echo Downloading SimGear . . .
git clone -b next https://git.code.sf.net/p/flightgear/simgear simgear-git
) ELSE (
@@ -68,8 +72,10 @@ IF NOT EXIST simgear-git/NUL (
)
cd %ROOT_DIR%
IF NOT EXIST flightgear-git/NUL (
IF NOT EXIST flightgear-build/NUL (
mkdir flightgear-build
)
IF NOT EXIST flightgear-git/NUL (
echo Downloading FlightGear . . .
git clone -b next https://git.code.sf.net/p/flightgear/flightgear flightgear-git
) ELSE (
@@ -79,8 +85,10 @@ IF NOT EXIST flightgear-git/NUL (
)
cd %ROOT_DIR%
IF NOT EXIST terragear-git/NUL (
IF NOT EXIST terragear-build/NUL (
mkdir terragear-build
)
IF NOT EXIST terragear-git/NUL (
echo Downloading TerraGear . . .
git clone -b next https://git.code.sf.net/p/flightgear/terragear terragear-git
) ELSE (

View File

@@ -0,0 +1,202 @@
#!/bin/bash
# fg-from-scratch - Linux utility to download, compile, and stage TerraGear and its dependencies
# Copyright (C) 2018 Scott Giese (xDraconian) scttgs0@gmail.com
# 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.
QT_SELECT=qt5
ROOT_DIR=${PWD}
PATH=${ROOT_DIR}/vcpkg-git/installed/x64-linux/bin:${PATH}
CMAKE_TOOLCHAIN="Ninja"
CHIPSET=$(gcc -march=native -Q --help=target | grep -- '-march=' | cut -f3)
QT5x64=$(qtpaths --install-prefix)
QT5x64_LIB=${QT5x64}/lib
QT5x64_CMAKE=${QT5x64_LIB}/cmake
QT5x64_PKGCONFIG=${QT5x64_LIB}/pkgconfig
export PKG_CONFIG_PATH=${ROOT_DIR}/scratch-install/lib64/pkgconfig:${ROOT_DIR}/vcpkg-git/installed/x64-linux/lib/pkgconfig:${QT5x64_PKGCONFIG}
echo ${QT5x64}
if [ ! -d "vcpkg-git" ]
then
echo Preparing to install external libraries via vcpkg . . .
git clone https://github.com/Microsoft/vcpkg.git vcpkg-git
echo Compiling vcpkg
cd vcpkg-git
./bootstrap-vcpkg.sh
echo Compiling external libraries . . .
./vcpkg install --triplet x64-linux boost cgal curl freeglut freetype glew jasper libxml2 openal-soft openssl plib sdl2 tiff zlib
else
echo Updating vcpkg . . .
cd vcpkg-git
PULL_RESULT=$(git pull)
if [ "${PULL_RESULT}" != "Already up to date." ]
then
echo Compiling vcpkg
./bootstrap-vcpkg.sh
fi
echo Updating external libraries . . .
./vcpkg update
./vcpkg upgrade --triplet x64-linux --no-dry-run
echo Compiling external libraries . . .
./vcpkg install --triplet x64-linux boost cgal curl freeglut freetype glew jasper libxml2 openal-soft openssl plib sdl2 tiff zlib
fi
cd ${ROOT_DIR}
if [ ! -d "scratch-source" ]
then
mkdir scratch-source
fi
if [ ! -d "scratch-build" ]
then
mkdir scratch-build
fi
if [ ! -d "scratch-install" ]
then
mkdir scratch-install
fi
if [ ! -d "scratch-build/openscenegraph-3.4" ]
then
mkdir scratch-build/openscenegraph-3.4
fi
if [ ! -d "scratch-source/openscenegraph-3.4-git" ]
then
echo Downloading OpenSceneGraph . . .
git clone -b OpenSceneGraph-3.4 https://github.com/openscenegraph/OpenSceneGraph.git scratch-source/openscenegraph-3.4-git
else
echo Updating OpenSceneGraph . . .
cd scratch-source/openscenegraph-3.4-git
git pull
fi
cd ${ROOT_DIR}
if [ ! -d "scratch-build/simgear" ]
then
mkdir scratch-build/simgear
fi
if [ ! -d "scratch-source/simgear-git" ]
then
echo Downloading SimGear . . .
git clone -b next https://git.code.sf.net/p/flightgear/simgear scratch-source/simgear-git
else
echo Updating SimGear . . .
cd scratch-source/simgear-git
git pull
fi
cd ${ROOT_DIR}
if [ ! -d "scratch-build/flightgear" ]
then
mkdir scratch-build/flightgear
fi
if [ ! -d "scratch-source/flightgear-git" ]
then
echo Downloading FlightGear . . .
git clone -b next https://git.code.sf.net/p/flightgear/flightgear scratch-source/flightgear-git
else
echo Updating FlightGear . . .
cd scratch-source/flightgear-git
git pull
fi
cd ${ROOT_DIR}
if [ ! -d "scratch-build/terragear" ]
then
mkdir scratch-build/terragear
fi
if [ ! -d "scratch-source/terragear-git" ]
then
echo Downloading TerraGear . . .
git clone -b next https://git.code.sf.net/p/flightgear/terragear scratch-source/terragear-git
else
echo Updating TerraGear . . .
cd scratch-source/terragear-git
git pull
fi
cd ${ROOT_DIR}
echo Compiling OpenSceneGraph . . .
cd scratch-build/openscenegraph-3.4
cmake ../../scratch-source/openscenegraph-3.4-git -G ${CMAKE_TOOLCHAIN} \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=${ROOT_DIR}/scratch-install \
-DCMAKE_PREFIX_PATH=${ROOT_DIR}/scratch-install/lib:${ROOT_DIR}/vcpkg-git/installed/x64-linux/lib:${QT5x64_LIB} \
-DCMAKE_CXX_FLAGS="-march=${CHIPSET} -mtune=${CHIPSET}" \
-DCMAKE_C_FLAGS="-march=${CHIPSET} -mtune=${CHIPSET}" \
-DBUILD_DOCUMENTATION:BOOL=1 \
-DBUILD_OSG_APPLICATIONS:BOOL=1 \
-DQt5Core_DIR=${QT5x64_CMAKE}/Qt5Core \
-DQt5Gui_DIR=${QT5x64_CMAKE}/Qt5Gui \
-DQt5OpenGL_DIR=${QT5x64_CMAKE}/Qt5OpenGL \
-DQt5Widgets_DIR=${QT5x64_CMAKE}/Qt5Widgets
cmake --build . --config Release --target install
cd ${ROOT_DIR}
echo Compiling SimGear . . .
cd scratch-build/simgear
cmake ../../scratch-source/simgear-git -G ${CMAKE_TOOLCHAIN} \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=${ROOT_DIR}/scratch-install \
-DCMAKE_PREFIX_PATH=${ROOT_DIR}/scratch-install/lib:${ROOT_DIR}/vcpkg-git/installed/x64-linux/lib:${QT5x64} \
-DCMAKE_CXX_FLAGS="-march=${CHIPSET} -mtune=${CHIPSET}" \
-DCMAKE_C_FLAGS="-march=${CHIPSET} -mtune=${CHIPSET}"
cmake --build . --config Release --target install
cd ${ROOT_DIR}
echo Compiling FlightGear . . .
cd scratch-build/flightgear
cmake ../../scratch-source/flightgear-git -G ${CMAKE_TOOLCHAIN} \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=${ROOT_DIR}/scratch-install \
-DCMAKE_PREFIX_PATH=${ROOT_DIR}/scratch-install/lib:${ROOT_DIR}/vcpkg-git/installed/x64-linux/lib:${QT5x64_LIB} \
-DCMAKE_CXX_FLAGS="-march=${CHIPSET} -mtune=${CHIPSET}" \
-DCMAKE_C_FLAGS="-march=${CHIPSET} -mtune=${CHIPSET}" \
-DOSG_FSTREAM_EXPORT_FIXED:BOOL=1 \
-DENABLE_JSBSIM:BOOL=1 \
-DENABLE_GPSSMOOTH:BOOL=1 \
-DENABLE_FGVIEWER:BOOL=1 \
-DENABLE_STGMERGE:BOOL=0 \
-DQt5Core_DIR=${QT5x64_CMAKE}/Qt5Core \
-DQt5Gui_DIR=${QT5x64_CMAKE}/Qt5Gui \
-DQt5LinguistTools_DIR=${QT5x64_CMAKE}/Qt5LinguistTools \
-DQt5Network_DIR=${QT5x64_CMAKE}/Qt5Network \
-DQt5Qml_DIR=${QT5x64_CMAKE}/Qt5Qml \
-DQt5Quick_DIR=${QT5x64_CMAKE}/Qt5Quick \
-DQt5Svg_DIR=${QT5x64_CMAKE}/Qt5Svg \
-DQt5Widgets_DIR=${QT5x64_CMAKE}/Qt5Widgets \
-DQt5_DIR=${QT5x64_CMAKE}/Qt5
cmake --build . --config Release --target install
cd ${ROOT_DIR}
echo Compiling TerraGear . . .
cd scratch-build/terragear
cmake ../../scratch-source/terragear-git -G ${CMAKE_TOOLCHAIN} \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=${ROOT_DIR}/scratch-install \
-DCMAKE_PREFIX_PATH=${ROOT_DIR}/scratch-install/lib:${ROOT_DIR}/vcpkg-git/installed/x64-linux/lib:${QT5x64_LIB} \
-DCMAKE_CXX_FLAGS="-march=${CHIPSET} -mtune=${CHIPSET}" \
-DCMAKE_C_FLAGS="-march=${CHIPSET} -mtune=${CHIPSET}"
cmake --build . --config Release --target install
cd ${ROOT_DIR}
echo All done!

2
fgdata

Submodule fgdata updated: 87133520e7...dade6b7218

View File

@@ -23,15 +23,16 @@ echo "Starting on SimGear"
pushd sgBuild
cmake -DCMAKE_INSTALL_PREFIX:PATH=$WORKSPACE/dist -DCMAKE_BUILD_TYPE=RelWithDebInfo ../simgear
# compile (with out-j for now, it's hitting process limits)
cmake --build .
# compile
make
if [ $? -ne '0' ]; then
echo "make simgear failed"
exit 1
fi
cmake --build . --target install
make install
popd
@@ -47,15 +48,14 @@ fi
cmake -DFG_BUILD_TYPE=$FGBUILDTYPE -DCMAKE_INSTALL_PREFIX:PATH=$WORKSPACE/dist -DCMAKE_BUILD_TYPE=RelWithDebInfo ../flightgear
# compile (with out-j for now, it's hitting process limits)
cmake --build .
make
if [ $? -ne '0' ]; then
echo "make flightgear failed"
exit 1
fi
cmake --build . --target install
make install
popd

View File

@@ -31,8 +31,6 @@ $osgSoVersion=runOsgVersion('so-number')
$openThreadsSoVersion=runOsgVersion('openthreads-soversion-number')
$codeSignIdentity = ENV['FG_CODESIGN_IDENTITY']
$keychain = ENV['FG_KEYCHAIN']
puts "Code signing identity is #{$codeSignIdentity}"
puts "osgVersion=#{osgVersion}, so-number=#{$osgSoVersion}"
@@ -56,10 +54,11 @@ bundle=dmgDir + "/FlightGear.app"
puts "Running macdeployqt on the bundle to copy Qt libraries"
`macdeployqt #{$prefixDir}/fgfs.app -qmldir=#{qmlDir}`
puts "Copying & renaming app bundle"
puts "Moving & renaming app bundle"
`mkdir -p #{dmgDir}`
`rsync --archive --quiet #{$prefixDir}/fgfs.app/ #{bundle}`
`mv #{$prefixDir}/fgfs.app #{bundle}`
bundle=dmgDir + "/FlightGear.app"
contents=bundle + "/Contents"
macosDir=contents + "/MacOS"
$frameworksDir=contents +"/Frameworks"
@@ -136,47 +135,27 @@ File.open("#{contents}/Info.plist", 'w') { |f|
createArgs = "-format UDBZ -imagekey bzip2-level=9 -quiet -volname #{volName}"
# enable the hardened runtime and timestamp options, so notarization works
codeSignArgs = "--deep --options=runtime --timestamp"
if !$isRelease
# create the 'lite' DMG without the base files
# code sign the entire bundle once complete - v2 code-signing
puts "Signing #{bundle}"
`codesign #{codeSignArgs} --keychain #{$keychain} -s "#{$codeSignIdentity}" #{bundle}`
puts "Creating DMG without base-files"
`codesign --deep -s "#{$codeSignIdentity}" #{bundle}`
puts "Creating DMG"
`rm -f #{dmgPath}`
`hdiutil create -srcfolder #{dmgDir} #{createArgs} #{dmgPath}`
puts "Notarizing DMG #{dmgPath}"
`xcrun altool --notarize-app \
--primary-bundle-id "org.flightgear.mac" \
--username "zakalawe@mac.com" \
--password "@keychain:FlightGearAppStoreConnectUserName" \
--file #{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 app: #{bundle}"
`codesign --force #{codeSignArgs} --keychain #{$keychain} -s "#{$codeSignIdentity}" #{bundle}`
puts "Re-signing full #{bundle}"
`codesign --force --deep -s "#{$codeSignIdentity}" #{bundle}`
`rm -f #{dmgFullPath}`
`hdiutil create -srcfolder #{dmgDir} #{createArgs} #{dmgFullPath}`
puts "Notarizing DMG #{dmgFullPath}"
`xcrun altool --notarize-app \
--primary-bundle-id "org.flightgear.mac" \
--username "zakalawe@mac.com" \
--password "@keychain:FlightGearAppStoreConnectUserName" \
--file #{dmgFullPath}`
puts "Packaging complete"

View File

@@ -91,6 +91,7 @@ PLURAL_FORMS = {
"nl": ["singular", "plural"],
"pl": ["singular", "paucal", "plural"],
"pt": ["singular", "plural"],
"ru": ["singular", "plural"],
"zh": ["universal"] # universal form
}
@@ -576,10 +577,25 @@ class Translation:
return ''.join(l)
def __getitem__(self, cat):
"""Get all translations for a given category.
Return a mapping where each key is a tid (instance of a subclass
of AbstractTranslationUnitId) and each value a TranslationUnit
instance.
"""
return self.translations[cat]
def __setitem__(self, cat, translUnit):
self.translations[cat] = translUnit
def __setitem__(self, cat, mapping):
"""Replace all translations for a given category.
cat: a category name (string such as 'sys', 'options', etc.)
mapping: a mapping where each key is a tid (instance of a
subclass of AbstractTranslationUnitId) and each value a
TranslationUnit instance.
"""
self.translations[cat] = dict(mapping)
def __iter__(self):
return iter(self.translations)
@@ -1654,10 +1670,8 @@ registerFormatHandler("xliff", XliffFormatHandler)
# Could also be a dict
def L10nResMgrForCat(category):
"""Map from category/resource name to L10NResourceManager class."""
if category in ("menu", "options", "tips"):
if category in ("menu", "options", "sys", "tips"):
return BasicL10NResourceManager
elif category == "sys":
return SysL10NResourceManager
else:
assert False, "unexpected category: {!r}".format(category)
@@ -1843,7 +1857,7 @@ class L10NResourceManagerBase:
class BasicL10NResourceManager(L10NResourceManagerBase):
"""Resource manager for FG XML i18n files with the simplest structure.
This is suitable for resources (menu, options, tips) where
This is suitable for resources (menu, options, tips, etc.) where
translations are in direct children of the <PropertyList> element,
with no more structure.
@@ -1851,7 +1865,16 @@ class BasicL10NResourceManager(L10NResourceManagerBase):
@classmethod
def _findMainNode(cls, rootNode):
"""
Return the node directly containing the translations in an FG XML file."""
Return the node directly containing the translations in an FG XML file.
This method was added when sys.xml had all its useful contents
inside a 'splash' top-level node, instead of having a flat
structure like the other FG XML i18n files (options.xml,
menu.xml, etc.). At that time, we thus had a
SysL10NResourceManager class derived from this class only to
override this method.
"""
assert rootNode.tag == "PropertyList", rootNode.tag
return rootNode
@@ -1909,17 +1932,3 @@ class BasicL10NResourceManager(L10NResourceManagerBase):
[text], isPlural=isPlural, logger=logger)
return nbWhitespaceProblems
class SysL10NResourceManager(BasicL10NResourceManager):
@classmethod
def _findMainNode(cls, rootNode):
"""
Return the node directly containing the translations in sys.xml."""
assert rootNode.tag == "PropertyList", rootNode.tag
# In sys.xml, all translations are inside a <splash> element
mainNode = rootNode.find("splash")
assert mainNode is not None
return mainNode

View File

@@ -1,7 +1,7 @@
#!/bin/bash
THIS_RELEASE="2018.3"
NEXT_RELEASE="2018.4"
THIS_RELEASE="2019.1"
NEXT_RELEASE="2019.2"
SUBMODULES="simgear flightgear fgdata getstart"
#:<< 'COMMENT_END'

Submodule simgear updated: 8dec1cb38c...d6bbad87c4

22
update_git_mirror.sh Executable file
View File

@@ -0,0 +1,22 @@
#!/bin/bash
mirror_dirs='fgdata fgmeta flightgear simgear getstart windows-3rd-party fgrun'
pushd /var/lib/git
for dir in $mirror_dirs
do
repo_name=$dir.git
if [ ! -d "$repo_name" ]; then
echo "Doing initial clone"
git clone --mirror git://git.code.sf.net/p/flightgear/$dir
fi
pushd $repo_name
echo "Updating in $PWD"
git remote update
popd
done
popd

View File

@@ -1 +1 @@
2018.3.6
2019.1.2