From 0be972510ada4b6fa7ab34df3dee2c9d61635182 Mon Sep 17 00:00:00 2001 From: Konrad Rosenbaum Date: Fri, 16 Aug 2013 20:02:27 +0200 Subject: [PATCH] various small changes to make windows' life a happier one --- mainapp/main.cpp | 4 ++-- mainapp/mainapp.pro | 1 + mainapp/win.rc | 1 + pack | 2 +- src/main.cpp | 4 +++- src/main.h | 2 +- src/smoke.pro | 3 ++- src/win.rc | 1 - taurus | 2 +- tzone | 2 +- 10 files changed, 13 insertions(+), 9 deletions(-) create mode 100644 mainapp/win.rc delete mode 100644 src/win.rc diff --git a/mainapp/main.cpp b/mainapp/main.cpp index e0642ac..6c02f95 100644 --- a/mainapp/main.cpp +++ b/mainapp/main.cpp @@ -1,6 +1,6 @@ -#include "main.h" +#include "../src/main.h" int main(int ac,char**av) { - return MApplication::main(ac,av); + return MApplication::realmain(ac,av); } \ No newline at end of file diff --git a/mainapp/mainapp.pro b/mainapp/mainapp.pro index 8edd67d..5e1ac0c 100644 --- a/mainapp/mainapp.pro +++ b/mainapp/mainapp.pro @@ -41,4 +41,5 @@ QMAKE_CXXFLAGS += -fstack-protector-all -Wstack-protector #ASLR for windows win32 { QMAKE_LFLAGS += -Wl,--nxcompat -Wl,--dynamicbase + LIBS += -lssp } diff --git a/mainapp/win.rc b/mainapp/win.rc new file mode 100644 index 0000000..1bc463a --- /dev/null +++ b/mainapp/win.rc @@ -0,0 +1 @@ +IDI_ICON1 ICON DISCARDABLE "icon.ico" diff --git a/pack b/pack index 3b929b9..de50ef2 160000 --- a/pack +++ b/pack @@ -1 +1 @@ -Subproject commit 3b929b9cf42e562a7e5e2ea2208086c81bfc52cc +Subproject commit de50ef2ddfebf8bf0dc96540d03c51de0213d2a8 diff --git a/src/main.cpp b/src/main.cpp index dac4ea4..25e5e13 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -333,9 +333,11 @@ void MApplication::initLanguage() //defaults if(lang!="--"&&lang!=""){ QLocale::setDefault(lang); +#ifndef Q_OS_WIN setenv("LANG",lang.toLatin1().data(),1); }else{ setenv("LANG","C",1); +#endif } } @@ -407,7 +409,7 @@ void MApplication::initProfile() -int MApplication::main(int argc,char**argv) +int MApplication::realmain(int argc,char**argv) { //create global app MApplication app(argc,argv); diff --git a/src/main.h b/src/main.h index 98e2556..c936f98 100644 --- a/src/main.h +++ b/src/main.h @@ -40,7 +40,7 @@ class MAGICSMOKE_EXPORT MApplication:public QApplication static QMenu*helpMenu(); ///shortcut: the main function - static int main(int,char**); + static int realmain(int,char**); /**contains the directory that is used for external data storage*/ static QString dataDir(); diff --git a/src/smoke.pro b/src/smoke.pro index b9ca79d..709ab4f 100644 --- a/src/smoke.pro +++ b/src/smoke.pro @@ -4,7 +4,7 @@ TEMPLATE = lib TARGET = magicsmoke DESTDIR = $$PWD/../bin -VERSION = 2.0 +VERSION = #Localization TRANSLATIONS = \ @@ -55,4 +55,5 @@ QMAKE_CFLAGS += -fstack-protector-all -Wstack-protector QMAKE_CXXFLAGS += -fstack-protector-all -Wstack-protector win32 { QMAKE_LFLAGS += -Wl,--nxcompat + LIBS += -lssp } diff --git a/src/win.rc b/src/win.rc deleted file mode 100644 index 5b80ef0..0000000 --- a/src/win.rc +++ /dev/null @@ -1 +0,0 @@ -IDI_ICON1 ICON DISCARDABLE "images\icon.ico" diff --git a/taurus b/taurus index 98700f9..fd3d7c9 160000 --- a/taurus +++ b/taurus @@ -1 +1 @@ -Subproject commit 98700f93f1c6bb32761da38b7d5b8d2a71da91ef +Subproject commit fd3d7c98a650d5f02a9bea004871bed226fe921e diff --git a/tzone b/tzone index 42d981f..3f625dc 160000 --- a/tzone +++ b/tzone @@ -1 +1 @@ -Subproject commit 42d981fa8802b1bfb180a37044feae1e1e218075 +Subproject commit 3f625dcc61f5c76b847773a56b1ea5f363013481 -- 1.7.2.5