1
0
Fork 0

In progress...

This commit is contained in:
Kolan Sh 2016-06-21 13:32:05 +03:00
parent bb34601eb8
commit 606013daef
2 changed files with 7 additions and 5 deletions

@ -1 +1 @@
Subproject commit e94a91ba7e5e1ef21b2040e1cacb957100d435be
Subproject commit deb9c6e11116c458a39f0bab475c5ea7170a9043

View File

@ -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);