summaryrefslogtreecommitdiff
path: root/cfgtool
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2015-03-22 23:01:29 +0100
committerRobin Gareus <robin@gareus.org>2015-03-22 23:01:29 +0100
commit948a43d083653038cdd58e0a5875c68131ae7f08 (patch)
treeb2bc1de4bdae1e2cc39b11abd50248f110191e04 /cfgtool
parent7939f2177946971ab8f49f797a962ad2a6f66511 (diff)
config dump tool details.
Diffstat (limited to 'cfgtool')
-rw-r--r--cfgtool/cfgtool.cc18
1 files changed, 13 insertions, 5 deletions
diff --git a/cfgtool/cfgtool.cc b/cfgtool/cfgtool.cc
index 5f39bd58b0..68d3e91423 100644
--- a/cfgtool/cfgtool.cc
+++ b/cfgtool/cfgtool.cc
@@ -1,19 +1,22 @@
#include <stdio.h>
-
-#include "pbd/pbd.h"
#include "pbd/xml++.h"
#include "ardour/rc_configuration.h"
-#include "pbd/enumwriter.h"
using namespace ARDOUR;
using namespace std;
int main (int argc, char **argv) {
if (argc < 2) {
- fprintf(stderr, "usage %s <file-name>\n", argv[0]);
+ fprintf(stderr, "Usage: %s [-h] <file-name>\n", argv[0]);
return -1;
}
+ if (!strcmp (argv[1], "-h") || !strcmp (argv[1], "--help")) {
+ fprintf(stdout, "Usage: %s <file-name>\n\n", argv[0]);
+ fprintf(stdout, "Writes the default Ardour config to the given file\n");
+ return 0;
+ }
+
setenv ("ARDOUR_DLL_PATH", "/xxx", 1);
setenv ("ARDOUR_CONFIG_PATH", "/xxx", 1);
@@ -25,7 +28,12 @@ int main (int argc, char **argv) {
RCConfiguration * rc = new RCConfiguration;
XMLNode& state = rc->get_state();
- // TODO strip some nodes here ?
+ XMLNode* cfg = state.child ("Config");
+ cfg->remove_nodes_and_delete ("name", "donate-url");
+ cfg->remove_nodes_and_delete ("name", "osx_pingback-url");
+ cfg->remove_nodes_and_delete ("name", "linux-pingback-url");
+ cfg->remove_nodes_and_delete ("name", "updates-url");
+ cfg->remove_nodes_and_delete ("name", "freesound-download-dir"); // user specific
XMLTree tree;
tree.set_root (&state);