[libgda] Added MacOSX bundle information



commit f3ef8bc08c98b5d436d4416fd203b3a34441b917
Author: Vivien Malerba <malerba gnome-db org>
Date:   Fri May 28 22:21:42 2010 +0200

    Added MacOSX bundle information

 installers/MacOSX/gda-browser/GdaBrowser.icns      |  Bin 0 -> 228093 bytes
 .../MacOSX/gda-browser/Info-gda-browser.plist      |   30 ++++
 installers/MacOSX/gda-browser/README               |   13 ++
 installers/MacOSX/gda-browser/gda-browser.bundle   |  148 ++++++++++++++++++++
 installers/MacOSX/gda-browser/gtkrc                |   75 ++++++++++
 installers/MacOSX/gda-browser/launcher.sh          |  129 +++++++++++++++++
 6 files changed, 395 insertions(+), 0 deletions(-)
---
diff --git a/installers/MacOSX/gda-browser/GdaBrowser.icns b/installers/MacOSX/gda-browser/GdaBrowser.icns
new file mode 100644
index 0000000..23d119a
Binary files /dev/null and b/installers/MacOSX/gda-browser/GdaBrowser.icns differ
diff --git a/installers/MacOSX/gda-browser/Info-gda-browser.plist b/installers/MacOSX/gda-browser/Info-gda-browser.plist
new file mode 100644
index 0000000..6168b6c
--- /dev/null
+++ b/installers/MacOSX/gda-browser/Info-gda-browser.plist
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd";>
+<plist version="1.0">
+<dict>
+    <key>CFBundleDevelopmentRegion</key>
+    <string>English</string>
+    <key>CFBundleExecutable</key>
+    <string>GdaBrowser</string>
+    <key>CFBundleGetInfoString</key>
+    <string>4.1.6, (C) 1997-2010 The Gnome-Db Team http://www.gnome-db.org</string>
+    <key>CFBundleIconFile</key>
+    <string>GdaBrowser.icns</string>
+    <key>CFBundleIdentifier</key>
+    <string>org.gnome-db</string>
+    <key>CFBundleInfoDictionaryVersion</key>
+    <string>6.0</string>
+    <key>CFBundlePackageType</key>
+    <string>APPL</string>
+    <key>CFBundleShortVersionString</key>
+    <string>4.1.6</string>
+    <key>CFBundleSignature</key>
+    <string>????</string>
+    <key>CFBundleVersion</key>
+    <string>4.1.6</string>
+    <key>NSHumanReadableCopyright</key>
+    <string>Copyright 1997 - 2010 The Gnome-Db Team, GNU General Public License.</string>
+    <key>LSMinimumSystemVersion</key>
+    <string>10.4</string>
+</dict>
+</plist>
diff --git a/installers/MacOSX/gda-browser/README b/installers/MacOSX/gda-browser/README
new file mode 100644
index 0000000..f5d71ca
--- /dev/null
+++ b/installers/MacOSX/gda-browser/README
@@ -0,0 +1,13 @@
+This directory contains information to build a MacOSX bundle after having compiled and
+installed Libgda and the GdaBrowser tool.
+
+The prerequisites are to have installed GTK+ and associated libraries and
+files using the instructions from http://gtk-osx.sourceforge.net
+and specifically the BUILD (http://sourceforge.net/apps/trac/gtk-osx/wiki/Build) and
+BUNDLE (http://sourceforge.net/apps/trac/gtk-osx/wiki/Bundle) pages.
+
+Follow these steps to create a bundle (GdaBrowser.app) on the desktop (~/Desktop):
+- set the PREFIX environment variable to the location where Libgda has been installed (the same
+  as the --prefix option passed to the configure script)
+- from this directory, run:
+  ige-mac-bundler gda-browser.bundle
\ No newline at end of file
diff --git a/installers/MacOSX/gda-browser/gda-browser.bundle b/installers/MacOSX/gda-browser/gda-browser.bundle
new file mode 100644
index 0000000..645eab5
--- /dev/null
+++ b/installers/MacOSX/gda-browser/gda-browser.bundle
@@ -0,0 +1,148 @@
+<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
+<app-bundle>
+
+  <meta>
+    <!-- Where to pick up the GTK+ installation, icon themes,
+         etc. Note that "${env:JHBUILD_PREFIX}" is evaluated to the
+         value of the environment variable JHBUILD_PREFIX. You can
+         define additional prefixes and refer to them in paths
+         throughout this file on the form "${prefix:name}". This is
+         useful for installing certain libraries or even the
+         application itself separately. Note that JHBUILD_PREFIX is
+         defined by jhbuild, so it you are not using jhbuild you can
+         either define your own or just hardcode the path here.
+    -->
+    <prefix name="default">${env:JHBUILD_PREFIX}</prefix>
+    <prefix name="localinstall">${env:PREFIX}</prefix>
+
+    <!-- The project directory is the default location of the created
+         app. If you leave out the path, the current directory is
+         used. Note the usage of an environment variable here again.
+    -->
+    <destination overwrite="yes">${env:HOME}/Desktop</destination>
+
+    <image>
+      <!-- Not implemented yet (DMG image). -->
+    </image>
+
+    <!-- Comment this out to keep the install names in binaries -->
+    <run-install-name-tool/>
+ 
+    <!-- Optionally specify a launcher script to use. If the
+         application sets up everything needed itself, like
+         environment variable, linker paths, etc, a launcher script is
+         not needed. If the source path is left out, the default
+         script will be used.
+    -->
+    <launcher-script>${project}/launcher.sh</launcher-script >
+
+    <!-- Not implemented: Optional runtime, could be python or mono
+         for example.
+    -->
+    <!--runtime copy="yes">/usr/bin/python</runtime-->
+  </meta>
+
+  <!-- The special macro "${project}" refers to the directory where
+       this bundle file is located. The application name and bundle
+       identifier are taken from the plist file.
+  -->
+  <plist>${project}/Info-gda-browser.plist</plist>
+
+  <main-binary>${prefix:localinstall}/bin/gda-browser-4.0</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>
+  <binary>
+    ${prefix}/lib/gtk-2.0/${pkg:gtk+-2.0:gtk_binary_version}/engines/*.so
+  </binary>
+  <binary>
+    ${prefix:localinstall}/bin/gda-control-center-4.0
+  </binary>
+  <binary>
+    ${prefix:localinstall}/lib/libgda-4.0/plugins/*.xml
+  </binary>
+  <binary>
+    ${prefix:localinstall}/lib/libgda-4.0/plugins/*.so
+  </binary>
+  <binary>
+    ${prefix:localinstall}/lib/libgda-4.0/providers/*.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 -->
+
+  <!-- Translation filenames, one for each program or library that you
+       want to copy in to the bundle. The "dest" attribute is
+       optional, as usual. Bundler will find all translations of that
+       library/program under the indicated directory and copy them.-->
+  <translations dest="${bundle}/Contents/Resources" name="gtk20">
+    ${prefix}/share/locale
+  </translations>
+
+  <translations dest="${bundle}/Contents/Resources" name="gtk20">
+    ${prefix}/share/locale
+  </translations>
+  <!--
+  <translations dest="${bundle}/Contents/Resources" name="libgda-4.0">
+    ${prefix:localinstall}/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>
+
+  <!-- Copy icons. Note that the .icns file is an Apple format which
+       contains up to 4 sizes of icon. You can use
+       /Developer/Applications/Utilities/Icon Composer.app to import
+       artwork and create the file. -->
+  <data dest="${bundle}/Contents/Resources">
+    ${project}/GdaBrowser.icns
+  </data>
+
+  <!-- This is where theme commands go. You can copy them in from your
+       theme of choice if they provide and example, or you can just
+       change the source path. -->
+
+  <data dest="${bundle}/Contents/Resources/etc/gtk-2.0/gtkrc">
+    ${project}/gtkrc
+  </data>
+  <data dest="${bundle}/Contents/Resources/etc/libgda-4.0">
+    ${prefix:localinstall}/etc/libgda-4.0
+  </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 -->
+
+</app-bundle>
diff --git a/installers/MacOSX/gda-browser/gtkrc b/installers/MacOSX/gda-browser/gtkrc
new file mode 100644
index 0000000..ba7477b
--- /dev/null
+++ b/installers/MacOSX/gda-browser/gtkrc
@@ -0,0 +1,75 @@
+# FIXME: What sizes should we have?
+gtk-icon-sizes = "gtk-menu=16,16:gtk-small-toolbar=16,16:gtk-large-toolbar=24,24:gtk-dnd=32,32"
+gtk-toolbar-icon-size = small-toolbar
+
+gtk_color_scheme = "fg_color:#000\nbg_color:ededed\nbase_color:#fff\ntext_color:#1A1A1A\nselected_bg_color:#86ABD9\nselected_fg_color:#fff\ntooltip_bg_color:#F5F5B5\ntooltip_fg_color:#000"
+
+gtk-button-images = 0
+gtk-menu-images = 0
+gtk-enable-mnemonics = 0
+
+style "quartz-default"
+{
+  xthickness = 0
+  ythickness = 0
+
+  GtkWidget::interior-focus = 1
+  GtkWidget::focus-line-width = 0
+  GtkWidget::focus-padding = 0
+
+  GtkButton::default-border = { 0, 0, 0, 0 }
+  GtkButton::default-outside-border = { 0, 0, 0, 0 }
+  GtkButton::child-displacement-x = 0
+  GtkButton::child-displacement-y = 0
+
+  GtkCheckButton::indicator-spacing = 3
+
+  #GtkOptionMenu::indicator-size = { 9, 5 }
+  #GtkOptionMenu::indicator-spacing = { 7, 5, 2, 2 }
+
+  # We have to set a shadow to get the whole box exposed
+  GtkSpinButton::shadow-type = out
+
+  GtkComboBox::appears-as-list = 0
+  GtkComboBox::focus-on-click = 0
+
+  GtkNotebook::tab-curvature = 4
+  GtkNotebook::tab-overlap = 0
+  
+  GtkTreeView::allow-rules = 1
+  GtkTreeView::expander-size = 14
+  GtkToolbar::internal-padding = 3
+  GtkExpander::expander-size = 14
+
+  GtkScrolledWindow::scrollbar-spacing = 0
+
+  #GtkMenuItem::toggle-spacing = ...
+  GtkMenuItem::horizontal-padding = 8
+  GtkSeparatorMenuItem::horizontal-padding = 2
+
+  engine "quartz"
+  {
+  }
+}
+class "*" style "quartz-default"
+
+style "quartz-toolbar"
+{
+  xthickness = 3
+  ythickness = 3
+}
+widget_class "*Toolbar*" style "quartz-toolbar"
+
+style "quartz-frame"
+{
+  xthickness = 2
+  ythickness = 2
+}
+widget_class "*.<GtkFrame>" style "quartz-frame"
+
+style "quartz-scrolled-window"
+{
+  xthickness = 2
+  ythickness = 2
+}
+widget_class "*.<GtkScrolledWindow>" style "quartz-scrolled-window"
diff --git a/installers/MacOSX/gda-browser/launcher.sh b/installers/MacOSX/gda-browser/launcher.sh
new file mode 100755
index 0000000..7846085
--- /dev/null
+++ b/installers/MacOSX/gda-browser/launcher.sh
@@ -0,0 +1,129 @@
+#!/bin/sh
+
+if test "x$IGE_DEBUG_LAUNCHER" != x; then
+    set -x
+fi
+
+if test "x$IGE_DEBUG_GDB" != x; then
+    EXEC="gdb --args"
+else
+    EXEC=exec
+fi
+
+name="`basename $0`"
+tmp="`pwd`/$0"
+tmp=`dirname "$tmp"`
+tmp=`dirname "$tmp"`
+bundle=`dirname "$tmp"`
+bundle_contents="$bundle"/Contents
+bundle_res="$bundle_contents"/Resources
+bundle_lib="$bundle_res"/lib
+bundle_bin="$bundle_res"/bin
+bundle_data="$bundle_res"/share
+bundle_etc="$bundle_res"/etc
+
+export DYLD_LIBRARY_PATH="$bundle_lib"
+export XDG_CONFIG_DIRS="$bundle_etc"/xdg
+export XDG_DATA_DIRS="$bundle_data"
+export GTK_DATA_PREFIX="$bundle_res"
+export GTK_EXE_PREFIX="$bundle_res"
+export GTK_PATH="$bundle_res"
+
+export GTK2_RC_FILES="$bundle_etc/gtk-2.0/gtkrc"
+export GTK_IM_MODULE_FILE="$bundle_etc/gtk-2.0/gtk.immodules"
+export GDK_PIXBUF_MODULE_FILE="$bundle_etc/gtk-2.0/gdk-pixbuf.loaders"
+export PANGO_RC_FILE="$bundle_etc/pango/pangorc"
+
+# Set the locale-related variables appropriately:
+unset LANG LC_MESSAGES LC_MONETARY
+
+# Start by trying the Collation preference, in case it's the only setting that exists.
+APPLECOLLATION=`defaults read .GlobalPreferences AppleCollationOrder`
+if test "${APPLECOLLATION}"; then
+  COLL=`ls -d /usr/share/locale/${APPLECOLLATION}*.UTF-8 2>> /dev/null`
+  if test "${COLL}"; then
+    # $COLL is potentially multi-line; concatenate lines by not using quotes.
+    export LANG=`echo ${COLL} | awk '{print $1}' | awk -F/ '{print $5}'`
+  fi
+fi
+unset APPLECOLLATION COLL
+
+# Continue by attempting to find the Locale preference.
+APPLELOCALE=`defaults read .GlobalPreferences AppleLocale`
+if test "${APPLELOCALE}"; then
+    LOCALELANG=`echo "${APPLELOCALE}" | awk -F@ '{print $1".UTF-8"}'`
+    if test -d "/usr/share/locale/${LOCALELANG}"; then
+        export LANG="${LOCALELANG}"
+    fi
+fi
+unset LOCALELANG
+
+# If there is still no locale value, then set US English as a default.
+if test -z "${LANG}"; then
+    export LANG=en_US.UTF-8
+fi
+
+# The AppleLocale setting may contain a currency-related substring.
+# Attempt to act on it.
+# First strip the string to just the currency symbol and the language symbol
+APPLECURRENCY=`echo "${APPLELOCALE}" | awk -F= '{print $2}'`
+APPLELANG=`echo "${APPLELOCALE}" | awk -F_ '{print $1}'`
+if test "${APPLECURRENCY}"; then
+    # The user has set a currency different from that of their locale.
+    # Search for a locale that uses that currency, and set LC_MONETARY accordingly.
+
+    # First try to find an LC_MONETARY file that combines the language with the currency.
+    FILES=`find /usr/share/locale/${APPLELANG}*UTF-8 -name LC_MONETARY -exec grep -H $APPLECURRENCY {} \;`
+    if test -z "$FILES"; then
+        # Otherwise try to find any LC_MONETARY file that uses that currency.
+        FILES=`find /usr/share/locale/*UTF-8 -name LC_MONETARY -exec grep -H $APPLECURRENCY {} \;`
+    fi
+
+    if test "$FILES"; then
+        # We found a locale that matches; set LC_MONETARY.
+        export LC_MONETARY=`echo ${FILES} | awk -F: '{print $1}' | awk -F/ '{print $5}'`
+    fi
+fi
+unset APPLECURRENCY APPLELANG APPLELOCALE FILES
+
+# Has a language ordering been set?
+# If so, set LC_MESSAGES accordingly; otherwise skip it.
+APPLELANGUAGES=`defaults read .GlobalPreferences AppleLanguages | awk 'length > 2' | awk -F, '{print $1}' | sed s/\ //g | sed s/-/_/ | sed s/\"//g`
+if test "$APPLELANGUAGES"; then
+    # A language ordering exists.
+    # Test, item per item, to see whether there is an corresponding locale.
+    for L in $APPLELANGUAGES
+    do
+        POS=`echo ${L} | awk '{print index(ENVIRON["LANG"], $0)}'`
+        if test $POS -eq 1; then
+            # The language symbol is a subset of the $LANG variable. We're done!
+            break
+        fi
+        # NOTE: the following may fail for the alternate Chinese localizations.
+        LC=`ls -d /usr/share/locale/${L}*.UTF-8 2>> /dev/null`
+        # $LC is potentially multi-line; concatenate lines by not using quotes.
+        if test $LC; then
+            # There is a UTF-8 locale matching this language.
+            export LC_MESSAGES=`echo ${LC} | awk '{print $1}' | awk -F/ '{print $5}'`
+            break
+        fi
+    done  
+fi
+unset APPLELANGUAGES POS LC L
+
+if test -f "$bundle_lib/charset.alias"; then
+    export CHARSETALIASDIR="$bundle_lib"
+fi
+
+# Extra arguments can be added in environment.sh.
+EXTRA_ARGS=
+if test -f "$bundle_res/environment.sh"; then
+  source "$bundle_res/environment.sh"
+fi
+
+# Strip out the argument added by the OS.
+if [ x`echo "x$1" | sed -e "s/^x-psn_.*//"` == x ]; then
+    shift 1
+fi
+
+$EXEC "$bundle_contents/MacOS/$name-bin" $* $EXTRA_ARGS



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]