mirror of
https://github.com/alexkay/spek.git
synced 2025-04-15 00:00:36 +03:00
osx: Use Homebrew for dependencies
This commit is contained in:
parent
5b24d780ba
commit
099da06738
37
dist/osx/README.md
vendored
37
dist/osx/README.md
vendored
@ -1,39 +1,10 @@
|
||||
# Building the OS X bundle
|
||||
|
||||
Using [MacPorts](https://www.macports.org/) install build dependencies:
|
||||
Using [Homebrew](http://brew.sh) install build dependencies:
|
||||
|
||||
port install autoconf automake gcc48 git-core intltool upx yasm
|
||||
|
||||
Download and build wxWidgets 2.9+, example configure flags:
|
||||
|
||||
./configure --prefix=$HOME/usr --disable-shared \
|
||||
--enable-intl --with-osx_cocoa \
|
||||
--with-jpeg=builtin --with-png=builtin --with-regex=builtin \
|
||||
--with-tiff=builtin --with-zlib=builtin --with-expat=builtin
|
||||
cd locale; make allmo; cd ..
|
||||
make && make install
|
||||
|
||||
Copy the wxWidgets m4 macro to the MacPorts tree:
|
||||
|
||||
sudo cp $HOME/usr/share/aclocal/wxwin.m4 /opt/local/share/aclocal/
|
||||
|
||||
Download and build libopus, example configure flags:
|
||||
|
||||
./configure --prefix=$HOME/usr --disable-shared
|
||||
make && make install
|
||||
|
||||
Download and build FFmpeg, example configure flags:
|
||||
|
||||
PKG_CONFIG_PATH=$HOME/usr/lib/pkgconfig ./configure \
|
||||
--prefix=$HOME/usr --enable-gpl --enable-version3 \
|
||||
--enable-runtime-cpudetect --enable-pthreads \
|
||||
--disable-shared --disable-debug --disable-doc \
|
||||
--disable-nonfree --disable-programs --disable-avdevice \
|
||||
--disable-swresample --disable-swscale --disable-postproc \
|
||||
--disable-avfilter --disable-encoders --disable-muxers \
|
||||
--disable-devices --disable-filters \
|
||||
--enable-libopus
|
||||
make && make install
|
||||
brew install autoconf automake coreutils git intltool libtool pkg-config
|
||||
brew install ffmpeg gettext wxmac
|
||||
brew link --force gettext
|
||||
|
||||
Bundle Spek:
|
||||
|
||||
|
32
dist/osx/bundle.sh
vendored
32
dist/osx/bundle.sh
vendored
@ -1,21 +1,17 @@
|
||||
#!/bin/sh
|
||||
|
||||
INSTALL_PATH=$HOME/usr
|
||||
LANGUAGES="ca cs da de el eo es fi fr gl it ja lv nb nl pl pt_BR ru sk sr@latin sv tr uk vi zh_CN zh_TW"
|
||||
|
||||
cd $(dirname $0)/../..
|
||||
|
||||
rm -f src/spek
|
||||
|
||||
PKG_CONFIG_PATH=$INSTALL_PATH/lib/pkgconfig CXX=/opt/local/bin/g++-mp-4.8 \
|
||||
./autogen.sh --with-wx-config=$INSTALL_PATH/bin/wx-config \
|
||||
&& make && make check || exit 1
|
||||
strip src/spek
|
||||
upx src/spek
|
||||
./autogen.sh && make -j8 || exit 1
|
||||
|
||||
cd dist/osx
|
||||
rm -fr Spek.app
|
||||
mkdir -p Spek.app/Contents/MacOS
|
||||
mkdir -p Spek.app/Contents/Frameworks
|
||||
mkdir -p Spek.app/Contents/Resources
|
||||
mv ../../src/spek Spek.app/Contents/MacOS/Spek
|
||||
cp Info.plist Spek.app/Contents/
|
||||
@ -29,10 +25,32 @@ 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 "$INSTALL_PATH"/share/locale/"$lang"/LC_MESSAGES/wxstd.mo Spek.app/Contents/Resources/"$lang".lproj/
|
||||
cp -v /usr/local/share/locale/"$lang"/LC_MESSAGES/wxstd.mo Spek.app/Contents/Resources/"$lang".lproj/
|
||||
done
|
||||
mkdir -p Spek.app/Contents/Resources/en.lproj
|
||||
|
||||
BINS="Spek.app/Contents/MacOS/Spek"
|
||||
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}')
|
||||
for lib in $LIBS; do
|
||||
reallib=$(realpath $lib)
|
||||
libname=$(basename $reallib)
|
||||
install_name_tool -change $lib @executable_path/../Frameworks/$libname $bin
|
||||
if [ ! -f Spek.app/Contents/Frameworks/$libname ]; then
|
||||
echo "\tBundling $reallib."
|
||||
cp $reallib Spek.app/Contents/Frameworks/
|
||||
chmod +w Spek.app/Contents/Frameworks/$libname
|
||||
install_name_tool -id @executable_path/../Frameworks/$libname Spek.app/Contents/Frameworks/$libname
|
||||
NEWBINS="$NEWBINS Spek.app/Contents/Frameworks/$libname"
|
||||
fi
|
||||
done
|
||||
done
|
||||
BINS="$NEWBINS"
|
||||
done
|
||||
|
||||
# Make DMG image
|
||||
VOLUME_NAME=Spek
|
||||
DMG_APP=Spek.app
|
||||
|
Loading…
x
Reference in New Issue
Block a user