From 6921f30a44e0bdf1c3a2f8982e4a8cd290c22462 Mon Sep 17 00:00:00 2001 From: Simon Howard Date: Mon, 4 Jan 2010 22:01:32 +0000 Subject: Import OS X launcher code to trunk. Subversion-branch: /trunk/chocolate-doom Subversion-revision: 1784 --- pkg/osx/GNUmakefile | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 pkg/osx/GNUmakefile (limited to 'pkg/osx/GNUmakefile') diff --git a/pkg/osx/GNUmakefile b/pkg/osx/GNUmakefile new file mode 100644 index 00000000..8d89ef50 --- /dev/null +++ b/pkg/osx/GNUmakefile @@ -0,0 +1,52 @@ + +include config.make + +STAGING_DIR=staging +DMG=$(PACKAGE_TARNAME)-$(PACKAGE_VERSION).dmg + +# DMG file containing package: + +$(DMG) : $(STAGING_DIR) + rm -f $@ + hdiutil create -volname "$(PACKAGE_STRING)" -srcdir $(STAGING_DIR) $@ + +clean : launcher_clean + rm -f $(DMG) + rm -rf $(STAGING_DIR) + +# Staging dir build for package: + +APP_DIR=$(STAGING_DIR)/$(PACKAGE_NAME).app + +$(STAGING_DIR): launcher + rm -rf $(STAGING_DIR) + mkdir $(STAGING_DIR) + cp -R app-skeleton "$(APP_DIR)" + cp Info.plist "$(APP_DIR)/Contents/" + cp launcher "$(APP_DIR)/Contents/MacOS/" + # TODO: copy Doom and setup binaries into app dir + # TODO: copy other documentation into staging dir + find $(STAGING_DIR) -name .svn -delete -exec rm -rf {} \; + +# Launcher build: + +CFLAGS=-Wall +LDFLAGS=-framework Cocoa + +LAUNCHER_OBJS= \ + AppController.o \ + Execute.o \ + IWADController.o \ + IWADLocation.o \ + LauncherManager.o \ + main.o + +launcher : $(LAUNCHER_OBJS) + $(CC) $(LDFLAGS) $(LAUNCHER_OBJS) -o $@ + +%.o : %.m + $(CC) -c $(CFLAGS) $^ -o $@ + +launcher_clean : + rm -f $(LAUNCHER_OBJS) launcher + -- cgit v1.2.3 From afb95216afb043a56122a3f57292bf0ded5d7775 Mon Sep 17 00:00:00 2001 From: Simon Howard Date: Mon, 4 Jan 2010 22:11:11 +0000 Subject: Generate Info.plist and config.make in configure and remove temporary versions. Include config.h from top level. Subversion-branch: /trunk/chocolate-doom Subversion-revision: 1785 --- pkg/osx/GNUmakefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'pkg/osx/GNUmakefile') diff --git a/pkg/osx/GNUmakefile b/pkg/osx/GNUmakefile index 8d89ef50..cf9d1ffb 100644 --- a/pkg/osx/GNUmakefile +++ b/pkg/osx/GNUmakefile @@ -30,7 +30,7 @@ $(STAGING_DIR): launcher # Launcher build: -CFLAGS=-Wall +CFLAGS=-Wall -I../.. LDFLAGS=-framework Cocoa LAUNCHER_OBJS= \ -- cgit v1.2.3 From c94870783a025514286df1d8bb43cf616b865547 Mon Sep 17 00:00:00 2001 From: Simon Howard Date: Mon, 4 Jan 2010 22:19:53 +0000 Subject: Fix GNUstep build. Subversion-branch: /trunk/chocolate-doom Subversion-revision: 1786 --- pkg/osx/GNUmakefile | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) (limited to 'pkg/osx/GNUmakefile') diff --git a/pkg/osx/GNUmakefile b/pkg/osx/GNUmakefile index cf9d1ffb..67f0fed8 100644 --- a/pkg/osx/GNUmakefile +++ b/pkg/osx/GNUmakefile @@ -4,15 +4,15 @@ include config.make STAGING_DIR=staging DMG=$(PACKAGE_TARNAME)-$(PACKAGE_VERSION).dmg +ifndef GNUSTEP_MAKEFILES + # DMG file containing package: $(DMG) : $(STAGING_DIR) rm -f $@ hdiutil create -volname "$(PACKAGE_STRING)" -srcdir $(STAGING_DIR) $@ -clean : launcher_clean - rm -f $(DMG) - rm -rf $(STAGING_DIR) +endif # Staging dir build for package: @@ -26,12 +26,24 @@ $(STAGING_DIR): launcher cp launcher "$(APP_DIR)/Contents/MacOS/" # TODO: copy Doom and setup binaries into app dir # TODO: copy other documentation into staging dir - find $(STAGING_DIR) -name .svn -delete -exec rm -rf {} \; + find $(STAGING_DIR) -name .svn -delete -exec rm -rf {} \; || true + +clean : launcher_clean + rm -f $(DMG) + rm -rf $(STAGING_DIR) # Launcher build: -CFLAGS=-Wall -I../.. -LDFLAGS=-framework Cocoa +CFLAGS = -Wall -I../.. + +# Are we building using gs_make? + +ifdef GNUSTEP_MAKEFILES +CFLAGS += $(shell gnustep-config --objc-flags) +LDFLAGS = $(shell gnustep-config --gui-libs) +else +LDFLAGS = -framework Cocoa +endif LAUNCHER_OBJS= \ AppController.o \ -- cgit v1.2.3 From dfff86ebefb6044183022016da67c7cae691b973 Mon Sep 17 00:00:00 2001 From: Simon Howard Date: Mon, 4 Jan 2010 22:24:48 +0000 Subject: Include documentation files in package. Subversion-branch: /trunk/chocolate-doom Subversion-revision: 1787 --- pkg/osx/GNUmakefile | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'pkg/osx/GNUmakefile') diff --git a/pkg/osx/GNUmakefile b/pkg/osx/GNUmakefile index 67f0fed8..82c353fe 100644 --- a/pkg/osx/GNUmakefile +++ b/pkg/osx/GNUmakefile @@ -3,6 +3,14 @@ include config.make STAGING_DIR=staging DMG=$(PACKAGE_TARNAME)-$(PACKAGE_VERSION).dmg +DOC_FILES=\ + README \ + COPYING \ + ChangeLog \ + NEWS \ + BUGS \ + CMDLINE \ + TODO ifndef GNUSTEP_MAKEFILES @@ -25,7 +33,7 @@ $(STAGING_DIR): launcher cp Info.plist "$(APP_DIR)/Contents/" cp launcher "$(APP_DIR)/Contents/MacOS/" # TODO: copy Doom and setup binaries into app dir - # TODO: copy other documentation into staging dir + for d in $(DOC_FILES); do cp ../../$$d $(STAGING_DIR)/; done find $(STAGING_DIR) -name .svn -delete -exec rm -rf {} \; || true clean : launcher_clean -- cgit v1.2.3 From c401e515b0bbe734fc39517a4d25c96ce487bef4 Mon Sep 17 00:00:00 2001 From: Simon Howard Date: Mon, 4 Jan 2010 22:45:45 +0000 Subject: Copy binaries into app dir along with libraries. Subversion-branch: /trunk/chocolate-doom Subversion-revision: 1788 --- pkg/osx/GNUmakefile | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'pkg/osx/GNUmakefile') diff --git a/pkg/osx/GNUmakefile b/pkg/osx/GNUmakefile index 82c353fe..b060f483 100644 --- a/pkg/osx/GNUmakefile +++ b/pkg/osx/GNUmakefile @@ -1,6 +1,9 @@ include config.make +CC=gcc +STRIP=strip + STAGING_DIR=staging DMG=$(PACKAGE_TARNAME)-$(PACKAGE_VERSION).dmg DOC_FILES=\ @@ -25,15 +28,23 @@ endif # Staging dir build for package: APP_DIR=$(STAGING_DIR)/$(PACKAGE_NAME).app +APP_BIN_DIR=$(APP_DIR)/Contents/MacOS/ $(STAGING_DIR): launcher rm -rf $(STAGING_DIR) mkdir $(STAGING_DIR) + cp -R app-skeleton "$(APP_DIR)" cp Info.plist "$(APP_DIR)/Contents/" - cp launcher "$(APP_DIR)/Contents/MacOS/" - # TODO: copy Doom and setup binaries into app dir + cp launcher "$(APP_BIN_DIR)/" + + ./cp-with-libs ../../src/chocolate-doom "$(APP_BIN_DIR)" + $(STRIP) "$(APP_BIN_DIR)/chocolate-doom" + ./cp-with-libs ../../setup/chocolate-setup "$(APP_BIN_DIR)" + $(STRIP) "$(APP_BIN_DIR)/chocolate-setup" + for d in $(DOC_FILES); do cp ../../$$d $(STAGING_DIR)/; done + find $(STAGING_DIR) -name .svn -delete -exec rm -rf {} \; || true clean : launcher_clean -- cgit v1.2.3 From 860a17497bdc189f78f5a0bca000a0451d5ae624 Mon Sep 17 00:00:00 2001 From: Simon Howard Date: Tue, 5 Jan 2010 15:52:12 +0000 Subject: Move config.make up to pkg/ directory. Use static makefiles to generate all packages, rather than dynamically generated makefiles. Add pkg/osx to dist. Make OS X staging directory depend on top level documentation files. Generate CMDLINE as part of standard build if it is not already present. Set svn:ignore properties. Subversion-branch: /trunk/chocolate-doom Subversion-revision: 1790 --- pkg/osx/GNUmakefile | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) (limited to 'pkg/osx/GNUmakefile') diff --git a/pkg/osx/GNUmakefile b/pkg/osx/GNUmakefile index b060f483..92fc5b0f 100644 --- a/pkg/osx/GNUmakefile +++ b/pkg/osx/GNUmakefile @@ -1,19 +1,14 @@ -include config.make +include ../config.make CC=gcc STRIP=strip STAGING_DIR=staging DMG=$(PACKAGE_TARNAME)-$(PACKAGE_VERSION).dmg -DOC_FILES=\ - README \ - COPYING \ - ChangeLog \ - NEWS \ - BUGS \ - CMDLINE \ - TODO + +TOPLEVEL=../.. +TOPLEVEL_DOCS=$(patsubst %,../../%,$(DOC_FILES)) ifndef GNUSTEP_MAKEFILES @@ -30,20 +25,21 @@ endif APP_DIR=$(STAGING_DIR)/$(PACKAGE_NAME).app APP_BIN_DIR=$(APP_DIR)/Contents/MacOS/ -$(STAGING_DIR): launcher +$(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 launcher "$(APP_BIN_DIR)/" - ./cp-with-libs ../../src/chocolate-doom "$(APP_BIN_DIR)" + ./cp-with-libs $(TOPLEVEL)/src/chocolate-doom "$(APP_BIN_DIR)" $(STRIP) "$(APP_BIN_DIR)/chocolate-doom" - ./cp-with-libs ../../setup/chocolate-setup "$(APP_BIN_DIR)" + ./cp-with-libs $(TOPLEVEL)/setup/chocolate-setup "$(APP_BIN_DIR)" $(STRIP) "$(APP_BIN_DIR)/chocolate-setup" - for d in $(DOC_FILES); do cp ../../$$d $(STAGING_DIR)/; done + for d in $(DOC_FILES); do cp $(TOPLEVEL)/$$d $(STAGING_DIR)/; done find $(STAGING_DIR) -name .svn -delete -exec rm -rf {} \; || true @@ -53,7 +49,7 @@ clean : launcher_clean # Launcher build: -CFLAGS = -Wall -I../.. +CFLAGS = -Wall -I$(TOPLEVEL) # Are we building using gs_make? -- cgit v1.2.3 From 7b07b99fa23b112986a6eb54fbec218f7069ef71 Mon Sep 17 00:00:00 2001 From: Simon Howard Date: Sun, 10 Jan 2010 18:48:21 +0000 Subject: Install docs with a single cp, rather than using a for loop. Subversion-branch: /trunk/chocolate-doom Subversion-revision: 1797 --- pkg/osx/GNUmakefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'pkg/osx/GNUmakefile') diff --git a/pkg/osx/GNUmakefile b/pkg/osx/GNUmakefile index 92fc5b0f..3cab6bf7 100644 --- a/pkg/osx/GNUmakefile +++ b/pkg/osx/GNUmakefile @@ -39,7 +39,7 @@ $(STAGING_DIR): launcher $(TOPLEVEL_DOCS) ./cp-with-libs $(TOPLEVEL)/setup/chocolate-setup "$(APP_BIN_DIR)" $(STRIP) "$(APP_BIN_DIR)/chocolate-setup" - for d in $(DOC_FILES); do cp $(TOPLEVEL)/$$d $(STAGING_DIR)/; done + cp $(TOPLEVEL_DOCS) "$(STAGING_DIR)" find $(STAGING_DIR) -name .svn -delete -exec rm -rf {} \; || true -- cgit v1.2.3 From 869447ff69c4832dfe0a14c382f67d5dea867def Mon Sep 17 00:00:00 2001 From: Simon Howard Date: Tue, 12 Jan 2010 20:12:56 +0000 Subject: Move Makefile definitions for CC and STRIP into config.make, use versions from autoconf. Subversion-branch: /trunk/chocolate-doom Subversion-revision: 1808 --- pkg/osx/GNUmakefile | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'pkg/osx/GNUmakefile') diff --git a/pkg/osx/GNUmakefile b/pkg/osx/GNUmakefile index 3cab6bf7..de2c535a 100644 --- a/pkg/osx/GNUmakefile +++ b/pkg/osx/GNUmakefile @@ -1,9 +1,6 @@ include ../config.make -CC=gcc -STRIP=strip - STAGING_DIR=staging DMG=$(PACKAGE_TARNAME)-$(PACKAGE_VERSION).dmg @@ -32,10 +29,12 @@ $(STAGING_DIR): launcher $(TOPLEVEL_DOCS) cp -R app-skeleton "$(APP_DIR)" mkdir "$(APP_BIN_DIR)" cp Info.plist "$(APP_DIR)/Contents/" + cp launcher "$(APP_BIN_DIR)/" + $(STRIP) "$(APP_BIN_DIR)/launcher" - ./cp-with-libs $(TOPLEVEL)/src/chocolate-doom "$(APP_BIN_DIR)" - $(STRIP) "$(APP_BIN_DIR)/chocolate-doom" + ./cp-with-libs $(TOPLEVEL)/src/$(PACKAGE_TARNAME) "$(APP_BIN_DIR)" + $(STRIP) "$(APP_BIN_DIR)/$(PACKAGE_TARNAME)" ./cp-with-libs $(TOPLEVEL)/setup/chocolate-setup "$(APP_BIN_DIR)" $(STRIP) "$(APP_BIN_DIR)/chocolate-setup" -- cgit v1.2.3 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 --- pkg/osx/GNUmakefile | 37 ++++++++++++++++++++++++++++++------- 1 file changed, 30 insertions(+), 7 deletions(-) (limited to 'pkg/osx/GNUmakefile') 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 -- cgit v1.2.3 From 893c8dbe922b5ee6ac14c3df3b5020817b6797b3 Mon Sep 17 00:00:00 2001 From: Simon Howard Date: Fri, 15 Jan 2010 19:14:02 +0000 Subject: Fix GNUstep info panel. Subversion-branch: /trunk/chocolate-doom Subversion-revision: 1816 --- pkg/osx/GNUmakefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'pkg/osx/GNUmakefile') diff --git a/pkg/osx/GNUmakefile b/pkg/osx/GNUmakefile index d1894bef..d119efa1 100644 --- a/pkg/osx/GNUmakefile +++ b/pkg/osx/GNUmakefile @@ -35,7 +35,7 @@ APP_DIR=$(STAGING_DIR)/$(PACKAGE_NAME).app ifdef GNUSTEP_MAKEFILES APP_TOP_DIR=$(APP_DIR) APP_BIN_DIR=$(APP_DIR) -SRC_INFO_PLIST=Info-GNUstep.plist +SRC_INFO_PLIST=Info-gnustep.plist else APP_TOP_DIR=$(APP_DIR)/Contents APP_BIN_DIR=$(APP_DIR)/Contents/MacOS @@ -51,7 +51,7 @@ $(STAGING_DIR): launcher $(TOPLEVEL_DOCS) 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" + cp $(SRC_INFO_PLIST) "$(APP_TOP_DIR)" mkdir -p "$(APP_BIN_DIR)" -- cgit v1.2.3