更新 'src/Main/options.cxx'

This commit is contained in:
zhongjin 2022-11-25 08:24:59 +08:00
parent 273adf8d08
commit 5438da42c0

View File

@ -272,19 +272,6 @@ void fgSetDefaults ()
if( envp != nullptr ) if( envp != nullptr )
fgSetupProxy( envp ); fgSetupProxy( envp );
//zhongjin
//Addon
const auto& addonManager = addons::AddonManager::instance();
SGPath addonPath = globals->get_fg_root();
addonPath.append("Addon/RedGriffinATC");
try {
addonManager->registerAddon(addonPath);
} catch (const sg_exception &e) {
string msg = "Error registering an add-on: " + e.getFormattedMessage();
SG_LOG(SG_GENERAL, SG_ALERT, msg);
}
} }
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
@ -2926,6 +2913,22 @@ OptionResult Options::processOptions()
return FG_OPTIONS_EXIT; return FG_OPTIONS_EXIT;
} }
//zhongjin Addon
const auto& addonManager = addons::AddonManager::instance();
SGPath addonPath = globals->get_fg_root();
addonPath.append("Addon/RedGriffinATC");
try {
addonManager->registerAddon(addonPath);
} catch (const sg_exception &e) {
string msg = "Error registering an add-on: " + e.getFormattedMessage();
SG_LOG(SG_GENERAL, SG_ALERT, msg);
}
//end
return FG_OPTIONS_OK; return FG_OPTIONS_OK;
} }
@ -3063,7 +3066,7 @@ void Options::showUsage() const
void Options::showVersion() const void Options::showVersion() const
{ {
cout << "FlightGear version: " << FLIGHTGEAR_VERSION << endl; cout << "FGFS version: " << FLIGHTGEAR_VERSION << endl;
cout << "Revision: " << REVISION << endl; cout << "Revision: " << REVISION << endl;
cout << "Build-Id: " << JENKINS_BUILD_ID << endl; cout << "Build-Id: " << JENKINS_BUILD_ID << endl;
cout << "Build-Type: " << FG_BUILD_TYPE << endl; cout << "Build-Type: " << FG_BUILD_TYPE << endl;