From 7797e97e7dd8cdfe7ac667e7d3e3edb2253e7959 Mon Sep 17 00:00:00 2001 From: Konrad Rosenbaum Date: Sat, 20 Jul 2013 13:58:05 +0200 Subject: [PATCH] include auto updater --- mainapp/mainapp.pro | 5 ----- src/libs.pri | 13 +++++++++++++ src/main.cpp | 10 ++++++++++ src/main.h | 9 +++++++-- src/smoke.pro | 10 +--------- taurus | 2 +- 6 files changed, 32 insertions(+), 17 deletions(-) diff --git a/mainapp/mainapp.pro b/mainapp/mainapp.pro index 19b543d..f3a0d25 100644 --- a/mainapp/mainapp.pro +++ b/mainapp/mainapp.pro @@ -5,11 +5,6 @@ TEMPLATE = app TARGET = magicsmoke DESTDIR = $$PWD/../bin -#make sure the correct Qt DLLs are used -CONFIG += qt thread link_prl separate_debug_info -QT += xml network script scripttools -QT += widgets printsupport - #add the icon for windoze win32-* { #RC-File containing the icon: diff --git a/src/libs.pri b/src/libs.pri index e42e27a..a52b7ea 100644 --- a/src/libs.pri +++ b/src/libs.pri @@ -17,3 +17,16 @@ include($$PWD/../taurus/elam.pri) # Chester DPtr library include($$PWD/../taurus/chester.pri) +# Aurora Updater library +include($$PWD/../taurus/aurora.pri) + +#make sure the correct Qt DLLs are used +CONFIG += qt thread link_prl separate_debug_info +QT += xml network script scripttools +QT += widgets printsupport + +#activate C++11 for g++ +gcc { + message("detected GCC, activating C++11 with GNU extensions") + QMAKE_CXXFLAGS += -std=gnu++11 +} diff --git a/src/main.cpp b/src/main.cpp index a0556b0..da5d776 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -39,6 +39,7 @@ #include "msinterface.h" #include #include "misc.h" +#include QString choseLanguage(bool warn) { @@ -349,8 +350,17 @@ void MApplication::initialize() //init localization and profiles initLanguage(); initProfile(); + //init updater + initUpdater(); } +void MApplication::initUpdater() +{ + updater=new Aurora; + //TODO: read a local XML file to set Aurora +} + + QString MApplication::dataDir() { return ::dataDir; diff --git a/src/main.h b/src/main.h index b4c3db7..42d5ad7 100644 --- a/src/main.h +++ b/src/main.h @@ -27,6 +27,7 @@ QString choseLanguage(bool warn=true); class QMenu; class EFilter; +namespace AuroraUpdater{class Aurora;}; ///Main application object of MagicSmoke class MAGICSMOKE_EXPORT MApplication:public QApplication { @@ -71,9 +72,13 @@ class MAGICSMOKE_EXPORT MApplication:public QApplication ///jump to a specific help page void help(int); + ///initialize the updater + void initUpdater(); + private: - EFilter *ef; - QTranslator*qttrans,*mstrans; + EFilter *ef=nullptr; + QTranslator*qttrans=nullptr,*mstrans=nullptr; + AuroraUpdater::Aurora*updater=nullptr; }; ///return the instance of the MApplication diff --git a/src/smoke.pro b/src/smoke.pro index cc046b8..97d046f 100644 --- a/src/smoke.pro +++ b/src/smoke.pro @@ -13,9 +13,7 @@ TRANSLATIONS = \ smoke_en.ts #make sure the correct Qt DLLs are used -CONFIG += qt thread link_prl separate_debug_info hide_symbols -QT += xml network script scripttools -QT += widgets printsupport +CONFIG += hide_symbols #compilation output: OBJECTS_DIR = .ctmp @@ -51,9 +49,3 @@ include(wob/wob.pri) #make sure dependencies are found DEPENDPATH += $$INCLUDEPATH LIBS += -L$$PWD/../bin - -#activate C++11 for g++ -gcc { - message("detected GCC, activating C++11 with GNU extensions") - QMAKE_CXXFLAGS += -std=gnu++11 -} \ No newline at end of file diff --git a/taurus b/taurus index 31ca5bd..7e63283 160000 --- a/taurus +++ b/taurus @@ -1 +1 @@ -Subproject commit 31ca5bda9b24c3ae42d6b907ffadeb82c3436998 +Subproject commit 7e6328381dbf9b738dafb7647e21cfe0c146c131 -- 1.7.2.5