Skip to content

Instantly share code, notes, and snippets.

@jdunkerley
Last active June 28, 2024 08:46
Show Gist options
  • Save jdunkerley/b1c859605d2f9ce816ad36df28c4b24e to your computer and use it in GitHub Desktop.
Save jdunkerley/b1c859605d2f9ce816ad36df28c4b24e to your computer and use it in GitHub Desktop.
Set up a Windows 10 machine from empty to ready to build Enso

Enable Developer Mode in Settings

  • Search form Developer
  • Inside System / For Developers
  • Ensure Developer Mode is turned on.

Install latest Powershell

winget install --id Microsoft.Powershell --source winget

Open Powershell 7 (or later) as admin (pwsh)

## Install Git, NVM, MSVC, Rust
winget install --id 7zip.7zip
winget install --id Git.Git
winget install --id GitHub.cli
winget install --id Microsoft.VisualStudioCode
winget install --id Microsoft.WindowsTerminal
winget install --id Microsoft.VisualStudio.2022.Community --silent --override "--wait --quiet --addProductLang En-us --add Microsoft.VisualStudio.Workload.NativeDesktop --includeRecommended"
winget install --id CoreyButler.NVMforWindows
winget install --id Rustlang.Rustup
winget install --id sbt.sbt

Restart Powershell 7

Invoke-WebRequest -Uri https://github.com/graalvm/graalvm-ce-builds/releases/download/jdk-21.0.2/graalvm-community-jdk-21.0.2_windows-x64_bin.zip -OutFile graalvm.zip
Expand-Archive graalvm.zip .
Remove-Item graalvm.zip
Invoke-WebRequest -Uri https://github.com/google/flatbuffers/releases/download/v24.3.25/Windows.flatc.binary.zip -OutFile flatc.zip
Expand-Archive flatc.zip flatbuffers
Remove-Item flatc.zip
$javaHome=(Get-ChildItem graalvm*).fullname
$flatcHome=(Get-ChildItem flatbuff*).fullname
$msvc=(Get-ChildItem "$Env:Programfiles\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\").Name
$winsdk=(Get-ChildItem "${env:ProgramFiles(x86)}\Windows Kits\10\Include\").FullName
$winlib=(Get-ChildItem "${env:ProgramFiles(x86)}\Windows Kits\10\Lib\").FullName
$winunion=(Get-ChildItem "${env:ProgramFiles(x86)}\Windows Kits\10\UnionMetadata\").FullName
$winref=(Get-ChildItem "${env:ProgramFiles(x86)}\Windows Kits\10\References\").FullName
setx PATH "$env:path;%ProgramFiles%\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\$msvc\bin\Hostx64\x64;%ProgramFiles%\7-zip\;$javaHome\bin;$flatcHome" -m
setx INCLUDE "%ProgramFiles%\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\$msvc\include;$winsdk\ucrt;$winsdk\shared;$winsdk\um;$winsdk\winrt;$winsdk\cppwinrt" -m
setx LIB "%ProgramFiles%\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\$msvc\lib\x64;$winlib\ucrt\x64;$winlib\um\x64" -m
setx LIBPATH "%ProgramFiles%\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\$msvc\lib\x64;%ProgramFiles%\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\$msvc\lib\x64\store;$winunion;$winref" -m
setx JAVA_HOME "$javaHome" -m

As Administrator enable long paths

git config --system core.longpath true

Restart Powershell 7 (pwsh) in Terminal if prefered

nvm install lts
nvm use lts
rustup toolchain install stable
cargo +stable install wasm-pack
cargo +stable install cargo-watch
git config --global core.eol lf
git config --global core.autocrlf input
git clone https://github.com/enso-org/enso.git
cd enso

To build the project manager and libraries

sbt buildProjectManagerDistribution
sbt buildEngineDistribution

To build and run the GUI in interactive

Run the project manager by running: .\built-distribution\enso-project-manager-0.0.0-dev-windows-amd64\enso\bin\project-manager.exe

npm install
npm --workspace enso-gui2 run dev
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment