summaryrefslogtreecommitdiffstats
path: root/qmake
diff options
context:
space:
mode:
authorOliver Wolff <oliver.wolff@qt.io>2020-06-05 09:24:37 +0200
committerLiang Qi <liang.qi@qt.io>2020-06-06 20:25:49 +0200
commit45b0f1be686cfba8dcecb9be5c875cae59c69276 (patch)
tree363dfd46575d147206267d854ce14747157f432e /qmake
parentaa81b90738ce9faee5e433617c8bd243cb238729 (diff)
Remove winrt
Macros and the await helper function from qfunctions_winrt(_p).h are needed in other Qt modules which use UWP APIs on desktop windows. Task-number: QTBUG-84434 Change-Id: Ice09c11436ad151c17bdccd2c7defadd08c13925 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Diffstat (limited to 'qmake')
-rw-r--r--qmake/doc/src/qmake-manual.qdoc169
-rw-r--r--qmake/generators/win32/msbuild_objectmodel.cpp52
-rw-r--r--qmake/generators/win32/msvc_objectmodel.cpp3
-rw-r--r--qmake/generators/win32/msvc_objectmodel.h1
-rw-r--r--qmake/generators/win32/msvc_vcproj.cpp148
5 files changed, 56 insertions, 317 deletions
diff --git a/qmake/doc/src/qmake-manual.qdoc b/qmake/doc/src/qmake-manual.qdoc
index 95a0f42625..9b37756b79 100644
--- a/qmake/doc/src/qmake-manual.qdoc
+++ b/qmake/doc/src/qmake-manual.qdoc
@@ -3219,9 +3219,6 @@
On desktop Windows, the default value is the value of the environment
variable \c{WindowsSDKVersion}.
- On Universal Windows Platform (UWP), the default value is the value of the
- environment variable \c{UCRTVERSION}.
-
\target WINDOWS_TARGET_PLATFORM_MIN_VERSION
\section1 WINDOWS_TARGET_PLATFORM_MIN_VERSION
@@ -3230,172 +3227,6 @@
Defaults to \c{WINDOWS_TARGET_PLATFORM_VERSION}.
- \target WINRT_MANIFEST
- \section1 WINRT_MANIFEST
-
- Specifies parameters to be passed to the application manifest on
- \l{Qt for UWP}{UWP}. The allowed values are:
-
- \table
- \header
- \li Member
- \li Description
- \row
- \li architecture
- \li The target architecture. Defaults to \c VCPROJ_ARCH.
- \row
- \li background
- \li Tile background color. Defaults to \c{green}.
- \row
- \li capabilities
- \li Specifies capabilities to add to the capability list.
- \row
- \li capabilities_device
- \li Specifies device capabilities to add to the capability list
- (location, webcam, and so on).
- \row
- \li CONFIG
- \li Specifies additional flags for processing the input manifest file.
- Currently, \c{verbatim} is the only available option.
- \row
- \li default_language
- \li The default language code of the application. Defaults to "en".
- \row
- \li dependencies
- \li Specifies dependencies required by the package.
- \row
- \li description
- \li Package description. Defaults to \c{Default package description}.
- \row
- \li foreground
- \li Tile foreground (text) color. Defaults to \c{light}.
- \row
- \li iconic_tile_icon
- \li Image file for the \c{iconic} tile template icon. Default provided by
- the mkspec.
- \row
- \li iconic_tile_small
- \li Image file for the small \c{iconic} tile template logo. Default provided
- by the mkspec.
- \row
- \li identity
- \li The unique ID of the app. Defaults to reusing the existing generated
- manifest's UUID, or generates a new UUID if none is present.
- \row
- \li logo_30x30
- \li Logo image file of size 30x30 pixels.
- \row
- \li logo_41x41
- \li Logo image file of size 41x41 pixels. This parameter is obsolete.
- \row
- \li logo_70x70
- \li Logo image file of size 70x70 pixels.
- \row
- \li logo_71x71
- \li Logo image file of size 71x71 pixels. This parameter is obsolete.
- \row
- \li logo_150x150
- \li Logo image file of size 150x150 pixels. This is supported on all Windows
- Store App platforms.
- \row
- \li logo_310x150
- \li Logo image file of size 310x150 pixels. This is supported on all Windows
- Store App platforms.
- \row
- \li logo_310x310
- \li Logo image file of size 310x310 pixels. This is supported on all Windows
- Store App platforms.
- \row
- \li logo_620x300
- \li Splash screen image file of size 620x300 pixels.
- \row
- \li logo_480x800
- \li Splash screen image file of size 480x800 pixels.
- This parameter is obsolete.
- \row
- \li logo_large
- \li Large logo image file. This has to be 150x150 pixels. Supported on all
- Windows Store App platforms. Default provided by the mkspec.
- \row
- \li logo_medium
- \li Medium logo image file. The image must have a pixel size of 70x70.
- Default provided by the mkspec.
- \row
- \li logo_small
- \li Small logo image file. The image must have a pixel size of 30x30.
- Default provided by the mkspec.
- \row
- \li logo_splash
- \li Splash screen image file. The image must have a pixel size of
- 620x300. Default provided by the mkspec.
- \row
- \li logo_store
- \li Logo image file for Windows Store. Default provided by the mkspec.
- \row
- \li logo_wide
- \li Wide logo image file. This has to be 310x150 pixels. Supported on all
- Windows Store App platforms. Default provided by the mkspec.
- \row
- \li name
- \li The name of the package as displayed to the user. Defaults to TARGET.
- \row
- \li phone_product_id
- \li The GUID of the product.
- This parameter is obsolete.
- \row
- \li phone_publisher_id
- \li The GUID of the publisher.
- This parameter is obsolete.
- \row
- \li publisher
- \li Display name of the publisher. Defaults to \c{Default publisher display name}.
- \row
- \li publisher_id
- \li The publisher's distinguished name (default: \c{CN=MyCN}).
- \row
- \li target
- \li The name of the target (.exe). Defaults to TARGET.
- \row
- \li version
- \li The version number of the package. Defaults to \c{1.0.0.0}.
- \row
- \li minVersion
- \li The minimum required Windows version to run the package.
- Defaults to \c{WINDOWS_TARGET_PLATFORM_VERSION}.
- \row
- \li maxVersionTested
- \li The maximum Windows version the package has been tested against.
- Defaults to \c{WINDOWS_TARGET_PLATFORM_MIN_VERSION}.
-
- \endtable
-
- You can use any combination of those values.
-
- For example:
-
- \code
- WINRT_MANIFEST.publisher = MyCompany
- WINRT_MANIFEST.logo_store = someImage.png
- WINRT_MANIFEST.capabilities += internetClient
- WINRT_MANIFEST.capabilities_device += location
- \endcode
-
- Additionally, an input manifest file can be specified by using WINRT_MANIFEST.
-
- For example:
-
- \code
- WINRT_MANIFEST = someManifest.xml.in
- \endcode
-
- In case the input manifest file should not be processed and only copied to
- the target directory, the verbatim configuration needs to be set.
-
- \code
- WINRT_MANIFEST = someManifest.xml.in
- WINRT_MANIFEST.CONFIG += verbatim
- \endcode
-
\target YACCSOURCES
\section1 YACCSOURCES
diff --git a/qmake/generators/win32/msbuild_objectmodel.cpp b/qmake/generators/win32/msbuild_objectmodel.cpp
index 82c0983272..4129482990 100644
--- a/qmake/generators/win32/msbuild_objectmodel.cpp
+++ b/qmake/generators/win32/msbuild_objectmodel.cpp
@@ -612,16 +612,6 @@ void VCXProjectWriter::write(XmlOutput &xml, VCProject &tool)
<< tag("ItemGroup")
<< attrTag("Label", "ProjectConfigurations");
- bool isWinRT = false;
- for (int i = 0; i < tool.SingleProjects.count(); ++i) {
- xml << tag("ProjectConfiguration")
- << attrTag("Include" , tool.SingleProjects.at(i).Configuration.Name)
- << tagValue("Configuration", tool.SingleProjects.at(i).Configuration.ConfigurationName)
- << tagValue("Platform", tool.SingleProjects.at(i).PlatformName)
- << closetag();
- isWinRT = isWinRT || tool.SingleProjects.at(i).Configuration.WinRT;
- }
-
xml << closetag()
<< tag("PropertyGroup")
<< attrTag("Label", "Globals")
@@ -629,13 +619,6 @@ void VCXProjectWriter::write(XmlOutput &xml, VCProject &tool)
<< tagValue("RootNamespace", tool.Name)
<< tagValue("Keyword", tool.Keyword);
- if (isWinRT) {
- xml << tagValue("MinimumVisualStudioVersion", tool.Version)
- << tagValue("DefaultLanguage", "en")
- << tagValue("AppContainerApplication", "true")
- << tagValue("ApplicationType", "Windows Store")
- << tagValue("ApplicationTypeRevision", tool.SdkVersion);
- }
if (!tool.WindowsTargetPlatformVersion.isEmpty())
xml << tagValue("WindowsTargetPlatformVersion", tool.WindowsTargetPlatformVersion);
if (!tool.WindowsTargetPlatformMinVersion.isEmpty())
@@ -825,41 +808,6 @@ void VCXProjectWriter::write(XmlOutput &xml, VCProject &tool)
}
outputFilter(tool, xml, xmlFilter, "Root Files");
- // App manifest
- if (isWinRT) {
- const QString manifest = QStringLiteral("Package.appxmanifest");
-
- // Find all icons referenced in the manifest
- QSet<QString> icons;
- QFile manifestFile(Option::output_dir + QLatin1Char('/') + manifest);
- if (manifestFile.open(QFile::ReadOnly)) {
- const QString contents = manifestFile.readAll();
- QRegularExpression regexp("[\\\\/a-zA-Z0-9_\\-\\!]*\\.(png|jpg|jpeg)");
- int pos = 0;
- while (pos > -1) {
- QRegularExpressionMatch m;
- pos = contents.indexOf(regexp, pos, &m);
- if (pos >= 0) {
- const QString match = m.captured(0);
- icons.insert(match);
- pos += match.length();
- }
- }
- }
-
- // Write out manifest + icons as content items
- xml << tag(_ItemGroup)
- << tag("AppxManifest")
- << attrTag("Include", manifest)
- << closetag();
- for (const QString &icon : qAsConst(icons)) {
- xml << tag("Image")
- << attrTag("Include", icon)
- << closetag();
- }
- xml << closetag();
- }
-
xml << import("Project", "$(VCTargetsPath)\\Microsoft.Cpp.targets")
<< tag("ImportGroup")
<< attrTag("Label", "ExtensionTargets")
diff --git a/qmake/generators/win32/msvc_objectmodel.cpp b/qmake/generators/win32/msvc_objectmodel.cpp
index 9e93fe51f3..15e13a1c32 100644
--- a/qmake/generators/win32/msvc_objectmodel.cpp
+++ b/qmake/generators/win32/msvc_objectmodel.cpp
@@ -2166,8 +2166,7 @@ VCPreLinkEventTool::VCPreLinkEventTool()
// VCConfiguration --------------------------------------------------
VCConfiguration::VCConfiguration()
- : WinRT(false),
- ATLMinimizesCRunTimeLibraryUsage(unset),
+ : ATLMinimizesCRunTimeLibraryUsage(unset),
BuildBrowserInformation(unset),
CharacterSet(charSetNotSet),
ConfigurationType(typeApplication),
diff --git a/qmake/generators/win32/msvc_objectmodel.h b/qmake/generators/win32/msvc_objectmodel.h
index 33eff0d914..8793c793ef 100644
--- a/qmake/generators/win32/msvc_objectmodel.h
+++ b/qmake/generators/win32/msvc_objectmodel.h
@@ -872,7 +872,6 @@ public:
bool suppressUnknownOptionWarnings;
DotNET CompilerVersion;
- bool WinRT;
// Variables
triState ATLMinimizesCRunTimeLibraryUsage;
diff --git a/qmake/generators/win32/msvc_vcproj.cpp b/qmake/generators/win32/msvc_vcproj.cpp
index e117f472e0..e679cf4f31 100644
--- a/qmake/generators/win32/msvc_vcproj.cpp
+++ b/qmake/generators/win32/msvc_vcproj.cpp
@@ -642,7 +642,6 @@ void VcprojGenerator::writeSubDirs(QTextStream &t)
for(QList<VcsolutionDepend*>::Iterator it = solution_cleanup.begin(); it != solution_cleanup.end(); ++it) {
QString platform = is64Bit ? "x64" : "Win32";
QString xplatform = platform;
- const bool isWinRT = project->isActiveConfig("winrt");
if (!project->isEmpty("VCPROJ_ARCH")) {
xplatform = project->first("VCPROJ_ARCH").toQString();
}
@@ -650,12 +649,8 @@ void VcprojGenerator::writeSubDirs(QTextStream &t)
platform = xplatform;
t << "\n\t\t" << (*it)->uuid << QString(_slnProjDbgConfTag1).arg(xplatform) << platform;
t << "\n\t\t" << (*it)->uuid << QString(_slnProjDbgConfTag2).arg(xplatform) << platform;
- if (isWinRT)
- t << "\n\t\t" << (*it)->uuid << QString(_slnProjDbgConfTag3).arg(xplatform) << platform;
t << "\n\t\t" << (*it)->uuid << QString(_slnProjRelConfTag1).arg(xplatform) << platform;
t << "\n\t\t" << (*it)->uuid << QString(_slnProjRelConfTag2).arg(xplatform) << platform;
- if (isWinRT)
- t << "\n\t\t" << (*it)->uuid << QString(_slnProjRelConfTag3).arg(xplatform) << platform;
}
t << _slnProjConfEnd;
t << _slnExtSections;
@@ -960,16 +955,6 @@ void VcprojGenerator::initConfiguration()
conf.suppressUnknownOptionWarnings = project->isActiveConfig("suppress_vcproj_warnings");
conf.CompilerVersion = vsVersionFromString(project->first("MSVC_VER"));
- if (conf.CompilerVersion >= NET2012) {
- conf.WinRT = project->isActiveConfig("winrt");
- if (conf.WinRT) {
- // Saner defaults
- conf.compiler.UsePrecompiledHeader = pchNone;
- conf.compiler.CompileAsWinRT = _False;
- conf.linker.GenerateWindowsMetadata = _False;
- }
- }
-
initCompilerTool();
// Only on configuration per build
@@ -1028,7 +1013,7 @@ void VcprojGenerator::initConfiguration()
conf.ATLMinimizesCRunTimeLibraryUsage = (project->first("ATLMinimizesCRunTimeLibraryUsage").isEmpty() ? _False : _True);
conf.BuildBrowserInformation = triState(temp.isEmpty() ? (short)unset : temp.toShort());
temp = project->first("CharacterSet");
- conf.CharacterSet = charSet(temp.isEmpty() ? short(conf.WinRT ? charSetUnicode : charSetNotSet) : temp.toShort());
+ conf.CharacterSet = charSet(temp.isEmpty() ? short(charSetNotSet) : temp.toShort());
conf.DeleteExtensionsOnClean = project->first("DeleteExtensionsOnClean").toQString();
conf.ImportLibrary = conf.linker.ImportLibrary;
conf.IntermediateDirectory = project->first("OBJECTS_DIR").toQString();
@@ -1046,7 +1031,7 @@ void VcprojGenerator::initConfiguration()
initPreBuildEventTools();
initPostBuildEventTools();
// Only deploy for crosscompiled projects
- if (!project->isHostBuild() || conf.WinRT)
+ if (!project->isHostBuild())
initDeploymentTool();
initWinDeployQtTool();
initPreLinkEventTools();
@@ -1193,23 +1178,15 @@ void VcprojGenerator::initDeploymentTool()
{
VCConfiguration &conf = vcProject.Configuration;
QString targetPath;
- if (conf.WinRT) {
- vcProject.DeploymentFiles.Name = "Deployment Files";
- vcProject.DeploymentFiles.ParseFiles = _False;
- vcProject.DeploymentFiles.Filter = "deploy";
- vcProject.DeploymentFiles.Guid = _GUIDDeploymentFiles;
- } else {
- targetPath = project->values("deploy.path").join(' ');
- if (targetPath.isEmpty())
- targetPath = QString("%CSIDL_PROGRAM_FILES%\\") + project->first("TARGET");
- if (targetPath.endsWith("/") || targetPath.endsWith("\\"))
- targetPath.chop(1);
- conf.deployment.RemoteDirectory = targetPath;
- }
+ targetPath = project->values("deploy.path").join(' ');
+ if (targetPath.isEmpty())
+ targetPath = QString("%CSIDL_PROGRAM_FILES%\\") + project->first("TARGET");
+ if (targetPath.endsWith("/") || targetPath.endsWith("\\"))
+ targetPath.chop(1);
+ conf.deployment.RemoteDirectory = targetPath;
const ProStringList dllPaths = project->values("QMAKE_DLL_PATHS");
// Only deploy Qt libs for shared build
- if (!dllPaths.isEmpty() &&
- !(conf.WinRT && project->first("MSVC_VER").toQString() == "14.0")) {
+ if (!dllPaths.isEmpty()) {
// FIXME: This code should actually resolve the libraries from all Qt modules.
ProStringList arg = project->values("LIBS") + project->values("LIBS_PRIVATE")
+ project->values("QMAKE_LIBS") + project->values("QMAKE_LIBS_PRIVATE");
@@ -1238,39 +1215,35 @@ void VcprojGenerator::initDeploymentTool()
if (!info.exists())
continue;
- if (conf.WinRT) {
- QString absoluteFilePath(QDir::toNativeSeparators(info.absoluteFilePath()));
- vcProject.DeploymentFiles.addFile(absoluteFilePath);
- } else {
- conf.deployment.AdditionalFiles += info.fileName()
- + "|" + QDir::toNativeSeparators(info.absolutePath())
- + "|" + targetPath
- + "|0;";
- if (!qpaPluginDeployed) {
- QString debugInfix;
- bool foundGuid = dllName.contains(QLatin1String("Guid"));
- if (foundGuid)
- debugInfix = QLatin1Char('d');
-
- if (foundGuid || dllName.contains(QLatin1String("Gui"))) {
- QFileInfo info2;
- for (const ProString &dllPath : dllPaths) {
- QString absoluteDllFilePath = dllPath.toQString();
- if (!absoluteDllFilePath.endsWith(QLatin1Char('/')))
- absoluteDllFilePath += QLatin1Char('/');
- absoluteDllFilePath += QLatin1String("../plugins/platforms/qwindows")
- + debugInfix + QLatin1String(".dll");
- info2 = QFileInfo(absoluteDllFilePath);
- if (info2.exists())
- break;
- }
- if (info2.exists()) {
- conf.deployment.AdditionalFiles += QLatin1String("qwindows") + debugInfix + QLatin1String(".dll")
- + QLatin1Char('|') + QDir::toNativeSeparators(info2.absolutePath())
- + QLatin1Char('|') + targetPath + QLatin1String("\\platforms")
- + QLatin1String("|0;");
- qpaPluginDeployed = true;
- }
+
+ conf.deployment.AdditionalFiles += info.fileName()
+ + "|" + QDir::toNativeSeparators(info.absolutePath())
+ + "|" + targetPath
+ + "|0;";
+ if (!qpaPluginDeployed) {
+ QString debugInfix;
+ bool foundGuid = dllName.contains(QLatin1String("Guid"));
+ if (foundGuid)
+ debugInfix = QLatin1Char('d');
+
+ if (foundGuid || dllName.contains(QLatin1String("Gui"))) {
+ QFileInfo info2;
+ for (const ProString &dllPath : dllPaths) {
+ QString absoluteDllFilePath = dllPath.toQString();
+ if (!absoluteDllFilePath.endsWith(QLatin1Char('/')))
+ absoluteDllFilePath += QLatin1Char('/');
+ absoluteDllFilePath += QLatin1String("../plugins/platforms/qwindows")
+ + debugInfix + QLatin1String(".dll");
+ info2 = QFileInfo(absoluteDllFilePath);
+ if (info2.exists())
+ break;
+ }
+ if (info2.exists()) {
+ conf.deployment.AdditionalFiles += QLatin1String("qwindows") + debugInfix + QLatin1String(".dll")
+ + QLatin1Char('|') + QDir::toNativeSeparators(info2.absolutePath())
+ + QLatin1Char('|') + targetPath + QLatin1String("\\platforms")
+ + QLatin1String("|0;");
+ qpaPluginDeployed = true;
}
}
}
@@ -1280,16 +1253,14 @@ void VcprojGenerator::initDeploymentTool()
for (const ProString &item : project->values("INSTALLS")) {
// get item.path
QString devicePath = project->first(ProKey(item + ".path")).toQString();
- if (!conf.WinRT) {
- if (devicePath.isEmpty())
- devicePath = targetPath;
- // check if item.path is relative (! either /,\ or %)
- if (!(devicePath.at(0) == QLatin1Char('/')
- || devicePath.at(0) == QLatin1Char('\\')
- || devicePath.at(0) == QLatin1Char('%'))) {
- // create output path
- devicePath = Option::fixPathToTargetOS(targetPath + QLatin1Char('\\') + devicePath);
- }
+ if (devicePath.isEmpty())
+ devicePath = targetPath;
+ // check if item.path is relative (! either /,\ or %)
+ if (!(devicePath.at(0) == QLatin1Char('/')
+ || devicePath.at(0) == QLatin1Char('\\')
+ || devicePath.at(0) == QLatin1Char('%'))) {
+ // create output path
+ devicePath = Option::fixPathToTargetOS(targetPath + QLatin1Char('\\') + devicePath);
}
// foreach d in item.files
for (const ProString &src : project->values(ProKey(item + ".files"))) {
@@ -1314,25 +1285,16 @@ void VcprojGenerator::initDeploymentTool()
// foreach dirIterator-entry in d
while(iterator.hasNext()) {
iterator.next();
- if (conf.WinRT) {
- QString absoluteItemFilePath = Option::fixPathToTargetOS(QFileInfo(iterator.filePath()).absoluteFilePath());
- vcProject.DeploymentFiles.addFile(absoluteItemFilePath);
- } else {
- QString absoluteItemPath = Option::fixPathToTargetOS(QFileInfo(iterator.filePath()).absolutePath());
- // Identify if it is just another subdir
- int diffSize = absoluteItemPath.size() - pathSize;
- // write out rules
- conf.deployment.AdditionalFiles += iterator.fileName()
- + "|" + absoluteItemPath
- + "|" + itemDevicePath + (diffSize ? (absoluteItemPath.right(diffSize)) : QLatin1String(""))
- + "|0;";
- }
- }
- }
- if (conf.WinRT) {
- vcProject.DeploymentFiles.Project = this;
- vcProject.DeploymentFiles.Config = &(vcProject.Configuration);
+ QString absoluteItemPath = Option::fixPathToTargetOS(QFileInfo(iterator.filePath()).absolutePath());
+ // Identify if it is just another subdir
+ int diffSize = absoluteItemPath.size() - pathSize;
+ // write out rules
+ conf.deployment.AdditionalFiles += iterator.fileName()
+ + "|" + absoluteItemPath
+ + "|" + itemDevicePath + (diffSize ? (absoluteItemPath.right(diffSize)) : QLatin1String(""))
+ + "|0;";
+ }
}
}
}