From 45b0f1be686cfba8dcecb9be5c875cae59c69276 Mon Sep 17 00:00:00 2001 From: Oliver Wolff Date: Fri, 5 Jun 2020 09:24:37 +0200 Subject: Remove winrt MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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ø --- mkspecs/features/configure.prf | 6 - mkspecs/features/qt.prf | 9 -- mkspecs/features/qt_build_config.prf | 2 +- mkspecs/features/qt_configure.prf | 5 - mkspecs/features/qt_module_pris.prf | 4 - mkspecs/features/toolchain.prf | 5 +- mkspecs/features/winrt/console.prf | 5 - mkspecs/features/winrt/default_pre.prf | 14 -- mkspecs/features/winrt/package_manifest.prf | 200 ---------------------------- 9 files changed, 3 insertions(+), 247 deletions(-) delete mode 100644 mkspecs/features/winrt/console.prf delete mode 100644 mkspecs/features/winrt/default_pre.prf delete mode 100644 mkspecs/features/winrt/package_manifest.prf (limited to 'mkspecs/features') diff --git a/mkspecs/features/configure.prf b/mkspecs/features/configure.prf index 934a18a924..af5ebeddd5 100644 --- a/mkspecs/features/configure.prf +++ b/mkspecs/features/configure.prf @@ -39,12 +39,6 @@ defineTest(qtCompileTest) { # Disable qmake features which are typically counterproductive for tests qmake_configs = "\"CONFIG -= qt debug_and_release app_bundle lib_bundle\"" - # On WinRT we need to change the entry point as we cannot create windows - # applications - winrt { - qmake_configs += " \"QMAKE_LFLAGS+=/ENTRY:main\"" - } - # Clean up after previous run exists($$test_out_dir/Makefile):qtRunLoggedCommand("$$test_cmd_base $$QMAKE_MAKE distclean") diff --git a/mkspecs/features/qt.prf b/mkspecs/features/qt.prf index 69d1954306..4a53b99ca1 100644 --- a/mkspecs/features/qt.prf +++ b/mkspecs/features/qt.prf @@ -226,15 +226,6 @@ for(ever) { } } QMAKE_USE$$var_sfx += $$MODULE_USES - # Add capabilities as defined by modules used in the project - winrt { - MODULE_WINRT_CAPABILITIES = $$eval(QT.$${QTLIB}.winrt_capabilities) - !isEmpty(MODULE_WINRT_CAPABILITIES): \ - WINRT_MANIFEST.capabilities_default += $$MODULE_WINRT_CAPABILITIES - MODULE_WINRT_CAPABILITIES_DEVICE = $$eval(QT.$${QTLIB}.winrt_capabilities_device) - !isEmpty(MODULE_WINRT_CAPABILITIES_DEVICE): \ - WINRT_MANIFEST.capabilities_device_default += $$MODULE_WINRT_CAPABILITIES_DEVICE - } } !isEmpty(BAD_QT):error("Unknown module(s) in QT$$var_sfx: $$replace(BAD_QT, _private$, -private)") diff --git a/mkspecs/features/qt_build_config.prf b/mkspecs/features/qt_build_config.prf index 7ca9943c32..55e01e4a65 100644 --- a/mkspecs/features/qt_build_config.prf +++ b/mkspecs/features/qt_build_config.prf @@ -85,7 +85,7 @@ CONFIG = qt_build_extra $$CONFIG cross_compile: \ CONFIG += force_bootstrap -android|uikit|winrt: \ +android|uikit: \ CONFIG += builtin_testdata # Prevent warnings about object files without any symbols diff --git a/mkspecs/features/qt_configure.prf b/mkspecs/features/qt_configure.prf index 6537d98c5d..93448acb91 100644 --- a/mkspecs/features/qt_configure.prf +++ b/mkspecs/features/qt_configure.prf @@ -1225,11 +1225,6 @@ defineTest(qtConfTest_compile) { qmake_args += "\"CONFIG += $$qmake_configs\"" !$$host|!cross_compile { - # On WinRT we need to change the entry point as we cannot create windows - # applications - winrt: \ - qmake_args += " \"QMAKE_LFLAGS += /ENTRY:main\"" - # add compiler flags, these are set for the target and should not be applied to host tests !isEmpty(EXTRA_DEFINES): \ qmake_args += $$system_quote(DEFINES += $$val_escape(EXTRA_DEFINES)) diff --git a/mkspecs/features/qt_module_pris.prf b/mkspecs/features/qt_module_pris.prf index 719caf3d4a..a8cc9835a5 100644 --- a/mkspecs/features/qt_module_pris.prf +++ b/mkspecs/features/qt_module_pris.prf @@ -154,9 +154,6 @@ defineReplace(qtExportLibsForModule) { "QT_CONFIG +=$$join(QT.$${MODULE_ID}.QT_CONFIG, " ", " ")" \ "" \ "QT_MODULES += $$MODULE" - winrt: MODULE_PRI_CONT += \ - "QT.$${MODULE_ID}.winrt_capabilities =$$join(MODULE_WINRT_CAPABILITIES, " ", " ")" \ - "QT.$${MODULE_ID}.winrt_capabilities_device =$$join(MODULE_WINRT_CAPABILITIES_DEVICE, " ", " ")" write_file($$MODULE_PRI, MODULE_PRI_CONT)|error() !internal_module:!no_private_module { module_build_type += internal_module @@ -233,7 +230,6 @@ defineReplace(qtExportLibsForModule) { for(var, $$list(VERSION MAJOR_VERSION MINOR_VERSION PATCH_VERSION \ name module depends run_depends plugin_types module_config CONFIG DEFINES \ priority includes bins libs frameworks \ - winrt_capabilities winrt_capabilities_device \ )):defined(QT.$${mod}.$$var, var):cache(QT.$${mod}.$$var, transient) } cache(QT_MODULES, transient) diff --git a/mkspecs/features/toolchain.prf b/mkspecs/features/toolchain.prf index 9d790f62bc..e03c21dea2 100644 --- a/mkspecs/features/toolchain.prf +++ b/mkspecs/features/toolchain.prf @@ -153,10 +153,10 @@ msvc { arch = amd64 else: !equals(arch, arm):!equals(arch, arm64): \ # may be "win32" or undefined arch = x86 - # Consider only WinRT and ARM64 desktop builds to be cross-builds - + # Consider only ARM64 desktop builds to be cross-builds - # the host is assumed to be Intel and capable of running the target # executables (so building for x64 on x86 will break). - winrt|equals(arch, arm64): \ + equals(arch, arm64): \ CONFIG += msvc_cross } @@ -337,7 +337,6 @@ isEmpty($${target_prefix}.INCDIRS) { error("Failed to find the Visual C installation directory.") cmd += $$system_quote($$dir\\vcvarsall.bat) $$arch } - winrt: cmd += store isEmpty(WINSDK_VER): \ error("Mkspec does not specify WINSDK_VER. Cannot continue.") diff --git a/mkspecs/features/winrt/console.prf b/mkspecs/features/winrt/console.prf deleted file mode 100644 index c4afe5b96e..0000000000 --- a/mkspecs/features/winrt/console.prf +++ /dev/null @@ -1,5 +0,0 @@ -# This is an empty prf file to overwrite the win32 version. -# On Windows RT all applications need to be windows applications -# and also link to winmain. Inside winmain we create the launch -# arguments and also initialize the UI. - diff --git a/mkspecs/features/winrt/default_pre.prf b/mkspecs/features/winrt/default_pre.prf deleted file mode 100644 index 966d24f091..0000000000 --- a/mkspecs/features/winrt/default_pre.prf +++ /dev/null @@ -1,14 +0,0 @@ -# Note that the order is important - ucrt(d) has to be first. -# Otherwise, the linker might use malloc from a different library, -# but free_dbg() from the runtime, causing an assertion failure -# due to deleting an item from a different heap. -# vcruntime(d) is necessary when we don't link to any libraries -# which would pull it in transitively. -CONFIG(debug, debug|release): \ - QMAKE_LIBS = ucrtd.lib vcruntimed.lib $$QMAKE_LIBS -else: \ - QMAKE_LIBS = ucrt.lib vcruntime.lib $$QMAKE_LIBS - -equals(TEMPLATE, "vcapp"):!static: CONFIG += windeployqt - -load(default_pre) diff --git a/mkspecs/features/winrt/package_manifest.prf b/mkspecs/features/winrt/package_manifest.prf deleted file mode 100644 index 279971bd65..0000000000 --- a/mkspecs/features/winrt/package_manifest.prf +++ /dev/null @@ -1,200 +0,0 @@ -# This performs basic variable replacement on the contents of the WinRT manifest template, as -# specified by WINRT_MANIFEST. The resulting manifest file is written to the output directory. -# While the most common options are covered by the default template, the developer is expected -# to make an application-level copy of the template in order to customize the manifest further. -# Afterwards, they can override the default template by assigning their template to WINRT_MANIFEST. -# -# All subkeys in WINRT_MANIFEST will be replaced if defined/found, so new variables can be easily -# added. - -# The manifest is generated for each build pass for normal apps, and only once for vcapps. -# - Normal apps have their package root directory in the same place as the target (one for each build pass). -# - Visual Studio requires a design-mode manifest in the same location as the vcproj. -!isEmpty(WINRT_MANIFEST): \ - if(build_pass:equals(TEMPLATE, "app"))| \ - if(!build_pass:equals(TEMPLATE, "vcapp")) { - - manifest_file.input = $$WINRT_MANIFEST - - contains(TEMPLATE, "vc.*") { - BUILD_DIR = $$OUT_PWD - } else { - load(resolve_target) - BUILD_DIR = $$dirname(QMAKE_RESOLVED_TARGET) - } - - contains(TEMPLATE, "vc.*"): \ - manifest_file.output = $$BUILD_DIR/Package.appxmanifest - else: \ - manifest_file.output = $$BUILD_DIR/AppxManifest.xml - - !contains(WINRT_MANIFEST.CONFIG, "verbatim") { - # Provide the C-runtime dependency - equals(TEMPLATE, "app") { - VCLIBS = Microsoft.VCLibs.$$replace(MSVC_VER, \\., ).00 - CONFIG(debug, debug|release): \ - VCLIBS = $${VCLIBS}.Debug - else: \ - VCLIBS = $${VCLIBS} - # VS 2017 and 2019 still use vclibs 140 - contains(MSVC_VER, "15.0"): VCLIBS = $$replace(VCLIBS, 150, 140) - contains(MSVC_VER, "16.0"): VCLIBS = $$replace(VCLIBS, 160, 140) - VCLIBS = "$${VCLIBS}\" MinVersion=\"14.0.0.0\" Publisher=\"CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US" - WINRT_MANIFEST.dependencies += $$VCLIBS - } - - # Provide default values for required variables - isEmpty(WINRT_MANIFEST.target): WINRT_MANIFEST.target = $$TARGET - isEmpty(WINRT_MANIFEST.identity) { - # Reuse the existing UUID if possible - UUID_CACHE = $$OUT_PWD/.qmake.winrt_uuid_$$TARGET - exists($$UUID_CACHE) { - include($$UUID_CACHE) - } else { - WINRT_UUID = $$system(uuidgen) - isEmpty(WINRT_UUID): error("Unable to generate a UUID. Make sure uuidgen is in your PATH.") - WINRT_UUID = "WINRT_MANIFEST.identity = $$WINRT_UUID" - write_file($$UUID_CACHE, WINRT_UUID)|error("Unable to write the UUID cache; aborting.") - eval($$WINRT_UUID) - } - } - 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): 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.background): WINRT_MANIFEST.background = green - isEmpty(WINRT_MANIFEST.foreground): WINRT_MANIFEST.foreground = light - isEmpty(WINRT_MANIFEST.default_language): WINRT_MANIFEST.default_language = en - isEmpty(WINRT_MANIFEST.minVersion): \ - WINRT_MANIFEST.minVersion = $$WINDOWS_TARGET_PLATFORM_VERSION - isEmpty(WINRT_MANIFEST.maxVersionTested): \ - WINRT_MANIFEST.maxVersionTested = $$WINDOWS_TARGET_PLATFORM_MIN_VERSION - - INDENT = "$$escape_expand(\\r\\n) " - - VS_XML_NAMESPACE = "m2" - WINRT_MANIFEST.rotation_preference = $$unique(WINRT_MANIFEST.rotation_preference) - !isEmpty(WINRT_MANIFEST.rotation_preference) { - MANIFEST_ROTATION += "<$${VS_XML_NAMESPACE}:InitialRotationPreference>" - for(ROTATION, WINRT_MANIFEST.rotation_preference): \ - MANIFEST_ROTATION += " <$${VS_XML_NAMESPACE}:Rotation Preference=\"$$ROTATION\" />" - MANIFEST_ROTATION += "" - - WINRT_MANIFEST.rotation_preference = $$join(MANIFEST_ROTATION, $$INDENT, $$INDENT) - } - - INDENT = "$$escape_expand(\\r\\n) " - - # All Windows 10 applications need to have internetClient. - WINRT_MANIFEST.capabilities += internetClient - - contains(WINRT_MANIFEST.capabilities, defaults) { - WINRT_MANIFEST.capabilities -= defaults - WINRT_MANIFEST.capabilities += $$WINRT_MANIFEST.capabilities_default - } - - contains(WINRT_MANIFEST.capabilities_device, defaults) { - WINRT_MANIFEST.capabilities_device -= defaults - WINRT_MANIFEST.capabilities_device += $$WINRT_MANIFEST.capabilities_device_default - } - - UAP_CAPABILITIES += \ - appointments \ - blockedChatMessages \ - chat \ - contacts \ - enterpriseAuthentication \ - # internetClient is special, as it needs to be written without namespace - #internetClient \ - musicLibrary \ - objects3D \ - phoneCall \ - picturesLibrary \ - removableStorage \ - sharedUserCertificates \ - userAccountInformation \ - videosLibrary \ - voipCall - - UAP3_CAPABILITIES += backgroundMediaPlayback remoteSystem userNotificationListener - - IOT_CAPABILITIES += systemManagement - - # Capabilities are given as a string list and may change with the configuration (network, sensors, etc.) - WINRT_MANIFEST.capabilities = $$unique(WINRT_MANIFEST.capabilities) - WINRT_MANIFEST.capabilities_device = $$unique(WINRT_MANIFEST.capabilities_device) - !isEmpty(WINRT_MANIFEST.capabilities)|!isEmpty(WINRT_MANIFEST.capabilities_device) { - MANIFEST_CAPABILITIES += "" - for (CAPABILITY, WINRT_MANIFEST.capabilities) { - contains(UAP_CAPABILITIES, $$CAPABILITY): \ - MANIFEST_CAPABILITIES += " " - else:contains(UAP3_CAPABILITIES, $$CAPABILITY): \ - MANIFEST_CAPABILITIES += " " - else:contains(IOT_CAPABILITIES, $$CAPABILITY): \ - MANIFEST_CAPABILITIES += " " - else: \ - MANIFEST_CAPABILITIES += " " - } - for(CAPABILITY, WINRT_MANIFEST.capabilities_device): \ - MANIFEST_CAPABILITIES += " " - MANIFEST_CAPABILITIES += "" - - WINRT_MANIFEST.capabilities = $$join(MANIFEST_CAPABILITIES, $$INDENT, $$INDENT) - } - - # Dependencies are given as a string list. The CRT dependency is added automatically above. - # For MSVC2015/2017 the dependencies are added in conjunction with TargetDeviceFamily - # Due to the hard coded dependency on "Windows.Universal" the tag - # is already inside the MSVC2015 manifest. - WINRT_MANIFEST.dependencies = $$unique(WINRT_MANIFEST.dependencies) - !isEmpty(WINRT_MANIFEST.dependencies) { - for(DEPENDENCY, WINRT_MANIFEST.dependencies): \ - MANIFEST_DEPENDENCIES += " " - - WINRT_MANIFEST.dependencies = $$join(MANIFEST_DEPENDENCIES, $$INDENT, $$INDENT) - } - - # Provide default icons where needed - isEmpty(WINRT_ASSETS_PATH): WINRT_ASSETS_PATH = $$[QT_HOST_DATA/get]/mkspecs/common/winrt_winphone/assets - TEMPLATE_CONTENTS = $$cat($$WINRT_MANIFEST, lines) - ICONS_FOUND = $$find(TEMPLATE_CONTENTS, \\\$\\\$\\{WINRT_MANIFEST\\.(logo|tile)_) - ICONS_FOUND ~= s/.*\\\$\\\$\\{WINRT_MANIFEST\\.((logo|tile)_[^\}]+)\\}.*/\\1/g - for (ICON_NAME, ICONS_FOUND) { - ICON_FILE = $$eval(WINRT_MANIFEST.$$ICON_NAME) - isEmpty(ICON_FILE) { - equals(ICON_NAME, "logo_310x150"): ICON_FILE = $$eval(WINRT_MANIFEST.logo_wide) - else: equals(ICON_NAME, "logo_150x150"): ICON_FILE = $$eval(WINRT_MANIFEST.logo_large) - # Windows Phone specifics - else: equals(ICON_NAME, "logo_480x800"): ICON_FILE = $$eval(WINRT_MANIFEST.logo_splash) - else: equals(ICON_NAME, "logo_71x71"): ICON_FILE = $$eval(WINRT_MANIFEST.logo_medium) - else: equals(ICON_NAME, "logo_44x44"): ICON_FILE = $$eval(WINRT_MANIFEST.logo_small) - # Windows RT specifics - else: equals(ICON_NAME, "logo_620x300"): ICON_FILE = $$eval(WINRT_MANIFEST.logo_splash) - else: equals(ICON_NAME, "logo_70x70"): ICON_FILE = $$eval(WINRT_MANIFEST.logo_medium) - else: equals(ICON_NAME, "logo_30x30"): ICON_FILE = $$eval(WINRT_MANIFEST.logo_small) - } - 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) - } - - !contains(TEMPLATE, "vc.*") { - winrt_manifest_install.files = $$manifest_file.output - winrt_manifest_install.path = $$target.path - winrt_assets_install.files = $$BUILD_DIR/assets/* - winrt_assets_install.path = $$target.path/assets - INSTALLS += winrt_manifest_install winrt_assets_install - } - } else { - manifest_file.CONFIG += verbatim - } - - QMAKE_SUBSTITUTES += manifest_file -} -- cgit v1.2.3