2020-09-17 11:08:14 +00:00
$ErrorActionPreference = " Stop "
2020-09-15 12:47:30 +00:00
cd " $PSScriptRoot \.. "
2020-07-22 14:22:21 +00:00
if ( " $Env:FORCE_RELEASE " ) {
New-Item prerelease . txt -type file
Write-Host " Building release version. "
}
2020-09-15 12:47:30 +00:00
mkdir build
cd build
$boost_dir = ( Resolve-Path $PSScriptRoot \ . . \ deps \ boost \ lib \ cmake \ Boost - * )
. . \ deps \ cmake \ bin \ cmake -G " Visual Studio 16 2019 " -DBoost_DIR = " $boost_dir \ " -DCMAKE_MSVC_RUNTIME_LIBRARY = MultiThreaded -DCMAKE_INSTALL_PREFIX = " $PSScriptRoot \..\upload " . .
2020-09-17 11:08:14 +00:00
if ( -not $ ? ) { throw " CMake configure failed. " }
2020-09-15 12:47:30 +00:00
msbuild solidity . sln / p: Configuration = Release / m: 5 / v: minimal
2020-09-17 11:08:14 +00:00
if ( -not $ ? ) { throw " Build failed. " }
2020-09-15 12:47:30 +00:00
. . \ deps \ cmake \ bin \ cmake - -build . -j 5 - -target install - -config Release
2020-09-17 11:08:14 +00:00
if ( -not $ ? ) { throw " Install target failed. " }