diff options
author | Simon Howard | 2011-03-30 19:16:40 +0000 |
---|---|---|
committer | Simon Howard | 2011-03-30 19:16:40 +0000 |
commit | b79f27cef85cc975b45ada246ace30b648466483 (patch) | |
tree | 94a4eecdd2da502e68367ba07fdf440f62f90ee8 /pkg | |
parent | 72b17f7b82b70cac0a12283b0b26b01e634c3728 (diff) | |
download | chocolate-doom-b79f27cef85cc975b45ada246ace30b648466483.tar.gz chocolate-doom-b79f27cef85cc975b45ada246ace30b648466483.tar.bz2 chocolate-doom-b79f27cef85cc975b45ada246ace30b648466483.zip |
Add a symlink hack to work around the fact that OS X doesn't like paths
in MANPATH to contain spaces.
Subversion-branch: /trunk/chocolate-doom
Subversion-revision: 2318
Diffstat (limited to 'pkg')
-rw-r--r-- | pkg/osx/Execute.m | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/pkg/osx/Execute.m b/pkg/osx/Execute.m index 25f5e67d..ffeddadd 100644 --- a/pkg/osx/Execute.m +++ b/pkg/osx/Execute.m @@ -175,8 +175,19 @@ void OpenTerminalWindow(const char *doomwadpath) fprintf(stream, "#!/bin/sh\n"); //fprintf(stream, "set -x\n"); fprintf(stream, "PATH=\"%s:$PATH\"\n", executable_path); - fprintf(stream, "MANPATH=\"%s/man:$(manpath)\"\n", executable_path); + + // MANPATH is set to point to the directory within the bundle that + // contains the Unix manpages. However, the bundle name or path to + // it can contain a space, and OS X doesn't like this! As a + // workaround, create a symlink in /tmp to point to the real directory, + // and put *this* in MANPATH. + + fprintf(stream, "rm -f \"/tmp/%s.man\"\n", PACKAGE_TARNAME); + fprintf(stream, "ln -s \"%s/man\" \"/tmp/%s.man\"\n", + executable_path, PACKAGE_TARNAME); + fprintf(stream, "MANPATH=\"/tmp/%s.man:$(manpath)\"\n", PACKAGE_TARNAME); fprintf(stream, "export MANPATH\n"); + fprintf(stream, "DOOMWADPATH=\"%s\"\n", doomwadpath); fprintf(stream, "export DOOMWADPATH\n"); fprintf(stream, "rm -f \"%s\"\n", TEMP_SCRIPT); |