From ce5e0dcaae3ab01dba0e1f96f9bfd143315d0f97 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Wed, 16 Jul 2014 08:15:18 -0400 Subject: [PATCH] parameterize the version number used to define the config directory name Conflicts: libs/ardour/directory_names.cc wscript --- libs/ardour/directory_names.cc | 5 +++++ wscript | 2 ++ 2 files changed, 7 insertions(+) diff --git a/libs/ardour/directory_names.cc b/libs/ardour/directory_names.cc index a67fdb013c..e97c688742 100644 --- a/libs/ardour/directory_names.cc +++ b/libs/ardour/directory_names.cc @@ -45,6 +45,11 @@ const char* const plugins_dir_name = X_("plugins"); const char* const externals_dir_name = X_("externals"); char config_dir_name[] = X_(PROGRAM_NAME); + +/* Use this to get a versioned config directory name + char config_dir_name[] = X_(PROGRAM_NAME PROGRAM_VERSION); +*/ + #if defined (__APPLE__) || defined (PLATFORM_WINDOWS) const char* const user_config_dir_name = config_dir_name; #else diff --git a/wscript b/wscript index 977ed083c9..b3d2579588 100755 --- a/wscript +++ b/wscript @@ -49,6 +49,7 @@ V = MAJOR + '.' + MINOR + '.' + MICRO # VERSION = V.encode ('ascii', 'ignore') APPNAME = 'Tracks' +PROGRAM_VERSION = MAJOR.encode ('ascii', 'ignore') # Mandatory variables top = '.' @@ -387,6 +388,7 @@ def set_compiler_flags (conf,opt): compiler_flags.append('-DENABLE_NLS') compiler_flags.append ('-DPROGRAM_NAME="' + Options.options.program_name + '"') + compiler_flags.append ('-DPROGRAM_VERSION="' + PROGRAM_VERSION + '"') if opt.debug: conf.env.append_value('CFLAGS', debug_flags)