Make build information readonly and clean up debug output.
This commit is contained in:
parent
46e8c65612
commit
771586854b
6 changed files with 24 additions and 37 deletions
|
@ -32,8 +32,9 @@
|
|||
#define PKGLIBDIR "@FG_DATA_DIR@"
|
||||
#define WEB_BROWSER "@WEB_BROWSER@"
|
||||
|
||||
#cmakedefine FG_HAVE_HLA
|
||||
#cmakedefine FG_HAVE_GPERFTOOLS
|
||||
// Ensure FG_HAVE_xxx always have a value
|
||||
#define FG_HAVE_HLA (@FG_HAVE_HLA@ + 0)
|
||||
#define FG_HAVE_GPERFTOOLS (@FG_HAVE_GPERFTOOLS@ + 0)
|
||||
#cmakedefine FG_JPEG_SERVER
|
||||
|
||||
#cmakedefine SYSTEM_SQLITE
|
||||
|
|
|
@ -52,7 +52,7 @@
|
|||
|
||||
#include <boost/scoped_array.hpp>
|
||||
|
||||
#ifdef FG_HAVE_GPERFTOOLS
|
||||
#if FG_HAVE_GPERFTOOLS
|
||||
# include <google/profiler.h>
|
||||
#endif
|
||||
|
||||
|
@ -1528,7 +1528,7 @@ do_release_cockpit_button (const SGPropertyNode *arg)
|
|||
// Optional profiling commands using gperftools:
|
||||
// http://code.google.com/p/gperftools/
|
||||
|
||||
#ifndef FG_HAVE_GPERFTOOLS
|
||||
#if !FG_HAVE_GPERFTOOLS
|
||||
static void
|
||||
no_profiling_support()
|
||||
{
|
||||
|
@ -1544,7 +1544,7 @@ no_profiling_support()
|
|||
static bool
|
||||
do_profiler_start(const SGPropertyNode *arg)
|
||||
{
|
||||
#ifdef FG_HAVE_GPERFTOOLS
|
||||
#if FG_HAVE_GPERFTOOLS
|
||||
const char *filename = arg->getStringValue("filename", "fgfs.profile");
|
||||
ProfilerStart(filename);
|
||||
return true;
|
||||
|
@ -1557,7 +1557,7 @@ do_profiler_start(const SGPropertyNode *arg)
|
|||
static bool
|
||||
do_profiler_stop(const SGPropertyNode *arg)
|
||||
{
|
||||
#ifdef FG_HAVE_GPERFTOOLS
|
||||
#if FG_HAVE_GPERFTOOLS
|
||||
ProfilerStop();
|
||||
return true;
|
||||
#else
|
||||
|
@ -1667,14 +1667,8 @@ fgInitCommands ()
|
|||
fgTie( "/command/view/next", dummy(0), do_view_next );
|
||||
fgTie( "/command/view/prev", dummy(0), do_view_prev );
|
||||
|
||||
SGPropertyNode* profiler_available =
|
||||
globals->get_props()->getNode("/sim/debug/profiler-available", true);
|
||||
#ifdef FG_HAVE_GPERFTOOLS
|
||||
profiler_available->setBoolValue(true);
|
||||
#else
|
||||
profiler_available->setBoolValue(false);
|
||||
#endif
|
||||
profiler_available->setAttributes(SGPropertyNode::READ);
|
||||
globals->get_props()->setValueReadOnly( "/sim/debug/profiler-available",
|
||||
bool(FG_HAVE_GPERFTOOLS) );
|
||||
}
|
||||
|
||||
// end of fg_commands.cxx
|
||||
|
|
|
@ -67,7 +67,7 @@
|
|||
#include <Network/rul.hxx>
|
||||
#include <Network/generic.hxx>
|
||||
|
||||
#ifdef FG_HAVE_HLA
|
||||
#if FG_HAVE_HLA
|
||||
#include <Network/HLA/hla.hxx>
|
||||
#endif
|
||||
|
||||
|
@ -228,7 +228,7 @@ FGIO::parse_port_config( const string& config )
|
|||
|
||||
return NULL;
|
||||
}
|
||||
#ifdef FG_HAVE_HLA
|
||||
#if FG_HAVE_HLA
|
||||
else if ( protocol == "hla" ) {
|
||||
return new FGHLA(tokens);
|
||||
}
|
||||
|
|
|
@ -328,12 +328,6 @@ int fgMainInit( int argc, char **argv ) {
|
|||
SG_LOG( SG_GENERAL, SG_INFO, "FlightGear: Version "
|
||||
<< version );
|
||||
SG_LOG( SG_GENERAL, SG_INFO, "Built with " << SG_COMPILER_STR << std::endl );
|
||||
SG_LOG( SG_GL,
|
||||
SG_INFO,
|
||||
"osg::Referenced thread safe reference counting is "
|
||||
<< (osg::Referenced::getThreadSafeReferenceCounting() ? "enabled"
|
||||
: "disabled")
|
||||
);
|
||||
|
||||
// Allocate global data structures. This needs to happen before
|
||||
// we parse command line options
|
||||
|
|
|
@ -225,19 +225,18 @@ fgSetDefaults ()
|
|||
fgSetInt("/sim/multiplay/rxport", 0);
|
||||
fgSetInt("/sim/multiplay/txport", 0);
|
||||
|
||||
fgSetString("/sim/version/flightgear", FLIGHTGEAR_VERSION);
|
||||
fgSetString("/sim/version/simgear", SG_STRINGIZE(SIMGEAR_VERSION));
|
||||
fgSetString("/sim/version/openscenegraph", osgGetVersion());
|
||||
fgSetString("/sim/version/revision", REVISION);
|
||||
fgSetInt("/sim/version/build-number", HUDSON_BUILD_NUMBER);
|
||||
fgSetString("/sim/version/build-id", HUDSON_BUILD_ID);
|
||||
#ifdef FG_HAVE_HLA // -DENABLE_RTI=ON
|
||||
fgSetBool("/sim/version/hla-support", true);
|
||||
#else // -DENABLE_RTI=OFF
|
||||
fgSetBool("/sim/version/hla-support", false);
|
||||
#endif
|
||||
SGPropertyNode* v = globals->get_props()->getNode("/sim/version", true);
|
||||
v->setValueReadOnly("flightgear", FLIGHTGEAR_VERSION);
|
||||
v->setValueReadOnly("simgear", SG_STRINGIZE(SIMGEAR_VERSION));
|
||||
v->setValueReadOnly("openscenegraph", osgGetVersion());
|
||||
v->setValueReadOnly("openscenegraph-thread-safe-reference-counting",
|
||||
osg::Referenced::getThreadSafeReferenceCounting());
|
||||
v->setValueReadOnly("revision", REVISION);
|
||||
v->setValueReadOnly("build-number", HUDSON_BUILD_NUMBER);
|
||||
v->setValueReadOnly("build-id", HUDSON_BUILD_ID);
|
||||
v->setValueReadOnly("hla-support", bool(FG_HAVE_HLA));
|
||||
|
||||
char* envp = ::getenv( "http_proxy" );
|
||||
char* envp = ::getenv( "http_proxy" );
|
||||
if( envp != NULL )
|
||||
fgSetupProxy( envp );
|
||||
}
|
||||
|
@ -1461,7 +1460,7 @@ struct OptionDesc {
|
|||
{"proxy", true, OPTION_FUNC, "", false, "", fgSetupProxy },
|
||||
{"callsign", true, OPTION_FUNC, "", false, "", fgOptCallSign},
|
||||
{"multiplay", true, OPTION_CHANNEL | OPTION_MULTI, "", false, "", 0 },
|
||||
#ifdef FG_HAVE_HLA
|
||||
#if FG_HAVE_HLA
|
||||
{"hla", true, OPTION_CHANNEL, "", false, "", 0 },
|
||||
{"hla-local", true, OPTION_CHANNEL, "", false, "", 0 },
|
||||
#endif
|
||||
|
|
|
@ -87,8 +87,7 @@ FGNasalModelData::FGNasalModelData( SGPropertyNode *root,
|
|||
SG_INFO,
|
||||
"New model with attached script(s) "
|
||||
"(branch = " << branch << ","
|
||||
" path = " << simgear::getNodePathString(branch) <<
|
||||
" thread-safe = " << branch->getThreadSafeRefUnref() << ")"
|
||||
" path = " << simgear::getNodePathString(branch) << ")"
|
||||
);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue