<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
<app-bundle>

  <meta>
    <prefix name="default">${env:JHBUILD_PREFIX}</prefix>
    <destination overwrite="yes">${env:HOME}/Desktop</destination>
    <run-install-name-tool/>
    <launcher-script>${project}/launcher.sh</launcher-script >
  </meta>

  <plist>${project}/Info.plist</plist>
  <!-- We have to have this, but the result is ignored. -->
  <main-binary>
     ${prefix}/bin/virtaal
  </main-binary>

  <!-- We need to pack our own Python to avoid compatibility problems. -->
  <binary dest="${bundle}/Contents/MacOS">
    ${prefix}/bin/python
  </binary>
  <!-- Also add a python runfile which sets up the environment and localizations -->
  <data dest="${bundle}/Contents/MacOS">
    ${project}/runvirtaal.py
  </data>
  <!-- We need tmserver -->
  <data dest="${bundle}/Contents/MacOS">
    ${prefix}/bin/tmserver
  </data>
  <!-- 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/gdk-pixbuf-2.0/${pkg:gdk-pixbuf-2.0:gdk_pixbuf_binary_version}/loaders/*.so
  </binary>
  <!-- Copy in the theme engines. -->
  <binary>
    ${prefix}/lib/gtk-2.0/${pkg:gtk+-2.0:gtk_binary_version}/engines/*.so
  </binary>

  <!-- And the print backends -->
  <binary>
    ${prefix}/lib/gtk-2.0/${pkg:gtk+-2.0:gtk_binary_version}/printbackends/*.so
  </binary>

  <!-- Pango rendering modules -->
  <binary>
    ${prefix}/lib/pango/${pkg:pango:pango_module_version}/modules/*.so
  </binary>

  <!-- Copy in libpyglib, which will pull in other dependencies we need -->
  <binary>
    ${prefix}/lib/libpyglib-2.0-python.0.dylib
  </binary>

  <binary recurse="True">
    ${prefix}/lib/python2.7/*.so
  </binary>

  <binary>
    ${prefix}/lib/libigemacintegration.0.dylib
  </binary>

  <binary>
    ${prefix}/lib/libenchant.dylib
  </binary>

  <binary>
    ${prefix}/lib/enchant
  </binary>

  <binary>
     ${prefix}/lib/libgettextpo.0.dylib
  </binary>

  <binary>
    ${prefix}/lib/libtiff.3.dylib
  </binary>

  <binary>
    ${prefix}/lib/libxml2.*.dylib
  </binary>

  <binary>
    ${prefix}/lib/libsqlite3.*dylib
  </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 name="gtk20">
    ${prefix}/share/locale
  </translations>

  <translations  name="virtaal">
    ${prefix}/share/locale
  </translations>

  <translations  name="gtkspell">
    ${prefix}/share/locale
  </translations>

  <translations  name="glib20">
    ${prefix}/share/locale
  </translations>


  <!-- We have to pull in the python modules, which are mixed python
       and loadable modules.  -->
  <data recurse="True">
    ${prefix}/lib/python2.7/*.py
  </data>

  <data recurse="True">
    ${prefix}/lib/python2.7/PyObjC.bridgesupport*
  </data>

  <data>
    ${prefix}/lib/python2.7/config/*
  </data>

  <data>
    ${prefix}/include/python2.7/*
  </data>

  <data>
    ${prefix}/share/virtaal/
  </data>

  <data>
    ${prefix}/share/icons/
  </data>

  <data>
    ${prefix}/share/enchant/
  </data>

  <data>
    ${prefix}/share/mime/
  </data>

  <data dest="${bundle}/Contents/Resources">
    ${prefix}/share/strings/
  </data>

  <data>
    ${prefix}/lib/python2.7/site-packages/translate/share/langmodels/
  </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}/virtaal.icns
  </data>

  <data dest="${bundle}/Contents/Resources">
    ${project}/VirtaalDocument.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/share/virtaal/virtaal.accel">
    ${project}/virtaal.accel
  </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>
