Skip to content

Commit

Permalink
Fix README build steps
Browse files Browse the repository at this point in the history
Closes #128 #124
  • Loading branch information
4JX committed Oct 7, 2023
1 parent f9b70e6 commit 21268d3
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 28 deletions.
16 changes: 8 additions & 8 deletions Makefile.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ linux_alias = "build-linux"

[tasks.build-windows]
dependencies = ["setup-vcpkg"]
env = { VCPKG_INSTALLATION_ROOT = "${CARGO_MAKE_WORKING_DIRECTORY}\\target\\vcpkg" }
env = { VCPKG_ROOT = "${CARGO_MAKE_WORKING_DIRECTORY}\\target\\vcpkg" }
command = "cargo"
args = ["build"]

[tasks.build-linux]
dependencies = ["setup-vcpkg"]
env = { VCPKG_INSTALLATION_ROOT = "${CARGO_MAKE_WORKING_DIRECTORY}/target/vcpkg" }
env = { VCPKG_ROOT = "${CARGO_MAKE_WORKING_DIRECTORY}/target/vcpkg" }
command = "cargo"
args = ["build"]

Expand All @@ -24,13 +24,13 @@ linux_alias = "build-release-linux"

[tasks.build-release-windows]
dependencies = ["setup-vcpkg"]
env = { VCPKG_INSTALLATION_ROOT = "${CARGO_MAKE_WORKING_DIRECTORY}\\target\\vcpkg" }
env = { VCPKG_ROOT = "${CARGO_MAKE_WORKING_DIRECTORY}\\target\\vcpkg" }
command = "cargo"
args = ["build", "--release"]

[tasks.build-release-linux]
dependencies = ["setup-vcpkg"]
env = { VCPKG_INSTALLATION_ROOT = "${CARGO_MAKE_WORKING_DIRECTORY}/target/vcpkg" }
env = { VCPKG_ROOT = "${CARGO_MAKE_WORKING_DIRECTORY}/target/vcpkg" }
command = "cargo"
args = ["build", "--release"]

Expand All @@ -44,13 +44,13 @@ windows_alias = "run-windows"
linux_alias = "run-linux"

[tasks.run-windows]
env = { VCPKG_INSTALLATION_ROOT = "${CARGO_MAKE_WORKING_DIRECTORY}\\target\\vcpkg" }
env = { VCPKG_ROOT = "${CARGO_MAKE_WORKING_DIRECTORY}\\target\\vcpkg" }
script = '''
cls && cargo run --release
'''

[tasks.run-linux]
env = { VCPKG_INSTALLATION_ROOT = "${CARGO_MAKE_WORKING_DIRECTORY}/target/vcpkg" }
env = { VCPKG_ROOT = "${CARGO_MAKE_WORKING_DIRECTORY}/target/vcpkg" }
script = '''
clear && cargo build --release && ./target/release/legion-kb-rgb
'''
Expand All @@ -61,13 +61,13 @@ windows_alias = "clippy-all-windows"
linux_alias = "clippy-all-linux"

[tasks.clippy-all-windows]
env = { VCPKG_INSTALLATION_ROOT = "${CARGO_MAKE_WORKING_DIRECTORY}\\target\\vcpkg" }
env = { VCPKG_ROOT = "${CARGO_MAKE_WORKING_DIRECTORY}\\target\\vcpkg" }
script = '''
cls && cargo clippy -- -W clippy::pedantic -W clippy::nursery -A clippy::unreadable_literal -A clippy::too_many_lines -A clippy::items-after-statements -A clippy::module-name-repetitions
'''

[tasks.clippy-all-linux]
env = { VCPKG_INSTALLATION_ROOT = "${CARGO_MAKE_WORKING_DIRECTORY}/target/vcpkg" }
env = { VCPKG_ROOT = "${CARGO_MAKE_WORKING_DIRECTORY}/target/vcpkg" }
script = '''
clear && cargo clippy -- -W clippy::pedantic -W clippy::nursery -A clippy::unreadable_literal -A clippy::too_many_lines -A clippy::items-after-statements -A clippy::module-name-repetitions
'''
25 changes: 5 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ This program has been tested to work on:
#### Ubuntu

```sh
sudo apt-get install -y libx11-dev nasm libdbus-1-dev libudev-dev libxcb-randr0-dev libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libxi-dev libxtst-dev
sudo apt-get install -y libclang-dev libxcb-shm0-dev libusb-1.0-0-dev libx11-dev nasm libdbus-1-dev libudev-dev libxcb-randr0-dev libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libxi-dev libxtst-dev
```

### Using `cargo-make`
Expand Down Expand Up @@ -212,32 +212,17 @@ cargo make build-release
### Building manually

- Download and bootstrap [VCPKG](https://github.com/Microsoft/vcpkg#getting-started)
- You'll need to set an environment variable called `VCPKG_INSTALLATION_ROOT` pointing to the directory where you downloaded and bootstrapped VCPKG.
- You'll need to set an environment variable called `VCPKG_ROOT` pointing to the directory where you downloaded and bootstrapped VCPKG.

#### Windows
- Download the VCPKG dependencies

- Download the necessary dependencies
Windows:

```cmd
vcpkg update && vcpkg install libvpx:x64-windows-static libyuv:x64-windows-static
```

- Clone the repository

```cmd
git clone https://github.com/4JX/L5P-Keyboard-RGB.git
```

- Build the project

```cmd
cd L5P-Keyboard-RGB/
cargo build --release
```

#### Linux

- Download the necessary dependencies
Linux:

```sh
vcpkg update && vcpkg install libvpx libyuv
Expand Down

0 comments on commit 21268d3

Please sign in to comment.