mirror of
https://github.com/zed-industries/zed.git
synced 2025-01-29 05:33:49 +00:00
commit
ad4f5e55cb
1 changed files with 30 additions and 4 deletions
|
@ -4,6 +4,11 @@
|
||||||
|
|
||||||
How to build Zed from source for the first time.
|
How to build Zed from source for the first time.
|
||||||
|
|
||||||
|
## Prerequisites
|
||||||
|
|
||||||
|
- Be added to the GitHub organization
|
||||||
|
- Be added to the Vercel team
|
||||||
|
|
||||||
## Process
|
## Process
|
||||||
|
|
||||||
Expect this to take 30min to an hour! Some of these steps will take quite a while based on your connection speed, and how long your first build will be.
|
Expect this to take 30min to an hour! Some of these steps will take quite a while based on your connection speed, and how long your first build will be.
|
||||||
|
@ -13,11 +18,17 @@ Expect this to take 30min to an hour! Some of these steps will take quite a whil
|
||||||
1. Clone the `zed` repo
|
1. Clone the `zed` repo
|
||||||
- `gh repo clone zed-industries/zed`
|
- `gh repo clone zed-industries/zed`
|
||||||
1. Install Xcode from the macOS App Store
|
1. Install Xcode from the macOS App Store
|
||||||
|
1. Install Xcode command line tools
|
||||||
|
- `xcode-select --install`
|
||||||
|
- If xcode-select --print-path prints /Library/Developer/CommandLineTools… run `sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer.`
|
||||||
1. Install [Postgres](https://postgresapp.com)
|
1. Install [Postgres](https://postgresapp.com)
|
||||||
1. Install rust/rustup
|
1. Install rust/rustup
|
||||||
- `curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh`
|
- `curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh`
|
||||||
1. Install the wasm toolchain
|
1. Install the wasm toolchain
|
||||||
- `rustup target add wasm32-wasi`
|
- `rustup target add wasm32-wasi`
|
||||||
|
1. Install Livekit & Foreman
|
||||||
|
- `brew install livekit`
|
||||||
|
- `brew install foreman`
|
||||||
1. Generate an GitHub API Key
|
1. Generate an GitHub API Key
|
||||||
- Go to https://github.com/settings/tokens and Generate new token
|
- Go to https://github.com/settings/tokens and Generate new token
|
||||||
- GitHub currently provides two kinds of tokens:
|
- GitHub currently provides two kinds of tokens:
|
||||||
|
@ -25,12 +36,26 @@ Expect this to take 30min to an hour! Some of these steps will take quite a whil
|
||||||
Unfortunately, unselecting `repo` scope and selecting every its inner scope instead does not allow the token users to read from private repositories
|
Unfortunately, unselecting `repo` scope and selecting every its inner scope instead does not allow the token users to read from private repositories
|
||||||
- (not applicable) Fine-grained Tokens, at the moment of writing, did not allow any kind of access of non-owned private repos
|
- (not applicable) Fine-grained Tokens, at the moment of writing, did not allow any kind of access of non-owned private repos
|
||||||
- Keep the token in the browser tab/editor for the next two steps
|
- Keep the token in the browser tab/editor for the next two steps
|
||||||
|
1. (Optional but reccomended) Add your GITHUB_TOKEN to your `.zshrc` or `.bashrc` like this: `export GITHUB_TOKEN=yourGithubAPIToken`
|
||||||
|
1. Ensure the Zed.dev website is checked out in a sibling directory and install it's dependencies:
|
||||||
|
```
|
||||||
|
cd ..
|
||||||
|
git clone https://github.com/zed-industries/zed.dev
|
||||||
|
cd zed.dev && npm install
|
||||||
|
npm install -g vercel
|
||||||
|
```
|
||||||
|
1. Link your zed.dev project to Vercel
|
||||||
|
- `vercel link`
|
||||||
|
- Select the `zed-industries` team. If you don't have this get someone on the team to add you to it.
|
||||||
|
- Select the `zed.dev` project
|
||||||
|
1. Run `vercel pull` to pull down the environment variables and project info from Vercel
|
||||||
1. Open Postgres.app
|
1. Open Postgres.app
|
||||||
1. From `./path/to/zed/`:
|
1. From `./path/to/zed/`:
|
||||||
- Run:
|
- Run:
|
||||||
- `GITHUB_TOKEN={yourGithubAPIToken} script/bootstrap`
|
- `GITHUB_TOKEN={yourGithubAPIToken} script/bootstrap`
|
||||||
- Replace `{yourGithubAPIToken}` with the API token you generated above.
|
- Replace `{yourGithubAPIToken}` with the API token you generated above.
|
||||||
- Consider removing the token (if it's fine for you to crecreate such tokens during occasional migrations) or store this token somewhere safe (like your Zed 1Password vault).
|
- You don't need to include the GITHUB_TOKEN if you exported it above.
|
||||||
|
- Consider removing the token (if it's fine for you to recreate such tokens during occasional migrations) or store this token somewhere safe (like your Zed 1Password vault).
|
||||||
- If you get:
|
- If you get:
|
||||||
- ```bash
|
- ```bash
|
||||||
Error: Cannot install in Homebrew on ARM processor in Intel default prefix (/usr/local)!
|
Error: Cannot install in Homebrew on ARM processor in Intel default prefix (/usr/local)!
|
||||||
|
@ -51,6 +76,7 @@ Expect this to take 30min to an hour! Some of these steps will take quite a whil
|
||||||
- `cargo run --release`
|
- `cargo run --release`
|
||||||
- If you need to run the collaboration server locally:
|
- If you need to run the collaboration server locally:
|
||||||
- `script/zed-with-local-servers`
|
- `script/zed-with-local-servers`
|
||||||
|
- If you need to test collaboration with mutl
|
||||||
|
|
||||||
## Troubleshooting
|
## Troubleshooting
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue