SkyrimOutfitSystemSE/appveyorscript
MetricExpansion 64c254c899 New script
2022-10-08 22:13:12 -07:00

26 lines
931 B
Text

$env:GIT_REDIRECT_STDERR = '2>&1'
function Invoke-CmdScript {
param(
[String] $scriptName
)
$cmdLine = """$scriptName"" $args & set"
& $Env:SystemRoot\system32\cmd.exe /c $cmdLine |
select-string '^([^=]*)=(.*)$' | foreach-object {
$varName = $_.Matches[0].Groups[1].Value
$varValue = $_.Matches[0].Groups[2].Value
set-item Env:$varName $varValue
}
}
git submodule update --init
mkdir build
cd build
Invoke-CmdScript "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvars64.bat"
# Run cmake to set up proto compiler (need to do this)
cmake -DCMAKE_BUILD_TYPE=Release -G Ninja -DCMAKE_TOOLCHAIN_FILE=C:\Tools\vcpkg\scripts\buildsystems\vcpkg.cmake -DVCPKG_TARGET_TRIPLET=x64-windows-static -DSKYRIM_VERSION=PRE_AE ../
# Run cmake to build
cmake -DCMAKE_BUILD_TYPE=Release -G Ninja -DVCPKG_TARGET_TRIPLET=x64-windows-static ../
# Finally, build the thing
cmake --build . -j