save version string with session for informational purposes
This commit is contained in:
@@ -2007,6 +2007,8 @@ class LIBARDOUR_API Session : public PBD::StatefulDestructible, public PBD::Scop
|
||||
VCAManager* _vca_manager;
|
||||
|
||||
boost::shared_ptr<Route> get_midi_nth_route_by_id (PresentationInfo::order_t n) const;
|
||||
|
||||
std::string created_with;
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -90,6 +90,7 @@
|
||||
#include "ardour/recent_sessions.h"
|
||||
#include "ardour/region.h"
|
||||
#include "ardour/region_factory.h"
|
||||
#include "ardour/revision.h"
|
||||
#include "ardour/route_graph.h"
|
||||
#include "ardour/route_group.h"
|
||||
#include "ardour/send.h"
|
||||
@@ -316,6 +317,8 @@ Session::Session (AudioEngine &eng,
|
||||
{
|
||||
uint32_t sr = 0;
|
||||
|
||||
created_with = string_compose ("%1 %2", PROGRAM_NAME, revision);
|
||||
|
||||
pthread_mutex_init (&_rt_emit_mutex, 0);
|
||||
pthread_cond_init (&_rt_emit_cond, 0);
|
||||
|
||||
|
||||
@@ -106,6 +106,7 @@
|
||||
#include "ardour/proxy_controllable.h"
|
||||
#include "ardour/recent_sessions.h"
|
||||
#include "ardour/region_factory.h"
|
||||
#include "ardour/revision.h"
|
||||
#include "ardour/route_group.h"
|
||||
#include "ardour/send.h"
|
||||
#include "ardour/session.h"
|
||||
@@ -1051,6 +1052,12 @@ Session::state (bool full_state)
|
||||
snprintf(buf, sizeof(buf), "%d", CURRENT_SESSION_FILE_VERSION);
|
||||
node->add_property("version", buf);
|
||||
|
||||
child = node->add_child ("ProgramVersion");
|
||||
child->add_property("created-with", created_with);
|
||||
|
||||
std::string modified_with = string_compose ("%1 %2", PROGRAM_NAME, revision);
|
||||
child->add_property("modified-with", modified_with);
|
||||
|
||||
/* store configuration settings */
|
||||
|
||||
if (full_state) {
|
||||
@@ -1343,6 +1350,13 @@ Session::set_state (const XMLNode& node, int version)
|
||||
}
|
||||
}
|
||||
|
||||
created_with = "unknown";
|
||||
if ((child = find_named_node (node, "ProgramVersion")) != 0) {
|
||||
if ((prop = child->property (X_("created-with"))) != 0) {
|
||||
created_with = prop->value ();
|
||||
}
|
||||
}
|
||||
|
||||
setup_raid_path(_session_dir->root_path());
|
||||
|
||||
if ((prop = node.property (X_("id-counter"))) != 0) {
|
||||
|
||||
Reference in New Issue
Block a user