[vlc-commits] [Git][videolan/vlc][master] 4 commits: macosx: Do not link against AddressBook.framework

Felix Paul Kühne (@fkuehne) gitlab at videolan.org
Thu Nov 3 08:06:53 UTC 2022



Felix Paul Kühne pushed to branch master at VideoLAN / VLC


Commits:
dc7c57f9 by David Fuhrmann at 2022-11-03T07:49:52+00:00
macosx: Do not link against AddressBook.framework

This seems to have been introduced in 2008 as a way to implement
crash reporting (see 63c2fc55d188aa50298069681285ebf2853455d0). This
has been long replaced by the Breakpad crash reporting UI.

- - - - -
7acec9d5 by David Fuhrmann at 2022-11-03T07:49:52+00:00
macosx: Fix usage of @available

@available directive needs to be the only element inside an if clause,
otherwise the compiler warns.

- - - - -
00ea7a3f by David Fuhrmann at 2022-11-03T07:49:52+00:00
macosx: Cleanup list of frameworks and includes

Framework umbrella headers are now included where they are used.
Explicit includes where added where the code relied on implicit
includes.

Reorder list of framework the macosx module needs, and clean it up:
Removed:
- CoreServices (not used)
- CoreMedia (not used, replaced by CoreAudio and CoreVideo)
- SystemConfiguration (was used in 3.0.x for title bar, not used anymore)

- - - - -
9ebaa186 by David Fuhrmann at 2022-11-03T07:49:52+00:00
macosx build.sh: Automatically detect HOST_ARCH

Do not hardcode HOST_ARCH to x86_64, but read out the actual arch from
the host system. This allows to always build a native build by default,
irregardless if you start the script on an intel or arm mac.

You can still overwrite the value using -a command line, in order to
start a cross compilation.

- - - - -


8 changed files:

- extras/package/macosx/build.sh
- extras/package/macosx/env.build.sh
- modules/gui/macosx/Makefile.am
- modules/gui/macosx/os-integration/VLCSystemVolume.m
- modules/gui/macosx/views/VLCBottomBarView.m
- modules/gui/macosx/views/VLCImageView.m
- modules/gui/macosx/views/VLCSliderCell.h
- modules/gui/macosx/views/VLCSliderCell.m


Changes:

=====================================
extras/package/macosx/build.sh
=====================================
@@ -118,9 +118,8 @@ if [ "$QUIET" = "yes" ]; then
 fi
 
 ACTUAL_HOST_ARCH=`get_actual_arch $HOST_ARCH`
-BUILD_ARCH=`get_buildsystem_arch $BUILD_ARCH`
 
-info "Building VLC for macOS, architecture ${ACTUAL_HOST_ARCH} on a ${BUILD_ARCH} device"
+info "Building VLC for macOS, architecture ${HOST_ARCH} (aka: ${ACTUAL_HOST_ARCH}) on a ${BUILD_ARCH} device"
 
 BUILD_TRIPLET=$(vlcGetBuildTriplet)
 HOST_TRIPLET=$(vlcGetHostTriplet)


=====================================
extras/package/macosx/env.build.sh
=====================================
@@ -1,7 +1,6 @@
 #!/bin/bash
 
-HOST_ARCH="x86_64"
-BUILD_ARCH=`uname -m | cut -d. -f1`
+
 MINIMAL_OSX_VERSION="10.11"
 
 get_actual_arch() {
@@ -20,6 +19,11 @@ get_buildsystem_arch() {
     fi
 }
 
+HOST_ARCH=`uname -m | cut -d. -f1`
+HOST_ARCH=`get_buildsystem_arch $HOST_ARCH`
+BUILD_ARCH=`uname -m | cut -d. -f1`
+BUILD_ARCH=`get_buildsystem_arch $BUILD_ARCH`
+
 vlcGetOSXKernelVersion() {
     local OSX_KERNELVERSION=$(uname -r | cut -d. -f1)
     if [ ! -z "$VLC_FORCE_KERNELVERSION" ]; then


=====================================
modules/gui/macosx/Makefile.am
=====================================
@@ -15,11 +15,15 @@ xib_verbose__0 = $(xib_verbose_0)
 
 libmacosx_plugin_la_OBJCFLAGS = $(AM_OBJCFLAGS) -fobjc-exceptions -fobjc-arc -I$(srcdir)/gui/macosx
 libmacosx_plugin_la_LDFLAGS = $(AM_LDFLAGS) -rpath '$(guidir)' \
-	-Wl,-framework,Cocoa -Wl,-framework,CoreServices \
-	-Wl,-framework,AVFoundation -Wl,-framework,CoreMedia -Wl,-framework,IOKit \
-	-Wl,-framework,AddressBook -Wl,-framework,WebKit -Wl,-framework,CoreAudio \
-	-Wl,-framework,SystemConfiguration -Wl,-framework,ScriptingBridge \
-	-Wl,-framework,QuartzCore -Wl,-weak_framework,MediaPlayer
+	-Wl,-framework,AVFoundation \
+	-Wl,-framework,Cocoa \
+	-Wl,-framework,CoreAudio \
+	-Wl,-framework,CoreVideo \
+	-Wl,-framework,IOKit \
+	-Wl,-framework,QuartzCore \
+	-Wl,-framework,ScriptingBridge \
+	-Wl,-framework,WebKit \
+	-Wl,-weak_framework,MediaPlayer
 
 if HAVE_SPARKLE
 libmacosx_plugin_la_LDFLAGS += -Wl,-framework,Sparkle


=====================================
modules/gui/macosx/os-integration/VLCSystemVolume.m
=====================================
@@ -20,6 +20,7 @@
  */
 
 #import <AudioToolbox/AudioToolbox.h>
+#import <CoreAudio/CoreAudio.h>
 
 #import "VLCSystemVolume.h"
 #import "main/VLCMain.h"


=====================================
modules/gui/macosx/views/VLCBottomBarView.m
=====================================
@@ -151,8 +151,10 @@
 
     BOOL setDark = NO;
 
-    if (@available(macOS 10.14, *) && [self.effectiveAppearance.name isEqualToString:NSAppearanceNameVibrantDark]) {
-        setDark = YES;
+    if (@available(macOS 10.14, *)) {
+        if ([self.effectiveAppearance.name isEqualToString:NSAppearanceNameVibrantDark]) {
+            setDark = YES;
+        }
     }
     
     _isDark = setDark;


=====================================
modules/gui/macosx/views/VLCImageView.m
=====================================
@@ -21,6 +21,9 @@
  *****************************************************************************/
 
 #import "VLCImageView.h"
+
+#import <QuartzCore/QuartzCore.h>
+
 #import "extensions/NSColor+VLCAdditions.h"
 #import "extensions/NSView+VLCAdditions.h"
 


=====================================
modules/gui/macosx/views/VLCSliderCell.h
=====================================
@@ -21,7 +21,6 @@
  *****************************************************************************/
 
 #import <Cocoa/Cocoa.h>
-#import <QuartzCore/QuartzCore.h>
 
 @interface VLCSliderCell : NSSliderCell
 


=====================================
modules/gui/macosx/views/VLCSliderCell.m
=====================================
@@ -22,6 +22,8 @@
 
 #import "VLCSliderCell.h"
 
+#import <CoreVideo/CoreVideo.h>
+
 #import "extensions/NSGradient+VLCAdditions.h"
 #import "extensions/NSColor+VLCAdditions.h"
 #import "main/CompatibilityFixes.h"



View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/78313041d4f7e77e72653ac217a95d13ee136b9f...9ebaa186f9de00933ff899dd0f1b0f10f3fd81ec

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/78313041d4f7e77e72653ac217a95d13ee136b9f...9ebaa186f9de00933ff899dd0f1b0f10f3fd81ec
You're receiving this email because of your account on code.videolan.org.


VideoLAN code repository instance


More information about the vlc-commits mailing list