Compare commits

..

48 Commits

Author SHA1 Message Date
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
26 changed files with 506 additions and 945 deletions

2
.gitignore vendored
View File

@@ -20,5 +20,3 @@ archivebuild
osgbuild
CMakeCache.txt
*.pyc
base_package
extended-data

10
.gitmodules vendored
View File

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

View File

@@ -75,6 +75,7 @@ Source: "X:\install\msvc100\FGRun\share\locale\*"; DestDir: "{app}\bin\locale";
Source: "X:\3rdParty\bin\zlib.dll"; DestDir: "{app}\bin"; Check: not Is64BitInstallMode
Source: "X:\3rdParty\bin\OpenAL32.dll"; DestDir: "{app}\bin"; Check: not Is64BitInstallMode
Source: "X:\3rdParty\bin\libpng16.dll"; DestDir: "{app}\bin"; Check: not Is64BitInstallMode
Source: "X:\3rdParty\bin\libcurl.dll"; DestDir: "{app}\bin"; Check: not Is64BitInstallMode
Source: "X:\3rdParty\bin\libintl-8.dll"; DestDir: "{app}\bin"; Check: not Is64BitInstallMode
Source: "X:\3rdParty\bin\CrashRpt1402.dll"; DestDir: "{app}\bin"; Check: not Is64BitInstallMode
Source: "X:\3rdParty\bin\crashrpt_lang.ini"; DestDir: "{app}\bin"; Check: not Is64BitInstallMode
@@ -90,6 +91,7 @@ Source: "X:\3rdParty.x64\bin\zlib.dll"; DestDir: "{app}\bin"; Check: Is64BitInst
Source: "X:\3rdParty.x64\bin\OpenAL32.dll"; DestDir: "{app}\bin"; Check: Is64BitInstallMode
Source: "X:\3rdParty.x64\bin\vcredist_x64.exe"; DestDir: "{app}\bin"; Flags: skipifsourcedoesntexist; Check: Is64BitInstallMode
Source: "X:\3rdParty.x64\bin\libpng16.dll"; DestDir: "{app}\bin"; Check: Is64BitInstallMode
Source: "X:\3rdParty.x64\bin\libcurl.dll"; DestDir: "{app}\bin"; Check: Is64BitInstallMode
Source: "X:\3rdParty.x64\bin\libintl-8.dll"; DestDir: "{app}\bin"; Check: Is64BitInstallMode
Source: "X:\3rdParty.x64\bin\CrashRpt1402.dll"; DestDir: "{app}\bin"; Check: Is64BitInstallMode
Source: "X:\3rdParty.x64\bin\crashrpt_lang.ini"; DestDir: "{app}\bin"; Check: Is64BitInstallMode
@@ -101,11 +103,9 @@ Source: "{#VCInstallDir}\redist\x64\Microsoft.VC100.CRT\*.dll"; DestDir: "{app}\
Source: "X:\install\msvc100\FlightGear\bin\fgpanel.exe"; DestDir: "{app}\bin"; Flags: ignoreversion
Source: "X:\3rdParty\bin\oalinst.exe"; DestDir: "{app}\bin"; Flags: ignoreversion skipifsourcedoesntexist
; Include the base package
; Include the base package
#if IncludeData == "TRUE"
Source: "X:\fgdata\*.*"; DestDir: "{app}\data"; Flags: ignoreversion recursesubdirs skipifsourcedoesntexist
; work-around for 3.6: look for additional aircraft data
Source: "X:\extended-data\*.*"; DestDir: "{app}\data"; Flags: ignoreversion recursesubdirs skipifsourcedoesntexist
#endif
; 32 bits install
@@ -192,7 +192,7 @@ Name: "{userdocs}\FlightGear\Custom Scenery"; Permissions: everyone-modify; Chec
[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 Launcher"; 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"
@@ -200,7 +200,7 @@ Name: "{group}\Tools\FGRun"; Filename: "{app}\bin\fgrun.exe"; WorkingDir: "{app}
Name: "{group}\Tools\Install & Uninstall Scenery"; Filename: "{app}\bin\fgadmin.exe"; WorkingDir: "{app}"
Name: "{group}\Tools\Uninstall FlightGear"; Filename: "{uninstallexe}"
Name: "{group}\Tools\js_demo"; Filename: "{app}\bin\js_demo.exe"
Name: "{group}\Tools\fgjs"; Filename: "cmd"; Parameters: "/k fgjs.exe ""--fg-root={app}\fgdata"""; WorkingDir: "{app}\bin"
Name: "{group}\Tools\fgjs"; Filename: "cmd"; Parameters: "/k fgjs.exe ""--fg-root={app}\data"""; WorkingDir: "{app}\bin"
Name: "{group}\Tools\GPSsmooth"; Filename: "cmd"; Parameters: "/k ""{app}\bin\GPSsmooth.exe"" -h"; WorkingDir: "{app}\bin"
Name: "{group}\Tools\UGsmooth"; Filename: "cmd"; Parameters: "/k ""{app}\bin\UGsmooth.exe"" -h"; WorkingDir: "{app}\bin"
Name: "{group}\Tools\MIDGsmooth"; Filename: "cmd"; Parameters: "/k ""{app}\bin\MIDGsmooth.exe"" -h"; WorkingDir: "{app}\bin"
@@ -218,7 +218,7 @@ filename: "{app}\bin\vcredist_x86.exe"; WorkingDir: "{app}\bin"; Parameters: "/p
filename: "{app}\bin\vcredist_x64.exe"; WorkingDir: "{app}\bin"; Parameters: "/passive /norestart"; Description: "Installing MS Visual C++ runtime components"; Check: Is64BitInstallMode and FileExists(ExpandConstant('{app}\bin\vcredist_x64.exe'))
filename: "{app}\bin\oalinst.exe"; WorkingDir: "{app}\bin"; Description: "Installing OpenAL"; Check: IsTaskSelected('insoal') and FileExists(ExpandConstant('{app}\bin\oalinst.exe'))
; Put installation directory into the fgrun.prefs
filename: "{app}\bin\fgrun.exe"; WorkingDir: "{app}\bin"; Parameters: "--silent ""--fg-exe={app}\bin\fgfs.exe"" ""--fg-root={app}\data"" ""--fg-scenery={userdocs}\FlightGear\Custom Scenery;{app}\fgdata\Scenery;{userdocs}\FlightGear\TerraSync"" ""--fg-aircraft={userdocs}\FlightGear\Aircraft"" ""--terrasync-dir={userdocs}\FlightGear\TerraSync"" --version={#FGVersion}"
filename: "{app}\bin\fgrun.exe"; WorkingDir: "{app}\bin"; Parameters: "--silent ""--fg-exe={app}\bin\fgfs.exe"" ""--fg-root={app}\data"" ""--fg-scenery={userdocs}\FlightGear\Custom Scenery;{app}\data\Scenery;{userdocs}\FlightGear\TerraSync"" ""--fg-aircraft={userdocs}\FlightGear\Aircraft"" ""--terrasync-dir={userdocs}\FlightGear\TerraSync"" --version={#FGVersion}"
; Put installation and source directories into the fgadmin.prefs
filename: "{app}\bin\fgadmin.exe"; WorkingDir: "{app}\bin"; Parameters: "--silent ""--install-source={src}\..\Scenery"" ""--scenery-dest={userdocs}\FlightGear\Custom Scenery"""
@@ -353,8 +353,6 @@ begin
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 METAR Utility', 'Allows the FlightGear METAR utility to receive METARs.', ExpandConstant('{app}') + '\bin\metar.exe', NET_FW_IP_PROTOCOL_TCP, '', '80', NET_FW_RULE_DIR_OUT);
AddAdvancedFirewallException('FlightGear TerraSync', 'Allows TerraSync to download additional scenery while FlightGear is running.', ExpandConstant('{app}') + '\bin\terrasync.exe', NET_FW_IP_PROTOCOL_ALL, '', '', NET_FW_RULE_DIR_IN);
AddAdvancedFirewallException('FlightGear TerraSync', 'Allows TerraSync to download additional scenery while FlightGear is running.', ExpandConstant('{app}') + '\bin\terrasync.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
@@ -362,7 +360,6 @@ begin
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 TerraSync', ExpandConstant('{app}') + '\bin\terrasync.exe');
AddBasicFirewallException('FlightGear FGCom', ExpandConstant('{app}') + '\bin\fgcom.exe');
end;
end;
@@ -374,7 +371,6 @@ begin
begin
RemoveFirewallException('FlightGear', ExpandConstant('{app}') + '\bin\fgfs.exe');
RemoveFirewallException('FlightGear METAR Utility', ExpandConstant('{app}') + '\bin\metar.exe');
RemoveFirewallException('FlightGear TerraSync', ExpandConstant('{app}') + '\bin\terrasync.exe');
RemoveFirewallException('FlightGear FGCom', ExpandConstant('{app}') + '\bin\fgcom.exe');
end;
end;

View File

@@ -1,17 +0,0 @@
+ /Aircraft
+ /Aircraft/777
+ /Aircraft/777-200
+ /Aircraft/b1900d
+ /Aircraft/CitationX
+ /Aircraft/ZLT-NT
+ /Aircraft/dhc2
+ /Aircraft/Cub
+ /Aircraft/sopwithCamel
+ /Aircraft/f-14b
+ /Aircraft/ASK13
+ /Aircraft/bo105
+ /Aircraft/Dragonfly
+ /Aircraft/SenecaII
+ /Aircraft/A6M2
- /Aircraft/*
- .svn

View File

@@ -1,10 +0,0 @@
- .git
- *.xcf
- *.tex
- .svn
- /fgdata/Textures/Unused
- /fgdata/Textures/*.orig
- /fgdata/Docs/source
- /fgdata/Models/Airspace
- /fgdata/Models/MNUAV

View File

@@ -19,7 +19,7 @@ rm -rf dist/*
#####################################################################################
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_CURL:BOOL="ON" -DENABLE_DNS:BOOL="ON" -DSIMGEAR_SHARED:BOOL="ON" ../simgear
# compile
make
@@ -59,25 +59,5 @@ cp flightgear-*.tar.bz2 ../output/.
echo "Assembling base package"
cd $WORKSPACE
rm -rf base_package
tar cjf output/FlightGear-$VERSION-data.tar.bz2 fgdata/
# a: archive mode
# z: compress
# delete: 'delete extraneous files from dest dirs'; avoid bug 1344
# filter: use the rules in our rules file
echo "Copying FGData files"
rsync -a --delete \
--filter 'merge base-package.rules' \
fgdata base_package
echo "Syncing aircraft data"
rsync -a --delete --filter 'merge aircraft.rules' /home/jenkins/fgaddon-3.6.0/ extended-data
echo "Copying aircraft data"
rsync -a extended-data/ base_package/fgdata
echo "Creating tar archive"
pushd base_package
tar cjf $WORKSPACE/output/FlightGear-$VERSION-data.tar.bz2 fgdata/
popd

View File

@@ -8,6 +8,7 @@ md build-fgrun32
cd build-sg32
cmake ..\simgear -G "Visual Studio 10" ^
-DMSVC_3RDPARTY_ROOT=%WORKSPACE% ^
-DENABLE_CURL:BOOL="ON" ^
-DCMAKE_INSTALL_PREFIX:PATH=%WORKSPACE%/install/msvc100/SimGear ^
-DBOOST_ROOT=%WORKSPACE%/Boost
cmake --build . --config Release --target INSTALL
@@ -42,6 +43,7 @@ cd build-sg64
cmake ..\SimGear -G "Visual Studio 10 Win64" ^
-DMSVC_3RDPARTY_ROOT=%WORKSPACE% ^
-DCMAKE_INSTALL_PREFIX:PATH=%WORKSPACE%/install/msvc100-64/SimGear ^
-DENABLE_CURL:BOOL="ON" ^
-DBOOST_ROOT=%WORKSPACE%/Boost
cmake --build . --config Release --target INSTALL

View File

@@ -1,454 +0,0 @@
aircraft = {
"14bis":"14bis_20120506.zip",
"21":"21_20101206.zip",
"707":"707_20140103.zip",
"717":"717_20140116.zip",
"727-230":"727-230_20120714.zip",
"737-100":"737-100_20120506.zip",
"737-200":"737-200_20120506.zip",
"737-300":"737-300_20140116.zip",
"737NG":"737NG_20140116.zip",
"747-200":"747-200_2.1.zip",
"747-400":"747-400_20140216.zip",
"747":"747_20070714.zip",
"757-200":"757-200_20140116.zip",
"767-300":"767-300_20100100.zip",
"777-200":"777-200_20111215.zip",
"777":"777_20140216.zip",
"787":"787_20140116.zip",
"A-10":"A-10_20140116.zip",
"A-26-Invader":"A-26-Invader_20130214.zip",
"A-6E":"A-6E_20131204.zip",
"A24-Viking":"A24-Viking_20120506.zip",
"A300":"A300_20120717.zip",
"A320-family":"A320-family_20140116.zip",
"A340-600":"A340-600_20080400.zip",
"A380":"A380_1.2.zip",
"A6M2":"A6M2_20120717.zip",
"AG-14":"AG-14_20130810.zip",
"AN-225":"AN-225_20130823.zip",
"ANT-20":"ANT-20_20120506.zip",
"AR-234":"AR-234_20120821.zip",
"ASK13":"ASK13_20100401.zip",
"ASK21-MI":"ASK21-MI_20120506.zip",
"ASK21":"ASK21_20070701.zip",
"ATC-ML":"ATC-ML_20131014.zip",
"ATC":"ATC_20120717.zip",
"ATI-Resolution":"ATI-Resolution_0.0.zip",
"ATR-72-500":"ATR-72-500_20120717.zip",
"AVRO-IV-Triplane":"AVRO-IV-Triplane_20130805.zip",
"Aero-Commander":"Aero-Commander_20130313.zip",
"Aerocar":"Aerocar_20130805.zip",
"Aerostar-700":"Aerostar-700_20120610.zip",
"Aichi-D3A":"Aichi-D3A_20120506.zip",
"AirCrane":"AirCrane_20131204.zip",
"Airco-DH2":"Airco-DH2_20120506.zip",
"Albatross":"Albatross_20130823.zip",
"Allegro-2000":"Allegro-2000_20120506.zip",
"Alouette-III":"Alouette-III_20131117.zip",
"Alouette-II":"Alouette-II_20120506.zip",
"Alphajet":"Alphajet_20130225.zip",
"Antoinette":"Antoinette_20130220.zip",
"Antonov-An-12":"Antonov-An-12_20131220.zip",
"Arsenal-VG33":"Arsenal-VG33_0.1.zip",
"Arup-S2":"Arup-S2_20120506.zip",
"Avro-Arrow":"Avro-Arrow_20120506.zip",
"Avro-Lancaster":"Avro-Lancaster_20120817.zip",
"B-17":"B-17_20130706.zip",
"B-1B":"B-1B_20130823.zip",
"B-24-Liberator":"B-24-Liberator_20131227.zip",
"B-25":"B-25_20130810.zip",
"B-2":"B-2_20130823.zip",
"B-36D-Peacemaker":"B-36D-Peacemaker_20120506.zip",
"B-52F":"B-52F_20130823.zip",
"BAC-TSR2":"BAC-TSR2_20120717.zip",
"BAe-125":"BAe-125_20120305.zip",
"BV-141":"BV-141_20131015.zip",
"BV-170":"BV-170_20130411.zip",
"Beechcraft-Staggerwing":"Beechcraft-Staggerwing_20130303.zip",
"Bell-222X":"Bell-222X_20120508.zip",
"Bell-P-39":"Bell-P-39_20120821.zip",
"Bell-P-59":"Bell-P-59_20120817.zip",
"Bell-X1":"Bell-X1_20120114.zip",
"Bernard-HV220":"Bernard-HV220_20090506.zip",
"Bleriot-SPAD-S.510":"Bleriot-SPAD-S.510_20131226.zip",
"Boeing-247":"Boeing-247_20130903.zip",
"Boeing314":"Boeing314_1.6.zip",
"Bombardier-415":"Bombardier-415_20131203.zip",
"Br-761":"Br-761_20130123.zip",
"Brabazon":"Brabazon_20120821.zip",
"Breda-B.Z.308":"Breda-B.Z.308_20130102.zip",
"Breguet-XIX":"Breguet-XIX_20100829.zip",
"Buccaneer":"Buccaneer_0.1.zip",
"Bugatti":"Bugatti_20120524.zip",
"Burnelli-CBY-3":"Burnelli-CBY-3_20120506.zip",
"C-160-Transall":"C-160-Transall_20120905.zip",
"C-2A":"C-2A_20120506.zip",
"C130":"C130_20130810.zip",
"C460":"C460_20130614.zip",
"C561":"C561_20130614.zip",
"C684":"C684_20131025.zip",
"CRJ-200":"CRJ-200_2.zip",
"CRJ700-family":"CRJ700-family_1.1.0.zip",
"Campini-Caproni-N1":"Campini-Caproni-N1_20130115.zip",
"CanberraBI8":"CanberraBI8_20101204.zip",
"Cap10B":"Cap10B_20130824.zip",
"Cap10C":"Cap10C_20131202.zip",
"Caravelle":"Caravelle_20120506.zip",
"Carreidas":"Carreidas_20131025.zip",
"Caudron-G3":"Caudron-G3_20120506.zip",
"Caudron-G4":"Caudron-G4_20120506.zip",
"Cessna-208-Caravan":"Cessna-208-Caravan_20130301.zip",
"Cessna-421-Golden-Eagle":"Cessna-421-Golden-Eagle_20120506.zip",
"Cessna337":"Cessna337_v20120429.zip",
"Citation-Bravo":"Citation-Bravo_20131025.zip",
"CitationX":"CitationX_20131025.zip",
"Citation":"Citation_20130305.zip",
"Coanda-1910":"Coanda-1910_20130129.zip",
"Commonwealth-Ca-12":"Commonwealth-Ca-12_20120817.zip",
"ComperSwift":"ComperSwift_20120717.zip",
"Concorde":"Concorde_2.11.zip",
"Convair-XFY-1-Pogo":"Convair-XFY-1-Pogo_20120506.zip",
"Cub":"Cub_20120508.zip",
"Curtiss-Jenny":"Curtiss-Jenny_20120906.zip",
"Curtiss-P40":"Curtiss-P40_20130221.zip",
"D510":"D510_20130916.zip",
"D520":"D520_20120506.zip",
"DC-10-30":"DC-10-30_20140116.zip",
"DG-101G":"DG-101G_2013-01-01.zip",
"DH-106":"DH-106_20120506.zip",
"DH-88":"DH-88_20131026.zip",
"DH-89":"DH-89_20120905.zip",
"DH-91":"DH-91_20120506.zip",
"DO-228":"DO-228_20130824.zip",
"DO-26":"DO-26_20100521.zip",
"DO-335":"DO-335_20130216.zip",
"DO-X":"DO-X_0.2.0.zip",
"DR400-dauphin":"DR400-dauphin_20140105.zip",
"DR400":"DR400_20131129.zip",
"Dauphin":"Dauphin_20140109.zip",
"Deperdussin":"Deperdussin_20101124.zip",
"DerKleineUhu":"DerKleineUhu_0.1.zip",
"Deuche":"Deuche_20120506.zip",
"Diamond-Da40":"Diamond-Da40_20130326.zip",
"Diamond-Da42":"Diamond-Da42_20120506.zip",
"Douglas-Dc3":"Douglas-Dc3_20130107.zip",
"Douglas-Dolphin":"Douglas-Dolphin_20131029.zip",
"Dragonfly":"Dragonfly_1.0.zip",
"Dromader":"Dromader_31-02-2011.zip",
"E-2C":"E-2C_20131014.zip",
"E3B":"E3B_20130313.zip",
"Etrich-Taube":"Etrich-Taube_20120207.zip",
"F-106-dart":"F-106-dart_20130808.zip",
"F-117":"F-117_20130317.zip",
"F-35B":"F-35B_20120717.zip",
"F-86":"F-86_20131216.zip",
"F-8E-Crusader":"F-8E-Crusader_20130810.zip",
"F4U":"F4U_20120717.zip",
"F6F-Hellcat":"F6F-Hellcat_20120821.zip",
"F7F-Tigercat":"F7F-Tigercat_20130107.zip",
"F80C":"F80C_20120717.zip",
"FK9MK2":"FK9MK2_20120506.zip",
"Fairchild-C119":"Fairchild-C119_20120817.zip",
"Fairchild-Metroliner":"Fairchild-Metroliner_20110321.zip",
"Fairey-Gannet":"Fairey-Gannet_20131122.zip",
"Falcon-50":"Falcon-50_20140116.zip",
"Farman-III":"Farman-III_20131014.zip",
"Farman-IV":"Farman-IV_20130213.zip",
"Focke-Wulf-F19-ente":"Focke-Wulf-F19-ente_20130103.zip",
"Fokker-Eindecker-EIII":"Fokker-Eindecker-EIII_20110301.zip",
"Fokker-S-11":"Fokker-S-11_20120506.zip",
"Fokker-Spin":"Fokker-Spin_20130805.zip",
"Ford-Trimotor":"Ford-Trimotor_20120506.zip",
"Fouga-Magister":"Fouga-Magister_20120501.zip",
"Fw200":"Fw200_20120506.zip",
"Fw61":"Fw61_20091025.zip",
"G-164":"G-164_20131014.zip",
"Gee-Bee":"Gee-Bee_20130711.zip",
"Gloster-Meteor":"Gloster-Meteor_20120821.zip",
"Gloster-Whittle":"Gloster-Whittle_20120821.zip",
"Gotha-G-V":"Gotha-G-V_20131007.zip",
"Grob-Astir":"Grob-Astir_20131209.zip",
"Grob-G109":"Grob-G109_20131104.zip",
"Grob-G115":"Grob-G115_20131209.zip",
"Grob-Gf200":"Grob-Gf200_20140102.zip",
"H-21C-Shawnee":"H-21C-Shawnee_20120717.zip",
"H1-Racer":"H1-Racer_20130531.zip",
"H4-Hercules":"H4-Hercules_1.3.zip",
"HM-14":"HM-14_20120506.zip",
"HS-P-75":"HS-P-75_20130912.zip",
"HUP-Retriever":"HUP-Retriever_20120717.zip",
"Handley-Page-Halifax":"Handley-Page-Halifax_20120506.zip",
"Hansajet":"Hansajet_0.1.zip",
"Hawker-Siddeley-Nimrod":"Hawker-Siddeley-Nimrod_20120506.zip",
"He-111":"He-111_20131022.zip",
"He162":"He162_20131022.zip",
"Heinkel-He-111":"Heinkel-He-111_20120817.zip",
"Heinkel-He-177":"Heinkel-He-177_20130805.zip",
"Heinkel-He-178":"Heinkel-He-178_20101128.zip",
"Heinkel-He-280":"Heinkel-He-280_20120825.zip",
"HondaJet":"HondaJet_20130620.zip",
"Hornet":"Hornet_20101110.zip",
"Horsa":"Horsa_20131022.zip",
"Horten-Ho-IX":"Horten-Ho-IX_20130208.zip",
"Hughes-XF11":"Hughes-XF11_20120506.zip",
"Hunter":"Hunter_20131025.zip",
"Hurricane":"Hurricane_20130823.zip",
"IAR80":"IAR80_20120912.zip",
"IL-2":"IL-2_20110311.zip",
"JA37":"JA37_1.21.zip",
"JAS39-Gripen":"JAS39-Gripen_20120506.zip",
"JT-5B":"JT-5B_20130330.zip",
"Jaguar":"Jaguar_4.81.zip",
"Ju-87":"Ju-87_20130712.zip",
"Ju-88":"Ju-88_20120717.zip",
"Junkers-F13":"Junkers-F13_20130516.zip",
"Junkers-G.38ce":"Junkers-G.38ce_20120506.zip",
"Junkers-W34":"Junkers-W34_20130713.zip",
"K-7":"K-7_20120506.zip",
"K5Y1":"K5Y1_0.1.zip",
"KC135":"KC135_20131022.zip",
"KM":"KM_20100603.zip",
"Ka-50":"Ka-50_20130418.zip",
"Katana":"Katana_20130322.zip",
"Ki-84":"Ki-84_20120717.zip",
"L-1011-500":"L-1011-500_20120506.zip",
"LATE-29":"LATE-29_20120506.zip",
"La-5":"La-5_20120506.zip",
"Lancair-235":"Lancair-235_20130810.zip",
"Late-631":"Late-631_20120829.zip",
"Leduc-022":"Leduc-022_20120821.zip",
"Lightning":"Lightning_20140116.zip",
"Lionceau":"Lionceau_20130512.zip",
"Lockheed-Martin-FA-22A-Raptor":"Lockheed-Martin-FA-22A-Raptor_20131022.zip",
"Lockheed-NF104A":"Lockheed-NF104A_20110316.zip",
"Lockheed-NF104":"Lockheed-NF104_20110604.zip",
"Lockheed-P38":"Lockheed-P38_20131202.zip",
"Lockheed-SR71":"Lockheed-SR71_20120507.zip",
"Lockheed-U-2S":"Lockheed-U-2S_20131104.zip",
"Lockheed-Vega":"Lockheed-Vega_20100324.zip",
"Lockheed1049":"Lockheed1049_1.6.zip",
"Lockheed1049h":"Lockheed1049h_1.0.zip",
"Long-EZ":"Long-EZ_20120506.zip",
"Lynx-WG13":"Lynx-WG13_20120717.zip",
"M-XE":"M-XE_20120506.zip",
"MB326":"MB326_20131022.zip",
"MD11":"MD11_20121126.zip",
"ME-209-V1":"ME-209-V1_20130416.zip",
"ME-262HGIII":"ME-262HGIII_20120506.zip",
"ME-262":"ME-262_20120821.zip",
"MPCarrier":"MPCarrier_0.1.zip",
"MRJ":"MRJ_20090817.zip",
"MS-406":"MS-406_20130806.zip",
"Macchi-Castoldi-MC72":"Macchi-Castoldi-MC72_20131016.zip",
"Macchi-M33":"Macchi-M33_20120506.zip",
"Martin-Baker-MB5":"Martin-Baker-MB5_20120813.zip",
"Messerschmitt-BF110":"Messerschmitt-BF110_20130329.zip",
"Messerschmitt-Libelle":"Messerschmitt-Libelle_20130511.zip",
"Messerschmitt-P1101":"Messerschmitt-P1101_20130315.zip",
"MiG-15":"MiG-15_20121210.zip",
"MiG-21bis":"MiG-21bis_20120717.zip",
"Mig-29":"Mig-29_20140116.zip",
"Mil-Mi-12":"Mil-Mi-12_20120216.zip",
"Mil-Mi-24":"Mil-Mi-24_20140116.zip",
"Mirage-2000":"Mirage-2000_20131025.zip",
"MirageIII":"MirageIII_20131008.zip",
"MirageIV":"MirageIV_20131008.zip",
"Mirage_F1":"Mirage_F1_20131022.zip",
"Nakajima-B5N":"Nakajima-B5N_20120506.zip",
"Nieuport-11":"Nieuport-11_20130729.zip",
"Noratlas":"Noratlas_20120717.zip",
"Nord-2502":"Nord-2502_20130605.zip",
"Nordstern":"Nordstern_20120813.zip",
"North-American-T28D-Trojan":"North-American-T28D-Trojan_20140113.zip",
"North-American-T6-Texan":"North-American-T6-Texan_20130915.zip",
"Northrop-P61":"Northrop-P61_20130107.zip",
"Northrop-xb35":"Northrop-xb35_20130823.zip",
"OH-1":"OH-1_0.1.zip",
"OV10":"OV10_20140116.zip",
"P-38-Lightning":"P-38-Lightning_20120717.zip",
"P180":"P180_20131022.zip",
"P47":"P47_20131022.zip",
"PBY-Catalina":"PBY-Catalina_20140107.zip",
"PC-12":"PC-12_20121208.zip",
"PC-21":"PC-21_20130810.zip",
"PC-6":"PC-6_20130810.zip",
"PC-9M":"PC-9M_20131025.zip",
"PaperAirplane":"PaperAirplane_20101229.zip",
"Percival-Mew-Gull":"Percival-Mew-Gull_20130919.zip",
"Piaggio-Pegna-Pc-7":"Piaggio-Pegna-Pc-7_20131018.zip",
"Pioneer-200":"Pioneer-200_20120506.zip",
"Piper-PA-18":"Piper-PA-18_20120506.zip",
"Piper-PA-32":"Piper-PA-32_20120506.zip",
"Polikarpov-I16":"Polikarpov-I16_20120506.zip",
"Pond-Racer":"Pond-Racer_20120506.zip",
"Potez-630":"Potez-630_20100313.zip",
"Pterodactyl":"Pterodactyl_20100502.zip",
"Quickie":"Quickie_20120506.zip",
"R22":"R22_20120903.zip",
"R44":"R44_20130426.zip",
"RAF-S-E-5":"RAF-S-E-5_20120506.zip",
"RV-6A":"RV-6A_0.1.zip",
"Rascal":"Rascal_0.1.zip",
"Ryan-Navion":"Ryan-Navion_20130103.zip",
"Ryan-PT22":"Ryan-PT22_20110503.zip",
"Ryan-SoSL":"Ryan-SoSL_20120325.zip",
"S-51-Dragonfly":"S-51-Dragonfly_20120717.zip",
"SM-55":"SM-55_20120506.zip",
"SPAD-VII":"SPAD-VII_20120506.zip",
"SR71-BlackBird":"SR71-BlackBird_20110614.zip",
"SU-37":"SU-37_20130823.zip",
"SaabJ35Draken":"SaabJ35Draken_20071217.zip",
"SaabJ35F":"SaabJ35F_0.9.1.zip",
"Saunders-Roe-Princess":"Saunders-Roe-Princess_1.3.zip",
"SeaVixen":"SeaVixen_20130524.zip",
"SenecaII":"SenecaII_1.0.zip",
"Short-Stirling":"Short-Stirling_20120506.zip",
"Short_Empire":"Short_Empire_20140113.zip",
"Sikorsky-76C":"Sikorsky-76C_20120723.zip",
"Sikorsky-S38":"Sikorsky-S38_20120506.zip",
"Sikorsky-S58":"Sikorsky-S58_20131213.zip",
"Skyranger":"Skyranger_20131205.zip",
"Skyvan":"Skyvan_20131127.zip",
"Socata-ST10":"Socata-ST10_20130107.zip",
"SpaceShip-One":"SpaceShip-One_20120506.zip",
"Spitfire":"Spitfire_20130310.zip",
"Stampe-SV4":"Stampe-SV4_20121113.zip",
"Starship":"Starship_20130923.zip",
"Stearman":"Stearman_20130817.zip",
"Stieglitz":"Stieglitz_20091025.zip",
"Stiletto":"Stiletto_20110917.zip",
"Storch":"Storch_20130313.zip",
"Submarine_Scout":"Submarine_Scout_20130115.zip",
"Super-Etendard":"Super-Etendard_20131008.zip",
"Super-Frelon":"Super-Frelon_20120506.zip",
"Supermarine-S.6B":"Supermarine-S.6B_20130312.zip",
"Superwal":"Superwal_20100330.zip",
"T-4":"T-4_20130620.zip",
"T-50":"T-50_20120717.zip",
"T37":"T37_20101230.zip",
"T38":"T38_20110911.zip",
"TBM-Avenger":"TBM-Avenger_20120506.zip",
"TU-114":"TU-114_20120717.zip",
"TU-95":"TU-95_20120506.zip",
"Tecnam-P92":"Tecnam-P92_20120506.zip",
"Tigre":"Tigre_20130823.zip",
"Tu-134":"Tu-134_20131220.zip",
"UH-1":"UH-1_20130810.zip",
"UH-60":"UH-60_20120718.zip",
"V22-Osprey":"V22-Osprey_0.2.zip",
"VMX22-Osprey":"VMX22-Osprey_0.59-28.08.2010.zip",
"Velocity-XL":"Velocity-XL_20120506.zip",
"Vickers-Vimy":"Vickers-Vimy_20120506.zip",
"Vostok-1":"Vostok-1_20120717.zip",
"Westland-Whirlwind":"Westland-Whirlwind_20130930.zip",
"X15":"X15_20101128.zip",
"XB-70":"XB-70_20120730.zip",
"YF-23":"YF-23_20120717.zip",
"YS-11":"YS-11_0.1.zip",
"Yak-18T":"Yak-18T_20121126.zip",
"Yak-36":"Yak-36_20121225.zip",
"YardStik":"YardStik_0.0.zip",
"ZF_Navy_free_balloon":"ZF_Navy_free_balloon_20130107.zip",
"ZLT-NT":"ZLT-NT_20130923.zip",
"ZivkoEdge":"ZivkoEdge_0.2.zip",
"Zlin-50lx":"Zlin-50lx_20131125.zip",
"a4":"a4_20130706.zip",
"airwaveXtreme150":"airwaveXtreme150_July-2013.zip",
"an2":"an2_20131014.zip",
"apache":"apache_20110119.zip",
"as332":"as332_20091217.zip",
"asw20":"asw20_July-2013.zip",
"b1900d":"b1900d_20130911.zip",
"b26":"b26_20130620.zip",
"b29":"b29_20130401.zip",
"beaufighter":"beaufighter_20120717.zip",
"beech99":"beech99_20081221.zip",
"bf109":"bf109_20130615.zip",
"bleriot-XI":"bleriot-XI_20130715.zip",
"bluebird":"bluebird_10.4.zip",
"bo105":"bo105_20140116.zip",
"bocian":"bocian_20131104.zip",
"c150":"c150_20140116.zip",
"c172p":"c172p_20140112.zip",
"c172r":"c172r_20130209.zip",
"c182":"c182_20130209.zip",
"c182rg":"c182rg_20130209.zip",
"c310":"c310_20130209.zip",
"c310u3a":"c310u3a_20130209.zip",
"ch47":"ch47_0.1.zip",
"ch53e":"ch53e_0.1.zip",
"colditz":"colditz_20090126.zip",
"couzinet70":"couzinet70_20120506.zip",
"cri-cri":"cri-cri_20080206.zip",
"dc2":"dc2_20130209.zip",
"dc3":"dc3_20110905.zip",
"dc6":"dc6_20131014.zip",
"dc8-63":"dc8-63_0.02.zip",
"dc8-73":"dc8-73_0.1.zip",
"dhc1":"dhc1_20120506.zip",
"dhc2":"dhc2_20130315.zip",
"dhc3":"dhc3_20120506.zip",
"dhc4":"dhc4_20101230.zip",
"dhc6":"dhc6_20130202.zip",
"dhc8":"dhc8_20120714.zip",
"eastbourne_mono":"eastbourne_mono_20130805.zip",
"ec130":"ec130_20140117.zip",
"ec135":"ec135_0.6.zip",
"ercoupe":"ercoupe_20130313.zip",
"eurofighter":"eurofighter_1.4.zip",
"f-14b":"f-14b_20121124.zip",
"f15c":"f15c_20101022.zip",
"f16":"f16_20120812.zip",
"f18":"f18_20101026.zip",
"fa223":"fa223_20120717.zip",
"fkdr1":"fkdr1_20130313.zip",
"flash2a":"flash2a_20130313.zip",
"fokker100":"fokker100_20140116.zip",
"fokker50":"fokker50_20130810.zip",
"followme":"followme_20110613.zip",
"fw190":"fw190_20120717.zip",
"harrier":"harrier_20130823.zip",
"j22":"j22_20101022.zip",
"j7w":"j7w_20120717.zip",
"jeep":"jeep_20120717.zip",
"jetman":"jetman_20110613.zip",
"ju52":"ju52_20131204.zip",
"kodiak":"kodiak_20101223.zip",
"l39":"l39_20100310.zip",
"marchetti":"marchetti_20050614.zip",
"me163":"me163_20131022.zip",
"me323":"me323_20131022.zip",
"mirage2000":"mirage2000_20101024.zip",
"mosquito":"mosquito_20130620.zip",
"ogel":"ogel_20130209.zip",
"ornithopter":"ornithopter_20070710.zip",
"p51d":"p51d_20140111.zip",
"pa22":"pa22_20090703.zip",
"pa24-250":"pa24-250_20121128.zip",
"pa28-161":"pa28-161_20120717.zip",
"paraglider":"paraglider_20130620.zip",
"payen-pa100":"payen-pa100_20101117.zip",
"pittss1c":"pittss1c_20120717.zip",
"pushback":"pushback_20120717.zip",
"rallye-MS893":"rallye-MS893_20131016.zip",
"santa":"santa_20130216.zip",
"seahawk":"seahawk_20131025.zip",
"sf25b":"sf25b_20120222.zip",
"sgs233":"sgs233_20120717.zip",
"shuttle":"shuttle_20080808.zip",
"sm79":"sm79_20131022.zip",
"snowplow":"snowplow_1.0.zip",
"sopwithCamel":"sopwithCamel_20131008.zip",
"spitfireIX":"spitfireIX_20120717.zip",
"sr20":"sr20_20120717.zip",
"superguppySGT":"superguppySGT_20110613.zip",
"tu154":"tu154_20081221.zip",
"tu154b":"tu154b_20130805.zip",
"ufo":"ufo_20140125.zip",
"victor":"victor_20140116.zip",
"vulcanb2":"vulcanb2_20140116.zip",
"wrightFlyer1903":"wrightFlyer1903_20070710.zip",
"x24b":"x24b_20090126.zip",
"yak3":"yak3_20131022.zip"
}

View File

@@ -6,7 +6,7 @@ aircraftTypeTags = [
manufacturerTags = [
"boeing", "cessna", "diamond", "douglas", "bell", "piper",
"airbus", "vickers", "lockheed", "fokker",
"embrarer", "bombardier", "pilatus", "robin",
"embraer", "bombardier", "pilatus", "robin",
"eurocopter"
]
@@ -55,7 +55,8 @@ featureTags = [
"etops",
"floats",
"amphibious",
"supersonic"
"airship",
"aerobatic"
]
propulsionTags = [

View File

@@ -1,134 +0,0 @@
#!/usr/bin/python
import os, sys, re
import urllib
import hashlib # for MD5
import catalogFilenames
import catalogTags
import sgprops
fgRoot = sys.argv[1]
aircraftDir = os.path.join(fgRoot, 'Aircraft')
catalogProps = sgprops.Node()
catalogProps.addChild('version').value = '3.1.0'
catalogProps.addChild('id').value = 'org.flightgear.default'
catalogProps.addChild('license').value = 'GPL'
catalogProps.addChild('url').value = "http://fgfs.goneabitbursar.com/pkg/3.1.0/default-catalog.xml"
catalogProps.addChild('description').value = "Aircraft developed and maintained by the FlightGear project"
de = catalogProps.addChild('de')
# de.addChild('description').value = "<German translation of catalog description>"
fr = catalogProps.addChild('fr')
urls = [
"http://flightgear.wo0t.de/",
"http://ftp.icm.edu.pl/packages/flightgear/",
"http://mirrors.ibiblio.org/pub/mirrors/flightgear/ftp/",
"http://ftp.igh.cnrs.fr/pub/flightgear/ftp/",
"http://ftp.linux.kiev.ua/pub/fgfs/",
"http://fgfs.physra.net/ftp/"
]
thumbs = [
"http://www.flightgear.org/thumbs/v3.0/{acft}.jpg"
]
standardTagSet = frozenset(catalogTags.tags)
def isNonstandardTag(t):
return t not in standardTagSet
# create the download cache dir if require
cacheDir = '.catalog_cache'
if not os.path.isdir(cacheDir):
print "Creating catalog cache dir"
os.mkdir(cacheDir)
for d in os.listdir(aircraftDir):
acftDirPath = os.path.join(aircraftDir, d)
if not os.path.isdir(acftDirPath):
continue
setFilePath = None
# find the first set file
# FIXME - way to designate the primary file
for f in os.listdir(acftDirPath):
if f.endswith("-set.xml"):
setFilePath = os.path.join(acftDirPath, f)
break
if setFilePath is None:
print "No -set.xml file found in",acftDirPath,"will be skipped"
continue
try:
props = sgprops.readProps(setFilePath, dataDirPath = fgRoot)
sim = props.getNode("sim")
pkgNode = catalogProps.addChild('package')
# basic / mandatory values
pkgNode.addChild('id').value = d
pkgNode.addChild('name').value = sim.getValue('description')
longDesc = sim.getValue('long-description')
if longDesc is not None:
pkgNode.addChild('description').value = longDesc
# copy all the standard values
for p in ['status', 'author', 'license']:
v = sim.getValue(p)
if v is not None:
pkgNode.addChild(p).value = v
# ratings
if sim.hasChild('rating'):
pkgRatings = pkgNode.addChild('rating')
for r in ['FDM', 'systems', 'cockpit', 'model']:
pkgRatings.addChild(r).value = sim.getValue('rating/' + r, 0)
# copy tags
if sim.hasChild('tags'):
for c in sim.getChild('tags').getChildren('tag'):
if isNonstandardTag(c.value):
print "Skipping non-standard tag:", c.value
else:
pkgNode.addChild('tag').value = c.value
# create download and thumbnail URLs
s = "{url}Aircraft-3.0/"
if d not in catalogFilenames.aircraft:
print "filename not found for:",d
raise RuntimeError("filename not found for:" + d)
s += catalogFilenames.aircraft[d]
for u in urls:
pkgNode.addChild("url").value = s.format(url=u)
for t in thumbs:
pkgNode.addChild("thumbnail").value = t.format(acft=d)
cachedZip = os.path.join(cacheDir, catalogFilenames.aircraft[d])
if not os.path.exists(cachedZip):
# download the zip
url = s.format(url=urls[0])
print "Downloading ", url
urllib.urlretrieve(url, cachedZip)
#else:
# print "Using cached zip for", d
zipFile = open(cachedZip, 'r')
digest = hashlib.md5(zipFile.read()).hexdigest()
pkgNode.addChild("md5").value = digest
pkgNode.addChild("file-size-bytes").value = os.path.getsize(cachedZip)
except:
print "Failure processing:", setFilePath
catalogProps.write("catalog.xml")

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 weather.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://weather.noaa.gov/pub/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 line.startswith(b"<img"):
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[5]
if dateutil.parser.parse(last_modified) > cutoff:
icao = tokens[4][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)

View File

@@ -18,7 +18,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
VERSION="2.33"
FGVERSION="release/3.4.0"
FGVERSION="release/$(git ls-remote --heads git://git.code.sf.net/p/flightgear/flightgear|grep '\/release\/'|cut -f4 -d'/'|sort -t . -k 1,1n -k2,2n -k3,3n|tail -1)"
#######################################################
# THANKS TO

2
fgdata

Submodule fgdata updated: d01b9bb1c7...611a5ce40d

2
fgrun

Submodule fgrun updated: c67c2ee07a...8ccb712dc5

View File

@@ -1,40 +1,50 @@
# git diff --quiet e5f841bc84d31fee339191a59b8746cb4eb8074c -- ./Aircraft/
import subprocess
import os
import os, sgprops
class GITCatalogRepository:
def __init__(self, path, usesSubmodules = False, singleAircraft = False):
self._path = path
if not os.path.exists(os.path.join(path, ".git")):
raise RuntimeError("not a Git directory:" + path)
self._usesSubmodules = usesSubmodules
def __init__(self, node, singleAircraft = False):
self._path = node.getValue("path")
if not os.path.exists(os.path.join(self._path , ".git")):
raise RuntimeError("not a Git directory:" + self._path )
self._usesSubmodules = node.getValue("uses-submodules", False)
self._singleAircraft = singleAircraft
self._currentRevision = subprocess.catch_output(["git", "rev-parse", "HEAD"],
self._currentRevision = subprocess.check_output(["git", "rev-parse", "HEAD"],
cwd = self._path)
self._aircraftPath = None
if node.hasChild("scan-suffix"):
self._aircraftPath = os.path.join(path, node.getValue("scan-suffix"))
@property
def path(self):
return self._path
@property
def aircraftPath(self):
return self._aircraftPath
def hasPathChanged(self, path, oldRev):
diffArgs = ["git", "diff", "--quiet", oldRev, "--"]
if not (self._usesSubmodules and self._singleAircraft):
diffArgs.append(path)
return subprocess.call(diffArgs, cwd = self._path)
def update(self):
subprocess.call(["git", "pull"])
self._currentRevision = subprocess.catch_output(["git", "rev-parse", "HEAD"],
self._currentRevision = subprocess.check_output(["git", "rev-parse", "HEAD"],
cwd = self._path)
if self._usesSubmodules:
subprocess.call(["git", "submodule", "update"], cwd = self._path)
subprocess.call(["git", "submodule", "update"], cwd = self._path)
def scmRevisionForPath(self, path):
if self._usesSubmodules:
return subprocess.catch_output(["git", "rev-parse", "HEAD"], cwd = self._path)
return self._currentRevision
return subprocess.check_output(["git", "rev-parse", "HEAD"], cwd = self._path)
return self._currentRevision

View File

@@ -15,33 +15,41 @@ 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 -G Xcode ../simgear
cmake -DCMAKE_INSTALL_PREFIX:PATH=$WORKSPACE/dist -DENABLE_CURL:BOOL="ON" -DCMAKE_BUILD_TYPE=RelWithDebInfo ../simgear
# compile
xcodebuild -configuration RelWithDebInfo -target install build
make
if [ $? -ne '0' ]; then
echo "make simgear failed"
exit 1
fi
make install
popd
################################################################################
echo "Starting on FlightGear"
pushd fgBuild
cmake -DFG_NIGHTLY=1 -DCMAKE_INSTALL_PREFIX:PATH=$WORKSPACE/dist -G Xcode ../flightgear
cmake -DFG_NIGHTLY=1 -DCMAKE_INSTALL_PREFIX:PATH=$WORKSPACE/dist -DCMAKE_BUILD_TYPE=RelWithDebInfo ../flightgear
xcodebuild -configuration RelWithDebInfo -target install build
make
if [ $? -ne '0' ]; then
echo "make flightgear failed"
exit 1
fi
make install
popd
chmod +x $WORKSPACE/dist/bin/osgversion

View File

@@ -132,8 +132,6 @@ File.open("#{contents}/Info.plist", 'w') { |f|
createArgs = "-format UDBZ -imagekey bzip2-level=9 -quiet -volname #{volName}"
# work-around for 3.6: copy aircraft files too
`rsync -a extended-data/ #{resourcesDir}/data`
if !$isRelease
# create the 'lite' DMG without the base files

View File

@@ -1,228 +1,44 @@
#!/usr/bin/python
import os, sys, re, glob
import hashlib # for MD5
import os, sys, re, glob, shutil
import subprocess
import shutil # for copy2
import catalogTags
import sgprops
#from multiprocessing import Pool
import argparse
import urllib2
import package as pkg
import svn_catalog_repository
import git_catalog_repository
import git_discrete_repository
parser = argparse.ArgumentParser()
parser.add_argument("--clean", help="Regenerate every package", type=bool)
parser.add_argument("--clean", help="Regenerate every package",
action="store_true")
parser.add_argument("--update", help="Update/pull SCM source",
action="store_true")
parser.add_argument("--force-dirty", dest="forcedirty",
help="Mark every package as dirty", action="store_true")
parser.add_argument("--no-update",
dest = "noupdate",
help="Disable updating from SCM source",
action="store_true")
parser.add_argument("--no-upload",
dest = "noupload",
help="Disable uploading to destination server",
action="store_true")
parser.add_argument("dir", help="Catalog directory")
args = parser.parse_args()
standardTagSet = frozenset(catalogTags.tags)
def isNonstandardTag(t):
return t not in standardTagSet
thumbnailNames = ["thumbnail.png", "thumbnail.jpg"]
CATALOG_VERSION = 4
includePaths = []
packages = {}
class VariantData:
def __init__(self, path, node):
#self._primary = primary
self._path = path
self._name = node.getValue("sim/description")
# ratings
# seperate thumbnails
@property
def catalogNode(self):
n = sgprops.Node("variant")
n.addChild("id").value = self._path
n.addChild("name").value = self._name
class PackageData:
def __init__(self, path):
self._path = path
self._previousSCMRevision = None
self._previousRevision = 0
self._thumbnails = []
self._variants = {}
self._revision = 0
self._md5 = None
self._fileSize = 0
self._node = sgprops.Node("package")
self._node.addChild("id").value = self.id
def setPreviousData(self, node):
self._previousRevision = node.getValue("revision")
self._previousMD5 = node.getValue("md5")
self._previousSCMRevision = node.getValue("scm-revision")
self._fileSize = int(node.getValue("file-size-bytes"))
@property
def id(self):
return os.path.basename(self._path)
@property
def thumbnails(self):
return self._thumbnails
@property
def path(self):
return self._path
@property
def variants(self):
return self._variants
@property
def scmRevision(self):
currentRev = scmRepo.scmRevisionForPath(self._path)
if (currentRev is None):
raise RuntimeError("Unable to query SCM revision of files")
return currentRev
def isSourceModified(self, scmRepo):
if (self._previousSCMRevision == None):
return True
if (self._previousSCMRevision == self.scmRevision):
return False
return True
def scanSetXmlFiles(self, includes):
foundPrimary = False
foundMultiple = False
for f in os.listdir(self._path):
if not f.endswith("-set.xml"):
continue
p = os.path.join(self._path, f)
node = sgprops.readProps(p, includePaths = includes)
if not node.hasChild("sim"):
continue
simNode = node.getChild("sim")
if (simNode.getValue("exclude", False)):
continue
primary = simNode.getValue("variant-of", None)
if primary:
if not primary in self.variants:
self._variants[primary] = []
self._variants[primary].append(VariantData(self, node))
continue
if foundPrimary:
if not foundMultiple:
print "Multiple primary -set.xml files at:" + self._path
foundMultiple = True
continue
else:
foundPrimary = True;
self.parsePrimarySetNode(simNode)
for n in thumbnailNames:
if os.path.exists(os.path.join(self._path, n)):
self._thumbnails.append(n)
if not foundPrimary:
raise RuntimeError("No primary -set.xml found at:" + self._path)
def parsePrimarySetNode(self, sim):
# basic / mandatory values
self._node.addChild('name').value = sim.getValue('description')
longDesc = sim.getValue('long-description')
if longDesc is not None:
self._node.addChild('description').value = longDesc
# copy all the standard values
for p in ['status', 'author', 'license']:
v = sim.getValue(p)
if v is not None:
self._node.addChild(p).value = v
# ratings
if sim.hasChild('rating'):
pkgRatings = self._node.addChild('rating')
for r in ['FDM', 'systems', 'cockpit', 'model']:
pkgRatings.addChild(r).value = sim.getValue('rating/' + r, 0)
# copy tags
if sim.hasChild('tags'):
for c in sim.getChild('tags').getChildren('tag'):
if isNonstandardTag(c.value):
print "Skipping non-standard tag:", c.value, self.path
else:
self._node.addChild('tag').value = c.value
for t in sim.getChildren("thumbnail"):
self._thumbnails.append(t.value)
def validate(self):
for t in self._thumbnails:
if not os.path.exists(os.path.join(self._path, t)):
raise RuntimeError("missing thumbnail:" + t);
def generateZip(self, outDir):
self._revision = self._previousRevision + 1
zipName = self.id + ".zip"
zipFilePath = os.path.join(outDir, zipName)
os.chdir(os.path.dirname(self.path))
print "Creating zip", zipFilePath
# TODO: exclude certain files
# anything we can do to make this faster?
subprocess.call(['zip', '--quiet', '-r', zipFilePath, self.id])
zipFile = open(zipFilePath, 'r')
self._md5 = hashlib.md5(zipFile.read()).hexdigest()
self._fileSize = os.path.getsize(zipFilePath)
def useExistingCatalogData(self):
self._md5 = self._previousMD5
def packageNode(self, mirrorUrls, thumbnailUrl):
self._node.getChild("md5", create = True).value = self._md5
self._node.getChild("file-size-bytes", create = True).value = self._fileSize
self._node.getChild("revision", create = True).value = int(self._revision)
self._node.getChild("scm-revision", create = True).value = self.scmRevision
for m in mirrorUrls:
self._node.addChild("url").value = m + "/" + self.id + ".zip"
for t in self._thumbnails:
self._node.addChild("thumbnail").value = thumbnailUrl + "/" + self.id + "_" + t
for pr in self._variants:
for vr in self._variants[pr]:
self._node.addChild(vr.catalogNode)
return self._node
def extractThumbnails(self, thumbnailDir):
for t in self._thumbnails:
fullName = self.id + "_" + t
shutil.copy2(os.path.join(self._path, t),
os.path.join(thumbnailDir, fullName)
)
# TODO : verify image format, size and so on
def scanPackages(globPath):
def scanPackages(scmRepo):
result = []
globPath = scmRepo.aircraftPath
if globPath is None:
return result
print "Scanning", globPath
print os.getcwd()
for d in glob.glob(globPath):
@@ -231,19 +47,16 @@ def scanPackages(globPath):
print "no -set.xml in", d
continue
result.append(PackageData(d))
result.append(pkg.PackageData(d, scmRepo))
return result
def initScmRepository(node):
scmType = node.getValue("type")
if (scmType == "svn"):
svnPath = node.getValue("path")
return svn_catalog_repository.SVNCatalogRepository(svnPath)
return svn_catalog_repository.SVNCatalogRepository(node)
elif (scmType == "git"):
gitPath = node.getValue("path")
usesSubmodules = node.getValue("uses-submodules", False)
return git_catalog_repository.GitCatalogRepository(gitPath, usesSubmodules)
return git_catalog_repository.GITCatalogRepository(node)
elif (scmType == "git-discrete"):
return git_discrete_repository.GitDiscreteSCM(node)
elif (scmType == None):
@@ -251,8 +64,22 @@ def initScmRepository(node):
else:
raise RuntimeError("Unspported SCM type:" + scmType)
def initRepositories():
repositories = []
for scm in config.getChildren("scm"):
scmRepo = initScmRepository(scm)
if args.update or (not args.noupdate and scm.getValue("update")):
scmRepo.update()
# presumably include repos in parse path
# TODO: make this configurable
includePaths.append(scmRepo.path)
repositories.append(scmRepo)
return repositories
def processUpload(node, outputPath):
if not node.getValue("enabled", True):
if args.noupload or not node.getValue("enabled", True):
print "Upload disabled"
return
@@ -262,6 +89,7 @@ def processUpload(node, outputPath):
node.getValue("remote")],
cwd = outputPath)
elif (uploadType == "rsync-ssh"):
print "Doing rsync upload to:", node.getValue("remote")
subprocess.call(["rsync", node.getValue("args", "-azve"),
"ssh", ".",
node.getValue("remote")],
@@ -273,8 +101,27 @@ def processUpload(node, outputPath):
else:
raise RuntimeError("Unsupported upload type:" + uploadType)
# dictionary
packages = {}
def parseExistingCatalog():
global existingCatalogPath
global previousCatalog
# contains existing catalog
existingCatalogPath = os.path.join(outPath, 'catalog.xml')
if not os.path.exists(existingCatalogPath):
url = config.getValue("template/url")
print "Attempting downloading from", url
try:
# can happen on new or from clean, try to pull current
# catalog from the upload location
response = urllib2.urlopen(url, timeout = 5)
content = response.read()
f = open(existingCatalogPath, 'w' )
f.write( content )
f.close()
print "...worked"
except urllib2.URLError as e:
print "Downloading current catalog failed", e, "from", url
rootDir = args.dir
if not os.path.isabs(rootDir):
@@ -306,7 +153,7 @@ thumbnailPath = os.path.join(outPath, config.getValue('thumbnail-dir', "thumbnai
if not os.path.exists(thumbnailPath):
os.mkdir(thumbnailPath)
thumbnailUrl = config.getValue('thumbnail-url')
thumbnailUrls = list(t.value for t in config.getChildren("thumbnail-url"))
for i in config.getChildren("include-dir"):
if not os.path.exists(i.value):
@@ -314,30 +161,16 @@ for i in config.getChildren("include-dir"):
continue
includePaths.append(i.value)
mirrorUrls = []
# contains existing catalog
existingCatalogPath = os.path.join(outPath, 'catalog.xml')
scmRepo = initScmRepository(config.getChild('scm'))
# scan the directories in the aircraft paths
for g in config.getChildren("aircraft-dir"):
for p in scanPackages(g.value):
packages[p.id] = p
if not os.path.exists(existingCatalogPath):
try:
# can happen on new or from clean, try to pull current
# catalog from the upload location
response = urllib2.urlopen(config.getValue("template/url"), timeout = 5)
content = response.read()
f = open(existingCatalogPath, 'w' )
f.write( content )
f.close()
except urllib2.URLError as e:
print "Downloading current catalog failed", e
parseExistingCatalog()
repositories = initRepositories()
for scm in repositories:
for p in scanPackages(scm):
try:
p.scanSetXmlFiles(includePaths)
packages[p.id] = p
except:
print "Skipping SCM package due to exception:", p.path
if os.path.exists(existingCatalogPath):
try:
@@ -359,17 +192,17 @@ else:
catalogNode = sgprops.Node("catalog")
sgprops.copy(config.getChild("template"), catalogNode)
mirrorUrls = (m.value for m in config.getChildren("mirror"))
catalogNode.getChild("catalog-version", create = True).value = CATALOG_VERSION
mirrorUrls = list(m.value for m in config.getChildren("mirror"))
packagesToGenerate = []
for p in packages.values():
p.scanSetXmlFiles(includePaths)
if (p.isSourceModified(scmRepo)):
if p.isSourceModified or args.forcedirty:
packagesToGenerate.append(p)
else:
p.useExistingCatalogData()
excludeFilePath = os.path.join(rootDir, "zip-excludes.lst")
# def f(x):
# x.generateZip(outPath)
@@ -380,15 +213,14 @@ for p in packages.values():
# print(p.map(f,packagesToGenerate))
for p in packagesToGenerate:
p.generateZip(outPath)
p.generateZip(outPath, excludeFilePath)
p.extractThumbnails(thumbnailPath)
print "Creating catalog"
for p in packages.values():
catalogNode.addChild(p.packageNode(mirrorUrls, thumbnailUrl))
catalogNode.addChild(p.packageNode(mirrorUrls, thumbnailUrls[0]))
catalogNode.write(os.path.join(outPath, "catalog.xml"))
print "Uploading"
if config.hasChild("upload"):
processUpload(config.getChild("upload"), outPath)
for up in config.getChildren("upload"):
processUpload(up, outPath)

239
package.py Normal file
View File

@@ -0,0 +1,239 @@
import os, subprocess
import sgprops
import hashlib # for MD5
import shutil # for copy2
import catalogTags
standardTagSet = frozenset(catalogTags.tags)
def isNonstandardTag(t):
return t not in standardTagSet
thumbnailNames = ["thumbnail.png", "thumbnail.jpg"]
class VariantData:
def __init__(self, path, node):
#self._primary = primary
self._path = path
self._name = node.getValue("sim/description")
if (not self._name):
print "Missing description for " + path
self._name = "Missing description:" + self.id
# ratings
# seperate thumbnails
@property
def name(self):
return self._name
@property
def id(self):
return self._path[:-8] # "remove -set.xml" (8 chars)
@property
def catalogNode(self):
n = sgprops.Node("variant")
n.addChild("id").value = self.id
n.addChild("name").value = self.name
return n
class PackageData:
def __init__(self, path, scmRepo):
self._path = path
self._scm = scmRepo
self._previousSCMRevision = None
self._previousRevision = 0
self._thumbnails = []
self._variants = {}
self._revision = 0
self._md5 = None
self._fileSize = 0
self._primarySetXmlPath = None
self._node = sgprops.Node("package")
def setPreviousData(self, node):
self._previousRevision = node.getValue("revision")
self._previousMD5 = node.getValue("md5")
self._previousSCMRevision = node.getValue("scm-revision")
self._fileSize = int(node.getValue("file-size-bytes"))
@property
def id(self):
return self._primarySetXmlPath
@property
def thumbnails(self):
return self._thumbnails
@property
def path(self):
return self._path
@property
def variants(self):
return self._variants
@property
def scmRevision(self):
currentRev = self._scm.scmRevisionForPath(self.path)
if (currentRev is None):
raise RuntimeError("Unable to query SCM revision of files")
return currentRev
@property
def isSourceModified(self):
if (self._previousSCMRevision == None):
return True
if (self._previousSCMRevision == self.scmRevision):
return False
return True
def scanSetXmlFiles(self, includes):
foundPrimary = False
foundMultiple = False
for f in os.listdir(self.path):
if not f.endswith("-set.xml"):
continue
p = os.path.join(self.path, f)
node = sgprops.readProps(p, includePaths = includes)
if not node.hasChild("sim"):
continue
simNode = node.getChild("sim")
# honour variosu exclusion flags
if (simNode.getValue("exclude-from-catalog", False) or simNode.getValue("exclude-from-gui", False)):
continue
primary = simNode.getValue("variant-of", None)
if primary:
if not primary in self.variants:
self._variants[primary] = []
self._variants[primary].append(VariantData(f, node))
continue
if foundPrimary:
if not foundMultiple:
print "Multiple primary -set.xml files at:" + self.path
print "\t" + p
foundMultiple = True
continue
else:
foundPrimary = True;
self._primarySetXmlPath = f[:-8] # trim -set.xml
self.parsePrimarySetNode(simNode)
for n in thumbnailNames:
if os.path.exists(os.path.join(self.path, n)):
self._thumbnails.append(n)
if not foundPrimary:
raise RuntimeError("No primary -set.xml found at:" + self.path)
def parsePrimarySetNode(self, sim):
# basic / mandatory values
self._node.addChild('name').value = sim.getValue('description')
longDesc = sim.getValue('long-description')
if longDesc is not None:
self._node.addChild('description').value = longDesc
# copy all the standard values
for p in ['status', 'author', 'license']:
v = sim.getValue(p)
if v is not None:
self._node.addChild(p).value = v
# ratings
if sim.hasChild('rating'):
pkgRatings = self._node.addChild('rating')
for r in ['FDM', 'systems', 'cockpit', 'model']:
pkgRatings.addChild(r).value = sim.getValue('rating/' + r, 0)
# copy tags
if sim.hasChild('tags'):
for c in sim.getChild('tags').getChildren('tag'):
if isNonstandardTag(c.value):
print "Skipping non-standard tag:", c.value, self.path
else:
self._node.addChild('tag').value = c.value
for t in sim.getChildren("thumbnail"):
self._thumbnails.append(t.value)
def validate(self):
for t in self._thumbnails:
if not os.path.exists(os.path.join(self.path, t)):
raise RuntimeError("missing thumbnail:" + t);
def generateZip(self, outDir, globalExcludePath):
self._revision = self._previousRevision + 1
baseName = os.path.basename(self.path)
zipName = baseName + ".zip"
zipFilePath = os.path.join(outDir, zipName)
os.chdir(os.path.dirname(self.path))
print "Creating zip", zipFilePath
# anything we can do to make this faster?
zipArgs = ['zip', '--quiet', '-r']
if os.path.exists(globalExcludePath):
zipArgs += [ "-x@" + globalExcludePath]
excludePath = os.path.join(self.path, 'package-exclude.lst')
if (os.path.exists(excludePath)):
print self.id, "has zip exclude list"
zipArgs += ["-x@" + excludePath]
zipArgs += [zipFilePath, baseName]
subprocess.call(zipArgs)
zipFile = open(zipFilePath, 'r')
self._md5 = hashlib.md5(zipFile.read()).hexdigest()
self._fileSize = os.path.getsize(zipFilePath)
def useExistingCatalogData(self):
self._md5 = self._previousMD5
def packageNode(self, mirrorUrls, thumbnailUrl):
self._node.addChild("id").value = self.id
self._node.getChild("md5", create = True).value = self._md5
self._node.getChild("file-size-bytes", create = True).value = self._fileSize
self._node.getChild("revision", create = True).value = int(self._revision)
self._node.getChild("scm-revision", create = True).value = self.scmRevision
baseName = os.path.basename(self.path)
self._node.getChild("dir", create = True).value = baseName
zipName = baseName + ".zip"
for m in mirrorUrls:
self._node.addChild("url").value = m + "/" + zipName
for t in self._thumbnails:
self._node.addChild("thumbnail-path").value = t
self._node.addChild("thumbnail").value = thumbnailUrl + "/" + self.id + "_" + t
for pr in self._variants:
for vr in self._variants[pr]:
self._node.addChild(vr.catalogNode)
return self._node
def extractThumbnails(self, thumbnailDir):
for t in self._thumbnails:
fullName = self.id + "_" + t
shutil.copy2(os.path.join(self._path, t),
os.path.join(thumbnailDir, fullName)
)
# TODO : verify image format, size and so on

View File

@@ -1,5 +1,9 @@
#!/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
@@ -19,6 +23,7 @@ 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 isReleaseCandidate:
publicRoot = "/var/www/html/builds/rc"
@@ -89,7 +94,9 @@ for file in incomingFiles:
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)
@@ -111,3 +118,11 @@ if len(oldFiles) > 0:
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

@@ -11,7 +11,7 @@ class Node(object):
self._parent = parent
self._name = name
self._value = None
self._index = 0
self._index = index
self._children = []
@property

Submodule simgear updated: a52d3540a0...e7598df4d3

View File

@@ -1,25 +1,41 @@
import subprocess
import subprocess, os, sgprops
import xml.etree.cElementTree as ET
class SVNCatalogRepository:
def __init__(self, path):
def __init__(self, node):
path = node.getValue("path")
if not os.path.exists(path):
raise RuntimeError("No directory at:" + path)
self._path = path
xml = subprocess.check_output(["svn", "info", "--xml", path])
root = ET.fromstring(xml)
if (root.find(".//repository/root") == None):
raise RuntimeError("Not an SVN repository:" + path)
self._aircraftPath = None
if node.hasChild("scan-suffix"):
self._aircraftPath = os.path.join(path, node.getValue("scan-suffix"))
@property
def path(self):
return self._path
@property
def aircraftPath(self):
return self._aircraftPath
def hasPathChanged(self, path, oldRevision):
return self.scmRevisionForPath(path) != oldRevision
def scmRevisionForPath(self, path):
xml = subprocess.check_output(["svn", "info", "--xml", path])
root = ET.fromstring(xml)
commit = root.find(".//entry/commit")
return commit.get('revision', 0)
def update(self):
subprocess.call(["svn", "update"])
print "SVN update of", self._path
subprocess.call(["svn", "update", self._path])

1
version Normal file
View File

@@ -0,0 +1 @@
2016.2.1