aboutsummaryrefslogtreecommitdiff
path: root/packages
diff options
context:
space:
mode:
authorHans-Christoph Steiner <eighthave@users.sourceforge.net>2009-04-09 01:41:08 +0000
committerHans-Christoph Steiner <eighthave@users.sourceforge.net>2009-04-09 01:41:08 +0000
commit4741de23fa6f063e57e8796098ab9159b091ba59 (patch)
tree2ec9558e5cbef5b47f83f57dd3769bcd9ead1858 /packages
parent0632a4b5edeba9edb2419bc18b692a6dd0e79a82 (diff)
checked into Pd-extended branch:
http://pure-data.svn.sourceforge.net/viewvc/pure-data?view=rev&revision=10991 and added to the patch tracker for Miller: https://sourceforge.net/tracker/?func=detail&aid=2746054&group_id=55736&atid=478072 svn path=/trunk/; revision=10992
Diffstat (limited to 'packages')
-rw-r--r--packages/patches/hard-code_default_user-install_paths-0.42.4.patch51
1 files changed, 51 insertions, 0 deletions
diff --git a/packages/patches/hard-code_default_user-install_paths-0.42.4.patch b/packages/patches/hard-code_default_user-install_paths-0.42.4.patch
new file mode 100644
index 00000000..c9abc046
--- /dev/null
+++ b/packages/patches/hard-code_default_user-install_paths-0.42.4.patch
@@ -0,0 +1,51 @@
+--- branches/pd-extended/0.41/pd/src/s_path.c 2009/04/09 01:04:16 10990
++++ branches/pd-extended/0.41/pd/src/s_path.c 2009/04/09 01:29:24 10991
+@@ -229,8 +229,29 @@
+
+ void sys_setextrapath(const char *p)
+ {
++ char pathbuf[FILENAME_MAX];
+ namelist_free(pd_extrapath);
+- pd_extrapath = namelist_append(0, p, 0);
++ /* add standard place for users to install stuff first */
++#ifdef __gnu_linux__
++ sys_expandpath("~/pd-externals", pathbuf);
++ pd_extrapath = namelist_append(0, pathbuf, 0);
++ pd_extrapath = namelist_append(pd_extrapath, "/usr/local/lib/pd-externals", 0);
++#endif
++
++#ifdef __APPLE__
++ sys_expandpath("~/Library/Pd", pathbuf);
++ pd_extrapath = namelist_append(0, pathbuf, 0);
++ pd_extrapath = namelist_append(pd_extrapath, "/Library/Pd", 0);
++#endif
++
++#ifdef _WIN32
++ sys_expandpath("%ProgramFiles%/Common Files/Pd", pathbuf);
++ pd_extrapath = namelist_append(0, pathbuf, 0);
++ sys_expandpath("%UserProfile%/Application Data/Pd", pathbuf);
++ pd_extrapath = namelist_append(pd_extrapath, pathbuf, 0);
++#endif
++ /* add built-in "extra" path last so its checked last */
++ pd_extrapath = namelist_append(pd_extrapath, p, 0);
+ }
+
+ #ifdef MSW
+@@ -357,11 +378,12 @@
+ dirresult, nameresult, size, bin)) >= 0)
+ return (fd);
+
+- /* next look in "extra" */
+- if (sys_usestdpath &&
+- (fd = sys_trytoopenone(pd_extrapath->nl_string, name, ext,
+- dirresult, nameresult, size, bin)) >= 0)
+- return (fd);
++ /* next look in built-in paths like "extra" */
++ if (sys_usestdpath)
++ for (nl = pd_extrapath; nl; nl = nl->nl_next)
++ if ((fd = sys_trytoopenone(nl->nl_string, name, ext,
++ dirresult, nameresult, size, bin)) >= 0)
++ return (fd);
+
+ *dirresult = 0;
+ *nameresult = dirresult;