[gimp] gimp: macOS run from build directory
- From: Jehan <jehanp src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] gimp: macOS run from build directory
- Date: Wed, 22 Dec 2021 12:04:15 +0000 (UTC)
commit d8afa6c8293da2b7b863bd7848893f913fd6b966
Author: Lukas Oberhuber <lukaso gmail com>
Date: Wed Dec 22 01:33:04 2021 +0000
gimp: macOS run from build directory
This change allows gimp to run from the build
directory rather than having to wait for the
full packaging process to complete.
However, 'gi' modules are not loading properly
so that might be something to fix.
app/main.c | 20 ++++++++++++++++++--
1 file changed, 18 insertions(+), 2 deletions(-)
---
diff --git a/app/main.c b/app/main.c
index 65d719c786..42db59aac2 100644
--- a/app/main.c
+++ b/app/main.c
@@ -345,8 +345,24 @@ gimp_macos_setenv (const char * progname)
}
else
{
- g_free (res_dir);
- return;
+ tmp = g_strdup_printf ("%s/../share", app_dir);
+ res_dir = g_canonicalize_filename (tmp, NULL);
+ g_free(tmp);
+ if (res_dir && !stat (res_dir, &sb) && S_ISDIR (sb.st_mode))
+ {
+ g_free (res_dir);
+
+ g_print ("GIMP is started in the build directory\n");
+
+ tmp = g_strdup_printf ("%s/..", app_dir); /* running in build dir */
+ res_dir = g_canonicalize_filename (tmp, NULL);
+ g_free(tmp);
+ }
+ else
+ {
+ g_free (res_dir);
+ return;
+ }
}
path_len = strlen (g_getenv ("PATH") ? g_getenv ("PATH") : "") + strlen (app_dir) + 2;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]