Merge branch 'refs/heads/release/2.8.0'
This commit is contained in:
commit
f165971a23
8 changed files with 200 additions and 33 deletions
3
.gitignore
vendored
3
.gitignore
vendored
|
@ -8,3 +8,6 @@ Output
|
||||||
output
|
output
|
||||||
fgBuild
|
fgBuild
|
||||||
sgBuild
|
sgBuild
|
||||||
|
image
|
||||||
|
macflightgear
|
||||||
|
fgdata
|
||||||
|
|
3
.gitmodules
vendored
3
.gitmodules
vendored
|
@ -7,3 +7,6 @@
|
||||||
[submodule "fgrun"]
|
[submodule "fgrun"]
|
||||||
path = fgrun
|
path = fgrun
|
||||||
url = git://gitorious.org/fg/fgrun.git
|
url = git://gitorious.org/fg/fgrun.git
|
||||||
|
[submodule "maclauncher"]
|
||||||
|
path = maclauncher
|
||||||
|
url = git://gitorious.org/fg/maclauncher.git
|
||||||
|
|
|
@ -2,12 +2,14 @@
|
||||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
<plist version="1.0">
|
<plist version="1.0">
|
||||||
<dict>
|
<dict>
|
||||||
|
<key>CFBundleDevelopmentRegion</key>
|
||||||
|
<string>English</string>
|
||||||
<key>CFBundleIconFile</key>
|
<key>CFBundleIconFile</key>
|
||||||
<string>FlightGear.icns</string>
|
<string>FlightGear.icns</string>
|
||||||
<key>CFBundlePackageType</key>
|
<key>CFBundlePackageType</key>
|
||||||
<string>APPL</string>
|
<string>APPL</string>
|
||||||
<key>CFBundleGetInfoString</key>
|
<key>CFBundleGetInfoString</key>
|
||||||
<string>FlightGear nightly build</string>
|
<string>FlightGear, the open-source flight simulator, <%= fgVersion %>. ©1996-<%= fgCurrentYear%>, The FlightGear Project</string>
|
||||||
<key>CFBundleSignature</key>
|
<key>CFBundleSignature</key>
|
||||||
<string>????</string>
|
<string>????</string>
|
||||||
<key>CFBundleExecutable</key>
|
<key>CFBundleExecutable</key>
|
||||||
|
@ -19,11 +21,13 @@
|
||||||
<key>CFBundleShortVersionString</key>
|
<key>CFBundleShortVersionString</key>
|
||||||
<string><%= fgVersion %></string>
|
<string><%= fgVersion %></string>
|
||||||
<key>LSMinimumSystemVersion</key>
|
<key>LSMinimumSystemVersion</key>
|
||||||
<string>10.5.0</string>
|
<string>10.6.0</string>
|
||||||
<key>NSMainNibFile</key>
|
<key>NSMainNibFile</key>
|
||||||
<string>MainMenu</string>
|
<string>MainMenu</string>
|
||||||
<key>NSPrincipalClass</key>
|
<key>NSPrincipalClass</key>
|
||||||
<string>NSApplication</string>
|
<string>NSApplication</string>
|
||||||
|
<key>NSHumanReadableCopyright</key>
|
||||||
|
<string>©1996-<%= fgCurrentYear%>, The FlightGear Project</string>
|
||||||
</dict>
|
</dict>
|
||||||
</plist>
|
</plist>
|
||||||
|
|
||||||
|
|
38
base-package.rules
Normal file
38
base-package.rules
Normal file
|
@ -0,0 +1,38 @@
|
||||||
|
- .git
|
||||||
|
- *.xcf
|
||||||
|
- *.tex
|
||||||
|
|
||||||
|
+ /fgdata/Aircraft/Generic
|
||||||
|
+ /fgdata/Aircraft/Instruments
|
||||||
|
+ /fgdata/Aircraft/Instruments-3d
|
||||||
|
|
||||||
|
+ /fgdata/Aircraft/UIUC
|
||||||
|
+ /fgdata/Aircraft/c172p
|
||||||
|
+ /fgdata/Aircraft/777
|
||||||
|
+ /fgdata/Aircraft/777-200
|
||||||
|
+ /fgdata/Aircraft/b1900d
|
||||||
|
+ /fgdata/Aircraft/ufo
|
||||||
|
+ /fgdata/Aircraft/CitationX
|
||||||
|
+ /fgdata/Aircraft/ZLT-NT
|
||||||
|
+ /fgdata/Aircraft/dhc2
|
||||||
|
+ /fgdata/Aircraft/Cub
|
||||||
|
+ /fgdata/Aircraft/sopwithCamel
|
||||||
|
+ /fgdata/Aircraft/f-14b
|
||||||
|
+ /fgdata/Aircraft/ASK13
|
||||||
|
+ /fgdata/Aircraft/bo105
|
||||||
|
+ /fgdata/Aircraft/Dragonfly
|
||||||
|
+ /fgdata/Aircraft/SenecaII
|
||||||
|
+ /fgdata/Aircraft/A6M2
|
||||||
|
|
||||||
|
- /fgdata/Aircraft/*
|
||||||
|
|
||||||
|
- /fgdata/Textures.high/*.new
|
||||||
|
- /fgdata/Textures.high/*.orig
|
||||||
|
- /fgdata/Textures.high/*.save
|
||||||
|
- /fgdata/Textures/Unused
|
||||||
|
- /fgdata/Textures/*.orig
|
||||||
|
- /fgdata/Docs/source
|
||||||
|
- /fgdata/Models/Airspace
|
||||||
|
- /fgdata/Models/MNUAV
|
||||||
|
|
||||||
|
|
|
@ -1,15 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
|
|
||||||
SDK_PATH="/Developer/SDKs/MacOSX10.6.sdk"
|
|
||||||
OSX_TARGET="10.6"
|
|
||||||
|
|
||||||
svn co https://macflightgear.svn.sourceforge.net/svnroot/macflightgear/trunk/FlightGearOSX macflightgear
|
|
||||||
|
|
||||||
pushd macflightgear
|
|
||||||
|
|
||||||
# compile the stub executable
|
|
||||||
gcc -o FlightGear -mmacosx-version-min=$OSX_TARGET -isysroot $SDK_PATH -arch i386 main.m \
|
|
||||||
-framework Cocoa -framework RubyCocoa -framework Foundation -framework AppKit
|
|
||||||
|
|
||||||
popd
|
|
||||||
|
|
72
hudson_mac_build_release.sh
Executable file
72
hudson_mac_build_release.sh
Executable file
|
@ -0,0 +1,72 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
if [ "$WORKSPACE" == "" ]; then
|
||||||
|
echo "ERROR: Missing WORKSPACE environment variable."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
###############################################################################
|
||||||
|
# remove old and create fresh build directories
|
||||||
|
rm -rf sgBuild
|
||||||
|
rm -rf fgBuild
|
||||||
|
mkdir -p sgBuild
|
||||||
|
mkdir -p fgBuild
|
||||||
|
mkdir -p output
|
||||||
|
rm -rf output/*
|
||||||
|
rm -rf $WORKSPACE/dist/include/simgear $WORKSPACE/dist/libSim* $WORKSPACE/dist/libsg*.a
|
||||||
|
|
||||||
|
###############################################################################
|
||||||
|
echo "Starting on SimGear"
|
||||||
|
pushd sgBuild
|
||||||
|
cmake -DCMAKE_INSTALL_PREFIX:PATH=$WORKSPACE/dist -G Xcode ../simgear
|
||||||
|
|
||||||
|
# compile
|
||||||
|
xcodebuild -configuration Release -target install build
|
||||||
|
|
||||||
|
if [ $? -ne '0' ]; then
|
||||||
|
echo "make simgear failed"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
popd
|
||||||
|
|
||||||
|
################################################################################
|
||||||
|
echo "Starting on FlightGear"
|
||||||
|
pushd fgBuild
|
||||||
|
cmake -DCMAKE_INSTALL_PREFIX:PATH=$WORKSPACE/dist -G Xcode ../flightgear
|
||||||
|
|
||||||
|
xcodebuild -configuration Release -target install build
|
||||||
|
|
||||||
|
if [ $? -ne '0' ]; then
|
||||||
|
echo "make flightgear failed"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
popd
|
||||||
|
|
||||||
|
chmod +x $WORKSPACE/dist/bin/osgversion
|
||||||
|
|
||||||
|
################################################################################
|
||||||
|
echo "Building Macflightgear launcher"
|
||||||
|
|
||||||
|
OSX_TARGET="10.6"
|
||||||
|
|
||||||
|
pushd maclauncher/FlightGearOSX
|
||||||
|
|
||||||
|
# compile the stub executable
|
||||||
|
gcc -o FlightGear -mmacosx-version-min=$OSX_TARGET -isysroot $SDK_PATH -arch i386 main.m \
|
||||||
|
-framework Cocoa -framework RubyCocoa -framework Foundation -framework AppKit
|
||||||
|
|
||||||
|
popd
|
||||||
|
|
||||||
|
################################################################################
|
||||||
|
echo "Syncing base packages files from sphere.telascience.org"
|
||||||
|
rsync -avz --filter 'merge base-package.rules' \
|
||||||
|
-e ssh jturner@sphere.telascience.org:/home/jturner/fgdata .
|
||||||
|
|
||||||
|
# run the unlock script now - we need to do this right before code-signing,
|
||||||
|
# or the keychain may automatically re-lock after some period of time
|
||||||
|
unlock-keychain.sh
|
||||||
|
|
||||||
|
echo "Running package script"
|
||||||
|
./hudson_mac_package_release.rb
|
|
@ -1,9 +1,11 @@
|
||||||
#!/usr/bin/ruby
|
#!/usr/bin/ruby
|
||||||
|
|
||||||
require 'ERB'
|
require 'ERB'
|
||||||
|
require 'fileutils' #I know, no underscore is not ruby-like
|
||||||
|
include FileUtils
|
||||||
|
|
||||||
$osgLibs = ['osgFX', 'osgParticle', 'osg', 'osgGA', 'osgText', 'osgUtil', 'osgSim', 'osgViewer', 'osgDB']
|
$osgLibs = ['osgFX', 'osgParticle', 'osg', 'osgGA', 'osgText', 'osgUtil', 'osgSim', 'osgViewer', 'osgDB']
|
||||||
$osgPlugins = ['ac', 'osg', 'freetype', 'qt', 'imageio', 'rgb', 'txf', 'mdl', '3ds']
|
$osgPlugins = ['ac', 'osg', 'freetype', 'imageio', 'rgb', 'txf', 'mdl', '3ds']
|
||||||
|
|
||||||
def runOsgVersion(option)
|
def runOsgVersion(option)
|
||||||
env = "export DYLD_LIBRARY_PATH=#{Dir.pwd}/dist/lib"
|
env = "export DYLD_LIBRARY_PATH=#{Dir.pwd}/dist/lib"
|
||||||
|
@ -15,10 +17,17 @@ osgVersion = runOsgVersion('version-number')
|
||||||
$osgSoVersion=runOsgVersion('so-number')
|
$osgSoVersion=runOsgVersion('so-number')
|
||||||
$openThreadsSoVersion=runOsgVersion('openthreads-soversion-number')
|
$openThreadsSoVersion=runOsgVersion('openthreads-soversion-number')
|
||||||
|
|
||||||
|
$codeSignIdentity = ENV['FG_CODESIGN_IDENTITY']
|
||||||
|
puts "Code signing identity is #{$codeSignIdentity}"
|
||||||
|
|
||||||
puts "osgVersion=#{osgVersion}, so-number=#{$osgSoVersion}"
|
puts "osgVersion=#{osgVersion}, so-number=#{$osgSoVersion}"
|
||||||
|
|
||||||
$alutSourcePath='/Library/Frameworks/ALUT.framework'
|
$alutSourcePath='/Library/Frameworks/ALUT.framework'
|
||||||
|
|
||||||
|
$svnLibs = ['svn_client', 'svn_wc', 'svn_delta', 'svn_diff', 'svn_ra',
|
||||||
|
'svn_ra_local', 'svn_repos', 'svn_fs', 'svn_fs_fs', 'svn_fs_util',
|
||||||
|
'svn_ra_svn', 'svn_subr', 'svn_ra_neon']
|
||||||
|
|
||||||
def fix_install_names(object)
|
def fix_install_names(object)
|
||||||
#puts "fixing install names for #{object}"
|
#puts "fixing install names for #{object}"
|
||||||
|
|
||||||
|
@ -32,15 +41,39 @@ def fix_install_names(object)
|
||||||
newName= "@executable_path/../Frameworks/#{oldName}"
|
newName= "@executable_path/../Frameworks/#{oldName}"
|
||||||
`install_name_tool -change #{oldName} #{newName} #{object}`
|
`install_name_tool -change #{oldName} #{newName} #{object}`
|
||||||
|
|
||||||
alutBundlePath = "@executable_path/../Frameworks/Alut.framework"
|
alutBundlePath = "@executable_path/../Frameworks/ALUT.framework"
|
||||||
alutLib = "Versions/A/ALUT"
|
alutLib = "Versions/A/ALUT"
|
||||||
`install_name_tool -change #{$alutSourcePath}/#{alutLib} #{alutBundlePath}/#{alutLib} #{object}`
|
`install_name_tool -change #{$alutSourcePath}/#{alutLib} #{alutBundlePath}/#{alutLib} #{object}`
|
||||||
end
|
end
|
||||||
|
|
||||||
prefixDir=Dir.pwd + "/dist"
|
$prefixDir=Dir.pwd + "/dist"
|
||||||
dmgDir=Dir.pwd + "/image"
|
dmgDir=Dir.pwd + "/image"
|
||||||
srcDir=Dir.pwd + "/flightgear"
|
srcDir=Dir.pwd + "/flightgear"
|
||||||
|
|
||||||
|
def fix_svn_install_names(object)
|
||||||
|
$svnLibs.each do |l|
|
||||||
|
fileName = "lib#{l}-1.0.dylib"
|
||||||
|
newName = "@executable_path/../Frameworks/#{fileName}"
|
||||||
|
`install_name_tool -change #{fileName} #{newName} #{object}`
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
def copy_svn_libs()
|
||||||
|
puts "Copying Subversion client libraries"
|
||||||
|
$svnLibs.each do |l|
|
||||||
|
libFile = "lib#{l}-1.0.dylib"
|
||||||
|
path = "#{$frameworksDir}/#{libFile}"
|
||||||
|
`cp #{$prefixDir}/lib/#{libFile} #{$frameworksDir}`
|
||||||
|
fix_svn_install_names(path)
|
||||||
|
# `install_name_tool -id #{libFile} #{path}`
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
def code_sign(path)
|
||||||
|
puts "Signing #{path}"
|
||||||
|
`codesign -s "#{$codeSignIdentity}" #{path}`
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
puts "Erasing previous image dir"
|
puts "Erasing previous image dir"
|
||||||
`rm -rf #{dmgDir}`
|
`rm -rf #{dmgDir}`
|
||||||
|
@ -48,56 +81,72 @@ puts "Erasing previous image dir"
|
||||||
bundle=dmgDir + "/FlightGear.app"
|
bundle=dmgDir + "/FlightGear.app"
|
||||||
contents=bundle + "/Contents"
|
contents=bundle + "/Contents"
|
||||||
macosDir=contents + "/MacOS"
|
macosDir=contents + "/MacOS"
|
||||||
frameworksDir=contents +"/Frameworks"
|
$frameworksDir=contents +"/Frameworks"
|
||||||
resourcesDir=contents+"/Resources"
|
resourcesDir=contents+"/Resources"
|
||||||
osgPluginsDir=contents+"/PlugIns/osgPlugins-#{osgVersion}"
|
osgPluginsDir=contents+"/PlugIns/osgPlugins-#{osgVersion}"
|
||||||
|
|
||||||
|
# for writing copyright year to Info.plist
|
||||||
|
t = Time.new
|
||||||
|
fgCurrentYear = t.year
|
||||||
|
|
||||||
fgVersion = File.read("#{srcDir}/version").strip
|
fgVersion = File.read("#{srcDir}/version").strip
|
||||||
volName="\"FlightGear #{fgVersion}\""
|
volName="\"FlightGear #{fgVersion}\""
|
||||||
|
|
||||||
dmgPath = Dir.pwd + "/fg_mac_#{fgVersion}.dmg"
|
dmgPath = Dir.pwd + "/output/fg_mac_#{fgVersion}.dmg"
|
||||||
|
|
||||||
puts "Creating directory structure"
|
puts "Creating directory structure"
|
||||||
`mkdir -p #{macosDir}`
|
`mkdir -p #{macosDir}`
|
||||||
`mkdir -p #{frameworksDir}`
|
`mkdir -p #{$frameworksDir}`
|
||||||
`mkdir -p #{resourcesDir}`
|
`mkdir -p #{resourcesDir}`
|
||||||
`mkdir -p #{osgPluginsDir}`
|
`mkdir -p #{osgPluginsDir}`
|
||||||
|
|
||||||
puts "Copying binaries"
|
puts "Copying binaries"
|
||||||
bins = ['fgfs', 'terrasync']
|
bins = ['fgfs', 'fgjs', 'fgcom', 'fgviewer']
|
||||||
bins.each do |b|
|
bins.each do |b|
|
||||||
`cp #{prefixDir}/bin/#{b} #{resourcesDir}/#{b}`
|
if !File.exist?("#{$prefixDir}/bin/#{b}")
|
||||||
fix_install_names("#{resourcesDir}/#{b}")
|
next
|
||||||
|
end
|
||||||
|
|
||||||
|
outPath = "#{macosDir}/#{b}"
|
||||||
|
`cp #{$prefixDir}/bin/#{b} #{outPath}`
|
||||||
|
fix_install_names(outPath)
|
||||||
|
fix_svn_install_names(outPath)
|
||||||
end
|
end
|
||||||
|
|
||||||
puts "copying libraries"
|
puts "copying libraries"
|
||||||
$osgLibs.each do |l|
|
$osgLibs.each do |l|
|
||||||
libFile = "lib#{l}.#{$osgSoVersion}.dylib"
|
libFile = "lib#{l}.#{$osgSoVersion}.dylib"
|
||||||
`cp #{prefixDir}/lib/#{libFile} #{frameworksDir}`
|
`cp #{$prefixDir}/lib/#{libFile} #{$frameworksDir}`
|
||||||
fix_install_names("#{frameworksDir}/#{libFile}")
|
fix_install_names("#{$frameworksDir}/#{libFile}")
|
||||||
end
|
end
|
||||||
|
|
||||||
# and not forgetting OpenThreads
|
# and not forgetting OpenThreads
|
||||||
libFile = "libOpenThreads.#{$openThreadsSoVersion}.dylib"
|
libFile = "libOpenThreads.#{$openThreadsSoVersion}.dylib"
|
||||||
`cp #{prefixDir}/lib/#{libFile} #{frameworksDir}`
|
`cp #{$prefixDir}/lib/#{libFile} #{$frameworksDir}`
|
||||||
|
|
||||||
$osgPlugins.each do |p|
|
$osgPlugins.each do |p|
|
||||||
pluginFile = "osgdb_#{p}.so"
|
pluginFile = "osgdb_#{p}.so"
|
||||||
`cp #{prefixDir}/lib/osgPlugins-#{osgVersion}/#{pluginFile} #{osgPluginsDir}`
|
`cp #{$prefixDir}/lib/osgPlugins-#{osgVersion}/#{pluginFile} #{osgPluginsDir}`
|
||||||
fix_install_names("#{osgPluginsDir}/#{pluginFile}")
|
fix_install_names("#{osgPluginsDir}/#{pluginFile}")
|
||||||
end
|
end
|
||||||
|
|
||||||
|
copy_svn_libs()
|
||||||
|
|
||||||
# custom ALUT
|
# custom ALUT
|
||||||
# must copy frameworks using ditto
|
# must copy frameworks using ditto
|
||||||
`ditto #{$alutSourcePath} #{frameworksDir}/ALUT.framework`
|
`ditto #{$alutSourcePath} #{$frameworksDir}/ALUT.framework`
|
||||||
|
|
||||||
# Macflightgear launcher
|
# Macflightgear launcher
|
||||||
puts "Copying Macflightgear launcher files"
|
puts "Copying Macflightgear launcher files"
|
||||||
|
|
||||||
Dir.chdir "macflightgear" do
|
Dir.chdir "maclauncher/FlightGearOSX" do
|
||||||
`cp FlightGear #{macosDir}`
|
`cp FlightGear #{macosDir}`
|
||||||
`rsync -a --exclude=\".svn\" *.rb *.lproj *.sh *.tiff #{resourcesDir}`
|
`rsync -a *.rb *.lproj *.sh *.tiff #{resourcesDir}`
|
||||||
|
end
|
||||||
|
|
||||||
|
if File.exist?("#{$prefixDir}/bin/fgcom-data")
|
||||||
|
puts "Copying FGCom data files"
|
||||||
|
`ditto #{$prefixDir}/bin/fgcom-data #{resourcesDir}/fgcom-data`
|
||||||
end
|
end
|
||||||
|
|
||||||
# Info.plist
|
# Info.plist
|
||||||
|
@ -111,6 +160,18 @@ File.open("#{contents}/Info.plist", 'w') { |f|
|
||||||
`cp #{srcDir}/package/mac/FlightGear.icns #{resourcesDir}/FlightGear.icns`
|
`cp #{srcDir}/package/mac/FlightGear.icns #{resourcesDir}/FlightGear.icns`
|
||||||
`cp #{srcDir}/COPYING #{dmgDir}`
|
`cp #{srcDir}/COPYING #{dmgDir}`
|
||||||
|
|
||||||
|
puts "Copying base package files into the image"
|
||||||
|
`rsync -a fgdata/ #{resourcesDir}/data`
|
||||||
|
|
||||||
|
# code sign all executables in MacOS dir. Do this last since reource
|
||||||
|
# changes will invalidate the signature!
|
||||||
|
Dir.foreach(macosDir) do |b|
|
||||||
|
if b == '.' or b == '..' then
|
||||||
|
next
|
||||||
|
end
|
||||||
|
code_sign("#{macosDir}/#{b}")
|
||||||
|
end
|
||||||
|
|
||||||
puts "Creating DMG"
|
puts "Creating DMG"
|
||||||
|
|
||||||
createArgs = "-format UDBZ -imagekey bzip2-level=9 -quiet -volname #{volName}"
|
createArgs = "-format UDBZ -imagekey bzip2-level=9 -quiet -volname #{volName}"
|
||||||
|
|
1
maclauncher
Submodule
1
maclauncher
Submodule
|
@ -0,0 +1 @@
|
||||||
|
Subproject commit 7ffef2cb26442578f3c4b1e22158feb1ad812367
|
Loading…
Reference in a new issue