MacOS: Adapt Readme and initialization for bundle - pspp.git - GNU PSPP

index : pspp.git
GNU PSPP
summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorFriedrich Beckmann <friedrich.beckmann@gmx.de>2025年05月30日 13:51:29 +0200
committerFriedrich Beckmann <friedrich.beckmann@gmx.de>2025年05月30日 13:51:29 +0200
commit5c3e4c635bfc96f5b781a8acdb1c715a93cbee23 (patch)
treefa4bd84d005744b8fec717916c04c883de1fbc45 /src
parent82fb509fb2fedd33e7ac0c46ca99e108bb3bdffb (diff)
downloadpspp-5c3e4c635bfc96f5b781a8acdb1c715a93cbee23.tar.gz
MacOS: Adapt Readme and initialization for bundle
I changed the way the bundle is build to allow codesigning. The binary is moved to Content/MacOS and therefore the location of the resources like icons is changed with respect to the binary location.
Diffstat (limited to 'src')
-rw-r--r--src/ui/gui/pre-initialisation.h 7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/ui/gui/pre-initialisation.h b/src/ui/gui/pre-initialisation.h
index de5014147..3f0cfc8da 100644
--- a/src/ui/gui/pre-initialisation.h
+++ b/src/ui/gui/pre-initialisation.h
@@ -27,6 +27,7 @@ pre_initialisation (int *argc, char **argv)
#include <sys/stat.h>
#include <glib.h>
+#include "gl/relocatable.h"
static inline void
pre_initialisation (int *argc, char **argv)
@@ -67,7 +68,7 @@ pre_initialisation (int *argc, char **argv)
struct stat sb;
app_dir = g_path_get_dirname (resolved_path);
- g_snprintf (tmp, sizeof(tmp), "%s/../../Resources", app_dir);
+ g_snprintf (tmp, sizeof(tmp), "%s/../Resources", app_dir);
if (realpath (tmp, res_dir) && !stat (res_dir,&sb) && S_ISDIR (sb.st_mode))
g_print ("pspp is started as MacOS application\n");
else
@@ -93,10 +94,12 @@ pre_initialisation (int *argc, char **argv)
g_snprintf (tmp, sizeof(tmp), "%s/share", res_dir);
g_setenv ("XDG_DATA_DIRS", tmp, TRUE);
+ set_relocation_prefix(INSTALLPREFIX,res_dir);
+
if (g_getenv ("HOME")!=NULL)
{
g_snprintf (tmp, sizeof(tmp),
- "%s/Library/Application Support/pspp/1.3/cache",
+ "%s/Library/Application Support/pspp/cache",
g_getenv("HOME"));
g_setenv ("XDG_CACHE_HOME", tmp, TRUE);
}
generated by cgit v1.2.3 (git 2.39.1) at 2025年10月04日 16:39:44 +0000

AltStyle によって変換されたページ (->オリジナル) /