]> git.tdb.fi Git - ext/subsurface.git/commitdiff
Add basic MacOSX app bundle install target
authorHenrik Brautaset Aronsen <subsurface@henrik.synth.no>
Sun, 16 Oct 2011 21:16:36 +0000 (23:16 +0200)
committerHenrik Brautaset Aronsen <hba@conduct.no>
Mon, 31 Oct 2011 08:48:56 +0000 (09:48 +0100)
Native MacOSX app bundles are installed in /Applications.  We want a separate
install target for this, since some would probably prefer the regular unixy
way.

Signed-Off-By: Henrik Brautaset Aronsen <subsurface@henrik.synth.no>
Makefile
macosx/Info.plist [new file with mode: 0644]
macosx/PkgInfo [new file with mode: 0644]
macosx/Subsurface.icns [new file with mode: 0644]

index 0d736e1b761452225f34c496cdf6d89be6c1f854..3fa77c3f4e800b8791c80f71d92de2c140c57630 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -22,6 +22,11 @@ ICONFILE = $(NAME).svg
 DESKTOPFILE = $(NAME).desktop
 MANFILES = $(NAME).1
 
+MACOSXINSTALL = /Applications/Subsurface.app
+MACOSXICONFILE = macosx/Subsurface.icns
+MACOSXINFOFILE = macosx/Info.plist
+MACOSXPKGFILE = macosx/PkgInfo
+
 # find libdivecomputer
 # First deal with the cross compile environment.
 # For the native case, Linus doesn't want to trust pkg-config given
@@ -100,6 +105,14 @@ GLIB2CFLAGS = $(shell $(PKGCONFIG) --cflags glib-2.0)
 GCONF2CFLAGS =  $(shell $(PKGCONFIG) --cflags gconf-2.0)
 GTK2CFLAGS = $(shell $(PKGCONFIG) --cflags gtk+-2.0)
 
+install-macosx: $(NAME)
+       $(INSTALL) -d -m 755 $(MACOSXINSTALL)/Contents/Resources
+       $(INSTALL) -d -m 755 $(MACOSXINSTALL)/Contents/MacOS
+       $(INSTALL) $(NAME) $(MACOSXINSTALL)/Contents/MacOS/
+       $(INSTALL) $(MACOSXINFOFILE) $(MACOSXINSTALL)/Contents/
+       $(INSTALL) $(MACOSXPKGFILE) $(MACOSXINSTALL)/Contents/
+       $(INSTALL) $(MACOSXICONFILE) $(MACOSXINSTALL)/Contents/Resources/
+
 parse-xml.o: parse-xml.c dive.h
        $(CC) $(CFLAGS) $(GLIB2CFLAGS) -c $(XML2CFLAGS)  parse-xml.c
 
diff --git a/macosx/Info.plist b/macosx/Info.plist
new file mode 100644 (file)
index 0000000..62d92b1
--- /dev/null
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+       <key>CFBundleIconFile</key>
+       <string>Subsurface</string>
+       <key>CFBundleName</key>
+       <string>Subsurface</string>
+       <key>CFBundlePackageType</key>
+       <string>APPL</string>
+        <key>CFBundleGetInfoString</key>
+       <string>Rough divelog in C and Gtk</string>
+       <key>CFBundleSignature</key>
+       <string>????</string>
+       <key>CFBundleExecutable</key>
+       <string>subsurface</string>
+       <key>CFBundleIdentifier</key>
+       <string>torvalds.subsurface</string>
+</dict>
+</plist>
diff --git a/macosx/PkgInfo b/macosx/PkgInfo
new file mode 100644 (file)
index 0000000..6f749b0
--- /dev/null
@@ -0,0 +1 @@
+APPL????
diff --git a/macosx/Subsurface.icns b/macosx/Subsurface.icns
new file mode 100644 (file)
index 0000000..27c077f
Binary files /dev/null and b/macosx/Subsurface.icns differ