From c53394a5e40b2878fb5742e50ece3bf38f945f6b Mon Sep 17 00:00:00 2001 From: falkTX Date: Wed, 7 Jan 2026 18:03:55 +0100 Subject: [PATCH] Define project version in a single location Signed-off-by: falkTX --- common/JackAPI.cpp | 2 +- common/JackConstants.h | 2 -- common/Jackdmp.cpp | 6 +++--- wscript | 1 + 4 files changed, 5 insertions(+), 6 deletions(-) diff --git a/common/JackAPI.cpp b/common/JackAPI.cpp index 4abc35b7..b233b8e1 100644 --- a/common/JackAPI.cpp +++ b/common/JackAPI.cpp @@ -1929,7 +1929,7 @@ LIB_EXPORT void jack_get_version(int *major_ptr, LIB_EXPORT const char* jack_get_version_string() { JackGlobals::CheckContext("jack_get_version_string"); - return VERSION; + return JACK_VERSION; } LIB_EXPORT void jack_free(void* ptr) diff --git a/common/JackConstants.h b/common/JackConstants.h index 435f6c3c..7b0cf075 100644 --- a/common/JackConstants.h +++ b/common/JackConstants.h @@ -24,8 +24,6 @@ #include "config.h" #endif -#define VERSION "1.9.22" - #define BUFFER_SIZE_MAX 8192 #define JACK_PORT_NAME_SIZE 256 diff --git a/common/Jackdmp.cpp b/common/Jackdmp.cpp index 4c5ba010..6dd83567 100644 --- a/common/Jackdmp.cpp +++ b/common/Jackdmp.cpp @@ -94,10 +94,10 @@ static void notify_server_stop(const char* server_name) static void copyright(FILE* file) { - fprintf(file, "jackdmp " VERSION "\n" + fprintf(file, "jackdmp " JACK_VERSION "\n" "Copyright 2001-2005 Paul Davis and others.\n" "Copyright 2004-2016 Grame.\n" - "Copyright 2016-2023 Filipe Coelho.\n" + "Copyright 2016-2026 Filipe Coelho.\n" "jackdmp comes with ABSOLUTELY NO WARRANTY\n" "This is free software, and you are welcome to redistribute it\n" "under certain conditions; see the file COPYING for details\n"); @@ -250,7 +250,7 @@ extern "C" void silent_jack_error_callback(const char *desc); void print_version() { - printf( "jackdmp version " VERSION " tmpdir " + printf( "jackdmp version " JACK_VERSION " tmpdir " jack_server_dir " protocol %d" "\n", JACK_PROTOCOL_VERSION); } diff --git a/wscript b/wscript index 38a4bb11..6c948827 100644 --- a/wscript +++ b/wscript @@ -438,6 +438,7 @@ def configure(conf): conf.define('JACK_DBUS', 1) if conf.env['BUILD_WITH_PROFILE']: conf.define('JACK_MONITOR', 1) + conf.define('JACK_VERSION', VERSION) conf.write_config_header('config.h', remove=False) if Options.options.mixed: