3 #include "ardour/rc_configuration.h"
5 using namespace ARDOUR;
8 int main (int argc, char **argv) {
10 fprintf(stderr, "Usage: %s [-h] <file-name>\n", argv[0]);
14 if (!strcmp (argv[1], "-h") || !strcmp (argv[1], "--help")) {
15 fprintf(stdout, "Usage: %s <file-name>\n\n", argv[0]);
16 fprintf(stdout, "Writes the default Ardour config to the given file\n");
20 setenv ("ARDOUR_DLL_PATH", "/xxx", 1);
21 setenv ("ARDOUR_CONFIG_PATH", "/xxx", 1);
23 if (!ARDOUR::init (false, true, "/xxx")) {
24 fprintf(stderr, "Failed to initialize libardour\n");
28 RCConfiguration * rc = new RCConfiguration;
29 XMLNode& state = rc->get_state();
31 XMLNode* cfg = state.child ("Config");
32 cfg->remove_nodes_and_delete ("name", "donate-url");
33 cfg->remove_nodes_and_delete ("name", "osx_pingback-url");
34 cfg->remove_nodes_and_delete ("name", "linux-pingback-url");
35 cfg->remove_nodes_and_delete ("name", "updates-url");
36 cfg->remove_nodes_and_delete ("name", "freesound-download-dir"); // user specific
39 tree.set_root (&state);
41 if (!tree.write (argv[1])) {
42 fprintf(stderr, "Error saving config file '%s'\n", argv[1]);