Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

source-build fix for Fedora and add-path instructions for Ubuntu and Fedora #3088

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
66 changes: 66 additions & 0 deletions docs/building-from-source.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,79 @@ It is easy to build Lapce from source on a GNU/Linux distribution. Cargo handles
2. Install dependencies for your operating system:

#### Ubuntu
2.1 install dependencies
```sh
sudo apt install clang libxkbcommon-x11-dev pkg-config libvulkan-dev libwayland-dev xorg-dev libxcb-shape0-dev libxcb-xfixes0-dev
```
2.2 Follow instructions below to set path to lapce, where path to
lapce is like:
```
home/YOURNAME/lapce/target/release/lapce
```

2.3 Create a symbolic link:
- Open a terminal and run the following command to create a symbolic link from the executable to the chosen directory:
```bash
ln -s home/YOURNAME/lapce/target/release/lapce ~/.local/bin/
```

2.4 Add the directory to PATH (if necessary):
```bash
export PATH="home/YOURNAME/lapce/target/release/lapce:$PATH"
```

2.5 Refresh the shell:
- Run the following command to reload the shell configuration:
```
source ~/.bashrc
```

- Now you can call "lapce ." or "lapce --version" from cli

Comment on lines +14 to +38
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove this, it's unnecessary since cargo already manages the binary

#### Fedora
2.1 install dependencies
```sh
sudo dnf install clang libxkbcommon-x11-devel libxcb-devel vulkan-loader-devel wayland-devel perl-File-Compare perl-FindBin
```

Follow instructions below to set path to lapce, where path to
lapce is like:
```
home/YOURNAME/lapce/target/release/lapce
```

2.1 Install Pearl (from official fedora source) to avoid a build-fail

https://developer.fedoraproject.org/tech/languages/perl/perl-installation.html
```bash
$ sudo dnf install perl-core
```


2.2 Create the ~/.local/bin directory
```bash
mkdir -p ~/.local/bin
```

2.3 Create a symbolic link:
- Open a terminal and run the following command to create a symbolic link from the executable to the chosen directory:
```bash
ln -s home/YOURNAME/lapce/target/release/lapce ~/.local/bin/lapce
```

2.4 Add the directory to PATH (if necessary):
```bash
export PATH="$PATH:$HOME/.local/bin"
```

2.5 Refresh the shell:
- Run the following command to reload the shell configuration:
```
source ~/.bashrc
```

- Now you can call "lapce ." or "lapce --version" from cli

Comment on lines +44 to +82
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As above

#### Void Linux
```sh
sudo xbps-install -S base-devel clang libxkbcommon-devel vulkan-loader wayland-devel
Expand Down