[vlc-commits] macOS build.sh: Add options for release build

David Fuhrmann git at videolan.org
Thu Dec 28 20:44:10 CET 2017


vlc | branch: master | David Fuhrmann <dfuhrmann at videolan.org> | Wed Dec 27 19:45:32 2017 +0100| [85975db4a8e3bcdad840277cd82d72c3e85f778e] | committer: David Fuhrmann

macOS build.sh: Add options for release build

Adds parameter option -i to specify the type of package to be build.
Adds -b parameter to pass breakpad URL.
Also adds a way to overwrite the macOS kernel version via environment
variable, which can be useful if someone wants to use an older contribs
package.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=85975db4a8e3bcdad840277cd82d72c3e85f778e
---

 extras/package/macosx/build.sh | 36 ++++++++++++++++++++++++++++++++++--
 1 file changed, 34 insertions(+), 2 deletions(-)

diff --git a/extras/package/macosx/build.sh b/extras/package/macosx/build.sh
index 4841834b85..54c77f34cc 100755
--- a/extras/package/macosx/build.sh
+++ b/extras/package/macosx/build.sh
@@ -19,6 +19,10 @@ VLCBUILDDIR=""
 CORE_COUNT=`getconf NPROCESSORS_ONLN 2>&1`
 let JOBS=$CORE_COUNT+1
 
+if [ ! -z "$VLC_FORCE_KERNELVERSION" ]; then
+    OSX_KERNELVERSION="$VLC_FORCE_KERNELVERSION"
+fi
+
 usage()
 {
 cat << EOF
@@ -33,9 +37,11 @@ OPTIONS:
    -r            Rebuild everything (tools, contribs, vlc)
    -c            Recompile contribs from sources
    -p            Build packages for all artifacts
+   -i <n|u>      Create an installable package (n: nightly, u: unsigned stripped release archive)
    -k <sdk>      Use the specified sdk (default: $SDKROOT)
    -a <arch>     Use the specified arch (default: $ARCH)
    -C            Use the specified VLC build dir
+   -b <url>      Enable breakpad support and send crash reports to this URL
 EOF
 
 }
@@ -50,7 +56,7 @@ spopd()
     popd > /dev/null
 }
 
-while getopts "hvrcpk:a:j:C:" OPTION
+while getopts "hvrcpi:k:a:j:C:b:" OPTION
 do
      case $OPTION in
          h)
@@ -70,6 +76,9 @@ do
          p)
              PACKAGE="yes"
          ;;
+         i)
+             PACKAGETYPE=$OPTARG
+         ;;
          a)
              ARCH=$OPTARG
          ;;
@@ -82,6 +91,9 @@ do
          C)
              VLCBUILDDIR=$OPTARG
          ;;
+         b)
+             BREAKPAD=$OPTARG
+         ;;
      esac
 done
 shift $(($OPTIND - 1))
@@ -232,6 +244,11 @@ fi
 # vlc/configure
 #
 
+CONFIGFLAGS=""
+if [ ! -z "$BREAKPAD" ]; then
+     CONFIGFLAGS="$CONFIGFLAGS --with-breakpad=$BREAKPAD"
+fi
+
 if [ "${vlcroot}/configure" -nt Makefile ]; then
 
   ${vlcroot}/extras/package/macosx/configure.sh \
@@ -239,6 +256,7 @@ if [ "${vlcroot}/configure" -nt Makefile ]; then
       --host=$TRIPLET \
       --with-macosx-version-min=$MINIMAL_OSX_VERSION \
       --with-macosx-sdk=$SDKROOT \
+      $CONFIGFLAGS \
       $VLC_CONFIGURE_ARGS > $out
 fi
 
@@ -259,7 +277,21 @@ info "Preparing VLC.app"
 make VLC.app
 
 
-if [ "$PACKAGE" = "yes" ]; then
+if [ "$PACKAGETYPE" = "u" ]; then
+    info "Copying app with debug symbols into VLC-debug.app and stripping"
+    rm -rf VLC-debug.app
+    cp -R VLC.app VLC-debug.app
+
+    find VLC.app/ -name "*.dylib" -exec strip -u -r {} \;
+    find VLC.app/ -type f -name "VLC" -exec strip -u -r {} \;
+    find VLC.app/ -type f -name "Sparkle" -exec strip -u -r {} \;
+    find VLC.app/ -type f -name "Growl" -exec strip -u -r {} \;
+    find VLC.app/ -type f -name "Breakpad" -exec strip -u -r {} \;
+
+    info "Building VLC release archive"
+    make package-macosx-release
+    shasum -a 512 vlc-*-release.zip
+elif [ "$PACKAGETYPE" = "n" -o "$PACKAGE" = "yes" ]; then
     info "Building VLC dmg package"
     make package-macosx
 fi



More information about the vlc-commits mailing list