linux make install (#12870)

Release Notes:

- N/A
This commit is contained in:
Conrad Irwin 2024-06-10 20:43:13 -06:00 committed by GitHub
parent 44a58647e4
commit ef84ce76e3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 60 additions and 25 deletions

View file

@ -40,32 +40,42 @@ docker compose up -d
Once you have the dependencies installed, you can build Zed using [Cargo](https://doc.rust-lang.org/cargo/).
For a debug build:
For a debug build of the editor:
```
cargo run
```
For a release build:
```
cargo run --release
```
For a release package:
```
cargo build --release
```
the binary can be found in `target/release` folder.
And to run the tests:
```
cargo test --workspace
```
In release mode, the primary user interface is the `cli` crate. You can run it in development with:
```
cargo run -p cli
```
## Installing a development build
You can install a local build on your machine with:
```
./script/install-linux
```
This will build zed and the cli in release mode and make them available at `~/.local/bin/zed`, installing .desktop files to `~/.local/share`.
If you'd like to install things to a different prefix you can use:
```
./script/install-linux /usr/
```
In this case the binary will be `/usr/bin/zed` and the `.desktop` file in `/usr/share`. The script should prompt for sudo as required so that the rust build runs as the current user.
## Wayland & X11
Zed has basic support for both modes. The mode is selected at runtime. If you're on wayland and want to run in X11 mode, you can set `WAYLAND_DISPLAY='' cargo run` to do so.