spek

Acoustic spectrum analyser
git clone http://git.hanabi.in/repos/spek.git
Log | Files | Refs | README

commit 117e24098760f9cc595cb1c889bb807e916caa34
parent 21d2d447c511c3f5dc8c295a50f2fc8b867a64be
Author: Alexander Kojevnikov <alexander@kojevnikov.com>
Date:   Fri, 31 Aug 2012 10:29:24 -0700

osx: Bundle translations

Diffstat:
Mdist/osx/README.md | 4+++-
Mdist/osx/bundle.sh | 26++++++++------------------
2 files changed, 11 insertions(+), 19 deletions(-)

diff --git a/dist/osx/README.md b/dist/osx/README.md @@ -6,9 +6,11 @@ Using [MacPorts](http://www.macports.org/) install build dependencies: Download and build wxWidgets 2.9+, example configure flags: - ./configure --prefix=$HOME/usr --disable-shared --with-osx_cocoa \ + ./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: diff --git a/dist/osx/bundle.sh b/dist/osx/bundle.sh @@ -1,12 +1,7 @@ #!/bin/sh -case "$(uname)" in - Darwin) ;; - *) - echo "Unsupported system type: $(uname)" - exit 1 - ;; -esac +INSTALL_PATH=$HOME/usr +LANGUAGES="cs da de eo es fr it ja nl pl pt_BR ru sv uk zh_CN zh_TW" cd $(dirname $0)/../.. @@ -23,7 +18,11 @@ mv ../../src/spek Spek.app/Contents/MacOS/Spek cp Info.plist Spek.app/Contents/ cp Spek.icns Spek.app/Contents/Resources/ -# mv share/locale/{cs,da,de,eo,es,fr,it,ja,nl,pl,pt_BR,ru,sv,uk,zh_CN,zh_TW} share/locale_/ +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/ +done # Make DMG image VOLUME_NAME=Spek @@ -45,29 +44,20 @@ echo "Attaching to disk image..." hdiutil attach $DMG_FILE -readwrite -noautoopen -mountpoint $MOUNT_POINT -quiet echo "Populating image..." - cp -Rp $DMG_APP $MOUNT_POINT - -find $MOUNT_POINT -type d -iregex '.*\.svn$' &>/dev/null | xargs rm -rf - cd $MOUNT_POINT ln -s /Applications " " cd .. - cp DS_Store $MOUNT_POINT/.DS_Store echo "Detaching from disk image..." hdiutil detach $MOUNT_POINT -quiet - mv $DMG_FILE $DMG_FILE.master echo "Creating distributable image..." hdiutil convert -quiet -format UDBZ -o $DMG_FILE $DMG_FILE.master +rm $DMG_FILE.master echo "Done." -if [ ! "x$1" = "x-m" ]; then - rm $DMG_FILE.master -fi - cd ../..