AppImageKit-checkrt/AppRun.c.patch

20 lines
1.3 KiB
Diff
Raw Normal View History

2017-04-26 13:27:46 +00:00
--- a/AppRun.c
+++ b/AppRun.c
2017-06-21 13:33:43 +00:00
@@ -156,6 +156,7 @@
2017-04-26 13:27:46 +00:00
char *old_env;
2017-05-11 21:21:41 +00:00
const int length = 2047;
char new_env[8][length+1];
2017-06-21 13:33:43 +00:00
+ checkrt(usr_in_appdir);
2017-04-26 13:27:46 +00:00
/* https://docs.python.org/2/using/cmdline.html#envvar-PYTHONHOME */
2017-05-11 21:21:41 +00:00
snprintf(new_env[0], length, "PYTHONHOME=%s/usr/", appdir);
2017-06-21 13:33:43 +00:00
@@ -164,7 +165,7 @@
2017-05-11 21:21:41 +00:00
snprintf(new_env[1], length, "PATH=%s/usr/bin/:%s/usr/sbin/:%s/usr/games/:%s/bin/:%s/sbin/:%s", appdir, appdir, appdir, appdir, appdir, old_env);
2017-04-26 13:27:46 +00:00
old_env = getenv("LD_LIBRARY_PATH") ?: "";
2017-05-11 21:21:41 +00:00
- snprintf(new_env[2], length, "LD_LIBRARY_PATH=%s/usr/lib/:%s/usr/lib/i386-linux-gnu/:%s/usr/lib/x86_64-linux-gnu/:%s/usr/lib32/:%s/usr/lib64/:%s/lib/:%s/lib/i386-linux-gnu/:%s/lib/x86_64-linux-gnu/:%s/lib32/:%s/lib64/:%s", appdir, appdir, appdir, appdir, appdir, appdir, appdir, appdir, appdir, appdir, old_env);
+ snprintf(new_env[2], length, "LD_LIBRARY_PATH=%s%s/usr/lib/:%s/usr/lib/i386-linux-gnu/:%s/usr/lib/x86_64-linux-gnu/:%s/usr/lib32/:%s/usr/lib64/:%s/lib/:%s/lib/i386-linux-gnu/:%s/lib/x86_64-linux-gnu/:%s/lib32/:%s/lib64/:%s", optional, appdir, appdir, appdir, appdir, appdir, appdir, appdir, appdir, appdir, appdir, old_env);
2017-04-26 13:27:46 +00:00
old_env = getenv("PYTHONPATH") ?: "";
2017-05-11 21:21:41 +00:00
snprintf(new_env[3], length, "PYTHONPATH=%s/usr/share/pyshared/:%s", appdir, old_env);