mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-17 20:26:30 +01:00
new svn_revision.h build system, plus no more SMPTE, just Timecode
git-svn-id: svn://localhost/ardour2/trunk@1116 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
763ed9db7b
commit
638336eee5
13 changed files with 71 additions and 28 deletions
72
SConstruct
72
SConstruct
|
|
@ -16,7 +16,7 @@ import SCons.Node.FS
|
|||
SConsignFile()
|
||||
EnsureSConsVersion(0, 96)
|
||||
|
||||
version = '2.0beta7.1'
|
||||
version = '2.0beta8'
|
||||
|
||||
subst_dict = { }
|
||||
|
||||
|
|
@ -231,6 +231,48 @@ def i18n (buildenv, sources, installenv):
|
|||
moname = domain + '.mo'
|
||||
installenv.Alias('install', installenv.InstallAs (os.path.join (modir, moname), lang + '.mo'))
|
||||
|
||||
|
||||
def fetch_svn_revision (path):
|
||||
cmd = "svn info "
|
||||
cmd += path
|
||||
cmd += " | awk '/^Revision:/ { print $2}'"
|
||||
return commands.getoutput (cmd)
|
||||
|
||||
def recreate_stored_revision(target = None, source = None, env = None):
|
||||
os.unlink ('svn_revision.h')
|
||||
print "===========> Forcing recreation of svn_revision.h"
|
||||
create_stored_revision ()
|
||||
|
||||
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')
|
||||
o.write (text)
|
||||
o.close ()
|
||||
except IOError:
|
||||
print "Could not open svn_revision.h for writing\n"
|
||||
sys.exit (-1)
|
||||
else:
|
||||
if os.path.exists ('svn_revision.h') == False:
|
||||
print "\n\nYou are missing svn_revision.h, which should have been included."
|
||||
print "This is caused either by a packaging error, "
|
||||
print " or a configuration error with your system."
|
||||
print "Please report this issue to the ardour-dev mailing list."
|
||||
print "(See http://ardour.org/support for details)\n\n"
|
||||
sys.exit (-1)
|
||||
|
||||
#
|
||||
# if it exists, do not remove it
|
||||
#
|
||||
|
||||
Precious('svn_revision.h')
|
||||
|
||||
#
|
||||
# A generic builder for version.cc files
|
||||
#
|
||||
|
|
@ -239,14 +281,8 @@ def i18n (buildenv, sources, installenv):
|
|||
#
|
||||
|
||||
def version_builder (target, source, env):
|
||||
cmd = "svn info "
|
||||
cmd += source[0].get_path()
|
||||
cmd += " | awk '/^Revision:/ { print $2}'"
|
||||
|
||||
rev = commands.getoutput (cmd)
|
||||
|
||||
text = "const char* " + env['DOMAIN'] + "_revision = \"" + rev + "\";\n"
|
||||
text += "int " + env['DOMAIN'] + "_major_version = " + str (env['MAJOR']) + ";\n"
|
||||
|
||||
text = "int " + env['DOMAIN'] + "_major_version = " + str (env['MAJOR']) + ";\n"
|
||||
text += "int " + env['DOMAIN'] + "_minor_version = " + str (env['MINOR']) + ";\n"
|
||||
text += "int " + env['DOMAIN'] + "_micro_version = " + str (env['MICRO']) + ";\n"
|
||||
|
||||
|
|
@ -269,7 +305,7 @@ def version_builder (target, source, env):
|
|||
try:
|
||||
o = file (target[1].get_path(), 'w')
|
||||
o.write (text)
|
||||
o.close ();
|
||||
o.close ()
|
||||
except IOError:
|
||||
print "Could not open", target[1].get_path(), " for writing\n"
|
||||
sys.exit (-1)
|
||||
|
|
@ -931,6 +967,13 @@ env = conf.Finish()
|
|||
|
||||
rcbuild = env.SubstInFile ('ardour.rc','ardour.rc.in', SUBST_DICT = subst_dict)
|
||||
|
||||
#
|
||||
# making this into an Alias directly prevents scons from understanding how to build
|
||||
# svn_revision.h
|
||||
#
|
||||
|
||||
the_revision = env.Command ('svn_revision.h', [], create_stored_revision)
|
||||
|
||||
env.Alias('install', env.Install(os.path.join(config_prefix, 'ardour2'), 'ardour_system.rc'))
|
||||
env.Alias('install', env.Install(os.path.join(config_prefix, 'ardour2'), 'ardour.rc'))
|
||||
|
||||
|
|
@ -940,13 +983,8 @@ Default (rcbuild)
|
|||
|
||||
Precious (env['DISTTREE'])
|
||||
|
||||
#
|
||||
# note the special "cleanfirst" source name. this triggers removal
|
||||
# of the existing disttree
|
||||
#
|
||||
|
||||
env.Distribute (env['DISTTREE'],
|
||||
[ 'SConstruct',
|
||||
[ 'SConstruct', 'svn_revision.h',
|
||||
'COPYING', 'PACKAGER_README', 'README',
|
||||
'ardour.rc.in',
|
||||
'ardour_system.rc',
|
||||
|
|
@ -976,7 +1014,9 @@ env.Alias ('srctar', srcdist)
|
|||
#
|
||||
# don't leave the distree around
|
||||
#
|
||||
|
||||
env.AddPreAction (env['DISTTREE'], Action ('rm -rf ' + str (File (env['DISTTREE']))))
|
||||
env.AddPreAction (srcdist, Action (recreate_stored_revision))
|
||||
env.AddPostAction (srcdist, Action ('rm -rf ' + str (File (env['DISTTREE']))))
|
||||
|
||||
#
|
||||
|
|
|
|||
|
|
@ -19,6 +19,7 @@ gtkardour.Append(DOMAIN=domain, MAJOR=1,MINOR=0,MICRO=2)
|
|||
gtkardour.Append(CCFLAGS="-DPACKAGE=\\\"" + domain + "\\\"")
|
||||
gtkardour.Append(CXXFLAGS="-DPACKAGE=\\\"" + domain + "\\\"")
|
||||
gtkardour.Append(CXXFLAGS="-DLIBSIGC_DISABLE_DEPRECATED")
|
||||
gtkardour.Append(CPPPATH="#/") # for top level svn_revision.h
|
||||
#gtkardour.Append(CXXFLAGS="-DFLOWCANVAS_AA")
|
||||
gtkardour.Append(PACKAGE=domain)
|
||||
gtkardour.Append(POTFILE=domain + '.pot')
|
||||
|
|
@ -305,7 +306,7 @@ env.Alias('install', env.Install(os.path.join(install_prefix, 'share/ardour2'),
|
|||
env.Alias('install', env.Install(os.path.join(install_prefix, 'share/ardour2/pixmaps'), pixmap_files))
|
||||
env.Alias('install', env.Install(os.path.join(install_prefix, 'share/ardour2/icons'), icon_files))
|
||||
|
||||
env.Alias ('version', gtkardour.VersionBuild(['version.cc','version.h'], 'SConscript'))
|
||||
env.Alias ('version', gtkardour.VersionBuild(['version.cc','version.h'], []))
|
||||
|
||||
#dist
|
||||
env.Alias ('tarball', env.Distribute (env['DISTTREE'],
|
||||
|
|
|
|||
|
|
@ -32,6 +32,7 @@
|
|||
#include "utils.h"
|
||||
#include "version.h"
|
||||
|
||||
#include "svn_revision.h"
|
||||
#include "about.h"
|
||||
#include "rgb_macros.h"
|
||||
#include "ardour_ui.h"
|
||||
|
|
@ -192,7 +193,7 @@ About::About ()
|
|||
set_website_label (_("visit http://www.ardour.org/"));
|
||||
set_version ((string_compose(_("%1\n(built from revision %2)"),
|
||||
VERSIONSTRING,
|
||||
gtk_ardour_revision)));
|
||||
ardour_svn_revision)));
|
||||
|
||||
|
||||
#ifdef WITH_PAYMENT_OPTIONS
|
||||
|
|
|
|||
|
|
@ -235,7 +235,7 @@
|
|||
<menuitem action='FileHeaderFormatCAF'/>
|
||||
</menu>
|
||||
</menu>
|
||||
<menu action='SMPTE'>
|
||||
<menu action='Timecode'>
|
||||
<menuitem action='Smpte23976'/>
|
||||
<menuitem action='Smpte24'/>
|
||||
<menuitem action='Smpte24976'/>
|
||||
|
|
|
|||
|
|
@ -1712,7 +1712,7 @@ AudioClock::build_ops_menu ()
|
|||
MenuList& mode_items = mode_menu->items();
|
||||
mode_menu->set_name ("ArdourContextMenu");
|
||||
|
||||
mode_items.push_back (MenuElem (_("SMPTE"), bind (mem_fun(*this, &AudioClock::set_mode), SMPTE)));
|
||||
mode_items.push_back (MenuElem (_("Timecode"), bind (mem_fun(*this, &AudioClock::set_mode), SMPTE)));
|
||||
mode_items.push_back (MenuElem (_("Bars:Beats"), bind (mem_fun(*this, &AudioClock::set_mode), BBT)));
|
||||
mode_items.push_back (MenuElem (_("Minutes:Seconds"), bind (mem_fun(*this, &AudioClock::set_mode), MinSec)));
|
||||
mode_items.push_back (MenuElem (_("Audio Frames"), bind (mem_fun(*this, &AudioClock::set_mode), Frames)));
|
||||
|
|
|
|||
|
|
@ -177,7 +177,7 @@ Editor::Editor (AudioEngine& eng)
|
|||
|
||||
minsec_label (_("Mins:Secs")),
|
||||
bbt_label (_("Bars:Beats")),
|
||||
smpte_label (_("SMPTE")),
|
||||
smpte_label (_("Timecode")),
|
||||
frame_label (_("Frames")),
|
||||
tempo_label (_("Tempo")),
|
||||
meter_label (_("Meter")),
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ Editor::register_actions ()
|
|||
ActionManager::register_action (editor_actions, X_("Monitoring"), _("Monitoring"));
|
||||
ActionManager::register_action (editor_actions, X_("Autoconnect"), _("Autoconnect"));
|
||||
ActionManager::register_action (editor_actions, X_("Layering"), _("Layering"));
|
||||
ActionManager::register_action (editor_actions, X_("SMPTE"), _("SMPTE fps"));
|
||||
ActionManager::register_action (editor_actions, X_("Timecode"), _("Timecode fps"));
|
||||
ActionManager::register_action (editor_actions, X_("Pullup"), _("Pullup / Pulldown"));
|
||||
ActionManager::register_action (editor_actions, X_("addExistingAudioFiles"), _("Add Existing Audio"));
|
||||
|
||||
|
|
|
|||
|
|
@ -371,7 +371,7 @@ Editor::popup_ruler_menu (nframes_t where, ItemType t)
|
|||
mitem->set_active(true);
|
||||
}
|
||||
|
||||
ruler_items.push_back (CheckMenuElem (X_("SMPTE"), bind (mem_fun(*this, &Editor::ruler_toggled), (int)ruler_metric_smpte)));
|
||||
ruler_items.push_back (CheckMenuElem (X_("Timecode"), bind (mem_fun(*this, &Editor::ruler_toggled), (int)ruler_metric_smpte)));
|
||||
mitem = (CheckMenuItem *) &ruler_items.back();
|
||||
if (ruler_shown[ruler_metric_smpte]) {
|
||||
mitem->set_active(true);
|
||||
|
|
|
|||
|
|
@ -44,6 +44,7 @@
|
|||
#include <gtkmm2ext/popup.h>
|
||||
#include <gtkmm2ext/utils.h>
|
||||
|
||||
#include "svn_revision.h"
|
||||
#include "version.h"
|
||||
#include "ardour_ui.h"
|
||||
#include "opts.h"
|
||||
|
|
@ -384,7 +385,7 @@ int main (int argc, char *argv[])
|
|||
cout << _("Ardour/GTK ")
|
||||
<< VERSIONSTRING
|
||||
<< _("\n (built using ")
|
||||
<< gtk_ardour_revision
|
||||
<< ardour_svn_revision
|
||||
#ifdef __GNUC__
|
||||
<< _(" and GCC version ") << __VERSION__
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -274,7 +274,7 @@ if env['NLS']:
|
|||
|
||||
env.Alias('install', env.Install(os.path.join(install_prefix, 'lib/ardour2'), libardour))
|
||||
|
||||
env.Alias('version', ardour.VersionBuild(['version.cc', 'ardour/version.h'], 'SConscript'))
|
||||
env.Alias('version', ardour.VersionBuild(['version.cc', 'ardour/version.h'], []))
|
||||
|
||||
env.Alias('tarball', env.Distribute (env['DISTTREE'],
|
||||
[ 'SConscript', 'i18n.h', 'gettext.h', 'sse_functions.s', 'sse_functions_64bit.s' ] +
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ utils.cc
|
|||
version.cc
|
||||
""")
|
||||
|
||||
gtkmm2ext.VersionBuild(['version.cc','gtkmm2ext/version.h'], 'SConscript')
|
||||
gtkmm2ext.VersionBuild(['version.cc','gtkmm2ext/version.h'], [])
|
||||
|
||||
gtkmm2ext.Append(CCFLAGS="-D_REENTRANT")
|
||||
gtkmm2ext.Append(CCFLAGS="-DLOCALEDIR=\\\""+final_prefix+"/share/locale\\\"")
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ else:
|
|||
midi2.Append(CCFLAGS="-D_REENTRANT -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE")
|
||||
midi2.Append(CCFLAGS="-DLIBSIGC_DISABLE_DEPRECATED")
|
||||
|
||||
midi2.VersionBuild(['version.cc','midi++/version.h'], 'SConscript')
|
||||
midi2.VersionBuild(['version.cc','midi++/version.h'], [])
|
||||
|
||||
libmidi2 = midi2.SharedLibrary('midi++', [ sources, sysdep_src ])
|
||||
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ pbd.Merge ([ libraries['sigc2'],
|
|||
libraries['glibmm2'],
|
||||
libraries['glib2'] ])
|
||||
|
||||
pbd.VersionBuild(['version.cc','pbd/version.h'], 'SConscript')
|
||||
pbd.VersionBuild(['version.cc','pbd/version.h'], [])
|
||||
|
||||
libpbd = pbd.SharedLibrary('pbd', pbd_files)
|
||||
Default(libpbd)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue