diff --git a/configure.ac b/configure.ac index faba317c06..32be8bbd84 100644 --- a/configure.ac +++ b/configure.ac @@ -3795,13 +3795,6 @@ then VLC_ADD_LIBS([macosx], [-Wl,-framework,QTKit -Wl,-framework,IOKit -Wl,-framework,AddressBook -Wl,-framework,WebKit -Wl,-framework,CoreAudio -Wl,-framework,SystemConfiguration -Wl,-framework,ScriptingBridge]) - if test ! -d ${CONTRIB_DIR}/Sparkle.framework - then - AC_MSG_ERROR([Sparkle framework is required and was not found in ${CONTRIB_DIR}]) - fi - VLC_ADD_LIBS([macosx], [-F${CONTRIB_DIR} -Wl,-framework,Sparkle]) - VLC_ADD_OBJCFLAGS([macosx], [-F${CONTRIB_DIR}]) - if test ! -d ${CONTRIB_DIR}/BGHUDAppKit.framework then AC_MSG_ERROR([BGHUDAppKit framework is required and was not found in ${CONTRIB_DIR}]) @@ -3811,6 +3804,24 @@ then fi AM_CONDITIONAL(ENABLE_MACOSX_UI, [test "$enable_macosx" != "no"]) +dnl +dnl MacOS X sparkle update support +dnl +AC_ARG_ENABLE(sparkle, + [ --enable-sparkle Sparkle update support for OS X (default enabled on Mac OS X)]) +if test "x${enable_sparkle}" != "xno" -a "${SYS}" = "darwin" +then + if test ! -d ${CONTRIB_DIR}/Sparkle.framework + then + AC_MSG_ERROR([Sparkle framework is required and was not found in ${CONTRIB_DIR}]) + fi + VLC_ADD_LIBS([macosx], [-F${CONTRIB_DIR} -Wl,-framework,Sparkle]) + VLC_ADD_OBJCFLAGS([macosx], [-F${CONTRIB_DIR}]) + AC_DEFINE([HAVE_SPARKLE], [1], [Define to 1 if sparkle is enabled.]) +fi +AM_CONDITIONAL(HAVE_SPARKLE, [test "$enable_sparkle" != "no"]) + + dnl dnl Minimal Mac OS X module dnl diff --git a/extras/package/macosx/configure.sh b/extras/package/macosx/configure.sh index 03b0a0d64e..d4af05926d 100755 --- a/extras/package/macosx/configure.sh +++ b/extras/package/macosx/configure.sh @@ -16,7 +16,6 @@ esac OPTIONS=" --prefix=`pwd`/vlc_install_dir - --enable-update-check --enable-macosx --enable-merge-ffmpeg --enable-growl diff --git a/extras/package/macosx/package.mak b/extras/package/macosx/package.mak index 40e4fe5dc9..630eb9b59c 100644 --- a/extras/package/macosx/package.mak +++ b/extras/package/macosx/package.mak @@ -48,6 +48,9 @@ VLC-tmp: vlc xcodebuild -target vlc SYMROOT=../../../build DSTROOT=../../../build $(silentstd) cp -R $(top_builddir)/tmp/build/Default/VLC.bundle $@ mkdir -p $@/Contents/Frameworks && cp -R $(CONTRIB_DIR)/Growl.framework $@/Contents/Frameworks/ +if HAVE_SPARKLE + cp -R $(CONTRIB_DIR)/Sparkle.framework $@/Contents/Frameworks/ +endif mkdir -p $@/Contents/MacOS/share/locale/ cp -r "$(prefix)/lib/vlc/lua" "$(prefix)/share/vlc/lua" $@/Contents/MacOS/share/ mkdir -p $@/Contents/MacOS/include/ diff --git a/extras/package/macosx/vlc.xcodeproj/project.pbxproj b/extras/package/macosx/vlc.xcodeproj/project.pbxproj index 774365250a..87cf1c131e 100644 --- a/extras/package/macosx/vlc.xcodeproj/project.pbxproj +++ b/extras/package/macosx/vlc.xcodeproj/project.pbxproj @@ -682,7 +682,6 @@ CC402F430E00ABBB006A4BA4 /* QTKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CC1941240B9C1F8400635F6B /* QTKit.framework */; }; CC402F440E00ABBB006A4BA4 /* WebKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CC962E2C0CC7992800A56695 /* WebKit.framework */; }; CC426FD11020D44F00A32659 /* Sparkle.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CC426FD01020D44F00A32659 /* Sparkle.framework */; }; - CC426FD71020D47100A32659 /* Sparkle.framework in Copy Frameworks */ = {isa = PBXBuildFile; fileRef = CC426FD01020D44F00A32659 /* Sparkle.framework */; }; CC461F75160084A10022423C /* SharedDialogs.xib in Resources */ = {isa = PBXBuildFile; fileRef = CC461F73160084A10022423C /* SharedDialogs.xib */; }; CC4EFC2D13E96BD00091D19A /* dropzone.png in Resources */ = {isa = PBXBuildFile; fileRef = CC4EFC2C13E96BD00091D19A /* dropzone.png */; }; CC68B0331544C1AE00FD9C7F /* vlc-xmas.png in Resources */ = {isa = PBXBuildFile; fileRef = CC68B0321544C1AE00FD9C7F /* vlc-xmas.png */; }; @@ -859,7 +858,6 @@ dstSubfolderSpec = 10; files = ( CC84FB481300843200816D38 /* BGHUDAppKit.framework in Copy Frameworks */, - CC426FD71020D47100A32659 /* Sparkle.framework in Copy Frameworks */, ); name = "Copy Frameworks"; runOnlyForDeploymentPostprocessing = 0; diff --git a/modules/gui/macosx/MainMenu.m b/modules/gui/macosx/MainMenu.m index b11aa2dfbd..f57806b3ed 100644 --- a/modules/gui/macosx/MainMenu.m +++ b/modules/gui/macosx/MainMenu.m @@ -49,7 +49,7 @@ #import "DebugMessageVisualizer.h" #import "AddonsWindowController.h" -#ifdef UPDATE_CHECK +#ifdef HAVE_SPARKLE #import #endif @@ -148,7 +148,7 @@ static VLCMainMenu *_o_sharedInstance = nil; p_intf = VLCIntf; -#ifdef UPDATE_CHECK +#ifdef HAVE_SPARKLE [o_mi_checkForUpdate setAction:@selector(checkForUpdates:)]; [o_mi_checkForUpdate setTarget:[SUUpdater sharedUpdater]]; #else diff --git a/modules/gui/macosx/intf.m b/modules/gui/macosx/intf.m index e33831b1b3..39ffeb5ea7 100644 --- a/modules/gui/macosx/intf.m +++ b/modules/gui/macosx/intf.m @@ -67,7 +67,7 @@ #import "VideoEffects.h" #import "AudioEffects.h" -#ifdef UPDATE_CHECK +#ifdef HAVE_SPARKLE #import /* we're the update delegate */ #endif @@ -791,7 +791,7 @@ static VLCMain *_o_sharedMainInstance = nil; // So lets enqueue it into the loop for later execution. [o_mainwindow performSelector:@selector(makeKeyAndOrderFront:) withObject:nil afterDelay:0]; -#ifdef UPDATE_CHECK +#ifdef HAVE_SPARKLE [[SUUpdater sharedUpdater] setDelegate:self]; #endif } @@ -980,7 +980,7 @@ static bool f_appExit = false; #pragma mark - #pragma mark Sparkle delegate -#ifdef UPDATE_CHECK +#ifdef HAVE_SPARKLE /* received directly before the update gets installed, so let's shut down a bit */ - (void)updater:(SUUpdater *)updater willInstallUpdate:(SUAppcastItem *)update { diff --git a/modules/gui/macosx/simple_prefs.m b/modules/gui/macosx/simple_prefs.m index 4c1aa949fe..cd05a65932 100644 --- a/modules/gui/macosx/simple_prefs.m +++ b/modules/gui/macosx/simple_prefs.m @@ -38,7 +38,7 @@ #import "AppleRemote.h" #import "CoreInteraction.h" -#ifdef UPDATE_CHECK +#ifdef HAVE_SPARKLE #import //for o_intf_last_update_lbl #endif @@ -220,7 +220,7 @@ static VLCSimplePrefs *_o_sharedInstance = nil; { [self initStrings]; -#ifdef UPDATE_CHECK +#ifdef HAVE_SPARKLE [o_intf_update_ckb bind:@"value" toObject:[SUUpdater sharedUpdater] withKeyPath:@"automaticallyChecksForUpdates" @@ -591,7 +591,7 @@ static inline char * __config_GetLabel(vlc_object_t *p_this, const char *psz_nam [self setupButton: o_intf_mediakeys_ckb forBoolValue: "macosx-mediakeys"]; -#ifdef UPDATE_CHECK +#ifdef HAVE_SPARKLE if ([[SUUpdater sharedUpdater] lastUpdateCheckDate] != NULL) [o_intf_last_update_lbl setStringValue: [NSString stringWithFormat: _NS("Last check on: %@"), [[[SUUpdater sharedUpdater] lastUpdateCheckDate] descriptionWithLocale: [[NSUserDefaults standardUserDefaults] dictionaryRepresentation]]]]; else