From 80d490159e5f593738de2532fd4cedd7358871eb Mon Sep 17 00:00:00 2001 From: Jason Lee Date: Fri, 17 Oct 2025 11:43:07 +0800 Subject: [PATCH] chore: Add Windows system dependencies install script. (#1396) Close #1390 --- CONTRIBUTING.md | 18 +++++++++++++++++- script/bootstrap | 2 +- .../{install-linux-deps => install-linux.sh} | 0 script/install-window.ps1 | 6 ++++++ 4 files changed, 24 insertions(+), 2 deletions(-) rename script/{install-linux-deps => install-linux.sh} (100%) create mode 100644 script/install-window.ps1 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 720caecc..55a3edf9 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -22,10 +22,26 @@ Before you start to write code, please read the existing code to follow the same ## Development and Testing -There are a lot of UI test cases in the `crates/story` folder, if you change the existing features you can run the tests to make sure they are working. +### System dependencies + +The `script` folder contains some useful scripts to help you set up the development environment. + +To install the system dependencies, run the following script: + +```bash +./script/bootstrap +``` + +For Windows, you can run the following command in PowerShell: + +```powershell +.\script\install-window.ps1 +``` ### Run story +There are a lot of UI test cases in the `crates/story` folder, if you change the existing features you can run the tests to make sure they are working. + Use `cargo run` to run the complete story examples to display them all in a gallery of GPUI components. ```bash diff --git a/script/bootstrap b/script/bootstrap index e8d5ea49..ca73bb65 100755 --- a/script/bootstrap +++ b/script/bootstrap @@ -2,7 +2,7 @@ if [[ "$OSTYPE" == "linux-gnu"* ]]; then echo "Install Linux dependencies..." - script/install-linux-deps + script/install-linux.sh else echo "Install macOS dependencies..." fi diff --git a/script/install-linux-deps b/script/install-linux.sh similarity index 100% rename from script/install-linux-deps rename to script/install-linux.sh diff --git a/script/install-window.ps1 b/script/install-window.ps1 new file mode 100644 index 00000000..ee894094 --- /dev/null +++ b/script/install-window.ps1 @@ -0,0 +1,6 @@ +Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser +Invoke-RestMethod -Uri https://get.scoop.sh | Invoke-Expression + +winget install Microsoft.VisualStudio.2022.Community --silent --override "--wait --quiet --add ProductLang En-us --add Microsoft.VisualStudio.Workload.NativeDesktop --includeRecommended" +scoop bucket add extras +scoop install cmake