From eec648b61916a22b8dc874c5279887658b171c2e Mon Sep 17 00:00:00 2001 From: Alexander Kojevnikov Date: Wed, 16 Jun 2010 22:41:22 +1000 Subject: [PATCH] [osx] Installer fixes --- osx/Info.plist | 4 +- osx/bundle.sh | 98 +++++++++++++++++++++++++++++++ osx/dmg-data/DS_Store | Bin 0 -> 6148 bytes osx/launcher.sh | 1 + osx/spek.bundle | 54 +++-------------- win/{make-win32.sh => bundle.sh} | 0 6 files changed, 109 insertions(+), 48 deletions(-) create mode 100755 osx/bundle.sh create mode 100644 osx/dmg-data/DS_Store rename win/{make-win32.sh => bundle.sh} (100%) diff --git a/osx/Info.plist b/osx/Info.plist index e900d7d..0543e95 100644 --- a/osx/Info.plist +++ b/osx/Info.plist @@ -7,7 +7,7 @@ CFBundleExecutable Spek CFBundleGetInfoString - 0.4, (C) 2010 Alexander Kojevnikov + Spek 0.4 CFBundleIconFile Spek.icns CFBundleIdentifier @@ -23,7 +23,7 @@ CFBundleVersion 0.4 NSHumanReadableCopyright - Copyright 2010 Alexander Kojevnikov, GNU General Public License. + Copyright (c) 2010 Alexander Kojevnikov LSMinimumSystemVersion 10.4 diff --git a/osx/bundle.sh b/osx/bundle.sh new file mode 100755 index 0000000..3cf86d7 --- /dev/null +++ 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 new file mode 100644 index 0000000000000000000000000000000000000000..18409e7ecef6277afe01854537befa44b1e2521a GIT binary patch literal 6148 zcmeHK&2AGh5FWRwQksy47Nkl@u&M|gDrJkrDW?#EphAdBg>og?-6m-^>nNL~*POT_ zApv&;R~`X+>4hiY%%QIlzOlVDKShWOLdX-1#~#m&J>Ra!St1gZfq$DQPejXLmZ=pq z=Mc{`&(VU>WFQ5{kahGBO5B~ZwF--XMd05dq|Q7EGZG_Mn% zVKZ*Z9s=CbnwHm)CJNV|lwo+cykRoqpnr!(k&J@6>~~<3Sn^(cE=;^5SoL*uRqLSX zw!FTM&WWgWP|(tqS`;^ffHkvpQs`_x+@d7}Jj~T=Uc1qggUBy-RT{I_zZ;7-;@wQF z7;B=7Nl8uAnc~?xTv~y{N#P@x*-NH>fWBaC#33!vrrCaJ!mo4|LTxoi*C1q(S`?70L zJwE;L9To|yZS)0Yc|YLi^mz3%a=5`Ml%B;wFD}(;JsFiukkaIybF@L38T5)kx1*3< z!L!-};vsmAuB%|K3g((%349uWbrLSo6|A1+H-s59AHRlY*PTAb#P7yCb&9o@ay@JK zXn>Zv23WEPSOhErlL&BqaKJ3fMvk;pr2`G>x|-*^SrK&nEx|sHk!2%CT4Dwyv@4`` z73LE|Xm{uxV^=nEq@{Kzp;ks5v$8N>C_=3cy`#)Yl(n?2MZh93jliNF=K21=|LgDn zX(v0f2v`LED+ENUx>v0rC3CmVCC7KI1AYN!V!M%+$_0(Nj#Y=R;tjAO%sJeFEE_q} S5*m>GBcNcgjYZ(EBJcyu7TBZ! literal 0 HcmV?d00001 diff --git a/osx/launcher.sh b/osx/launcher.sh index 7846085..ca3d103 100755 --- 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 index 6cf7d44..af8028a 100644 --- a/osx/spek.bundle +++ b/osx/spek.bundle @@ -4,7 +4,7 @@ ${env:JHBUILD_PREFIX} - ${env:HOME}/Desktop + ${project} @@ -21,20 +21,11 @@ ${prefix}/bin/spek - - - ${prefix}/lib/gtk-2.0/${pkg:gtk+-2.0:gtk_binary_version}/loaders/*.so - - - + ${prefix}/lib/gtk-2.0/${pkg:gtk+-2.0:gtk_binary_version}/engines/*.so + ${prefix}/lib/gtk-2.0/${pkg:gtk+-2.0:gtk_binary_version}/immodules/*.so + ${prefix}/lib/gtk-2.0/${pkg:gtk+-2.0:gtk_binary_version}/loaders/*.so + ${prefix}/lib/gtk-2.0/${pkg:gtk+-2.0:gtk_binary_version}/printbackends/*.so + ${prefix}/lib/gstreamer-0.10/*.so - - - - - ${prefix}/share/themes - + ${prefix}/share/themes - - ${project}/gtkrc - - - + ${project}/gtkrc diff --git a/win/make-win32.sh b/win/bundle.sh similarity index 100% rename from win/make-win32.sh rename to win/bundle.sh