Commit 2a584bfb authored by David's avatar David
Browse files

macosx: add own configure switch to disable the sparkle update framework

--enable-update-check enables update support in core, which is not needed
for the mac platform. To avoid linking libgcrypt into the core, instead a
new configure switch is introduced to disable sparkle support directly.

Now, for disabling sparkle support, one needs to pass --disable-sparkle.
It completely removed sparkle from the GUI, and does not copy the
framework to the final bundle as well.
parent 351869f2
......@@ -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
......
......@@ -16,7 +16,6 @@ esac
OPTIONS="
--prefix=`pwd`/vlc_install_dir
--enable-update-check
--enable-macosx
--enable-merge-ffmpeg
--enable-growl
......
......@@ -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/
......
......@@ -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;
......
......@@ -49,7 +49,7 @@
#import "DebugMessageVisualizer.h"
#import "AddonsWindowController.h"
#ifdef UPDATE_CHECK
#ifdef HAVE_SPARKLE
#import <Sparkle/Sparkle.h>
#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
......
......@@ -67,7 +67,7 @@
#import "VideoEffects.h"
#import "AudioEffects.h"
#ifdef UPDATE_CHECK
#ifdef HAVE_SPARKLE
#import <Sparkle/Sparkle.h> /* 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
{
......
......@@ -38,7 +38,7 @@
#import "AppleRemote.h"
#import "CoreInteraction.h"
#ifdef UPDATE_CHECK
#ifdef HAVE_SPARKLE
#import <Sparkle/Sparkle.h> //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
......
Markdown is supported
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