Commit 2d1811bf authored by Rafaël Carré's avatar Rafaël Carré

OSX: make BGHUDAppKit and Sparkle optional

parent a33f16d7
......@@ -3750,26 +3750,23 @@ dnl MacOS X gui module
dnl
AC_ARG_ENABLE(macosx,
[ --enable-macosx Mac OS X gui support (default enabled on Mac OS X)])
if test "x${enable_macosx}" != "xno" &&
(test "${SYS}" = "darwin" || test "${enable_macosx}" = "yes")
if test "x${enable_macosx}" != "xno" -a "${SYS}" = "darwin"
then
VLC_ADD_LIBS([macosx minimal_macosx],[-Wl,-framework,Cocoa])
VLC_ADD_LIBS([macosx minimal_macosx],[-Wl,-framework,OpenGL])
VLC_ADD_LIBS([macosx minimal_macosx], [-Wl,-framework,Carbon])
VLC_ADD_LIBS([macosx minimal_macosx], [-Wl,-framework,CoreServices])
VLC_ADD_LIBS([macosx minimal_macosx], [-Wl,-framework,AGL])
VLC_ADD_LIBS([macosx], [-Wl,-framework,QTKit])
VLC_ADD_LIBS([macosx], [-Wl,-framework,IOKit])
VLC_ADD_LIBS([macosx], [-F${CONTRIB_DIR}/Sparkle -Wl,-framework,Sparkle])
VLC_ADD_OBJCFLAGS([macosx], [-F${CONTRIB_DIR}/Sparkle])
VLC_ADD_LIBS([macosx], [-F${CONTRIB_DIR}/BGHUDAppKit -Wl,-framework,BGHUDAppKit])
VLC_ADD_OBJCFLAGS([macosx], [-F${CONTRIB_DIR}/BGHUDAppKit])
dnl For bug report
VLC_ADD_LIBS([macosx], [-Wl,-framework,AddressBook])
VLC_ADD_LIBS([macosx], [-Wl,-framework,WebKit])
VLC_ADD_LIBS([macosx minimal_macosx], [-Wl,-framework,Cocoa -Wl,-framework,OpenGL -Wl,-framework,Carbon -Wl,-framework,CoreServices -Wl,-framework,AGL])
VLC_ADD_OBJCFLAGS([macosx minimal_macosx], [-fobjc-exceptions] )
VLC_ADD_PLUGIN([macosx minimal_macosx])
VLC_ADD_LIBS([macosx], [-Wl,-framework,QTKit -Wl,-framework,IOKit -Wl,-framework,AddressBook -Wl,-framework,WebKit])
AC_CHECK_HEADERS(Sparkle/Sparkle.h, [
VLC_ADD_LIBS([macosx], [-F${CONTRIB_DIR}/Sparkle -Wl,-framework,Sparkle])
VLC_ADD_OBJCFLAGS([macosx], [-F${CONTRIB_DIR}/Sparkle])
])
if test -d ${CONTRIB_DIR}/BGHUDAppKit
then
VLC_ADD_LIBS([macosx], [-F${CONTRIB_DIR}/BGHUDAppKit -Wl,-framework,BGHUDAppKit])
VLC_ADD_OBJCFLAGS([macosx], [-F${CONTRIB_DIR}/BGHUDAppKit])
fi
fi
dnl
......
......@@ -27,6 +27,10 @@
/*****************************************************************************
* Preamble
*****************************************************************************/
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
#include <stdlib.h> /* malloc(), free() */
#include <sys/param.h> /* for MAXPATHLEN */
#include <string.h>
......@@ -58,7 +62,9 @@
#import "TrackSynchronization.h"
#import <AddressBook/AddressBook.h> /* for crashlog send mechanism */
#import <Sparkle/Sparkle.h> /* we're the update delegate */
#ifdef HAVE_SPARKLE_SPARKLE_H
# import <Sparkle/Sparkle.h> /* we're the update delegate */
#endif
/*****************************************************************************
* Local prototypes.
......@@ -756,6 +762,7 @@ static VLCMain *_o_sharedMainInstance = nil;
[self setIntf:nil];
}
#ifdef HAVE_SPARKLE_SPARKLE_H
#pragma mark -
#pragma mark Sparkle delegate
/* received directly before the update gets installed, so let's shut down a bit */
......@@ -765,6 +772,7 @@ static VLCMain *_o_sharedMainInstance = nil;
[o_remote stopListening: self];
var_SetInteger( p_intf->p_libvlc, "key-action", ACTIONID_STOP );
}
#endif
#pragma mark -
#pragma mark Media Key support
......
......@@ -20,6 +20,9 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
#import "CompatibilityFixes.h"
#import "simple_prefs.h"
......@@ -31,7 +34,10 @@
#import "misc.h"
#import "intf.h"
#import "AppleRemote.h"
#import <Sparkle/Sparkle.h> //for o_intf_last_update_lbl
#ifdef HAVE_SPARKLE_SPARKLE_H
# import <Sparkle/Sparkle.h> //for o_intf_last_update_lbl
#endif
static NSString* VLCSPrefsToolbarIdentifier = @"Our Simple Preferences Toolbar Identifier";
static NSString* VLCIntfSettingToolbarIdentifier = @"Intf Settings Item Identifier";
......@@ -453,9 +459,11 @@ static inline char * __config_GetLabel( vlc_object_t *p_this, const char *psz_na
[self setupButton: o_intf_embedded_ckb forBoolValue: "embedded-video"];
[self setupButton: o_intf_appleremote_ckb forBoolValue: "macosx-appleremote"];
[self setupButton: o_intf_mediakeys_ckb forBoolValue: "macosx-mediakeys"];
#ifdef HAVE_SPARKLE_SPARKLE_H
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
#endif
[o_intf_last_update_lbl setStringValue: _NS("No check was performed yet.")];
psz_tmp = config_GetPsz( p_intf, "control" );
if (psz_tmp) {
......
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