mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-25 16:07:49 +01:00
Backported automatic svn revision handling from 3.0
git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@3991 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
6405e51c85
commit
11be2332a1
5 changed files with 23 additions and 12 deletions
20
SConstruct
20
SConstruct
|
|
@ -262,16 +262,16 @@ def create_stored_revision (target = None, source = None, env = None):
|
|||
if os.path.exists('.svn'):
|
||||
rev = fetch_svn_revision ('.');
|
||||
try:
|
||||
text = "#ifndef __ardour_svn_revision_h__\n"
|
||||
text += "#define __ardour_svn_revision_h__\n"
|
||||
text += "static const char* ardour_svn_revision = \"" + rev + "\";\n";
|
||||
text += "#endif\n"
|
||||
print '============> writing svn revision info to svn_revision.h\n'
|
||||
o = file ('svn_revision.h', 'w')
|
||||
text = "#include <ardour/svn_revision.h>\n"
|
||||
text += "namespace ARDOUR {\n";
|
||||
text += "extern const char* svn_revision = \"" + rev + "\";\n";
|
||||
text += "}\n";
|
||||
print '============> writing svn revision info to libs/ardour/svn_revision.cc\n'
|
||||
o = file ('libs/ardour/svn_revision.cc', 'w')
|
||||
o.write (text)
|
||||
o.close ()
|
||||
except IOError:
|
||||
print "Could not open svn_revision.h for writing\n"
|
||||
print "Could not open libs/ardour/svn_revision.cc for writing\n"
|
||||
sys.exit (-1)
|
||||
else:
|
||||
print "You cannot use \"scons revision\" on without using a checked out"
|
||||
|
|
@ -1372,6 +1372,12 @@ env.Alias ('srctar', srcdist)
|
|||
env.AddPreAction (env['DISTTREE'], Action ('rm -rf ' + str (File (env['DISTTREE']))))
|
||||
env.AddPostAction (srcdist, Action ('rm -rf ' + str (File (env['DISTTREE']))))
|
||||
|
||||
#
|
||||
# Update revision info before going into subdirs
|
||||
#
|
||||
|
||||
create_stored_revision()
|
||||
|
||||
#
|
||||
# the subdirs
|
||||
#
|
||||
|
|
|
|||
|
|
@ -25,13 +25,13 @@
|
|||
#include <ctime>
|
||||
#include <cstdlib>
|
||||
|
||||
#include <ardour/svn_revision.h>
|
||||
#include <ardour/ardour.h>
|
||||
#include <ardour/version.h>
|
||||
|
||||
#include "utils.h"
|
||||
#include "version.h"
|
||||
|
||||
#include "svn_revision.h"
|
||||
#include "about.h"
|
||||
#include "rgb_macros.h"
|
||||
//#include "ardour_ui.h"
|
||||
|
|
@ -207,7 +207,7 @@ About::About ()
|
|||
set_website_label (_("visit http://www.ardour.org/"));
|
||||
set_version ((string_compose(_("%1\n(built from revision %2)"),
|
||||
VERSIONSTRING,
|
||||
ardour_svn_revision)));
|
||||
svn_revision)));
|
||||
|
||||
|
||||
#ifdef WITH_PAYMENT_OPTIONS
|
||||
|
|
|
|||
|
|
@ -31,6 +31,7 @@
|
|||
|
||||
#include <jack/jack.h>
|
||||
|
||||
#include <ardour/svn_revision.h>
|
||||
#include <ardour/version.h>
|
||||
#include <ardour/ardour.h>
|
||||
#include <ardour/audioengine.h>
|
||||
|
|
@ -39,7 +40,6 @@
|
|||
#include <gtkmm2ext/popup.h>
|
||||
#include <gtkmm2ext/utils.h>
|
||||
|
||||
#include "svn_revision.h"
|
||||
#include "version.h"
|
||||
#include "ardour_ui.h"
|
||||
#include "opts.h"
|
||||
|
|
@ -292,7 +292,7 @@ int main (int argc, char* argv[])
|
|||
cout << _("Ardour/GTK ")
|
||||
<< VERSIONSTRING
|
||||
<< _("\n (built using ")
|
||||
<< ardour_svn_revision
|
||||
<< svn_revision
|
||||
#ifdef __GNUC__
|
||||
<< _(" and GCC version ") << __VERSION__
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -99,6 +99,7 @@ sndfilesource.cc
|
|||
sndfileimportable.cc
|
||||
source.cc
|
||||
source_factory.cc
|
||||
svn_revision.cc
|
||||
tempo.cc
|
||||
track.cc
|
||||
transient_detector.cc
|
||||
|
|
|
|||
|
|
@ -1,4 +1,8 @@
|
|||
#ifndef __ardour_svn_revision_h__
|
||||
#define __ardour_svn_revision_h__
|
||||
static const char* ardour_svn_revision = "3980";
|
||||
|
||||
namespace ARDOUR {
|
||||
extern const char* svn_revision;
|
||||
}
|
||||
|
||||
#endif
|
||||
Loading…
Add table
Add a link
Reference in a new issue