From a49ed5c33c01d4964523eafb790284fcebc0563d Mon Sep 17 00:00:00 2001 From: TheBloke Date: Mon, 7 Jul 2014 21:51:35 +0100 Subject: organizer.pro - tiny tweak to Qt5 version check Directly checking QT_MAJOR_VERSION instead of pattern matching on QT_VERSION --- src/organizer.pro | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/organizer.pro') diff --git a/src/organizer.pro b/src/organizer.pro index de0f70af..bed1ca47 100644 --- a/src/organizer.pro +++ b/src/organizer.pro @@ -5,7 +5,7 @@ #------------------------------------------------- -contains(QT_VERSION, "^5.*") { +equals(QT_MAJOR_VERSION, 5) { QT += core gui widgets network xml sql xmlpatterns qml quick script webkit } else { QT += core gui network xml declarative script sql xmlpatterns webkit -- cgit v1.3.1 From 2b5748003d2ae4de1b897041f92df3e0495b2825 Mon Sep 17 00:00:00 2001 From: TheBloke Date: Mon, 7 Jul 2014 23:32:18 +0100 Subject: .pro files - formatting/consistency fixes Many small formatting changes to the majority of .pro files Consistent style for Qt version checking, using greaterThan(QT_MAJOR_VERSION, 4) This seems safest, as would continue to work for a future Qt 6 etc. Note that this makes redudundant the commit before this one, to organizer.pro Consistent indenting Moved some file configuration sections to be together with related sections Moved some installation-related sections (e.g. OUTDIR/DSTDIR) to be at the bottom, immediately before the related POST_LINK install lines. Similarly, in some cases separated out CONFIG(debug,.. checks into separate LIB/INCLUDE sections (high in file) and installation directory sections (low in file) --- src/organizer.pro | 100 ++++++++++++++++++++++++++------------------------ src/shared/shared.pro | 4 +- 2 files changed, 54 insertions(+), 50 deletions(-) (limited to 'src/organizer.pro') diff --git a/src/organizer.pro b/src/organizer.pro index bed1ca47..5be205b4 100644 --- a/src/organizer.pro +++ b/src/organizer.pro @@ -5,15 +5,15 @@ #------------------------------------------------- -equals(QT_MAJOR_VERSION, 5) { +TARGET = ModOrganizer +TEMPLATE = app + +greaterThan(QT_MAJOR_VERSION, 4) { QT += core gui widgets network xml sql xmlpatterns qml quick script webkit } else { QT += core gui network xml declarative script sql xmlpatterns webkit } -TARGET = ModOrganizer -TEMPLATE = app - SOURCES += \ transfersavesdialog.cpp \ syncoverwritedialog.cpp \ @@ -202,24 +202,60 @@ FORMS += \ browserdialog.ui \ aboutdialog.ui +RESOURCES += \ + resources.qrc \ + stylesheet_resource.qrc + +RC_FILE += \ + app_icon.rc + +OTHER_FILES += \ + version.rc \ + tutorials/firststeps.qml \ + tutorials/tutorials.js \ + tutorials/tutorial_firststeps_main.js \ + tutorials/tutorials_settingsdialog.qml \ + tutorials/tutorials_mainwindow.qml \ + tutorials/Highlight.qml \ + tutorials/TutorialDescription.qml \ + tutorials/TutorialOverlay.qml \ + tutorials/tutorials_nexusdialog.qml \ + tutorials/tutorials_modinfodialog.qml \ + tutorials/tutorial_firststeps_modinfo.js \ + tutorials/tutorial_conflictresolution_main.js \ + tutorials/tutorial_conflictresolution_modinfo.js \ + app_icon.rc \ + dark.qss \ + stylesheets/dark.qss \ + tutorials/tutorial_window_installer.js \ + tutorials/tutorials_installdialog.qml \ + tutorials/tutorial_firststeps_settings.js + + +# leak detection with vld +#INCLUDEPATH += "E:/Visual Leak Detector/include" +#LIBS += -L"E:/Visual Leak Detector/lib/Win32" +#DEFINES += LEAK_CHECK_WITH_VLD + +#SOURCES += modeltest.cpp +#HEADERS += modeltest.h +#DEFINES += TEST_MODELS + + INCLUDEPATH += ../shared ../archive ../uibase ../bsatk ../esptk ../boss_modified/boss-api "$(BOOSTPATH)" LIBS += -L"$(BOOSTPATH)/stage/lib" CONFIG(debug, debug|release) { - OUTDIR = $$OUT_PWD/debug - DSTDIR = $$PWD/../../outputd LIBS += -L$$OUT_PWD/../shared/debug LIBS += -L$$OUT_PWD/../bsatk/debug LIBS += -L$$OUT_PWD/../uibase/debug LIBS += -L$$OUT_PWD/../boss_modified/debug LIBS += -lDbgHelp } else { - OUTDIR = $$OUT_PWD/release - DSTDIR = $$PWD/../../output LIBS += -L$$OUT_PWD/../shared/release LIBS += -L$$OUT_PWD/../bsatk/release - LIBS += -L$$OUT_PWD/../uibase/release + LIBS += -L$$OUT_PWD/../uibase/release LIBS += -L$$OUT_PWD/../boss_modified/release QMAKE_CXXFLAGS += /Zi /GL # QMAKE_CXXFLAGS -= -O2 @@ -275,6 +311,13 @@ DEFINES += BOOST_DISABLE_ASSERTS NDEBUG HGID = $$system(hg id -i) DEFINES += HGID=\\\"$${HGID}\\\" +CONFIG(debug, debug|release) { + OUTDIR = $$OUT_PWD/debug + DSTDIR = $$PWD/../../outputd +} else { + OUTDIR = $$OUT_PWD/release + DSTDIR = $$PWD/../../output +} SRCDIR = $$PWD SRCDIR ~= s,/,$$QMAKE_DIR_SEP,g @@ -294,42 +337,3 @@ CONFIG(debug, debug|release) { } else { QMAKE_POST_LINK += xcopy /y /s /I $$quote($$SRCDIR\\..\\dlls.*manifest) $$quote($$DSTDIR)\\dlls $$escape_expand(\\n) } - -RESOURCES += \ - resources.qrc \ - stylesheet_resource.qrc - -RC_FILE += \ - app_icon.rc - -OTHER_FILES += \ - version.rc \ - tutorials/firststeps.qml \ - tutorials/tutorials.js \ - tutorials/tutorial_firststeps_main.js \ - tutorials/tutorials_settingsdialog.qml \ - tutorials/tutorials_mainwindow.qml \ - tutorials/Highlight.qml \ - tutorials/TutorialDescription.qml \ - tutorials/TutorialOverlay.qml \ - tutorials/tutorials_nexusdialog.qml \ - tutorials/tutorials_modinfodialog.qml \ - tutorials/tutorial_firststeps_modinfo.js \ - tutorials/tutorial_conflictresolution_main.js \ - tutorials/tutorial_conflictresolution_modinfo.js \ - app_icon.rc \ - dark.qss \ - stylesheets/dark.qss \ - tutorials/tutorial_window_installer.js \ - tutorials/tutorials_installdialog.qml \ - tutorials/tutorial_firststeps_settings.js - - -# leak detection with vld -#INCLUDEPATH += "E:/Visual Leak Detector/include" -#LIBS += -L"E:/Visual Leak Detector/lib/Win32" -#DEFINES += LEAK_CHECK_WITH_VLD - -#SOURCES += modeltest.cpp -#HEADERS += modeltest.h -#DEFINES += TEST_MODELS diff --git a/src/shared/shared.pro b/src/shared/shared.pro index 992fd7f2..5f327fa3 100644 --- a/src/shared/shared.pro +++ b/src/shared/shared.pro @@ -21,11 +21,11 @@ INCLUDEPATH += ../bsatk "$(BOOSTPATH)" CONFIG(debug, debug|release) { LIBS += -L$$OUT_PWD/../bsatk/debug - LIBS += -lDbgHelp + LIBS += -lDbgHelp QMAKE_CXXFLAGS_DEBUG -= -Zi QMAKE_CXXFLAGS += -Z7 } else { - LIBS += -L$$OUT_PWD/../bsatk/release + LIBS += -L$$OUT_PWD/../bsatk/release } LIBS += -lbsatk -- cgit v1.3.1 From 0046d8710e895a158b7e49678eae1514c5b7dc88 Mon Sep 17 00:00:00 2001 From: TheBloke Date: Tue, 8 Jul 2014 04:01:24 +0100 Subject: Compilation dependency tracking enabled for organizer, hook, bsaExtractor, shared Previously, qmake did not detect when code was changed in the static libraries So for example, changing code in shared/*.cpp and then Build, would not cause a re-link and re-deploy of ModOrganizer.exe. This has been fixed by adding PRE_TARGETDEPS references to each project that depend on static libraries provided by other sub-projects. These checks are conditional on debug|release, to point to the correct lib. List of currently configured static library dependency checks - organizer - mo_shared.lib, bsatk.lib hookdll - mo_shared.lib, bsatk.lib shared - bsatk.lib bsaExtractor - bsatk.lib I have tested to confirm that changing a shared file results in re-linking and re-deplomyent of both ModOrganizer.exe and hook.dll. Note that dependencies have not been configured for DLLs, as these are loaded dynamically and so recompilation is not required. But there could be an argument for configuring DLLs as dependencies too - as if you make a change in DLL code, you might want all clients of the DLL to be recompiled to check that they have not been broken by the changes? The downside of that would be extra re-compilation every time. --- src/organizer.pro | 4 ++++ src/shared/shared.pro | 2 ++ 2 files changed, 6 insertions(+) (limited to 'src/organizer.pro') diff --git a/src/organizer.pro b/src/organizer.pro index 5be205b4..e013aab7 100644 --- a/src/organizer.pro +++ b/src/organizer.pro @@ -252,6 +252,8 @@ CONFIG(debug, debug|release) { LIBS += -L$$OUT_PWD/../uibase/debug LIBS += -L$$OUT_PWD/../boss_modified/debug LIBS += -lDbgHelp + PRE_TARGETDEPS += $$OUT_PWD/../shared/debug/mo_shared.lib \ + $$OUT_PWD/../bsatk/debug/bsatk.lib } else { LIBS += -L$$OUT_PWD/../shared/release LIBS += -L$$OUT_PWD/../bsatk/release @@ -260,6 +262,8 @@ CONFIG(debug, debug|release) { QMAKE_CXXFLAGS += /Zi /GL # QMAKE_CXXFLAGS -= -O2 QMAKE_LFLAGS += /DEBUG /LTCG /OPT:REF /OPT:ICF + PRE_TARGETDEPS += $$OUT_PWD/../shared/release/mo_shared.lib \ + $$OUT_PWD/../bsatk/release/bsatk.lib } #QMAKE_CXXFLAGS_WARN_ON -= -W3 diff --git a/src/shared/shared.pro b/src/shared/shared.pro index 5f327fa3..c5925c24 100644 --- a/src/shared/shared.pro +++ b/src/shared/shared.pro @@ -24,8 +24,10 @@ CONFIG(debug, debug|release) { LIBS += -lDbgHelp QMAKE_CXXFLAGS_DEBUG -= -Zi QMAKE_CXXFLAGS += -Z7 + PRE_TARGETDEPS += $$OUT_PWD/../bsatk/debug/bsatk.lib } else { LIBS += -L$$OUT_PWD/../bsatk/release + PRE_TARGETDEPS += $$OUT_PWD/../bsatk/release/bsatk.lib } LIBS += -lbsatk -- cgit v1.3.1