Reorganize building zed doc
Co-Authored-By: Joseph T. Lyons <19867440+JosephTLyons@users.noreply.github.com>
This commit is contained in:
parent
b64ae4df9c
commit
d0f22df1eb
1 changed files with 52 additions and 48 deletions
|
@ -1,7 +1,7 @@
|
||||||
# Building Zed
|
# Building Zed
|
||||||
|
|
||||||
🚧 TODO:
|
🚧 TODO:
|
||||||
- [ ] Tidy up & update instructions
|
|
||||||
- [ ] Remove ZI-specific things
|
- [ ] Remove ZI-specific things
|
||||||
- [ ] Rework any steps that currently require a ZI-specific account
|
- [ ] Rework any steps that currently require a ZI-specific account
|
||||||
|
|
||||||
|
@ -14,20 +14,20 @@ How to build Zed from source for the first time.
|
||||||
- Be added to the GitHub organization
|
- Be added to the GitHub organization
|
||||||
- Be added to the Vercel team
|
- Be added to the Vercel team
|
||||||
- Create a [Personal Access Token](https://github.com/settings/personal-access-tokens/new) on Github
|
- Create a [Personal Access Token](https://github.com/settings/personal-access-tokens/new) on Github
|
||||||
- 🚧 TODO 🚧 What permissions are required?
|
- 🚧 TODO 🚧 What permissions are required?
|
||||||
- 🚧 TODO 🚧 What changes when repo isn't private?
|
- 🚧 TODO 🚧 What changes when repo isn't private?
|
||||||
- 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:
|
||||||
- Classic Tokens, where only `repo` (Full control of private repositories) OAuth scope has to be selected
|
- Classic Tokens, where only `repo` (Full control of private repositories) OAuth scope has to be selected
|
||||||
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
|
||||||
|
|
||||||
### Dependencies
|
### Dependencies
|
||||||
|
|
||||||
* Install [Rust](https://www.rust-lang.org/tools/install)
|
- Install [Rust](https://www.rust-lang.org/tools/install)
|
||||||
|
|
||||||
* Install the [GitHub CLI](https://cli.github.com/), [Livekit] & [Foreman]
|
- Install the [GitHub CLI](https://cli.github.com/), [Livekit](https://formulae.brew.sh/formula/livekit) & [Foreman](https://formulae.brew.sh/formula/foreman)
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
brew install gh
|
brew install gh
|
||||||
|
@ -35,15 +35,15 @@ brew install livekit
|
||||||
brew install foreman
|
brew install foreman
|
||||||
```
|
```
|
||||||
|
|
||||||
* Install [Xcode](https://apps.apple.com/us/app/xcode/id497799835?mt=12) from the macOS App Store
|
- Install [Xcode](https://apps.apple.com/us/app/xcode/id497799835?mt=12) from the macOS App Store
|
||||||
|
|
||||||
* Install Xcode command line tools
|
- Install [Xcode command line tools](https://developer.apple.com/xcode/resources/)
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
xcode-select --install
|
xcode-select --install
|
||||||
```
|
```
|
||||||
|
|
||||||
- If xcode-select --print-path prints /Library/Developer/CommandLineTools… run `sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer.`
|
- If `xcode-select --print-path prints /Library/Developer/CommandLineTools…` run `sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer.`
|
||||||
|
|
||||||
* Install [Postgres](https://postgresapp.com)
|
* Install [Postgres](https://postgresapp.com)
|
||||||
|
|
||||||
|
@ -63,43 +63,34 @@ gh repo clone zed-industries/zed
|
||||||
|
|
||||||
1. (Optional but recommended) Add your GITHUB_TOKEN to your `.zshrc` or `.bashrc` like this: `export GITHUB_TOKEN=yourGithubAPIToken`
|
1. (Optional but recommended) Add your GITHUB_TOKEN to your `.zshrc` or `.bashrc` like this: `export GITHUB_TOKEN=yourGithubAPIToken`
|
||||||
1. (🚧 TODO 🚧 - Will this be relevant for open source?) Ensure the Zed.dev website is checked out in a sibling directory and install its dependencies:
|
1. (🚧 TODO 🚧 - Will this be relevant for open source?) Ensure the Zed.dev website is checked out in a sibling directory and install its dependencies:
|
||||||
```
|
|
||||||
cd ..
|
```bash
|
||||||
git clone https://github.com/zed-industries/zed.dev
|
cd ..
|
||||||
cd zed.dev && npm install
|
git clone https://github.com/zed-industries/zed.dev
|
||||||
pnpm install -g vercel
|
cd zed.dev && npm install
|
||||||
```
|
pnpm install -g vercel
|
||||||
|
```
|
||||||
|
|
||||||
1. (🚧 TODO 🚧 - Will this be relevant for open source?) Link your zed.dev project to Vercel
|
1. (🚧 TODO 🚧 - Will this be relevant for open source?) 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.
|
- `vercel link`
|
||||||
- Select the `zed.dev` project
|
- 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. (🚧 TODO 🚧 - Will this be relevant for open source?) Run `vercel pull` to pull down the environment variables and project info from Vercel
|
1. (🚧 TODO 🚧 - Will this be relevant for open source?) 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 `GITHUB_TOKEN={yourGithubAPIToken} script/bootstrap`
|
||||||
- Run:
|
|
||||||
- `GITHUB_TOKEN={yourGithubAPIToken} script/bootstrap`
|
- You don't need to include the GITHUB_TOKEN if you exported it above.
|
||||||
- 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).
|
||||||
- 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:
|
|
||||||
- ```bash
|
|
||||||
Error: Cannot install in Homebrew on ARM processor in Intel default prefix (/usr/local)!
|
|
||||||
Please create a new installation in /opt/homebrew using one of the
|
|
||||||
"Alternative Installs" from:
|
|
||||||
https://docs.brew.sh/Installation
|
|
||||||
```
|
|
||||||
- In that case try:
|
|
||||||
- `/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"`
|
|
||||||
- If Homebrew is not in your PATH:
|
|
||||||
- Replace `{username}` with your home folder name (usually your login name)
|
|
||||||
- `echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> /Users/{username}/.zprofile`
|
|
||||||
- `eval "$(/opt/homebrew/bin/brew shellenv)"`
|
|
||||||
1. To run the Zed app:
|
1. To run the Zed app:
|
||||||
- If you are working on zed:
|
- If you are working on zed:
|
||||||
- `cargo run`
|
- `cargo run`
|
||||||
- If you are just using the latest version, but not working on zed:
|
- If you are just using the latest version, but not working on zed:
|
||||||
- `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-local`
|
- `script/zed-local`
|
||||||
|
|
||||||
## Troubleshooting
|
## Troubleshooting
|
||||||
|
|
||||||
|
@ -109,8 +100,21 @@ gh repo clone zed-industries/zed
|
||||||
|
|
||||||
**`xcrun: error: unable to find utility "metal", not a developer tool or in PATH`**
|
**`xcrun: error: unable to find utility "metal", not a developer tool or in PATH`**
|
||||||
|
|
||||||
|
### `script/bootstrap`
|
||||||
|
|
||||||
### Seeding errors during `script/bootstrap` runs
|
```bash
|
||||||
|
Error: Cannot install in Homebrew on ARM processor in Intel default prefix (/usr/local)!
|
||||||
|
Please create a new installation in /opt/homebrew using one of the
|
||||||
|
"Alternative Installs" from:
|
||||||
|
https://docs.brew.sh/Installation
|
||||||
|
```
|
||||||
|
|
||||||
|
- In that case try `/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"`
|
||||||
|
|
||||||
|
- If Homebrew is not in your PATH:
|
||||||
|
- Replace `{username}` with your home folder name (usually your login name)
|
||||||
|
- `echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> /Users/{username}/.zprofile`
|
||||||
|
- `eval "$(/opt/homebrew/bin/brew shellenv)"`
|
||||||
|
|
||||||
```
|
```
|
||||||
seeding database...
|
seeding database...
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue