Skip to content

Commit

Permalink
Update macOS bundling
Browse files Browse the repository at this point in the history
  • Loading branch information
alexkay committed Feb 6, 2023
1 parent 2d5d805 commit 316be56
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 4 deletions.
9 changes: 9 additions & 0 deletions dist/osx/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 changes: 5 additions & 3 deletions dist/osx/bundle.sh
Original file line number Diff line number Diff line change
@@ -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"

Expand Down Expand Up @@ -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

Expand All @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion dist/win/bundle.sh
Original file line number Diff line number Diff line change
@@ -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.
Expand Down

0 comments on commit 316be56

Please sign in to comment.