From c4f9d8786fb61e443a641cb9b00da9ddc7bdc685 Mon Sep 17 00:00:00 2001 From: Max Golovanov Date: Fri, 5 Jun 2020 19:35:12 -0700 Subject: [PATCH 01/15] Create build-windows-vs2017.yaml Move build-all.bat from VSO to GitHub Actions --- .github/workflows/build-windows-vs2017.yaml | 25 +++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 .github/workflows/build-windows-vs2017.yaml diff --git a/.github/workflows/build-windows-vs2017.yaml b/.github/workflows/build-windows-vs2017.yaml new file mode 100644 index 000000000..45c0fa856 --- /dev/null +++ b/.github/workflows/build-windows-vs2017.yaml @@ -0,0 +1,25 @@ +name: C/C++ CI on Windows (vs2017) + +on: + push: + branches: + - master + pull_request: + branches: + - master + +jobs: + build: + + runs-on: windows-latest + name: Build for Windows + + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Build (vs2017) + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GIT_PULL_TOKEN: ${{ secrets.GIT_PULL_TOKEN }} + shell: cmd + run: build-all.bat From e47311b74d867583deb4ffc6199ed2356d2f172a Mon Sep 17 00:00:00 2001 From: Max Golovanov Date: Fri, 5 Jun 2020 21:45:33 -0700 Subject: [PATCH 02/15] Moving clang and vs2017 full build from Azure Pipelines to GitHub Actions --- .github/workflows/build-windows-clang.yaml | 28 +++++++++++++++ .github/workflows/build-windows-vs2017.yaml | 7 ++-- ...-clang.cmd => build-cmake-clang-vs2017.cmd | 13 +++++++ docs/cpp-start-windows.md | 7 ++-- lib/include/public/Version.hpp | 6 ++-- tools/build-deps.cmd | 3 +- tools/download.cmd | 3 ++ tools/download.ps1 | 4 +++ tools/install-vs-addons.cmd | 35 +++++++++++++++++++ tools/install_llvm-win32.ps1 | 8 +++++ tools/install_llvm-win64.ps1 | 8 +++++ 11 files changed, 113 insertions(+), 9 deletions(-) create mode 100644 .github/workflows/build-windows-clang.yaml rename build-cmake-clang.cmd => build-cmake-clang-vs2017.cmd (63%) create mode 100644 tools/download.cmd create mode 100644 tools/download.ps1 create mode 100644 tools/install-vs-addons.cmd create mode 100644 tools/install_llvm-win32.ps1 create mode 100644 tools/install_llvm-win64.ps1 diff --git a/.github/workflows/build-windows-clang.yaml b/.github/workflows/build-windows-clang.yaml new file mode 100644 index 000000000..2656ffd05 --- /dev/null +++ b/.github/workflows/build-windows-clang.yaml @@ -0,0 +1,28 @@ +name: C/C++ CI on Windows (clang) + +on: + push: + branches: + - master + pull_request: + branches: + - master + +jobs: + build: + + runs-on: windows-latest + name: Build for Windows (clang) + + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Setup Tools + shell: cmd + run: tools\install-vs-addons.cmd + - name: Build + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GIT_PULL_TOKEN: ${{ secrets.GIT_PULL_TOKEN }} + shell: cmd + run: build-all.bat diff --git a/.github/workflows/build-windows-vs2017.yaml b/.github/workflows/build-windows-vs2017.yaml index 45c0fa856..07bd2298b 100644 --- a/.github/workflows/build-windows-vs2017.yaml +++ b/.github/workflows/build-windows-vs2017.yaml @@ -12,12 +12,15 @@ jobs: build: runs-on: windows-latest - name: Build for Windows + name: Build for Windows (vs2017) steps: - name: Checkout uses: actions/checkout@v2 - - name: Build (vs2017) + - name: Setup Tools + shell: cmd + run: tools\install-vs-addons.cmd + - name: Build env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GIT_PULL_TOKEN: ${{ secrets.GIT_PULL_TOKEN }} diff --git a/build-cmake-clang.cmd b/build-cmake-clang-vs2017.cmd similarity index 63% rename from build-cmake-clang.cmd rename to build-cmake-clang-vs2017.cmd index 11b27cfa8..cadbecac3 100644 --- a/build-cmake-clang.cmd +++ b/build-cmake-clang-vs2017.cmd @@ -1,4 +1,17 @@ @echo off + +echo WARNING!!! ****************************************************************************************** !!!WARNING +echo WARNING!!! This part of the build process requires Visual Studio 2017 IDE to be installed on machine. !!!WARNING +echo WARNING!!! llvm.vsix extension (Clang LLVM support for Visual Studio) is INCOMPATIBLE with vs2019. !!!WARNING +echo WARNING!!! vs2019 build fails with an error: The build tools for LLVM (Platform Toolset = 'LLVM') !!!WARNING +echo WARNING!!! cannot be found. Since Visual Studio 2019-preview includes built-in support for Clang, !!!WARNING +echo WARNING!!! feel free to contribute a 'build-cmake-clang-vs2019.cmd' script. The only change should !!!WARNING +echo WARNING!!! be to change the LLVM_VER variable below to clang_cl_x64 ... Except that there could be !!!WARNING +echo WARNING!!! another issue (June 2019) here: https://gitlab.kitware.com/cmake/cmake/-/issues/20180 !!!WARNING +echo WARNING!!! The other alternative is to actually install Visual Studio 2017 IDE side-by-side.... !!!WARNING +echo WARNING!!! ****************************************************************************************** !!!WARNING +timeout 5 + cd %~dp0 setlocal enableextensions setlocal enabledelayedexpansion diff --git a/docs/cpp-start-windows.md b/docs/cpp-start-windows.md index 983b47549..bd0bbd8b7 100644 --- a/docs/cpp-start-windows.md +++ b/docs/cpp-start-windows.md @@ -15,7 +15,7 @@ to clone the repo. If your project requires UTC to send telemetry, you need to a * Visual Studio 2017. * C++ Dev Tools for Visual Studio 2017. -* Visual Studio 2019 _should work_ if you use vc141 toolset; newer toolsets _might work_, but not tested. +* Visual Studio 2019 _works_ if you use vc141 toolset; newer toolsets _might work_, but not tested. ## **Build the SDK from source using Visual Studio 2017** @@ -27,6 +27,8 @@ If your build fails, then you most likely missing the following optional Visual - ARM64 support - Spectre mitigation libraries +Please review the script [here](../tools/install-vs-addons.cmd) that shows how to install those optional components from command line. + Make sure you install all of these above optional Visual Studio components, as these are required for the SDK to build all SDK SKUs successfully. If you are using GitHub Actions infrastructure to build your project, then all of these optional components are available by default as part of stock GitHub Actions deployment. Specific version of Windows 10 SDK is referenced by the project(s). You will need to install that exact version of Windows 10 SDK, but you may also manually upgrade all projects to current latest version of Windows 10 SDK for your local build. SDK may periodically update its Windows 10 SDK dependency from time to time. Your responsibility is to decide what Windows 10 SDK you need to use for shipping 1DS C++ SDK build from source. @@ -38,6 +40,7 @@ See: ## **Windows prerequisites and dependencies for building from source using LLVM compiler** +* Visual Studio 2017 IDE * [LLVM compiler](https://releases.llvm.org/download.html) * [CMake build system](https://cmake.org/download/) * [LLVM compiler toolchain for Visual Studio](https://marketplace.visualstudio.com/items?itemName=LLVMExtensions.llvm-toolchain) @@ -66,7 +69,7 @@ To build SDK using cmake with clang on Windows, run: 3. Create the default LogManager instance for your project using the following macro in your main file: - ``` + ``` LOGMANAGER_INSTANCE ``` diff --git a/lib/include/public/Version.hpp b/lib/include/public/Version.hpp index d56f05448..5c58b1448 100644 --- a/lib/include/public/Version.hpp +++ b/lib/include/public/Version.hpp @@ -3,8 +3,8 @@ #define MAT_VERSION_HPP // WARNING: DO NOT MODIFY THIS FILE! // This file has been automatically generated, manual changes will be lost. -#define BUILD_VERSION_STR "3.3.140.1" -#define BUILD_VERSION 3,3,140,1 +#define BUILD_VERSION_STR "3.3.157.1" +#define BUILD_VERSION 3,3,157,1 #ifndef RESOURCE_COMPILER_INVOKED #include @@ -30,7 +30,7 @@ namespace ARIASDK_NS_BEGIN { uint64_t const Version = ((uint64_t)3 << 48) | ((uint64_t)3 << 32) | - ((uint64_t)140 << 16) | + ((uint64_t)157 << 16) | ((uint64_t)1); } ARIASDK_NS_END diff --git a/tools/build-deps.cmd b/tools/build-deps.cmd index a2acf7e7c..8f23f883e 100644 --- a/tools/build-deps.cmd +++ b/tools/build-deps.cmd @@ -4,8 +4,7 @@ echo Building 3rd party dependencies... set ROOT=%~dp0\.. -echo Using Visual Studio 2017 tools... -call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\Tools\VsDevCmd.bat" +call %~dp0\vcvars.cmd set MAXCPUCOUNT=%NUMBER_OF_PROCESSORS% set platform= diff --git a/tools/download.cmd b/tools/download.cmd new file mode 100644 index 000000000..97f546863 --- /dev/null +++ b/tools/download.cmd @@ -0,0 +1,3 @@ +@REM This script allows to download a file to local machine. First argument is URL +set "PATH=C:\Windows;C:\Windows\System32;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files\Git\bin" +@powershell -File Download.ps1 %1 diff --git a/tools/download.ps1 b/tools/download.ps1 new file mode 100644 index 000000000..c759601ae --- /dev/null +++ b/tools/download.ps1 @@ -0,0 +1,4 @@ +$url=$args[0] +$arr=$args[0].Split("/") +$fileName=$arr[$arr.Count-1] +Invoke-WebRequest -Uri $url -OutFile $fileName -UseBasicParsing diff --git a/tools/install-vs-addons.cmd b/tools/install-vs-addons.cmd new file mode 100644 index 000000000..adb41aa65 --- /dev/null +++ b/tools/install-vs-addons.cmd @@ -0,0 +1,35 @@ +set "PATH=C:\Windows;C:\Windows\System32;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files\Git\bin" +@powershell -File .\install_llvm-win64.ps1 + +REM Download Visual Studio LLVM extension required for clang build to succeed +call download.cmd https://llvmextensions.gallerycdn.vsassets.io/extensions/llvmextensions/llvm-toolchain/1.0.363769/1560930595399/llvm.vsix + +REM Install optional components required for ARM build - vs2017-BuildTools +IF EXIST "%ProgramFiles(x86)%\Microsoft Visual Studio\2017\BuildTools" ( +"%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vs_installer.exe" ^ + -- modify --installPath "%ProgramFiles(x86)%\Microsoft Visual Studio\2017\BuildTools" -q ^ + --add Microsoft.VisualStudio.Component.VC.ATL ^ + --add Microsoft.VisualStudio.Component.VC.ATL.ARM ^ + --add Microsoft.VisualStudio.Component.VC.ATL.ARM64 +"%ProgramFiles(x86)%\Microsoft Visual Studio\2017\BuildTools\Common7\IDE\VSIXInstaller.exe" /q /a llvm.vsix +) + +REM Install optional components required for ARM build - vs2017-Enterprise +IF EXIST "%ProgramFiles(x86)%\Microsoft Visual Studio\2017\Enterprise" ( +"%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vs_installer.exe" ^ + -- modify --installPath "%ProgramFiles(x86)%\Microsoft Visual Studio\2017\Enterprise" -q ^ + --add Microsoft.VisualStudio.Component.VC.ATL ^ + --add Microsoft.VisualStudio.Component.VC.ATL.ARM ^ + --add Microsoft.VisualStudio.Component.VC.ATL.ARM64 +"%ProgramFiles(x86)%\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\VSIXInstaller.exe" /q /a llvm.vsix +) + +REM Install optional components required for ARM build - vs2019-Enterprise +IF EXIST %ProgramFiles(x86)%\Microsoft Visual Studio\2019\Enterprise ( +"C:\Program Files (x86)\Microsoft Visual Studio\Installer\vs_installer.exe" ^ + -- modify --installPath "%ProgramFiles(x86)%\Microsoft Visual Studio\2019\Enterprise" -q ^ + --add Microsoft.VisualStudio.Component.VC.ATL ^ + --add Microsoft.VisualStudio.Component.VC.ATL.ARM ^ + --add Microsoft.VisualStudio.Component.VC.ATL.ARM64 +"%ProgramFiles(x86)%\Microsoft Visual Studio\2019\Enterprise\Common7\IDE\VSIXInstaller.exe" /q /a llvm.vsix +) diff --git a/tools/install_llvm-win32.ps1 b/tools/install_llvm-win32.ps1 new file mode 100644 index 000000000..89b697f40 --- /dev/null +++ b/tools/install_llvm-win32.ps1 @@ -0,0 +1,8 @@ +$llvmVersion = "10.0.0" +Write-Host "Installing LLVM $llvmVersion ..." -ForegroundColor Cyan +Write-Host "Downloading..." +$exePath = "$env:temp\LLVM-$llvmVersion-win32.exe" +(New-Object Net.WebClient).DownloadFile("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/llvm/llvm-project/releases/download/llvmorg-$llvmVersion/LLVM-$llvmVersion-win32.exe", $exePath) +Write-Host "Installing..." +cmd /c start /wait $exePath /S +Write-Host "Installed" -ForegroundColor Green diff --git a/tools/install_llvm-win64.ps1 b/tools/install_llvm-win64.ps1 new file mode 100644 index 000000000..d4a2379fa --- /dev/null +++ b/tools/install_llvm-win64.ps1 @@ -0,0 +1,8 @@ +$llvmVersion = "10.0.0" +Write-Host "Installing LLVM $llvmVersion ..." -ForegroundColor Cyan +Write-Host "Downloading..." +$exePath = "$env:temp\LLVM-$llvmVersion-win64.exe" +(New-Object Net.WebClient).DownloadFile("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/llvm/llvm-project/releases/download/llvmorg-$llvmVersion/LLVM-$llvmVersion-win64.exe", $exePath) +Write-Host "Installing..." +cmd /c start /wait $exePath /S +Write-Host "Installed" -ForegroundColor Green From 8429db150a236d3ccc4be9fb7fd8efef7635cbaa Mon Sep 17 00:00:00 2001 From: Max Golovanov Date: Fri, 5 Jun 2020 21:51:43 -0700 Subject: [PATCH 03/15] Fix path issue --- tools/install-vs-addons.cmd | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/install-vs-addons.cmd b/tools/install-vs-addons.cmd index adb41aa65..1660eb5ae 100644 --- a/tools/install-vs-addons.cmd +++ b/tools/install-vs-addons.cmd @@ -1,4 +1,5 @@ set "PATH=C:\Windows;C:\Windows\System32;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files\Git\bin" +cd %~dp0 @powershell -File .\install_llvm-win64.ps1 REM Download Visual Studio LLVM extension required for clang build to succeed From 1d75b5875625b7c029ae4672da596775004e38cc Mon Sep 17 00:00:00 2001 From: Max Golovanov Date: Fri, 5 Jun 2020 22:05:11 -0700 Subject: [PATCH 04/15] Fixing some script build failure (sigh) --- tools/install-vs-addons.cmd | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tools/install-vs-addons.cmd b/tools/install-vs-addons.cmd index 1660eb5ae..e4c866be3 100644 --- a/tools/install-vs-addons.cmd +++ b/tools/install-vs-addons.cmd @@ -1,6 +1,6 @@ set "PATH=C:\Windows;C:\Windows\System32;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files\Git\bin" cd %~dp0 -@powershell -File .\install_llvm-win64.ps1 +call powershell -File .\install_llvm-win64.ps1 REM Download Visual Studio LLVM extension required for clang build to succeed call download.cmd https://llvmextensions.gallerycdn.vsassets.io/extensions/llvmextensions/llvm-toolchain/1.0.363769/1560930595399/llvm.vsix @@ -34,3 +34,6 @@ IF EXIST %ProgramFiles(x86)%\Microsoft Visual Studio\2019\Enterprise ( --add Microsoft.VisualStudio.Component.VC.ATL.ARM64 "%ProgramFiles(x86)%\Microsoft Visual Studio\2019\Enterprise\Common7\IDE\VSIXInstaller.exe" /q /a llvm.vsix ) + +REM Ignore failures if components have been already installed +EXIT /b 0 From a44a71faf33b56a1d950d12e25d6384edfb3787a Mon Sep 17 00:00:00 2001 From: Max Golovanov Date: Fri, 5 Jun 2020 23:15:34 -0700 Subject: [PATCH 05/15] Update install-vs-addons.cmd It's not that easy to troubleshoot this script on GitHub action --- tools/install-vs-addons.cmd | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/tools/install-vs-addons.cmd b/tools/install-vs-addons.cmd index e4c866be3..a4648cb8a 100644 --- a/tools/install-vs-addons.cmd +++ b/tools/install-vs-addons.cmd @@ -6,33 +6,33 @@ REM Download Visual Studio LLVM extension required for clang build to succeed call download.cmd https://llvmextensions.gallerycdn.vsassets.io/extensions/llvmextensions/llvm-toolchain/1.0.363769/1560930595399/llvm.vsix REM Install optional components required for ARM build - vs2017-BuildTools -IF EXIST "%ProgramFiles(x86)%\Microsoft Visual Studio\2017\BuildTools" ( -"%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vs_installer.exe" ^ - -- modify --installPath "%ProgramFiles(x86)%\Microsoft Visual Studio\2017\BuildTools" -q ^ +if exist "%ProgramFiles(x86)%\Microsoft Visual Studio\2017\BuildTools" ( + start /wait "%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vs_installer.exe" ^ + modify --installPath "%ProgramFiles(x86)%\Microsoft Visual Studio\2017\BuildTools" -q ^ --add Microsoft.VisualStudio.Component.VC.ATL ^ --add Microsoft.VisualStudio.Component.VC.ATL.ARM ^ - --add Microsoft.VisualStudio.Component.VC.ATL.ARM64 -"%ProgramFiles(x86)%\Microsoft Visual Studio\2017\BuildTools\Common7\IDE\VSIXInstaller.exe" /q /a llvm.vsix + --add Microsoft.VisualStudio.Component.VC.ATL.ARM64 --passive --wait + "%ProgramFiles(x86)%\Microsoft Visual Studio\2017\BuildTools\Common7\IDE\VSIXInstaller.exe" /q /a llvm.vsix ) REM Install optional components required for ARM build - vs2017-Enterprise -IF EXIST "%ProgramFiles(x86)%\Microsoft Visual Studio\2017\Enterprise" ( -"%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vs_installer.exe" ^ - -- modify --installPath "%ProgramFiles(x86)%\Microsoft Visual Studio\2017\Enterprise" -q ^ +if exist "%ProgramFiles(x86)%\Microsoft Visual Studio\2017\Enterprise" ( + start /wait "%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vs_installer.exe" ^ + modify --installPath "%ProgramFiles(x86)%\Microsoft Visual Studio\2017\Enterprise" -q ^ --add Microsoft.VisualStudio.Component.VC.ATL ^ --add Microsoft.VisualStudio.Component.VC.ATL.ARM ^ - --add Microsoft.VisualStudio.Component.VC.ATL.ARM64 -"%ProgramFiles(x86)%\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\VSIXInstaller.exe" /q /a llvm.vsix + --add Microsoft.VisualStudio.Component.VC.ATL.ARM64 --passive --wait + "%ProgramFiles(x86)%\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\VSIXInstaller.exe" /q /a llvm.vsix ) REM Install optional components required for ARM build - vs2019-Enterprise -IF EXIST %ProgramFiles(x86)%\Microsoft Visual Studio\2019\Enterprise ( -"C:\Program Files (x86)\Microsoft Visual Studio\Installer\vs_installer.exe" ^ - -- modify --installPath "%ProgramFiles(x86)%\Microsoft Visual Studio\2019\Enterprise" -q ^ +if exist "%ProgramFiles(x86)%\Microsoft Visual Studio\2019\Enterprise" ( + start /wait "C:\Program Files (x86)\Microsoft Visual Studio\Installer\vs_installer.exe" ^ + modify --installPath "%ProgramFiles(x86)%\Microsoft Visual Studio\2019\Enterprise" -q ^ --add Microsoft.VisualStudio.Component.VC.ATL ^ --add Microsoft.VisualStudio.Component.VC.ATL.ARM ^ - --add Microsoft.VisualStudio.Component.VC.ATL.ARM64 -"%ProgramFiles(x86)%\Microsoft Visual Studio\2019\Enterprise\Common7\IDE\VSIXInstaller.exe" /q /a llvm.vsix + --add Microsoft.VisualStudio.Component.VC.ATL.ARM64 --passive --wait + "%ProgramFiles(x86)%\Microsoft Visual Studio\2019\Enterprise\Common7\IDE\VSIXInstaller.exe" /q /a llvm.vsix ) REM Ignore failures if components have been already installed From 90b41d4a2edc24e0e8df1ea7d7b4d35eb492d44e Mon Sep 17 00:00:00 2001 From: Max Golovanov Date: Fri, 5 Jun 2020 23:46:14 -0700 Subject: [PATCH 06/15] Update install-vs-addons.cmd Previous fix did not work :( --- tools/install-vs-addons.cmd | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/tools/install-vs-addons.cmd b/tools/install-vs-addons.cmd index a4648cb8a..63cb90e90 100644 --- a/tools/install-vs-addons.cmd +++ b/tools/install-vs-addons.cmd @@ -7,8 +7,7 @@ call download.cmd https://llvmextensions.gallerycdn.vsassets.io/extensions/llvme REM Install optional components required for ARM build - vs2017-BuildTools if exist "%ProgramFiles(x86)%\Microsoft Visual Studio\2017\BuildTools" ( - start /wait "%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vs_installer.exe" ^ - modify --installPath "%ProgramFiles(x86)%\Microsoft Visual Studio\2017\BuildTools" -q ^ + "%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vs_installer.exe" modify --installPath "%ProgramFiles(x86)%\Microsoft Visual Studio\2017\BuildTools" -q ^ --add Microsoft.VisualStudio.Component.VC.ATL ^ --add Microsoft.VisualStudio.Component.VC.ATL.ARM ^ --add Microsoft.VisualStudio.Component.VC.ATL.ARM64 --passive --wait @@ -17,8 +16,7 @@ if exist "%ProgramFiles(x86)%\Microsoft Visual Studio\2017\BuildTools" ( REM Install optional components required for ARM build - vs2017-Enterprise if exist "%ProgramFiles(x86)%\Microsoft Visual Studio\2017\Enterprise" ( - start /wait "%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vs_installer.exe" ^ - modify --installPath "%ProgramFiles(x86)%\Microsoft Visual Studio\2017\Enterprise" -q ^ + "%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vs_installer.exe" modify --installPath "%ProgramFiles(x86)%\Microsoft Visual Studio\2017\Enterprise" -q ^ --add Microsoft.VisualStudio.Component.VC.ATL ^ --add Microsoft.VisualStudio.Component.VC.ATL.ARM ^ --add Microsoft.VisualStudio.Component.VC.ATL.ARM64 --passive --wait @@ -27,8 +25,7 @@ if exist "%ProgramFiles(x86)%\Microsoft Visual Studio\2017\Enterprise" ( REM Install optional components required for ARM build - vs2019-Enterprise if exist "%ProgramFiles(x86)%\Microsoft Visual Studio\2019\Enterprise" ( - start /wait "C:\Program Files (x86)\Microsoft Visual Studio\Installer\vs_installer.exe" ^ - modify --installPath "%ProgramFiles(x86)%\Microsoft Visual Studio\2019\Enterprise" -q ^ + "%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vs_installer.exe" modify --installPath "%ProgramFiles(x86)%\Microsoft Visual Studio\2019\Enterprise" -q ^ --add Microsoft.VisualStudio.Component.VC.ATL ^ --add Microsoft.VisualStudio.Component.VC.ATL.ARM ^ --add Microsoft.VisualStudio.Component.VC.ATL.ARM64 --passive --wait From fa76751f2f5e90dab2b6e28b0711f46074c7094b Mon Sep 17 00:00:00 2001 From: Max Golovanov Date: Wed, 17 Jun 2020 19:10:45 -0700 Subject: [PATCH 07/15] Support Visual Studio 2017, 2019 and LLVM Clang full build CI --- .github/workflows/build-windows-clang.yaml | 11 +- .github/workflows/build-windows-vs2017.yaml | 9 +- .github/workflows/build-windows-vs2019.yaml | 31 ++++++ build-all.bat | 1 + build-cmake-clang-vs2017.cmd | 13 ++- lib/include/public/Version.hpp | 6 +- tools/download.cmd | 2 +- tools/install-llvm.cmd | 24 +++++ tools/install-llvm.ps1 | 28 +++++ tools/install-vs-addons.cmd | 36 ------- tools/install_llvm-win32.ps1 | 8 -- tools/install_llvm-win64.ps1 | 8 -- tools/ports/benchmark/CONTROL | 5 + tools/ports/benchmark/portfile.cmake | 40 +++++++ tools/setup-buildtools.cmd | 111 ++++++++++++++++++-- tools/vcvars.cmd | 53 +++++++--- 16 files changed, 297 insertions(+), 89 deletions(-) create mode 100644 .github/workflows/build-windows-vs2019.yaml create mode 100644 tools/install-llvm.cmd create mode 100644 tools/install-llvm.ps1 delete mode 100644 tools/install-vs-addons.cmd delete mode 100644 tools/install_llvm-win32.ps1 delete mode 100644 tools/install_llvm-win64.ps1 create mode 100644 tools/ports/benchmark/CONTROL create mode 100644 tools/ports/benchmark/portfile.cmake diff --git a/.github/workflows/build-windows-clang.yaml b/.github/workflows/build-windows-clang.yaml index 2656ffd05..636b4a0b3 100644 --- a/.github/workflows/build-windows-clang.yaml +++ b/.github/workflows/build-windows-clang.yaml @@ -11,18 +11,21 @@ on: jobs: build: - runs-on: windows-latest - name: Build for Windows (clang) + runs-on: windows-2016 + name: Build steps: + - name: Checkout uses: actions/checkout@v2 + - name: Setup Tools shell: cmd - run: tools\install-vs-addons.cmd + run: tools\setup-buildtools.cmd + - name: Build env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GIT_PULL_TOKEN: ${{ secrets.GIT_PULL_TOKEN }} shell: cmd - run: build-all.bat + run: build-cmake-clang-vs2017.cmd diff --git a/.github/workflows/build-windows-vs2017.yaml b/.github/workflows/build-windows-vs2017.yaml index 07bd2298b..547a9cc75 100644 --- a/.github/workflows/build-windows-vs2017.yaml +++ b/.github/workflows/build-windows-vs2017.yaml @@ -11,15 +11,18 @@ on: jobs: build: - runs-on: windows-latest - name: Build for Windows (vs2017) + runs-on: windows-2016 + name: Build steps: + - name: Checkout uses: actions/checkout@v2 + - name: Setup Tools shell: cmd - run: tools\install-vs-addons.cmd + run: tools\setup-buildtools.cmd + - name: Build env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/build-windows-vs2019.yaml b/.github/workflows/build-windows-vs2019.yaml new file mode 100644 index 000000000..b0a91848d --- /dev/null +++ b/.github/workflows/build-windows-vs2019.yaml @@ -0,0 +1,31 @@ +name: C/C++ CI on Windows (vs2019) + +on: + push: + branches: + - master + pull_request: + branches: + - master + +jobs: + build: + + runs-on: windows-2019 + name: Build + + steps: + + - name: Checkout + uses: actions/checkout@v2 + + - name: Setup Tools + shell: cmd + run: tools\setup-buildtools.cmd + + - name: Build + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GIT_PULL_TOKEN: ${{ secrets.GIT_PULL_TOKEN }} + shell: cmd + run: build-all.bat diff --git a/build-all.bat b/build-all.bat index e94d7b405..3e3366e59 100644 --- a/build-all.bat +++ b/build-all.bat @@ -1,4 +1,5 @@ @echo off + cd %~dp0 call tools\gen-version.cmd @setlocal ENABLEEXTENSIONS diff --git a/build-cmake-clang-vs2017.cmd b/build-cmake-clang-vs2017.cmd index cadbecac3..94fd102b5 100644 --- a/build-cmake-clang-vs2017.cmd +++ b/build-cmake-clang-vs2017.cmd @@ -1,5 +1,4 @@ @echo off - echo WARNING!!! ****************************************************************************************** !!!WARNING echo WARNING!!! This part of the build process requires Visual Studio 2017 IDE to be installed on machine. !!!WARNING echo WARNING!!! llvm.vsix extension (Clang LLVM support for Visual Studio) is INCOMPATIBLE with vs2019. !!!WARNING @@ -12,7 +11,19 @@ echo WARNING!!! The other alternative is to actually install Visual Studio 2017 echo WARNING!!! ****************************************************************************************** !!!WARNING timeout 5 +set VSTOOLS_VERSION=vs2017 cd %~dp0 + +echo Update all public submodules... +git -c submodule."lib/modules".update=none submodule update --init --recursive + +if DEFINED GIT_PULL_TOKEN ( + rd /s /q lib\modules + git clone https://%GIT_PULL_TOKEN%:x-oauth-basic@github.com/microsoft/cpp_client_telemetry_modules.git lib\modules +) + +call tools\vcvars.cmd + setlocal enableextensions setlocal enabledelayedexpansion set ROOT=%~dp0 diff --git a/lib/include/public/Version.hpp b/lib/include/public/Version.hpp index 5c58b1448..86f4aea5b 100644 --- a/lib/include/public/Version.hpp +++ b/lib/include/public/Version.hpp @@ -3,8 +3,8 @@ #define MAT_VERSION_HPP // WARNING: DO NOT MODIFY THIS FILE! // This file has been automatically generated, manual changes will be lost. -#define BUILD_VERSION_STR "3.3.157.1" -#define BUILD_VERSION 3,3,157,1 +#define BUILD_VERSION_STR "3.3.169.1" +#define BUILD_VERSION 3,3,169,1 #ifndef RESOURCE_COMPILER_INVOKED #include @@ -30,7 +30,7 @@ namespace ARIASDK_NS_BEGIN { uint64_t const Version = ((uint64_t)3 << 48) | ((uint64_t)3 << 32) | - ((uint64_t)157 << 16) | + ((uint64_t)169 << 16) | ((uint64_t)1); } ARIASDK_NS_END diff --git a/tools/download.cmd b/tools/download.cmd index 97f546863..f44c41c33 100644 --- a/tools/download.cmd +++ b/tools/download.cmd @@ -1,3 +1,3 @@ @REM This script allows to download a file to local machine. First argument is URL set "PATH=C:\Windows;C:\Windows\System32;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files\Git\bin" -@powershell -File Download.ps1 %1 +@powershell -File download.ps1 %1 diff --git a/tools/install-llvm.cmd b/tools/install-llvm.cmd new file mode 100644 index 000000000..7896f8d3c --- /dev/null +++ b/tools/install-llvm.cmd @@ -0,0 +1,24 @@ +@echo off +set "PATH=C:\Windows;C:\Windows\System32;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files\Git\bin" +cd %~dp0 + +call powershell -File .\install-llvm.ps1 + +REM Download Visual Studio LLVM extension required for clang build +if NOT exist llvm.vsix ( + call download.cmd https://llvmextensions.gallerycdn.vsassets.io/extensions/llvmextensions/llvm-toolchain/1.0.363769/1560930595399/llvm.vsix +) + +if NOT exist "%VSINSTALLDIR%" ( + REM Detect Visual Studio path + call vcvars.cmd +) + +REM Install optional components +set "VSIXInstaller=%VSINSTALLDIR%\Common7\IDE\VSIXInstaller.exe" +if exist %VSIXInstaller% ( + %VSIXInstaller% /q /a llvm.vsix +) + +REM Ignore failures if components have been already installed +EXIT /b 0 diff --git a/tools/install-llvm.ps1 b/tools/install-llvm.ps1 new file mode 100644 index 000000000..706e8ba26 --- /dev/null +++ b/tools/install-llvm.ps1 @@ -0,0 +1,28 @@ +$llvmVersion = "10.0.0" + +$ProgramFiles= $env:ProgramFiles +$arch = "win64" +if ($args.count -eq 1) +{ + $arch = $args[0] + $ProgramFiles = ${env:ProgramFiles(x86)} +} + +$path = "$ProgramFiles\LLVM\bin\clang.exe" +Write-Host $path + +if (!( Test-Path -PathType Leaf -Path $path )) +{ + Write-Host "Installing LLVM $llvmVersion ..." -ForegroundColor Cyan + Write-Host "Downloading..." + $exePath = "$env:temp\LLVM-$llvmVersion-$arch.exe" + (New-Object Net.WebClient).DownloadFile("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/llvm/llvm-project/releases/download/llvmorg-$llvmVersion/LLVM-$llvmVersion-$arch.exe", $exePath) + Write-Host "Installing..." + cmd /c start /wait $exePath /S + Write-Host "LLVM Installed:" -ForegroundColor Green +} else +{ + Write-Host "LLVM is already Installed:" -ForegroundColor Green +} + +&"${ProgramFiles}\LLVM\bin\clang.exe" -v diff --git a/tools/install-vs-addons.cmd b/tools/install-vs-addons.cmd deleted file mode 100644 index 63cb90e90..000000000 --- a/tools/install-vs-addons.cmd +++ /dev/null @@ -1,36 +0,0 @@ -set "PATH=C:\Windows;C:\Windows\System32;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files\Git\bin" -cd %~dp0 -call powershell -File .\install_llvm-win64.ps1 - -REM Download Visual Studio LLVM extension required for clang build to succeed -call download.cmd https://llvmextensions.gallerycdn.vsassets.io/extensions/llvmextensions/llvm-toolchain/1.0.363769/1560930595399/llvm.vsix - -REM Install optional components required for ARM build - vs2017-BuildTools -if exist "%ProgramFiles(x86)%\Microsoft Visual Studio\2017\BuildTools" ( - "%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vs_installer.exe" modify --installPath "%ProgramFiles(x86)%\Microsoft Visual Studio\2017\BuildTools" -q ^ - --add Microsoft.VisualStudio.Component.VC.ATL ^ - --add Microsoft.VisualStudio.Component.VC.ATL.ARM ^ - --add Microsoft.VisualStudio.Component.VC.ATL.ARM64 --passive --wait - "%ProgramFiles(x86)%\Microsoft Visual Studio\2017\BuildTools\Common7\IDE\VSIXInstaller.exe" /q /a llvm.vsix -) - -REM Install optional components required for ARM build - vs2017-Enterprise -if exist "%ProgramFiles(x86)%\Microsoft Visual Studio\2017\Enterprise" ( - "%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vs_installer.exe" modify --installPath "%ProgramFiles(x86)%\Microsoft Visual Studio\2017\Enterprise" -q ^ - --add Microsoft.VisualStudio.Component.VC.ATL ^ - --add Microsoft.VisualStudio.Component.VC.ATL.ARM ^ - --add Microsoft.VisualStudio.Component.VC.ATL.ARM64 --passive --wait - "%ProgramFiles(x86)%\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\VSIXInstaller.exe" /q /a llvm.vsix -) - -REM Install optional components required for ARM build - vs2019-Enterprise -if exist "%ProgramFiles(x86)%\Microsoft Visual Studio\2019\Enterprise" ( - "%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vs_installer.exe" modify --installPath "%ProgramFiles(x86)%\Microsoft Visual Studio\2019\Enterprise" -q ^ - --add Microsoft.VisualStudio.Component.VC.ATL ^ - --add Microsoft.VisualStudio.Component.VC.ATL.ARM ^ - --add Microsoft.VisualStudio.Component.VC.ATL.ARM64 --passive --wait - "%ProgramFiles(x86)%\Microsoft Visual Studio\2019\Enterprise\Common7\IDE\VSIXInstaller.exe" /q /a llvm.vsix -) - -REM Ignore failures if components have been already installed -EXIT /b 0 diff --git a/tools/install_llvm-win32.ps1 b/tools/install_llvm-win32.ps1 deleted file mode 100644 index 89b697f40..000000000 --- a/tools/install_llvm-win32.ps1 +++ /dev/null @@ -1,8 +0,0 @@ -$llvmVersion = "10.0.0" -Write-Host "Installing LLVM $llvmVersion ..." -ForegroundColor Cyan -Write-Host "Downloading..." -$exePath = "$env:temp\LLVM-$llvmVersion-win32.exe" -(New-Object Net.WebClient).DownloadFile("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/llvm/llvm-project/releases/download/llvmorg-$llvmVersion/LLVM-$llvmVersion-win32.exe", $exePath) -Write-Host "Installing..." -cmd /c start /wait $exePath /S -Write-Host "Installed" -ForegroundColor Green diff --git a/tools/install_llvm-win64.ps1 b/tools/install_llvm-win64.ps1 deleted file mode 100644 index d4a2379fa..000000000 --- a/tools/install_llvm-win64.ps1 +++ /dev/null @@ -1,8 +0,0 @@ -$llvmVersion = "10.0.0" -Write-Host "Installing LLVM $llvmVersion ..." -ForegroundColor Cyan -Write-Host "Downloading..." -$exePath = "$env:temp\LLVM-$llvmVersion-win64.exe" -(New-Object Net.WebClient).DownloadFile("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/llvm/llvm-project/releases/download/llvmorg-$llvmVersion/LLVM-$llvmVersion-win64.exe", $exePath) -Write-Host "Installing..." -cmd /c start /wait $exePath /S -Write-Host "Installed" -ForegroundColor Green diff --git a/tools/ports/benchmark/CONTROL b/tools/ports/benchmark/CONTROL new file mode 100644 index 000000000..d82040748 --- /dev/null +++ b/tools/ports/benchmark/CONTROL @@ -0,0 +1,5 @@ +Source: benchmark +Version: 1.5 +Homepage: https://github.com/google/benchmark +Description: A library to support the benchmarking of functions, similar to unit-tests. +Supports: !uwp \ No newline at end of file diff --git a/tools/ports/benchmark/portfile.cmake b/tools/ports/benchmark/portfile.cmake new file mode 100644 index 000000000..2b889dc9c --- /dev/null +++ b/tools/ports/benchmark/portfile.cmake @@ -0,0 +1,40 @@ +if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + message(FATAL_ERROR "${PORT} does not currently support UWP") +endif() + +# Make sure vs2019 compiled binaries are compat with vs2017 +set(VCPKG_CXX_FLAGS "/Zc:__cplusplus /d2FH4-") +set(VCPKG_C_FLAGS "/Zc:__cplusplus /d2FH4-") + +include(vcpkg_common_functions) + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO google/benchmark + REF v1.5.0 + SHA512 a0df9aa3d03f676e302c76d83b436de36eea0a8517ab50a8f5a11c74ccc68a1f5128fa02474901002d8e6b5a4d290ef0272a798ff4670eab3e2d78dc86bb6cd3 + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DBENCHMARK_ENABLE_TESTING=OFF + -DCMAKE_DEBUG_POSTFIX=d +) + +vcpkg_install_cmake() + +vcpkg_copy_pdbs() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/benchmark) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + +# Handle copyright +file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/benchmark) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/benchmark/LICENSE ${CURRENT_PACKAGES_DIR}/share/benchmark/copyright) diff --git a/tools/setup-buildtools.cmd b/tools/setup-buildtools.cmd index 350135d7e..060cc0862 100644 --- a/tools/setup-buildtools.cmd +++ b/tools/setup-buildtools.cmd @@ -1,14 +1,105 @@ -@echo off -WHERE choco >nul 2>nul -IF %ERRORLEVEL% NEQ 0 ( +REM @echo off +set "PATH=%PATH%;%~dp0;%~dp0\vcpkg" +pushd %~dp0 + +REM Fail if chocolatey is not installed +where /Q choco +if ERRORLEVEL 1 ( echo This script requires chocolatey. Installation instructions: https://chocolatey.org/docs/installation exit -1 ) -choco install -y cmake -choco install -y svn -choco install -y git -choco install -y llvm -choco install -y zip -REM choco install -y visualstudio2017buildtools -REM choco install -y visualstudio2017enterprise +REM Print current Visual Studio installations detected +where /Q vswhere +if ERRORLEVEL 0 ( + echo Visual Studio installations detected: + vswhere -property installationPath +) + +REM Install tools needed to build SDK with either Visual Studio or CMake +choco install -y cmake svn git llvm zip + +REM Try to autodetect Visual Studio +call "%~dp0\vcvars.cmd" +if "%VSTOOLS_NOTFOUND%" == "1" ( + REM Cannot detect MSBuild path + REM TODO: no command line tools.. + REM TODO: use MSBuild from vswhere? +) +echo Visual Studio installation directory: +echo %VSINSTALLDIR% + +set "VSINSTALLER=%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vs_installer.exe" +if NOT exist "%VSINSTALLER%" ( + call download.cmd https://aka.ms/vs/16/release/vs_buildtools.exe + set VSINSTALLER=vs_buildtools.exe +) +echo Visual Studio installer: +echo "%VSINSTALLER%" + +REM Install optional components required for ARM build - vs2017-BuildTools +if exist "%VSINSTALLDIR%" ( + echo Running Visual Studio installer.. + "%VSINSTALLER%" ^ + modify --installPath "%VSINSTALLDIR%" -q ^ + --add Microsoft.Component.MSBuild ^ + --add Microsoft.VisualStudio.Component.Roslyn.Compiler ^ + --add Microsoft.VisualStudio.Component.TextTemplating ^ + --add Microsoft.VisualStudio.Component.VC.14.20.ARM ^ + --add Microsoft.VisualStudio.Component.VC.14.20.ARM64 ^ + --add Microsoft.VisualStudio.Component.VC.14.20.ATL ^ + --add Microsoft.VisualStudio.Component.VC.14.20.ATL.ARM ^ + --add Microsoft.VisualStudio.Component.VC.14.20.ATL.ARM64 ^ + --add Microsoft.VisualStudio.Component.VC.14.20.CLI.Support ^ + --add Microsoft.VisualStudio.Component.VC.ATL ^ + --add Microsoft.VisualStudio.Component.VC.ATL.ARM ^ + --add Microsoft.VisualStudio.Component.VC.ATL.ARM64 ^ + --add Microsoft.VisualStudio.Component.VC.ATLMFC ^ + --add Microsoft.VisualStudio.Component.VC.CLI.Support ^ + --add Microsoft.VisualStudio.Component.VC.CoreBuildTools ^ + --add Microsoft.VisualStudio.Component.VC.CoreIde ^ + --add Microsoft.VisualStudio.Component.VC.Llvm.Clang ^ + --add Microsoft.VisualStudio.Component.VC.Llvm.ClangToolset ^ + --add Microsoft.VisualStudio.Component.VC.Modules.x86.x64 ^ + --add Microsoft.VisualStudio.Component.VC.Redist.14.Latest ^ + --add Microsoft.VisualStudio.Component.VC.Tools.14.11 ^ + --add Microsoft.VisualStudio.Component.VC.Tools.ARM ^ + --add Microsoft.VisualStudio.Component.VC.Tools.ARM64 ^ + --add Microsoft.VisualStudio.Component.VC.Tools.x86.x64 ^ + --add Microsoft.VisualStudio.Component.VC.Tools.x86.x64 ^ + --add Microsoft.VisualStudio.Component.VC.v141.ARM ^ + --add Microsoft.VisualStudio.Component.VC.v141.ARM64 ^ + --add Microsoft.VisualStudio.Component.VC.v141.x86.x64 ^ + --add Microsoft.VisualStudio.Component.Windows10SDK ^ + --add Microsoft.VisualStudio.Component.Windows10SDK.16299 ^ + --add Microsoft.VisualStudio.Component.Windows10SDK.17134 ^ + --add Microsoft.VisualStudio.Component.Windows10SDK.17763 ^ + --add Microsoft.VisualStudio.ComponentGroup.NativeDesktop.Core ^ + --add Microsoft.VisualStudio.ComponentGroup.NativeDesktop.Llvm.Clang ^ + --add Microsoft.VisualStudio.ComponentGroup.NativeDesktop.Win81 ^ + --add Microsoft.VisualStudio.ComponentGroup.UWP.VC.BuildTools ^ + --add Microsoft.VisualStudio.ComponentGroup.UWP.VC.v141.BuildTools ^ + --add Microsoft.VisualStudio.Workload.VCTools ^ + --add Microsoft.VisualStudio.Component.UWP.VC.ARM64 ^ + --passive --quiet --norestart --noUpdateInstaller +) + +where /Q vcpkg.exe +if ERRORLEVEL 1 ( + REM Build our own vcpkg from source + pushd .\vcpkg + call bootstrap-vcpkg.bat + popd +) + +REM Install it +vcpkg integrate install +vcpkg install gtest:x64-windows +vcpkg install --overlay-ports=%~dp0\ports benchmark:x64-windows +vcpkg install ms-gsl:x64-windows + +REM Required for LLVM Clang build on Windows +call install-llvm.cmd + +popd +exit /b 0 diff --git a/tools/vcvars.cmd b/tools/vcvars.cmd index 3a97d2249..224fd923a 100644 --- a/tools/vcvars.cmd +++ b/tools/vcvars.cmd @@ -10,48 +10,71 @@ REM 4. Visual Studio 2019 Community REM 5. Visual Studio 2019 BuildTools REM +REM 1st parameter - Visual Studio version +if "%1" neq "" ( + goto %1 +) + +if "%VSTOOLS_VERSION%" neq "" ( + goto %VSTOOLS_VERSION% +) + REM vs2017 Enterprise -set TOOLS_VS2017_ENTERPRISE="%ProgramFiles(x86)%\Microsoft Visual Studio\2017\Enterprise\Common7\Tools\VsDevCmd.bat" -if exist %TOOLS_VS2017_ENTERPRISE% ( +:vs2017 +:vs2017_enterprise +set "VSDEVCMD=%ProgramFiles(x86)%\Microsoft Visual Studio\2017\Enterprise\Common7\Tools\VsDevCmd.bat" +if exist "%VSDEVCMD%" ( + set "VSINSTALLDIR=%ProgramFiles(x86)%\Microsoft Visual Studio\2017\Enterprise" echo Building with vs2017 Enterprise... - call %TOOLS_VS2017_ENTERPRISE% + call "%VSDEVCMD%" goto tools_configured ) REM vs2017 BuildTools -set TOOLS_VS2017="%ProgramFiles(x86)%\Microsoft Visual Studio\2017\BuildTools\Common7\Tools\VsDevCmd.bat" -if exist %TOOLS_VS2017% ( +:vs2017_buildtools +set "VSDEVCMD=%ProgramFiles(x86)%\Microsoft Visual Studio\2017\BuildTools\Common7\Tools\VsDevCmd.bat" +if exist "%VSDEVCMD%" ( + set "VSINSTALLDIR=%ProgramFiles(x86)%\Microsoft Visual Studio\2017\BuildTools" echo Building with vs2017 BuildTools... - call %TOOLS_VS2017% + call "%VSDEVCMD%" goto tools_configured ) REM vs2019 Enterprise -set TOOLS_VS2019_ENTERPRISE="%ProgramFiles(x86)%\Microsoft Visual Studio\2019\Enterprise\Common7\Tools\VsDevCmd.bat" -if exist %TOOLS_VS2019_ENTERPRISE% ( +:vs2019 +:vs2019_enterprise +set "VSDEVCMD=%ProgramFiles(x86)%\Microsoft Visual Studio\2019\Enterprise\Common7\Tools\VsDevCmd.bat" +if exist "%VSDEVCMD%" ( + set "VSINSTALLDIR=%ProgramFiles(x86)%\Microsoft Visual Studio\2019\Enterprise" echo Building with vs2019 Enterprise... - call %TOOLS_VS2019_ENTERPRISE% + call "%VSDEVCMD%" goto tools_configured ) REM vs2019 Community -set TOOLS_VS2019_COMMUNITY="%ProgramFiles(x86)%\Microsoft Visual Studio\2019\Community\Common7\Tools\VsDevCmd.bat" -if exist %TOOLS_VS2019_COMMUNITY% ( +:vs2019_community +set "VSDEVCMD=%ProgramFiles(x86)%\Microsoft Visual Studio\2019\Community\Common7\Tools\VsDevCmd.bat" +if exist "%VSDEVCMD%" ( + set "VSINSTALLDIR=%ProgramFiles(x86)%\Microsoft Visual Studio\2019\Community" echo Building with vs2019 Community... - call %TOOLS_VS2019_COMMUNITY% + call "%VSDEVCMD%" goto tools_configured ) REM vs2019 BuildTools -set TOOLS_VS2019="%ProgramFiles(x86)%\Microsoft Visual Studio\2019\BuildTools\Common7\Tools\VsDevCmd.bat" -if exist %TOOLS_VS2019% ( +:vs2019_buildtools +set "VSDEVCMD=%ProgramFiles(x86)%\Microsoft Visual Studio\2019\BuildTools\Common7\Tools\VsDevCmd.bat" +if exist "%VSDEVCMD%" ( + set "VSINSTALLDIR=%ProgramFiles(x86)%\Microsoft Visual Studio\2019\BuildTools" echo Building with vs2019 BuildTools... - call %TOOLS_VS2017% + call "%VSDEVCMD%" goto tools_configured ) echo WARNING:********************************************* echo WARNING: cannot auto-detect Visual Studio version !!! echo WARNING:********************************************* +set VSTOOLS_NOTFOUND=1 +exit /b 0 :tools_configured From 86e2ae8f4b03ed5f2fcc49c96628bd39ed57677e Mon Sep 17 00:00:00 2001 From: Max Golovanov Date: Wed, 17 Jun 2020 19:38:01 -0700 Subject: [PATCH 08/15] Add vs2019-clang support and fix LLVM Plugin installation for vs2017 --- build-cmake-clang-vs2019.cmd | 81 ++++++++++++++++++++++++++++++++++++ tools/install-llvm.cmd | 4 +- 2 files changed, 83 insertions(+), 2 deletions(-) create mode 100644 build-cmake-clang-vs2019.cmd diff --git a/build-cmake-clang-vs2019.cmd b/build-cmake-clang-vs2019.cmd new file mode 100644 index 000000000..0809711c0 --- /dev/null +++ b/build-cmake-clang-vs2019.cmd @@ -0,0 +1,81 @@ +@echo off + +set VSTOOLS_VERSION=vs2019 +cd %~dp0 + +echo Update all public submodules... +git -c submodule."lib/modules".update=none submodule update --init --recursive + +if DEFINED GIT_PULL_TOKEN ( + rd /s /q lib\modules + git clone https://%GIT_PULL_TOKEN%:x-oauth-basic@github.com/microsoft/cpp_client_telemetry_modules.git lib\modules +) + +call tools\vcvars.cmd + +setlocal enableextensions +setlocal enabledelayedexpansion +set ROOT=%~dp0 + +REM ******************************************************************** +REM Use cmake +REM ******************************************************************** +set "PATH=C:\Program Files\CMake\bin\;%PATH%" + +REM ******************************************************************** +REM Use clang compiler +REM ******************************************************************** +set CLANG_PATH="C:\Program Files\LLVM\bin" +set CC=%CLANG_PATH%\clang.exe +set CXX=%CLANG_PATH%\clang++.exe +set LLVM_VER=ClangCL + +REM ******************************************************************** +REM Set output directory, clean and/or create as-needed +REM ******************************************************************** +set OUTDIR=%ROOT%\Solutions\out +if "%1" == "clean" ( + @rmdir /s /q %OUTDIR% +) +if not exist "%OUTDIR%" mkdir %OUTDIR% + +REM ******************************************************************** +REM Build all deps using MSVC - Visual Studio 2017 (15) +REM ******************************************************************** +if "%1" == "nodeps" goto NODEPS +call tools\build-deps.cmd +:NODEPS + +cd %OUTDIR% + +REM ******************************************************************** +REM Invoke the build script +REM ******************************************************************** +set CMAKE_PACKAGE_TYPE=tgz +for %%a in ( m32 m64 ) do ( + for %%c in ( Release ) do ( + if "%%a"=="m32" ( + set ARCH=Win32 + set ARCH_GEN= Win32 + ) + if "%%a"=="m64" ( + set ARCH=x64 + set ARCH_GEN= x64 + ) + @mkdir %OUTDIR%\%%c\!ARCH! + cd %OUTDIR%\%%c\!ARCH! + set "CFLAGS=-%%a" + set "CXXFLAGS=-%%a -Wc++11-compat-pedantic -Wno-c++98-compat -Wno-everything" + cmake -G"Visual Studio 16 2019" -A !ARCH_GEN! ^ + -T"%LLVM_VER%" ^ + -DTARGET_ARCH=!ARCH! ^ + -DBUILD_SHARED_LIBS=OFF ^ + -DCMAKE_BUILD_TYPE=%%c ^ + -DCMAKE_PACKAGE_TYPE=%CMAKE_PACKAGE_TYPE% ^ + -DDEFAULT_PAL_IMPLEMENTATION=WIN32 ^ + %ROOT% + cmake --build . --config %%c -- /p:Configuration=%%c + ) +) + +cd %ROOT% diff --git a/tools/install-llvm.cmd b/tools/install-llvm.cmd index 7896f8d3c..976f1d09f 100644 --- a/tools/install-llvm.cmd +++ b/tools/install-llvm.cmd @@ -16,8 +16,8 @@ if NOT exist "%VSINSTALLDIR%" ( REM Install optional components set "VSIXInstaller=%VSINSTALLDIR%\Common7\IDE\VSIXInstaller.exe" -if exist %VSIXInstaller% ( - %VSIXInstaller% /q /a llvm.vsix +if exist "%VSIXInstaller%" ( + "%VSIXInstaller%" /q /a llvm.vsix ) REM Ignore failures if components have been already installed From 5cb1a74ea1e97d0519a5fe0d0e2de73a6bfcd464 Mon Sep 17 00:00:00 2001 From: Max Golovanov Date: Wed, 17 Jun 2020 19:58:26 -0700 Subject: [PATCH 09/15] Fix an issue with CMake on Windows and add vs2019 workflow --- .github/workflows/build-windows-clang.yaml | 7 +++-- build-cmake-clang-vs2017.cmd | 8 ++---- docs/cpp-start-windows.md | 31 +++++++++++++--------- lib/CMakeLists.txt | 1 + 4 files changed, 26 insertions(+), 21 deletions(-) diff --git a/.github/workflows/build-windows-clang.yaml b/.github/workflows/build-windows-clang.yaml index 636b4a0b3..0e92dae26 100644 --- a/.github/workflows/build-windows-clang.yaml +++ b/.github/workflows/build-windows-clang.yaml @@ -11,7 +11,7 @@ on: jobs: build: - runs-on: windows-2016 + runs-on: windows-2019 name: Build steps: @@ -20,6 +20,8 @@ jobs: uses: actions/checkout@v2 - name: Setup Tools + env: + VSTOOLS_VERSION: vs2019 shell: cmd run: tools\setup-buildtools.cmd @@ -27,5 +29,6 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GIT_PULL_TOKEN: ${{ secrets.GIT_PULL_TOKEN }} + VSTOOLS_VERSION: vs2019 shell: cmd - run: build-cmake-clang-vs2017.cmd + run: build-cmake-clang-vs2019.cmd diff --git a/build-cmake-clang-vs2017.cmd b/build-cmake-clang-vs2017.cmd index 94fd102b5..e222d4099 100644 --- a/build-cmake-clang-vs2017.cmd +++ b/build-cmake-clang-vs2017.cmd @@ -1,13 +1,9 @@ @echo off echo WARNING!!! ****************************************************************************************** !!!WARNING -echo WARNING!!! This part of the build process requires Visual Studio 2017 IDE to be installed on machine. !!!WARNING +echo WARNING!!! This part of the build process requires Visual Studio 2017 IDE to be installed on machine: !!!WARNING echo WARNING!!! llvm.vsix extension (Clang LLVM support for Visual Studio) is INCOMPATIBLE with vs2019. !!!WARNING echo WARNING!!! vs2019 build fails with an error: The build tools for LLVM (Platform Toolset = 'LLVM') !!!WARNING -echo WARNING!!! cannot be found. Since Visual Studio 2019-preview includes built-in support for Clang, !!!WARNING -echo WARNING!!! feel free to contribute a 'build-cmake-clang-vs2019.cmd' script. The only change should !!!WARNING -echo WARNING!!! be to change the LLVM_VER variable below to clang_cl_x64 ... Except that there could be !!!WARNING -echo WARNING!!! another issue (June 2019) here: https://gitlab.kitware.com/cmake/cmake/-/issues/20180 !!!WARNING -echo WARNING!!! The other alternative is to actually install Visual Studio 2017 IDE side-by-side.... !!!WARNING +echo WARNING!!! cannot be found. If you intend to use vs2019, build with build-cmake-clang-vs2019.cmd !!!WARNING echo WARNING!!! ****************************************************************************************** !!!WARNING timeout 5 diff --git a/docs/cpp-start-windows.md b/docs/cpp-start-windows.md index bd0bbd8b7..79dd67d3d 100644 --- a/docs/cpp-start-windows.md +++ b/docs/cpp-start-windows.md @@ -11,13 +11,12 @@ to clone the repo. If your project requires UTC to send telemetry, you need to a 2. You will be asked for your credentials to clone the repo. Generate a PAT token using GitHub UI, use your username and PAT token to clone the repo. See [Generating PAT token for command line clone](https://help.github.com/en/github/authenticating-to-github/creating-a-personal-access-token-for-the-command-line) -## **Windows prerequisites and dependencies for building from source using Visual Studio 2017** +## **Windows prerequisites and dependencies for building from source** -* Visual Studio 2017. -* C++ Dev Tools for Visual Studio 2017. -* Visual Studio 2019 _works_ if you use vc141 toolset; newer toolsets _might work_, but not tested. +* Visual Studio 2017 or 2019 +* C++ Dev Tools -## **Build the SDK from source using Visual Studio 2017** +## **Build the SDK from source using Visual Studio** * Open the *cpp_client_telemetry/Solutions/MSTelemetrySDK.sln* solution in Visual Studio. * Alternatively you can use *build-all.bat* located in workspace root folder to build from command line @@ -27,9 +26,9 @@ If your build fails, then you most likely missing the following optional Visual - ARM64 support - Spectre mitigation libraries -Please review the script [here](../tools/install-vs-addons.cmd) that shows how to install those optional components from command line. +Please review the script [here](../tools/setup-buildtools.cmd) that installs all the necessary dependencies. -Make sure you install all of these above optional Visual Studio components, as these are required for the SDK to build all SDK SKUs successfully. If you are using GitHub Actions infrastructure to build your project, then all of these optional components are available by default as part of stock GitHub Actions deployment. +Make sure you install all of these above optional Visual Studio components, as these are required for the SDK to build all SDK SKUs successfully for all platform types. If you are using GitHub Actions infrastructure to build your project, then all of these optional components are available by default as part of stock GitHub Actions deployment. Specific version of Windows 10 SDK is referenced by the project(s). You will need to install that exact version of Windows 10 SDK, but you may also manually upgrade all projects to current latest version of Windows 10 SDK for your local build. SDK may periodically update its Windows 10 SDK dependency from time to time. Your responsibility is to decide what Windows 10 SDK you need to use for shipping 1DS C++ SDK build from source. @@ -37,21 +36,27 @@ See: - [How to add optional components in Visual Studio 2017](https://docs.microsoft.com/en-us/visualstudio/install/modify-visual-studio?view=vs-2017) - [Download Windows 10 SDK](https://developer.microsoft.com/en-us/windows/downloads/windows-10-sdk) - ## **Windows prerequisites and dependencies for building from source using LLVM compiler** -* Visual Studio 2017 IDE +* Visual Studio * [LLVM compiler](https://releases.llvm.org/download.html) * [CMake build system](https://cmake.org/download/) * [LLVM compiler toolchain for Visual Studio](https://marketplace.visualstudio.com/items?itemName=LLVMExtensions.llvm-toolchain) -- Install CMake for Windows into C:\Program Files\CMake\bin\ (default path) -- Install **[LLVM/clang for Windows](http://releases.llvm.org/7.0.0/LLVM-7.0.0-win64.exe)** - version 7 or newer into C:\Program Files\LLVM\bin (default path) +- Start elevated cmd.exe shell (Run As Administrator) +- Launch **tools\setup-buildtools.cmd** to install all dependencies + +Make sure you can build a simple "Hello World" using CMake before proceeding to the next step. -Make sure you can build a simple "Hello World" using cmake before proceeding to the next step. To build SDK using cmake with clang on Windows, run: -```build-cmake-clang.cmd``` +```build-cmake-clang-vs2017.cmd``` + + or + +```build-cmake-clang-vs2019.cmd``` + +depending on what Visual Studio version you are using. ## **Instrument your code to send a telemetry event** diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt index 0b1e9a93f..9308777f9 100644 --- a/lib/CMakeLists.txt +++ b/lib/CMakeLists.txt @@ -148,6 +148,7 @@ remove_definitions(-D_MBCS) pal/desktop/WindowsDesktopSystemInformationImpl.cpp pal/desktop/WindowsEnvironmentInfo.hpp pal/desktop/NetworkDetector.cpp + utils/StringConversion.cpp ) # UTC module From aab62ca98241a7f2516785b272b627a6010c2b18 Mon Sep 17 00:00:00 2001 From: Max Golovanov Date: Wed, 17 Jun 2020 22:47:24 -0700 Subject: [PATCH 10/15] Attempt to fix command line parameters and reduce disk usage by not installing a bunch of random Win 10 SDKs --- tools/setup-buildtools.cmd | 81 ++++++++++++++++++-------------------- 1 file changed, 38 insertions(+), 43 deletions(-) diff --git a/tools/setup-buildtools.cmd b/tools/setup-buildtools.cmd index 060cc0862..9253a24e8 100644 --- a/tools/setup-buildtools.cmd +++ b/tools/setup-buildtools.cmd @@ -35,53 +35,48 @@ if NOT exist "%VSINSTALLER%" ( set VSINSTALLER=vs_buildtools.exe ) echo Visual Studio installer: -echo "%VSINSTALLER%" +echo %VSINSTALLER% REM Install optional components required for ARM build - vs2017-BuildTools if exist "%VSINSTALLDIR%" ( echo Running Visual Studio installer.. - "%VSINSTALLER%" ^ - modify --installPath "%VSINSTALLDIR%" -q ^ - --add Microsoft.Component.MSBuild ^ - --add Microsoft.VisualStudio.Component.Roslyn.Compiler ^ - --add Microsoft.VisualStudio.Component.TextTemplating ^ - --add Microsoft.VisualStudio.Component.VC.14.20.ARM ^ - --add Microsoft.VisualStudio.Component.VC.14.20.ARM64 ^ - --add Microsoft.VisualStudio.Component.VC.14.20.ATL ^ - --add Microsoft.VisualStudio.Component.VC.14.20.ATL.ARM ^ - --add Microsoft.VisualStudio.Component.VC.14.20.ATL.ARM64 ^ - --add Microsoft.VisualStudio.Component.VC.14.20.CLI.Support ^ - --add Microsoft.VisualStudio.Component.VC.ATL ^ - --add Microsoft.VisualStudio.Component.VC.ATL.ARM ^ - --add Microsoft.VisualStudio.Component.VC.ATL.ARM64 ^ - --add Microsoft.VisualStudio.Component.VC.ATLMFC ^ - --add Microsoft.VisualStudio.Component.VC.CLI.Support ^ - --add Microsoft.VisualStudio.Component.VC.CoreBuildTools ^ - --add Microsoft.VisualStudio.Component.VC.CoreIde ^ - --add Microsoft.VisualStudio.Component.VC.Llvm.Clang ^ - --add Microsoft.VisualStudio.Component.VC.Llvm.ClangToolset ^ - --add Microsoft.VisualStudio.Component.VC.Modules.x86.x64 ^ - --add Microsoft.VisualStudio.Component.VC.Redist.14.Latest ^ - --add Microsoft.VisualStudio.Component.VC.Tools.14.11 ^ - --add Microsoft.VisualStudio.Component.VC.Tools.ARM ^ - --add Microsoft.VisualStudio.Component.VC.Tools.ARM64 ^ - --add Microsoft.VisualStudio.Component.VC.Tools.x86.x64 ^ - --add Microsoft.VisualStudio.Component.VC.Tools.x86.x64 ^ - --add Microsoft.VisualStudio.Component.VC.v141.ARM ^ - --add Microsoft.VisualStudio.Component.VC.v141.ARM64 ^ - --add Microsoft.VisualStudio.Component.VC.v141.x86.x64 ^ - --add Microsoft.VisualStudio.Component.Windows10SDK ^ - --add Microsoft.VisualStudio.Component.Windows10SDK.16299 ^ - --add Microsoft.VisualStudio.Component.Windows10SDK.17134 ^ - --add Microsoft.VisualStudio.Component.Windows10SDK.17763 ^ - --add Microsoft.VisualStudio.ComponentGroup.NativeDesktop.Core ^ - --add Microsoft.VisualStudio.ComponentGroup.NativeDesktop.Llvm.Clang ^ - --add Microsoft.VisualStudio.ComponentGroup.NativeDesktop.Win81 ^ - --add Microsoft.VisualStudio.ComponentGroup.UWP.VC.BuildTools ^ - --add Microsoft.VisualStudio.ComponentGroup.UWP.VC.v141.BuildTools ^ - --add Microsoft.VisualStudio.Workload.VCTools ^ - --add Microsoft.VisualStudio.Component.UWP.VC.ARM64 ^ - --passive --quiet --norestart --noUpdateInstaller + "%VSINSTALLER%" modify --installPath "%VSINSTALLDIR%" -q ^ +--add Microsoft.Component.MSBuild ^ +--add Microsoft.VisualStudio.Component.Roslyn.Compiler ^ +--add Microsoft.VisualStudio.Component.TextTemplating ^ +--add Microsoft.VisualStudio.Component.VC.14.20.ARM ^ +--add Microsoft.VisualStudio.Component.VC.14.20.ARM64 ^ +--add Microsoft.VisualStudio.Component.VC.14.20.ATL ^ +--add Microsoft.VisualStudio.Component.VC.14.20.ATL.ARM ^ +--add Microsoft.VisualStudio.Component.VC.14.20.ATL.ARM64 ^ +--add Microsoft.VisualStudio.Component.VC.14.20.CLI.Support ^ +--add Microsoft.VisualStudio.Component.VC.ATL ^ +--add Microsoft.VisualStudio.Component.VC.ATL.ARM ^ +--add Microsoft.VisualStudio.Component.VC.ATL.ARM64 ^ +--add Microsoft.VisualStudio.Component.VC.ATLMFC ^ +--add Microsoft.VisualStudio.Component.VC.CLI.Support ^ +--add Microsoft.VisualStudio.Component.VC.CoreBuildTools ^ +--add Microsoft.VisualStudio.Component.VC.CoreIde ^ +--add Microsoft.VisualStudio.Component.VC.Llvm.Clang ^ +--add Microsoft.VisualStudio.Component.VC.Llvm.ClangToolset ^ +--add Microsoft.VisualStudio.Component.VC.Modules.x86.x64 ^ +--add Microsoft.VisualStudio.Component.VC.Redist.14.Latest ^ +--add Microsoft.VisualStudio.Component.VC.Tools.14.11 ^ +--add Microsoft.VisualStudio.Component.VC.Tools.ARM ^ +--add Microsoft.VisualStudio.Component.VC.Tools.ARM64 ^ +--add Microsoft.VisualStudio.Component.VC.Tools.x86.x64 ^ +--add Microsoft.VisualStudio.Component.VC.v141.ARM ^ +--add Microsoft.VisualStudio.Component.VC.v141.ARM64 ^ +--add Microsoft.VisualStudio.Component.VC.v141.x86.x64 ^ +--add Microsoft.VisualStudio.Component.Windows10SDK ^ +--add Microsoft.VisualStudio.ComponentGroup.NativeDesktop.Core ^ +--add Microsoft.VisualStudio.ComponentGroup.NativeDesktop.Llvm.Clang ^ +--add Microsoft.VisualStudio.ComponentGroup.NativeDesktop.Win81 ^ +--add Microsoft.VisualStudio.ComponentGroup.UWP.VC.BuildTools ^ +--add Microsoft.VisualStudio.ComponentGroup.UWP.VC.v141.BuildTools ^ +--add Microsoft.VisualStudio.Workload.VCTools ^ +--add Microsoft.VisualStudio.Component.UWP.VC.ARM64 ^ +--norestart --noUpdateInstaller ) where /Q vcpkg.exe From 9f649bb540ab825d08ec511f5474102371f42108 Mon Sep 17 00:00:00 2001 From: Max Golovanov Date: Thu, 18 Jun 2020 00:35:53 -0700 Subject: [PATCH 11/15] Add more v141 workloads instead of latest (we're still on v141) --- tools/setup-buildtools.cmd | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/tools/setup-buildtools.cmd b/tools/setup-buildtools.cmd index 9253a24e8..0777145b3 100644 --- a/tools/setup-buildtools.cmd +++ b/tools/setup-buildtools.cmd @@ -44,12 +44,19 @@ if exist "%VSINSTALLDIR%" ( --add Microsoft.Component.MSBuild ^ --add Microsoft.VisualStudio.Component.Roslyn.Compiler ^ --add Microsoft.VisualStudio.Component.TextTemplating ^ ---add Microsoft.VisualStudio.Component.VC.14.20.ARM ^ ---add Microsoft.VisualStudio.Component.VC.14.20.ARM64 ^ ---add Microsoft.VisualStudio.Component.VC.14.20.ATL ^ ---add Microsoft.VisualStudio.Component.VC.14.20.ATL.ARM ^ ---add Microsoft.VisualStudio.Component.VC.14.20.ATL.ARM64 ^ ---add Microsoft.VisualStudio.Component.VC.14.20.CLI.Support ^ +--add Microsoft.VisualStudio.ComponentGroup.UWP.VC.v141.BuildTools ^ +--add Microsoft.VisualStudio.Component.VC.v141.ARM ^ +--add Microsoft.VisualStudio.Component.VC.v141.ARM64 ^ +--add Microsoft.VisualStudio.Component.VC.v141.x86.x64 ^ +--add Microsoft.VisualStudio.Component.VC.v141.ARM.Spectre ^ +--add Microsoft.VisualStudio.Component.VC.v141.ARM64.Spectre ^ +--add Microsoft.VisualStudio.Component.VC.v141.ATL ^ +--add Microsoft.VisualStudio.Component.VC.v141.ATL.ARM ^ +--add Microsoft.VisualStudio.Component.VC.v141.ATL.ARM.Spectre ^ +--add Microsoft.VisualStudio.Component.VC.v141.ATL.ARM64 ^ +--add Microsoft.VisualStudio.Component.VC.v141.ATL.ARM64.Spectre ^ +--add Microsoft.VisualStudio.Component.VC.v141.ATL.Spectre ^ +--add Microsoft.VisualStudio.Component.VC.v141.CLI.Support ^ --add Microsoft.VisualStudio.Component.VC.ATL ^ --add Microsoft.VisualStudio.Component.VC.ATL.ARM ^ --add Microsoft.VisualStudio.Component.VC.ATL.ARM64 ^ @@ -65,9 +72,6 @@ if exist "%VSINSTALLDIR%" ( --add Microsoft.VisualStudio.Component.VC.Tools.ARM ^ --add Microsoft.VisualStudio.Component.VC.Tools.ARM64 ^ --add Microsoft.VisualStudio.Component.VC.Tools.x86.x64 ^ ---add Microsoft.VisualStudio.Component.VC.v141.ARM ^ ---add Microsoft.VisualStudio.Component.VC.v141.ARM64 ^ ---add Microsoft.VisualStudio.Component.VC.v141.x86.x64 ^ --add Microsoft.VisualStudio.Component.Windows10SDK ^ --add Microsoft.VisualStudio.ComponentGroup.NativeDesktop.Core ^ --add Microsoft.VisualStudio.ComponentGroup.NativeDesktop.Llvm.Clang ^ From ddef4715c581bbcdacb39c3833df66666d7141e7 Mon Sep 17 00:00:00 2001 From: Max Golovanov Date: Thu, 18 Jun 2020 14:27:21 -0700 Subject: [PATCH 12/15] Use installer config to add new components --- tools/.vsconfig.vs2017 | 29 ++++++++++++++++++++++++++ tools/.vsconfig.vs2019 | 38 ++++++++++++++++++++++++++++++++++ tools/setup-buildtools.cmd | 42 +------------------------------------- tools/vcvars.cmd | 3 +++ 4 files changed, 71 insertions(+), 41 deletions(-) create mode 100644 tools/.vsconfig.vs2017 create mode 100644 tools/.vsconfig.vs2019 diff --git a/tools/.vsconfig.vs2017 b/tools/.vsconfig.vs2017 new file mode 100644 index 000000000..5d5466d23 --- /dev/null +++ b/tools/.vsconfig.vs2017 @@ -0,0 +1,29 @@ +{ + "version": "1.0", + "components": [ + "Microsoft.Component.MSBuild", + "Microsoft.VisualStudio.Component.Windows10SDK", + "Microsoft.VisualStudio.Component.VC.CoreBuildTools", + "Microsoft.VisualStudio.Component.VC.Tools.x86.x64", + "Microsoft.VisualStudio.Component.VC.Redist.14.Latest", + "Microsoft.VisualStudio.Component.Windows10SDK.17763", + "Microsoft.VisualStudio.Component.VC.CMake.Project", + "Microsoft.VisualStudio.Component.VC.ATL", + "Microsoft.VisualStudio.Component.VC.ATLMFC", + "Microsoft.VisualStudio.Component.VC.CLI.Support", + "Microsoft.VisualStudio.Component.VC.Modules.x86.x64", + "Microsoft.VisualStudio.Component.Windows10SDK.16299.UWP", + "Microsoft.VisualStudio.Component.Windows10SDK.16299.UWP.Native", + "Microsoft.VisualStudio.Component.Windows10SDK.16299.Desktop", + "Microsoft.VisualStudio.Component.Windows10SDK.16299.Desktop.arm", + "Microsoft.VisualStudio.Component.VC.Tools.ARM", + "Microsoft.VisualStudio.Component.VC.Tools.ARM64", + "Microsoft.VisualStudio.Workload.VCTools", + "Microsoft.VisualStudio.ComponentGroup.UWP.BuildTools", + "Microsoft.VisualStudio.Workload.UniversalBuildTools", + "Microsoft.VisualStudio.Component.VC.ATL.ARM", + "Microsoft.VisualStudio.Component.VC.ATL.ARM64", + "Microsoft.VisualStudio.Component.VC.Tools.14.11", + "Microsoft.VisualStudio.Component.VC.ClangC2" + ] +} \ No newline at end of file diff --git a/tools/.vsconfig.vs2019 b/tools/.vsconfig.vs2019 new file mode 100644 index 000000000..a6da1ecc9 --- /dev/null +++ b/tools/.vsconfig.vs2019 @@ -0,0 +1,38 @@ +{ + "version": "1.0", + "components": [ + "Microsoft.VisualStudio.Component.Windows10SDK", + "Microsoft.VisualStudio.Component.VC.Tools.x86.x64", + "Microsoft.VisualStudio.Component.Windows10SDK.18362", + "Microsoft.VisualStudio.Workload.ManagedDesktop", + "Microsoft.VisualStudio.Component.VC.Redist.14.Latest", + "Microsoft.VisualStudio.Component.VC.CMake.Project", + "Microsoft.VisualStudio.Component.VC.ATL", + "Microsoft.VisualStudio.Component.VC.ATLMFC", + "Microsoft.VisualStudio.Component.VC.CLI.Support", + "Microsoft.VisualStudio.Component.VC.Llvm.ClangToolset", + "Microsoft.VisualStudio.Component.VC.Llvm.Clang", + "Microsoft.VisualStudio.Component.VC.v141.x86.x64", + "Microsoft.Component.VC.Runtime.UCRTSDK", + "Microsoft.VisualStudio.Workload.NativeDesktop", + "Microsoft.VisualStudio.Component.VC.Tools.ARM64", + "Microsoft.VisualStudio.Component.UWP.VC.ARM64", + "Microsoft.VisualStudio.Component.VC.Tools.ARM", + "Microsoft.VisualStudio.ComponentGroup.UWP.VC", + "Microsoft.VisualStudio.Component.VC.v141.ARM64", + "Microsoft.VisualStudio.Workload.Universal", + "Microsoft.VisualStudio.Component.VC.ATL.ARM", + "Microsoft.VisualStudio.Component.VC.ATL.ARM64", + "Microsoft.VisualStudio.Component.VC.MFC.ARM", + "Microsoft.VisualStudio.Component.VC.MFC.ARM64", + "Microsoft.VisualStudio.Component.VC.Redist.MSM", + "Microsoft.VisualStudio.Component.VC.v141.ARM64.Spectre", + "Microsoft.VisualStudio.Component.VC.v141.ATL.ARM", + "Microsoft.VisualStudio.Component.VC.v141.ATL.ARM64", + "Microsoft.VisualStudio.Component.VC.v141.ATL", + "Microsoft.VisualStudio.Component.VC.v141.CLI.Support", + "Microsoft.VisualStudio.Component.VC.v141.MFC.ARM", + "Microsoft.VisualStudio.Component.VC.v141.MFC.ARM64", + "Microsoft.VisualStudio.Component.VC.v141.MFC" + ] +} \ No newline at end of file diff --git a/tools/setup-buildtools.cmd b/tools/setup-buildtools.cmd index 0777145b3..3ca775a45 100644 --- a/tools/setup-buildtools.cmd +++ b/tools/setup-buildtools.cmd @@ -40,47 +40,7 @@ echo %VSINSTALLER% REM Install optional components required for ARM build - vs2017-BuildTools if exist "%VSINSTALLDIR%" ( echo Running Visual Studio installer.. - "%VSINSTALLER%" modify --installPath "%VSINSTALLDIR%" -q ^ ---add Microsoft.Component.MSBuild ^ ---add Microsoft.VisualStudio.Component.Roslyn.Compiler ^ ---add Microsoft.VisualStudio.Component.TextTemplating ^ ---add Microsoft.VisualStudio.ComponentGroup.UWP.VC.v141.BuildTools ^ ---add Microsoft.VisualStudio.Component.VC.v141.ARM ^ ---add Microsoft.VisualStudio.Component.VC.v141.ARM64 ^ ---add Microsoft.VisualStudio.Component.VC.v141.x86.x64 ^ ---add Microsoft.VisualStudio.Component.VC.v141.ARM.Spectre ^ ---add Microsoft.VisualStudio.Component.VC.v141.ARM64.Spectre ^ ---add Microsoft.VisualStudio.Component.VC.v141.ATL ^ ---add Microsoft.VisualStudio.Component.VC.v141.ATL.ARM ^ ---add Microsoft.VisualStudio.Component.VC.v141.ATL.ARM.Spectre ^ ---add Microsoft.VisualStudio.Component.VC.v141.ATL.ARM64 ^ ---add Microsoft.VisualStudio.Component.VC.v141.ATL.ARM64.Spectre ^ ---add Microsoft.VisualStudio.Component.VC.v141.ATL.Spectre ^ ---add Microsoft.VisualStudio.Component.VC.v141.CLI.Support ^ ---add Microsoft.VisualStudio.Component.VC.ATL ^ ---add Microsoft.VisualStudio.Component.VC.ATL.ARM ^ ---add Microsoft.VisualStudio.Component.VC.ATL.ARM64 ^ ---add Microsoft.VisualStudio.Component.VC.ATLMFC ^ ---add Microsoft.VisualStudio.Component.VC.CLI.Support ^ ---add Microsoft.VisualStudio.Component.VC.CoreBuildTools ^ ---add Microsoft.VisualStudio.Component.VC.CoreIde ^ ---add Microsoft.VisualStudio.Component.VC.Llvm.Clang ^ ---add Microsoft.VisualStudio.Component.VC.Llvm.ClangToolset ^ ---add Microsoft.VisualStudio.Component.VC.Modules.x86.x64 ^ ---add Microsoft.VisualStudio.Component.VC.Redist.14.Latest ^ ---add Microsoft.VisualStudio.Component.VC.Tools.14.11 ^ ---add Microsoft.VisualStudio.Component.VC.Tools.ARM ^ ---add Microsoft.VisualStudio.Component.VC.Tools.ARM64 ^ ---add Microsoft.VisualStudio.Component.VC.Tools.x86.x64 ^ ---add Microsoft.VisualStudio.Component.Windows10SDK ^ ---add Microsoft.VisualStudio.ComponentGroup.NativeDesktop.Core ^ ---add Microsoft.VisualStudio.ComponentGroup.NativeDesktop.Llvm.Clang ^ ---add Microsoft.VisualStudio.ComponentGroup.NativeDesktop.Win81 ^ ---add Microsoft.VisualStudio.ComponentGroup.UWP.VC.BuildTools ^ ---add Microsoft.VisualStudio.ComponentGroup.UWP.VC.v141.BuildTools ^ ---add Microsoft.VisualStudio.Workload.VCTools ^ ---add Microsoft.VisualStudio.Component.UWP.VC.ARM64 ^ ---norestart --noUpdateInstaller + "%VSINSTALLER%" modify --installPath "%VSINSTALLDIR%" --config .vsconfig.%VSVERSION% --passive --norestart --noUpdateInstaller ) where /Q vcpkg.exe diff --git a/tools/vcvars.cmd b/tools/vcvars.cmd index 224fd923a..042b582a7 100644 --- a/tools/vcvars.cmd +++ b/tools/vcvars.cmd @@ -23,6 +23,7 @@ REM vs2017 Enterprise :vs2017 :vs2017_enterprise set "VSDEVCMD=%ProgramFiles(x86)%\Microsoft Visual Studio\2017\Enterprise\Common7\Tools\VsDevCmd.bat" +set VSVERSION=2017 if exist "%VSDEVCMD%" ( set "VSINSTALLDIR=%ProgramFiles(x86)%\Microsoft Visual Studio\2017\Enterprise" echo Building with vs2017 Enterprise... @@ -43,6 +44,7 @@ if exist "%VSDEVCMD%" ( REM vs2019 Enterprise :vs2019 :vs2019_enterprise +set VSVERSION=2019 set "VSDEVCMD=%ProgramFiles(x86)%\Microsoft Visual Studio\2019\Enterprise\Common7\Tools\VsDevCmd.bat" if exist "%VSDEVCMD%" ( set "VSINSTALLDIR=%ProgramFiles(x86)%\Microsoft Visual Studio\2019\Enterprise" @@ -75,6 +77,7 @@ echo WARNING:********************************************* echo WARNING: cannot auto-detect Visual Studio version !!! echo WARNING:********************************************* set VSTOOLS_NOTFOUND=1 +set VSVERSION= exit /b 0 :tools_configured From 7c4e44d4d4b95d0ca43aa92dbaff607c8c7d853b Mon Sep 17 00:00:00 2001 From: Max Golovanov Date: Mon, 22 Jun 2020 13:47:55 -0700 Subject: [PATCH 13/15] Add Spectre mitigated library to the build --- lib/include/public/Version.hpp | 6 +++--- tools/.vsconfig.vs2017 | 8 +++++++- tools/.vsconfig.vs2019 | 4 ++++ tools/setup-buildtools.cmd | 2 +- 4 files changed, 15 insertions(+), 5 deletions(-) diff --git a/lib/include/public/Version.hpp b/lib/include/public/Version.hpp index 86f4aea5b..237a8f95f 100644 --- a/lib/include/public/Version.hpp +++ b/lib/include/public/Version.hpp @@ -3,8 +3,8 @@ #define MAT_VERSION_HPP // WARNING: DO NOT MODIFY THIS FILE! // This file has been automatically generated, manual changes will be lost. -#define BUILD_VERSION_STR "3.3.169.1" -#define BUILD_VERSION 3,3,169,1 +#define BUILD_VERSION_STR "3.3.170.1" +#define BUILD_VERSION 3,3,170,1 #ifndef RESOURCE_COMPILER_INVOKED #include @@ -30,7 +30,7 @@ namespace ARIASDK_NS_BEGIN { uint64_t const Version = ((uint64_t)3 << 48) | ((uint64_t)3 << 32) | - ((uint64_t)169 << 16) | + ((uint64_t)170 << 16) | ((uint64_t)1); } ARIASDK_NS_END diff --git a/tools/.vsconfig.vs2017 b/tools/.vsconfig.vs2017 index 5d5466d23..7c7d7559d 100644 --- a/tools/.vsconfig.vs2017 +++ b/tools/.vsconfig.vs2017 @@ -24,6 +24,12 @@ "Microsoft.VisualStudio.Component.VC.ATL.ARM", "Microsoft.VisualStudio.Component.VC.ATL.ARM64", "Microsoft.VisualStudio.Component.VC.Tools.14.11", - "Microsoft.VisualStudio.Component.VC.ClangC2" + "Microsoft.VisualStudio.Component.VC.ClangC2", + "Microsoft.VisualStudio.Component.VC.ATLMFC.Spectre", + "Microsoft.Visualstudio.Component.VC.Runtimes.x86.x64.Spectre", + "Microsoft.VisualStudio.Component.VC.Runtimes.ARM64.Spectre", + "Microsoft.VisualStudio.Component.VC.ATL.ARM64.Spectre", + "Microsoft.VisualStudio.Component.VC.MFC.ARM64", + "Microsoft.VisualStudio.Component.VC.MFC.ARM64.Spectre" ] } \ No newline at end of file diff --git a/tools/.vsconfig.vs2019 b/tools/.vsconfig.vs2019 index a6da1ecc9..ad99783ec 100644 --- a/tools/.vsconfig.vs2019 +++ b/tools/.vsconfig.vs2019 @@ -26,10 +26,14 @@ "Microsoft.VisualStudio.Component.VC.MFC.ARM", "Microsoft.VisualStudio.Component.VC.MFC.ARM64", "Microsoft.VisualStudio.Component.VC.Redist.MSM", + "Microsoft.VisualStudio.Component.VC.v141.ARM.Spectre", "Microsoft.VisualStudio.Component.VC.v141.ARM64.Spectre", "Microsoft.VisualStudio.Component.VC.v141.ATL.ARM", "Microsoft.VisualStudio.Component.VC.v141.ATL.ARM64", "Microsoft.VisualStudio.Component.VC.v141.ATL", + "Microsoft.VisualStudio.Component.VC.v141.ATL.ARM.Spectre", + "Microsoft.VisualStudio.Component.VC.v141.ATL.ARM64.Spectre", + "Microsoft.VisualStudio.Component.VC.v141.ATL.Spectre", "Microsoft.VisualStudio.Component.VC.v141.CLI.Support", "Microsoft.VisualStudio.Component.VC.v141.MFC.ARM", "Microsoft.VisualStudio.Component.VC.v141.MFC.ARM64", diff --git a/tools/setup-buildtools.cmd b/tools/setup-buildtools.cmd index 3ca775a45..abf1e38e2 100644 --- a/tools/setup-buildtools.cmd +++ b/tools/setup-buildtools.cmd @@ -40,7 +40,7 @@ echo %VSINSTALLER% REM Install optional components required for ARM build - vs2017-BuildTools if exist "%VSINSTALLDIR%" ( echo Running Visual Studio installer.. - "%VSINSTALLER%" modify --installPath "%VSINSTALLDIR%" --config .vsconfig.%VSVERSION% --passive --norestart --noUpdateInstaller + "%VSINSTALLER%" modify --installPath "%VSINSTALLDIR%" --config "%~dp0\.vsconfig.%VSVERSION%" --force --quiet --norestart ) where /Q vcpkg.exe From add0d8e7cfa07d5e116424d305a974bf44428f55 Mon Sep 17 00:00:00 2001 From: Max Golovanov Date: Tue, 23 Jun 2020 19:01:22 -0700 Subject: [PATCH 14/15] Fix for C++17 latest compiler update --- lib/include/public/LogManagerProvider.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/include/public/LogManagerProvider.hpp b/lib/include/public/LogManagerProvider.hpp index c1343bda3..214e8a44e 100644 --- a/lib/include/public/LogManagerProvider.hpp +++ b/lib/include/public/LogManagerProvider.hpp @@ -161,7 +161,7 @@ namespace ARIASDK_NS_BEGIN /// http - optional IHttpClient override instance /// taskDispatcher - optional ITaskDispatcher override instance /// - typedef struct + typedef struct capi_client_struct { ILogManager* logmanager = nullptr; ILogConfiguration config; From 62e6f55e7af05e7c164207cf26de855f93a99359 Mon Sep 17 00:00:00 2001 From: Max Golovanov Date: Tue, 23 Jun 2020 19:04:10 -0700 Subject: [PATCH 15/15] Build environments for vs2017 and vs2019, with ability to exclude ARM builds (ARM tools are not installed by default on GitHub runners) --- .github/workflows/build-windows-vs2017.yaml | 2 + .github/workflows/build-windows-vs2019.yaml | 3 ++ README.md | 8 +-- Solutions/before.targets | 4 +- build-all-v142.bat | 55 +++++++++++++++++++++ build-all.bat | 4 ++ lib/include/public/Version.hpp | 6 +-- 7 files changed, 75 insertions(+), 7 deletions(-) create mode 100644 build-all-v142.bat diff --git a/.github/workflows/build-windows-vs2017.yaml b/.github/workflows/build-windows-vs2017.yaml index 547a9cc75..6015bdd45 100644 --- a/.github/workflows/build-windows-vs2017.yaml +++ b/.github/workflows/build-windows-vs2017.yaml @@ -27,5 +27,7 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GIT_PULL_TOKEN: ${{ secrets.GIT_PULL_TOKEN }} + SKIP_ARM_BUILD: 1 + SKIP_ARM64_BUILD: 1 shell: cmd run: build-all.bat diff --git a/.github/workflows/build-windows-vs2019.yaml b/.github/workflows/build-windows-vs2019.yaml index b0a91848d..4c809e500 100644 --- a/.github/workflows/build-windows-vs2019.yaml +++ b/.github/workflows/build-windows-vs2019.yaml @@ -27,5 +27,8 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GIT_PULL_TOKEN: ${{ secrets.GIT_PULL_TOKEN }} + SKIP_ARM_BUILD: 1 + SKIP_ARM64_BUILD: 1 + PlatformToolset: v142 shell: cmd run: build-all.bat diff --git a/README.md b/README.md index 8340e57df..c1ea40a5f 100644 --- a/README.md +++ b/README.md @@ -40,7 +40,8 @@ To build the SDK, please refer to [How to build the SDK](CONTRIBUTING.md#How_to_ | Ubuntu 14.04.1 LTS | GCC 5.x.x | | Ubuntu 16.04 LTS | GCC 5.x.x (armv7l) | | Windows 10 | Android Studio/Gradle | - | Windows Server 2016 | Visual Studio 2017 | + | Windows Server 2016 | Visual Studio 2017 (vc141) | + | Windows Server 2019 | Visual Studio 2019 (vc142) |
@@ -48,7 +49,7 @@ To build the SDK, please refer to [How to build the SDK](CONTRIBUTING.md#How_to_ | Target Platform | Supported | Covered by CI | | ------------------------------ | ------------------ | ------------------ | - | Android | partial† | | + | Android | partial† | :white_check_mark: | | iOS 10+ (simulator) | :white_check_mark: | :white_check_mark: | | iOS 10+ (arm64, arm64e) | :white_check_mark: | | | Linux (x86, x64, arm, aarch64) | :white_check_mark: | | @@ -57,10 +58,11 @@ To build the SDK, please refer to [How to build the SDK](CONTRIBUTING.md#How_to_ | Ubuntu 14.04.x LTS | :white_check_mark: | :white_check_mark: | | Ubuntu (latest) | :white_check_mark: | :white_check_mark: | | Windows 7.1 | :white_check_mark: | | - | Windows 8.1 | :white_check_mark: | :white_check_mark: | + | Windows 8.1 | :white_check_mark: | | | Windows 10.x | :white_check_mark: | | | Windows Server 2012 | :white_check_mark: | | | Windows Server 2016 | :white_check_mark: | :white_check_mark: | + | Windows Server 2019 | :white_check_mark: | | * **Supported** - these platforms are known to work well with the SDK in production. diff --git a/Solutions/before.targets b/Solutions/before.targets index bc29bde5a..395b1c1f8 100644 --- a/Solutions/before.targets +++ b/Solutions/before.targets @@ -3,7 +3,9 @@ $(SolutionDir)\..\third_party\krabsetw\krabs;$(CustomIncludePath) - v141 + + v141 + $(PlatformToolset) $([Microsoft.Build.Utilities.ToolLocationHelper]::GetLatestSDKTargetPlatformVersion('Windows', '10.0')) $(LatestTargetPlatformVersion) diff --git a/build-all-v142.bat b/build-all-v142.bat new file mode 100644 index 000000000..39a67d17f --- /dev/null +++ b/build-all-v142.bat @@ -0,0 +1,55 @@ +@echo off + +set VSTOOLS_VERSION=vs2019 +set PlatformToolset=v142 + +cd %~dp0 +call tools\gen-version.cmd +@setlocal ENABLEEXTENSIONS + +echo Update all public submodules... +git -c submodule."lib/modules".update=none submodule update --init --recursive + +if DEFINED GIT_PULL_TOKEN ( + rd /s /q lib\modules + git clone https://%GIT_PULL_TOKEN%:x-oauth-basic@github.com/microsoft/cpp_client_telemetry_modules.git lib\modules +) + +call tools\vcvars.cmd + +set MAXCPUCOUNT=%NUMBER_OF_PROCESSORS% +set platform= +set SOLUTION=Solutions\MSTelemetrySDK.sln + +set CUSTOM_PROPS= +if ("%1"=="") goto skip +set CUSTOM_PROPS="/p:ForceImportBeforeCppTargets=%1" +echo Using custom properties file for the build: +echo %CUSTOM_PROPS% +:skip + +REM DLL and static /MD build +msbuild %SOLUTION% /target:sqlite,zlib,sqlite-uwp,win32-dll,win32-lib,net40,win10-cs,win10-dll,Tests\gmock,Tests\gtest,Tests\UnitTests,Tests\FuncTests /p:BuildProjectReferences=true /maxcpucount:%MAXCPUCOUNT% /p:Configuration=Debug /p:Platform=Win32 %CUSTOM_PROPS% +msbuild %SOLUTION% /target:sqlite,zlib,sqlite-uwp,win32-dll,win32-lib,net40,win10-cs,win10-dll,Tests\gmock,Tests\gtest,Tests\UnitTests,Tests\FuncTests /p:BuildProjectReferences=true /maxcpucount:%MAXCPUCOUNT% /p:Configuration=Release /p:Platform=Win32 %CUSTOM_PROPS% +msbuild %SOLUTION% /target:sqlite,zlib,sqlite-uwp,win32-dll,win32-lib,net40,win10-cs,win10-dll,Tests\gmock,Tests\gtest,Tests\UnitTests,Tests\FuncTests /p:BuildProjectReferences=true /maxcpucount:%MAXCPUCOUNT% /p:Configuration=Debug /p:Platform=x64 %CUSTOM_PROPS% +msbuild %SOLUTION% /target:sqlite,zlib,sqlite-uwp,win32-dll,win32-lib,net40,win10-cs,win10-dll,Tests\gmock,Tests\gtest,Tests\UnitTests,Tests\FuncTests /p:BuildProjectReferences=true /maxcpucount:%MAXCPUCOUNT% /p:Configuration=Release /p:Platform=x64 %CUSTOM_PROPS% + +REM Static /MT build +msbuild %SOLUTION% /target:sqlite,zlib,win32-lib /p:BuildProjectReferences=true /maxcpucount:%MAXCPUCOUNT% /p:Configuration=Debug.vs2015.MT-sqlite /p:Platform=Win32 %CUSTOM_PROPS% +msbuild %SOLUTION% /target:sqlite,zlib,win32-lib /p:BuildProjectReferences=true /maxcpucount:%MAXCPUCOUNT% /p:Configuration=Release.vs2015.MT-sqlite /p:Platform=Win32 %CUSTOM_PROPS% +msbuild %SOLUTION% /target:sqlite,zlib,win32-lib /p:BuildProjectReferences=true /maxcpucount:%MAXCPUCOUNT% /p:Configuration=Debug.vs2015.MT-sqlite /p:Platform=x64 %CUSTOM_PROPS% +msbuild %SOLUTION% /target:sqlite,zlib,win32-lib /p:BuildProjectReferences=true /maxcpucount:%MAXCPUCOUNT% /p:Configuration=Release.vs2015.MT-sqlite /p:Platform=x64 %CUSTOM_PROPS% + +if NOT DEFINED SKIP_ARM_BUILD ( +REM ARM DLL build +call tools\vcvars-ext.cmd arm +msbuild %SOLUTION% /target:zlib,sqlite-uwp,win10-cs,win10-dll /p:BuildProjectReferences=true /maxcpucount:%MAXCPUCOUNT% /p:Configuration=Debug /p:Platform=ARM %CUSTOM_PROPS% +msbuild %SOLUTION% /target:zlib,sqlite-uwp,win10-cs,win10-dll /p:BuildProjectReferences=true /maxcpucount:%MAXCPUCOUNT% /p:Configuration=Release /p:Platform=ARM %CUSTOM_PROPS% +) + +if NOT DEFINED SKIP_ARM64_BUILD ( +REM ARM64 DLL build +call tools\vcvars-ext.cmd arm64 +msbuild %SOLUTION% /target:sqlite,zlib,sqlite-uwp,win32-dll,win32-lib,win10-cs,win10-dll /p:BuildProjectReferences=true /maxcpucount:%MAXCPUCOUNT% /p:Configuration=Debug /p:Platform=ARM64 %CUSTOM_PROPS% +msbuild %SOLUTION% /target:sqlite,zlib,sqlite-uwp,win32-dll,win32-lib,win10-cs,win10-dll /p:BuildProjectReferences=true /maxcpucount:%MAXCPUCOUNT% /p:Configuration=Release /p:Platform=ARM64 %CUSTOM_PROPS% +) diff --git a/build-all.bat b/build-all.bat index 3e3366e59..1447e2d9b 100644 --- a/build-all.bat +++ b/build-all.bat @@ -37,12 +37,16 @@ msbuild %SOLUTION% /target:sqlite,zlib,win32-lib /p:BuildProjectReferences=true msbuild %SOLUTION% /target:sqlite,zlib,win32-lib /p:BuildProjectReferences=true /maxcpucount:%MAXCPUCOUNT% /p:Configuration=Debug.vs2015.MT-sqlite /p:Platform=x64 %CUSTOM_PROPS% msbuild %SOLUTION% /target:sqlite,zlib,win32-lib /p:BuildProjectReferences=true /maxcpucount:%MAXCPUCOUNT% /p:Configuration=Release.vs2015.MT-sqlite /p:Platform=x64 %CUSTOM_PROPS% +if NOT DEFINED SKIP_ARM_BUILD ( REM ARM DLL build call tools\vcvars-ext.cmd arm msbuild %SOLUTION% /target:zlib,sqlite-uwp,win10-cs,win10-dll /p:BuildProjectReferences=true /maxcpucount:%MAXCPUCOUNT% /p:Configuration=Debug /p:Platform=ARM %CUSTOM_PROPS% msbuild %SOLUTION% /target:zlib,sqlite-uwp,win10-cs,win10-dll /p:BuildProjectReferences=true /maxcpucount:%MAXCPUCOUNT% /p:Configuration=Release /p:Platform=ARM %CUSTOM_PROPS% +) +if NOT DEFINED SKIP_ARM64_BUILD ( REM ARM64 DLL build call tools\vcvars-ext.cmd arm64 msbuild %SOLUTION% /target:sqlite,zlib,sqlite-uwp,win32-dll,win32-lib,win10-cs,win10-dll /p:BuildProjectReferences=true /maxcpucount:%MAXCPUCOUNT% /p:Configuration=Debug /p:Platform=ARM64 %CUSTOM_PROPS% msbuild %SOLUTION% /target:sqlite,zlib,sqlite-uwp,win32-dll,win32-lib,win10-cs,win10-dll /p:BuildProjectReferences=true /maxcpucount:%MAXCPUCOUNT% /p:Configuration=Release /p:Platform=ARM64 %CUSTOM_PROPS% +) diff --git a/lib/include/public/Version.hpp b/lib/include/public/Version.hpp index 237a8f95f..8e6706bd4 100644 --- a/lib/include/public/Version.hpp +++ b/lib/include/public/Version.hpp @@ -3,8 +3,8 @@ #define MAT_VERSION_HPP // WARNING: DO NOT MODIFY THIS FILE! // This file has been automatically generated, manual changes will be lost. -#define BUILD_VERSION_STR "3.3.170.1" -#define BUILD_VERSION 3,3,170,1 +#define BUILD_VERSION_STR "3.3.175.1" +#define BUILD_VERSION 3,3,175,1 #ifndef RESOURCE_COMPILER_INVOKED #include @@ -30,7 +30,7 @@ namespace ARIASDK_NS_BEGIN { uint64_t const Version = ((uint64_t)3 << 48) | ((uint64_t)3 << 32) | - ((uint64_t)170 << 16) | + ((uint64_t)175 << 16) | ((uint64_t)1); } ARIASDK_NS_END