Index: trunk/doc/TODO =================================================================== --- trunk/doc/TODO (revision 34718) +++ trunk/doc/TODO (revision 34719) @@ -11,7 +11,6 @@ - apply librnd core patch TODO.hid_dad_tree - make sure all callers strdup() all cells - user implemented ->user_free_cb() should never free cell values, the lib does that - - hidlib_init1() should rnd_conf_set() "rc/path/exec_prefix" at the end so the host app doesn't need to - BUG: camv-rnd old dep workaround: remove trunk/src/Makefile.in TODO#GENHT part and test with system installed fungw+genht and camv-rnd - cleanup: rnd_pref_tab_hook_s calls need hidlib arg: open_cb, board_changed_cb, meta_changed_cb - feature: rnd_pref_tab_hook_s ->open should deliver extra action arguments because some tabs may have optional args to specify how exactly it should be open Index: trunk/src/librnd/hid/hid_init.c =================================================================== --- trunk/src/librnd/hid/hid_init.c (revision 34718) +++ trunk/src/librnd/hid/hid_init.c (revision 34719) @@ -606,7 +606,7 @@ extern void rnd_menu_init1(void); -void rnd_hidlib_init1(void (*conf_core_init)(void)) +void rnd_hidlib_init1(void (*conf_core_init)(void), const char *exec_prefix) { rnd_events_init(); rnd_file_loaded_init(); @@ -620,6 +620,9 @@ rnd_grid_init(); rnd_color_init(); rnd_menu_init1(); + + if (exec_prefix != NULL) + rnd_conf_set(RND_CFR_INTERNAL, "rc/path/exec_prefix", -1, exec_prefix, RND_POL_OVERWRITE); } static vts0_t hidlib_conffile; Index: trunk/src/librnd/hid/hid_init.h =================================================================== --- trunk/src/librnd/hid/hid_init.h (revision 34718) +++ trunk/src/librnd/hid/hid_init.h (revision 34719) @@ -138,7 +138,7 @@ */ char *rnd_exec_prefix(char *argv0, const char *bin_dir, const char *bin_dir_to_execprefix); -void rnd_hidlib_init1(void (*conf_core_init)(void)); /* before CLI argument parsing; conf_core_init should conf_reg() at least the hidlib related nodes */ +void rnd_hidlib_init1(void (*conf_core_init)(void), const char *exec_prefix); /* before CLI argument parsing; conf_core_init should conf_reg() at least the hidlib related nodes */ void rnd_hidlib_init2(const pup_buildin_t *buildins, const pup_buildin_t *local_buildins); /* after CLI argument parsing */ void rnd_hidlib_init3_auto(void); void rnd_hidlib_uninit(void); Index: trunk/src/test-rnd.c =================================================================== --- trunk/src/test-rnd.c (revision 34718) +++ trunk/src/test-rnd.c (revision 34719) @@ -173,7 +173,7 @@ rnd_main_args_init(&ga, argc, foobar_action_args); - rnd_hidlib_init1(conf_core_init); + rnd_hidlib_init1(conf_core_init, NULL); /* foobar_event_init_app(); - creates all the events */ for(n = 1; n < argc; n++) Index: trunk/tests/librnd/librnd_test.c =================================================================== --- trunk/tests/librnd/librnd_test.c (revision 34718) +++ trunk/tests/librnd/librnd_test.c (revision 34719) @@ -38,7 +38,7 @@ rnd_main_args_init(&ga, argc, action_args); - rnd_hidlib_init1(conf_core_init); + rnd_hidlib_init1(conf_core_init, NULL); for(n = 1; n < argc; n++) n += rnd_main_args_add(&ga, argv[n], argv[n+1]);