Clone in a terminal:
Commit 1f1babb
Johan Mattsson - 2020-05-05T18:16:04+00:00
1f1babb58ebc21604394ad992e09ba6d646dd27ejohan.mattsson.m@gmail.com

Update search paths

Changed files (3)

Diff

diff --git a/birdfont/GtkWindow.vala b/birdfont/GtkWindow.valaindex 31437bb..1235ffd 100644--- a/birdfont/GtkWindow.vala+++ b/birdfont/GtkWindow.vala@@ -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 bydiff --git a/libbirdfont/SearchPaths.vala b/libbirdfont/SearchPaths.valaindex e23deff..65cb764 100644--- a/libbirdfont/SearchPaths.vala+++ b/libbirdfont/SearchPaths.vala@@ -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;		 	}diff --git a/scripts/version.py b/scripts/version.pyindex 1479f2c..f472f85 100644--- a/scripts/version.py+++ b/scripts/version.py@@ -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

Contact

Email: johan.mattsson.m@gmail.com
Mastodon: typo.social/@birdfont
GitHub: johanmattssonm
LinkedIn: johan-mattsson-2ab324112