Compare commits
4 Commits
release/20
...
release/20
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
df9848ecd4 | ||
|
|
fbdd7e136d | ||
|
|
a507cd5d71 | ||
|
|
e3a84455b4 |
8
.gitmodules
vendored
8
.gitmodules
vendored
@@ -1,11 +1,11 @@
|
||||
[submodule "simgear"]
|
||||
path = simgear
|
||||
url = ../simgear
|
||||
branch = release/2018.2
|
||||
branch = release/2018.1
|
||||
[submodule "flightgear"]
|
||||
path = flightgear
|
||||
url = ../flightgear
|
||||
branch = release/2018.2
|
||||
branch = release/2018.1
|
||||
[submodule "fgrun"]
|
||||
path = fgrun
|
||||
url = ../fgrun
|
||||
@@ -13,7 +13,7 @@
|
||||
[submodule "fgdata"]
|
||||
path = fgdata
|
||||
url = ../fgdata
|
||||
branch = release/2018.2
|
||||
branch = release/2018.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.2
|
||||
branch = release/2018.1
|
||||
|
||||
@@ -10,16 +10,6 @@ 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):
|
||||
@@ -53,17 +43,13 @@ def scan_set_file(aircraft_dir, set_file, includes):
|
||||
variant = {}
|
||||
name = sim_node.getValue("description", None)
|
||||
if (name == None or len(name) == 0):
|
||||
warning("Set file " + set_file + " is missing a <description>, skipping")
|
||||
print "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'):
|
||||
if sim_node.hasChild('author'):
|
||||
variant['author'] = sim_node.getValue("author", None)
|
||||
|
||||
if sim_node.hasChild('long-description'):
|
||||
@@ -108,7 +94,7 @@ def extract_previews(previews_node, aircraft_dir):
|
||||
# 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)
|
||||
print "Bad preview path, skipping:" + fullPath
|
||||
continue
|
||||
result.append({'type':previewType, 'path':previewPath})
|
||||
|
||||
@@ -120,25 +106,11 @@ def extract_tags(tags_node, set_path):
|
||||
tag = node.value
|
||||
# check tag is in the allowed list
|
||||
if not catalogTags.isValidTag(tag):
|
||||
warning("Unknown tag value:" + tag + " in " + set_path)
|
||||
print "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):
|
||||
@@ -215,25 +187,6 @@ def append_tag_nodes(node, variant):
|
||||
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
|
||||
@@ -241,7 +194,8 @@ def make_aircraft_node(aircraftDirName, package, variants, downloadBase):
|
||||
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 'author' in package:
|
||||
package_node.append( make_xml_leaf('author', package['author']) )
|
||||
|
||||
if 'description' in package:
|
||||
package_node.append( make_xml_leaf('description', package['description']) )
|
||||
@@ -288,7 +242,6 @@ def make_aircraft_node(aircraftDirName, package, variants, downloadBase):
|
||||
|
||||
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) )
|
||||
|
||||
|
||||
@@ -8,7 +8,6 @@
|
||||
<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>
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<PropertyList>
|
||||
<sim>
|
||||
<name>c172</name>
|
||||
<description>Cessna 172P</description>
|
||||
<author>Wilbur Wright</author>
|
||||
</sim>
|
||||
|
||||
</PropertyList>
|
||||
@@ -1,18 +1,7 @@
|
||||
<?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>
|
||||
<author>Wilbur Wright</author>
|
||||
<tags>
|
||||
<tag>fighter</tag>
|
||||
<tag>1980s</tag>
|
||||
|
||||
@@ -6,14 +6,7 @@
|
||||
<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>
|
||||
<author>James T Kirk</author>
|
||||
</sim>
|
||||
|
||||
</PropertyList>
|
||||
|
||||
@@ -6,8 +6,6 @@ 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"])
|
||||
@@ -15,30 +13,18 @@ class UpdateCatalogTests(unittest.TestCase):
|
||||
self.assertEqual(info['name'], 'F16-A')
|
||||
self.assertEqual(info['primary-set'], True)
|
||||
self.assertEqual(info['variant-of'], None)
|
||||
self.assertEqual(info['author'], 'Wilbur Wright')
|
||||
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(pkg['author'], 'Wilbur Wright')
|
||||
self.assertEqual(len(variants), 3)
|
||||
self.assertEqual(pkg['minimum-fg-version'], '2017.4')
|
||||
|
||||
@@ -52,29 +38,14 @@ class UpdateCatalogTests(unittest.TestCase):
|
||||
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')
|
||||
self.assertEqual(f16b['author'], 'James T Kirk')
|
||||
|
||||
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)
|
||||
self.assertEqual(f16c['author'], 'Wilbur Wright')
|
||||
|
||||
# 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"])
|
||||
@@ -119,25 +90,13 @@ class UpdateCatalogTests(unittest.TestCase):
|
||||
|
||||
self.assertEqual(parsedPkgNode.getValue('name'), pkg['name']);
|
||||
self.assertEqual(parsedPkgNode.getValue('description'), pkg['description']);
|
||||
self.assertEqual(parsedPkgNode.getValue('author'), "Wilbur Wright");
|
||||
|
||||
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');
|
||||
|
||||
@@ -148,18 +107,11 @@ class UpdateCatalogTests(unittest.TestCase):
|
||||
|
||||
if (var['id'] == 'f16-trainer'):
|
||||
self.assertEqual(pv.getValue('variant-of'), '_primary_')
|
||||
# self.assertEqual(pv.getValue('author'), "Wilbur Wright");
|
||||
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")
|
||||
self.assertEqual(pv.getValue('author'), "James T Kirk");
|
||||
|
||||
def test_minimalAircraft(self):
|
||||
# test an aircraft with a deliberately spartan -set.xml file with
|
||||
|
||||
@@ -325,9 +325,8 @@ fi
|
||||
|
||||
# Minimum
|
||||
PKG="build-essential cmake git"
|
||||
_mandatory_pkg_alternative libcurl4-openssl-dev libcurl4-gnutls-dev
|
||||
# cmake
|
||||
PKG="$PKG libarchive-dev libbz2-dev libexpat1-dev libjsoncpp-dev liblzma-dev libncurses5-dev procps zlib1g-dev"
|
||||
PKG="$PKG libarchive-dev libbz2-dev libcurl4-gnutls-dev libexpat1-dev libjsoncpp-dev liblzma-dev libncurses5-dev procps zlib1g-dev"
|
||||
# TG
|
||||
PKG="$PKG libcgal-dev libgdal-dev libtiff5-dev"
|
||||
# TGGUI/OpenRTI
|
||||
@@ -340,13 +339,10 @@ _mandatory_pkg_alternative libopenscenegraph-3.4-dev libopenscenegraph-dev \
|
||||
PKG="$PKG libopenal-dev libudev-dev qt5-default qtdeclarative5-dev libdbus-1-dev libplib-dev"
|
||||
_mandatory_pkg_alternative libpng-dev libpng12-dev libpng16-dev
|
||||
# The following packages are needed for the built-in launcher
|
||||
_optional_pkg_alternative qml-module-qtquick2
|
||||
_optional_pkg_alternative qml-module-qtquick-window2
|
||||
_optional_pkg_alternative qml-module-qtquick-dialogs
|
||||
# The following packages are only needed for the Qt-based remote Canvas
|
||||
# (comment written at the time of FG 2018.2).
|
||||
_optional_pkg_alternative qtbase5-private-dev
|
||||
_optional_pkg_alternative qtdeclarative5-private-dev
|
||||
_optional_pkg_alternative qml-module-qtquick2
|
||||
_optional_pkg_alternative qml-module-qtquick-window2
|
||||
# FGPanel
|
||||
PKG="$PKG fluid libbz2-dev libfltk1.3-dev libxi-dev libxmu-dev"
|
||||
# FGAdmin
|
||||
|
||||
2
fgdata
2
fgdata
Submodule fgdata updated: aabe57f1fc...b1f197434c
Submodule flightgear updated: 3798f8e182...7e9549c1bc
2
getstart
2
getstart
Submodule getstart updated: b8753789a8...943c000f6d
@@ -1,7 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
THIS_RELEASE="2018.2"
|
||||
NEXT_RELEASE="2018.3"
|
||||
THIS_RELEASE="2017.3"
|
||||
NEXT_RELEASE="2017.4"
|
||||
SUBMODULES="simgear flightgear fgdata getstart"
|
||||
|
||||
#:<< 'COMMENT_END'
|
||||
|
||||
2
simgear
2
simgear
Submodule simgear updated: 7dd20f0174...8e29cae309
Reference in New Issue
Block a user