Skip to content

Commit

Permalink
Update build
Browse files Browse the repository at this point in the history
  • Loading branch information
pomianowski committed Feb 3, 2024
1 parent 94de407 commit 3099262
Show file tree
Hide file tree
Showing 7 changed files with 38 additions and 290 deletions.
4 changes: 2 additions & 2 deletions build.cmd
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@echo off
powershell -ExecutionPolicy ByPass -NoProfile -command "& """%~dp0scripts\build_demo.ps1""""
powershell -ExecutionPolicy ByPass -NoProfile -command "& """%~dp0build.ps1""""
@REM powershell -ExecutionPolicy ByPass -NoProfile -command "& """%~dp0scripts\build_extension.ps1""""
exit /b %ErrorLevel%
exit /b %ErrorLevel%
36 changes: 36 additions & 0 deletions build.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
$wingetVersion = & winget --version 2>$null

if ($wingetVersion -eq $null) {
Write-Output "winget is not installed. Starting installation..."

Invoke-WebRequest -Uri "https://github.com/microsoft/winget-cli/releases/download/v1.6.3482/Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.msixbundle" -OutFile "$env:TEMP\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.msixbundle"

Add-AppxPackage -Path "$env:TEMP\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.msixbundle"

Write-Output "winget has been installed."
}

$dotnetVersion = & dotnet --version 2>$null

if ($dotnetVersion -eq $null) {
Write-Output ".NET SDK is not installed."

winget install Microsoft.DotNet.SDK.8
} else {
$majorVersion = $dotnetVersion.Split('.')[0]

if ($majorVersion -ge 8) {
Write-Output ".NET SDK version is $dotnetVersion, which is 8.0.0 or newer."
} else {
Write-Output ".NET SDK version is $dotnetVersion, which is older than 8.0.0."

winget install Microsoft.DotNet.SDK.8
}
}

if ($env:PROCESSOR_ARCHITECTURE -eq "AMD64") {
dotnet restore Wpf.Ui.sln /tl
dotnet build src\Wpf.Ui.Gallery\Wpf.Ui.Gallery.csproj --configuration Release --no-restore --verbosity quiet /tl
} else {
Write-Host "Not in the x64 desktop environment."
}
1 change: 0 additions & 1 deletion etc/build_demo.ps1

This file was deleted.

1 change: 0 additions & 1 deletion etc/build_extension.ps1

This file was deleted.

1 change: 0 additions & 1 deletion etc/build_library.ps1

This file was deleted.

127 changes: 0 additions & 127 deletions etc/dotnet_build.ps1

This file was deleted.

158 changes: 0 additions & 158 deletions etc/msbuild_build.ps1

This file was deleted.

0 comments on commit 3099262

Please sign in to comment.