diff --git a/.github/actions/setup-llvm-mingw/action.yml b/.github/actions/setup-llvm-mingw/action.yml index 04942cce4..9926bbe93 100644 --- a/.github/actions/setup-llvm-mingw/action.yml +++ b/.github/actions/setup-llvm-mingw/action.yml @@ -12,19 +12,20 @@ inputs: outputs: llvm-path: description: "The path in which llvm-mingw is installed to" - value: ${{ steps.setup-llvm.outputs.llvm-path }} + value: ${{ ((runner.os == 'Windows') && steps.setup-llvm.outputs.llvm-path) || steps.setup-llvm-linux.outputs.llvm-path }} runs: using: "composite" steps: - - name: Cache llvm-mingw + - name: Cache llvm-mingw (Windows) id: cache-llvm + if: runner.os == 'Windows' uses: actions/cache@v3 with: path: .llvm-mingw key: llvm-mingw-${{ runner.os }}-${{ inputs.llvm-mingw-version }}-${{ inputs.host-arch }} - - name: Install llvm-mingw ${{ inputs.llvm-mingw-version }} (${{ inputs.host-arch }}) - if: steps.cache-llvm.outputs.cache-hit != 'true' + - name: Install llvm-mingw ${{ inputs.llvm-mingw-version }} (Windows ${{ inputs.host-arch }}) + if: runner.os == 'Windows' && steps.cache-llvm.outputs.cache-hit != 'true' shell: pwsh run: | $llvm_mingw_version = "${{ inputs.llvm-mingw-version }}" @@ -33,8 +34,9 @@ runs: 7z x llvm-mingw.zip -o"$pwd\.llvm-mingw" rm llvm-mingw.zip - - name: Set up llvm-mingw + - name: Set up llvm-mingw (Windows) id: setup-llvm + if: runner.os == 'Windows' shell: pwsh run: | $llvm_mingw_version = "${{ inputs.llvm-mingw-version }}" @@ -44,3 +46,34 @@ runs: Add-Content $env:GITHUB_PATH "$pwd\.llvm-mingw\llvm-mingw-${llvm_mingw_version}-ucrt-${llvm_arch}\bin" # for the ASAN runtime DLL: Add-Content $env:GITHUB_PATH "$pwd\.llvm-mingw\llvm-mingw-${llvm_mingw_version}-ucrt-${llvm_arch}\${llvm_arch}-w64-mingw32\bin" + + - name: Cache llvm-mingw (Linux) + id: cache-llvm-linux + if: runner.os == 'Linux' + uses: actions/cache@v3 + with: + path: /opt/llvm-mingw + key: llvm-mingw-${{ runner.os }}-${{ inputs.llvm-mingw-version }}-${{ inputs.host-arch }} + + - name: Install llvm-mingw ${{ inputs.llvm-mingw-version }} (Linux ${{ inputs.host-arch }}) + if: runner.os == 'Linux' && steps.cache-llvm-linux.outputs.cache-hit != 'true' + shell: bash + run: | + llvm_mingw_version="${{ inputs.llvm-mingw-version }}" + llvm_arch="${{ inputs.host-arch }}" + mkdir -p /opt/llvm-mingw + cd /opt/llvm-mingw + curl -L https://github.com/mstorsjo/llvm-mingw/releases/download/20220906/llvm-mingw-${llvm_mingw_version}-ucrt-ubuntu-18.04-${llvm_arch}.tar.xz | tar xJ --strip-components=1 + + - name: Set up llvm-mingw (Linux) + id: setup-llvm-linux + if: runner.os == 'Linux' + shell: bash + run: | + cd /opt/llvm-mingw + if [ ! -x bin/clang++ ]; then + echo "$PWD/bin/clang++ not found or not executable!" + exit 1 + fi + echo "llvm-path=$PWD/llvm-mingw" >> $GITHUB_OUTPUT + echo "$PWD/bin" >> $GITHUB_PATH diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 36de522bf..dca6c31bc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -252,6 +252,7 @@ jobs: test-llvm-mingw-cppwinrt: name: 'llvm-mingw: Build and test' strategy: + fail-fast: false matrix: arch: [i686, x86_64] config: [Debug, Release] @@ -262,6 +263,8 @@ jobs: - id: setup-llvm name: Set up llvm-mingw uses: ./.github/actions/setup-llvm-mingw + with: + host-arch: ${{ matrix.arch }} - name: Build cppwinrt run: | @@ -335,19 +338,117 @@ jobs: name: 'cross: Test run on Windows' needs: build-linux-cross-cppwinrt strategy: + fail-fast: false matrix: arch: [i686, x86_64] runs-on: windows-latest steps: + - uses: actions/checkout@v3 + - name: Fetch cppwinrt executable uses: actions/download-artifact@v3 with: name: cross-build-${{ matrix.arch }}-bin - path: ./ + path: ./.test - name: Run cppwinrt to build projection run: | - .\cppwinrt.exe -in local -out .\ -verbose + .\.test\cppwinrt.exe -in local -out .\.test\out -verbose + + - id: setup-llvm + name: Set up llvm-mingw + uses: ./.github/actions/setup-llvm-mingw + with: + host-arch: ${{ matrix.arch }} + + - name: Build cppwinrt tests + run: | + mkdir build + cd build + cmake ../test -G"MinGW Makefiles" -DCMAKE_BUILD_TYPE=Debug ` + -DCPPWINRT_PROJECTION_INCLUDE_DIR="../.test/out" ` + -DDOWNLOAD_WINDOWSNUMERICS=TRUE + cmake --build . -j2 + + - name: Run tests + run: | + cd build + ctest --verbose + + build-linux-native-cppwinrt: + name: 'linux: GCC native build + llvm-mingw cross-build tests' + runs-on: ubuntu-22.04 + steps: + - uses: actions/checkout@v3 + + - name: Build cppwinrt + run: | + cmake -S . -B build/native/ \ + -DCMAKE_BUILD_TYPE=RelWithDebInfo \ + -DCMAKE_INSTALL_PREFIX=$PWD/install/ + cmake --build build/native/ --target install -j2 + + - name: Test run (cppwinrt -?) + run: | + install/bin/cppwinrt -? + + - name: Test run (build projection using Windows.winmd) + run: | + curl -o Windows.winmd -L https://github.com/microsoft/windows-rs/raw/master/crates/libs/metadata/default/Windows.winmd + install/bin/cppwinrt -in Windows.winmd -out /tmp/cppwinrt -verbose + + - id: setup-llvm + name: Set up llvm-mingw + uses: ./.github/actions/setup-llvm-mingw + + - name: Cross-build tests using projection + run: | + cmake -S test -B build/cross-tests --toolchain "$PWD/cross-mingw-toolchain.cmake" \ + -DCMAKE_SYSTEM_PROCESSOR=x86_64 \ + -DCMAKE_BUILD_TYPE=Debug \ + -DCMAKE_CXX_FLAGS="-static" \ + -DCPPWINRT_PROJECTION_INCLUDE_DIR=/tmp/cppwinrt \ + -DDOWNLOAD_WINDOWSNUMERICS=TRUE + cmake --build build/cross-tests -j2 + + - name: Upload built tests + uses: actions/upload-artifact@v3 + with: + name: linux-native-cppwinrt-cross-build-tests-x86_64-bin + path: build/cross-tests/*.exe + + test-linux-native-cppwinrt-cross-tests: + name: 'linux: Run llvm-mingw cross-build tests' + needs: build-linux-native-cppwinrt + strategy: + matrix: + arch: [x86_64] + runs-on: windows-latest + steps: + - uses: actions/checkout@v3 + + - name: Fetch test executables + uses: actions/download-artifact@v3 + with: + name: linux-native-cppwinrt-cross-build-tests-${{ matrix.arch }}-bin + path: ./ + + - name: Run tests + run: | + $test_exes = ls *.exe -Name + $has_failed_tests = 0 + foreach ($test_exe in $test_exes) { + echo "::group::Run '$test_exe'" + & .\$test_exe + echo "::endgroup::" + if ($LastExitCode -ne 0) { + echo "::error::Test '$test_exe' failed!" + $has_failed_tests = 1 + } + } + if ($has_failed_tests -ne 0) { + exit 1 + } build-msvc-natvis: name: 'Build natvis' diff --git a/CMakeLists.txt b/CMakeLists.txt index b983c4587..e8ef5fa4a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,6 +1,9 @@ # This CMake build file is intended for use with the llvm-mingw toolchain: # https://github.com/mstorsjo/llvm-mingw # +# It also works for building natively on Linux, or cross-building from Linux +# for running on Windows with a mingw-w64 toolchain. +# # It most probably doesn't work with MSVC. cmake_minimum_required(VERSION 3.16) @@ -16,8 +19,10 @@ if(CPPWINRT_BUILD_VERSION STREQUAL "2.3.4.5" OR CPPWINRT_BUILD_VERSION STREQUAL endif() message(STATUS "Using version string: ${CPPWINRT_BUILD_VERSION}") -# WinMD uses CreateFile2 which requires Windows 8. -add_compile_definitions(_WIN32_WINNT=0x0602) +if(WIN32) + # WinMD uses CreateFile2 which requires Windows 8. + add_compile_definitions(_WIN32_WINNT=0x0602) +endif() # === prebuild: Generator tool for strings.cpp, strings.h, version.rc === @@ -77,32 +82,37 @@ set(CPPWINRT_HEADERS cppwinrt/type_writers.h ) -add_custom_command( - OUTPUT - "${PROJECT_BINARY_DIR}/app.manifest" - COMMAND ${CMAKE_COMMAND} -E copy "${PROJECT_SOURCE_DIR}/cppwinrt/app.manifest" "${PROJECT_BINARY_DIR}/app.manifest" - DEPENDS "${PROJECT_SOURCE_DIR}/cppwinrt/app.manifest" - VERBATIM -) -# Do the configure_file dance so that app.manifest.rc don't get modified every -# single time the project is reconfigured and trigger a rebuild. -file(WRITE "${PROJECT_BINARY_DIR}/app.manifest.rc.in" "1 24 \"app.manifest\"\n") -configure_file( - "${PROJECT_BINARY_DIR}/app.manifest.rc.in" - "${PROJECT_BINARY_DIR}/app.manifest.rc" - COPYONLY -) +if(WIN32) + add_custom_command( + OUTPUT + "${PROJECT_BINARY_DIR}/app.manifest" + COMMAND ${CMAKE_COMMAND} -E copy "${PROJECT_SOURCE_DIR}/cppwinrt/app.manifest" "${PROJECT_BINARY_DIR}/app.manifest" + DEPENDS "${PROJECT_SOURCE_DIR}/cppwinrt/app.manifest" + VERBATIM + ) + # Do the configure_file dance so that app.manifest.rc don't get modified every + # single time the project is reconfigured and trigger a rebuild. + file(WRITE "${PROJECT_BINARY_DIR}/app.manifest.rc.in" "1 24 \"app.manifest\"\n") + configure_file( + "${PROJECT_BINARY_DIR}/app.manifest.rc.in" + "${PROJECT_BINARY_DIR}/app.manifest.rc" + COPYONLY + ) -set(CPPWINRT_RESOURCES - "${PROJECT_BINARY_DIR}/app.manifest" - "${PROJECT_BINARY_DIR}/app.manifest.rc" - "${PROJECT_BINARY_DIR}/version.rc" -) + set(CPPWINRT_RESOURCES + "${PROJECT_BINARY_DIR}/app.manifest" + "${PROJECT_BINARY_DIR}/app.manifest.rc" + "${PROJECT_BINARY_DIR}/version.rc" + ) +endif() add_executable(cppwinrt ${CPPWINRT_SRCS} ${CPPWINRT_RESOURCES} ${CPPWINRT_HEADERS}) target_compile_definitions(cppwinrt PRIVATE CPPWINRT_VERSION_STRING="${CPPWINRT_BUILD_VERSION}") target_include_directories(cppwinrt PRIVATE ${PROJECT_BINARY_DIR}) -target_link_libraries(cppwinrt shlwapi) + +if(WIN32) + target_link_libraries(cppwinrt shlwapi) +endif() install(TARGETS cppwinrt) @@ -158,15 +168,17 @@ int main() {} add_dependencies(cppwinrt gen-libxmllite) endif() endif() -target_link_libraries(cppwinrt "${XMLLITE_LIBRARY}") +if(WIN32) + target_link_libraries(cppwinrt "${XMLLITE_LIBRARY}") +endif() # === winmd: External header-only library for reading winmd files === include(ExternalProject) ExternalProject_Add(winmd - URL https://github.com/microsoft/winmd/releases/download/1.0.210629.2/Microsoft.Windows.WinMD.1.0.210629.2.nupkg - URL_HASH SHA256=4c5f29d948f5b3d724d229664c8f8e4823250d3c9f23ad8067b732fc7076d8c7 + GIT_REPOSITORY https://github.com/microsoft/winmd.git + GIT_TAG 0f1eae3bfa63fa2ba3c2912cbfe72a01db94cc5a CONFIGURE_COMMAND "" BUILD_COMMAND "" INSTALL_COMMAND "" @@ -174,10 +186,10 @@ ExternalProject_Add(winmd add_dependencies(cppwinrt winmd) ExternalProject_Get_Property(winmd SOURCE_DIR) set(winmd_SOURCE_DIR "${SOURCE_DIR}") -target_include_directories(cppwinrt PRIVATE "${winmd_SOURCE_DIR}") +target_include_directories(cppwinrt PRIVATE "${winmd_SOURCE_DIR}/src") -if(NOT CMAKE_CROSSCOMPILING) +if(WIN32 AND NOT CMAKE_CROSSCOMPILING) include(CTest) if(BUILD_TESTING) add_subdirectory(test) diff --git a/cppwinrt/cmd_reader.h b/cppwinrt/cmd_reader.h index bb5454258..7faf49e4f 100644 --- a/cppwinrt/cmd_reader.h +++ b/cppwinrt/cmd_reader.h @@ -3,6 +3,7 @@ #include #include #include +#include #include #include #include @@ -12,12 +13,16 @@ #include #include #include + +#if defined(_WIN32) || defined(_WIN64) #include #include #include +#endif namespace cppwinrt { +#if defined(_WIN32) || defined(_WIN64) struct registry_key { HKEY handle{}; @@ -291,6 +296,7 @@ namespace cppwinrt return result; } +#endif /* defined(_WIN32) || defined(_WIN64) */ [[noreturn]] inline void throw_invalid(std::string const& message) { @@ -440,6 +446,7 @@ namespace cppwinrt } if (path == "local") { +#if defined(_WIN32) || defined(_WIN64) std::array local{}; #ifdef _WIN64 ExpandEnvironmentStringsA("%windir%\\System32\\WinMetadata", local.data(), static_cast(local.size())); @@ -447,6 +454,9 @@ namespace cppwinrt ExpandEnvironmentStringsA("%windir%\\SysNative\\WinMetadata", local.data(), static_cast(local.size())); #endif add_directory(local.data()); +#else /* defined(_WIN32) || defined(_WIN64) */ + throw_invalid("Spec '", path, "' not supported outside of Windows"); +#endif /* defined(_WIN32) || defined(_WIN64) */ continue; } @@ -454,7 +464,11 @@ namespace cppwinrt if (path == "sdk" || path == "sdk+") { +#if defined(_WIN32) || defined(_WIN64) sdk_version = get_sdk_version(); +#else /* defined(_WIN32) || defined(_WIN64) */ + throw_invalid("Spec '", path, "' not supported outside of Windows"); +#endif /* defined(_WIN32) || defined(_WIN64) */ } else { @@ -469,6 +483,7 @@ namespace cppwinrt if (!sdk_version.empty()) { +#if defined(_WIN32) || defined(_WIN64) auto sdk_path = get_sdk_path(); auto xml_path = sdk_path; xml_path /= L"Platforms\\UAP"; @@ -490,6 +505,9 @@ namespace cppwinrt // Not all Extension SDKs include an SDKManifest.xml file; ignore those which do not (e.g. WindowsIoT). add_files_from_xml(files, sdk_version, xml_path, sdk_path, xml_requirement::optional); } +#else /* defined(_WIN32) || defined(_WIN64) */ + throw_invalid("Spec '", path, "' not supported outside of Windows"); +#endif /* defined(_WIN32) || defined(_WIN64) */ continue; } @@ -531,7 +549,11 @@ namespace cppwinrt template void extract_option(std::string_view arg, O const& options, L& last) { - if (arg[0] == '-' || arg[0] == '/') + if (arg[0] == '-' +#if defined(_WIN32) || defined(_WIN64) + || arg[0] == '/' +#endif + ) { arg.remove_prefix(1); last = find(options, arg); diff --git a/cppwinrt/main.cpp b/cppwinrt/main.cpp index 5834d868f..16700a863 100644 --- a/cppwinrt/main.cpp +++ b/cppwinrt/main.cpp @@ -70,10 +70,14 @@ Copyright (c) Microsoft Corporation. All rights reserved. Where is one or more of: path Path to winmd file or recursively scanned folder - local Local ^%WinDir^%\System32\WinMetadata folder +)" +#if defined(_WIN32) || defined(_WIN64) +R"( local Local ^%WinDir^%\System32\WinMetadata folder sdk[+] Current version of Windows SDK [with extensions] 10.0.12345.0[+] Specific version of Windows SDK [with extensions] -)"; +)" +#endif + ; w.write(format, CPPWINRT_VERSION_STRING, bind_each(printOption, options)); } @@ -94,7 +98,7 @@ Where is one or more of: path output_folder = args.value("output", "."); create_directories(output_folder / "winrt/impl"); settings.output_folder = canonical(output_folder).string(); - settings.output_folder += '\\'; + settings.output_folder += std::filesystem::path::preferred_separator; for (auto && include : args.values("include")) { @@ -146,7 +150,7 @@ Where is one or more of: { create_directories(component); settings.component_folder = canonical(component).string(); - settings.component_folder += '\\'; + settings.component_folder += std::filesystem::path::preferred_separator; } } } @@ -270,6 +274,7 @@ Where is one or more of: { { char* path = argv[0]; +#if defined(_WIN32) || defined(_WIN64) char path_buf[32768]; DWORD path_size = GetModuleFileNameA(nullptr, path_buf, sizeof(path_buf)); if (path_size) @@ -277,6 +282,7 @@ Where is one or more of: path_buf[sizeof(path_buf) - 1] = 0; path = path_buf; } +#endif w.write(" tool: %\n", path); } w.write(" ver: %\n", CPPWINRT_VERSION_STRING); diff --git a/cppwinrt/text_writer.h b/cppwinrt/text_writer.h index 3e210db83..ee723c703 100644 --- a/cppwinrt/text_writer.h +++ b/cppwinrt/text_writer.h @@ -128,7 +128,16 @@ namespace cppwinrt void write_printf(char const* format, Args const&... args) { char buffer[128]; +#if defined(_WIN32) || defined(_WIN64) size_t const size = sprintf_s(buffer, format, args...); +#else + size_t size = snprintf(buffer, sizeof(buffer), format, args...); + if (size > sizeof(buffer) - 1) + { + fprintf(stderr, "\n*** WARNING: writer_base::write_printf -- buffer too small\n"); + size = sizeof(buffer) - 1; + } +#endif write(std::string_view{ buffer, size }); } diff --git a/prebuild/main.cpp b/prebuild/main.cpp index 52a750776..3e427d32b 100644 --- a/prebuild/main.cpp +++ b/prebuild/main.cpp @@ -19,9 +19,11 @@ int main(int const argc, char** argv) strings_h.write(R"( #pragma once namespace cppwinrt::strings { +extern "C++" { )"); strings_cpp.write(R"( +#include "strings.h" namespace cppwinrt::strings { )"); @@ -41,7 +43,7 @@ namespace cppwinrt::strings { strings_h.write(R"(extern char const %[%]; )", name.string(), - static_cast(view.size())); + static_cast(view.size() + 1)); strings_cpp.write(R"(extern char const %[] = R"xyz()xyz" )", @@ -66,6 +68,7 @@ namespace cppwinrt::strings { strings_h.write(R"( } +} )"); strings_cpp.write(R"( diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 19ce748a7..6cf1aa3ca 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -1,11 +1,23 @@ +cmake_minimum_required(VERSION 3.16) + +if(NOT DEFINED PROJECT_NAME) + project(cppwinrt-tests) + set(STANDALONE_TESTING 1) + include(CTest) + if(NOT BUILD_TESTING) + message(NOTICE "BUILD_TESTING is OFF, nothing to do.") + return() + endif() +endif() + # The tests use newer C++ features. set(CMAKE_CXX_STANDARD 20) +set(CMAKE_CXX_STANDARD_REQUIRED True) set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}") include_directories("${CMAKE_CURRENT_SOURCE_DIR}") -include_directories("${PROJECT_SOURCE_DIR}/cppwinrt") -include_directories("${CMAKE_CURRENT_BINARY_DIR}/cppwinrt") +include_directories("${CMAKE_CURRENT_SOURCE_DIR}/../cppwinrt") function(TestIsX64 OUTPUT_VARNAME) include(CheckCXXSourceCompiles) @@ -51,18 +63,28 @@ if(NOT HAS_WINDOWSNUMERICS AND DOWNLOAD_WINDOWSNUMERICS) endif() -add_custom_command( - OUTPUT - "${CMAKE_CURRENT_BINARY_DIR}/cppwinrt/winrt/base.h" - COMMAND "${PROJECT_BINARY_DIR}/cppwinrt" -input local -output "${CMAKE_CURRENT_BINARY_DIR}/cppwinrt" -verbose - DEPENDS - cppwinrt - VERBATIM -) -add_custom_target(build-cppwinrt-projection - DEPENDS - "${CMAKE_CURRENT_BINARY_DIR}/cppwinrt/winrt/base.h" -) +if(STANDALONE_TESTING) + add_custom_target(build-cppwinrt-projection) + set(CPPWINRT_PROJECTION_INCLUDE_DIR "" CACHE PATH "Include path for the C++/WinRT projection headers") + if(NOT CPPWINRT_PROJECTION_INCLUDE_DIR) + message(FATAL_ERROR "CPPWINRT_PROJECTION_INCLUDE_DIR is not specified.") + endif() +else() + set(CPPWINRT_PROJECTION_INCLUDE_DIR "${CMAKE_CURRENT_BINARY_DIR}/cppwinrt") + add_custom_command( + OUTPUT + "${CMAKE_CURRENT_BINARY_DIR}/cppwinrt/winrt/base.h" + COMMAND cppwinrt -input local -output "${CPPWINRT_PROJECTION_INCLUDE_DIR}" -verbose + DEPENDS + cppwinrt + VERBATIM + ) + add_custom_target(build-cppwinrt-projection + DEPENDS + "${CMAKE_CURRENT_BINARY_DIR}/cppwinrt/winrt/base.h" + ) +endif() +include_directories("${CPPWINRT_PROJECTION_INCLUDE_DIR}") set(ENABLE_TEST_SANITIZERS FALSE CACHE BOOL "Enable ASan and UBSan for the tests.") diff --git a/test/old_tests/UnitTests/Hash.cpp b/test/old_tests/UnitTests/Hash.cpp index 756beacab..7464da6ab 100644 --- a/test/old_tests/UnitTests/Hash.cpp +++ b/test/old_tests/UnitTests/Hash.cpp @@ -1,5 +1,5 @@ #include "pch.h" -#include "winrt\Windows.Foundation.h" +#include "winrt/Windows.Foundation.h" #include "catch.hpp" #include #include diff --git a/test/old_tests/UnitTests/pch.h b/test/old_tests/UnitTests/pch.h index 26990fd1c..4b940b552 100644 --- a/test/old_tests/UnitTests/pch.h +++ b/test/old_tests/UnitTests/pch.h @@ -10,29 +10,29 @@ #include #undef GetCurrentTime -#include "winrt\Windows.Foundation.Collections.h" -#include "winrt\Windows.Foundation.Diagnostics.h" -#include "winrt\Windows.ApplicationModel.Activation.h" -#include "winrt\Windows.ApplicationModel.Core.h" -#include "winrt\Windows.ApplicationModel.DataTransfer.h" -#include "winrt\Windows.ApplicationModel.Store.h" -#include "winrt\Windows.Data.Json.h" -#include "winrt\Windows.Devices.Perception.Provider.h" -#include "winrt\Windows.Devices.Sms.h" -#include "winrt\Windows.Graphics.Display.h" -#include "winrt\Windows.Graphics.Effects.h" -#include "winrt\Windows.Management.Deployment.h" -#include "winrt\Windows.Media.Audio.h" -#include "winrt\Windows.Media.Core.h" -#include "winrt\Windows.Media.Transcoding.h" -#include "winrt\Windows.Networking.Sockets.h" -#include "winrt\Windows.Security.Cryptography.Certificates.h" -#include "winrt\Windows.Storage.Streams.h" -#include "winrt\Windows.System.Threading.h" -#include "winrt\Windows.UI.Core.h" -#include "winrt\Windows.UI.Composition.h" -#include "winrt\Windows.UI.Xaml.Controls.h" -#include "winrt\Windows.UI.Xaml.Interop.h" -#include "winrt\Windows.Web.AtomPub.h" -#include "winrt\Windows.Web.Http.Headers.h" -#include "winrt\Windows.Web.Syndication.h" +#include "winrt/Windows.Foundation.Collections.h" +#include "winrt/Windows.Foundation.Diagnostics.h" +#include "winrt/Windows.ApplicationModel.Activation.h" +#include "winrt/Windows.ApplicationModel.Core.h" +#include "winrt/Windows.ApplicationModel.DataTransfer.h" +#include "winrt/Windows.ApplicationModel.Store.h" +#include "winrt/Windows.Data.Json.h" +#include "winrt/Windows.Devices.Perception.Provider.h" +#include "winrt/Windows.Devices.Sms.h" +#include "winrt/Windows.Graphics.Display.h" +#include "winrt/Windows.Graphics.Effects.h" +#include "winrt/Windows.Management.Deployment.h" +#include "winrt/Windows.Media.Audio.h" +#include "winrt/Windows.Media.Core.h" +#include "winrt/Windows.Media.Transcoding.h" +#include "winrt/Windows.Networking.Sockets.h" +#include "winrt/Windows.Security.Cryptography.Certificates.h" +#include "winrt/Windows.Storage.Streams.h" +#include "winrt/Windows.System.Threading.h" +#include "winrt/Windows.UI.Core.h" +#include "winrt/Windows.UI.Composition.h" +#include "winrt/Windows.UI.Xaml.Controls.h" +#include "winrt/Windows.UI.Xaml.Interop.h" +#include "winrt/Windows.Web.AtomPub.h" +#include "winrt/Windows.Web.Http.Headers.h" +#include "winrt/Windows.Web.Syndication.h" diff --git a/test/test/guid_include.cpp b/test/test/guid_include.cpp index 07a7d4988..212b6b0e5 100644 --- a/test/test/guid_include.cpp +++ b/test/test/guid_include.cpp @@ -1,3 +1,3 @@ #include "winrt/base.h" -#include +#include #include "winrt/Windows.Foundation.h" diff --git a/test/test_fast_fwd/FastForwarderTests.cpp b/test/test_fast_fwd/FastForwarderTests.cpp index 5a10216bf..8a80eaf1c 100644 --- a/test/test_fast_fwd/FastForwarderTests.cpp +++ b/test/test_fast_fwd/FastForwarderTests.cpp @@ -1,8 +1,8 @@ #include "pch.h" #include -#include "winrt\fast_forward.h" -#include "winrt\Windows.Foundation.h" -#include "winrt\FastForwarderTest.h" +#include "winrt/fast_forward.h" +#include "winrt/Windows.Foundation.h" +#include "winrt/FastForwarderTest.h" #include "Class.g.h" using namespace std::literals;