#define AUL_K_LOADER_EXTRA "__AUL_LOADER_EXTRA__"
#define AUL_K_WAYLAND_DISPLAY "__AUL_WAYLAND_DISPLAY__"
#define AUL_K_WAYLAND_WORKING_DIR "__AUL_WAYLAND_WORKING_DIR__"
+#define AUL_K_ROOT_PATH "__AUL_ROOT_PATH__"
#ifdef __cplusplus
}
ptr = bundle_get_val(kb, AUL_K_INTERNAL_POOL);
if (ptr)
menu_info->internal_pool = strdup(ptr);
+ ptr = bundle_get_val(kb, AUL_K_ROOT_PATH);
+ if (ptr)
+ menu_info->root_path = strdup(ptr);
if (!_appinfo_get_app_path(menu_info)) {
_appinfo_free(menu_info);
free(menu_info->comp_type);
if (menu_info->internal_pool != NULL)
free(menu_info->internal_pool);
+ if (menu_info->root_path != NULL)
+ free(menu_info->root_path);
free(menu_info);
}
static bundle *__bundle;
static char *__appid;
static char *__pkgid;
+static char *__root_path;
static int __loader_type = LAUNCHPAD_TYPE_UNSUPPORTED;
static int __loader_id;
bundle_free(__bundle);
}
-static void __release_appid_at_exit(void)
+static void __release_at_exit(void)
{
if (__appid != NULL)
free(__appid);
if (__pkgid != NULL)
free(__pkgid);
+
+ if (__root_path != NULL)
+ free(__root_path);
}
static int __set_access(const char* appId, const char* pkg_type,
__bundle = kb;
atexit(__at_exit_to_release_bundle);
+ atexit(__release_at_exit);
menu_info = _appinfo_create(kb);
if (menu_info == NULL) {
exit(-1);
}
aul_set_preinit_pkgid(__pkgid);
- atexit(__release_appid_at_exit);
+
+ __root_path = strdup(menu_info->root_path);
+ if (__root_path == NULL) {
+ _E("Out of memory");
+ exit(-1);
+ }
+ aul_set_preinit_root_path(__root_path);
tmp_argv = _create_argc_argv(kb, &tmp_argc);