From 6dd66284ca6eab70a0230c147abe9d56fc138720 Mon Sep 17 00:00:00 2001 From: Klaus Basan Date: Thu, 5 Nov 2015 02:50:51 +0100 Subject: [PATCH] refs #473, own launcher subproject * command line args for swift GUI * removed _ from swiftgui_standard * removed _ from swift_resources --- mkspecs/features/config.pri | 1 + ...swift_resources.pro => swiftresources.pro} | 0 src/blackgui/enableforframelesswindow.cpp | 22 +++ src/blackgui/enableforframelesswindow.h | 11 +- src/blackmisc/project.h | 12 +- src/swiftgui_standard/guimodeenums.h | 27 ---- src/swiftgui_standard/main.cpp | 75 --------- src/swiftguistandard/guimodeenums.h | 56 +++++++ src/swiftguistandard/main.cpp | 152 ++++++++++++++++++ .../swift.ico | Bin .../swift.rc | 0 .../swiftguistandard.pro} | 2 +- .../swiftguistd.cpp | 0 .../swiftguistd.h | 0 .../swiftguistd.ui | 0 .../swiftguistd_aircraft.cpp | 0 .../swiftguistd_init.cpp | 0 .../swiftguistd_menus.cpp | 0 .../introwindow.cpp | 0 .../introwindow.h | 2 +- .../introwindow.ui | 0 src/swiftlauncher/main.cpp | 54 +++++++ src/swiftlauncher/swift.ico | Bin 0 -> 9854 bytes src/swiftlauncher/swift.rc | 1 + src/swiftlauncher/swiftlauncher.pro | 37 +++++ swift.pro | 9 +- 26 files changed, 346 insertions(+), 115 deletions(-) rename resources/{swift_resources.pro => swiftresources.pro} (100%) delete mode 100644 src/swiftgui_standard/guimodeenums.h delete mode 100644 src/swiftgui_standard/main.cpp create mode 100644 src/swiftguistandard/guimodeenums.h create mode 100644 src/swiftguistandard/main.cpp rename src/{swiftgui_standard => swiftguistandard}/swift.ico (100%) rename src/{swiftgui_standard => swiftguistandard}/swift.rc (100%) rename src/{swiftgui_standard/swiftgui_standard.pro => swiftguistandard/swiftguistandard.pro} (97%) rename src/{swiftgui_standard => swiftguistandard}/swiftguistd.cpp (100%) rename src/{swiftgui_standard => swiftguistandard}/swiftguistd.h (100%) rename src/{swiftgui_standard => swiftguistandard}/swiftguistd.ui (100%) rename src/{swiftgui_standard => swiftguistandard}/swiftguistd_aircraft.cpp (100%) rename src/{swiftgui_standard => swiftguistandard}/swiftguistd_init.cpp (100%) rename src/{swiftgui_standard => swiftguistandard}/swiftguistd_menus.cpp (100%) rename src/{swiftgui_standard => swiftlauncher}/introwindow.cpp (100%) rename src/{swiftgui_standard => swiftlauncher}/introwindow.h (96%) rename src/{swiftgui_standard => swiftlauncher}/introwindow.ui (100%) create mode 100644 src/swiftlauncher/main.cpp create mode 100644 src/swiftlauncher/swift.ico create mode 100644 src/swiftlauncher/swift.rc create mode 100644 src/swiftlauncher/swiftlauncher.pro diff --git a/mkspecs/features/config.pri b/mkspecs/features/config.pri index eefe1badc..c65ebf9d9 100644 --- a/mkspecs/features/config.pri +++ b/mkspecs/features/config.pri @@ -7,6 +7,7 @@ BLACK_CONFIG += Unittests BLACK_CONFIG += SwiftData BLACK_CONFIG += SwiftCore BLACK_CONFIG += SwiftGui +BLACK_CONFIG += SwiftLauncher BLACK_CONFIG += FS9 BLACK_CONFIG += FSX BLACK_CONFIG += XPlane diff --git a/resources/swift_resources.pro b/resources/swiftresources.pro similarity index 100% rename from resources/swift_resources.pro rename to resources/swiftresources.pro diff --git a/src/blackgui/enableforframelesswindow.cpp b/src/blackgui/enableforframelesswindow.cpp index 1f3eec54a..f1d6b0d59 100644 --- a/src/blackgui/enableforframelesswindow.cpp +++ b/src/blackgui/enableforframelesswindow.cpp @@ -41,6 +41,28 @@ namespace BlackGui setMode(frameless ? WindowFrameless : WindowTool); } + CEnableForFramelessWindow::WindowMode CEnableForFramelessWindow::stringToWindowMode(const QString &s) + { + QString ws(s.trimmed().toLower()); + if (ws.isEmpty()) { return WindowNormal; } + if (ws.contains("frameless") || ws.startsWith("f")) { return WindowFrameless; } + if (ws.contains("tool") || ws.startsWith("t")) { return WindowTool; } + return WindowNormal; + } + + QString CEnableForFramelessWindow::windowModeToString(CEnableForFramelessWindow::WindowMode m) + { + switch (m) + { + case WindowFrameless: return "frameless"; + case WindowNormal: return "normal"; + case WindowTool: return "tool"; + default: + break; + } + return "normal"; + } + void CEnableForFramelessWindow::setWindowAttributes(CEnableForFramelessWindow::WindowMode mode) { Q_ASSERT_X(this->m_widget, "CEnableForFramelessWindow::setWindowAttributes", "Missing widget representing window"); diff --git a/src/blackgui/enableforframelesswindow.h b/src/blackgui/enableforframelesswindow.h index a3034bc67..12823daba 100644 --- a/src/blackgui/enableforframelesswindow.h +++ b/src/blackgui/enableforframelesswindow.h @@ -33,8 +33,8 @@ namespace BlackGui //! Window modes enum WindowMode { - WindowFrameless, WindowNormal, + WindowFrameless, WindowTool }; @@ -56,6 +56,12 @@ namespace BlackGui //! Corresponding QMainWindow QWidget *getWidget() const { return m_widget; } + //! String to window mode + static WindowMode stringToWindowMode(const QString &s); + + //! String to window mode + static QString windowModeToString(WindowMode m); + protected: //! Resize grip handle void addFramelessSizeGripToStatusBar(QStatusBar *statusBar); @@ -86,7 +92,7 @@ namespace BlackGui QPoint m_framelessDragPosition; //!< position, if moving is handled with frameless window */ QPushButton *m_framelessCloseButton = nullptr; //!< close button - WindowMode m_windowMode = WindowTool; //!< Window mode, \sa WindowMode + WindowMode m_windowMode = WindowTool; //!< Window mode, \sa WindowMode bool m_mainApplicationWindow = false; //!< is the main application window (only 1) QWidget *m_widget = nullptr; //!< corresponding main window or dock widget QSizeGrip *m_framelessSizeGrip = nullptr; //!< size grip object @@ -97,7 +103,6 @@ namespace BlackGui //! Mouse moving, required for frameless window bool handleMouseMoveEvent(QMouseEvent *event); - }; } // namespace diff --git a/src/blackmisc/project.h b/src/blackmisc/project.h index 786052bf8..437c42049 100644 --- a/src/blackmisc/project.h +++ b/src/blackmisc/project.h @@ -126,6 +126,12 @@ namespace BlackMisc //! Whole info static QString convertToQString(const QString &separator = QString("\n")); + //! Environment variable indicating "dev.environment" + static const QString &envVarDevelopment(); + + //! Environment variable private resources directory + static const QString &envVarPrivateSetupDir(); + private: //! Constructor CProject() {} @@ -136,16 +142,10 @@ namespace BlackMisc // --------------- env.vars. ------------- // centralized in one place here so we have an overview - //! Environment variable indicating "dev.environment" - static const QString &envVarDevelopment(); - //! Value //! \return true|false static QString envVarDevelopmentValue(); - //! Environment variable private resources directory - static const QString &envVarPrivateSetupDir(); - //! Value //! \return directory path static QString envVarPrivateSetupDirValue(); diff --git a/src/swiftgui_standard/guimodeenums.h b/src/swiftgui_standard/guimodeenums.h deleted file mode 100644 index 51cdbab7c..000000000 --- a/src/swiftgui_standard/guimodeenums.h +++ /dev/null @@ -1,27 +0,0 @@ -/* Copyright (C) 2013 - * swift project Community / Contributors - * - * This file is part of swift project. It is subject to the license terms in the LICENSE file found in the top-level - * directory of this distribution and at http://www.swift-project.org/license.html. No part of swift project, - * including this file, may be copied, modified, propagated, or distributed except according to the terms - * contained in the LICENSE file. - */ - -#ifndef STDGUI_GUIMODEENUMS_H -#define STDGUI_GUIMODEENUMS_H - - -//! Modes, how GUI can be started (core/GUI) -struct GuiModes -{ -public: - //! Core runs how and where? - enum CoreMode - { - CoreInGuiProcess, - CoreExternal, - CoreExternalAudioLocal - }; -}; - -#endif // guard diff --git a/src/swiftgui_standard/main.cpp b/src/swiftgui_standard/main.cpp deleted file mode 100644 index afe68b195..000000000 --- a/src/swiftgui_standard/main.cpp +++ /dev/null @@ -1,75 +0,0 @@ -/* Copyright (C) 2013 - * swift project Community / Contributors - * - * This file is part of swift project. It is subject to the license terms in the LICENSE file found in the top-level - * directory of this distribution and at http://www.swift-project.org/license.html. No part of swift project, - * including this file, may be copied, modified, propagated, or distributed except according to the terms - * contained in the LICENSE file. - */ - -#include "introwindow.h" -#include "swiftguistd.h" -#include "guimodeenums.h" -#include "blackgui/stylesheetutility.h" -#include "blackcore/blackcorefreefunctions.h" -#include "blackcore/context_runtime_config.h" -#include "blackgui/guiutility.h" -#include "blackmisc/blackmiscfreefunctions.h" -#include "blackmisc/logmessage.h" -#include "blackmisc/icons.h" -#include "blackmisc/loghandler.h" -#include "blackmisc/filelogger.h" - -#include -#include -#include -#include - -using namespace BlackGui; -using namespace BlackMisc; -using namespace BlackCore; - -int main(int argc, char *argv[]) -{ - QApplication a(argc, argv); - CGuiUtility::initSwiftGuiApplication(a, "swiftgui", CIcons::swift24()); - - // modes - BlackGui::CEnableForFramelessWindow::WindowMode windowMode; - - // Dialog to decide external or internal core - CIntroWindow intro; - intro.setWindowIcon(CIcons::swift24()); - BlackCore::CRuntimeConfig runtimeConfig; - if (intro.exec() == QDialog::Rejected) - { - return 0; - } - else - { - GuiModes::CoreMode coreMode = intro.getCoreMode(); - windowMode = intro.getWindowMode(); - QString dbusAddress = CDBusServer::fixAddressToDBusAddress(intro.getDBusAddress()); - switch (coreMode) - { - case GuiModes::CoreExternal: - runtimeConfig = CRuntimeConfig::remote(dbusAddress); - break; - case GuiModes::CoreInGuiProcess: - runtimeConfig = CRuntimeConfig::local(dbusAddress); - break; - case GuiModes::CoreExternalAudioLocal: - runtimeConfig = CRuntimeConfig::remoteLocalAudio(dbusAddress); - break; - } - } - intro.close(); - - // show window - SwiftGuiStd w(windowMode); - w.init(runtimeConfig); // object is complete by now - w.show(); - - int r = a.exec(); - return r; -} diff --git a/src/swiftguistandard/guimodeenums.h b/src/swiftguistandard/guimodeenums.h new file mode 100644 index 000000000..477dbd452 --- /dev/null +++ b/src/swiftguistandard/guimodeenums.h @@ -0,0 +1,56 @@ +/* Copyright (C) 2013 + * swift project Community / Contributors + * + * This file is part of swift project. It is subject to the license terms in the LICENSE file found in the top-level + * directory of this distribution and at http://www.swift-project.org/license.html. No part of swift project, + * including this file, may be copied, modified, propagated, or distributed except according to the terms + * contained in the LICENSE file. + */ + +#ifndef STDGUI_GUIMODEENUMS_H +#define STDGUI_GUIMODEENUMS_H + +#include + +//! Modes, how GUI can be started (core/GUI) +struct GuiModes +{ +public: + //! Core runs how and where? + enum CoreMode + { + CoreInGuiProcess, + CoreExternal, + CoreExternalAudioLocal + }; + + //! String to core mode + static CoreMode stringToCoreMode(const QString &m) + { + QString cm(m.toLower().trimmed()); + if (cm.isEmpty()) { return CoreInGuiProcess; } + if (m == coreModeToString(CoreExternal)) { return CoreExternal; } + if (m == coreModeToString(CoreInGuiProcess)) { return CoreInGuiProcess; } + if (m == coreModeToString(CoreExternalAudioLocal)) { return CoreExternalAudioLocal; } + + // some alternative names + if (cm.contains("audiolocal")) { return CoreExternalAudioLocal; } + if (cm.contains("localaudio")) { return CoreExternalAudioLocal; } + if (cm.contains("external")) { return CoreExternal; } + if (cm.contains("gui")) { return CoreInGuiProcess; } + return CoreInGuiProcess; + } + + //! Core mode as string + static QString coreModeToString(CoreMode mode) + { + switch (mode) + { + case CoreInGuiProcess: return "coreinguiprocess"; + case CoreExternal: return "coreexternal"; + case CoreExternalAudioLocal: return "coreexternalaudiolocal"; + } + return ""; + } +}; +#endif // guard diff --git a/src/swiftguistandard/main.cpp b/src/swiftguistandard/main.cpp new file mode 100644 index 000000000..8c8435263 --- /dev/null +++ b/src/swiftguistandard/main.cpp @@ -0,0 +1,152 @@ +/* Copyright (C) 2013 + * swift project Community / Contributors + * + * This file is part of swift project. It is subject to the license terms in the LICENSE file found in the top-level + * directory of this distribution and at http://www.swift-project.org/license.html. No part of swift project, + * including this file, may be copied, modified, propagated, or distributed except according to the terms + * contained in the LICENSE file. + */ + +#include "swiftguistd.h" +#include "guimodeenums.h" +#include "blackgui/stylesheetutility.h" +#include "blackcore/blackcorefreefunctions.h" +#include "blackcore/context_runtime_config.h" +#include "blackgui/guiutility.h" +#include "blackmisc/blackmiscfreefunctions.h" +#include "blackmisc/logmessage.h" +#include "blackmisc/icons.h" +#include "blackmisc/loghandler.h" +#include "blackmisc/filelogger.h" + +#include +#include +#include +#include +#include + +using namespace BlackGui; +using namespace BlackMisc; +using namespace BlackCore; + +enum CommandLineParseResult +{ + CommandLineOk, + CommandLineError, + CommandLineVersionRequested, + CommandLineHelpRequested +}; + +CommandLineParseResult parseCommandLine(QCommandLineParser &parser, + CEnableForFramelessWindow::WindowMode &windowMode, + GuiModes::CoreMode &coreMode, + QString &dBusAddress, + QString &errorMessage) +{ + parser.setSingleDashWordOptionMode(QCommandLineParser::ParseAsLongOptions); + + // value core mode + QCommandLineOption modeOption(QStringList() << "c" << "core", + QCoreApplication::translate("main", "Core mode: (e)xternal, (g)ui (in GUI process), (l)ocalaudio (external, but local audio)."), + "coremode"); + parser.addOption(modeOption); + + // value DBus address + QCommandLineOption dBusOption(QStringList() << "dbus" << "dbus-address", + QCoreApplication::translate("main", "DBUS address."), + "dbusaddress"); + parser.addOption(dBusOption); + + // Window type + QCommandLineOption windowOption(QStringList() << "w" << "window", + QCoreApplication::translate("main", "Windows: (n)ormal, (f)rameless, (t)ool."), + "windowtype"); + parser.addOption(windowOption); + + // help/version + QCommandLineOption helpOption = parser.addHelpOption(); + QCommandLineOption versionOption = parser.addVersionOption(); + + // evaluate + if (!parser.parse(QCoreApplication::arguments())) + { + errorMessage = parser.errorText(); + return CommandLineError; + } + + if (parser.isSet(helpOption)) { return CommandLineHelpRequested; } + if (parser.isSet(versionOption)) { return CommandLineVersionRequested; } + + if (parser.isSet(dBusOption)) + { + QString v(parser.value(dBusOption).trimmed()); + dBusAddress = CDBusServer::fixAddressToDBusAddress(v); + } + + if (parser.isSet(windowOption)) + { + QString v(parser.value(windowOption).trimmed()); + windowMode = CEnableForFramelessWindow::stringToWindowMode(v); + } + + if (parser.isSet(modeOption)) + { + QString v(parser.value(modeOption)); + coreMode = GuiModes::stringToCoreMode(v); + } + + return CommandLineOk; +} + +int main(int argc, char *argv[]) +{ + QApplication a(argc, argv); + const QString appName("swift pilot client GUI"); + a.setApplicationVersion(CProject::swiftVersionString()); + a.setApplicationName(appName); + + // Process the actual command line arguments given by the user + QCommandLineParser parser; + parser.setApplicationDescription(appName); + + CEnableForFramelessWindow::WindowMode windowMode = CEnableForFramelessWindow::WindowNormal; + GuiModes::CoreMode coreMode = GuiModes::CoreInGuiProcess; + QString dBusAddress, errorMessage; + switch (parseCommandLine(parser, windowMode, coreMode, dBusAddress, errorMessage)) + { + case CommandLineOk: + break; + case CommandLineError: + CGuiUtility::commandLineErrorMessage(errorMessage, parser); + return 1; + case CommandLineVersionRequested: + CGuiUtility::commandLineVersionRequested(); + return 0; + case CommandLineHelpRequested: + CGuiUtility::commandLineHelpRequested(parser); + return 0; + } + + BlackCore::CRuntimeConfig runtimeConfig; + switch (coreMode) + { + case GuiModes::CoreExternal: + runtimeConfig = CRuntimeConfig::remote(dBusAddress); + break; + case GuiModes::CoreInGuiProcess: + runtimeConfig = CRuntimeConfig::local(dBusAddress); + break; + case GuiModes::CoreExternalAudioLocal: + runtimeConfig = CRuntimeConfig::remoteLocalAudio(dBusAddress); + break; + } + + // show window + CGuiUtility::initSwiftGuiApplication(a, appName, CIcons::swift24()); + SwiftGuiStd w(windowMode); + w.init(runtimeConfig); // object is complete by now + w.show(); + + int r = a.exec(); + return r; +} diff --git a/src/swiftgui_standard/swift.ico b/src/swiftguistandard/swift.ico similarity index 100% rename from src/swiftgui_standard/swift.ico rename to src/swiftguistandard/swift.ico diff --git a/src/swiftgui_standard/swift.rc b/src/swiftguistandard/swift.rc similarity index 100% rename from src/swiftgui_standard/swift.rc rename to src/swiftguistandard/swift.rc diff --git a/src/swiftgui_standard/swiftgui_standard.pro b/src/swiftguistandard/swiftguistandard.pro similarity index 97% rename from src/swiftgui_standard/swiftgui_standard.pro rename to src/swiftguistandard/swiftguistandard.pro index fd1692f09..3aa8a5709 100644 --- a/src/swiftgui_standard/swiftgui_standard.pro +++ b/src/swiftguistandard/swiftguistandard.pro @@ -4,7 +4,7 @@ QT += core dbus gui svg network xml multimedia greaterThan(QT_MAJOR_VERSION, 4): QT += widgets -TARGET = swiftgui_std +TARGET = swiftguistd TEMPLATE = app SOURCES += *.cpp diff --git a/src/swiftgui_standard/swiftguistd.cpp b/src/swiftguistandard/swiftguistd.cpp similarity index 100% rename from src/swiftgui_standard/swiftguistd.cpp rename to src/swiftguistandard/swiftguistd.cpp diff --git a/src/swiftgui_standard/swiftguistd.h b/src/swiftguistandard/swiftguistd.h similarity index 100% rename from src/swiftgui_standard/swiftguistd.h rename to src/swiftguistandard/swiftguistd.h diff --git a/src/swiftgui_standard/swiftguistd.ui b/src/swiftguistandard/swiftguistd.ui similarity index 100% rename from src/swiftgui_standard/swiftguistd.ui rename to src/swiftguistandard/swiftguistd.ui diff --git a/src/swiftgui_standard/swiftguistd_aircraft.cpp b/src/swiftguistandard/swiftguistd_aircraft.cpp similarity index 100% rename from src/swiftgui_standard/swiftguistd_aircraft.cpp rename to src/swiftguistandard/swiftguistd_aircraft.cpp diff --git a/src/swiftgui_standard/swiftguistd_init.cpp b/src/swiftguistandard/swiftguistd_init.cpp similarity index 100% rename from src/swiftgui_standard/swiftguistd_init.cpp rename to src/swiftguistandard/swiftguistd_init.cpp diff --git a/src/swiftgui_standard/swiftguistd_menus.cpp b/src/swiftguistandard/swiftguistd_menus.cpp similarity index 100% rename from src/swiftgui_standard/swiftguistd_menus.cpp rename to src/swiftguistandard/swiftguistd_menus.cpp diff --git a/src/swiftgui_standard/introwindow.cpp b/src/swiftlauncher/introwindow.cpp similarity index 100% rename from src/swiftgui_standard/introwindow.cpp rename to src/swiftlauncher/introwindow.cpp diff --git a/src/swiftgui_standard/introwindow.h b/src/swiftlauncher/introwindow.h similarity index 96% rename from src/swiftgui_standard/introwindow.h rename to src/swiftlauncher/introwindow.h index e9125d5ea..48d3fd0f3 100644 --- a/src/swiftgui_standard/introwindow.h +++ b/src/swiftlauncher/introwindow.h @@ -12,7 +12,7 @@ #ifndef STDGUI_INTROWINDOW_H #define STDGUI_INTROWINDOW_H -#include "guimodeenums.h" +#include "swiftguistandard/guimodeenums.h" #include "blackgui/enableforframelesswindow.h" #include #include diff --git a/src/swiftgui_standard/introwindow.ui b/src/swiftlauncher/introwindow.ui similarity index 100% rename from src/swiftgui_standard/introwindow.ui rename to src/swiftlauncher/introwindow.ui diff --git a/src/swiftlauncher/main.cpp b/src/swiftlauncher/main.cpp new file mode 100644 index 000000000..c6c0bf888 --- /dev/null +++ b/src/swiftlauncher/main.cpp @@ -0,0 +1,54 @@ +/* Copyright (C) 2013 + * swift project Community / Contributors + * + * This file is part of swift project. It is subject to the license terms in the LICENSE file found in the top-level + * directory of this distribution and at http://www.swift-project.org/license.html. No part of swift project, + * including this file, may be copied, modified, propagated, or distributed except according to the terms + * contained in the LICENSE file. + */ + +#include "swiftguistandard/guimodeenums.h" +#include "introwindow.h" +#include "blackcore/blackcorefreefunctions.h" +#include "blackgui/guiutility.h" +#include "blackmisc/blackmiscfreefunctions.h" +#include "blackmisc/logmessage.h" +#include "blackmisc/icons.h" +#include "blackmisc/project.h" + +#include +#include +#include +#include +#include +#include + +using namespace BlackGui; +using namespace BlackMisc; +using namespace BlackCore; + +int main(int argc, char *argv[]) +{ + QApplication a(argc, argv); + CGuiUtility::initSwiftGuiApplication(a, "swiftgui", CIcons::swift24()); + + // Dialog to decide external or internal core + CIntroWindow intro; + intro.setWindowIcon(CIcons::swift24()); + if (intro.exec() == QDialog::Rejected) { return 0; } + + GuiModes::CoreMode coreMode = intro.getCoreMode(); + CEnableForFramelessWindow::WindowMode windowMode = intro.getWindowMode(); + QString dBusAddress(intro.getDBusAddress()); + intro.close(); + + QString args(" --core %1 --dbus %2 --window %3"); + QString exe = QDir::currentPath() + "/swiftguistd.exe" + + args.arg(GuiModes::coreModeToString(coreMode)).arg(dBusAddress).arg(CEnableForFramelessWindow::windowModeToString(windowMode)); + QProcess *process = new QProcess(QCoreApplication::instance()); + Q_ASSERT_X(process, Q_FUNC_INFO, "Cannot start process"); + Q_UNUSED(process); + process->startDetached(exe); + + return 0; +} diff --git a/src/swiftlauncher/swift.ico b/src/swiftlauncher/swift.ico new file mode 100644 index 0000000000000000000000000000000000000000..250d7b0a339f51f556505dbc36c082daab85a860 GIT binary patch literal 9854 zcmdT~dvH|M8Q)}+z59Oe-Fx?W_r2NoW;e-hvSjlB0wFvS9)T1QK_G~&paet$Bq&4z zg1k|LK|9*oPG_{X|Fsrt|4^Aa)z+EL)NyF1op!W#=uk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!vzJS*>_!U2Hh$`TS7)SUzL>LgTFaNlJ7xVoBUUv2gcttacQ~|G1 zeR*E)nz(>NVv&=tkBAC5Bob+aevyc}0ZaJ$kVq}&5hCXs0$!o63V2OCEZ|Vd$S4Zy w^9+SLM0*O@H;NZW+b@pRFBdUi7-_WmFJ^vwnE(I) literal 0 HcmV?d00001 diff --git a/src/swiftlauncher/swift.rc b/src/swiftlauncher/swift.rc new file mode 100644 index 000000000..b687e9a01 --- /dev/null +++ b/src/swiftlauncher/swift.rc @@ -0,0 +1 @@ +IDI_ICON1 ICON DISCARDABLE "swift.ico" diff --git a/src/swiftlauncher/swiftlauncher.pro b/src/swiftlauncher/swiftlauncher.pro new file mode 100644 index 000000000..3062893da --- /dev/null +++ b/src/swiftlauncher/swiftlauncher.pro @@ -0,0 +1,37 @@ +load(common_pre) + +QT += core dbus gui svg network xml multimedia + +greaterThan(QT_MAJOR_VERSION, 4): QT += widgets + +TARGET = swiftlauncher +TEMPLATE = app + +SOURCES += *.cpp +HEADERS += *.h +FORMS += *.ui +CONFIG += blackmisc blacksound blackinput blackcore blackgui + +macx { + CONFIG += app_bundle + + deployment.files = ../blackgui/qss + deployment.path = Contents/MacOS + QMAKE_BUNDLE_DATA += deployment +} + +DEPENDPATH += . $$SourceRoot/src/blackmisc \ + $$SourceRoot/src/blacksound \ + $$SourceRoot/src/blackcore \ + $$SourceRoot/src/blackgui \ + $$SourceRoot/src/blackinput + +INCLUDEPATH += . $$SourceRoot/src + +OTHER_FILES += *.qss *.ico *.rc +RC_FILE = swift.rc +DISTFILES += swift.rc + +DESTDIR = $$DestRoot/bin + +load(common_post) diff --git a/swift.pro b/swift.pro index f3f3756cb..956b61882 100644 --- a/swift.pro +++ b/swift.pro @@ -4,7 +4,9 @@ TEMPLATE = subdirs CONFIG += ordered SUBDIRS += src/blackmisc -SUBDIRS += resources/swift_resources.pro +SUBDIRS += resources/swiftresources.pro +OTHER_FILES += mkspecs/features/*.prf +OTHER_FILES += mkspecs/features/*.pri contains(BLACK_CONFIG, BlackSound) { SUBDIRS += src/blacksound @@ -19,7 +21,7 @@ contains(BLACK_CONFIG, BlackCore) { contains(BLACK_CONFIG, BlackGui) { SUBDIRS += src/blackgui contains(BLACK_CONFIG, SwiftGui) { - SUBDIRS += src/swiftgui_standard/swiftgui_standard.pro + SUBDIRS += src/swiftguistandard/swiftguistandard.pro } contains(BLACK_CONFIG, SwiftCore) { SUBDIRS += src/swiftcore/swiftcore.pro @@ -27,6 +29,9 @@ contains(BLACK_CONFIG, BlackCore) { contains(BLACK_CONFIG, SwiftData) { SUBDIRS += src/swiftdata/swiftdata.pro } + contains(BLACK_CONFIG, SwiftLauncher) { + SUBDIRS += src/swiftlauncher/swiftlauncher.pro + } } }