mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-14 08:45:36 +08:00
XSwiftBus install dialog (for local environment)
* can also be called from menu * improved file check * renamed some functions
This commit is contained in:
@@ -24,11 +24,12 @@ using namespace BlackCore::Context;
|
||||
|
||||
namespace BlackGui
|
||||
{
|
||||
int CCopyXSwiftBusDialog::displayDialogAndCopyBuildFiles(const QString &xplaneRootDir, QWidget *parent)
|
||||
int CCopyXSwiftBusDialog::displayDialogAndCopyBuildFiles(const QString &xplaneRootDir, bool checkLatestFile, QWidget *parent)
|
||||
{
|
||||
if (!CBuildConfig::isLocalDeveloperDebugBuild()) { return -1; }
|
||||
if (!CXPlaneUtil::hasNewerXSwiftBusBuild(xplaneRootDir)) { return 0; }
|
||||
if (sGui && sGui->isShuttingDown()) { return 0; }
|
||||
if (!CBuildConfig::isLocalDeveloperDebugBuild()) { return -1; }
|
||||
if (checkLatestFile && !CXPlaneUtil::hasNewerXSwiftBusBuild(xplaneRootDir)) { return 0; }
|
||||
if (!CXPlaneUtil::hasXSwiftBusBuildAndPluginDir(xplaneRootDir)) { return 0; }
|
||||
if (sGui && sGui->getIContextSimulator())
|
||||
{
|
||||
if (sGui->getIContextSimulator()->isSimulatorAvailable())
|
||||
|
||||
@@ -24,8 +24,8 @@ namespace BlackGui
|
||||
{
|
||||
public:
|
||||
//! Display a dialog to copy the latest XSwiftBus files
|
||||
//! \remark only displayed in a local environment
|
||||
static int displayDialogAndCopyBuildFiles(const QString &xplaneRootDir, QWidget *parent = nullptr);
|
||||
//! \remark normally only displayed in a local environment
|
||||
static int displayDialogAndCopyBuildFiles(const QString &xplaneRootDir, bool checkLatestFile = true, QWidget *parent = nullptr);
|
||||
};
|
||||
} // ns
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user