spek

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

commit eec648b61916a22b8dc874c5279887658b171c2e
parent 8eb05be73958b42fc170bffc00155f85b6744a72
Author: Alexander Kojevnikov <alexander@kojevnikov.com>
Date:   Wed, 16 Jun 2010 22:41:22 +1000

[osx] Installer fixes

Diffstat:
Mosx/Info.plist | 4++--
Aosx/bundle.sh | 99+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Aosx/dmg-data/DS_Store | 0
Mosx/launcher.sh | 1+
Mosx/spek.bundle | 54++++++++----------------------------------------------
Rwin/make-win32.sh -> win/bundle.sh | 0
6 files changed, 110 insertions(+), 48 deletions(-)

diff --git a/osx/Info.plist b/osx/Info.plist @@ -7,7 +7,7 @@ <key>CFBundleExecutable</key> <string>Spek</string> <key>CFBundleGetInfoString</key> - <string>0.4, (C) 2010 Alexander Kojevnikov</string> + <string>Spek 0.4</string> <key>CFBundleIconFile</key> <string>Spek.icns</string> <key>CFBundleIdentifier</key> @@ -23,7 +23,7 @@ <key>CFBundleVersion</key> <string>0.4</string> <key>NSHumanReadableCopyright</key> - <string>Copyright 2010 Alexander Kojevnikov, GNU General Public License.</string> + <string>Copyright (c) 2010 Alexander Kojevnikov</string> <key>LSMinimumSystemVersion</key> <string>10.4</string> </dict> diff --git a/osx/bundle.sh b/osx/bundle.sh @@ -0,0 +1,98 @@ +#!/bin/sh + +# This script creates a Mac OS X app bundle and a DMG image from it +# using jhbuild/ige-mac-bundler. JHBuild scripts from the GTK-OSX +# project should be installed and properly configured. +# +# Also, the script assumes that all dependencies have already been built, +# including all (not so optional) GStreamer dependencies. GStreamer plugins +# will happily compile even if essential components such as libmad, libvorbis, +# flac, etc are missing. Make sure you have everything that you need installed. +# +# Example build sequence: +# +# $ jhbuild bootstrap +# $ jhbuild build +# +# Download GStreamer dependencies: +# BASE: libogg, libvorbis, libtheora +# GOOD: speex, flac, taglib, wavpack +# BAD: orc, schroedinger, faad2, libdca, libmodplug, libmpcdec, xvid +# UGLY: a52dec, libid3tag, libmad, libmpeg2 +# +# Install each one with: +# +# $ jhbuild shell +# $ ./configure --prefix=$PREFIX && make && make install +# $ exit +# +# Install GStreamer: +# +# $ jhbuild build meta-gstreamer +# $ jhbuild build gst-plugins-ugly +# +# IMPORTANT: the script must be run from the `jhbuild shell` environment. + +pushd $(dirname $0)/.. + +# Build Spek +./configure --prefix=$PREFIX && make && make install + +# Bundle +cd osx +ige-mac-bundler spek.bundle + +# Make DMG image +#./make-dmg.sh spek 0.4 spek.app +VOLUME_NAME=Spek +DMG_APP=Spek.app +DMG_FILE=$VOLUME_NAME.dmg +MOUNT_POINT=$VOLUME_NAME.mounted + +rm -f $DMG_FILE +rm -f $DMG_FILE.master + +# Compute an approximated image size in MB, and bloat by 1MB +image_size=$(du -ck $DMG_APP dmg-data | tail -n1 | cut -f1) +image_size=$((($image_size + 5000) / 1000)) + +echo "Creating disk image (${image_size}MB)..." +hdiutil create $DMG_FILE -megabytes $image_size -volname $VOLUME_NAME -fs HFS+ -quiet || exit $? + +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 + +pushd $MOUNT_POINT &>/dev/null +ln -s /Applications " " +popd &>/dev/null + +#mkdir $MOUNT_POINT/.background +#cp dmg-data/background.png $MOUNT_POINT/.background +cp dmg-data/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 + +#echo "Installing end user license agreement..." +#hdiutil flatten -quiet $DMG_FILE +#/Developer/Tools/Rez /Developer/Headers/FlatCarbon/*.r dmg-data/license.r -a -o $DMG_FILE +#hdiutil unflatten -quiet $DMG_FILE + +echo "Done." + +if [ ! "x$1" = "x-m" ]; then + rm $DMG_FILE.master +fi + +popd &>/dev/null +\ No newline at end of file diff --git a/osx/dmg-data/DS_Store b/osx/dmg-data/DS_Store Binary files differ. diff --git a/osx/launcher.sh b/osx/launcher.sh @@ -28,6 +28,7 @@ export XDG_DATA_DIRS="$bundle_data" export GTK_DATA_PREFIX="$bundle_res" export GTK_EXE_PREFIX="$bundle_res" export GTK_PATH="$bundle_res" +export GST_PLUGIN_PATH="$bundle_lib"/gstreamer-0.10 export GTK2_RC_FILES="$bundle_etc/gtk-2.0/gtkrc" export GTK_IM_MODULE_FILE="$bundle_etc/gtk-2.0/gtk.immodules" diff --git a/osx/spek.bundle b/osx/spek.bundle @@ -4,7 +4,7 @@ <meta> <prefix name="default">${env:JHBUILD_PREFIX}</prefix> - <destination overwrite="yes">${env:HOME}/Desktop</destination> + <destination overwrite="yes">${project}</destination> <image> <!-- Not implemented yet (DMG image). --> @@ -21,20 +21,11 @@ <main-binary>${prefix}/bin/spek</main-binary> - <!-- Copy in GTK+ modules. Note the use of the - "${pkg:module:variable}" macro, which evaluates to a pkg-config - variable in the specified module. Note that any libraries that - binaries link to are also copied in automatically. - --> - <binary> - ${prefix}/lib/gtk-2.0/${pkg:gtk+-2.0:gtk_binary_version}/loaders/*.so - </binary> - - <!-- Copy in GTK+ theme engines. Dunno why this is a dupe of - modules, but that's why it's commented out. > - <binary> - ${prefix}/lib/gtk-2.0/${pkg:gtk+-2.0:gtk_binary_version}/loaders/*.so - </binary --> + <binary>${prefix}/lib/gtk-2.0/${pkg:gtk+-2.0:gtk_binary_version}/engines/*.so</binary> + <binary>${prefix}/lib/gtk-2.0/${pkg:gtk+-2.0:gtk_binary_version}/immodules/*.so</binary> + <binary>${prefix}/lib/gtk-2.0/${pkg:gtk+-2.0:gtk_binary_version}/loaders/*.so</binary> + <binary>${prefix}/lib/gtk-2.0/${pkg:gtk+-2.0:gtk_binary_version}/printbackends/*.so</binary> + <binary>${prefix}/lib/gstreamer-0.10/*.so</binary> <!-- Translation filenames, one for each program or library that you want to copy in to the bundle. The "dest" attribute is @@ -44,21 +35,7 @@ ${prefix}/share/locale </translations> - <!-- Data to copy in, usually Glade/UI files, images, sounds files - etc. The destination inside the bundle can be specified if the - files should end up at a different location, by using the - "dest" property. The destination must then start with the macro - "${bundle}", which refers to the bundle root directory. - --> - <!-- data> - ${prefix}/share/giggle - </data --> - - <!-- Copy in the themes data. You may want to trim this to save space - in your bundle. --> - <data> - ${prefix}/share/themes - </data> + <data>${prefix}/share/themes</data> <!-- Copy icons. Note that the .icns file is an Apple format which contains up to 4 sizes of icon. You can use @@ -68,21 +45,6 @@ ${project}/Spek.icns </data --> - <data dest="${bundle}/Contents/Resources/etc/gtk-2.0/gtkrc"> - ${project}/gtkrc - </data> - - <!-- Icon themes to copy. The "icons" property can be either of - "auto", "all", or "none". All or none should be - self-explanatory, while auto means that the script will try to - figure out which icons are needed. This is done by getting all - the strings from all copied binaries, and matching them against - icon names. To be safe, you should use "all". "none" is useful - if you want just the index.theme file but no icons, mostly - needed for the "hicolor" base theme. - > - <icon-theme icons="auto"> - Tango - </icon-theme --> + <data dest="${bundle}/Contents/Resources/etc/gtk-2.0/gtkrc">${project}/gtkrc</data> </app-bundle> diff --git a/win/make-win32.sh b/win/bundle.sh