Compare commits

..

27 Commits

Author SHA1 Message Date
James Turner
ec87228483 Fix Mac packaging. 2015-05-06 11:29:53 +01:00
James Turner
0014a3b728 Win & Mac package fixes. 2015-04-29 21:48:39 +01:00
James Turner
4bcce7bf6b Include Model/AI/Scenery files in base package 2015-04-29 21:43:40 +01:00
James Turner
93437a36db Enable launcher on Mac rlease builds explicitly. 2015-04-26 22:45:20 +01:00
James Turner
ce33b8e106 Set explicit revision to make Mac build happy. 2015-04-10 16:21:59 +01:00
James Turner
9abe776f11 Use grumble, not sphere, to stage aircraft files.
Aircraft for 3.4.1 package are at /home/jenkins/fgdata_340 now.
2015-04-10 15:21:31 +01:00
James Turner
3377e64dc8 Ooops, remove the dir too. 2015-04-08 13:25:49 +01:00
James Turner
d677cf542b Refresh gitmodules on the branch. 2015-04-08 09:13:03 +01:00
James Turner
8c442a6882 Bump heads. 2015-04-08 00:55:47 +01:00
James Turner
94608dca2e Work on packaging for 3.4.1 release 2015-04-08 00:20:59 +01:00
James Turner
3003c677de Base package assembly for 3.4.1 2015-04-06 16:20:02 +01:00
James Turner
6cb2539ef0 Add fgdata release branch on fgmeta. 2015-04-06 15:32:55 +01:00
James Turner
032e83f16a Manual Mac bump again. 2015-02-24 12:16:31 +00:00
James Turner
599783e630 Bump for Mac slave. 2015-02-23 17:16:05 +00:00
James Turner
66307024d2 Bump for Mac fixes. 2015-02-20 13:24:40 +00:00
James Turner
9995ecc702 Manual bump for Mac slave. 2015-02-18 10:07:48 +00:00
James Turner
9f357d48ef Bump FG. (Mac Jenkins slave being odd)
This kind of thing shouldn’t be needed anymore, but the Mac slave
keeps pulling the wrong branch tip. Making an explicit commit here to
see if that makes any difference.
2015-02-17 12:21:01 +00:00
James Turner
8c1ae25172 Fix Info.plist template 2015-02-16 13:56:08 +00:00
James Turner
5b8a136e70 Bump FG 2015-02-13 16:58:34 +00:00
James Turner
3e884c6930 V2 Code-signing on Mac. 2015-02-13 14:53:50 +00:00
Clément de l'Hamaide
a0f4935580 Windows installer: do not use previous App dir for new installation 2015-02-12 18:58:34 +01:00
Clément de l'Hamaide
eb52d011bd Back to rsync stuff for base package on Linux 2015-01-19 00:46:13 +01:00
Clément de l'Hamaide
f2eac53a90 Back to rsync stuff for base package on Mac 2015-01-19 00:44:15 +01:00
James Turner
8738690def Revised package script for Mac. 2015-01-18 23:03:58 +00:00
James Turner
84fdb24d6d Mac launcher is gone. 2015-01-18 22:56:14 +00:00
James Turner
b1ed584316 Remove references to SVN in Mac release. 2015-01-18 22:52:35 +00:00
Clément de l'Hamaide
d0d738dea1 Bump submodule revision 2015-01-18 18:29:35 +01:00
33 changed files with 1586 additions and 1649 deletions

6
.gitignore vendored
View File

@@ -12,6 +12,7 @@ sgBuild
image
build
macflightgear
fgdata
src
tmp
Makefile
@@ -19,4 +20,7 @@ CMakeFiles
archivebuild
osgbuild
CMakeCache.txt
*.pyc
aircraft-data
base_package
extended-data

12
.gitmodules vendored
View File

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

View File

@@ -1,41 +1,65 @@
cmake_minimum_required (VERSION 2.8.0)
cmake_minimum_required (VERSION 2.6.4)
include (ExternalProject)
project(FlightGear-Meta)
if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
if(NOT CMAKE_INSTALL_PREFIX)
set(CMAKE_INSTALL_PREFIX ${CMAKE_BINARY_DIR}/install)
message(STATUS "Default install dir set to ${CMAKE_INSTALL_PREFIX}")
message(STATUS "Default install dir to ${CMAKE_INSTALL_PREFIX}")
endif()
if (UNIX)
set(BOOST_BOOTSTRAP "./bootstrap.sh" --prefix=${CMAKE_INSTALL_PREFIX})
else()
set(BOOST_BOOTSTRAP "bootstrap.bat")
endif()
set(SG_DEPS OSG)
set(FG_DEPS SimGear)
set(SG_CMAKE_ARGS "")
set(FG_CMAKE_ARGS "")
set(FGRUN_CMAKE_ARGS "")
if(APPLE)
set(BOOST_ARGS link=static stage --with-system)
ExternalProject_Add(Boost
PREFIX ${CMAKE_BINARY_DIR}
SVN_REPOSITORY http://svn.boost.org/svn/boost/tags/release/Boost_1_52_0
UPDATE_COMMAND ${BOOST_BOOTSTRAP}
CONFIGURE_COMMAND ""
BUILD_COMMAND ./bjam ${BOOST_ARGS}
BUILD_IN_SOURCE 1
INSTALL_COMMAND ./b2 install ${BOOST_ARGS})
list(APPEND SG_DEPS Boost)
endif() # of Apple
set(OSG_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX})
set(SG_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX})
set(FG_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX})
set(PLIB_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX})
set(RTI_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX})
set(FGRUN_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX})
# OpenSceneGraph configuration
#set(OSG_SOURCE http://www.openscenegraph.org/downloads/developer_releases/OpenSceneGraph-3.2.0.zip)
set(OSG_SOURCE https://github.com/openscenegraph/osg.git)
set(OSG_TAG OpenSceneGraph-3.2)
set(OSG_SOURCE http://www.openscenegraph.org/downloads/developer_releases/OpenSceneGraph-3.2.0.zip)
if (APPLE)
# force disable Qt and Jasper
set(OSG_CMAKE_ARGS
set(SDKROOT /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk)
# force disable Qt and Jasper, and ensure an SDKROOT is set, or
# osgViewer system detection goes wrongh
set(OSG_CMAKE_ARGS -DCMAKE_OSX_SYSROOT=${SDKROOT}
-DOSG_USE_QT=0
-DJASPER_LIBRARY=
-DSDL_LIBRARY:FILEPATH=
-DCMAKE_OSX_ARCHITECTURES=x86_64
-DCMAKE_OSX_DEPLOYMENT_TARGET=10.7
)
# OSG with some patches applied for Mac
set(OSG_SOURCE https://github.com/zakalawe/osg.git)
set(OSG_TAG fgfs-osg-32)
# set(OSG_SOURCE GIT_REPOSITORY git://gitorious.org/+flightgear-developers/openscenegraph/mac-release-osg.git)
# set(OSG_SOURCE URL http://www.openscenegraph.org/downloads/developer_releases/OpenSceneGraph-3.2.0.zip)
elseif(MSVC)
set(OSG_MSVC "msvc")
if (${MSVC_VERSION} EQUAL 1700)
@@ -80,31 +104,64 @@ else()
# normal OSG
endif()
if (MSVC)
# download 3rdparty dependencies zip, including boost
ExternalProject_Add(WinDeps
SVN_REPOSITORY http://fgfs.goneabitbursar.com/fgwin3rdparty/trunk/msvc100/${RDPARTY_DIR}
# extract to current root
SOURCE_DIR ${CMAKE_BINARY_DIR}/winDeps/${RDPARTY_DIR}
BINARY_DIR ${CMAKE_BINARY_DIR}
UPDATE_COMMAND ""
CONFIGURE_COMMAND ""
BUILD_COMMAND ${CMAKE_SOURCE_DIR}/installWinDeps.bat
INSTALL_COMMAND ""
)
set(BOOST_ARGS link=static stage --with-system)
set(Boost_Version 1.54.0)
string(REPLACE "." "_" Boost_Version_Underscore ${Boost_Version})
ExternalProject_Add(Boost
PREFIX ${CMAKE_BINARY_DIR}
URL http://downloads.sourceforge.net/project/boost/boost/${Boost_Version}/boost_${Boost_Version_Underscore}.zip
URL_MD5 78a35834c45220a6164310e280abe675
UPDATE_COMMAND ""
CONFIGURE_COMMAND ${BOOST_BOOTSTRAP}
BUILD_COMMAND bjam --with-program_options ${BOOST_ARGS}
BUILD_IN_SOURCE 1
INSTALL_COMMAND ""
)
list(APPEND SG_DEPS Boost)
list(APPEND SG_CMAKE_ARGS -DBOOST_ROOT=${CMAKE_BINARY_DIR}/src/Boost)
list(APPEND FG_CMAKE_ARGS -DBOOST_ROOT=${CMAKE_BINARY_DIR}/src/Boost)
list(APPEND FG_CMAKE_ARGS -DPNG_LIBRARY=${CMAKE_BINARY_DIR}/${RDPARTY_DIR}/lib/libpng16.lib)
list(APPEND FGRUN_CMAKE_ARGS -DBOOST_ROOT=${CMAKE_BINARY_DIR}/src/Boost)
endif(MSVC) # of Windows
ExternalProject_Add(OSG
DEPENDS ${OSG_DEPS}
PREFIX ${CMAKE_BINARY_DIR}
GIT_REPOSITORY ${OSG_SOURCE}
GIT_TAG ${OSG_TAG}
URL ${OSG_SOURCE}
URL_HASH MD5=4980f8692712a24d4c99f363f80c6814
BINARY_DIR osgbuild
CMAKE_ARGS ${OSG_CMAKE_ARGS} -DCMAKE_INSTALL_PREFIX=${OSG_INSTALL_PREFIX}
)
# Because OSG install the libraries in lib64/ instead of lib/
if (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
ExternalProject_Add_Step(OSG after_install
COMMAND ${CMAKE_COMMAND} -E create_symlink ${OSG_INSTALL_PREFIX}/lib64 ${OSG_INSTALL_PREFIX}/lib
COMMAND ${CMAKE_COMMAND} -E copy_directory ${OSG_INSTALL_PREFIX}/lib64 ${OSG_INSTALL_PREFIX}/lib
COMMAND ${CMAKE_COMMAND} -E remove_directory ${OSG_INSTALL_PREFIX}/lib64
DEPENDEES install
)
endif()
endif(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
# FIXME install of OpenRTI is failing on Windows, files in PREFIX/share which
# are ending up in C:/Program Files/OpenRTI
if (FALSE)
if (NOT MSVC)
ExternalProject_Add(OpenRTI
PREFIX ${CMAKE_BINARY_DIR}
DOWNLOAD_COMMAND GIT_REPOSITORY git://git.code.sf.net/p/openrti/OpenRTI
DOWNLOAD_COMMAND GIT_REPOSITORY git://gitorious.org/openrti/openrti.git
BINARY_DIR rtibuild
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${RTI_INSTALL_PREFIX}
)
@@ -148,6 +205,23 @@ if (NOT WIN32)
list(APPEND FG_DEPS PLIB)
endif()
# Only compile FGRun for Windows
if (MSVC)
list(APPEND FGRUN_CMAKE_ARGS -DMSVC_3RDPARTY_ROOT:PATH=${CMAKE_BINARY_DIR})
list(APPEND FGRUN_CMAKE_ARGS -DFLTK_FLUID_EXECUTABLE:FILEPATH=${CMAKE_BINARY_DIR}/${RDPARTY_DIR}/bin/fluid.exe)
list(APPEND FGRUN_CMAKE_ARGS -DGETTEXT_MSGFMT_EXECUTABLE:FILEPATH==${CMAKE_BINARY_DIR}/${RDPARTY_DIR}/bin/msgfmt.exe)
list(APPEND FGRUN_CMAKE_ARGS -DGETTEXT_MSGMERGE_EXECUTABLE:FILEPATH=${CMAKE_BINARY_DIR}/${RDPARTY_DIR}/bin/msgmerge.exe)
ExternalProject_Add(FGRun
PREFIX ${CMAKE_BINARY_DIR}
DEPENDS ${FG_DEPS}
DOWNLOAD_COMMAND "" # no need to download
UPDATE_COMMAND "" # or update.
SOURCE_DIR ${CMAKE_CURRENT_LIST_DIR}/fgrun
BINARY_DIR fgrunbuild
CMAKE_ARGS ${FGRUN_CMAKE_ARGS} -DCMAKE_INSTALL_PREFIX=${FGRUN_INSTALL_PREFIX} -DCMAKE_PREFIX_PATH=${OSG_INSTALL_PREFIX} -DADDITIONAL_LIBRARY_PATHS=${SG_INSTALL_PREFIX}
)
endif()
ExternalProject_Add(FlightGear
PREFIX ${CMAKE_BINARY_DIR}
DEPENDS ${FG_DEPS}

View File

@@ -37,7 +37,7 @@
AppId=FlightGear
AppName=FlightGear
AppPublisher=The FlightGear Team
OutputBaseFilename=FlightGear-{#FGVersion}{#FGDetails}
OutputBaseFilename=fgsetup-{#FGVersion}
AppVerName=FlightGear v{#FGVersion}
AppPublisherURL=http://www.flightgear.org
AppSupportURL=http://www.flightgear.org
@@ -45,7 +45,6 @@ AppUpdatesURL=http://www.flightgear.org
DefaultDirName={pf}\FlightGear {#FGVersion}
UsePreviousAppDir=no
DefaultGroupName=FlightGear {#FGVersion}
UsePreviousGroup=no
LicenseFile=X:\flightgear\COPYING
Uninstallable=yes
SetupIconFile=X:\flightgear\package\flightgear.ico
@@ -69,13 +68,22 @@ Name: "insoal"; Description: "Install OpenAL (the sound engine)"
; NOTE: run subst X: F:\ (or whatever path the expanded tree resides at)
;Source: "X:\*.txt"; DestDir: "{app}"; Flags: ignoreversion
; 32 bits install
Source: "X:\install\msvc100\FlightGear\bin\*"; DestDir: "{app}\bin"; Flags: ignoreversion recursesubdirs; Check: not Is64BitInstallMode
Source: "X:\install\msvc100\FlightGear\bin\fgfs.exe"; DestDir: "{app}\bin"; Flags: ignoreversion; Check: not Is64BitInstallMode
Source: "X:\install\msvc100\FlightGear\bin\fgadmin.exe"; DestDir: "{app}\bin"; Flags: ignoreversion; Check: not Is64BitInstallMode
Source: "X:\install\msvc100\FlightGear\bin\terrasync.exe"; DestDir: "{app}\bin"; Flags: ignoreversion; Check: not Is64BitInstallMode
Source: "X:\install\msvc100\FlightGear\bin\js_demo.exe"; DestDir: "{app}\bin"; Flags: ignoreversion; Check: not Is64BitInstallMode
Source: "X:\install\msvc100\FlightGear\bin\fgjs.exe"; DestDir: "{app}\bin"; Flags: ignoreversion; Check: not Is64BitInstallMode
Source: "X:\install\msvc100\FlightGear\bin\GPSsmooth.exe"; DestDir: "{app}\bin"; Flags: ignoreversion; Check: not Is64BitInstallMode
Source: "X:\install\msvc100\FlightGear\bin\UGsmooth.exe"; DestDir: "{app}\bin"; Flags: ignoreversion; Check: not Is64BitInstallMode
Source: "X:\install\msvc100\FlightGear\bin\MIDGsmooth.exe"; DestDir: "{app}\bin"; Flags: ignoreversion; Check: not Is64BitInstallMode
Source: "X:\install\msvc100\FlightGear\bin\metar.exe"; DestDir: "{app}\bin"; Flags: ignoreversion; Check: not Is64BitInstallMode
Source: "X:\install\msvc100\FlightGear\bin\yasim.exe"; DestDir: "{app}\bin"; Flags: ignoreversion; Check: not Is64BitInstallMode
Source: "X:\install\msvc100\FlightGear\bin\fgcom.exe"; DestDir: "{app}\bin"; Flags: ignoreversion; Check: not Is64BitInstallMode
Source: "X:\install\msvc100\FGRun\bin\fgrun.exe"; DestDir: "{app}\bin"; Flags: ignoreversion ; Check: not Is64BitInstallMode
Source: "X:\install\msvc100\FGRun\share\locale\*"; DestDir: "{app}\bin\locale"; Flags: ignoreversion recursesubdirs; Check: not Is64BitInstallMode
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\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
Source: "X:\3rdParty\bin\CrashSender1402.exe"; DestDir: "{app}\bin"; Check: not Is64BitInstallMode
@@ -83,14 +91,23 @@ Source: "{#VCInstallDir}\redist\x86\Microsoft.VC100.CRT\*.dll"; DestDir: "{app}
Source: "X:\3rdParty\bin\vcredist_x86.exe"; DestDir: "{app}\bin"; Flags: skipifsourcedoesntexist; Check: not Is64BitInstallMode
; 64 bits install
Source: "X:\install\msvc100-64\FlightGear\bin\*"; DestDir: "{app}\bin"; Flags: ignoreversion recursesubdirs; Check: Is64BitInstallMode
Source: "X:\install\msvc100-64\FlightGear\bin\fgfs.exe"; DestDir: "{app}\bin"; Flags: ignoreversion; Check: Is64BitInstallMode
Source: "X:\install\msvc100-64\FlightGear\bin\fgadmin.exe"; DestDir: "{app}\bin"; Flags: ignoreversion; Check: Is64BitInstallMode
Source: "X:\install\msvc100-64\FlightGear\bin\terrasync.exe"; DestDir: "{app}\bin"; Flags: ignoreversion; Check: Is64BitInstallMode
Source: "X:\install\msvc100-64\FlightGear\bin\js_demo.exe"; DestDir: "{app}\bin"; Flags: ignoreversion; Check: Is64BitInstallMode
Source: "X:\install\msvc100-64\FlightGear\bin\fgjs.exe"; DestDir: "{app}\bin"; Flags: ignoreversion; Check: Is64BitInstallMode
Source: "X:\install\msvc100-64\FlightGear\bin\GPSsmooth.exe"; DestDir: "{app}\bin"; Flags: ignoreversion; Check: Is64BitInstallMode
Source: "X:\install\msvc100-64\FlightGear\bin\UGsmooth.exe"; DestDir: "{app}\bin"; Flags: ignoreversion; Check: Is64BitInstallMode
Source: "X:\install\msvc100-64\FlightGear\bin\MIDGsmooth.exe"; DestDir: "{app}\bin"; Flags: ignoreversion; Check: Is64BitInstallMode
Source: "X:\install\msvc100-64\FlightGear\bin\metar.exe"; DestDir: "{app}\bin"; Flags: ignoreversion; Check: Is64BitInstallMode
Source: "X:\install\msvc100-64\FlightGear\bin\yasim.exe"; DestDir: "{app}\bin"; Flags: ignoreversion; Check: Is64BitInstallMode
Source: "X:\install\msvc100-64\FlightGear\bin\fgcom.exe"; DestDir: "{app}\bin"; Flags: ignoreversion; Check: Is64BitInstallMode
Source: "X:\install\msvc100-64\FGRun\bin\fgrun.exe"; DestDir: "{app}\bin"; Flags: ignoreversion; Check: Is64BitInstallMode
Source: "X:\install\msvc100-64\FGRun\share\locale\*"; DestDir: "{app}\bin\locale"; Flags: ignoreversion recursesubdirs; Check: Is64BitInstallMode
Source: "X:\3rdParty.x64\bin\zlib.dll"; DestDir: "{app}\bin"; Check: Is64BitInstallMode
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\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
Source: "X:\3rdParty.x64\bin\CrashSender1402.exe"; DestDir: "{app}\bin"; Check: Is64BitInstallMode
@@ -101,10 +118,13 @@ 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
#if IncludeData == "TRUE"
; NOTE: tar.gz file uses name 'fgdata', to avoid renaming it, look for both names.
; assuming no setup has both names and hence we don't package twice :)
Source: "X:\data\*.*"; DestDir: "{app}\data"; Flags: ignoreversion recursesubdirs skipifsourcedoesntexist
Source: "X:\fgdata\*.*"; DestDir: "{app}\data"; Flags: ignoreversion recursesubdirs skipifsourcedoesntexist
#endif
; work-around for 3.4.1: look for additional aircraft data
Source: "X:\extended-data\*.*"; DestDir: "{app}\data"; Flags: ignoreversion recursesubdirs skipifsourcedoesntexist
; 32 bits install
Source: "{#OSGInstallDir}\bin\osg{#OSGSoNumber}-osg.dll"; DestDir: "{app}\bin"; Check: not Is64BitInstallMode
@@ -189,17 +209,16 @@ Name: "{userdocs}\FlightGear\TerraSync"; Permissions: everyone-modify; Check: no
Name: "{userdocs}\FlightGear\Custom Scenery"; Permissions: everyone-modify; Check: not DirExists(ExpandConstant('{userdocs}\FlightGear\Custom Scenery'))
[Icons]
Name: "{userdesktop}\FlightGear {#FGVersion}"; Filename: "{app}\bin\fgfs.exe"; Parameters: "--launcher"; WorkingDir: "{app}"; Tasks: desktopicon;
Name: "{group}\FlightGear Launcher"; Filename: "{app}\bin\fgfs.exe"; Parameters: "--launcher"; WorkingDir: "{app}";
Name: "{group}\FlightGear Manual"; Filename: "{app}\fgdata\Docs\getstart.pdf"
Name: "{group}\FlightGear Documentation"; Filename: "{app}\fgdata\Docs\index.html"
Name: "{userdesktop}\FlightGear {#FGVersion}"; Filename: "{app}\bin\fgrun.exe"; WorkingDir: "{app}"; Tasks: desktopicon;
Name: "{group}\FlightGear Launcher"; Filename: "{app}\bin\fgrun.exe"; WorkingDir: "{app}";
Name: "{group}\FlightGear Manual"; Filename: "{app}\data\Docs\getstart.pdf"
Name: "{group}\FlightGear Documentation"; Filename: "{app}\data\Docs\index.html"
Name: "{group}\Flightgear Wiki"; Filename: "http://wiki.flightgear.org"
Name: "{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\TerraSync"; Filename: "{app}\bin\terrasync.exe"; Parameters: "-S -p 5505 -d ""{userdocs}\FlightGear\TerraSync"""; 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"
@@ -208,7 +227,7 @@ Name: "{group}\Tools\yasim"; Filename: "cmd"; Parameters: "/k ""{app}\bin\yasim.
Name: "{group}\Tools\fgpanel"; Filename: "cmd"; Parameters: "/k ""{app}\bin\fgpanel.exe"" -h"; WorkingDir: "{app}\bin"
Name: "{group}\Tools\FGCom"; Filename: "{app}\bin\fgcom.exe"; WorkingDir: "{app}\bin"
Name: "{group}\Tools\FGCom-testing"; Filename: "{app}\bin\fgcom.exe"; Parameters: "--frequency=910"; WorkingDir: "{app}\bin"
Name: "{group}\Tools\Explore Documentation Folder"; Filename: "{app}\fgdata\Docs"
Name: "{group}\Tools\Explore Documentation Folder"; Filename: "{app}\data\Docs"
[Run]
filename: "cmd.exe"; WorkingDir: "{app}\bin"; Parameters: "/C del msvc*.dll"; Check: FileExists(ExpandConstant('{app}\bin\vcredist_x86.exe'))
@@ -217,7 +236,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}\fgdata"" ""--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"""

21
aircraft.rules Normal file
View File

@@ -0,0 +1,21 @@
+ /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/*
+ /Models
+ /Scenery
+ /AI
- /*

11
base-package.rules Normal file
View File

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

View File

View File

@@ -1,142 +0,0 @@
IF NOT DEFINED WORKSPACE SET WORKSPACE=%~dp0
REM 32bits
md build-sg32
md build-fg32
md build-fgrun32
cd build-sg32
cmake ..\simgear -G "Visual Studio 10" ^
-DMSVC_3RDPARTY_ROOT=%WORKSPACE% ^
-DCMAKE_INSTALL_PREFIX:PATH=%WORKSPACE%/install/msvc100/SimGear ^
-DBOOST_ROOT=%WORKSPACE%/Boost
cmake --build . --config Release --target INSTALL
cd ..\build-fg32
cmake ..\flightgear -G "Visual Studio 10" ^
-DMSVC_3RDPARTY_ROOT=%WORKSPACE% ^
-DCMAKE_INSTALL_PREFIX:PATH=%WORKSPACE%/install/msvc100/FlightGear ^
-DCMAKE_PREFIX_PATH=%QT5SDK32% ^
-DPNG_LIBRARY=%WORKSPACE%/3rdParty/lib/libpng16.lib ^
-DFLTK_FLUID_EXECUTABLE=%WORKSPACE%/3rdParty/bin/fluid.exe ^
-DBOOST_ROOT=%WORKSPACE%/Boost
cmake --build . --config Release --target INSTALL
cd ..\build-fgrun32
cmake ..\fgrun -G "Visual Studio 10" ^
-DMSVC_3RDPARTY_ROOT:PATH=%WORKSPACE% ^
-DCMAKE_INSTALL_PREFIX:PATH=%WORKSPACE%/install/msvc100/FGRun ^
-DFLTK_FLUID_EXECUTABLE:FILEPATH=%WORKSPACE%/3rdParty/bin/fluid.exe ^
-DGETTEXT_MSGFMT_EXECUTABLE:FILEPATH=%WORKSPACE%/3rdParty/bin/msgfmt.exe ^
-DGETTEXT_MSGMERGE_EXECUTABLE:FILEPATH=%WORKSPACE%/3rdParty/bin/msgmerge.exe ^
-DBOOST_ROOT=%WORKSPACE%/Boost
cmake --build . --config Release --target INSTALL
cd ..
REM 64 bits
md build-sg64
md build-fg64
md build-fgrun64
cd build-sg64
cmake ..\SimGear -G "Visual Studio 10 Win64" ^
-DMSVC_3RDPARTY_ROOT=%WORKSPACE% ^
-DCMAKE_INSTALL_PREFIX:PATH=%WORKSPACE%/install/msvc100-64/SimGear ^
-DBOOST_ROOT=%WORKSPACE%/Boost
cmake --build . --config Release --target INSTALL
cd ..\build-fg64
cmake ..\flightgear -G "Visual Studio 10 Win64" ^
-DMSVC_3RDPARTY_ROOT=%WORKSPACE% ^
-DCMAKE_INSTALL_PREFIX:PATH=%WORKSPACE%/install/msvc100-64/FlightGear ^
-DCMAKE_PREFIX_PATH=%QT5SDK64% ^
-DFLTK_FLUID_EXECUTABLE=%WORKSPACE%/3rdParty/bin/fluid.exe ^
-DBOOST_ROOT=%WORKSPACE%/Boost ^
-DWITH_FGPANEL=OFF ^
-DENABLE_PROFILE=OFF
cmake --build . --config Release --target INSTALL
cd ..\build-fgrun64
cmake ..\fgrun -G "Visual Studio 10 Win64" ^
-DMSVC_3RDPARTY_ROOT:PATH=%WORKSPACE% ^
-DCMAKE_INSTALL_PREFIX:PATH=%WORKSPACE%/install/msvc100-64/FGRun ^
-DFLTK_FLUID_EXECUTABLE:FILEPATH=%WORKSPACE%/3rdParty/bin/fluid.exe ^
-DGETTEXT_MSGFMT_EXECUTABLE:FILEPATH=%WORKSPACE%/3rdParty/bin/msgfmt.exe ^
-DGETTEXT_MSGMERGE_EXECUTABLE:FILEPATH=%WORKSPACE%/3rdParty/bin/msgmerge.exe ^
-DBOOST_ROOT=%WORKSPACE%/Boost
cmake --build . --config Release --target INSTALL
cd ..
REM Qt5 deployment
%QT5SDK32%\bin\windeployqt --release --list target %WORKSPACE%/install/msvc100/FlightGear/bin/fgfs.exe
%QT5SDK64%\bin\windeployqt --release --list target %WORKSPACE%/install/msvc100-64/FlightGear/bin/fgfs.exe
REM build setup
ECHO Packaging root is %WORKSPACE%
subst X: /D
subst X: %WORKSPACE%.
REM ensure output dir is clean since we upload the entirety of it
rmdir /S /Q output
REM archiving PDB files
copy %WORKSPACE%\build-fg32\src\Main\RelWithDebInfo\fgfs.pdb %WORKSPACE%\Output\fgfs-x86-%BUILD_NUMBER%.pdb
copy %WORKSPACE%\build-fg64\src\Main\RelWithDebInfo\fgfs.pdb %WORKSPACE%\Output\fgfs-x64-%BUILD_NUMBER%.pdb
REM indirect way to get command output into an environment variable
set PATH=%WORKSPACE%\install\msvc100\OpenSceneGraph\bin;%PATH%
osgversion --so-number > %TEMP%\osg-so-number.txt
osgversion --version-number > %TEMP%\osg-version.txt
osgversion --openthreads-soversion-number > %TEMP%\openthreads-so-number.txt
SET /P FLIGHTGEAR_VERSION=<flightgear\version
SET /P OSG_VERSION=<%TEMP%\osg-version.txt
SET /P OSG_SO_NUMBER=<%TEMP%\osg-so-number.txt
SET /P OT_SO_NUMBER=<%TEMP%\openthreads-so-number.txt
IF %IS_NIGHTLY_BUILD% EQU 1 (
REM FlightGear nightly: with fgdata, output filename would be "FlightGear-x.x.x-nightly-full.exe"
CALL :writeBaseConfig
CALL :writeNightlyFullConfig
iscc FlightGear.iss
REM FlightGear nightly: without fgdata, output filename would be "FlightGear-x.x.x-nightly.exe"
CALL :writeBaseConfig
CALL :writeNightlyDietConfig
iscc FlightGear.iss
) ELSE (
REM FlightGear release: with fgdata, output filename would be "FlightGear-x.x.x.exe"
CALL :writeBaseConfig
CALL :writeReleaseConfig
iscc FlightGear.iss
)
GOTO End
:writeBaseConfig
ECHO #define FGVersion "%FLIGHTGEAR_VERSION%" > InstallConfig.iss
ECHO #define OSGVersion "%OSG_VERSION%" >> InstallConfig.iss
ECHO #define OSGSoNumber "%OSG_SO_NUMBER%" >> InstallConfig.iss
ECHO #define OTSoNumber "%OT_SO_NUMBER%" >> InstallConfig.iss
GOTO End
:writeReleaseConfig
CALL :writeBaseConfig
ECHO #define FGDetails "" >> InstallConfig.iss
ECHO #define IncludeData "TRUE" >> InstallConfig.iss
GOTO End
:writeNightlyFullConfig
CALL :writeBaseConfig
ECHO #define FGDetails "-nightly-full" >> InstallConfig.iss
ECHO #define IncludeData "TRUE" >> InstallConfig.iss
GOTO End
:writeNightlyDietConfig
CALL :writeBaseConfig
ECHO #define FGDetails "-nightly" >> InstallConfig.iss
ECHO #define IncludeData "FALSE" >> InstallConfig.iss
GOTO End
:End

454
catalogFilenames.py Normal file
View File

@@ -0,0 +1,454 @@
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

@@ -1,13 +1,12 @@
aircraftTypeTags = [
"ga", "fighter", "helicopter", "glider", "spaceship", "bomber", "groundvehicle",
"ga", "fighter", "helicopter", "glider", "spaceship", "bomber", "groundvehicle",
"tanker", "cargo", "transport", "bizjet", "trainer", "airship", "balloon"
]
manufacturerTags = [
"boeing", "cessna", "diamond", "douglas", "bell", "piper",
"boeing", "cessna", "diamond", "douglas", "bell", "piper",
"airbus", "vickers", "lockheed", "fokker",
"embraer", "bombardier", "pilatus", "robin",
"eurocopter"
"embrarer", "bombardier", "pilatus", "robin"
]
eraTags = [
@@ -22,8 +21,6 @@ eraTags = [
"1960s",
"1970s",
"1980s",
"1990s",
"2000s",
"gulfwar1",
"gulfwar2"
]
@@ -55,8 +52,7 @@ featureTags = [
"etops",
"floats",
"amphibious",
"airship",
"aerobatic"
"supersonic"
]
propulsionTags = [
@@ -73,8 +69,7 @@ propulsionTags = [
simFeatureTags = [
"tow",
"dual-controls",
"rembrandt"
"dual-controls"
]
tags = aircraftTypeTags + manufacturerTags + eraTags + simFeatureTags + propulsionTags + featureTags

134
create_catalog.py Executable file
View File

@@ -0,0 +1,134 @@
#!/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")

File diff suppressed because it is too large Load Diff

2
fgdata

Submodule fgdata updated: eb1ed07b03...90dcec50e2

2
fgrun

Submodule fgrun updated: f5a9513327...9357de19f0

View File

@@ -1,50 +0,0 @@
# git diff --quiet e5f841bc84d31fee339191a59b8746cb4eb8074c -- ./Aircraft/
import subprocess
import os, sgprops
class GITCatalogRepository:
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.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.check_output(["git", "rev-parse", "HEAD"],
cwd = self._path)
if self._usesSubmodules:
subprocess.call(["git", "submodule", "update"], cwd = self._path)
def scmRevisionForPath(self, path):
if self._usesSubmodules:
return subprocess.check_output(["git", "rev-parse", "HEAD"], cwd = self._path)
return self._currentRevision

View File

@@ -1,34 +0,0 @@
# git diff --quiet e5f841bc84d31fee339191a59b8746cb4eb8074c -- ./Aircraft/
import subprocess
import os
import sgprops
import git_catalog_repository
class GitDiscreteSCM:
def __init__(self, node):
configNode = node.parent
self._repos = {}
# iterate over aicraft paths finding repositories
for g in config.getChildren("aircraft-dir"):
repo = GITCatalogRepository(g, useSubmodules = False,
singleAircraft = True)
def hasPathChanged(self, path, oldRev):
return self._repos[path].hasPathChanged(path, oldRev)
def update(self):
for r in self._repos:
r.update()
def scmRevisionForPath(self, path):
return self._repos[path].scmRevisionForPath(path)

View File

@@ -9,12 +9,13 @@ VERSION=`cat flightgear/version`
#####################################################################################
# remove old and create fresh build directories
cd $WORKSPACE
rm -rf sgBuild
rm -rf fgBuild
mkdir -p sgBuild
mkdir -p fgBuild
mkdir -p output
rm -rf output/*
rm -rf dist/*
rm -rf $WORKSPACE/dist/include/simgear $WORKSPACE/dist/libSim* $WORKSPACE/dist/libsg*.a
#####################################################################################
echo "Starting on SimGear"
@@ -59,5 +60,25 @@ cp flightgear-*.tar.bz2 ../output/.
echo "Assembling base package"
cd $WORKSPACE
tar cjf output/FlightGear-$VERSION-data.tar.bz2 fgdata/
rm -rf base_package
# 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 extended data"
rsync -a --filter 'merge aircraft.rules' /home/jenkins/fgdata_340/ extended-data
echo "Copying extended 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

@@ -15,48 +15,38 @@ mkdir -p output
rm -rf output/*
rm -rf $WORKSPACE/dist/include/simgear $WORKSPACE/dist/libSim* $WORKSPACE/dist/libsg*.a
PATH=$PATH:$QTPATH
echo "Build path is: $PATH"
###############################################################################
echo "Starting on SimGear"
pushd sgBuild
cmake -DCMAKE_INSTALL_PREFIX:PATH=$WORKSPACE/dist -DCMAKE_BUILD_TYPE=RelWithDebInfo ../simgear
cmake -DCMAKE_INSTALL_PREFIX:PATH=$WORKSPACE/dist -G Xcode ../simgear
# compile
make
xcodebuild -configuration RelWithDebInfo -target install build
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 -DCMAKE_BUILD_TYPE=RelWithDebInfo ../flightgear
cmake -DCMAKE_INSTALL_PREFIX:PATH=$WORKSPACE/dist -DENABLE_QT=1 -G Xcode ../flightgear
make
xcodebuild -configuration RelWithDebInfo -target install build
if [ $? -ne '0' ]; then
echo "make flightgear failed"
exit 1
fi
make install
popd
chmod +x $WORKSPACE/dist/bin/osgversion
################################################################################
# run the unlock script now - we need to do this right before code-signing,
# or the keychain may automatically re-lock after some period of time
unlock-keychain.sh

View File

@@ -7,19 +7,6 @@ include FileUtils
$osgLibs = ['osgFX', 'osgParticle', 'osg', 'osgGA', 'osgText', 'osgUtil', 'osgSim', 'osgViewer', 'osgDB']
$osgPlugins = ['ac', 'osg', 'freetype', 'imageio', 'rgb', 'txf', 'mdl', '3ds']
# from http://drawingablank.me/blog/ruby-boolean-typecasting.html
class String
def to_bool
return true if self == true || self =~ (/^(true|t|yes|y|1)$/i)
return false if self == false || self.blank? || self =~ (/^(false|f|no|n|0)$/i)
raise ArgumentError.new("invalid value for Boolean: \"#{self}\"")
end
end
class NilClass
def to_bool; false; end
end
def runOsgVersion(option)
env = "export DYLD_LIBRARY_PATH=#{Dir.pwd}/dist/lib"
bin = Dir.pwd + "/dist/bin/osgversion"
@@ -32,10 +19,22 @@ $openThreadsSoVersion=runOsgVersion('openthreads-soversion-number')
$codeSignIdentity = ENV['FG_CODESIGN_IDENTITY']
puts "Code signing identity is #{$codeSignIdentity}"
puts "osgVersion=#{osgVersion}, so-number=#{$osgSoVersion}"
$isRelease = ENV['FG_IS_RELEASE'].to_bool
puts "Is-release? : ##{$isRelease}"
def fix_install_names(object)
#puts "fixing install names for #{object}"
$osgLibs.each do |l|
oldName = "lib#{l}.#{$osgSoVersion}.dylib"
newName = "@executable_path/../Frameworks/#{oldName}"
`install_name_tool -change #{oldName} #{newName} #{object}`
end
oldName = "libOpenThreads.#{$openThreadsSoVersion}.dylib"
newName= "@executable_path/../Frameworks/#{oldName}"
`install_name_tool -change #{oldName} #{newName} #{object}`
end
$prefixDir=Dir.pwd + "/dist"
dmgDir=Dir.pwd + "/image"
@@ -69,13 +68,7 @@ fgCurrentYear = t.year
fgVersion = File.read("#{srcDir}/version").strip
volName="\"FlightGear #{fgVersion}\""
if $isRelease
dmgPath = "" # no 'lite' build for release candidates
dmgFullPath = Dir.pwd + "/output/FlightGear-#{fgVersion}.dmg"
else
dmgPath = Dir.pwd + "/output/FlightGear-#{fgVersion}-nightly.dmg"
dmgFullPath = Dir.pwd + "/output/FlightGear-#{fgVersion}-nightly-full.dmg"
end
dmgPath = Dir.pwd + "/output/FlightGear-#{fgVersion}.dmg"
puts "Creating directory structure"
`mkdir -p #{macosDir}`
@@ -83,6 +76,8 @@ puts "Creating directory structure"
`mkdir -p #{resourcesDir}`
`mkdir -p #{osgPluginsDir}`
# fix install names on the primary executable
fix_install_names("#{macosDir}/fgfs")
puts "Copying auxilliary binaries"
bins = ['fgjs', 'fgcom']
@@ -93,12 +88,14 @@ bins.each do |b|
outPath = "#{macosDir}/#{b}"
`cp #{$prefixDir}/bin/#{b} #{outPath}`
fix_install_names(outPath)
end
puts "copying libraries"
$osgLibs.each do |l|
libFile = "lib#{l}.#{$osgSoVersion}.dylib"
`cp #{$prefixDir}/lib/#{libFile} #{$frameworksDir}`
fix_install_names("#{$frameworksDir}/#{libFile}")
end
# and not forgetting OpenThreads
@@ -108,6 +105,7 @@ libFile = "libOpenThreads.#{$openThreadsSoVersion}.dylib"
$osgPlugins.each do |p|
pluginFile = "osgdb_#{p}.dylib"
`cp #{$prefixDir}/lib/osgPlugins/#{pluginFile} #{osgPluginsDir}`
fix_install_names("#{osgPluginsDir}/#{pluginFile}")
end
if File.exist?("#{$prefixDir}/bin/fgcom-data")
@@ -127,32 +125,22 @@ File.open("#{contents}/Info.plist", 'w') { |f|
`cp #{srcDir}/COPYING #{dmgDir}`
# move documentation to a public place
`cp fgdata/Docs/FGShortRef.pdf "#{dmgDir}/Quick Reference.pdf"`
`cp fgdata/Docs/getstart.pdf "#{dmgDir}/Getting Started.pdf"`
`mv fgdata/Docs/FGShortRef.pdf "#{dmgDir}/Quick Reference.pdf"`
`mv fgdata/Docs/getstart.pdf "#{dmgDir}/Getting Started.pdf"`
puts "Copying base package files into the image"
`rsync -a --filter 'merge base-package.rules' fgdata/ #{resourcesDir}/data`
# work-around for 3.4.1: copy aircraft/scenery files too
`rsync -a extended-data/ #{resourcesDir}/data`
# code sign the entire bundle once complete - v2 code-signing
puts "Signing #{bundle}"
`codesign --deep -s "#{$codeSignIdentity}" #{bundle}`
puts "Creating DMG"
createArgs = "-format UDBZ -imagekey bzip2-level=9 -quiet -volname #{volName}"
if !$isRelease
# create the 'lite' DMG without the base files
# code sign the entire bundle once complete - v2 code-signing
puts "Signing #{bundle}"
`codesign --deep -s "#{$codeSignIdentity}" #{bundle}`
puts "Creating DMG"
`rm #{dmgPath}`
`hdiutil create -srcfolder #{dmgDir} #{createArgs} #{dmgPath}`
end
puts "Creating full image with data"
puts "Copying base package files into the image"
`rsync -a fgdata/ #{resourcesDir}/data`
# re-sign the entire bundle
puts "Re-signing full #{bundle}"
`codesign --force --deep -s "#{$codeSignIdentity}" #{bundle}`
`rm #{dmgFullPath}`
`hdiutil create -srcfolder #{dmgDir} #{createArgs} #{dmgFullPath}`
`rm #{dmgPath}`
`hdiutil create -srcfolder #{dmgDir} #{createArgs} #{dmgPath}`

22
hudson_win_build32.bat Normal file
View File

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

24
hudson_win_build64.bat Normal file
View File

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

View File

@@ -0,0 +1,39 @@
ECHO OFF
IF NOT DEFINED WORKSPACE SET WORKSPACE=%~dp0
ECHO Packaging root is %WORKSPACE%
subst X: /D
subst X: %WORKSPACE%.
REM construct information file to be read by Inno-setup
set PATH=%WORKSPACE%\install\msvc100\OpenSceneGraph\bin;%PATH%
REM add 7-zip to the PATH
set PATH=%PATH%;C:\Program Files\7-zip
REM indirect way to get command output into an environment variable
osgversion --so-number > %TEMP%\osg-so-number.txt
osgversion --version-number > %TEMP%\osg-version.txt
osgversion --openthreads-soversion-number > %TEMP%\openthreads-so-number.txt
SET /P FLIGHTGEAR_VERSION=<flightgear\version
SET /P OSG_VERSION=<%TEMP%\osg-version.txt
SET /P OSG_SO_NUMBER=<%TEMP%\osg-so-number.txt
SET /P OT_SO_NUMBER=<%TEMP%\openthreads-so-number.txt
ECHO #define FGVersion "%FLIGHTGEAR_VERSION%" > InstallConfig.iss
ECHO #define OSGVersion "%OSG_VERSION%" >> InstallConfig.iss
ECHO #define OSGSoNumber "%OSG_SO_NUMBER%" >> InstallConfig.iss
ECHO #define OTSoNumber "%OT_SO_NUMBER%" >> InstallConfig.iss
REM set DATA_FILE=FlightGear-%FLIGHTGEAR_VERSION%-data
REM extract the data files
REM 7z e -aoa %DATA_FILE%.tar.bz2 && 7z x -aoa %DATA_FILE%.tar
REM run Inno-setup!
REM use iscc instead of compil32 for better error reporting
iscc FlightGear.iss

View File

@@ -1,7 +1,6 @@
REM ExternalProject can't cleanly extract a zip into an existing directory
REM Instead we extract to a subdir, and then move the directories we want
REM using this bat file.
REM This script is used by the SuperBuild CMakeLists.txt
echo %CD%
IF EXIST winDeps/3rdParty (

View File

@@ -1,226 +0,0 @@
#!/usr/bin/python
import os, sys, re, glob, shutil
import subprocess
import sgprops
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",
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()
CATALOG_VERSION = 4
includePaths = []
packages = {}
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):
# check dir contains at least one -set.xml file
if len(glob.glob(os.path.join(d, "*-set.xml"))) == 0:
print "no -set.xml in", d
continue
result.append(pkg.PackageData(d, scmRepo))
return result
def initScmRepository(node):
scmType = node.getValue("type")
if (scmType == "svn"):
return svn_catalog_repository.SVNCatalogRepository(node)
elif (scmType == "git"):
return git_catalog_repository.GITCatalogRepository(node)
elif (scmType == "git-discrete"):
return git_discrete_repository.GitDiscreteSCM(node)
elif (scmType == None):
raise RuntimeError("No scm/type defined in catalog configuration")
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 args.noupload or not node.getValue("enabled", True):
print "Upload disabled"
return
uploadType = node.getValue("type")
if (uploadType == "rsync"):
subprocess.call(["rsync", node.getValue("args", "-az"), ".",
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")],
cwd = outputPath)
elif (uploadType == "scp"):
subprocess.call(["scp", node.getValue("args", "-r"), ".",
node.getValue("remote")],
cwd = outputPath)
else:
raise RuntimeError("Unsupported upload type:" + uploadType)
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):
rootDir = os.path.abspath(rootDir)
os.chdir(rootDir)
configPath = 'catalog.config.xml'
if not os.path.exists(configPath):
raise RuntimeError("no config file found at:" + configPath)
config = sgprops.readProps(configPath)
# out path
outPath = config.getValue('output-dir')
if outPath is None:
# default out path
outPath = os.path.join(rootDir, "output")
elif not os.path.isabs(outPath):
outPath = os.path.join(rootDir, "output")
if args.clean:
print "Cleaning output"
shutil.rmtree(outPath)
if not os.path.exists(outPath):
os.mkdir(outPath)
thumbnailPath = os.path.join(outPath, config.getValue('thumbnail-dir', "thumbnails"))
if not os.path.exists(thumbnailPath):
os.mkdir(thumbnailPath)
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):
print "Skipping missing include path:", i.value
continue
includePaths.append(i.value)
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:
previousCatalog = sgprops.readProps(existingCatalogPath)
except:
print "Previous catalog is malformed"
previousCatalog = sgprops.Node()
for p in previousCatalog.getChildren("package"):
pkgId = p.getValue("id")
if not pkgId in packages.keys():
print "Orphaned old package:", pkgId
continue
packages[pkgId].setPreviousData(p)
else:
print "No previous catalog"
catalogNode = sgprops.Node("catalog")
sgprops.copy(config.getChild("template"), catalogNode)
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():
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)
# x.extractThumbnails(thumbnailPath)
# return True
#
# p = Pool(8)
# print(p.map(f,packagesToGenerate))
for p in packagesToGenerate:
p.generateZip(outPath, excludeFilePath)
p.extractThumbnails(thumbnailPath)
print "Creating catalog"
for p in packages.values():
catalogNode.addChild(p.packageNode(mirrorUrls, thumbnailUrls[0]))
catalogNode.write(os.path.join(outPath, "catalog.xml"))
for up in config.getChildren("upload"):
processUpload(up, outPath)

View File

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

View File

@@ -11,9 +11,9 @@ class Node(object):
self._parent = parent
self._name = name
self._value = None
self._index = index
self._index = 0
self._children = []
@property
def value(self):
return self._value
@@ -21,21 +21,21 @@ class Node(object):
@value.setter
def value(self, v):
self._value = v
@property
def name(self):
return self._name
@property
def index(self):
return self._index
@property
@property
def parent(self):
return self._parent
def getChild(self, n, i=None, create = False):
if i is None:
i = 0
# parse name as foo[999] if necessary
@@ -43,79 +43,72 @@ class Node(object):
if m is not None:
n = m.group(1)
i = int(m.group(2))
for c in self._children:
if (c.name == n) and (c.index == i):
return c
if create:
c = Node(n, i, self)
self._children.append(c)
return c
else:
raise IndexError("no such child:" + str(n) + " index=" + str(i))
def addChild(self, n):
# adding an existing instance
if isinstance(n, Node):
n._parent = self
n._index = self.firstUnusedIndex(n.name)
self._children.append(n)
return n
i = self.firstUnusedIndex(n)
# create it via getChild
return self.getChild(n, i, create=True)
def firstUnusedIndex(self, n):
usedIndices = frozenset(c.index for c in self.getChildren(n))
i = 0
# find first free index
usedIndices = frozenset(c.index for c in self.getChildren(n))
while i < 1000:
if i not in usedIndices:
return i
break
i += 1
raise RuntimeException("too many children with name:" + n)
# create it via getChild
return self.getChild(n, i, create=True)
def hasChild(self, nm):
for c in self._children:
if (c.name == nm):
return True
return False
def getChildren(self, n = None):
if n is None:
return self._children
return [c for c in self._children if c.name == n]
def getNode(self, path, cr = False):
axes = path.split('/')
nd = self
for ax in axes:
nd = nd.getChild(ax, create = cr)
return nd
def getValue(self, path, default = None):
try:
nd = self.getNode(path)
return nd.value
except:
return default
def write(self, path):
root = self._createXMLElement('PropertyList')
t = ET.ElementTree(root)
t.write(path, 'utf-8', xml_declaration = True)
t.write(path, 'utf-8')
def _createXMLElement(self, nm = None):
if nm is None:
nm = self.name
n = ET.Element(nm)
# value and type specification
# value and type specification
try:
if self._value is not None:
if isinstance(self._value, basestring):
@@ -133,145 +126,99 @@ class Node(object):
n.set('type', "bool")
except UnicodeEncodeError:
print "Encoding error with", self._value, type(self._value)
# index in parent
if (self.index != 0):
n.set('n', str(self.index))
n.set('n', self.index)
# children
for c in self._children:
n.append(c._createXMLElement())
return n;
class PropsHandler(handler.ContentHandler):
def __init__(self, root = None, path = None, includePaths = []):
def __init__(self, root = None, path = None, dataDirPath = None):
self._root = root
self._path = path
self._basePath = os.path.dirname(path)
self._includes = includePaths
self._dataDirPath = dataDirPath
self._locator = None
if root is None:
# make a nameless root node
self._root = Node("", 0)
self._current = self._root
def setDocumentLocator(self, loc):
self._locator = loc
def startElement(self, name, attrs):
self._content = None
self._locator = loc
def startElement(self, name, attrs):
self._content = ''
if (name == 'PropertyList'):
return
if 'n' in attrs.keys():
try:
index = int(attrs['n'])
except:
print "Invalid index at line:", self._locator.getLineNumber(), "of", self._path
self._current = self._current.addChild(name)
return
index = int(attrs['n'])
self._current = self._current.getChild(name, index, create=True)
else:
self._current = self._current.addChild(name)
if 'include' in attrs.keys():
self.handleInclude(attrs['include'])
self._currentTy = None;
if 'type' in attrs.keys():
self._currentTy = attrs['type']
def handleInclude(self, includePath):
if includePath.startswith('/'):
includePath = includePath[1:]
p = os.path.join(self._basePath, includePath)
if not os.path.exists(p):
found = False
for i in self._includes:
p = os.path.join(i, includePath)
if os.path.exists(p):
found = True
break
if not found:
p = os.path.join(self._dataDirPath, includePath)
if not os.path.exists(p):
raise RuntimeError("include file not found", includePath, "at line", self._locator.getLineNumber())
readProps(p, self._current, self._includes)
readProps(p, self._current, self._dataDirPath)
def endElement(self, name):
if (name == 'PropertyList'):
return
try:
# convert and store value
self._current.value = self._content
if self._currentTy == "int":
self._current.value = int(self._content) if self._content is not None else 0
if self._currentTy == "bool":
self._current.value = self.parsePropsBool(self._content)
if self._currentTy == "double":
if self._content is None:
self._current.value = 0.0
else:
if self._content.endswith('f'):
self._content = self._content[:-1]
self._current.value = float(self._content)
self._current.value = int(self._content)
if self._currentTy is "bool":
self._current.value = bool(self._content)
if self._currentTy is "double":
self._current.value = float(self._content)
except:
print "Parse error for value:", self._content, "at line:", self._locator.getLineNumber(), "of:", self._path
self._current = self._current.parent
self._content = None
self._currentTy = None
def parsePropsBool(self, content):
if content == "True" or content == "true":
return True
if content == "False" or content == "false":
return False
try:
icontent = int(content)
if icontent is not None:
if icontent == 0:
return False
else:
return True;
except:
return False
def characters(self, content):
if self._content is None:
self._content = ''
self._content += content
def endDocument(self):
pass
@property
def root(self):
return self._root
def readProps(path, root = None, includePaths = []):
def readProps(path, root = None, dataDirPath = None):
parser = make_parser()
locator = expatreader.ExpatLocator( parser )
h = PropsHandler(root, path, includePaths)
h = PropsHandler(root, path, dataDirPath)
h.setDocumentLocator(locator)
parser.setContentHandler(h)
parser.parse(path)
return h.root
def copy(src, dest):
dest.value = src.value
# recurse over children
for c in src.getChildren() :
dc = dest.getChild(c.name, i = c.index, create = True)
copy(c, dc)
return h.root

Submodule simgear updated: 951859d8a7...63b439e9ac

View File

@@ -1,41 +0,0 @@
import subprocess, os, sgprops
import xml.etree.cElementTree as ET
class SVNCatalogRepository:
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):
print "SVN update of", self._path
subprocess.call(["svn", "update", self._path])

View File

@@ -1,52 +0,0 @@
<?xml version="1.0"?>
<!--
Template catalog - copy and modify for your site as required
-->
<PropertyList>
<!--
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')
-->
<version>3.4.*</version>
<version>3.5.*</version>
<version>3.6.*</version>
<id>org.myorganisation.hangar</id>
<license>GPL</license>
<url>http://some.stable.url.com/foo/bar/catalog.xml</url>
<description>A collection of interesting aircraft with some features
</description>
<de>
<description>Au Deutsch</description>
</de>
<fr>
<description>Francais</description>
</fr>
<mirror>http://some.url/</mirror>
<!-- <mirror>another mirror</mirror> -->
<thumbnails>http://some.url/images</thumbnails>
<git-repository>git://some.git.repo/</git-repository>
<repository-prefix>Aircraft</repository-prefix>
</PropertyList>

View File

@@ -1 +0,0 @@
2016.1.1