From f176ac404ad709e6c1254f8685f8d9fe7b995115 Mon Sep 17 00:00:00 2001 From: Simon Howard Date: Fri, 15 Jan 2010 18:13:05 +0000 Subject: 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 --- configure.in | 1 + pkg/Makefile.am | 17 ++++---- pkg/osx/GNUmakefile | 37 +++++++++++++---- pkg/osx/Info-GNUstep.plist.in | 31 ++++++++++++++ pkg/osx/PkgInfo | 1 + pkg/osx/Resources/128x128.png | Bin 0 -> 23029 bytes pkg/osx/Resources/app.icns | Bin 0 -> 51625 bytes pkg/osx/Resources/app.png | Bin 0 -> 4597 bytes pkg/osx/Resources/launcher.nib/classes.nib | 46 +++++++++++++++++++++ pkg/osx/Resources/launcher.nib/info.nib | 23 +++++++++++ pkg/osx/Resources/launcher.nib/keyedobjects.nib | Bin 0 -> 17541 bytes pkg/osx/Resources/wadfile.icns | Bin 0 -> 44092 bytes pkg/osx/app-skeleton/Contents/PkgInfo | 1 - .../app-skeleton/Contents/Resources/128x128.png | Bin 23029 -> 0 bytes pkg/osx/app-skeleton/Contents/Resources/app.icns | Bin 51625 -> 0 bytes .../Contents/Resources/launcher.nib/classes.nib | 46 --------------------- .../Contents/Resources/launcher.nib/info.nib | 23 ----------- .../Resources/launcher.nib/keyedobjects.nib | Bin 17541 -> 0 bytes .../app-skeleton/Contents/Resources/wadfile.icns | Bin 44092 -> 0 bytes 19 files changed, 141 insertions(+), 85 deletions(-) create mode 100644 pkg/osx/Info-GNUstep.plist.in create mode 100644 pkg/osx/PkgInfo create mode 100644 pkg/osx/Resources/128x128.png create mode 100644 pkg/osx/Resources/app.icns create mode 100644 pkg/osx/Resources/app.png create mode 100644 pkg/osx/Resources/launcher.nib/classes.nib create mode 100644 pkg/osx/Resources/launcher.nib/info.nib create mode 100644 pkg/osx/Resources/launcher.nib/keyedobjects.nib create mode 100644 pkg/osx/Resources/wadfile.icns delete mode 100644 pkg/osx/app-skeleton/Contents/PkgInfo delete mode 100644 pkg/osx/app-skeleton/Contents/Resources/128x128.png delete mode 100644 pkg/osx/app-skeleton/Contents/Resources/app.icns delete mode 100644 pkg/osx/app-skeleton/Contents/Resources/launcher.nib/classes.nib delete mode 100644 pkg/osx/app-skeleton/Contents/Resources/launcher.nib/info.nib delete mode 100644 pkg/osx/app-skeleton/Contents/Resources/launcher.nib/keyedobjects.nib delete mode 100644 pkg/osx/app-skeleton/Contents/Resources/wadfile.icns diff --git a/configure.in b/configure.in index db76ebef..2296a654 100644 --- a/configure.in +++ b/configure.in @@ -120,6 +120,7 @@ pcsound/Makefile pkg/Makefile pkg/config.make pkg/osx/Info.plist +pkg/osx/Info-GNUstep.plist setup/Makefile setup/setup-res.rc src/Makefile 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/PkgInfo b/pkg/osx/PkgInfo new file mode 100644 index 00000000..6f749b0f --- /dev/null +++ b/pkg/osx/PkgInfo @@ -0,0 +1 @@ +APPL???? diff --git a/pkg/osx/Resources/128x128.png b/pkg/osx/Resources/128x128.png new file mode 100644 index 00000000..0ef1fe9c Binary files /dev/null and b/pkg/osx/Resources/128x128.png differ diff --git a/pkg/osx/Resources/app.icns b/pkg/osx/Resources/app.icns new file mode 100644 index 00000000..9b535a25 Binary files /dev/null and b/pkg/osx/Resources/app.icns differ diff --git a/pkg/osx/Resources/app.png b/pkg/osx/Resources/app.png new file mode 100644 index 00000000..5b932e8c Binary files /dev/null and b/pkg/osx/Resources/app.png differ diff --git a/pkg/osx/Resources/launcher.nib/classes.nib b/pkg/osx/Resources/launcher.nib/classes.nib new file mode 100644 index 00000000..3ff47e71 --- /dev/null +++ b/pkg/osx/Resources/launcher.nib/classes.nib @@ -0,0 +1,46 @@ +{ + IBClasses = ( + { + CLASS = AppController; + LANGUAGE = ObjC; + OUTLETS = {launcherManager = id; }; + SUPERCLASS = NSObject; + }, + {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, + { + ACTIONS = {closeConfigWindow = id; openConfigWindow = id; }; + CLASS = IWADController; + LANGUAGE = ObjC; + OUTLETS = { + chex = id; + configWindow = id; + doom1 = id; + doom2 = id; + iwadSelector = id; + plutonia = id; + tnt = id; + }; + SUPERCLASS = NSObject; + }, + { + ACTIONS = {setButtonClicked = id; }; + CLASS = IWADLocation; + LANGUAGE = ObjC; + OUTLETS = {locationConfigBox = id; }; + SUPERCLASS = NSObject; + }, + { + ACTIONS = {launch = id; runSetup = id; }; + CLASS = LauncherManager; + LANGUAGE = ObjC; + OUTLETS = { + commandLineArguments = id; + iwadController = id; + launcherWindow = id; + packageLabel = id; + }; + SUPERCLASS = NSObject; + } + ); + IBVersion = 1; +} \ No newline at end of file diff --git a/pkg/osx/Resources/launcher.nib/info.nib b/pkg/osx/Resources/launcher.nib/info.nib new file mode 100644 index 00000000..aecf812a --- /dev/null +++ b/pkg/osx/Resources/launcher.nib/info.nib @@ -0,0 +1,23 @@ + + + + + IBDocumentLocation + 170 140 612 260 0 0 1440 878 + IBEditorPositions + + 29 + 108 337 163 44 0 0 1440 878 + + IBFramework Version + 446.1 + IBOpenObjects + + 21 + 29 + 227 + + IBSystem Version + 8S2167 + + diff --git a/pkg/osx/Resources/launcher.nib/keyedobjects.nib b/pkg/osx/Resources/launcher.nib/keyedobjects.nib new file mode 100644 index 00000000..12cf6aa5 Binary files /dev/null and b/pkg/osx/Resources/launcher.nib/keyedobjects.nib differ diff --git a/pkg/osx/Resources/wadfile.icns b/pkg/osx/Resources/wadfile.icns new file mode 100644 index 00000000..13502a55 Binary files /dev/null and b/pkg/osx/Resources/wadfile.icns differ diff --git a/pkg/osx/app-skeleton/Contents/PkgInfo b/pkg/osx/app-skeleton/Contents/PkgInfo deleted file mode 100644 index 6f749b0f..00000000 --- a/pkg/osx/app-skeleton/Contents/PkgInfo +++ /dev/null @@ -1 +0,0 @@ -APPL???? diff --git a/pkg/osx/app-skeleton/Contents/Resources/128x128.png b/pkg/osx/app-skeleton/Contents/Resources/128x128.png deleted file mode 100644 index 0ef1fe9c..00000000 Binary files a/pkg/osx/app-skeleton/Contents/Resources/128x128.png and /dev/null differ diff --git a/pkg/osx/app-skeleton/Contents/Resources/app.icns b/pkg/osx/app-skeleton/Contents/Resources/app.icns deleted file mode 100644 index 9b535a25..00000000 Binary files a/pkg/osx/app-skeleton/Contents/Resources/app.icns and /dev/null differ diff --git a/pkg/osx/app-skeleton/Contents/Resources/launcher.nib/classes.nib b/pkg/osx/app-skeleton/Contents/Resources/launcher.nib/classes.nib deleted file mode 100644 index 3ff47e71..00000000 --- a/pkg/osx/app-skeleton/Contents/Resources/launcher.nib/classes.nib +++ /dev/null @@ -1,46 +0,0 @@ -{ - IBClasses = ( - { - CLASS = AppController; - LANGUAGE = ObjC; - OUTLETS = {launcherManager = id; }; - SUPERCLASS = NSObject; - }, - {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, - { - ACTIONS = {closeConfigWindow = id; openConfigWindow = id; }; - CLASS = IWADController; - LANGUAGE = ObjC; - OUTLETS = { - chex = id; - configWindow = id; - doom1 = id; - doom2 = id; - iwadSelector = id; - plutonia = id; - tnt = id; - }; - SUPERCLASS = NSObject; - }, - { - ACTIONS = {setButtonClicked = id; }; - CLASS = IWADLocation; - LANGUAGE = ObjC; - OUTLETS = {locationConfigBox = id; }; - SUPERCLASS = NSObject; - }, - { - ACTIONS = {launch = id; runSetup = id; }; - CLASS = LauncherManager; - LANGUAGE = ObjC; - OUTLETS = { - commandLineArguments = id; - iwadController = id; - launcherWindow = id; - packageLabel = id; - }; - SUPERCLASS = NSObject; - } - ); - IBVersion = 1; -} \ No newline at end of file diff --git a/pkg/osx/app-skeleton/Contents/Resources/launcher.nib/info.nib b/pkg/osx/app-skeleton/Contents/Resources/launcher.nib/info.nib deleted file mode 100644 index aecf812a..00000000 --- a/pkg/osx/app-skeleton/Contents/Resources/launcher.nib/info.nib +++ /dev/null @@ -1,23 +0,0 @@ - - - - - IBDocumentLocation - 170 140 612 260 0 0 1440 878 - IBEditorPositions - - 29 - 108 337 163 44 0 0 1440 878 - - IBFramework Version - 446.1 - IBOpenObjects - - 21 - 29 - 227 - - IBSystem Version - 8S2167 - - diff --git a/pkg/osx/app-skeleton/Contents/Resources/launcher.nib/keyedobjects.nib b/pkg/osx/app-skeleton/Contents/Resources/launcher.nib/keyedobjects.nib deleted file mode 100644 index 12cf6aa5..00000000 Binary files a/pkg/osx/app-skeleton/Contents/Resources/launcher.nib/keyedobjects.nib and /dev/null differ diff --git a/pkg/osx/app-skeleton/Contents/Resources/wadfile.icns b/pkg/osx/app-skeleton/Contents/Resources/wadfile.icns deleted file mode 100644 index 13502a55..00000000 Binary files a/pkg/osx/app-skeleton/Contents/Resources/wadfile.icns and /dev/null differ -- cgit v1.2.3