summaryrefslogtreecommitdiff
path: root/pkg/osx/GNUmakefile
diff options
context:
space:
mode:
authorSimon Howard2011-05-07 23:52:26 +0000
committerSimon Howard2011-05-07 23:52:26 +0000
commit1fd0ad08ed4840e681e902bc1b9420a1d41619b4 (patch)
tree8bdc0ff6bf2b54dc283f72a234925fdd3c77a227 /pkg/osx/GNUmakefile
parentec74db92724c181962479703092365b332b70b0a (diff)
downloadchocolate-doom-1fd0ad08ed4840e681e902bc1b9420a1d41619b4.tar.gz
chocolate-doom-1fd0ad08ed4840e681e902bc1b9420a1d41619b4.tar.bz2
chocolate-doom-1fd0ad08ed4840e681e902bc1b9420a1d41619b4.zip
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
Diffstat (limited to 'pkg/osx/GNUmakefile')
-rw-r--r--pkg/osx/GNUmakefile29
1 files changed, 24 insertions, 5 deletions
diff --git a/pkg/osx/GNUmakefile b/pkg/osx/GNUmakefile
index f9bb6417..514a208d 100644
--- a/pkg/osx/GNUmakefile
+++ b/pkg/osx/GNUmakefile
@@ -20,9 +20,17 @@ ifndef GNUSTEP_MAKEFILES
# DMG file containing package:
-$(DMG) : $(STAGING_DIR)
+$(DMG) : tmp.dmg
rm -f $@
- hdiutil create -volname "$(PACKAGE_STRING)" -srcdir $(STAGING_DIR) $@
+ ./dmgfix "$(realpath tmp.dmg)" "$(PACKAGE_STRING)" "$(PACKAGE_NAME).app"
+ hdiutil convert -format UDZO -o $@ tmp.dmg
+ rm -f tmp.dmg
+
+tmp.dmg : $(STAGING_DIR)
+ rm -f $@
+ hdiutil makehybrid -hfs -hfs-volume-name "$(PACKAGE_STRING)" \
+ -hfs-openfolder $(STAGING_DIR) $(STAGING_DIR) \
+ -o tmp.dmg
endif
@@ -46,12 +54,13 @@ APP_BIN_DIR=$(APP_DIR)/Contents/MacOS
SRC_INFO_PLIST=Info.plist
endif
+APP_DOC_DIR=$(APP_BIN_DIR)/Documentation
+APP_DOC_RELDIR=$(patsubst $(STAGING_DIR)/%,%,$(APP_DOC_DIR))
+
$(STAGING_DIR): launcher $(TOPLEVEL_DOCS)
rm -rf $(STAGING_DIR)
mkdir $(STAGING_DIR)
- cp $(TOPLEVEL_DOCS) "$(STAGING_DIR)"
-
mkdir -p "$(APP_TOP_DIR)"
cp -R Resources "$(APP_TOP_DIR)"
cp PkgInfo "$(APP_TOP_DIR)"
@@ -59,6 +68,13 @@ $(STAGING_DIR): launcher $(TOPLEVEL_DOCS)
mkdir -p "$(APP_BIN_DIR)"
+ mkdir -p "$(APP_DOC_DIR)"
+ cp $(TOPLEVEL_DOCS) "$(APP_DOC_DIR)"
+
+ ln -s "$(APP_DOC_RELDIR)/COPYING" "$(STAGING_DIR)/Software License"
+ ln -s "$(APP_DOC_RELDIR)/README" "$(STAGING_DIR)/README"
+ ln -s /Applications "$(STAGING_DIR)"
+
cp launcher "$(APP_BIN_DIR)"
$(STRIP) "$(APP_BIN_DIR)/launcher"
@@ -69,13 +85,16 @@ $(STAGING_DIR): launcher $(TOPLEVEL_DOCS)
$(TOPLEVEL)/man/simplecpp -DPRECOMPILED -D__MACOSX__ \
< $(TOPLEVEL)/man/INSTALL.template \
- > $(STAGING_DIR)/INSTALL
+ > "$(APP_DOC_DIR)/INSTALL"
find $(STAGING_DIR) -name .svn -delete -exec rm -rf {} \; || true
mkdir -p "$(APP_BIN_DIR)/man/man5" "$(APP_BIN_DIR)/man/man6"
cp $(TOPLEVEL)/man/*.5 "$(APP_BIN_DIR)/man/man5"
cp $(TOPLEVEL)/man/*.6 "$(APP_BIN_DIR)/man/man6"
+ cp disk/dir.DS_Store $(STAGING_DIR)/.DS_Store
+ cp disk/background.png $(STAGING_DIR)/background.png
+# setfile -a V $(STAGING_DIR)/background.png
clean : launcher_clean
rm -f $(DMG)