diff options
author | Andrew Knight <andrew.knight@digia.com> | 2014-05-21 16:42:31 +0300 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-05-22 07:59:49 +0200 |
commit | 9d3b169bda1a48c6eee0820b6a2fd50d6dd6a023 (patch) | |
tree | f770d683f84d9a688b3668ce3867f66ec7d2bf88 /qmake/generators/win32/msbuild_objectmodel.cpp | |
parent | 26a2fb744866414748ed35a36322460b06911394 (diff) |
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 <oliver.wolff@digia.com>
Diffstat (limited to 'qmake/generators/win32/msbuild_objectmodel.cpp')
-rw-r--r-- | qmake/generators/win32/msbuild_objectmodel.cpp | 20 |
1 files changed, 11 insertions, 9 deletions
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<QString> 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") |