1
0
Fork 0

Initial work on Mac nightly build packaging

This commit is contained in:
James Turner 2010-11-02 09:29:12 +00:00
parent 545969054c
commit a1ccf37c80
4 changed files with 173 additions and 0 deletions

BIN
package/mac/FlightGear.icns Normal file

Binary file not shown.

View file

@ -0,0 +1,95 @@
#!/usr/bin/ruby
require 'ERB'
$osgLibs = ['osgFX', 'osgParticle', 'osg', 'osgGA', 'osgText', 'osgUtil', 'osgSim', 'osgViewer', 'osgDB']
$osgPlugins = ['ac', 'osg', 'freetype', 'qt', 'imageio', 'rgb', 'txf']
$osgDylibVersion='63'
$alutSourcePath='/Library/Frameworks/ALUT.framework'
def fix_install_names(object)
#puts "fixing install names for #{object}"
$osgLibs.each do |l|
oldName = "lib#{l}.#{$osgDylibVersion}.dylib"
newName = "@executable_path/../Frameworks/#{oldName}"
`install_name_tool -change #{oldName} #{newName} #{object}`
end
oldName = "libOpenThreads.12.dylib"
newName= "@executable_path/../Frameworks/#{oldName}"
`install_name_tool -change #{oldName} #{newName} #{object}`
alutBundlePath = "@executable_path/../Frameworks/Alut.framework"
alutLib = "Versions/A/ALUT"
`install_name_tool -change #{$alutSourcePath}/#{alutLib} #{alutBundlePath}/#{alutLib} #{object}`
end
prefixDir=Dir.pwd + "/dist"
dmgDir=Dir.pwd + "/image"
srcDir=Dir.pwd + "/flightgear"
dmgPath = Dir.pwd + "/fg_mac_nightly.dmg"
puts "Erasing previous image dir"
`rm -rf #{dmgDir}`
bundle=dmgDir + "/FlightGear.app"
contents=bundle + "/Contents"
macosDir=contents + "/MacOS"
frameworksDir=contents +"/Frameworks"
resourcesDir=contents+"/Resources"
osgPluginsDir=contents+"/PlugIns/osgPlugins-2.9.7"
volName="\"FlightGear Nightly Build\""
puts "Creating directory structure"
`mkdir -p #{macosDir}`
`mkdir -p #{frameworksDir}`
`mkdir -p #{resourcesDir}`
`mkdir -p #{osgPluginsDir}`
puts "Copying binaries"
bins = ['fgfs', 'terrasync', 'fgjs']
bins.each do |b|
`cp #{prefixDir}/bin/#{b} #{macosDir}/#{b}`
fix_install_names("#{macosDir}/#{b}")
end
puts "copying libraries"
$osgLibs.each do |l|
libFile = "lib#{l}.#{$osgDylibVersion}.dylib"
`cp #{prefixDir}/lib/#{libFile} #{frameworksDir}`
fix_install_names("#{frameworksDir}/#{libFile}")
end
# and not forgetting OpenThreads
libFile = "libOpenThreads.12.dylib"
`cp #{prefixDir}/lib/#{libFile} #{frameworksDir}`
$osgPlugins.each do |p|
pluginFile = "osgdb_#{p}.so"
`cp #{prefixDir}/lib/osgPlugins-2.9.7/#{pluginFile} #{osgPluginsDir}`
fix_install_names("#{osgPluginsDir}/#{pluginFile}")
end
# custom ALUT
# must copy frameworks using ditto
`ditto #{$alutSourcePath} #{frameworksDir}/ALUT.framework`
# Info.plist
template = File.read("#{srcDir}/package/mac/nightly.plist.in")
output = ERB.new(template).result(binding)
File.open("#{contents}/Info.plist", 'w') { |f|
f.write(output)
}
`cp #{srcDir}/package/mac/nightly-readme.rtf #{dmgDir}/ReadMe.rtf`
`cp #{srcDir}/package/mac/FlightGear.icns #{resourcesDir}/FlightGear.icns`
`cp #{srcDir}/COPYING #{dmgDir}`
puts "Creating DMG"
createArgs = "-format UDBZ -imagekey bzip2-level=9 -quiet -volname #{volName}"
`rm #{dmgPath}`
`hdiutil create -srcfolder #{dmgDir} #{createArgs} #{dmgPath}`

View file

@ -0,0 +1,53 @@
{\rtf1\ansi\ansicpg1252\cocoartf1038\cocoasubrtf320
{\fonttbl\f0\fswiss\fcharset0 Helvetica;\f1\fmodern\fcharset0 Courier;}
{\colortbl;\red255\green255\blue255;}
\paperw11900\paperh16840\margl1440\margr1440\vieww14720\viewh15300\viewkind0
\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\qc\pardirnatural
\f0\b\fs30 \cf0 FlightGear nightly build
\b0\fs24 \
\
\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural
\b\fs26 \cf0 Introduction
\b0\fs24 \
\
This is an automatically generated build of FlightGear from the developer code repositories (Git), for Intel Macs running Mac OSX 10.5 (Leopard) or higher. It does not include a GUI launcher, despite being packaged as an application - see 'Running' below.\
\
This build receives NO manual testing, and only the most limited automatic testing (at present). Use it at your own risk, and report problems you encounter via the appropriate project communication channels - the {\field{\*\fldinst{HYPERLINK "https://lists.sourceforge.net/lists/listinfo/flightgear-devel"}}{\fldrslt developer mailing list}} or the {\field{\*\fldinst{HYPERLINK "http://code.google.com/p/flightgear-bugs/issues/list"}}{\fldrslt bug tracker}}. Please don't use IRC or the forums as a bug-reporting tool, since they are difficult to track over time.\
\
\b\fs26 Running
\b0\fs24 \
\
No GUI launcher tool is included, unlike official releases. Launch the
\f1 fgfs
\f0 binary from Terminal, passing appropriate arguments, such as
\f1 --fg-root
\f0 ,
\f1 --aircraft
\f0 and
\f1 --airport
\f0 . If you're not familiar with using Terminal to launch a bundled application, or specifying arguments directly to FlightGear, this build is not for you!\
\
This build will read settings from
\f1 .fgfsrc
\f0 as normal, if you wish to save standard options (such as the root, aircraft and scenery dirs) instead of specifying them on the command line. Note all directory paths passed to FlightGear must be absolute.\
\
\b\fs26 Examples
\b0\fs24 \
\
\f1 ./FlightGear.app/Contents/MacOS/fgfs --fg-root=$HOME/Documents/fgdata --aircraft=b1900d\
\f0 \
\f1 ./FlightGear.app/Contents/MacOS/fgfs --fg-root=$HOME/fgdata --fg-scenery=$HOME/terrasync-scenery
\f0 \
\
\b\fs26 TerraSync
\b0\fs24 \
\
A terrasync binary is included in the bundle, also in Contents/MacOS. Again it is assumed the user is familiar with manually specifying appropriate terrasync arguments to specify a scenery direction, and also connecting terrasync to FlightGear.}

View file

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleIconFile</key>
<string>FlightGear.icns</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleGetInfoString</key>
<string>FlightGear nightly build</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleExecutable</key>
<string>fgfs</string>
<key>CFBundleIdentifier</key>
<string>org.flightgear.FlightGear</string>
<key>CFBundleVersion</key>
<string>2.0</string>
<key>CFBundleShortVersionString</key>
<string>unstable nightly build</string>
<key>LSMinimumSystemVersion</key>
<string>10.5.0</string>
</dict>
</plist>