Commit b1f4c6df authored by Stephen A Pohl's avatar Stephen A Pohl
Browse files

Bug 394984: Enable any admin user on OSX to update Firefox, build config changes. r=mshal

parent 27d84219
......@@ -87,5 +87,8 @@ tools repackage:: $(DIST)/bin/$(MOZ_APP_NAME)
rsync -aL $(DIST)/bin/$(MOZ_APP_NAME) $(dist_dest)/Contents/MacOS
cp -RL $(DIST)/branding/firefox.icns $(dist_dest)/Contents/Resources/firefox.icns
cp -RL $(DIST)/branding/document.icns $(dist_dest)/Contents/Resources/document.icns
$(MKDIR) -p $(dist_dest)/Contents/Library/LaunchServices
mv -f $(dist_dest)/Contents/MacOS/updater.app/Contents/MacOS/org.mozilla.updater $(dist_dest)/Contents/Library/LaunchServices
ln -s ../../../../Library/LaunchServices/org.mozilla.updater $(dist_dest)/Contents/MacOS/updater.app/Contents/MacOS/org.mozilla.updater
printf APPLMOZB > $(dist_dest)/Contents/PkgInfo
endif
......@@ -35,6 +35,7 @@
#ifdef XP_MACOSX
; Mac bundle stuff
@APPNAME@/Contents/Info.plist
@APPNAME@/Contents/Library/LaunchServices
@APPNAME@/Contents/PkgInfo
@RESPATH@/firefox.icns
@RESPATH@/document.icns
......
......@@ -2931,7 +2931,7 @@ cocoa)
LDFLAGS="$LDFLAGS -framework Cocoa -lobjc"
# Use -Wl as a trick to avoid -framework and framework names from
# being separated by AC_SUBST_LIST.
TK_LIBS='-Wl,-framework,CoreLocation -Wl,-framework,QuartzCore -Wl,-framework,Carbon -Wl,-framework,CoreAudio -Wl,-framework,AudioToolbox -Wl,-framework,AudioUnit -Wl,-framework,AddressBook -Wl,-framework,OpenGL'
TK_LIBS='-Wl,-framework,CoreLocation -Wl,-framework,QuartzCore -Wl,-framework,Carbon -Wl,-framework,CoreAudio -Wl,-framework,AudioToolbox -Wl,-framework,AudioUnit -Wl,-framework,AddressBook -Wl,-framework,OpenGL -Wl,-framework,Security -Wl,-framework,ServiceManagement'
TK_CFLAGS=""
CFLAGS="$CFLAGS $TK_CFLAGS"
CXXFLAGS="$CXXFLAGS $TK_CFLAGS"
......
......@@ -16,11 +16,14 @@ endif
include $(topsrcdir)/config/rules.mk
ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
export::
sed -e 's/%MOZ_MACBUNDLE_ID%/$(MOZ_MACBUNDLE_ID)/' $(srcdir)/macbuild/Contents/Info.plist.in > $(DIST)/bin/Info.plist
libs::
$(NSINSTALL) -D $(DIST)/bin/updater.app
rsync -a -C --exclude '*.in' $(srcdir)/macbuild/Contents $(DIST)/bin/updater.app
rsync -a -C --exclude '*.in' $(srcdir)/macbuild/Contents $(DIST)/bin/updater.app
rsync -a -C $(DIST)/bin/Info.plist $(DIST)/bin/updater.app/Contents
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/updater.app/Contents/Resources/English.lproj/InfoPlist.strings
$(NSINSTALL) -D $(DIST)/bin/updater.app/Contents/MacOS
$(NSINSTALL) $(DIST)/bin/updater $(DIST)/bin/updater.app/Contents/MacOS
$(NSINSTALL) $(DIST)/bin/org.mozilla.updater $(DIST)/bin/updater.app/Contents/MacOS
endif
......@@ -5,7 +5,7 @@
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleExecutable</key>
<string>updater</string>
<string>org.mozilla.updater</string>
<key>CFBundleIconFile</key>
<string>updater.icns</string>
<key>CFBundleIdentifier</key>
......
......@@ -4,7 +4,10 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
Program('updater')
if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa':
Program('org.mozilla.updater')
else:
Program('updater')
updater_rel_path = ''
include('updater-common.build')
......@@ -13,6 +16,15 @@ if CONFIG['ENABLE_TESTS']:
CXXFLAGS += CONFIG['MOZ_BZ2_CFLAGS']
if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa':
LDFLAGS += ['-sectcreate',
'__TEXT',
'__info_plist',
TOPOBJDIR + '/dist/bin/Info.plist',
'-sectcreate',
'__TEXT',
'__launchd_plist',
SRCDIR + '/Launchd.plist']
GENERATED_FILES = [
'primaryCert.h',
......
......@@ -82,6 +82,13 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa':
OS_LIBS += [
'-framework Cocoa',
'-framework Security',
'-framework SystemConfiguration',
]
UNIFIED_SOURCES += [
'/toolkit/xre/updaterfileutils_osx.mm',
]
LOCAL_INCLUDES += [
'/toolkit/xre',
]
elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gonk':
have_progressui = 1
......
......@@ -30,7 +30,7 @@ ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
$(NSINSTALL) updater-xpcshell $(XPCSHELLTESTROOT)/data/updater-xpcshell.app/Contents/MacOS
rm -Rf $(XPCSHELLTESTROOT)/data/updater.app
mv $(XPCSHELLTESTROOT)/data/updater-xpcshell.app $(XPCSHELLTESTROOT)/data/updater.app
mv $(XPCSHELLTESTROOT)/data/updater.app/Contents/MacOS/updater-xpcshell $(XPCSHELLTESTROOT)/data/updater.app/Contents/MacOS/updater
mv $(XPCSHELLTESTROOT)/data/updater.app/Contents/MacOS/updater-xpcshell $(XPCSHELLTESTROOT)/data/updater.app/Contents/MacOS/org.mozilla.updater
# Copy for mochitest chrome tests
rsync -a -C $(XPCSHELLTESTROOT)/data/updater.app $(MOCHITESTROOT)/data/
......
......@@ -31,14 +31,13 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'windows':
]
elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa':
EXPORTS += ['MacQuirks.h']
UNIFIED_SOURCES += [
'nsCommandLineServiceMac.cpp',
]
UNIFIED_SOURCES += [
'MacApplicationDelegate.mm',
'MacAutoreleasePool.mm',
'MacLaunchHelper.mm',
'nsCommandLineServiceMac.cpp',
'nsNativeAppSupportCocoa.mm',
'updaterfileutils_osx.mm',
]
elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'uikit':
UNIFIED_SOURCES += [
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment