1
0
Fork 0

Merge branch 'next' of D:\Git_New\flightgear into next

This commit is contained in:
Vivian Meazza 2010-11-02 22:59:34 +00:00
commit cbb502957c
11 changed files with 424 additions and 276 deletions

View file

@ -368,6 +368,7 @@ case "${host}" in
dnl Mac OS X
LIBS="$LIBS -framework GLUT -framework OpenGL -framework AGL -framework $macAPI -lobjc"
LDFLAGS="$LDFLAGS -headerpad_max_install_names"
joystick_LIBS="$joystick_LIBS -framework IOKit -framework CoreFoundation"
;;

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>

View file

@ -384,23 +384,6 @@
<ClCompile Include="..\..\..\src\Autopilot\pisimplecontroller.cxx" />
<ClCompile Include="..\..\..\src\Autopilot\predictor.cxx" />
<ClCompile Include="..\..\..\src\Autopilot\route_mgr.cxx" />
<ClCompile Include="..\..\..\src\Cockpit\cockpit.cxx" />
<ClCompile Include="..\..\..\src\Cockpit\hud.cxx">
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)%(Filename)1.obj</ObjectFileName>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IntDir)%(Filename)1.obj</ObjectFileName>
</ClCompile>
<ClCompile Include="..\..\..\src\Cockpit\hud_card.cxx" />
<ClCompile Include="..\..\..\src\Cockpit\hud_dnst.cxx" />
<ClCompile Include="..\..\..\src\Cockpit\hud_gaug.cxx" />
<ClCompile Include="..\..\..\src\Cockpit\hud_inst.cxx" />
<ClCompile Include="..\..\..\src\Cockpit\hud_labl.cxx" />
<ClCompile Include="..\..\..\src\Cockpit\hud_ladr.cxx" />
<ClCompile Include="..\..\..\src\Cockpit\hud_rwy.cxx" />
<ClCompile Include="..\..\..\src\Cockpit\hud_scal.cxx" />
<ClCompile Include="..\..\..\src\Cockpit\hud_tbi.cxx">
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)%(Filename)1.obj</ObjectFileName>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IntDir)%(Filename)1.obj</ObjectFileName>
</ClCompile>
<ClCompile Include="..\..\..\src\Cockpit\panel.cxx" />
<ClCompile Include="..\..\..\src\Cockpit\panel_io.cxx" />
<ClCompile Include="..\..\..\src\Cockpit\built_in\FGMagRibbon.cxx" />
@ -409,7 +392,6 @@
<ClCompile Include="..\..\..\src\FDM\flightProperties.cxx" />
<ClCompile Include="..\..\..\src\FDM\JSBSim\FGFDMExec.cpp" />
<ClCompile Include="..\..\..\src\FDM\JSBSim\FGJSBBase.cpp" />
<ClCompile Include="..\..\..\src\FDM\JSBSim\FGState.cpp" />
<ClCompile Include="..\..\..\src\FDM\JSBSim\JSBSim.cxx" />
<ClCompile Include="..\..\..\src\Fdm\JSBSim\math\FGColumnVector3.cpp" />
<ClCompile Include="..\..\..\src\Fdm\JSBSim\math\FGCondition.cpp" />
@ -984,8 +966,6 @@
<ClInclude Include="..\..\..\src\Autopilot\pisimplecontroller.hxx" />
<ClInclude Include="..\..\..\src\Autopilot\predictor.hxx" />
<ClInclude Include="..\..\..\src\Autopilot\route_mgr.hxx" />
<ClInclude Include="..\..\..\src\Cockpit\cockpit.hxx" />
<ClInclude Include="..\..\..\src\Cockpit\hud.hxx" />
<ClInclude Include="..\..\..\src\Cockpit\panel.hxx" />
<ClInclude Include="..\..\..\src\Cockpit\panel_io.hxx" />
<ClInclude Include="..\..\..\src\Cockpit\built_in\FGMagRibbon.hxx" />
@ -994,7 +974,6 @@
<ClInclude Include="..\..\..\src\FDM\flightProperties.hxx" />
<ClInclude Include="..\..\..\src\FDM\JSBSim\FGFDMExec.h" />
<ClInclude Include="..\..\..\src\FDM\JSBSim\FGJSBBase.h" />
<ClInclude Include="..\..\..\src\FDM\JSBSim\FGState.h" />
<ClInclude Include="..\..\..\src\FDM\JSBSim\JSBSim.hxx" />
<ClInclude Include="..\..\..\src\Fdm\JSBSim\math\FGColumnVector3.h" />
<ClInclude Include="..\..\..\src\Fdm\JSBSim\math\FGCondition.h" />

View file

@ -228,39 +228,6 @@
<ClCompile Include="..\..\..\src\Autopilot\route_mgr.cxx">
<Filter>Lib_Autopilot</Filter>
</ClCompile>
<ClCompile Include="..\..\..\src\Cockpit\cockpit.cxx">
<Filter>Lib_Cockpit</Filter>
</ClCompile>
<ClCompile Include="..\..\..\src\Cockpit\hud.cxx">
<Filter>Lib_Cockpit</Filter>
</ClCompile>
<ClCompile Include="..\..\..\src\Cockpit\hud_card.cxx">
<Filter>Lib_Cockpit</Filter>
</ClCompile>
<ClCompile Include="..\..\..\src\Cockpit\hud_dnst.cxx">
<Filter>Lib_Cockpit</Filter>
</ClCompile>
<ClCompile Include="..\..\..\src\Cockpit\hud_gaug.cxx">
<Filter>Lib_Cockpit</Filter>
</ClCompile>
<ClCompile Include="..\..\..\src\Cockpit\hud_inst.cxx">
<Filter>Lib_Cockpit</Filter>
</ClCompile>
<ClCompile Include="..\..\..\src\Cockpit\hud_labl.cxx">
<Filter>Lib_Cockpit</Filter>
</ClCompile>
<ClCompile Include="..\..\..\src\Cockpit\hud_ladr.cxx">
<Filter>Lib_Cockpit</Filter>
</ClCompile>
<ClCompile Include="..\..\..\src\Cockpit\hud_rwy.cxx">
<Filter>Lib_Cockpit</Filter>
</ClCompile>
<ClCompile Include="..\..\..\src\Cockpit\hud_scal.cxx">
<Filter>Lib_Cockpit</Filter>
</ClCompile>
<ClCompile Include="..\..\..\src\Cockpit\hud_tbi.cxx">
<Filter>Lib_Cockpit</Filter>
</ClCompile>
<ClCompile Include="..\..\..\src\Cockpit\panel.cxx">
<Filter>Lib_Cockpit</Filter>
</ClCompile>
@ -276,9 +243,6 @@
<ClCompile Include="..\..\..\src\FDM\JSBSim\FGJSBBase.cpp">
<Filter>Lib_JSBSim</Filter>
</ClCompile>
<ClCompile Include="..\..\..\src\FDM\JSBSim\FGState.cpp">
<Filter>Lib_JSBSim</Filter>
</ClCompile>
<ClCompile Include="..\..\..\src\FDM\JSBSim\JSBSim.cxx">
<Filter>Lib_JSBSim</Filter>
</ClCompile>
@ -1676,12 +1640,6 @@
<ClInclude Include="..\..\..\src\Autopilot\route_mgr.hxx">
<Filter>Lib_Autopilot</Filter>
</ClInclude>
<ClInclude Include="..\..\..\src\Cockpit\cockpit.hxx">
<Filter>Lib_Cockpit</Filter>
</ClInclude>
<ClInclude Include="..\..\..\src\Cockpit\hud.hxx">
<Filter>Lib_Cockpit</Filter>
</ClInclude>
<ClInclude Include="..\..\..\src\Cockpit\panel.hxx">
<Filter>Lib_Cockpit</Filter>
</ClInclude>
@ -1697,9 +1655,6 @@
<ClInclude Include="..\..\..\src\FDM\JSBSim\FGJSBBase.h">
<Filter>Lib_JSBSim</Filter>
</ClInclude>
<ClInclude Include="..\..\..\src\FDM\JSBSim\FGState.h">
<Filter>Lib_JSBSim</Filter>
</ClInclude>
<ClInclude Include="..\..\..\src\FDM\JSBSim\JSBSim.hxx">
<Filter>Lib_JSBSim</Filter>
</ClInclude>

View file

@ -110,6 +110,7 @@
<DataExecutionPrevention>
</DataExecutionPrevention>
<TargetMachine>MachineX86</TargetMachine>
<ForceFileOutput>MultiplyDefinedSymbolOnly</ForceFileOutput>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
@ -139,6 +140,7 @@
<DataExecutionPrevention>
</DataExecutionPrevention>
<TargetMachine>MachineX64</TargetMachine>
<ForceFileOutput>MultiplyDefinedSymbolOnly</ForceFileOutput>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
@ -164,6 +166,7 @@
<DataExecutionPrevention>
</DataExecutionPrevention>
<TargetMachine>MachineX86</TargetMachine>
<ForceFileOutput>MultiplyDefinedSymbolOnly</ForceFileOutput>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
@ -191,6 +194,7 @@
<DataExecutionPrevention>
</DataExecutionPrevention>
<TargetMachine>MachineX64</TargetMachine>
<ForceFileOutput>MultiplyDefinedSymbolOnly</ForceFileOutput>
</Link>
</ItemDefinitionGroup>
<ItemGroup>

View file

@ -303,7 +303,8 @@ bool ExponentialFilterImplementation::configure( const std::string & nodeName, S
/* --------------------------------------------------------------------------------- */
DigitalFilter::DigitalFilter() :
AnalogComponent()
AnalogComponent(),
_initializeTo(INITIALIZE_INPUT)
{
}
@ -335,6 +336,20 @@ bool DigitalFilter::configure(const string& nodeName, SGPropertyNode_ptr configN
return true;
}
if( nodeName == "initialize-to" ) {
string s( configNode->getStringValue() );
if( s == "input" ) {
_initializeTo = INITIALIZE_INPUT;
} else if( s == "output" ) {
_initializeTo = INITIALIZE_OUTPUT;
} else if( s == "none" ) {
_initializeTo = INITIALIZE_NONE;
} else {
SG_LOG( SG_AUTOPILOT, SG_WARN, "unhandled initialize-to value '" << s << "' ignored" );
}
return true;
}
SG_LOG( SG_AUTOPILOT, SG_BULK, "DigitalFilter::configure(" << nodeName << ") [unhandled]" << endl );
return false; // not handled by us, let the base class try
}
@ -344,8 +359,22 @@ void DigitalFilter::update( bool firstTime, double dt)
if( _implementation == NULL ) return;
if( firstTime ) {
SG_LOG(SG_AUTOPILOT,SG_DEBUG, "First time initialization of " << get_name() << " to " << _valueInput.get_value() );
_implementation->initialize( _valueInput.get_value() );
switch( _initializeTo ) {
case INITIALIZE_INPUT:
SG_LOG(SG_AUTOPILOT,SG_DEBUG, "First time initialization of " << get_name() << " to " << _valueInput.get_value() );
_implementation->initialize( _valueInput.get_value() );
break;
case INITIALIZE_OUTPUT:
SG_LOG(SG_AUTOPILOT,SG_DEBUG, "First time initialization of " << get_name() << " to " << get_output_value() );
_implementation->initialize( get_output_value() );
break;
default:
SG_LOG(SG_AUTOPILOT,SG_DEBUG, "First time initialization of " << get_name() << " to (uninitialized)" );
break;
}
}
double input = _valueInput.get_value() - _referenceInput.get_value();

View file

@ -53,6 +53,12 @@ class DigitalFilter : public AnalogComponent
private:
SGSharedPtr<DigitalFilterImplementation> _implementation;
enum InitializeTo {
INITIALIZE_OUTPUT,
INITIALIZE_INPUT,
INITIALIZE_NONE
};
protected:
bool configure( const std::string & nodeName, SGPropertyNode_ptr configNode);
void update( bool firstTime, double dt);
@ -61,6 +67,7 @@ protected:
InputValueList _samples;
InputValueList _rateOfChange;
InputValueList _gain;
InitializeTo _initializeTo;
public:
DigitalFilter();

View file

@ -125,7 +125,7 @@ fgfs_LDADD = \
$(openal_LIBS) \
$(EVENT_LIBS)
fgfs_LDFLAGS = $(fgfs_PLIB_FW) $(fgfs_OSG_FW)
fgfs_LDFLAGS = $(fgfs_PLIB_FW) $(fgfs_OSG_FW) $(LDFLAGS)
metar_SOURCES = metar_main.cxx