mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-22 14:55:36 +08:00
@@ -77,6 +77,20 @@ namespace BlackMisc
|
||||
#endif
|
||||
}
|
||||
|
||||
bool CBuildConfig::isRunningOnLinuxPlatform()
|
||||
{
|
||||
#ifdef Q_OS_LINUX
|
||||
return true;
|
||||
#else
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
|
||||
bool CBuildConfig::isRunningOnUnixPlatform()
|
||||
{
|
||||
return isRunningOnMacOSXPlatform() || isRunningOnLinuxPlatform();
|
||||
}
|
||||
|
||||
bool CBuildConfig::isDebugBuild()
|
||||
{
|
||||
#ifdef QT_DEBUG
|
||||
|
||||
@@ -77,6 +77,12 @@ namespace BlackMisc
|
||||
//! Running on Mac OS X platform?
|
||||
static bool isRunningOnMacOSXPlatform();
|
||||
|
||||
//! Running on Linux platform?
|
||||
static bool isRunningOnLinuxPlatform();
|
||||
|
||||
//! Running on Unix (Linux or Mac OS X) platform
|
||||
static bool isRunningOnUnixPlatform();
|
||||
|
||||
//! Application directory where current application is located
|
||||
//! \todo Move to to CApplication
|
||||
static const QString &getApplicationDir();
|
||||
|
||||
@@ -195,8 +195,10 @@ void CSwiftLauncher::startSwiftCore()
|
||||
}
|
||||
|
||||
// I set this for debug purpose only
|
||||
this->m_executableArgs = args;
|
||||
this->m_executable = CBuildConfig::swiftCoreExecutableName();
|
||||
m_executableArgs = args;
|
||||
m_executable.clear();
|
||||
if (CBuildConfig::isRunningOnUnixPlatform()) { m_executable += "./"; }
|
||||
m_executable += CBuildConfig::swiftCoreExecutableName();
|
||||
CLogMessage(this).info(this->getCmdLine());
|
||||
|
||||
// start
|
||||
@@ -205,7 +207,9 @@ void CSwiftLauncher::startSwiftCore()
|
||||
|
||||
void CSwiftLauncher::setSwiftDataExecutable()
|
||||
{
|
||||
m_executable = CBuildConfig::swiftDataExecutableName();
|
||||
m_executable.clear();
|
||||
if (CBuildConfig::isRunningOnUnixPlatform()) { m_executable += "./"; }
|
||||
m_executable += CBuildConfig::swiftDataExecutableName();
|
||||
m_executableArgs.clear();
|
||||
}
|
||||
|
||||
@@ -214,7 +218,9 @@ bool CSwiftLauncher::setSwiftGuiExecutable()
|
||||
QString msg;
|
||||
if (this->isStandaloneGuiSelected() || this->canConnectDBusServer(msg))
|
||||
{
|
||||
m_executable = CBuildConfig::swiftGuiExecutableName();
|
||||
m_executable.clear();
|
||||
if (CBuildConfig::isRunningOnUnixPlatform()) { m_executable += "./"; }
|
||||
m_executable += CBuildConfig::swiftGuiExecutableName();
|
||||
QStringList args
|
||||
{
|
||||
"--core", CoreModes::coreModeToString(getCoreMode()),
|
||||
|
||||
Reference in New Issue
Block a user