diff --git a/ipc/app/Makefile.in b/ipc/app/Makefile.in index ada8f88474b..0887d1f0651 100644 --- a/ipc/app/Makefile.in +++ b/ipc/app/Makefile.in @@ -111,3 +111,25 @@ ifndef GNU_CC LDFLAGS += /HEAP:0x40000 endif endif + +ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT)) +# Create an app bundle +MOZ_FIX_LINK_PATHS+=-Wl,-headerpad_max_install_names +# We need to fix the install names for the Gecko libraries we're linked to. +# They're all @loader_path/libfoo.dylib, but this binary lives in a bundle +# underneath that. +paren=\( +LIST_INSTALL_NAMES=$(shell otool -L $(PROGRAM) | grep "@loader_path" | tr -s '\t ' ' ' | cut -f1 -d$(paren) | xargs echo) +FIX_INSTALL_NAMES=$(foreach l,$(LIST_INSTALL_NAMES),-change "$l" "$(subst @loader_path,@loader_path/../../..,$l)") + +libs:: + $(NSINSTALL) -D $(DIST)/bin/$(PROGRAM).app + rsync -a -C --exclude "*.in" $(srcdir)/macbuild/Contents $(DIST)/bin/$(PROGRAM).app + sed -e "s/%PROGRAM%/$(PROGRAM)/" $(srcdir)/macbuild/Contents/Info.plist.in > $(DIST)/bin/$(PROGRAM).app/Contents/Info.plist + sed -e "s/%APP_NAME%/$(MOZ_APP_DISPLAYNAME)/" $(srcdir)/macbuild/Contents/Resources/English.lproj/InfoPlist.strings.in | \ + iconv -f UTF-8 -t UTF-16 > $(DIST)/bin/$(PROGRAM).app/Contents/Resources/English.lproj/InfoPlist.strings + $(NSINSTALL) -D $(DIST)/bin/$(PROGRAM).app/Contents/MacOS + install_name_tool $(FIX_INSTALL_NAMES) $(PROGRAM) + $(NSINSTALL) $(PROGRAM) $(DIST)/bin/$(PROGRAM).app/Contents/MacOS + rm -f $(DIST)/bin/$(PROGRAM) +endif diff --git a/ipc/app/macbuild/Contents/Info.plist.in b/ipc/app/macbuild/Contents/Info.plist.in new file mode 100644 index 00000000000..5650475dee3 --- /dev/null +++ b/ipc/app/macbuild/Contents/Info.plist.in @@ -0,0 +1,22 @@ + + + + + CFBundleDevelopmentRegion + English + CFBundleExecutable + %PROGRAM% + CFBundleIdentifier + org.mozilla.plugincontainer + CFBundleInfoDictionaryVersion + 6.0 + CFBundlePackageType + APPL + CFBundleSignature + ???? + CFBundleVersion + 1.0 + LSMinimumSystemVersion + 10.5 + + diff --git a/ipc/app/macbuild/Contents/PkgInfo b/ipc/app/macbuild/Contents/PkgInfo new file mode 100644 index 00000000000..bd04210fb49 --- /dev/null +++ b/ipc/app/macbuild/Contents/PkgInfo @@ -0,0 +1 @@ +APPL???? \ No newline at end of file diff --git a/ipc/app/macbuild/Contents/Resources/English.lproj/InfoPlist.strings.in b/ipc/app/macbuild/Contents/Resources/English.lproj/InfoPlist.strings.in new file mode 100644 index 00000000000..3a12a7efa19 --- /dev/null +++ b/ipc/app/macbuild/Contents/Resources/English.lproj/InfoPlist.strings.in @@ -0,0 +1,3 @@ +/* Localized versions of Info.plist keys */ + +CFBundleName = "%APP_NAME% Software Update";