Skip to content

Commit

Permalink
Added: build_linux.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
subalterngames committed May 29, 2024
1 parent a70e673 commit ecc4442
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 9 deletions.
16 changes: 16 additions & 0 deletions build_linux.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
[ -f /etc/os-release ]
. /etc/os-release
INSTALL=
SPEECH_DISPATCHER=
if [ "$NAME" = "Debian GNU/Linux" ]; then
INSTALL="apt install clang cmake speech-dispatcher libspeechd-dev pkg-config libssl-dev librust-alsa-sys-dev"
if [ "$VERSION_ID" = "11" ]; then
SPEECH_DISPATCHER="9"
elif [ "$VERSION_ID" = "12" ]; then
SPEECH_DISPATCHER="11"
else
echo "Invalid version: Debian $VERSION_ID"
fi
fi
sudo $INSTALL
cargo build --release --features speech_dispatcher_0_$SPEECH_DISPATCHER
19 changes: 10 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,14 @@ Windows:

### Linux

#### Debian 11
```bash
./build_linux.sh
```

1. `apt install clang cmake speech-dispatcher libspeechd-dev pkg-config libssl-dev librust-alsa-sys-dev`
2. `cargo build --release --features speech_dispatcher_0_9`
Currently, `build_linux.sh` works for the following distros:

#### Debian 12

1. `apt install clang cmake speech-dispatcher libspeechd-dev pkg-config libssl-dev librust-alsa-sys-dev`
2. `cargo build --release --features speech_dispatcher_0_11`
- Debian 11
- Debian 12

#### Ubuntu 18

Expand All @@ -64,12 +63,14 @@ Windows:

### MacOS

1. `cargo install cargo-bundle`
1. `cargo install cargo-bundle` (You only need to do this once)
2. `cargo bundle --release`

### Windows

1. `cargo build --release`
```powershell
cargo build --release
```

## Tests

Expand Down

0 comments on commit ecc4442

Please sign in to comment.