From 9d3b169bda1a48c6eee0820b6a2fd50d6dd6a023 Mon Sep 17 00:00:00 2001 From: Andrew Knight Date: Wed, 21 May 2014 16:42:31 +0300 Subject: Add build support for Windows Phone 8.1 Tweak qmake, add mkspecs for emulator and device, adjust the manifest template for WP8.1, and add missing icons. Change-Id: I7a6405fa85297ae4cc8522015274e65fb7a315a6 Reviewed-by: Oliver Wolff --- .../common/winrt_winphone/assets/logo_44x44.png | Bin 0 -> 1066 bytes .../common/winrt_winphone/assets/logo_480x800.png | Bin 0 -> 6820 bytes .../common/winrt_winphone/assets/logo_71x71.png | Bin 0 -> 1060 bytes .../manifests/8.1_wp/AppxManifest.xml.in | 45 +++++++++++++++++++++ mkspecs/features/winrt/package_manifest.prf | 30 +++++++------- mkspecs/winphone-arm-msvc2013/qmake.conf | 23 +++++++++++ mkspecs/winphone-arm-msvc2013/qplatformdefs.h | 42 +++++++++++++++++++ mkspecs/winphone-x86-msvc2013/qmake.conf | 23 +++++++++++ mkspecs/winphone-x86-msvc2013/qplatformdefs.h | 42 +++++++++++++++++++ qmake/generators/win32/msbuild_objectmodel.cpp | 20 ++++----- qmake/generators/win32/msvc_nmake.cpp | 24 +++++++---- qmake/generators/win32/msvc_objectmodel.cpp | 3 +- qmake/generators/win32/msvc_objectmodel.h | 4 +- qmake/generators/win32/msvc_vcproj.cpp | 5 ++- 14 files changed, 225 insertions(+), 36 deletions(-) create mode 100644 mkspecs/common/winrt_winphone/assets/logo_44x44.png create mode 100644 mkspecs/common/winrt_winphone/assets/logo_480x800.png create mode 100644 mkspecs/common/winrt_winphone/assets/logo_71x71.png create mode 100644 mkspecs/common/winrt_winphone/manifests/8.1_wp/AppxManifest.xml.in create mode 100644 mkspecs/winphone-arm-msvc2013/qmake.conf create mode 100644 mkspecs/winphone-arm-msvc2013/qplatformdefs.h create mode 100644 mkspecs/winphone-x86-msvc2013/qmake.conf create mode 100644 mkspecs/winphone-x86-msvc2013/qplatformdefs.h diff --git a/mkspecs/common/winrt_winphone/assets/logo_44x44.png b/mkspecs/common/winrt_winphone/assets/logo_44x44.png new file mode 100644 index 0000000000..3cc5bec19f Binary files /dev/null and b/mkspecs/common/winrt_winphone/assets/logo_44x44.png differ diff --git a/mkspecs/common/winrt_winphone/assets/logo_480x800.png b/mkspecs/common/winrt_winphone/assets/logo_480x800.png new file mode 100644 index 0000000000..39a37dac5b Binary files /dev/null and b/mkspecs/common/winrt_winphone/assets/logo_480x800.png differ diff --git a/mkspecs/common/winrt_winphone/assets/logo_71x71.png b/mkspecs/common/winrt_winphone/assets/logo_71x71.png new file mode 100644 index 0000000000..16d0808759 Binary files /dev/null and b/mkspecs/common/winrt_winphone/assets/logo_71x71.png differ diff --git a/mkspecs/common/winrt_winphone/manifests/8.1_wp/AppxManifest.xml.in b/mkspecs/common/winrt_winphone/manifests/8.1_wp/AppxManifest.xml.in new file mode 100644 index 0000000000..cf18a4dc79 --- /dev/null +++ b/mkspecs/common/winrt_winphone/manifests/8.1_wp/AppxManifest.xml.in @@ -0,0 +1,45 @@ + + + + + + $${WINRT_MANIFEST.name} + $${WINRT_MANIFEST.publisher} + $${WINRT_MANIFEST.logo_store} + + + 6.3.1 + 6.3.1 + + + + + + + + + + + + + + + + $${WINRT_MANIFEST.capabilities}$${WINRT_MANIFEST.dependencies} + + diff --git a/mkspecs/features/winrt/package_manifest.prf b/mkspecs/features/winrt/package_manifest.prf index 444b8b873e..85a6485535 100644 --- a/mkspecs/features/winrt/package_manifest.prf +++ b/mkspecs/features/winrt/package_manifest.prf @@ -14,10 +14,12 @@ # WINRT_MANIFEST.version: The version number of the package. Defaults to "1.0.0.0". # WINRT_MANIFEST.arguments: Allows arguments to be passed to the executable. # WINRT_MANIFEST.publisher: Display name of the publisher. Defaults to "Default publisher display name". -# WINRT_MANIFEST.publisher_id: On Windows 8/RT, the publisher's distinguished name (default: CN=MyCN). On Windows Phone, the publisher's UUID (default: invalid UUID string). +# WINRT_MANIFEST.publisher_id: On Windows 8/RT/Phone 8.1, the publisher's distinguished name (default: CN=MyCN). On Windows Phone 8.0, the publisher's UUID (default: invalid UUID string). +# WINRT_MANIFEST.phone_product_id): On Windows Phone 8.1, the GUID of the product. Defaults to the value of WINRT_MANIFEST.identity. +# WINRT_MANIFEST.phone_publisher_id: On Windows Phone 8.1, the GUID of the publiser. Defaults to an invalid GUID. # WINRT_MANIFEST.description: Package description. Defaults to "Default package description". -# WINRT_MANIFEST.author: Package author (Windows Phone only). Defaults to "Default package author". -# WINRT_MANIFEST.genre: Package genre (Windows Phone only). Defaults to "apps.normal". +# WINRT_MANIFEST.author: Package author (Windows Phone 8.0 only). Defaults to "Default package author". +# WINRT_MANIFEST.genre: Package genre (Windows Phone 8.0 only). Defaults to "apps.normal". # WINRT_MANIFEST.background: Tile background color. Defaults to "green". # WINRT_MANIFEST.foreground: Tile foreground (text) color (Windows 8/RT only). Defaults to "light". # WINRT_MANIFEST.logo_store: Logo image file for Windows Store. Default provided by the mkspec. @@ -49,7 +51,7 @@ BUILD_DIR = $$dirname(QMAKE_RESOLVED_TARGET) } - winphone: \ + winphone:equals(WINSDK_VER, 8.0): \ manifest_file.output = $$BUILD_DIR/WMAppManifest.xml else: contains(TEMPLATE, "vc.*"): \ manifest_file.output = $$BUILD_DIR/Package.appxmanifest @@ -77,16 +79,18 @@ write_file($$UUID_CACHE, WINRT_UUID)|error("Unable to write the UUID cache; aborting.") eval($$WINRT_UUID) } - winphone: WINRT_MANIFEST.identity = {$$WINRT_MANIFEST.identity} + winphone:equals(WINSDK_VER, 8.0): WINRT_MANIFEST.identity = {$$WINRT_MANIFEST.identity} } isEmpty(WINRT_MANIFEST.name): WINRT_MANIFEST.name = $$TARGET isEmpty(WINRT_MANIFEST.architecture): WINRT_MANIFEST.architecture = $$VCPROJ_ARCH isEmpty(WINRT_MANIFEST.version): WINRT_MANIFEST.version = 1.0.0.0 isEmpty(WINRT_MANIFEST.publisher): WINRT_MANIFEST.publisher = Default publisher display name isEmpty(WINRT_MANIFEST.publisherid) { - winphone: WINRT_MANIFEST.publisherid = {00000000-0000-0000-0000-000000000000} + winphone:equals(WINSDK_VER, 8.0): WINRT_MANIFEST.publisherid = {00000000-0000-0000-0000-000000000000} else: WINRT_MANIFEST.publisherid = CN=$$(USERNAME) } + isEmpty(WINRT_MANIFEST.phone_product_id): WINRT_MANIFEST.phone_product_id = $$WINRT_MANIFEST.identity + isEmpty(WINRT_MANIFEST.phone_publisher_id): WINRT_MANIFEST.phone_publisher_id = 00000000-0000-0000-0000-000000000000 isEmpty(WINRT_MANIFEST.description): WINRT_MANIFEST.description = Default package description isEmpty(WINRT_MANIFEST.author): WINRT_MANIFEST.author = Default package author isEmpty(WINRT_MANIFEST.genre): WINRT_MANIFEST.genre = apps.normal @@ -94,7 +98,7 @@ isEmpty(WINRT_MANIFEST.foreground): WINRT_MANIFEST.foreground = light isEmpty(WINRT_MANIFEST.default_language): WINRT_MANIFEST.default_language = en - winphone: INDENT = "$$escape_expand(\\r\\n) " + winphone:equals(WINSDK_VER, 8.0): INDENT = "$$escape_expand(\\r\\n) " else: INDENT = "$$escape_expand(\\r\\n) " # Languages are given as a string list @@ -142,16 +146,12 @@ ICONS_FOUND ~= s/.*\\\$\\\$\\{WINRT_MANIFEST\\.((logo|tile)_[^\}]+)\\}.*/\\1/g for (ICON_NAME, ICONS_FOUND) { ICON_FILE = $$eval(WINRT_MANIFEST.$$ICON_NAME) - isEmpty(ICON_FILE) { - icon_$${ICON_NAME}.input = $$WINRT_ASSETS_PATH/$${ICON_NAME}.png - icon_$${ICON_NAME}.output = $$BUILD_DIR/assets/$${ICON_NAME}.png - WINRT_MANIFEST.$${ICON_NAME} = assets/$${ICON_NAME}.png - } else { - icon_$${ICON_NAME}.input = $$ICON_FILE - icon_$${ICON_NAME}.output = $$BUILD_DIR/$$ICON_FILE - } + isEmpty(ICON_FILE): ICON_FILE = $$WINRT_ASSETS_PATH/$${ICON_NAME}.png + icon_$${ICON_NAME}.input = $$ICON_FILE + icon_$${ICON_NAME}.output = $$BUILD_DIR/assets/$$basename(ICON_FILE) icon_$${ICON_NAME}.CONFIG = verbatim QMAKE_SUBSTITUTES += icon_$${ICON_NAME} + WINRT_MANIFEST.$${ICON_NAME} = assets/$$basename(ICON_FILE) } QMAKE_SUBSTITUTES += manifest_file diff --git a/mkspecs/winphone-arm-msvc2013/qmake.conf b/mkspecs/winphone-arm-msvc2013/qmake.conf new file mode 100644 index 0000000000..e848d254d4 --- /dev/null +++ b/mkspecs/winphone-arm-msvc2013/qmake.conf @@ -0,0 +1,23 @@ +# +# qmake configuration for winphone-arm-msvc2013 +# +# Written for Microsoft Visual C++ 2013 +# + +include(../common/winrt_winphone/qmake.conf) +QMAKE_COMPILER_DEFINES += _MSC_VER=1800 +QMAKE_PLATFORM = winphone $$QMAKE_PLATFORM +DEFINES += WINAPI_FAMILY=WINAPI_FAMILY_PHONE_APP ARM __ARM__ __ARM__ + +QMAKE_CFLAGS += -FS +QMAKE_CXXFLAGS += -FS +QMAKE_LFLAGS += /MACHINE:ARM /NODEFAULTLIB:kernel32.lib + +QMAKE_LIBS += WindowsPhoneCore.lib PhoneAppModelHost.lib + +VCPROJ_ARCH = ARM +MSVC_VER = 12.0 +WINSDK_VER = 8.1 +WINTARGET_VER = WP81 +WINRT_MANIFEST = $$PWD/../common/winrt_winphone/manifests/8.1_wp/AppxManifest.xml.in +WINRT_MANIFEST.architecture = arm diff --git a/mkspecs/winphone-arm-msvc2013/qplatformdefs.h b/mkspecs/winphone-arm-msvc2013/qplatformdefs.h new file mode 100644 index 0000000000..59fb5871ab --- /dev/null +++ b/mkspecs/winphone-arm-msvc2013/qplatformdefs.h @@ -0,0 +1,42 @@ +/**************************************************************************** +** +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the qmake spec of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information +** use the contact form at http://qt.digia.com/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Digia gives you certain additional +** rights. These rights are described in the Digia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include "../common/winrt_winphone/qplatformdefs.h" diff --git a/mkspecs/winphone-x86-msvc2013/qmake.conf b/mkspecs/winphone-x86-msvc2013/qmake.conf new file mode 100644 index 0000000000..18d8402822 --- /dev/null +++ b/mkspecs/winphone-x86-msvc2013/qmake.conf @@ -0,0 +1,23 @@ +# +# qmake configuration for winphone-x86-msvc2013 +# +# Written for Microsoft Visual C++ 2013 +# + +include(../common/winrt_winphone/qmake.conf) +QMAKE_COMPILER_DEFINES += _MSC_VER=1800 +QMAKE_PLATFORM = winphone $$QMAKE_PLATFORM +DEFINES += WINAPI_FAMILY=WINAPI_FAMILY_PHONE_APP X86 __X86__ __x86__ + +QMAKE_CFLAGS += -FS +QMAKE_CXXFLAGS += -FS +QMAKE_LFLAGS += /MACHINE:X86 /NODEFAULTLIB:kernel32.lib + +QMAKE_LIBS += WindowsPhoneCore.lib PhoneAppModelHost.lib + +VCPROJ_ARCH = Win32 +MSVC_VER = 12.0 +WINSDK_VER = 8.1 +WINTARGET_VER = WP81 +WINRT_MANIFEST = $$PWD/../common/winrt_winphone/manifests/8.1_wp/AppxManifest.xml.in +WINRT_MANIFEST.architecture = x86 diff --git a/mkspecs/winphone-x86-msvc2013/qplatformdefs.h b/mkspecs/winphone-x86-msvc2013/qplatformdefs.h new file mode 100644 index 0000000000..59fb5871ab --- /dev/null +++ b/mkspecs/winphone-x86-msvc2013/qplatformdefs.h @@ -0,0 +1,42 @@ +/**************************************************************************** +** +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the qmake spec of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information +** use the contact form at http://qt.digia.com/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Digia gives you certain additional +** rights. These rights are described in the Digia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include "../common/winrt_winphone/qplatformdefs.h" diff --git a/qmake/generators/win32/msbuild_objectmodel.cpp b/qmake/generators/win32/msbuild_objectmodel.cpp index feef587ee6..5fdfc52dba 100644 --- a/qmake/generators/win32/msbuild_objectmodel.cpp +++ b/qmake/generators/win32/msbuild_objectmodel.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of the qmake application of the Qt Toolkit. @@ -615,7 +615,8 @@ void VCXProjectWriter::write(XmlOutput &xml, VCProject &tool) << attrTag("Label", "ProjectConfigurations"); bool isWinRT = false; - bool isPhone = false; + bool isWinPhone = false; + bool isWinPhone80 = false; // ### Windows Phone 8.0, remove in Qt 5.4 for (int i = 0; i < tool.SingleProjects.count(); ++i) { xml << tag("ProjectConfiguration") << attrTag("Include" , tool.SingleProjects.at(i).Configuration.Name) @@ -623,7 +624,8 @@ void VCXProjectWriter::write(XmlOutput &xml, VCProject &tool) << tagValue("Platform", tool.SingleProjects.at(i).PlatformName) << closetag(); isWinRT = isWinRT || tool.SingleProjects.at(i).Configuration.WinRT; - isPhone = isPhone || tool.SingleProjects.at(i).Configuration.WinPhone; + isWinPhone = isWinPhone = tool.SingleProjects.at(i).Configuration.WinPhone; + isWinPhone80 = isWinPhone80 || tool.SingleProjects.at(i).Configuration.WinPhone80; } xml << closetag() @@ -635,7 +637,7 @@ void VCXProjectWriter::write(XmlOutput &xml, VCProject &tool) if (isWinRT) { xml << tagValue("MinimumVisualStudioVersion", tool.Version); - if (isPhone) { + if (isWinPhone80) { xml << tagValue("WinMDAssembly", "true"); if (tool.SingleProjects.at(0).Configuration.ConfigurationType == typeApplication) { xml << tagValue("XapOutputs", "true"); @@ -643,7 +645,7 @@ void VCXProjectWriter::write(XmlOutput &xml, VCProject &tool) } } else { xml << tagValue("AppContainerApplication", "true") - << tagValue("ApplicationType", "Windows Store") + << tagValue("ApplicationType", isWinPhone ? "Windows Phone" : "Windows Store") << tagValue("ApplicationTypeRevision", tool.SdkVersion); } } @@ -823,7 +825,7 @@ void VCXProjectWriter::write(XmlOutput &xml, VCProject &tool) } outputFilter(tool, xml, xmlFilter, "Root Files"); - if (tool.SingleProjects.at(0).Configuration.WinPhone) { + if (isWinPhone80) { xml << tag("ItemGroup") << tag("Reference") << attrTag("Include", "platform") @@ -835,7 +837,7 @@ void VCXProjectWriter::write(XmlOutput &xml, VCProject &tool) // App manifest if (isWinRT) { - QString manifest = isPhone ? QStringLiteral("WMAppManifest.xml") : QStringLiteral("Package.appxmanifest"); + QString manifest = isWinPhone80 ? QStringLiteral("WMAppManifest.xml") : QStringLiteral("Package.appxmanifest"); // Find all icons referenced in the manifest QSet icons; @@ -856,7 +858,7 @@ void VCXProjectWriter::write(XmlOutput &xml, VCProject &tool) // Write out manifest + icons as content items xml << tag(_ItemGroup) - << tag(isPhone ? "Xml" : "AppxManifest") + << tag(isWinPhone80 ? "Xml" : "AppxManifest") << attrTag("Include", manifest) << closetag(); foreach (const QString &icon, icons) { @@ -869,7 +871,7 @@ void VCXProjectWriter::write(XmlOutput &xml, VCProject &tool) xml << import("Project", "$(VCTargetsPath)\\Microsoft.Cpp.targets"); - if (isPhone) + if (isWinPhone80) xml << import("Project", "$(MSBuildExtensionsPath)\\Microsoft\\WindowsPhone\\v8.0\\Microsoft.Cpp.WindowsPhone.8.0.targets"); xml << tag("ImportGroup") diff --git a/qmake/generators/win32/msvc_nmake.cpp b/qmake/generators/win32/msvc_nmake.cpp index b8a564968d..4239ceb90f 100644 --- a/qmake/generators/win32/msvc_nmake.cpp +++ b/qmake/generators/win32/msvc_nmake.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of the qmake application of the Qt Toolkit. @@ -166,10 +166,17 @@ NmakeMakefileGenerator::writeMakefile(QTextStream &t) return false; } - regKey = regKeyPrefix - + (isPhone ? QStringLiteral("Microsoft\\Microsoft SDKs\\WindowsPhone\\v") - : QStringLiteral("Microsoft\\Microsoft SDKs\\Windows\\v")) - + winsdkVer + QStringLiteral("\\InstallationFolder"); + QString windowsPath; + if (isPhone) { + if (targetVer == "WP80") // ### Windows Phone 8.0, remove in Qt 5.4 + windowsPath = "Microsoft\\Microsoft SDKs\\WindowsPhone\\v"; + else + windowsPath = "Microsoft\\Microsoft SDKs\\WindowsPhoneApp\\v"; + } else { + windowsPath = "Microsoft\\Microsoft SDKs\\Windows\\v"; + } + + regKey = regKeyPrefix + windowsPath + winsdkVer + QStringLiteral("\\InstallationFolder"); const QString kitDir = qt_readRegistryKey(HKEY_LOCAL_MACHINE, regKey); if (kitDir.isEmpty()) { fprintf(stderr, "Failed to find the Windows Kit installation directory.\n"); @@ -184,7 +191,9 @@ NmakeMakefileGenerator::writeMakefile(QTextStream &t) QStringList libDirs; QStringList binDirs; if (isPhone) { - QString sdkDir = vcInstallDir + QStringLiteral("/WPSDK/") + targetVer; + QString sdkDir = vcInstallDir; + if (targetVer == "WP80") + sdkDir += QStringLiteral("/WPSDK/") + targetVer; if (!QDir(sdkDir).exists()) { fprintf(stderr, "Failed to find the Windows Phone SDK in %s.\n" "Check that it is properly installed.\n", @@ -192,7 +201,8 @@ NmakeMakefileGenerator::writeMakefile(QTextStream &t) return false; } incDirs << sdkDir + QStringLiteral("/include"); - libDirs << sdkDir + QStringLiteral("/lib/") + compilerArch; + libDirs << sdkDir + QStringLiteral("/lib/store/") + compilerArch + << sdkDir + QStringLiteral("/lib/") + compilerArch; binDirs << sdkDir + QStringLiteral("/bin/") + compiler; libDirs << kitDir + QStringLiteral("/lib/") + arch; incDirs << kitDir + QStringLiteral("/include") diff --git a/qmake/generators/win32/msvc_objectmodel.cpp b/qmake/generators/win32/msvc_objectmodel.cpp index 633682baf4..b2663e51c9 100644 --- a/qmake/generators/win32/msvc_objectmodel.cpp +++ b/qmake/generators/win32/msvc_objectmodel.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of the qmake application of the Qt Toolkit. @@ -2129,6 +2129,7 @@ VCPreLinkEventTool::VCPreLinkEventTool() VCConfiguration::VCConfiguration() : WinRT(false), WinPhone(false), + WinPhone80(false), ATLMinimizesCRunTimeLibraryUsage(unset), BuildBrowserInformation(unset), CharacterSet(charSetNotSet), diff --git a/qmake/generators/win32/msvc_objectmodel.h b/qmake/generators/win32/msvc_objectmodel.h index ac96d55de1..9a57a2c7a2 100644 --- a/qmake/generators/win32/msvc_objectmodel.h +++ b/qmake/generators/win32/msvc_objectmodel.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of the qmake application of the Qt Toolkit. @@ -886,7 +886,7 @@ public: ~VCConfiguration(){} DotNET CompilerVersion; - bool WinRT, WinPhone; + bool WinRT, WinPhone, WinPhone80; // Variables triState ATLMinimizesCRunTimeLibraryUsage; diff --git a/qmake/generators/win32/msvc_vcproj.cpp b/qmake/generators/win32/msvc_vcproj.cpp index 2bd3301e16..a28ddd63c4 100644 --- a/qmake/generators/win32/msvc_vcproj.cpp +++ b/qmake/generators/win32/msvc_vcproj.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of the qmake application of the Qt Toolkit. @@ -902,7 +902,7 @@ void VcprojGenerator::initProject() initResourceFiles(); initExtraCompilerOutputs(); if (vcProject.Configuration.WinRT) { - if (vcProject.Configuration.WinPhone + if (vcProject.Configuration.WinPhone80 && vcProject.Configuration.ConfigurationType == typeApplication) initWMAppManifest(); } @@ -1012,6 +1012,7 @@ void VcprojGenerator::initConfiguration() conf.WinRT = project->isActiveConfig("winrt"); if (conf.WinRT) { conf.WinPhone = project->isActiveConfig("winphone"); + conf.WinPhone80 = project->first("WINTARGET_VER") == "WP80"; // Saner defaults conf.compiler.UsePrecompiledHeader = pchNone; conf.compiler.CompileAsWinRT = _False; -- cgit v1.2.3