Update macOS bundling

This commit is contained in:
Alexander Kojevnikov 2023-02-06 12:43:42 -08:00
parent 2d5d8059c8
commit 316be56b66
3 changed files with 15 additions and 4 deletions

9
dist/osx/README.md vendored
View File

@ -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

8
dist/osx/bundle.sh vendored
View File

@ -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)

2
dist/win/bundle.sh vendored
View File

@ -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.