Commit 1f1babb
Update search paths
Changed files (3)
Diff
@@ -1,5 +1,5 @@ /*- Copyright (C) 2012s 2013 2014 Johan Mattsson+ Copyright (C) 2012 2013 2014 Johan Mattsson This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by@@ -36,63 +36,80 @@ public class SearchPaths { string bundle_path = (BirdFont.bundle_path != null) ? (!) BirdFont.bundle_path : ""; resources = (is_null (resources_folder)) ? "" : resources_folder; ++ string? current_program = GLib.FileUtils.read_link ("/proc/self/exe"); ++ if (current_program != null) {+ string program = (!) current_program;+ int separator = program.last_index_of ("/");+ + if (separator > -1) {+ string folder = program.substring (0, separator);+ + f = get_file (folder + "/../" + d + "/", name);+ if (f.query_exists ()) return f; ++ f = get_file (folder + "/../", name);+ if (f.query_exists ()) return f; + }+ } f = get_file (resources + "/" + d + "/", name);- if (likely (f.query_exists ())) return f;+ if (f.query_exists ()) return f; f = get_file (resources + "/", name);- if (likely (f.query_exists ())) return f;+ if (f.query_exists ()) return f; f = get_file ("resources/", name);- if (likely (f.query_exists ())) return f;+ if (f.query_exists ()) return f; f = get_file (resources + "/", name + "/");- if (likely (f.query_exists ())) return f;+ if (f.query_exists ()) return f; f = get_file (BirdFont.exec_path + "/" + d + "/", name);- if (likely (f.query_exists ())) return f;+ if (f.query_exists ()) return f; f = get_file (BirdFont.exec_path + "/", name + "/");- if (likely (f.query_exists ())) return f;+ if (f.query_exists ()) return f; f = get_file (BirdFont.exec_path + "\\" + d + "\\", name);- if (likely (f.query_exists ())) return f;+ if (f.query_exists ()) return f; f = get_file (BirdFont.exec_path + "\\", name + "\\");- if (likely (f.query_exists ())) return f;+ if (f.query_exists ()) return f; f = get_file (bundle_path + "/Contents/Resources/birdfont_resources/", d + "/" + name);- if (likely (f.query_exists ())) return f;+ if (f.query_exists ()) return f; f = get_file (bundle_path + "/Contents/Resources/birdfont_resources/", name + "/");- if (likely (f.query_exists ())) return f;+ if (f.query_exists ()) return f; f = get_file ("./" + d + "/", name);- if (likely (f.query_exists ())) return f; + if (f.query_exists ()) return f; f = get_file ("../" + d + "/", name);- if (likely (f.query_exists ())) return f;+ if (f.query_exists ()) return f; f = get_file (".\\" + d + "\\", name);- if (likely (f.query_exists ())) return f;+ if (f.query_exists ()) return f; f = get_file ("", name);- if (likely (f.query_exists ())) return f;+ if (f.query_exists ()) return f; f = get_file (d + "\\", name);- if (likely (f.query_exists ())) return f;+ if (f.query_exists ()) return f; f = get_file (@"$PREFIX/share/birdfont/" + d + "/", name);- if (likely (f.query_exists ())) return f;+ if (f.query_exists ()) return f; f = get_file (@"/usr/local/share/birdfont/" + d + "/", name);- if (likely (f.query_exists ())) return f;+ if (f.query_exists ()) return f; f = get_file (@"resources/linux/", name);- if (likely (f.query_exists ())) return f;+ if (f.query_exists ()) return f; f = get_file (@"/usr/share/birdfont/" + d + "/", name);- if (likely (f.query_exists ())) return f;+ if (f.query_exists ()) return f; return f; }@@ -13,7 +13,7 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. """ -VERSION = '2.28.0'+VERSION = '2.29.0' SO_VERSION_MAJOR = '36' SO_VERSION_MINOR = '0' SO_VERSION = SO_VERSION_MAJOR + '.' + SO_VERSION_MINOR