From 316be56b6675b29a6f1b563a1dbe7fbd7c034554 Mon Sep 17 00:00:00 2001 From: Alexander Kojevnikov Date: Mon, 6 Feb 2023 12:43:42 -0800 Subject: [PATCH] Update macOS bundling --- dist/osx/README.md | 9 +++++++++ dist/osx/bundle.sh | 8 +++++--- dist/win/bundle.sh | 2 +- 3 files changed, 15 insertions(+), 4 deletions(-) diff --git a/dist/osx/README.md b/dist/osx/README.md index 011feea..3621949 100644 --- a/dist/osx/README.md +++ b/dist/osx/README.md @@ -5,6 +5,15 @@ Using [Homebrew](http://brew.sh) install build dependencies: brew install automake coreutils git brew install ffmpeg wxwidgets +Add a missing symlink: + + (cd /usr/local/share/aclocal && ln -s ../../Cellar/wxwidgets/3.2.1/share/wx/3.2/aclocal/wxwin.m4 .) + +Fix libbrotli loader_path: + + install_name_tool -change "@loader_path/libbrotlicommon.1.dylib" "/usr/local/lib/libbrotlicommon.1.dylib" /usr/local/lib/libbrotlidec.1.dylib + install_name_tool -change "@loader_path/libbrotlicommon.1.dylib" "/usr/local/lib/libbrotlicommon.1.dylib" /usr/local/lib/libbrotlienc.1.dylib + Bundle Spek: ./dist/osx/bundle.sh diff --git a/dist/osx/bundle.sh b/dist/osx/bundle.sh index c35f76a..34733ca 100755 --- a/dist/osx/bundle.sh +++ b/dist/osx/bundle.sh @@ -1,4 +1,6 @@ -#!/bin/sh +#!/usr/bin/env bash + +set -euo pipefail LANGUAGES="bs ca cs da de el eo es fi fr gl he hr hu id it ja ko lv nb nl nn pl pt_BR ru sk sr@latin sv th tr uk vi zh_CN zh_TW" @@ -26,7 +28,7 @@ cp ../../lic/* Spek.app/Contents/Resources/lic/ for lang in $LANGUAGES; do mkdir -p Spek.app/Contents/Resources/"$lang".lproj cp -v ../../po/"$lang".gmo Spek.app/Contents/Resources/"$lang".lproj/spek.mo - cp -v /usr/local/share/locale/"$lang"/LC_MESSAGES/wxstd.mo Spek.app/Contents/Resources/"$lang".lproj/ + cp -v /usr/local/share/locale/"$lang"/LC_MESSAGES/wxstd-3.2.mo Spek.app/Contents/Resources/"$lang".lproj/ || echo "No WX translation for $lang" done mkdir -p Spek.app/Contents/Resources/en.lproj @@ -35,7 +37,7 @@ while [ ! -z "$BINS" ]; do NEWBINS="" for bin in $BINS; do echo "Updating dependendies for $bin." - LIBS=$(otool -L $bin | grep /usr/local | tr -d '\t' | awk '{print $1}') + LIBS=$(otool -L $bin | { grep /usr/local || test $? = 1; } | tr -d '\t' | awk '{print $1}') for lib in $LIBS; do reallib=$(realpath $lib) libname=$(basename $reallib) diff --git a/dist/win/bundle.sh b/dist/win/bundle.sh index 61d6c28..c4fc115 100755 --- a/dist/win/bundle.sh +++ b/dist/win/bundle.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -set -euxo pipefail +set -euo pipefail # This script will cross-compile spek.exe, make a ZIP archive and prepare files # for building an MSI installer under Windows.