From ae379aa5a0afc859b7a18a72f519460fe16a4322 Mon Sep 17 00:00:00 2001 From: Tristan Labelle Date: Fri, 20 Sep 2024 07:32:38 -0400 Subject: [PATCH] Build the entire project from the root CMakeLists.txt (#304) --- .github/workflows/build-and-test.yml | 6 +- CMakeLists.txt | 30 +- Generator/Package.swift | 2 +- Generator/Sources/SwiftWinRT/CMakeLists.txt | 16 +- .../SwiftWinRT/Extensions/CMakeLists.txt | 23 ++ InteropTests/BuildAndGenerate.ps1 | 8 +- InteropTests/CMakeLists.txt | 51 ++- InteropTests/WinRTComponent/.gitignore | 6 - InteropTests/WinRTComponent/Build.ps1 | 40 -- InteropTests/WinRTComponent/CMakeLists.txt | 50 +++ InteropTests/WinRTComponent/CMakePresets.json | 28 ++ .../{All.idl => WinRTComponent.idl} | 54 +-- .../WinRTComponent/WinRTComponent.sln | 43 --- .../WinRTComponent/WinRTComponent.vcxproj | 364 ------------------ InteropTests/WinRTComponent/pch.cpp | 1 - 15 files changed, 191 insertions(+), 531 deletions(-) create mode 100644 Generator/Sources/SwiftWinRT/Extensions/CMakeLists.txt delete mode 100644 InteropTests/WinRTComponent/.gitignore delete mode 100644 InteropTests/WinRTComponent/Build.ps1 create mode 100644 InteropTests/WinRTComponent/CMakeLists.txt create mode 100644 InteropTests/WinRTComponent/CMakePresets.json rename InteropTests/WinRTComponent/{All.idl => WinRTComponent.idl} (97%) delete mode 100644 InteropTests/WinRTComponent/WinRTComponent.sln delete mode 100644 InteropTests/WinRTComponent/WinRTComponent.vcxproj delete mode 100644 InteropTests/WinRTComponent/pch.cpp diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index 4a12c8c8..97b89f1c 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -10,7 +10,7 @@ on: workflow_dispatch: jobs: - support-spm: + spm-support: name: SPM - Support Module runs-on: windows-2022 timeout-minutes: 10 @@ -27,7 +27,7 @@ jobs: shell: pwsh run: swift test --verbose --skip-build - generator-and-interoptests-spm: + spm-generator-and-interoptests: name: SPM - Generator and InteropTests runs-on: windows-2022 timeout-minutes: 15 @@ -46,7 +46,7 @@ jobs: shell: pwsh run: swift test --verbose --skip-build - - name: Build Test WinRT Component + - name: Build WinRTComponent working-directory: InteropTests shell: pwsh run: '& .\BuildAndGenerate.ps1' diff --git a/CMakeLists.txt b/CMakeLists.txt index 9d8e9ab2..75fd1e54 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -4,17 +4,23 @@ project(SwiftWinRT LANGUAGES C Swift) add_subdirectory(Support) -include(ExternalProject) +# InteropTests depends on SwiftWinRT.exe, so build it now +message(STATUS "Configuring Generator subproject...") +execute_process( + COMMAND ${CMAKE_COMMAND} + -S "${CMAKE_CURRENT_SOURCE_DIR}/Generator" + -B "${CMAKE_CURRENT_BINARY_DIR}/Generator" + -G "${CMAKE_GENERATOR}" + -D "CMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}" + -D "CMAKE_C_COMPILER=${CMAKE_C_COMPILER}" + -D "CMAKE_Swift_COMPILER=${CMAKE_Swift_COMPILER}" + COMMAND_ERROR_IS_FATAL ANY) -ExternalProject_Add(Generator - SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/Generator - BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/Generator - INSTALL_COMMAND "") -set(SWIFT_WINRT_EXE ${CMAKE_CURRENT_BINARY_DIR}/Generator/Sources/SwiftWinRT/SwiftWinRT.exe) +message(STATUS "Building Generator subproject...") +execute_process( + COMMAND ${CMAKE_COMMAND} --build "${CMAKE_CURRENT_BINARY_DIR}/Generator" + COMMAND_ERROR_IS_FATAL ANY) +set(SWIFT_WINRT_EXE "${CMAKE_CURRENT_BINARY_DIR}/Generator/Sources/SwiftWinRT/SwiftWinRT.exe") -ExternalProject_Add(InteropTests - SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/InteropTests - BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/InteropTests - CMAKE_ARGS -DSWIFT_WINRT_EXE=${SWIFT_WINRT_EXE} - INSTALL_COMMAND "" - DEPENDS Generator) \ No newline at end of file +# Now build InteropTests, which depends on SWIFT_WINRT_EXE +add_subdirectory(InteropTests) \ No newline at end of file diff --git a/Generator/Package.swift b/Generator/Package.swift index ef225f22..2b50413f 100644 --- a/Generator/Package.swift +++ b/Generator/Package.swift @@ -36,7 +36,7 @@ let package = Package( .product(name: "DotNetMetadata", package: "swift-dotnetmetadata") ], path: "Sources/SwiftWinRT", - exclude: [ "CMakeLists.txt" ], + exclude: [ "CMakeLists.txt", "Extensions/CMakeLists.txt" ], resources: [ // Avoid the .swift extension or SPM will pick those up a source files. .embedInCode("Extensions/WindowsFoundation_IAsyncAction_swift"), diff --git a/Generator/Sources/SwiftWinRT/CMakeLists.txt b/Generator/Sources/SwiftWinRT/CMakeLists.txt index 7fafad8a..e76d1b55 100644 --- a/Generator/Sources/SwiftWinRT/CMakeLists.txt +++ b/Generator/Sources/SwiftWinRT/CMakeLists.txt @@ -1,18 +1,8 @@ +add_subdirectory(Extensions) + file(GLOB_RECURSE SOURCES *.swift) add_executable(SwiftWinRT ${SOURCES}) - -file(GLOB RESOURCES Extensions/*_swift) -set(PACKAGERESOURCES_SWIFT ${CMAKE_CURRENT_BINARY_DIR}/PackageResources.swift) -file(WRITE ${PACKAGERESOURCES_SWIFT} "enum PackageResources {\n") -foreach(RESOURCE ${RESOURCES}) - get_filename_component(RESOURCE_NAME ${RESOURCE} NAME) - file(READ ${RESOURCE} RESOURCE_HEX HEX) - string(REGEX REPLACE "([0-9a-f][0-9a-f])" "0x\\1," RESOURCE_HEX ${RESOURCE_HEX}) - file(APPEND ${PACKAGERESOURCES_SWIFT} " static let ${RESOURCE_NAME}: [UInt8] = [ ${RESOURCE_HEX} ]\n") -endforeach() -file(APPEND ${PACKAGERESOURCES_SWIFT} "}\n") -target_sources(SwiftWinRT PRIVATE ${PACKAGERESOURCES_SWIFT}) - +target_sources(SwiftWinRT PRIVATE "${PACKAGERESOURCES_SWIFT_FILE}") target_link_libraries(SwiftWinRT PRIVATE ArgumentParser Collections DotNetMetadata DotNetMetadataFormat WindowsMetadata CodeWriters ProjectionModel) \ No newline at end of file diff --git a/Generator/Sources/SwiftWinRT/Extensions/CMakeLists.txt b/Generator/Sources/SwiftWinRT/Extensions/CMakeLists.txt new file mode 100644 index 00000000..eb0367ea --- /dev/null +++ b/Generator/Sources/SwiftWinRT/Extensions/CMakeLists.txt @@ -0,0 +1,23 @@ +# Build the resource embedding code +set(PACKAGERESOURCES_CODE "enum PackageResources {\n") +file(GLOB RESOURCES "*_swift") +foreach(RESOURCE ${RESOURCES}) + get_filename_component(RESOURCE_NAME ${RESOURCE} NAME) + file(READ ${RESOURCE} RESOURCE_HEX HEX) + string(REGEX REPLACE "([0-9a-f][0-9a-f])" "0x\\1," RESOURCE_HEX ${RESOURCE_HEX}) + string(APPEND PACKAGERESOURCES_CODE " static let ${RESOURCE_NAME}: [UInt8] = [ ${RESOURCE_HEX} ]\n") +endforeach() +string(APPEND PACKAGERESOURCES_CODE "}\n") + +# Update the file if the code has changed +set(PACKAGERESOURCES_SWIFT_FILE "${CMAKE_CURRENT_BINARY_DIR}/PackageResources.swift") +set(PACKAGERESOURCES_OLD_CODE "") +if(EXISTS "${PACKAGERESOURCES_SWIFT_FILE}") + file(READ "${PACKAGERESOURCES_SWIFT_FILE}" PACKAGERESOURCES_OLD_CODE) +endif() +if(NOT "${PACKAGERESOURCES_CODE}" STREQUAL "${PACKAGERESOURCES_OLD_CODE}") + file(WRITE "${PACKAGERESOURCES_SWIFT_FILE}" "${PACKAGERESOURCES_CODE}") +endif() + +# Return the path +set(PACKAGERESOURCES_SWIFT_FILE "${PACKAGERESOURCES_SWIFT_FILE}" PARENT_SCOPE) diff --git a/InteropTests/BuildAndGenerate.ps1 b/InteropTests/BuildAndGenerate.ps1 index b4b7fbe6..d86e0d0e 100644 --- a/InteropTests/BuildAndGenerate.ps1 +++ b/InteropTests/BuildAndGenerate.ps1 @@ -17,8 +17,12 @@ if ($LASTEXITCODE -ne 0) { throw "Failed to build SwiftWinRT.exe" } $SwiftWinRT = "$GeneratorProjectDir\.build\$SwiftConfiguration\SwiftWinRT.exe" Write-Host -ForegroundColor Cyan "Building WinRTComponent.dll & winmd..." -$MSBuildConfiguration = if ($Release) { "Release" } else { "Debug" } -$WinRTComponentBinDir = & "$PSScriptRoot\WinRTComponent\Build.ps1" -Configuration $MSBuildConfiguration +$CMakePreset = if ($Release) { "release" } else { "debug" } +Push-Location "$PSScriptRoot\WinRTComponent" +& cmake.exe --preset $CMakePreset +& cmake.exe --build --preset $CMakePreset +Pop-Location +$WinRTComponentBinDir = "$PSScriptRoot\WinRTComponent\build\$CMakePreset" Write-Host -ForegroundColor Cyan "Generating Swift projection for WinRT component..." & "$PSScriptRoot\GenerateProjection.ps1" -SwiftWinRT $SwiftWinRT -WinMD "$WinRTComponentBinDir\WinRTComponent.winmd" diff --git a/InteropTests/CMakeLists.txt b/InteropTests/CMakeLists.txt index bd63ba13..2f424f48 100644 --- a/InteropTests/CMakeLists.txt +++ b/InteropTests/CMakeLists.txt @@ -1,40 +1,53 @@ cmake_minimum_required(VERSION 3.21.0) -project(InteropTests LANGUAGES C Swift) +if(NOT DEFINED CMAKE_PROJECT_NAME) + project(InteropTests LANGUAGES C Swift) +endif() if (NOT DEFINED SWIFT_WINRT_EXE) message(FATAL_ERROR "SWIFT_WINRT_EXE must be defined") endif() cmake_path(ABSOLUTE_PATH SWIFT_WINRT_EXE NORMALIZE OUTPUT_VARIABLE SWIFT_WINRT_EXE) -# Build WinRTComponent.winmd/dll -message(STATUS "Building WinRTComponent...") -cmake_path(CONVERT "${CMAKE_CURRENT_SOURCE_DIR}/WinRTComponent/Build.ps1" TO_NATIVE_PATH_LIST SCRIPT_PATH_ARG) -set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS "${SCRIPT_PATH_ARG}") -cmake_path(CONVERT "${CMAKE_CURRENT_BINARY_DIR}/WinRTComponent" TO_NATIVE_PATH_LIST BINARY_DIR_BASE_ARG) +# Generating projection sources will depend on WinRTComponent.winmd, so build it now +message(STATUS "Configuring WinRTComponent subproject...") +execute_process( + COMMAND ${CMAKE_COMMAND} + -S "${CMAKE_CURRENT_SOURCE_DIR}/WinRTComponent" + -B "${CMAKE_CURRENT_BINARY_DIR}/WinRTComponent" + -G "${CMAKE_GENERATOR}" + -D "CMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}" + -D CMAKE_CXX_COMPILER=cl.exe + -D "CMAKE_CXX_FLAGS=/std:c++latest /W4 /EHsc" + COMMAND_ERROR_IS_FATAL ANY) + +message(STATUS "Building WinRTComponent subproject...") execute_process( - COMMAND powershell.exe -File "${SCRIPT_PATH_ARG}" - -BinaryDirBase "${BINARY_DIR_BASE_ARG}" + COMMAND ${CMAKE_COMMAND} + --build "${CMAKE_CURRENT_BINARY_DIR}/WinRTComponent" COMMAND_ERROR_IS_FATAL ANY) -set(WINRTCOMPONENT_BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}/WinRTComponent/bin/WinRTComponent") +set(WINRTCOMPONENT_BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}/WinRTComponent") # Generate Swift projection message(STATUS "Generating Swift projection for WinRTComponent...") -cmake_path(CONVERT "${CMAKE_CURRENT_SOURCE_DIR}/GenerateProjection.ps1" TO_NATIVE_PATH_LIST SCRIPT_PATH_ARG) -cmake_path(CONVERT "${SWIFT_WINRT_EXE}" TO_NATIVE_PATH_LIST SWIFT_WINRT_EXE_ARG) -cmake_path(CONVERT "${WINRTCOMPONENT_BINARY_DIR}/WinRTComponent.winmd" TO_NATIVE_PATH_LIST WINMD_ARG) -cmake_path(CONVERT "${CMAKE_CURRENT_BINARY_DIR}/Generated/Sources" TO_NATIVE_PATH_LIST OUTPUT_DIR_ARG) +cmake_path(CONVERT "${CMAKE_CURRENT_SOURCE_DIR}/GenerateProjection.ps1" TO_NATIVE_PATH_LIST SCRIPT_PATH_NATIVE) +cmake_path(CONVERT "${SWIFT_WINRT_EXE}" TO_NATIVE_PATH_LIST SWIFT_WINRT_EXE_NATIVE) +cmake_path(CONVERT "${WINRTCOMPONENT_BINARY_DIR}/WinRTComponent.winmd" TO_NATIVE_PATH_LIST WINMD_NATIVE) +cmake_path(CONVERT "${CMAKE_CURRENT_BINARY_DIR}/Generated/Sources" TO_NATIVE_PATH_LIST OUTPUT_DIR_NATIVE) set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS "${SCRIPT_PATH_ARG}") execute_process( - COMMAND powershell.exe -File "${SCRIPT_PATH_ARG}" - -SwiftWinRT "${SWIFT_WINRT_EXE_ARG}" - -WinMD "${WINMD_ARG}" - -OutputDir "${OUTPUT_DIR_ARG}" + COMMAND powershell.exe -File "${SCRIPT_PATH_NATIVE}" + -SwiftWinRT "${SWIFT_WINRT_EXE_NATIVE}" + -WinMD "${WINMD_NATIVE}" + -OutputDir "${OUTPUT_DIR_NATIVE}" COMMAND_ERROR_IS_FATAL ANY) -# Build the Swift projection -add_subdirectory(../Support ${CMAKE_CURRENT_BINARY_DIR}/Support) +# Build the support module if not already the case (by root CMakeLists.txt) +if(NOT TARGET WindowsRuntime) + add_subdirectory(../Support "${CMAKE_CURRENT_BINARY_DIR}/Support") +endif() +# Build the Swift projection # TODO(https://github.com/tristanlabelle/swift-winrt/issues/302): Fix linking issues # add_subdirectory( # ${CMAKE_CURRENT_BINARY_DIR}/Generated/Sources diff --git a/InteropTests/WinRTComponent/.gitignore b/InteropTests/WinRTComponent/.gitignore deleted file mode 100644 index 7f189a11..00000000 --- a/InteropTests/WinRTComponent/.gitignore +++ /dev/null @@ -1,6 +0,0 @@ -bin/ -obj/ -packages/ -Debug/ -Release/ -Generated Files/ \ No newline at end of file diff --git a/InteropTests/WinRTComponent/Build.ps1 b/InteropTests/WinRTComponent/Build.ps1 deleted file mode 100644 index 5d566425..00000000 --- a/InteropTests/WinRTComponent/Build.ps1 +++ /dev/null @@ -1,40 +0,0 @@ -[CmdletBinding(PositionalBinding = $false)] -param( - [string] $Platform = "", - [string] $Configuration = "Debug", - [string] $BinaryDirBase = "" -) - -Set-StrictMode -Version 3 -$ErrorActionPreference = "Stop" - -switch ($Env:PROCESSOR_ARCHITECTURE) { - "ARM64" { $Platform = "arm64" } - "AMD64" { $Platform = "x64" } - "x86" { $Platform = "x86" } - default { throw "Unsupported architecture: $($Env:PROCESSOR_ARCHITECTURE)" } -} - -if ($BinaryDirBase) { - $IntermediateOutputPath = "$BinaryDirBase\obj\" - $OutDir = "$BinaryDirBase\bin\" -} -else { - $IntermediateOutputPath = "$PSScriptRoot\obj\$Configuration\$Platform\" - $OutDir = "$PSScriptRoot\bin\$Configuration\$Platform\" -} - -& msbuild.exe -restore ` - -p:RestorePackagesConfig=true ` - -p:Platform=$Platform ` - -p:Configuration=$Configuration ` - -p:IntermediateOutputPath=$IntermediateOutputPath ` - -p:OutDir=$OutDir ` - -verbosity:minimal ` - $PSScriptRoot\WinRTComponent.vcxproj | Write-Host -if ($LASTEXITCODE -ne 0) { throw "Failed to build WinRT component" } - -if ($MyInvocation.PSCommandPath) { - # Return the path to PowerShell - Write-Output "$OutDir\WinRTComponent" -} \ No newline at end of file diff --git a/InteropTests/WinRTComponent/CMakeLists.txt b/InteropTests/WinRTComponent/CMakeLists.txt new file mode 100644 index 00000000..30fb8b1a --- /dev/null +++ b/InteropTests/WinRTComponent/CMakeLists.txt @@ -0,0 +1,50 @@ +cmake_minimum_required(VERSION 3.21.0) + +project(WinRTComponent LANGUAGES CXX) + +# Generate the WinMDs from the idl files +message(STATUS "Generating WinRTComponent.winmd...") +set(MIDLRT.EXE_PATH_NATIVE "$ENV{WindowsSdkVerBinPath}$ENV{VSCMD_ARG_HOST_ARCH}\\midlrt.exe") +cmake_path(CONVERT "$ENV{WindowsSdkDir}References\\$ENV{WindowsSDKVersion}" TO_CMAKE_PATH_LIST WINSDK_REFERENCES_DIR NORMALIZE) +set(FOUNDATIONCONTRACT_DIR "${WINSDK_REFERENCES_DIR}/Windows.Foundation.FoundationContract/4.0.0.0") +cmake_path(CONVERT "${FOUNDATIONCONTRACT_DIR}" TO_NATIVE_PATH_LIST METADATA_DIR_NATIVE) +cmake_path(CONVERT "${FOUNDATIONCONTRACT_DIR}/Windows.Foundation.FoundationContract.winmd" TO_NATIVE_PATH_LIST FOUNDATIONCONTRACT_WINMD_NATIVE) +cmake_path(CONVERT "${WINSDK_REFERENCES_DIR}/Windows.Foundation.UniversalApiContract/15.0.0.0/Windows.Foundation.UniversalApiContract.winmd" TO_NATIVE_PATH_LIST UNIVERSALAPICONTRACT_WINMD_NATIVE) +cmake_path(CONVERT "${CMAKE_CURRENT_BINARY_DIR}/WinRTComponent.winmd" TO_NATIVE_PATH_LIST WINRTCOMPONENT_WINMD_PATH_NATIVE) +cmake_path(CONVERT "${CMAKE_CURRENT_BINARY_DIR}/WinRTComponent.h" TO_NATIVE_PATH_LIST WINRTCOMPONENT_H_PATH_NATIVE) +cmake_path(CONVERT "${CMAKE_CURRENT_SOURCE_DIR}/WinRTComponent.idl" TO_NATIVE_PATH_LIST IDL_PATH_NATIVE) +execute_process( + COMMAND "${MIDLRT.EXE_PATH_NATIVE}" + /W1 /nologo /nomidl + /metadata_dir "${METADATA_DIR_NATIVE}" + /reference "${FOUNDATIONCONTRACT_WINMD_NATIVE}" + /reference "${UNIVERSALAPICONTRACT_WINMD_NATIVE}" + /winmd "${WINRTCOMPONENT_WINMD_PATH_NATIVE}" + /header "${WINRTCOMPONENT_H_PATH_NATIVE}" + "${IDL_PATH_NATIVE}" + COMMAND_ERROR_IS_FATAL ANY) + +# Generate the C++/WinRT boilerplate +message(STATUS "Generating C++/WinRT boilerplate for WinRTComponent...") +set(CPPWINRT.EXE_PATH_NATIVE "$ENV{WindowsSdkVerBinPath}$ENV{VSCMD_ARG_HOST_ARCH}\\cppwinrt.exe") +string(REPLACE "\\" "" WINSDK_VERSION "$ENV{WindowsSDKVersion}") +set(CPPWINRT_GENERATED_DIR "${CMAKE_CURRENT_BINARY_DIR}/CppWinRT") +cmake_path(CONVERT "${CPPWINRT_GENERATED_DIR}" TO_NATIVE_PATH_LIST CPPWINRT_GENERATED_DIR_NATIVE) +execute_process( + COMMAND "${CPPWINRT.EXE_PATH_NATIVE}" + -input "${WINRTCOMPONENT_WINMD_PATH_NATIVE}" + -reference "${WINSDK_VERSION}" + -component "${CPPWINRT_GENERATED_DIR_NATIVE}" -overwrite -optimize + -output "${CPPWINRT_GENERATED_DIR_NATIVE}" + COMMAND_ERROR_IS_FATAL ANY) + +# Build WinRTComponent.dll +file(GLOB SOURCES "*.cpp") +add_library(WinRTComponent SHARED + ${SOURCES} + "${CPPWINRT_GENERATED_DIR}/module.g.cpp" # Other .g.cpp files are #included by our .cpp files + WinRTComponent.def) +target_include_directories(WinRTComponent PRIVATE + "${CMAKE_CURRENT_SOURCES_DIR}" + "${CPPWINRT_GENERATED_DIR}") +target_precompile_headers(WinRTComponent PRIVATE pch.h) \ No newline at end of file diff --git a/InteropTests/WinRTComponent/CMakePresets.json b/InteropTests/WinRTComponent/CMakePresets.json new file mode 100644 index 00000000..0be93309 --- /dev/null +++ b/InteropTests/WinRTComponent/CMakePresets.json @@ -0,0 +1,28 @@ +{ + "version": 3, + "cmakeMinimumRequired": { + "major": 3, + "minor": 21, + "patch": 0 + }, + "configurePresets": [ + { + "name": "debug", + "displayName": "Debug", + "generator": "Ninja", + "binaryDir": "${sourceDir}/build/debug", + "cacheVariables": { + "CMAKE_BUILD_TYPE": "Debug", + "CMAKE_CXX_COMPILER": "cl", + "CMAKE_CXX_FLAGS": "/std:c++latest /W4 /EHsc" + } + } + ], + "buildPresets": [ + { + "name": "debug", + "displayName": "Debug", + "configurePreset": "debug" + } + ] + } \ No newline at end of file diff --git a/InteropTests/WinRTComponent/All.idl b/InteropTests/WinRTComponent/WinRTComponent.idl similarity index 97% rename from InteropTests/WinRTComponent/All.idl rename to InteropTests/WinRTComponent/WinRTComponent.idl index 7616c3bf..a6bb1958 100644 --- a/InteropTests/WinRTComponent/All.idl +++ b/InteropTests/WinRTComponent/WinRTComponent.idl @@ -1,28 +1,28 @@ -// Includes all .idl files so we have a single entry in the vcxproj. -// This speeds up the build by avoiding multiple midlrt calls followed by an mdmerge step. -#include "Arrays.idl" -#include "ByteBuffers.idl" -#include "Collections.idl" -#include "DateTimes.idl" -#include "Enums.idl" -#include "Errors.idl" -#include "Events.idl" -#include "ForCustomActivationFactoryResolution.idl" -#include "InspectableBoxing.idl" -#include "Int32Wrapper.idl" -#include "InterfaceCasting.idl" -#include "ManualAsyncOperation.idl" -#include "MinimalTypes.idl" -#include "MinimalUnsealedClasses.idl" -#include "NullValues.idl" -#include "Numbers.idl" -#include "ObjectReferencer.idl" -#include "OutputArgument.idl" -#include "OverloadedSum.idl" -#include "ReferenceBoxing.idl" -#include "ReturnArgument.idl" -#include "Strings.idl" -#include "Structs.idl" -#include "SwiftAttributes.idl" -#include "SwiftEnum.idl" +// Includes all .idl files so we have a single entry in the vcxproj. +// This speeds up the build by avoiding multiple midlrt calls followed by an mdmerge step. +#include "Arrays.idl" +#include "ByteBuffers.idl" +#include "Collections.idl" +#include "DateTimes.idl" +#include "Enums.idl" +#include "Errors.idl" +#include "Events.idl" +#include "ForCustomActivationFactoryResolution.idl" +#include "InspectableBoxing.idl" +#include "Int32Wrapper.idl" +#include "InterfaceCasting.idl" +#include "ManualAsyncOperation.idl" +#include "MinimalTypes.idl" +#include "MinimalUnsealedClasses.idl" +#include "NullValues.idl" +#include "Numbers.idl" +#include "ObjectReferencer.idl" +#include "OutputArgument.idl" +#include "OverloadedSum.idl" +#include "ReferenceBoxing.idl" +#include "ReturnArgument.idl" +#include "Strings.idl" +#include "Structs.idl" +#include "SwiftAttributes.idl" +#include "SwiftEnum.idl" #include "WeakReferencer.idl" \ No newline at end of file diff --git a/InteropTests/WinRTComponent/WinRTComponent.sln b/InteropTests/WinRTComponent/WinRTComponent.sln deleted file mode 100644 index f1d7f55b..00000000 --- a/InteropTests/WinRTComponent/WinRTComponent.sln +++ /dev/null @@ -1,43 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 17 -VisualStudioVersion = 17.7.34003.232 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WinRTComponent", "WinRTComponent.vcxproj", "{0E4C927C-631D-4D48-8BEC-658562BB86A5}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|ARM = Debug|ARM - Debug|ARM64 = Debug|ARM64 - Debug|x64 = Debug|x64 - Debug|x86 = Debug|x86 - Release|ARM = Release|ARM - Release|ARM64 = Release|ARM64 - Release|x64 = Release|x64 - Release|x86 = Release|x86 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {0E4C927C-631D-4D48-8BEC-658562BB86A5}.Debug|ARM.ActiveCfg = Debug|ARM - {0E4C927C-631D-4D48-8BEC-658562BB86A5}.Debug|ARM.Build.0 = Debug|ARM - {0E4C927C-631D-4D48-8BEC-658562BB86A5}.Debug|ARM64.ActiveCfg = Debug|ARM64 - {0E4C927C-631D-4D48-8BEC-658562BB86A5}.Debug|ARM64.Build.0 = Debug|ARM64 - {0E4C927C-631D-4D48-8BEC-658562BB86A5}.Debug|x64.ActiveCfg = Debug|x64 - {0E4C927C-631D-4D48-8BEC-658562BB86A5}.Debug|x64.Build.0 = Debug|x64 - {0E4C927C-631D-4D48-8BEC-658562BB86A5}.Debug|x86.ActiveCfg = Debug|Win32 - {0E4C927C-631D-4D48-8BEC-658562BB86A5}.Debug|x86.Build.0 = Debug|Win32 - {0E4C927C-631D-4D48-8BEC-658562BB86A5}.Release|ARM.ActiveCfg = Release|ARM - {0E4C927C-631D-4D48-8BEC-658562BB86A5}.Release|ARM.Build.0 = Release|ARM - {0E4C927C-631D-4D48-8BEC-658562BB86A5}.Release|ARM64.ActiveCfg = Release|ARM64 - {0E4C927C-631D-4D48-8BEC-658562BB86A5}.Release|ARM64.Build.0 = Release|ARM64 - {0E4C927C-631D-4D48-8BEC-658562BB86A5}.Release|x64.ActiveCfg = Release|x64 - {0E4C927C-631D-4D48-8BEC-658562BB86A5}.Release|x64.Build.0 = Release|x64 - {0E4C927C-631D-4D48-8BEC-658562BB86A5}.Release|x86.ActiveCfg = Release|Win32 - {0E4C927C-631D-4D48-8BEC-658562BB86A5}.Release|x86.Build.0 = Release|Win32 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {1A7BB7BF-A0D5-485F-91C0-57501B2FBEBD} - EndGlobalSection -EndGlobal diff --git a/InteropTests/WinRTComponent/WinRTComponent.vcxproj b/InteropTests/WinRTComponent/WinRTComponent.vcxproj deleted file mode 100644 index bdffc5c2..00000000 --- a/InteropTests/WinRTComponent/WinRTComponent.vcxproj +++ /dev/null @@ -1,364 +0,0 @@ - - - - - true - true - true - true - {0e4c927c-631d-4d48-8bec-658562bb86a5} - WinRTComponent - WinRTComponent - en-US - 14.0 - true - Windows Store - 10.0 - 10.0.22621.0 - 10.0.17134.0 - obj\$(Configuration)\$(Platform)\ - $(IntDir)Generated\ - bin\$(Configuration)\$(Platform)\ - - - - - Debug - ARM - - - Debug - ARM64 - - - Debug - Win32 - - - Debug - x64 - - - Release - ARM - - - Release - ARM64 - - - Release - Win32 - - - Release - x64 - - - - DynamicLibrary - v143 - v142 - v141 - v140 - Unicode - true - true - - - true - true - - - false - true - false - - - - - - - - Use - pch.h - $(IntDir)pch.pch - Level4 - %(AdditionalOptions) /bigobj - _WINRT_DLL;WIN32_LEAN_AND_MEAN;WINRT_LEAN_AND_MEAN;%(PreprocessorDefinitions) - $(WindowsSDK_WindowsMetadata);$(AdditionalUsingDirectories) - - - Console - false - WinRTComponent.def - - - - - _DEBUG;%(PreprocessorDefinitions) - - - - - NDEBUG;%(PreprocessorDefinitions) - - - true - true - - - - - - - - Arrays.idl - - - ByteBuffers.idl - - - Collections.idl - - - DateTimes.idl - - - Events.idl - - - MinimalTypes.idl - - - Errors.idl - - - ForCustomActivationFactoryResolution.idl - - - InspectableBoxing.idl - - - InterfaceCasting.idl - - - Int32Wrapper.idl - - - ManualAsyncOperation.idl - - - MinimalUnsealedClasses.idl - - - NullValues.idl - - - Numbers.idl - - - ObjectReferencer.idl - - - OutputArgument.idl - - - OverloadedSum.idl - - - ReferenceBoxing.idl - - - ReturnArgument.idl - - - Strings.idl - - - Structs.idl - - - SwiftAttributes.idl - - - WeakReferencer.idl - - - - - Create - - - - - - Arrays.idl - - - ByteBuffers.idl - - - Collections.idl - - - DateTimes.idl - - - Events.idl - - - MinimalTypes.idl - - - Errors.idl - - - ForCustomActivationFactoryResolution.idl - - - InspectableBoxing.idl - - - InterfaceCasting.idl - - - Int32Wrapper.idl - - - ManualAsyncOperation.idl - - - MinimalUnsealedClasses.idl - - - NullValues.idl - - - Numbers.idl - - - ObjectReferencer.idl - - - OutputArgument.idl - - - OverloadedSum.idl - - - ReferenceBoxing.idl - - - ReturnArgument.idl - - - Strings.idl - - - Structs.idl - - - SwiftAttributes.idl - - - WeakReferencer.idl - - - - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - \ No newline at end of file diff --git a/InteropTests/WinRTComponent/pch.cpp b/InteropTests/WinRTComponent/pch.cpp deleted file mode 100644 index bcb5590b..00000000 --- a/InteropTests/WinRTComponent/pch.cpp +++ /dev/null @@ -1 +0,0 @@ -#include "pch.h"