Skip to content

Commit 208f79a

Browse files
committed
Add justfile
to ease building and testing the gain-plugin example
1 parent 6a788f8 commit 208f79a

2 files changed

Lines changed: 25 additions & 1 deletion

File tree

.cargo/config.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
[alias]
2-
xtask = "run --package xtask --release --"
2+
xtask-release = "run --package xtask --release --"
3+
xtask-debug = "run --package xtask --"

justfile

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
vst3_path := if os() == "windows" { "C:/Program\\ Files/Common\\ Files/VST3/Dev/" } else if os() == "linux" { "~/.vst3/" } else if os() == "macos" { "~/Library/Audio/Plug-Ins/VST3/" } else { error("Unexpected OS") }
2+
clap_path := if os() == "windows" { "C:/Program\\ Files/Common\\ Files/CLAP/Dev/" } else if os() == "linux" { "~/.clap/" } else if os() == "macos" { "~/Library/Audio/Plug-Ins/CLAP/" } else { error("Unexpected OS") }
3+
4+
default:
5+
@just --choose
6+
7+
[arg("target", pattern="debug|release")]
8+
bundle-gain-plugin target="debug":
9+
cargo xtask-{{ target }} bundle gain-plugin {{ if target == "debug" { "" } else { "--release" } }}
10+
11+
[arg("target", pattern="debug|release")]
12+
install-gain-plugin target="debug": bundle-gain-plugin
13+
cargo xtask-{{ target }} bundle gain-plugin {{ if target == "debug" { "" } else { "--release" } }}
14+
cp -rf ./target/bundled/gain-plugin.vst3 {{ vst3_path }}
15+
cp -rf ./target/bundled/gain-plugin.clap {{ clap_path }}
16+
17+
[arg("target", pattern="debug|release")]
18+
run-gain-standalone target="debug":
19+
cargo run {{ if target == "release" { "--release" } else { "" } }} -p gain-plugin --features standalone
20+
21+
[arg("target", pattern="debug|release")]
22+
run-gain-standalone-live target="debug" $SLINT_LIVE_PREVIEW="1":
23+
cargo run {{ if target == "release" { "--release" } else { "" } }} -p gain-plugin --features=standalone,slint/live-preview

0 commit comments

Comments
 (0)