summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKai Koehne <kai.koehne@theqtcompany.com>2015-03-06 15:09:59 +0100
committerKai Koehne <kai.koehne@theqtcompany.com>2015-03-11 11:09:27 +0000
commit4aacfb8e11f5862797757d14f34964a05e2d9b1f (patch)
treee0be259c7fbd24423da3ae71630225691e40f2b5
parent4b2727c742ff37af82c131e4e4d94045d40ac55a (diff)
Fix embedding of installbase manifest
Redefining QMAKE_MANIFEST is currently broken in Qt for newer compilers: The content is not embedded at all if the toolchain supports "embedding". But the hack is not needed anyway: Just disable the Qt manifest magic, and include our custom manifest file via .rc. This way we can also avoid changing the mkspec for embed_manifest_exe, embed_manifest_dll. Change-Id: I5155ddabe17f0b61b2d7b9c5b9cd912ad6c53dfe Reviewed-by: Karsten Heimrich <karsten.heimrich@theqtcompany.com>
-rw-r--r--INSTALL24
-rw-r--r--doc/installerfw-getting-started.qdoc13
-rw-r--r--src/sdk/installerbase_qt5.rc2
-rw-r--r--src/sdk/sdk.pro6
4 files changed, 15 insertions, 30 deletions
diff --git a/INSTALL b/INSTALL
index f99d79a8b..ed72a245e 100644
--- a/INSTALL
+++ b/INSTALL
@@ -24,34 +24,24 @@ See the Qt documentation for the prerequisites and steps to build Qt from source
### Windows
Adjust the qmake.conf to have a real stand alone working installer:
-
-- remove 'embed_manifest_dll embed_manifest_exe' from CONFIG line
-- replace -MD, -MDd with -MT, -MTD in the CFLAGS lines
+Replace -MD, -MDd with -MT, -MTD in the CFLAGS lines
'git diff' should show you something like:
--- a/mkspecs/win32-msvc20XX/qmake.conf
+++ b/mkspecs/win32-msvc20XX/qmake.conf
-
- MAKEFILE_GENERATOR = MSVC.NET
- TEMPLATE = app
--CONFIG += qt warn_on release incremental flat link_prl precompile_header autogen_precompile_source copy_dir_files debug_and_release debug_and_release_target embed_manifest_dll embed_manifest_exe
-+CONFIG += qt warn_on release incremental flat link_prl precompile_header autogen_precompile_source copy_dir_files debug_and_release debug_and_release_target
- QT += core gui
- DEFINES += UNICODE WIN32 QT_LARGEFILE_SUPPORT
- QMAKE_COMPILER_DEFINES += _MSC_VER=1400 WIN32
- QMAKE_YACCFLAGS = -d
- QMAKE_CFLAGS = -nologo -Zm200 -Zc:wchar_t-
+ QMAKE_CFLAGS = -nologo -Zm200 -Zc:wchar_t -FS
QMAKE_CFLAGS_WARN_ON = -W3
QMAKE_CFLAGS_WARN_OFF = -W0
--QMAKE_CFLAGS_RELEASE = -O2 -MD
--QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO += -O2 -MD -Zi
+-QMAKE_CFLAGS_RELEASE = -O2 -MD -Zc:strictStrings
+-QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO += -O2 -MD -Zi -Zc:strictStrings
-QMAKE_CFLAGS_DEBUG = -Zi -MDd
-+QMAKE_CFLAGS_RELEASE = -O2 -MT
-+QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO += -O2 -MT -Zi
++QMAKE_CFLAGS_RELEASE = -O2 -MT -Zc:strictStrings
++QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO += -O2 -MT -Zi -Zc:strictStrings
+QMAKE_CFLAGS_DEBUG = -Zi -MTd
QMAKE_CFLAGS_YACC =
QMAKE_CFLAGS_LTCG = -GL
+ QMAKE_CFLAGS_MP = -MP
Recommended configuration options for Microsoft Windows:
diff --git a/doc/installerfw-getting-started.qdoc b/doc/installerfw-getting-started.qdoc
index 29e0dbac8..ba1ec08a2 100644
--- a/doc/installerfw-getting-started.qdoc
+++ b/doc/installerfw-getting-started.qdoc
@@ -68,16 +68,13 @@
runtime library. This can be done by changing the default mkspec of
your compiler.
- If you are using e.g. the Microsoft Visual Studio 2010 compiler, you edit
- \c{mkspecs\win32-msvc2010\qmake.conf} and replace in the CFLAGS sections
- '-MD' with '-MT'. Furthermore you should remove 'embed_manifest_dll'
- and 'embed_manifest_exe' from CONFIG:
+ If you are using e.g. the Microsoft Visual Studio 2013 compiler, you edit
+ \c{mkspecs\win32-msvc2013\qmake.conf} and replace in the CFLAGS sections
+ '-MD' with '-MT':
\code
- CONFIG += qt warn_on release incremental flat link_prl precompile_header autogen_precompile_source copy_dir_files debug_and_release debug_and_release_target
- # ..
- QMAKE_CFLAGS_RELEASE = -O2 -MT
- QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO += -O2 -MT -Zi
+ QMAKE_CFLAGS_RELEASE = -O2 -MT -Zc:strictStrings
+ QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO += -O2 -MT -Zi -Zc:strictStrings
QMAKE_CFLAGS_DEBUG = -Zi -MTd
\endcode
diff --git a/src/sdk/installerbase_qt5.rc b/src/sdk/installerbase_qt5.rc
deleted file mode 100644
index 25544aba7..000000000
--- a/src/sdk/installerbase_qt5.rc
+++ /dev/null
@@ -1,2 +0,0 @@
-IDI_ICON1 ICON DISCARDABLE
-"installerbase.ico"
diff --git a/src/sdk/sdk.pro b/src/sdk/sdk.pro
index a3c973a2c..8e78b121a 100644
--- a/src/sdk/sdk.pro
+++ b/src/sdk/sdk.pro
@@ -134,9 +134,9 @@ SOURCES = \
commandlineparser.cpp
win32 {
- # Force to overwrite the default manifest file with our own extended version.
- RC_FILE = installerbase_qt5.rc
- QMAKE_MANIFEST = installerbase.manifest
+ # Use our own manifest file
+ CONFIG -= embed_manifest_exe
+ RC_FILE = installerbase.rc
SOURCES += console_win.cpp
}