diff --git a/BuildTools/Scripts/appveyor/install.bat b/BuildTools/Scripts/appveyor/install.bat deleted file mode 100644 index f3c6e5274..000000000 --- a/BuildTools/Scripts/appveyor/install.bat +++ /dev/null @@ -1,7 +0,0 @@ -set CMAKE_URL="https://github.com/Kitware/CMake/releases/download/v3.23.3/cmake-3.23.3-windows-x86_64.zip" -appveyor DownloadFile %CMAKE_URL% -FileName cmake.zip -7z x cmake.zip -oC:\projects\deps > nul -move C:\projects\deps\cmake-* C:\projects\deps\cmake -set PATH=C:\projects\deps\cmake\bin;C:\Python37-x64;%PATH% -cmake --version -python --version diff --git a/BuildTools/Scripts/appveyor/install.ps1 b/BuildTools/Scripts/appveyor/install.ps1 new file mode 100644 index 000000000..c4408301a --- /dev/null +++ b/BuildTools/Scripts/appveyor/install.ps1 @@ -0,0 +1,21 @@ +$DOTNET_URL = "https://dot.net/v1/dotnet-install.ps1" +$CMAKE_URL = "https://github.com/Kitware/CMake/releases/download/v3.23.3/cmake-3.23.3-windows-x86_64.zip" + +# Install .NET +Invoke-WebRequest $DOTNET_URL -OutFile "dotnet-install.ps1" +./dotnet-install.ps1 -Version 6.0.100 -InstallDir "C:\Program Files\dotnet" + +# Install CMake +Invoke-WebRequest $CMAKE_URL -OutFile "cmake.zip" +Expand-Archive -Path cmake.zip -DestinationPath C:\projects\deps -Force + +# Configuring environment +Move-Item -Path (Get-ChildItem C:\projects\deps\cmake-* | Select-Object -ExpandProperty FullName) -Destination C:\projects\deps\cmake -Force +$env:PATH = "C:\projects\deps\cmake\bin;C:\Python37-x64;$env:PATH" + +# Check dependencies +cmake --version +python --version + +Write-Host "Available .NET SDK versions:" +dotnet --list-sdks diff --git a/appveyor.yml b/appveyor.yml index 6faacd1f1..890f7e2d4 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -29,7 +29,7 @@ clone_folder: c:\projects\DiligentCore install: # clone submodules - git submodule update --init --recursive - - BuildTools\Scripts\appveyor\install.bat + - ps: .\BuildTools\Scripts\appveyor\install.ps1 before_build: - 'cd %APPVEYOR_BUILD_FOLDER%\BuildTools\FormatValidation'