"Ardour" -> PROGRAM_NAME change for libardour and setup for gtk2_ardour

git-svn-id: svn://localhost/ardour2/branches/3.0@6757 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Paul Davis 2010-03-13 19:22:34 +00:00
parent e10f59f96c
commit f85161c5d0
15 changed files with 69 additions and 64 deletions

View File

@ -254,6 +254,7 @@ def build(bld):
obj.cxxflags += ['-DMODULE_DIR="' + os.path.normpath(bld.env['LIBDIR']) + '"']
obj.cxxflags += ['-DLOCALEDIR="' + os.path.join(
os.path.normpath(bld.env['DATADIR']), 'locale') + '"']
obj.cxxflags += ['-DPROGRAM_NAME="' + bld.env['PROGRAM_NAME'] + '"']
if bld.env['HAVE_SLV2']:
obj.source += [ 'lv2_plugin_ui.cc' ]

View File

@ -1027,7 +1027,7 @@ AUPlugin::get_state()
CFRelease (propertyList);
#else
if (!seen_get_state_message) {
info << _("Saving AudioUnit settings is not supported in this build of Ardour. Consider paying for a newer version")
info << string_compose (_("Saving AudioUnit settings is not supported in this build of %1. Consider paying for a newer version"), PROGRAM_NAME)
<< endmsg;
seen_get_state_message = true;
}

View File

@ -235,16 +235,20 @@ AudioFileSource::old_peak_path (ustring audio_path)
bool
AudioFileSource::get_soundfile_info (ustring path, SoundFileInfo& _info, string& error_msg)
{
/* try sndfile first because it gets timecode info from .wav (BWF) if it exists,
which at present, ExtAudioFile from Apple seems unable to do.
*/
if (SndFileSource::get_soundfile_info (path, _info, error_msg) != 0) {
return true;
}
#ifdef HAVE_COREAUDIO
if (CoreAudioSource::get_soundfile_info (path, _info, error_msg) == 0) {
return true;
}
#endif // HAVE_COREAUDIO
if (SndFileSource::get_soundfile_info (path, _info, error_msg) != 0) {
return true;
}
return false;
}

View File

@ -19,7 +19,7 @@
*/
#include "ardour/broadcast_info.h"
#include <iostream>
#include <sstream>
#include <iomanip>

View File

@ -386,8 +386,8 @@ FileSource::set_source_name (const ustring& newname, bool destructive)
}
// Test whether newpath exists, if yes notify the user but continue.
if (access(newpath.c_str(),F_OK) == 0) {
error << _("Programming error! Ardour tried to rename a file over another file! It's safe to continue working, but please report this to the developers.") << endmsg;
if (Glib::file_test (newpath, Glib::FILE_TEST_EXISTS)) {
error << string_compose (_("Programming error! %1 tried to rename a file over another file! It's safe to continue working, but please report this to the developers."), PROGRAM_NAME) << endmsg;
return -1;
}

View File

@ -309,7 +309,7 @@ lotsa_files_please ()
if (rl.rlim_cur == RLIM_INFINITY) {
info << _("Removed open file count limit. Excellent!") << endmsg;
} else {
info << string_compose (_("Ardour will be limited to %1 open files"), rl.rlim_cur) << endmsg;
info << string_compose (_("%1 will be limited to %2 open files"), PROGRAM_NAME, rl.rlim_cur) << endmsg;
}
}
} else {

View File

@ -63,10 +63,8 @@
#include "ardour/tempo.h"
#ifdef HAVE_COREAUDIO
#ifdef USE_COREAUDIO_FOR_FILE_IO
#include "ardour/caimportable.h"
#endif
#endif
#include "i18n.h"
@ -77,51 +75,45 @@ using namespace PBD;
static boost::shared_ptr<ImportableSource>
open_importable_source (const string& path, nframes_t samplerate, ARDOUR::SrcQuality quality)
{
#ifdef HAVE_COREAUDIO
#ifdef USE_COREAUDIO_FOR_FILE_IO
/* see if we can use CoreAudio to handle the IO */
try {
CAImportableSource* src = new CAImportableSource(path);
boost::shared_ptr<CAImportableSource> source (src);
/* try libsndfile first, because it can get BWF info from .wav, which ExtAudioFile cannot.
We don't necessarily need that information in an ImportableSource, but it keeps the
logic the same as in SourceFactory::create()
*/
try {
boost::shared_ptr<SndFileImportableSource> source(new SndFileImportableSource(path));
if (source->samplerate() == samplerate) {
return source;
}
/* rewrap as a resampled source */
return boost::shared_ptr<ImportableSource>(new ResampledImportableSource(source, samplerate, quality));
}
catch (...) {
/* fall back to SndFile */
#endif
#endif
try {
boost::shared_ptr<SndFileImportableSource> source(new SndFileImportableSource(path));
if (source->samplerate() == samplerate) {
return source;
}
/* rewrap as a resampled source */
return boost::shared_ptr<ImportableSource>(new ResampledImportableSource(source, samplerate, quality));
}
catch (...) {
throw; // rethrow
}
#ifdef HAVE_COREAUDIO
#ifdef USE_COREAUDIO_FOR_FILE_IO
/* libsndfile failed, see if we can use CoreAudio to handle the IO */
CAImportableSource* src = new CAImportableSource(path);
boost::shared_ptr<CAImportableSource> source (src);
if (source->samplerate() == samplerate) {
return source;
}
/* rewrap as a resampled source */
return boost::shared_ptr<ImportableSource>(new ResampledImportableSource(source, samplerate, quality));
#else
throw; // rethrow
#endif
}
#endif
#endif
}
static std::string

View File

@ -236,8 +236,8 @@ LV2Plugin::set_parameter (uint32_t which, float val)
} else {
warning << string_compose (_("Illegal parameter number used with plugin \"%1\"."
"This is a bug in either Ardour or the LV2 plugin (%2)"),
name(), unique_id()) << endmsg;
"This is a bug in either %2 or the LV2 plugin (%3)"),
name(), PROGRAM_NAME, unique_id()) << endmsg;
}
}

View File

@ -99,16 +99,16 @@ RCConfiguration::load_state ()
XMLTree tree;
if (!tree.read (rcfile.c_str())) {
error << string_compose(_("Ardour: cannot read system configuration file \"%1\""), rcfile) << endmsg;
error << string_compose(_("%1: cannot read system configuration file \"%2\""), PROGRAM_NAME, rcfile) << endmsg;
return -1;
}
if (set_state (*tree.root(), Stateful::current_state_version)) {
error << string_compose(_("Ardour: system configuration file \"%1\" not loaded successfully."), rcfile) << endmsg;
error << string_compose(_("%1: system configuration file \"%2\" not loaded successfully."), PROGRAM_NAME, rcfile) << endmsg;
return -1;
}
} else {
error << _("your system Ardour configuration file is empty. This probably means that there as an error installing Ardour") << endmsg;
error << string_compose (_("your system %1 configuration file is empty. This probably means that there as an error installing %1"), PROGRAM_NAME) << endmsg;
}
}
@ -134,21 +134,21 @@ RCConfiguration::load_state ()
XMLTree tree;
if (!tree.read (rcfile)) {
error << string_compose(_("Ardour: cannot read configuration file \"%1\""), rcfile) << endmsg;
error << string_compose(_("%1: cannot read configuration file \"%2\""), PROGRAM_NAME, rcfile) << endmsg;
return -1;
}
if (set_state (*tree.root(), Stateful::current_state_version)) {
error << string_compose(_("Ardour: user configuration file \"%1\" not loaded successfully."), rcfile) << endmsg;
error << string_compose(_("%1: user configuration file \"%2\" not loaded successfully."), PROGRAM_NAME, rcfile) << endmsg;
return -1;
}
} else {
warning << _("your Ardour configuration file is empty. This is not normal.") << endmsg;
warning << string_compose (_("your %1 configuration file is empty. This is not normal."), PROGRAM_NAME) << endmsg;
}
}
if (!found)
error << "Ardour: could not find configuration file (ardour.rc), canvas will look broken." << endmsg;
error << string_compose (_("%1: could not find configuration file (ardour.rc), canvas will look broken."), PROGRAM_NAME) << endmsg;
return 0;
}

View File

@ -1639,7 +1639,7 @@ Session::new_midi_track (TrackMode mode, RouteGroup* route_group, uint32_t how_m
catch (AudioEngine::PortRegistrationFailure& pfe) {
error << _("No more JACK ports are available. You will need to stop Ardour and restart JACK with ports if you need this many tracks.") << endmsg;
error << string_compose (_("No more JACK ports are available. You will need to stop %1 and restart JACK with ports if you need this many tracks."), PROGRAM_NAME) << endmsg;
if (track) {
/* we need to get rid of this, since the track failed to be created */

View File

@ -120,7 +120,7 @@ Session::set_mtc_port (string port_tag)
if (port_tag.length() == 0) {
if (_slave && ((ms = dynamic_cast<MTC_Slave*> (_slave)) != 0)) {
error << _("Ardour is slaved to MTC - port cannot be reset") << endmsg;
error << string_compose (_("%1 is slaved to MTC - port cannot be reset"), PROGRAM_NAME) << endmsg;
return -1;
}
@ -278,7 +278,7 @@ Session::set_midi_clock_port (string port_tag)
if (port_tag.length() == 0) {
if (_slave && ((ms = dynamic_cast<MIDIClock_Slave*> (_slave)) != 0)) {
error << _("Ardour is slaved to MIDI Clock - port cannot be reset") << endmsg;
error << string_compose (_("%1 is slaved to MIDI Clock - port cannot be reset"), PROGRAM_NAME) << endmsg;
return -1;
}

View File

@ -687,7 +687,8 @@ Session::save_state (string snapshot_name, bool pending)
}
if (!_engine.connected ()) {
error << _("Ardour's audio engine is not connected and state saving would lose all I/O connections. Session not saved")
error << string_compose (_("the %1 audio engine is not connected and state saving would lose all I/O connections. Session not saved"),
PROGRAM_NAME)
<< endmsg;
return 1;
}
@ -826,7 +827,7 @@ Session::load_state (string snapshot_name)
XMLNode& root (*state_tree->root());
if (root.name() != X_("Session")) {
error << string_compose (_("Session file %1 is not an Ardour session"), xmlpath.to_string()) << endmsg;
error << string_compose (_("Session file %1 is not a session"), xmlpath.to_string()) << endmsg;
delete state_tree;
state_tree = 0;
return -1;
@ -857,8 +858,8 @@ Session::load_state (string snapshot_name)
return 0;
}
info << string_compose (_("Copying old session file %1 to %2\nUse %2 with Ardour versions before 2.0 from now on"),
xmlpath.to_string(), backup_path.to_string())
info << string_compose (_("Copying old session file %1 to %2\nUse %2 with %3 versions before 2.0 from now on"),
xmlpath.to_string(), backup_path.to_string(), PROGRAM_NAME)
<< endmsg;
try
@ -1734,7 +1735,7 @@ Session::XMLSourceFactory (const XMLNode& node)
}
catch (failed_constructor& err) {
error << _("Found a sound file that cannot be used by Ardour. Talk to the progammers.") << endmsg;
error << string_compose (_("Found a sound file that cannot be used by %1. Talk to the progammers."), PROGRAM_NAME) << endmsg;
return boost::shared_ptr<Source>();
}
}

View File

@ -640,8 +640,8 @@ Session::set_play_loop (bool yn)
set_dirty();
if (yn && Config->get_seamless_loop() && synced_to_jack()) {
warning << _("Seamless looping cannot be supported while Ardour is using JACK transport.\n"
"Recommend changing the configured options")
warning << string_compose (_("Seamless looping cannot be supported while %1 is using JACK transport.\n"
"Recommend changing the configured options"), PROGRAM_NAME)
<< endmsg;
return;
}
@ -964,7 +964,8 @@ Session::set_transport_speed (double speed, bool abort, bool clear_state)
}
if ((synced_to_jack()) && speed != 0.0 && speed != 1.0) {
warning << _("Global varispeed cannot be supported while Ardour is connected to JACK transport control")
warning << string_compose (_("Global varispeed cannot be supported while %1 is connected to JACK transport control"),
PROGRAM_NAME)
<< endmsg;
return;
}

View File

@ -278,6 +278,8 @@ def build(bld):
os.path.normpath(bld.env['DATADIR']), 'locale') + '"']
obj.cxxflags += ['-DVAMP_DIR="' + os.path.join(
os.path.normpath(bld.env['LIBDIR']), 'ardour3', 'vamp') + '"']
obj.cxxflags += ['-DPROGRAM_NAME="' + bld.env['PROGRAM_NAME'] + '"']
#obj.source += ' st_stretch.cc st_pitch.cc '
#obj.uselib += ' SOUNDTOUCH '
#obj.add_objects = 'default/libs/surfaces/control_protocol/smpte_1.o'

View File

@ -313,6 +313,8 @@ def set_compiler_flags (conf,opt):
def set_options(opt):
autowaf.set_options(opt)
opt.add_option('--program-name', type='string', action='store', default='Ardour', dest='program_name',
help='The user-visible name of the program being built')
opt.add_option('--arch', type='string', action='store', dest='arch',
help='Architecture-specific compiler flags')
opt.add_option('--boost-sp-debug', action='store_true', default=False, dest='boost_sp_debug',
@ -528,6 +530,8 @@ def configure(conf):
if opts.windows_key:
conf.define('WINDOWS_KEY', opts.windows_key)
autowaf.display_msg(conf, 'Windows Key', opts.windows_key)
conf.env['PROGRAM_NAME'] = opts.program_name
autowaf.display_msg(conf, 'Program Name', opts.program_name)
set_compiler_flags (conf, Options.options)