From 7c5bfff5138382c134e886689633a6fdb9f579a4 Mon Sep 17 00:00:00 2001 From: Henrik Brautaset Aronsen Date: Sun, 16 Oct 2011 23:16:36 +0200 Subject: Add basic MacOSX app bundle install target 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 --- Makefile | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 0d736e1b7..3fa77c3f4 100644 --- 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 -- cgit v1.2.3-70-g09d2 From b1a1376f3baf78ceca49b47c7b39d58983f4f984 Mon Sep 17 00:00:00 2001 From: Henrik Brautaset Aronsen Date: Sun, 30 Oct 2011 22:27:33 +0100 Subject: Use the new packaging directory for MacOSX specific files, and provide shell script workaround to make the svg icon reachable. - Make use of the new packaging directory. - Set a current directory for subsurface to find the svg icon. There might be a pretter solution to this. - Somehow subsurface doesn't behave properly in the Dock. Running it in the background without Dock integration until we figure out why. Signed-Off-By: Henrik Brautaset Aronsen --- Makefile | 12 ++++++------ macosx/Info.plist | 20 -------------------- macosx/PkgInfo | 1 - macosx/Subsurface.icns | Bin 71777 -> 0 bytes packaging/macosx/Info.plist | 20 ++++++++++++++++++++ packaging/macosx/PkgInfo | 1 + packaging/macosx/Subsurface.icns | Bin 0 -> 71777 bytes packaging/macosx/subsurface.sh | 5 +++++ 8 files changed, 32 insertions(+), 27 deletions(-) delete mode 100644 macosx/Info.plist delete mode 100644 macosx/PkgInfo delete mode 100644 macosx/Subsurface.icns create mode 100644 packaging/macosx/Info.plist create mode 100644 packaging/macosx/PkgInfo create mode 100644 packaging/macosx/Subsurface.icns create mode 100755 packaging/macosx/subsurface.sh (limited to 'Makefile') diff --git a/Makefile b/Makefile index 3fa77c3f4..638758cd9 100644 --- a/Makefile +++ b/Makefile @@ -23,9 +23,7 @@ DESKTOPFILE = $(NAME).desktop MANFILES = $(NAME).1 MACOSXINSTALL = /Applications/Subsurface.app -MACOSXICONFILE = macosx/Subsurface.icns -MACOSXINFOFILE = macosx/Info.plist -MACOSXPKGFILE = macosx/PkgInfo +MACOSXFILES = packaging/macosx # find libdivecomputer # First deal with the cross compile environment. @@ -109,9 +107,11 @@ 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/ + $(INSTALL) $(MACOSXFILES)/subsurface.sh $(MACOSXINSTALL)/Contents/MacOS/ + $(INSTALL) $(MACOSXFILES)/PkgInfo $(MACOSXINSTALL)/Contents/ + $(INSTALL) $(MACOSXFILES)/Info.plist $(MACOSXINSTALL)/Contents/ + $(INSTALL) $(ICONFILE) $(MACOSXINSTALL)/Contents/Resources/ + $(INSTALL) $(MACOSXFILES)/Subsurface.icns $(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 deleted file mode 100644 index 62d92b152..000000000 --- a/macosx/Info.plist +++ /dev/null @@ -1,20 +0,0 @@ - - - - - CFBundleIconFile - Subsurface - CFBundleName - Subsurface - CFBundlePackageType - APPL - CFBundleGetInfoString - Rough divelog in C and Gtk - CFBundleSignature - ???? - CFBundleExecutable - subsurface - CFBundleIdentifier - torvalds.subsurface - - diff --git a/macosx/PkgInfo b/macosx/PkgInfo deleted file mode 100644 index 6f749b0f3..000000000 --- a/macosx/PkgInfo +++ /dev/null @@ -1 +0,0 @@ -APPL???? diff --git a/macosx/Subsurface.icns b/macosx/Subsurface.icns deleted file mode 100644 index 27c077f16..000000000 Binary files a/macosx/Subsurface.icns and /dev/null differ diff --git a/packaging/macosx/Info.plist b/packaging/macosx/Info.plist new file mode 100644 index 000000000..4ee12438b --- /dev/null +++ b/packaging/macosx/Info.plist @@ -0,0 +1,20 @@ + + + + + CFBundleIconFile + Subsurface + CFBundleName + Subsurface + CFBundlePackageType + APPL + CFBundleGetInfoString + Rough divelog in C and Gtk + CFBundleSignature + ???? + CFBundleExecutable + subsurface.sh + CFBundleIdentifier + torvalds.subsurface + + diff --git a/packaging/macosx/PkgInfo b/packaging/macosx/PkgInfo new file mode 100644 index 000000000..6f749b0f3 --- /dev/null +++ b/packaging/macosx/PkgInfo @@ -0,0 +1 @@ +APPL???? diff --git a/packaging/macosx/Subsurface.icns b/packaging/macosx/Subsurface.icns new file mode 100644 index 000000000..27c077f16 Binary files /dev/null and b/packaging/macosx/Subsurface.icns differ diff --git a/packaging/macosx/subsurface.sh b/packaging/macosx/subsurface.sh new file mode 100755 index 000000000..ee9427c37 --- /dev/null +++ b/packaging/macosx/subsurface.sh @@ -0,0 +1,5 @@ +#!/bin/sh + +cd `dirname $0`/../Resources +../MacOS/subsurface & +exit 0 -- cgit v1.2.3-70-g09d2