spek

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

commit 68e59cd5ede59f89b6fc4cf467ab13ba113f9e18
parent 3d2ddd015d7959cc32cfc1af634b9878cb3501d7
Author: Alexander Kojevnikov <alexander@kojevnikov.com>
Date:   Sat, 19 Jun 2010 18:52:26 +0900

[osx] Bundle fixes

Diffstat:
Mbockbuild/profiles/spek/skeleton.darwin/Contents/MacOS/Spek | 27++++++++++++++++++++++++++-
Mbockbuild/profiles/spek/skeleton.darwin/Contents/Resources/etc/gtk-2.0/gtkrc | 2+-
Abockbuild/profiles/spek/skeleton.darwin/Contents/Resources/first-run | 0
Mbundle.sh | 1-
4 files changed, 27 insertions(+), 3 deletions(-)

diff --git a/bockbuild/profiles/spek/skeleton.darwin/Contents/MacOS/Spek b/bockbuild/profiles/spek/skeleton.darwin/Contents/MacOS/Spek @@ -53,6 +53,31 @@ EOF exit 1 fi -# mkdir -p "$SPEK_CONFIG_DIR" +mkdir -p "$SPEK_CONFIG_DIR" + +if [ -f "$RES_DIR/first-run" ]; then + echo "Appears to be first run of this application bundle." + rm -f -- "$RES_DIR/first-run" + PREVIOUS_APP_ROOT="" +else + PREVIOUS_APP_ROOT="$(cat "$SPEK_CONFIG_DIR/app-bundle-location" 2>/dev/null)" +fi + +if [ ! "$APP_ROOT" = "$PREVIOUS_APP_ROOT" ]; then + echo "Application bundle has moved. Adjusting bundle..." + + # Adjust config files that need absolute paths to things + # in the bundle (e.g. pango, GDK pixbuf loaders...) + IFS=$'\n' + for file in $(find "$ETC_DIR" -name \*.in); do + sed "s|\${APP_RESOURCES}|${RES_DIR}|g" \ + < "${file}" \ + > "${file%.in}" + done + unset IFS + + # Store the new location of the bundle + echo "$APP_ROOT" > "$SPEK_CONFIG_DIR/app-bundle-location" +fi exec -a $SPEK_EXEC_NAME "$SPEK_BIN" diff --git a/bockbuild/profiles/spek/skeleton.darwin/Contents/Resources/etc/gtk-2.0/gtkrc b/bockbuild/profiles/spek/skeleton.darwin/Contents/Resources/etc/gtk-2.0/gtkrc @@ -257,7 +257,7 @@ style "murrine-radiocheck" = "murrine-default" { } style "smaller-text" { - font_name = "7" +# font_name = "7" } style "handle" { diff --git a/bockbuild/profiles/spek/skeleton.darwin/Contents/Resources/first-run b/bockbuild/profiles/spek/skeleton.darwin/Contents/Resources/first-run diff --git a/bundle.sh b/bundle.sh @@ -9,7 +9,6 @@ # TODO: # - DS_Store -# - gtkrc tune up # - ffmpeg and deps above # - credit bockbuild