X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=cfgtool%2Fcfgtool.cc;h=3492f8b0356d2d1f833d2ddbf5e54e3da22b2b82;hb=30a698f42e3ee6be5a63ea1143413cf8329f444e;hp=5f39bd58b0207c24430235bfc5f9f74e72a9a47e;hpb=c7216e03f1fadfee66f5b378fcbe2be345831666;p=ardour.git diff --git a/cfgtool/cfgtool.cc b/cfgtool/cfgtool.cc index 5f39bd58b0..3492f8b035 100644 --- a/cfgtool/cfgtool.cc +++ b/cfgtool/cfgtool.cc @@ -1,21 +1,26 @@ #include +#include -#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 \n", argv[0]); + fprintf(stderr, "Usage: %s [-h] \n", argv[0]); return -1; } - setenv ("ARDOUR_DLL_PATH", "/xxx", 1); - setenv ("ARDOUR_CONFIG_PATH", "/xxx", 1); + if (!strcmp (argv[1], "-h") || !strcmp (argv[1], "--help")) { + fprintf(stdout, "Usage: %s \n\n", argv[0]); + fprintf(stdout, "Writes the default Ardour config to the given file\n"); + return 0; + } + + g_setenv ("ARDOUR_DLL_PATH", "/xxx", 1); + g_setenv ("ARDOUR_CONFIG_PATH", "/xxx", 1); if (!ARDOUR::init (false, true, "/xxx")) { fprintf(stderr, "Failed to initialize libardour\n"); @@ -25,7 +30,15 @@ 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 + + XMLNode* meta = state.child ("Metadata"); + meta->remove_nodes ("user_name"); XMLTree tree; tree.set_root (&state); @@ -37,3 +50,21 @@ int main (int argc, char **argv) { return 0; } + + +#include "ardour/vst_types.h" +int vstfx_init (void*) { return 0; } +void vstfx_exit () {} +void vstfx_destroy_editor (VSTState*) {} + +#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