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