Windows / PowerShell

& {
    $ErrorActionPreference = 'Stop'
    git clone https://github.com/scarletnx/ScarletNX.git
    if ($LASTEXITCODE) { throw 'Clone failed' }
    Set-Location ScarletNX
    powershell -ExecutionPolicy Bypass -File scripts\bootstrap.ps1
    if ($LASTEXITCODE) { throw 'Bootstrap failed' }
    Set-ExecutionPolicy -Scope Process Bypass
    . .\scripts\env.ps1
    cmake --preset default -B build
    if ($LASTEXITCODE) { throw 'Configure failed' }
    cmake --build build
    if ($LASTEXITCODE) { throw 'Build failed' }
}
# -> build\{scarletnx.exe,snx-shaderc.exe}

Each new shell, from the checkout:

Set-ExecutionPolicy -Scope Process Bypass
. .\scripts\env.ps1

env.ps1 -Isolated restricts PATH to bundled tools, Git and Windows.


Made from docs/dev/build.md at 69237645142c. GPL-3.0-or-later.