mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-05-07 03:50:11 +02:00
Update messages in yabridgectl
This commit is contained in:
@@ -65,7 +65,7 @@ pub fn remove_directory(config: &mut Config, path: &Path) -> Result<()> {
|
||||
.with_context(|| format!("Could not remove '{}'", file.path().display()))?;
|
||||
}
|
||||
|
||||
println!("\nRemoved {} files.", orphan_files.len());
|
||||
println!("\nRemoved {} files", orphan_files.len());
|
||||
}
|
||||
_ => {}
|
||||
}
|
||||
@@ -243,9 +243,9 @@ pub fn do_sync(config: &Config, prune: bool, verbose: bool) -> Result<()> {
|
||||
}
|
||||
|
||||
println!(
|
||||
"Finished setting up {} plugins using {}, skipped {} non-plugin '.dll' files.",
|
||||
"Finished setting up {} plugins using {}, skipped {} non-plugin '.dll' files",
|
||||
num_installed,
|
||||
config.method.plural(),
|
||||
config.method.plural_name(),
|
||||
num_skipped_files
|
||||
);
|
||||
|
||||
@@ -255,11 +255,12 @@ pub fn do_sync(config: &Config, prune: bool, verbose: bool) -> Result<()> {
|
||||
"\n{}",
|
||||
wrap(&format!(
|
||||
"Warning: 'yabridge-host.exe' is not present in your login shell's search \
|
||||
path. Yabridge won't be able to run using the copy-based installatin method \
|
||||
path. Yabridge won't be able to run using the copy-based installation method \
|
||||
until this is fixed.\n\
|
||||
Add '{}' to {}'s login shell {} environment variable. See the \
|
||||
Add '{}' to {}'s login shell {} environment variables. See the \
|
||||
troubleshooting section of the readme for more details. Rerun this command to \
|
||||
verify that this has been set up correctly, and then reboot your system.\n\
|
||||
verify that the variable has been set correctly, and then reboot your system \
|
||||
to complete the setup.\n\
|
||||
\n\
|
||||
https://github.com/robbert-vdh/yabridge#troubleshooting-common-issues",
|
||||
libyabridge_path.parent().unwrap().display(),
|
||||
|
||||
@@ -71,7 +71,7 @@ pub enum InstallationMethod {
|
||||
|
||||
impl InstallationMethod {
|
||||
/// The plural term for this installation methodd, using in string formatting.
|
||||
pub fn plural(&self) -> &str {
|
||||
pub fn plural_name(&self) -> &str {
|
||||
match &self {
|
||||
InstallationMethod::Copy => "copies",
|
||||
InstallationMethod::Symlink => "symlinks",
|
||||
|
||||
@@ -26,7 +26,6 @@ mod config;
|
||||
mod files;
|
||||
mod utils;
|
||||
|
||||
// TODO: Naming and descriptions could be made clearer
|
||||
// TODO: Reward parts of the readme
|
||||
|
||||
fn main() -> Result<()> {
|
||||
@@ -55,7 +54,7 @@ fn main() -> Result<()> {
|
||||
.about("Remove a plugin install location")
|
||||
.arg(
|
||||
Arg::with_name("path")
|
||||
.about("Path to a directory")
|
||||
.about("Path to a previously added directory")
|
||||
.possible_values(&plugin_directories)
|
||||
.takes_value(true)
|
||||
.required(true),
|
||||
@@ -71,17 +70,18 @@ fn main() -> Result<()> {
|
||||
Arg::with_name("method")
|
||||
.long("method")
|
||||
.about("The installation method to use")
|
||||
.long_about(&format!("The installation method to use. \
|
||||
'{}' works in every situation but it requires you to rerun \
|
||||
'yabridgectl sync' whenever you update yabridge. You'll also \
|
||||
have to modify your PATH environment variable so yabridge is \
|
||||
able to find 'yabridge-host.exe'.\
|
||||
'{}' only works for hosts that support individually \
|
||||
sandboxed plugins such as Bitwig Studio, but it does not \
|
||||
require you to set environment variables or to manually \
|
||||
update your plugins.",
|
||||
"copy".bright_white(),
|
||||
"symlink".bright_white()))
|
||||
.long_about(&format!(
|
||||
"The installation method to use. \
|
||||
'{}' works in every situation but it requires you to modify your PATH \
|
||||
environment variable so yabridge is able to find 'yabridge-host.exe'. \
|
||||
'yabridgectl sync' whenever you update yabridge. You'll also have to \
|
||||
rerun 'yabridgectl sync' whenever you update yabridge. \
|
||||
'{}' only works for hosts that support individually sandboxed plugins \
|
||||
such as Bitwig Studio, but it does not require setting environment \
|
||||
variables or to manual updates.",
|
||||
"copy".bright_white(),
|
||||
"symlink".bright_white()
|
||||
))
|
||||
.setting(clap::ArgSettings::NextLineHelp)
|
||||
.possible_values(&["copy", "symlink"])
|
||||
.takes_value(true),
|
||||
@@ -90,7 +90,11 @@ fn main() -> Result<()> {
|
||||
Arg::with_name("path")
|
||||
.long("path")
|
||||
.about("Path to the directory containing 'libyabridge.so'")
|
||||
.long_about("Path to the directory containing 'libyabridge.so'. If this is not set, then yabridgectl will look in both '/usr/lib' and '~/.local/share/yabridge' by default.")
|
||||
.long_about(
|
||||
"Path to the directory containing 'libyabridge.so'. If this is \
|
||||
not set, then yabridgectl will look in both '/usr/lib' and \
|
||||
'~/.local/share/yabridge' by default.",
|
||||
)
|
||||
.validator(validate_path)
|
||||
.takes_value(true),
|
||||
),
|
||||
|
||||
@@ -62,11 +62,11 @@ pub fn verify_path_setup() -> Result<(), String> {
|
||||
"nu" => command.arg("-c").arg("which yabridge-host.exe"),
|
||||
shell => {
|
||||
eprintln!(
|
||||
"{}",
|
||||
"\n{}",
|
||||
wrap(&format!(
|
||||
"WARNING: Yabridgectl does not know how to handle your login shell, \
|
||||
'{}', skipping PATH setup check. Feel free to open a bug report to \
|
||||
get yabridgectl to support your shell.\n\
|
||||
"WARNING: Yabridgectl does not know how to handle your login shell \
|
||||
'{}', skipping PATH setup check. Feel free to open a feature request \
|
||||
in order to get yabridgectl to support your shell.\n\
|
||||
\n\
|
||||
https://github.com/robbert-vdh/yabridge/issues",
|
||||
shell.bright_white(),
|
||||
|
||||
Reference in New Issue
Block a user