From 9d3b169bda1a48c6eee0820b6a2fd50d6dd6a023 Mon Sep 17 00:00:00 2001 From: Andrew Knight Date: Wed, 21 May 2014 16:42:31 +0300 Subject: [PATCH] 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 --- .../winrt_winphone/assets/logo_44x44.png | Bin 0 -> 1066 bytes .../winrt_winphone/assets/logo_480x800.png | Bin 0 -> 6820 bytes .../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 ++++++++++++++++ .../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 0000000000000000000000000000000000000000..3cc5bec19ff7be48851db875f5f1a64ae5e088dc GIT binary patch literal 1066 zcmV+_1l9YAP)(76j2n%cU?7qWD1#Cl9B}_ z)Kf%MR7640i;)%e=4(Xs6h$w+^k6^eA1Hc=f_gB5s3@W$Dzb+l3W-E>HBz^=-Tb*b z?#}c*@Lf0zw$3`UqYr!F!z?rR&VJ9GbMHC#1_A{uSiyX?V6Gi3%L?JL8ms_6gTY{A zQ3{6823&T7CQt(^!Cw(get{tn0|p#17fdk3ZpP&@*aeo((&RUYkSG`g{U8j6!KeTy z;&~Sgu_E#$IFZA9WppPMQS}vu>BtYz2PcNT7W^ESO`v{0F>kXpNPz?x2XTf_ALtf` z;J_WXf~RmP0U-|rXR{drf-AE%Dt7RqawlQV(G%yApbS)iB8N^|Y#W-ZVX;S}BeD4& zeCC9cm1G-`$=aZVh%keWi9@9}hb-4hthsFjoCZa_*vz2hLpwsCNl_d6&uC&5K7{gLIV6B9-LR3_$Oa1-1DhuG#Gc&XOw zFZ^BVBxb!9{DkXifSIoitOAYTD4bXhXXM#^@C{r8U2OjmJW%~DPi9k=P>@e}N`*rm z=u^+Xf)+ko3vPf~_1;oY1+Ma4c@GJh>2V1MHNsWudA&;G6AXd2jDxTZU=P2BFCj6( zEEQ0KwT0CClPs9pxJHY$gGb;P+gbS*JjK+Su`=5vD&nYSvRITghORf#xfWt>1e-Pi zv(5OBYMb<8a=8&)Zj0H3%>he^lr?!7p9dFGu&#}#ZKJ2ZfC#Rh?=Htn!PT}&n6x=C z!{1A|rAoV9X59*2FYBoaiC*=*U#%jt{%&L~Y^mDV$~C6l2$oN~9jsJ>-%yl@`NS=g z*iJ5cC2AsuS-1~+mgO82KVzU(Dm6(6viAdz!85Rf{cFJsw(kN>yk8C0fb+m$<>pJZ z_F7V}YG0E{!A!p*Xqs(@SXwrLMzDn`JLPA2Db@-0gEG~x8C(Jp)lSODQSgfN&>7Qj z!D7AOjOurQ;+&Yt;(jvU<)yY}a702PQ$D8C=_{sbeiua!`X@LEeG@FA*0Byo5f_XZ zhH)L&r?w3Ezce4_VT~`F(2UiA3$ldqJj2Lxo?)roc8t4}yIvfmSRRagW)u_5hDrXG z3T^;Al&uuLM#}FIwp(1C?nD`*17wH{Lg={D7djDq8*BwFS=typ@Dl+eJf|2?2ZEB# z{zwfCaYnum150=)(!ohJPV}K(m?J2HBM>#Z7|w_H;?fG<^59O+hQ~xacgDV0E-{>m kyB-Ma4iv0l1)G=s1M3H!P9j6!F8}}l07*qoM6N<$g2#{4VgLXD literal 0 HcmV?d00001 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 0000000000000000000000000000000000000000..39a37dac5b913e03cf02d4c5334a966186d34747 GIT binary patch literal 6820 zcmeHMXH=8h(k5^Kg&?AYDxh$L2nbP-h|&~D;8 zDWL=r2oQ>b^d3AhZecHXFP{-xLr|`rolev#{_w9e+VZnuQ)L zEFyY(I=9Ti##Sd!R@encac&%4bJF`G{+5;i#0X?Dkq}Gx`=U4Kv%sAb59Mo`H5b%s!`GWq8z#`b zlNvec>l0e`y>+`sy^+%l&0YCRAi$vie*RMtfEn4~uuen1HN?a94jlo6_}%0cDT1F%IeD)B#j;LIZ>i(=?k>qD zZxdgNq1TuMl${6ahzsM$?1?`oqAE#CBxmD$IA<=EL!X8RsyYZ-7h*x|lnQ~3HGB;s zIeA4*M{%A>ere}M39s1^QF74&DHX9FJSJblw<5fW7#N}G?iB}f=H$NSGcFN+n6eou z+;S^YN=E0CNPcQlL6(>yKkbXcs$AD-(5{3PI}ewTn`-Oo&vg8NWZzX2-ur^q6Rz!9 z+!0S$IoQFC0vp{@)A1DeU!w3A#n)Mh=uc{RS2uDl*2$S`uNq(euI2jsaQ=yJz!G%F z3yCm5U)smZGx<^uciKDk+Hl2G?G>RE(E0!l3CH*&M**sY&Y7M5wzFN%=mB@%F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&H2OcNa>~#n3J98mqR`sL^>MdSs}|vsmv7rKI@LHe9U5>H-SAMHxTZ!F~^y@ zM!^vf;@=m^0sFvR$GiUOX3hZEO_(B+37QpkjDb?H0h|nyIrR!NazTa^%LXk(9nXa_ z)zf88vIk@~LAyf4*(5T|*Ij#sI6JvoFeH_K7{t5PMSjAf_Vd|w7AOTxV3Dw&t>$kA z-5j>Kq-LwN(sn*LD8(-Gzc;`sa9`Nh&lj!zI^V5Y6=ThNqU?34%q$QAM<*G?>vbJ- zIu$ePG9oUo)BeTTl^k6sf!~RkD)&=D#JWL^70VhUSvN^?ZwkFlS!kN}`j5!Ik9Ea#u1wl4v0TKHFMu~VIG21N(vN=_XLARZVza(PY zf^5!8u%3uNBVtdb?Q*b8QExaX`J7rJ)=b3iNZUJI)?;m8fOpRqx~43co+wfc_gvBy zED8Tu*gp(xsZ2h|1FLn4zNxr zw*=IIYr31m^a)hDn8LbE1L&Kio^RlDkRHv5Vq;AeVNR3dkF>fyo-g45s(>z-a-n9Q`&Q&Taf zhp(^NcuQf=)w}#Sh;%iF()e4VZ6atHk?HzDzszA7y*WPB6_yR)gp++W{2FsA!7VHH zhD5xINGCtuDtadzU_k!&VI$AOES8G=lumw}o>ZTFGR + + + + + $${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 444b8b873e0..85a6485535a 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 00000000000..e848d254d41 --- /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 00000000000..59fb5871abd --- /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 00000000000..18d84028226 --- /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 00000000000..59fb5871abd --- /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 feef587ee6a..5fdfc52dbaa 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 b8a564968da..4239ceb90f7 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 633682baf42..b2663e51c91 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 ac96d55de12..9a57a2c7a22 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 2bd3301e16c..a28ddd63c40 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;