From 606013daef68852f81544b7eb8740148b97fae22 Mon Sep 17 00:00:00 2001 From: Kolan Sh Date: Tue, 21 Jun 2016 13:32:05 +0300 Subject: [PATCH] In progress... --- cmake/backbone | 2 +- src/AppDirs.vala | 10 ++++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/cmake/backbone b/cmake/backbone index e94a91b..deb9c6e 160000 --- a/cmake/backbone +++ b/cmake/backbone @@ -1 +1 @@ -Subproject commit e94a91ba7e5e1ef21b2040e1cacb957100d435be +Subproject commit deb9c6e11116c458a39f0bab475c5ea7170a9043 diff --git a/src/AppDirs.vala b/src/AppDirs.vala index 1444ea5..3d9fb47 100644 --- a/src/AppDirs.vala +++ b/src/AppDirs.vala @@ -1,4 +1,4 @@ -extern static char SO_PATH[256]; +extern void get_library_path (string so_path, void *addr); namespace LAview.Core.Plugins { @@ -11,13 +11,15 @@ namespace LAview.Core.Plugins { public static string settings_dir; public static void init () { - so_path = File.new_for_path ((string)SO_PATH); + char _so_path[256]; + get_library_path ((string)_so_path, (void*)init); + so_path = File.new_for_path ((string)_so_path); exec_dir = so_path.get_parent (); common_dir = exec_dir.get_parent (); + common_dir = common_dir.get_parent().get_parent().get_parent(); ui_dir = Path.build_path (Path.DIR_SEPARATOR_S, common_dir.get_path(), "share/laview-plugin-object-example-"+Config.VERSION_MAJOR.to_string()+"/ui"); - stdout.printf ("so_path=%s\nexec_dir=%s\ncommon_dir=%s\nui_dir=%s\nsettings_dir=%s\n", - so_path.get_path(), exec_dir.get_path(), common_dir.get_path(), ui_dir, settings_dir); + stdout.printf ("Vala:so_path=%s\n", so_path.get_path()); settings_dir = Path.build_path (Path.DIR_SEPARATOR_S, common_dir.get_path(), "share/glib-2.0/schemas"); stdout.printf ("ui_dir = %s\n", ui_dir); stdout.printf ("settings_dir = %s\n", settings_dir);