add a way to see (most of) the waf config used to build ardour at run time (from the about dialog). buttons still need reordering there
git-svn-id: svn://localhost/ardour2/branches/3.0@6439 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
b1af21dae7
commit
6ddcd8f0b9
@ -36,6 +36,7 @@
|
||||
#include "version.h"
|
||||
|
||||
#include "about.h"
|
||||
#include "configinfo.h"
|
||||
#include "rgb_macros.h"
|
||||
#include "ardour_ui.h"
|
||||
|
||||
@ -185,8 +186,9 @@ static const char* translators[] = {
|
||||
|
||||
|
||||
About::About ()
|
||||
: config_info (0)
|
||||
#ifdef WITH_PAYMENT_OPTIONS
|
||||
: paypal_pixmap (paypal_xpm)
|
||||
, paypal_pixmap (paypal_xpm)
|
||||
#endif
|
||||
{
|
||||
// set_type_hint(Gdk::WINDOW_TYPE_HINT_SPLASHSCREEN);
|
||||
@ -218,11 +220,14 @@ About::About ()
|
||||
"under certain conditions; see the file COPYING for details.\n"));
|
||||
set_name (X_("ardour"));
|
||||
set_website (X_("http://ardour.org/"));
|
||||
set_website_label (_("visit http://www.ardour.org/"));
|
||||
set_website_label (_("visit http://ardour.org/"));
|
||||
set_version ((string_compose(_("%1\n(built from revision %2)"),
|
||||
VERSIONSTRING,
|
||||
svn_revision)));
|
||||
|
||||
Gtk::Button* config_button = manage (new Button (_("Config")));
|
||||
get_action_area()->pack_start (*config_button, false, false);
|
||||
config_button->signal_clicked().connect (mem_fun (*this, &About::show_config_info));
|
||||
|
||||
#ifdef WITH_PAYMENT_OPTIONS
|
||||
paypal_button.add (paypal_pixmap);
|
||||
@ -239,6 +244,16 @@ About::~About ()
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
About::show_config_info ()
|
||||
{
|
||||
if (!config_info) {
|
||||
config_info = new ConfigInfoDialog;
|
||||
}
|
||||
|
||||
config_info->present ();
|
||||
}
|
||||
|
||||
#ifdef WITH_PAYMENT_OPTIONS
|
||||
void
|
||||
About::goto_paypal ()
|
||||
|
@ -22,7 +22,7 @@
|
||||
|
||||
#include <gtkmm/aboutdialog.h>
|
||||
|
||||
class ARDOUR_UI;
|
||||
class ConfigInfoDialog;
|
||||
|
||||
class About : public Gtk::AboutDialog
|
||||
{
|
||||
@ -30,6 +30,10 @@ class About : public Gtk::AboutDialog
|
||||
About ();
|
||||
~About ();
|
||||
|
||||
private:
|
||||
ConfigInfoDialog* config_info;
|
||||
void show_config_info ();
|
||||
|
||||
#ifdef WITH_PAYMENT_OPTIONS
|
||||
Gtk::Image paypal_pixmap;
|
||||
Gtk::Button paypal_button;
|
||||
|
16
gtk2_ardour/configinfo.cc
Normal file
16
gtk2_ardour/configinfo.cc
Normal file
@ -0,0 +1,16 @@
|
||||
#include "ardour/ardour.h"
|
||||
|
||||
#include "configinfo.h"
|
||||
#include "i18n.h"
|
||||
|
||||
ConfigInfoDialog::ConfigInfoDialog ()
|
||||
: ArdourDialog (_("Build Configuration"))
|
||||
{
|
||||
set_border_width (12);
|
||||
text.get_buffer()->set_text (Glib::ustring (ARDOUR::ardour_config_info));
|
||||
text.set_wrap_mode (Gtk::WRAP_WORD);
|
||||
text.show ();
|
||||
text.set_size_request (300, 800);
|
||||
|
||||
get_vbox()->pack_start (text, true, true);
|
||||
}
|
12
gtk2_ardour/configinfo.h
Normal file
12
gtk2_ardour/configinfo.h
Normal file
@ -0,0 +1,12 @@
|
||||
#include <gtkmm/textview.h>
|
||||
|
||||
#include "ardour_dialog.h"
|
||||
|
||||
class ConfigInfoDialog : public ArdourDialog
|
||||
{
|
||||
public:
|
||||
ConfigInfoDialog();
|
||||
|
||||
private:
|
||||
Gtk::TextView text;
|
||||
};
|
@ -778,7 +778,8 @@ public:
|
||||
|
||||
_box->pack_start (_view, false, false);
|
||||
|
||||
Label* label = manage (new Label (_("Double-click on a name to edit settings for an enabled protocol")));
|
||||
Label* label = manage (new Label);
|
||||
label->set_markup (string_compose (X_("<i>%1</i>"), _("Double-click on a name to edit settings for an enabled protocol")));
|
||||
|
||||
_box->pack_start (*label, false, false);
|
||||
label->show ();
|
||||
|
@ -60,6 +60,7 @@ gtk2_ardour_sources = [
|
||||
'canvas-simplerect.c',
|
||||
'canvas-sysex.cc',
|
||||
'canvas-waveview.c',
|
||||
'configinfo.cc',
|
||||
'control_point.cc',
|
||||
'control_point_dialog.cc',
|
||||
'crossfade_edit.cc',
|
||||
|
@ -54,6 +54,7 @@ namespace ARDOUR {
|
||||
bool no_auto_connect ();
|
||||
|
||||
std::string get_ardour_revision ();
|
||||
extern const char* const ardour_config_info;
|
||||
|
||||
void find_bindings_files (std::map<std::string,std::string>&);
|
||||
|
||||
|
@ -64,6 +64,7 @@ libardour_sources = [
|
||||
'chan_count.cc',
|
||||
'chan_mapping.cc',
|
||||
'configuration.cc',
|
||||
'config_text.cc',
|
||||
'control_protocol_manager.cc',
|
||||
'control_protocol_search_path.cc',
|
||||
'crossfade.cc',
|
||||
|
@ -308,7 +308,7 @@ GenericMidiControlProtocol::start_learning (Controllable* c)
|
||||
MIDIControllable* mc = 0;
|
||||
|
||||
for (MIDIControllables::iterator i = controllables.begin(); i != controllables.end(); ++i) {
|
||||
if ((*i)->get_controllable()->id() == c->id()) {
|
||||
if ((*i)->get_controllable() && ((*i)->get_controllable()->id() == c->id())) {
|
||||
mc = *i;
|
||||
break;
|
||||
}
|
||||
|
32
wscript
32
wscript
@ -528,6 +528,38 @@ def configure(conf):
|
||||
autowaf.display_msg(conf, 'C Compiler flags', conf.env['CCFLAGS'])
|
||||
autowaf.display_msg(conf, 'C++ Compiler flags', conf.env['CXXFLAGS'])
|
||||
|
||||
# and dump the same stuff to a file for use in the build
|
||||
|
||||
config_text = open ('libs/ardour/config_text.cc',"w")
|
||||
config_text.write ('#include "ardour/ardour.h"\n\nnamespace ARDOUR {\nconst char* const ardour_config_info = "\\n\\\n')
|
||||
config_text.write ("Install prefix "); config_text.write (str (conf.env['PREFIX'])); config_text.write ("\\n\\\n")
|
||||
config_text.write ("Debuggable build "); config_text.write (str (str(conf.env['DEBUG']))); config_text.write ("\\n\\\n")
|
||||
config_text.write ("Strict compiler flags "); config_text.write (str (str(conf.env['STRICT']))); config_text.write ("\\n\\\n")
|
||||
config_text.write ("Build documentation "); config_text.write (str (str(conf.env['BUILD_DOCS']))); config_text.write ("\\n\\\n")
|
||||
config_text.write ('Build Target '); config_text.write (str (conf.env['build_target'])); config_text.write ("\\n\\\n")
|
||||
config_text.write ('Architecture flags '); config_text.write (str (opts.arch)); config_text.write ("\\n\\\n")
|
||||
config_text.write ('Aubio '); config_text.write (str (bool(conf.env['HAVE_AUBIO']))); config_text.write ("\\n\\\n")
|
||||
config_text.write ('AudioUnits '); config_text.write (str (opts.audiounits)); config_text.write ("\\n\\\n")
|
||||
config_text.write ('CoreAudio '); config_text.write (str (bool(conf.env['HAVE_COREAUDIO']))); config_text.write ("\\n\\\n")
|
||||
config_text.write ('FPU Optimization '); config_text.write (str (opts.fpu_optimization)); config_text.write ("\\n\\\n")
|
||||
config_text.write ('Freedesktop Files '); config_text.write (str (opts.freedesktop)); config_text.write ("\\n\\\n")
|
||||
config_text.write ('Freesound '); config_text.write (str (opts.freesound)); config_text.write ("\\n\\\n")
|
||||
config_text.write ('GtkOSX '); config_text.write (str (opts.gtkosx)); config_text.write ("\\n\\\n")
|
||||
config_text.write ('LV2 Support '); config_text.write (str (bool(conf.env['HAVE_SLV2']))); config_text.write ("\\n\\\n")
|
||||
config_text.write ('Rubberband '); config_text.write (str (bool(conf.env['HAVE_RUBBERBAND']))); config_text.write ("\\n\\\n")
|
||||
config_text.write ('Samplerate '); config_text.write (str (bool(conf.env['HAVE_SAMPLERATE']))); config_text.write ("\\n\\\n")
|
||||
config_text.write ('Soundtouch '); config_text.write (str (bool(conf.env['HAVE_SOUNDTOUCH']))); config_text.write ("\\n\\\n")
|
||||
config_text.write ('Translation '); config_text.write (str (opts.nls)); config_text.write ("\\n\\\n")
|
||||
config_text.write ('Tranzport '); config_text.write (str (opts.tranzport)); config_text.write ("\\n\\\n")
|
||||
config_text.write ('Universal Binary '); config_text.write (str (opts.universal)); config_text.write ("\\n\\\n")
|
||||
config_text.write ('VST Support '); config_text.write (str (opts.vst)); config_text.write ("\\n\\\n")
|
||||
config_text.write ('Wiimote Support '); config_text.write (str (opts.wiimote)); config_text.write ("\\n\\\n")
|
||||
config_text.write ('Windows Key '); config_text.write (str (opts.windows_key)); config_text.write ("\\n\\\n")
|
||||
config_text.write ('C Compiler flags '); config_text.write (str (conf.env['CCFLAGS'])); config_text.write ("\\n\\\n")
|
||||
config_text.write ('C++ Compiler flags '); config_text.write (str (conf.env['CXXFLAGS'])); config_text.write ("\\n\\\n")
|
||||
config_text.write ('";}\n')
|
||||
config_text.close ()
|
||||
|
||||
def build(bld):
|
||||
autowaf.set_recursive()
|
||||
if sys.platform == 'darwin':
|
||||
|
Loading…
Reference in New Issue
Block a user