aboutsummaryrefslogtreecommitdiffstats
path: root/src/jalv_console.c
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2022-05-27 14:39:21 -0400
committerDavid Robillard <d@drobilla.net>2022-05-27 14:39:21 -0400
commit98c4699afb169b2a7744dd86ea0ed04595ea1fc7 (patch)
tree3a90f037d9bfe155552c7cb12b56c104323f4934 /src/jalv_console.c
parent0592b89e7e707e2363aa6b4332de5b85dd557a75 (diff)
downloadjalv-98c4699afb169b2a7744dd86ea0ed04595ea1fc7.tar.gz
jalv-98c4699afb169b2a7744dd86ea0ed04595ea1fc7.tar.bz2
jalv-98c4699afb169b2a7744dd86ea0ed04595ea1fc7.zip
Add version option to console executable
Diffstat (limited to 'src/jalv_console.c')
-rw-r--r--src/jalv_console.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/jalv_console.c b/src/jalv_console.c
index 6b54b28..8c3eaf7 100644
--- a/src/jalv_console.c
+++ b/src/jalv_console.c
@@ -52,10 +52,22 @@ print_usage(const char* name, bool error)
fprintf(os, " -s Show plugin UI if possible\n");
fprintf(os, " -t Print trace messages from plugin\n");
fprintf(os, " -U URI Load the UI with the given URI\n");
+ fprintf(os, " -V Display version information and exit\n");
fprintf(os, " -x Exact JACK client name (exit if taken)\n");
return error ? 1 : 0;
}
+static int
+print_version(void)
+{
+ printf("jalv " JALV_VERSION " <http://drobilla.net/software/jalv>\n");
+ printf("Copyright 2011-2022 David Robillard <d@drobilla.net>.\n"
+ "License ISC: <https://spdx.org/licenses/ISC>.\n"
+ "This is free software; you are free to change and redistribute it."
+ "\nThere is NO WARRANTY, to the extent permitted by law.\n");
+ return 1;
+}
+
void
jalv_ui_port_event(Jalv* jalv,
uint32_t port_index,
@@ -79,6 +91,10 @@ jalv_init(int* argc, char*** argv, JalvOptions* opts)
return print_usage((*argv)[0], true);
}
+ if ((*argv)[a][1] == 'V') {
+ return print_version();
+ }
+
if ((*argv)[a][1] == 's') {
opts->show_ui = true;
} else if ((*argv)[a][1] == 'p') {