Copy lua libs on build

This commit is contained in:
Ottatop 2023-09-21 19:57:26 -05:00
parent 307813b062
commit ff8e5dfa29
2 changed files with 11 additions and 4 deletions

View file

@ -74,10 +74,9 @@ cargo build [--release]
For NixOS users, there is a provided [`shell.nix`](shell.nix) file that you can use for `nix-shell`.
<sup>flake soon:tm:</sup>
Additionally, you will need to copy the Lua API to `$XDG_DATA_HOME/pinnacle` (or `~/.local/share/pinnacle`).
You can do this by running [`install_libs.sh`](install_libs.sh).
You will need to do this whenever the Lua API is updated.
> [!NOTE]
> On build, [`install_libs.sh`](install_libs.sh) will run to copy the Lua API library to
> `$XDG_DATA_HOME/pinnacle` (or `~/.local/share/pinnacle`).
# Running
> [!IMPORTANT]

8
build.rs Normal file
View file

@ -0,0 +1,8 @@
fn main() {
println!("cargo:rerun-if-changed=api/lua");
std::process::Command::new("/bin/sh")
.arg("install_libs.sh")
.spawn()
.unwrap();
}