Index: scconfig/hooks.c =================================================================== --- scconfig/hooks.c (revision 3710) +++ scconfig/hooks.c (revision 3711) @@ -30,7 +30,7 @@ #undef plugin_def #undef plugin_header #undef plugin_dep -#define plugin_def(name, desc, default_) plugin3_args(name, desc) +#define plugin_def(name, desc, default_, all_) plugin3_args(name, desc) #define plugin_header(sect) #define plugin_dep(plg, on) #include "plugins.h" @@ -50,6 +50,9 @@ printf(" --coord=32|64 set coordinate integer type's width in bits\n"); printf(" --dot_pcb_pcb=path .pcb-rnd config path under $HOME/\n"); printf(" --workaround-gtk-ctrl enable GTK control key query workaround\n"); + printf(" --all=plugin enable all working plugins for dynamic load\n"); + printf(" --all=buildin enable all working plugins for static link\n"); + printf(" --all=disable disable all plugins (compile core only)\n"); } static void help2(void) @@ -72,6 +75,7 @@ repeat = strclone(msg); \ } while(0) +static void all_plugin_select(const char *state); /* Runs when a custom command line argument is found returns true if no further argument processing should be done */ @@ -96,6 +100,14 @@ want_coord_bits = v; return 1; } + if (strcmp(key, "all") == 0) { + if ((strcmp(value, sbuildin) == 0) || (strcmp(value, splugin) == 0) || (strcmp(value, sdisable) == 0)) { + all_plugin_select(value); + return 1; + } + report("Error: unknown --all argument: %s\n", value); + exit(1); + } if (strcmp(key, "coord") == 0) put("/local/pcb/dot_pcb_rnd", value); if (strncmp(key, "workaround-", 11) == 0) { @@ -152,12 +164,29 @@ } } +static void all_plugin_select(const char *state) +{ + char buff[1024]; + +#undef plugin_def +#undef plugin_header +#undef plugin_dep +#define plugin_def(name, desc, default_, all_) \ + if (all_) { \ + sprintf(buff, "/local/pcb/%s/controls", name); \ + put(buff, state); \ + } +#define plugin_header(sect) +#define plugin_dep(plg, on) +#include "plugins.h" +} + void plugin_deps(int require) { #undef plugin_def #undef plugin_header #undef plugin_dep -#define plugin_def(name, desc, default_) +#define plugin_def(name, desc, default_, all_) #define plugin_header(sect) #define plugin_dep(plg, on) plugin_dep1(require, plg, on); #include "plugins.h" @@ -182,7 +211,7 @@ #undef plugin_def #undef plugin_header #undef plugin_dep -#define plugin_def(name, desc, default_) plugin3_default(name, default_) +#define plugin_def(name, desc, default_, all_) plugin3_default(name, default_) #define plugin_header(sect) #define plugin_dep(plg, on) #include "plugins.h" @@ -648,12 +677,10 @@ print_sum_cfg_val("/local/pcb/coord_bits", "Coordinate type bits"); print_sum_cfg_val("/local/pcb/dot_pcb_rnd", ".pcb_rnd config dir under $HOME"); - - #undef plugin_def #undef plugin_header #undef plugin_dep -#define plugin_def(name, desc, default_) plugin3_stat(name, desc) +#define plugin_def(name, desc, default_, all_) plugin3_stat(name, desc) #define plugin_header(sect) printf(sect); #define plugin_dep(plg, on) #include "plugins.h" Index: scconfig/plugins.h =================================================================== --- scconfig/plugins.h (revision 3710) +++ scconfig/plugins.h (revision 3711) @@ -1,53 +1,53 @@ plugin_header("\nFeature plugins:\n") -plugin_def("gpmi", "GPMI scripting", sbuildin) -plugin_def("diag", "diagnostic acts. for devs", sdisable) -plugin_def("autoroute", "the original autorouter", sbuildin) -plugin_def("toporouter", "topological autorouter", sdisable) -plugin_def("autoplace", "auto place components", sbuildin) -plugin_def("vendordrill", "vendor drill mapping", sbuildin) -plugin_def("puller", "puller", sbuildin) -plugin_def("djopt", "djopt", sbuildin) -plugin_def("mincut", "minimal cut shorts", sbuildin) -plugin_def("renumber", "renumber action", sbuildin) -plugin_def("oldactions", "old/obsolete actions", sdisable) -plugin_def("fontmode", "font editor", sbuildin) -plugin_def("legacy_func", "legacy functions", sbuildin) -plugin_def("stroke", "libstroke gestures", sdisable) -plugin_def("report", "report actions", sbuildin) -plugin_def("dbus", "DBUS interface", sdisable) -plugin_def("shand_cmd", "command shorthands", sbuildin) -plugin_def("propedit", "object property editor", sbuildin) -plugin_def("loghid", "diagnostics: log HID calls",sdisable) +plugin_def("gpmi", "GPMI scripting", sbuildin, 1) +plugin_def("diag", "diagnostic acts. for devs", sdisable, 1) +plugin_def("autoroute", "the original autorouter", sbuildin, 1) +plugin_def("toporouter", "topological autorouter", sdisable, 0) +plugin_def("autoplace", "auto place components", sbuildin, 1) +plugin_def("vendordrill", "vendor drill mapping", sbuildin, 1) +plugin_def("puller", "puller", sbuildin, 1) +plugin_def("djopt", "djopt", sbuildin, 1) +plugin_def("mincut", "minimal cut shorts", sbuildin, 1) +plugin_def("renumber", "renumber action", sbuildin, 1) +plugin_def("oldactions", "old/obsolete actions", sdisable, 1) +plugin_def("fontmode", "font editor", sbuildin, 1) +plugin_def("legacy_func", "legacy functions", sbuildin, 1) +plugin_def("stroke", "libstroke gestures", sdisable, 1) +plugin_def("report", "report actions", sbuildin, 1) +plugin_def("dbus", "DBUS interface", sdisable, 1) +plugin_def("shand_cmd", "command shorthands", sbuildin, 1) +plugin_def("propedit", "object property editor", sbuildin, 1) +plugin_def("loghid", "diagnostics: log HID calls",sdisable, 1) plugin_header("\nFootprint backends:\n") -plugin_def("fp_fs", "filesystem footprints", sbuildin) -plugin_def("fp_wget", "web footprints", sbuildin) +plugin_def("fp_fs", "filesystem footprints", sbuildin, 1) +plugin_def("fp_wget", "web footprints", sbuildin, 1) plugin_header("\nImport plugins:\n") -plugin_def("import_sch", "import sch", sbuildin) -plugin_def("import_edif", "import edif", sbuildin) -plugin_def("import_netlist", "import netlist", sbuildin) +plugin_def("import_sch", "import sch", sbuildin, 1) +plugin_def("import_edif", "import edif", sbuildin, 1) +plugin_def("import_netlist", "import netlist", sbuildin, 1) plugin_header("\nExport plugins:\n") -plugin_def("export_gcode", "gcode exporter", sbuildin) -plugin_def("export_nelma", "nelma exporter", sbuildin) -plugin_def("export_png", "png/gif/jpg exporter", sbuildin) -plugin_def("export_bom", "bom exporter", sbuildin) -plugin_def("export_xy", "xy (centroid) exporter", sbuildin) -plugin_def("export_gerber", "gerber exporter", sbuildin) -plugin_def("export_lpr", "lpr exporter (printer)", sbuildin) -plugin_def("export_ps", "postscript exporter", sbuildin) -plugin_def("export_test", "dummy test exporter", sdisable) +plugin_def("export_gcode", "gcode exporter", sbuildin, 1) +plugin_def("export_nelma", "nelma exporter", sbuildin, 1) +plugin_def("export_png", "png/gif/jpg exporter", sbuildin, 1) +plugin_def("export_bom", "bom exporter", sbuildin, 1) +plugin_def("export_xy", "xy (centroid) exporter", sbuildin, 1) +plugin_def("export_gerber", "gerber exporter", sbuildin, 1) +plugin_def("export_lpr", "lpr exporter (printer)", sbuildin, 1) +plugin_def("export_ps", "postscript exporter", sbuildin, 1) +plugin_def("export_test", "dummy test exporter", sdisable, 1) plugin_header("\nIO plugins (file formats):\n") -plugin_def("io_lihata", "lihata board format", sbuildin) -plugin_def("io_pcb", "the original pcb format", sbuildin) -plugin_def("io_kicad_legacy", "Kicad's legacy format ", sdisable) +plugin_def("io_lihata", "lihata board format", sbuildin, 1) +plugin_def("io_pcb", "the original pcb format", sbuildin, 1) +plugin_def("io_kicad_legacy", "Kicad's legacy format ", sdisable, 1) plugin_header("\nHID plugins:\n") -plugin_def("hid_batch", "batch process (no-gui HID)",sbuildin) -plugin_def("hid_gtk", "the GTK gui", sbuildin) -plugin_def("hid_lesstif", "the lesstif gui", sbuildin) +plugin_def("hid_batch", "batch process (no-gui HID)",sbuildin, 1) +plugin_def("hid_gtk", "the GTK gui", sbuildin, 1) +plugin_def("hid_lesstif", "the lesstif gui", sbuildin, 1) plugin_dep("export_lpr", "export_ps")