Skip to content

Commit

Permalink
Update build script to use VS community if professional isn't found
Browse files Browse the repository at this point in the history
  • Loading branch information
sirjuddington committed Jun 1, 2021
1 parent 316d2b0 commit ba722dd
Showing 1 changed file with 15 additions and 4 deletions.
19 changes: 15 additions & 4 deletions dist/makebuild.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,22 @@ $buildbinaries = Read-Host
# Build SLADE
if ($buildbinaries.ToLower() -eq "y")
{
# Find devenv path (community or professional)
$devenvpath19 = "${env:ProgramFiles(x86)}\Microsoft Visual Studio\2019\Professional\Common7\IDE\devenv.com"
# $devenvpath17 = "${env:ProgramFiles(x86)}\Microsoft Visual Studio\2017\Professional\Common7\IDE\devenv.com"
& $devenvpath19 (resolve-path ..\build\msvc\SLADE.sln).Path /rebuild "Release - vcpkg, static|Win32" /project SLADE.vcxproj
& $devenvpath19 (resolve-path ..\build\msvc\SLADE.sln).Path /rebuild "Release - vcpkg, static|x64" /project SLADE.vcxproj
# & $devenvpath17 (resolve-path ..\build\msvc\SLADE.sln).Path /rebuild "Release - WinXP|Win32" /project SLADE.vcxproj
if (-not (Test-Path $devenvpath19))
{
$devenvpath19 = "${env:ProgramFiles(x86)}\Microsoft Visual Studio\2019\Community\Common7\IDE\devenv.com"
}
if (-not (Test-Path $devenvpath19))
{
Write-Host "`nCould not find Visual Studio 2019 path" -ForegroundColor Red
Exit-PSSession
}
else
{
& $devenvpath19 (resolve-path ..\build\msvc\SLADE.sln).Path /rebuild "Release - vcpkg, static|Win32" /project SLADE.vcxproj
& $devenvpath19 (resolve-path ..\build\msvc\SLADE.sln).Path /rebuild "Release - vcpkg, static|x64" /project SLADE.vcxproj
}
}

# Determine release directory + platforms
Expand Down

0 comments on commit ba722dd

Please sign in to comment.