From d4e56754210c2b449c3d7a8dc3eb9886d89ff593 Mon Sep 17 00:00:00 2001 From: Simon Howard Date: Thu, 10 Mar 2011 19:47:14 +0000 Subject: Include Unix manpages in MacOS package, and set MANPATH to point to them when opening a terminal window. Subversion-branch: /trunk/chocolate-doom Subversion-revision: 2302 --- pkg/osx/Execute.m | 2 ++ 1 file changed, 2 insertions(+) (limited to 'pkg/osx/Execute.m') diff --git a/pkg/osx/Execute.m b/pkg/osx/Execute.m index 608443e2..25f5e67d 100644 --- a/pkg/osx/Execute.m +++ b/pkg/osx/Execute.m @@ -175,6 +175,8 @@ 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); + fprintf(stream, "export MANPATH\n"); fprintf(stream, "DOOMWADPATH=\"%s\"\n", doomwadpath); fprintf(stream, "export DOOMWADPATH\n"); fprintf(stream, "rm -f \"%s\"\n", TEMP_SCRIPT); -- cgit v1.2.3 From b79f27cef85cc975b45ada246ace30b648466483 Mon Sep 17 00:00:00 2001 From: Simon Howard Date: Wed, 30 Mar 2011 19:16:40 +0000 Subject: 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 --- pkg/osx/Execute.m | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'pkg/osx/Execute.m') 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); -- cgit v1.2.3 From 1fd0ad08ed4840e681e902bc1b9420a1d41619b4 Mon Sep 17 00:00:00 2001 From: Simon Howard Date: Sat, 7 May 2011 23:52:26 +0000 Subject: Rework OS X launcher package. Include documentation files within the application bundle and add a help menu with links. Rework .dmg generation to generate a file with a "fancy" background image and overall nicer appearance. Subversion-branch: /trunk/chocolate-doom Subversion-revision: 2332 --- pkg/osx/Execute.m | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'pkg/osx/Execute.m') diff --git a/pkg/osx/Execute.m b/pkg/osx/Execute.m index ffeddadd..0dcfbb7c 100644 --- a/pkg/osx/Execute.m +++ b/pkg/osx/Execute.m @@ -219,3 +219,13 @@ void OpenTerminalWindow(const char *doomwadpath) withApplication: @"Terminal"]; } +void OpenDocumentation(const char *filename) +{ + NSString *path; + + path = [NSString stringWithFormat: @"%s/Documentation/%s", + executable_path, filename]; + + [[NSWorkspace sharedWorkspace] openFile: path]; +} + -- cgit v1.2.3