2015-03-22 17:15:37 -04:00
|
|
|
#include <stdio.h>
|
2015-03-23 07:34:07 -04:00
|
|
|
#include <glib.h>
|
|
|
|
|
2015-03-22 17:15:37 -04:00
|
|
|
#include "pbd/xml++.h"
|
|
|
|
#include "ardour/rc_configuration.h"
|
|
|
|
|
|
|
|
using namespace ARDOUR;
|
|
|
|
using namespace std;
|
|
|
|
|
|
|
|
int main (int argc, char **argv) {
|
|
|
|
if (argc < 2) {
|
2015-03-22 18:01:29 -04:00
|
|
|
fprintf(stderr, "Usage: %s [-h] <file-name>\n", argv[0]);
|
2015-03-22 17:15:37 -04:00
|
|
|
return -1;
|
|
|
|
}
|
|
|
|
|
2015-03-22 18:01:29 -04:00
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
2015-03-23 07:34:07 -04:00
|
|
|
g_setenv ("ARDOUR_DLL_PATH", "/xxx", 1);
|
|
|
|
g_setenv ("ARDOUR_CONFIG_PATH", "/xxx", 1);
|
2015-03-22 17:15:37 -04:00
|
|
|
|
|
|
|
if (!ARDOUR::init (false, true, "/xxx")) {
|
|
|
|
fprintf(stderr, "Failed to initialize libardour\n");
|
|
|
|
return -1;
|
|
|
|
}
|
|
|
|
|
|
|
|
RCConfiguration * rc = new RCConfiguration;
|
|
|
|
XMLNode& state = rc->get_state();
|
|
|
|
|
2015-03-22 18:01:29 -04:00
|
|
|
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
|
2015-03-22 17:15:37 -04:00
|
|
|
|
2015-06-17 15:07:40 -04:00
|
|
|
XMLNode* meta = state.child ("Metadata");
|
|
|
|
meta->remove_nodes ("user_name");
|
|
|
|
|
2015-03-22 17:15:37 -04:00
|
|
|
XMLTree tree;
|
|
|
|
tree.set_root (&state);
|
|
|
|
|
|
|
|
if (!tree.write (argv[1])) {
|
|
|
|
fprintf(stderr, "Error saving config file '%s'\n", argv[1]);
|
|
|
|
return -1;
|
|
|
|
}
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
2015-03-22 18:37:55 -04:00
|
|
|
|
|
|
|
|
|
|
|
#include "ardour/vst_types.h"
|
|
|
|
int vstfx_init (void*) { return 0; }
|
|
|
|
void vstfx_exit () {}
|
|
|
|
void vstfx_destroy_editor (VSTState*) {}
|
2015-03-30 15:51:16 -04:00
|
|
|
|
|
|
|
#ifdef WINDOWS_VST_SUPPORT
|
|
|
|
extern "C" {
|
|
|
|
int fst_init (void* possible_hmodule) { return -1;}
|
|
|
|
void fst_exit (void) {}
|
|
|
|
VSTHandle* fst_load (const char*) { return 0; }
|
|
|
|
int fst_unload (VSTHandle**) { return -1; }
|
|
|
|
VSTState * fst_instantiate (VSTHandle *, audioMasterCallback amc, void* userptr) { return 0; }
|
|
|
|
void fst_close (VSTState *) {}
|
|
|
|
void fst_audio_master_idle(void) {}
|
|
|
|
};
|
|
|
|
#endif
|