summaryrefslogtreecommitdiff
path: root/pkg
diff options
context:
space:
mode:
authorSimon Howard2010-01-15 18:13:05 +0000
committerSimon Howard2010-01-15 18:13:05 +0000
commitf176ac404ad709e6c1254f8685f8d9fe7b995115 (patch)
treef5f06371e67c1b141ee9ffb2c2f6e13bbcfc6a72 /pkg
parentdf6a794052bc5c5f28ca15eca7d924ae29002d85 (diff)
downloadchocolate-doom-f176ac404ad709e6c1254f8685f8d9fe7b995115.tar.gz
chocolate-doom-f176ac404ad709e6c1254f8685f8d9fe7b995115.tar.bz2
chocolate-doom-f176ac404ad709e6c1254f8685f8d9fe7b995115.zip
Extend osx makefile to allow building of a working GNUstep application,
for testing purposes. Add GNUstep version of Info.plist, remove app-skeleton directory and move contents up. Subversion-branch: /trunk/chocolate-doom Subversion-revision: 1813
Diffstat (limited to 'pkg')
-rw-r--r--pkg/Makefile.am17
-rw-r--r--pkg/osx/GNUmakefile37
-rw-r--r--pkg/osx/Info-GNUstep.plist.in31
-rw-r--r--pkg/osx/PkgInfo (renamed from pkg/osx/app-skeleton/Contents/PkgInfo)0
-rw-r--r--pkg/osx/Resources/128x128.png (renamed from pkg/osx/app-skeleton/Contents/Resources/128x128.png)bin23029 -> 23029 bytes
-rw-r--r--pkg/osx/Resources/app.icns (renamed from pkg/osx/app-skeleton/Contents/Resources/app.icns)bin51625 -> 51625 bytes
-rw-r--r--pkg/osx/Resources/app.pngbin0 -> 4597 bytes
-rw-r--r--pkg/osx/Resources/launcher.nib/classes.nib (renamed from pkg/osx/app-skeleton/Contents/Resources/launcher.nib/classes.nib)0
-rw-r--r--pkg/osx/Resources/launcher.nib/info.nib (renamed from pkg/osx/app-skeleton/Contents/Resources/launcher.nib/info.nib)0
-rw-r--r--pkg/osx/Resources/launcher.nib/keyedobjects.nib (renamed from pkg/osx/app-skeleton/Contents/Resources/launcher.nib/keyedobjects.nib)bin17541 -> 17541 bytes
-rw-r--r--pkg/osx/Resources/wadfile.icns (renamed from pkg/osx/app-skeleton/Contents/Resources/wadfile.icns)bin44092 -> 44092 bytes
11 files changed, 70 insertions, 15 deletions
diff --git a/pkg/Makefile.am b/pkg/Makefile.am
index b898e728..6a3b38ff 100644
--- a/pkg/Makefile.am
+++ b/pkg/Makefile.am
@@ -1,14 +1,15 @@
OSX_FILES= \
-osx/app-skeleton/Contents/PkgInfo \
-osx/app-skeleton/Contents/Resources/128x128.png \
-osx/app-skeleton/Contents/Resources/app.icns \
-osx/app-skeleton/Contents/Resources/wadfile.icns \
-osx/app-skeleton/Contents/Resources/launcher.nib/classes.nib \
-osx/app-skeleton/Contents/Resources/launcher.nib/info.nib \
-osx/app-skeleton/Contents/Resources/launcher.nib/keyedobjects.nib \
+osx/Resources/128x128.png \
+osx/Resources/app.icns \
+osx/Resources/app.png \
+osx/Resources/wadfile.icns \
+osx/Resources/launcher.nib/classes.nib \
+osx/Resources/launcher.nib/info.nib \
+osx/Resources/launcher.nib/keyedobjects.nib \
osx/GNUmakefile \
-osx/Info.plist.in \
+osx/Info.plist.in osx/Info-GNUstep.plist.in \
+osx/PkgInfo \
osx/cp-with-libs \
osx/main.m \
osx/AppController.m osx/AppController.h \
diff --git a/pkg/osx/GNUmakefile b/pkg/osx/GNUmakefile
index de2c535a..d1894bef 100644
--- a/pkg/osx/GNUmakefile
+++ b/pkg/osx/GNUmakefile
@@ -1,4 +1,9 @@
+# Makefile for building the OS X launcher program and DMG package.
+# It is also possible to build and run the launcher under Unix
+# systems using GNUstep, although this is only here for development
+# and debugging purposes.
+
include ../config.make
STAGING_DIR=staging
@@ -20,17 +25,37 @@ endif
# Staging dir build for package:
APP_DIR=$(STAGING_DIR)/$(PACKAGE_NAME).app
-APP_BIN_DIR=$(APP_DIR)/Contents/MacOS/
+
+# OS X and GNUstep apps have a slightly different internal structure:
+# OS X apps have their files within a containing "Contents" directory
+# that does not exist in GNUstep apps. Similarly, the binaries are
+# installed at the top level, rather than in a "MacOS" directory.
+# Finally, we must install a different Info.plist file.
+
+ifdef GNUSTEP_MAKEFILES
+APP_TOP_DIR=$(APP_DIR)
+APP_BIN_DIR=$(APP_DIR)
+SRC_INFO_PLIST=Info-GNUstep.plist
+else
+APP_TOP_DIR=$(APP_DIR)/Contents
+APP_BIN_DIR=$(APP_DIR)/Contents/MacOS
+SRC_INFO_PLIST=Info.plist
+endif
$(STAGING_DIR): launcher $(TOPLEVEL_DOCS)
rm -rf $(STAGING_DIR)
mkdir $(STAGING_DIR)
- cp -R app-skeleton "$(APP_DIR)"
- mkdir "$(APP_BIN_DIR)"
- cp Info.plist "$(APP_DIR)/Contents/"
+ cp $(TOPLEVEL_DOCS) "$(STAGING_DIR)"
+
+ mkdir -p "$(APP_TOP_DIR)"
+ cp -R Resources "$(APP_TOP_DIR)"
+ cp PkgInfo "$(APP_TOP_DIR)"
+ cp $(SRC_INFO_PLIST) "$(APP_TOP_DIR)/Info.plist"
+
+ mkdir -p "$(APP_BIN_DIR)"
- cp launcher "$(APP_BIN_DIR)/"
+ cp launcher "$(APP_BIN_DIR)"
$(STRIP) "$(APP_BIN_DIR)/launcher"
./cp-with-libs $(TOPLEVEL)/src/$(PACKAGE_TARNAME) "$(APP_BIN_DIR)"
@@ -38,8 +63,6 @@ $(STAGING_DIR): launcher $(TOPLEVEL_DOCS)
./cp-with-libs $(TOPLEVEL)/setup/chocolate-setup "$(APP_BIN_DIR)"
$(STRIP) "$(APP_BIN_DIR)/chocolate-setup"
- cp $(TOPLEVEL_DOCS) "$(STAGING_DIR)"
-
find $(STAGING_DIR) -name .svn -delete -exec rm -rf {} \; || true
clean : launcher_clean
diff --git a/pkg/osx/Info-GNUstep.plist.in b/pkg/osx/Info-GNUstep.plist.in
new file mode 100644
index 00000000..ac6511e2
--- /dev/null
+++ b/pkg/osx/Info-GNUstep.plist.in
@@ -0,0 +1,31 @@
+{
+ ApplicationDescription = "@PACKAGE_NAME@";
+ ApplicationIcon = app.png;
+ ApplicationName = "@PACKAGE_NAME@";
+ ApplicationRelease = @PACKAGE_VERSION@;
+ Copyright = "Copyright (C) 2009-2010";
+ CopyrightDescription = "GNU General Public License, version 2";
+ FullVersionID = @PACKAGE_VERSION@;
+ GSMainMarkupFile = "";
+ NSExecutable = "launcher";
+ NSIcon = app.png;
+ NSMainNibFile = launcher.nib;
+ NSPrincipalClass = NSApplication;
+ NSRole = Application;
+ NSTypes = (
+ {
+ NSHumanReadableName = "Doom WAD file";
+ NSUnixExtensions = ( wad );
+ NSRole = Viewer;
+ NSMimeTypes = (
+ "application/x-doom"
+ );
+ },
+ {
+ NSHumanReadableName = "Dehacked patch";
+ NSUnixExtensions = ( deh );
+ NSRole = Viewer;
+ NSIcon = "wadfile.png";
+ }
+ );
+}
diff --git a/pkg/osx/app-skeleton/Contents/PkgInfo b/pkg/osx/PkgInfo
index 6f749b0f..6f749b0f 100644
--- a/pkg/osx/app-skeleton/Contents/PkgInfo
+++ b/pkg/osx/PkgInfo
diff --git a/pkg/osx/app-skeleton/Contents/Resources/128x128.png b/pkg/osx/Resources/128x128.png
index 0ef1fe9c..0ef1fe9c 100644
--- a/pkg/osx/app-skeleton/Contents/Resources/128x128.png
+++ b/pkg/osx/Resources/128x128.png
Binary files differ
diff --git a/pkg/osx/app-skeleton/Contents/Resources/app.icns b/pkg/osx/Resources/app.icns
index 9b535a25..9b535a25 100644
--- a/pkg/osx/app-skeleton/Contents/Resources/app.icns
+++ b/pkg/osx/Resources/app.icns
Binary files differ
diff --git a/pkg/osx/Resources/app.png b/pkg/osx/Resources/app.png
new file mode 100644
index 00000000..5b932e8c
--- /dev/null
+++ b/pkg/osx/Resources/app.png
Binary files differ
diff --git a/pkg/osx/app-skeleton/Contents/Resources/launcher.nib/classes.nib b/pkg/osx/Resources/launcher.nib/classes.nib
index 3ff47e71..3ff47e71 100644
--- a/pkg/osx/app-skeleton/Contents/Resources/launcher.nib/classes.nib
+++ b/pkg/osx/Resources/launcher.nib/classes.nib
diff --git a/pkg/osx/app-skeleton/Contents/Resources/launcher.nib/info.nib b/pkg/osx/Resources/launcher.nib/info.nib
index aecf812a..aecf812a 100644
--- a/pkg/osx/app-skeleton/Contents/Resources/launcher.nib/info.nib
+++ b/pkg/osx/Resources/launcher.nib/info.nib
diff --git a/pkg/osx/app-skeleton/Contents/Resources/launcher.nib/keyedobjects.nib b/pkg/osx/Resources/launcher.nib/keyedobjects.nib
index 12cf6aa5..12cf6aa5 100644
--- a/pkg/osx/app-skeleton/Contents/Resources/launcher.nib/keyedobjects.nib
+++ b/pkg/osx/Resources/launcher.nib/keyedobjects.nib
Binary files differ
diff --git a/pkg/osx/app-skeleton/Contents/Resources/wadfile.icns b/pkg/osx/Resources/wadfile.icns
index 13502a55..13502a55 100644
--- a/pkg/osx/app-skeleton/Contents/Resources/wadfile.icns
+++ b/pkg/osx/Resources/wadfile.icns
Binary files differ