windows: Make collab run on Windows (#23117)

I’ve also updated the documentation in
`development\local-collaboration.md` and
`docs\src\development\windows.md`.

Testing collab on my Windows machine:

![屏幕截图 2025-01-14
162021](https://github.com/user-attachments/assets/28b4a36a-e156-4012-981a-5d0a23dcc613)


Release Notes:

- N/A

---------

Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>
This commit is contained in:
张小白 2025-01-17 15:39:13 +08:00 committed by GitHub
parent b1375ab946
commit 70db427fc8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
14 changed files with 176 additions and 197 deletions

View file

@ -10,6 +10,8 @@ First, make sure you've installed Zed's backend dependencies for your platform:
Before you can run the `collab` server locally, you'll need to set up a `zed` Postgres database.
### On macOS and Linux
```sh
script/bootstrap
```
@ -31,8 +33,16 @@ To use a different set of admin users, you can create your own version of that j
}
```
### On Windows
```powershell
.\script\bootstrap.ps1
```
## Testing collaborative features locally
### On macOS and Linux
Ensure that Postgres is configured and running, then run Zed's collaboration server and the `livekit` dev server:
```sh
@ -41,7 +51,7 @@ foreman start
cargo run -p collab -- serve all
```
In a second terminal, run two or more instances of Zed.
In a new terminal, run two or more instances of Zed.
```sh
script/zed-local -2
@ -49,6 +59,34 @@ script/zed-local -2
This script starts one to four instances of Zed, depending on the `-2`, `-3` or `-4` flags. Each instance will be connected to the local `collab` server, signed in as a different user from `.admins.json` or `.admins.default.json`.
### On Windows
Since `foreman` is not available on Windows, you can run the following commands in separate terminals:
```powershell
cargo run --package=collab -- serve all
```
If you have added the `livekit-server` binary to your `PATH`, you can run:
```powershell
livekit-server --dev
```
Otherwise,
```powershell
.\path\to\livekit-serve.exe --dev
```
In a new terminal, run two or more instances of Zed.
```powershell
node .\script\zed-local -2
```
Note that this requires `node.exe` to be in your `PATH`.
## Running a local collab server
If you want to run your own version of the zed collaboration service, you can, but note that this is still under development, and there is no good support for authentication nor extensions.