osx: Create bundles using homebrew

Just easier to maintain than jhbuild.

See https://github.com/TingPing/homebrew-gnome for deps.
This commit is contained in:
TingPing 2014-08-01 04:03:54 -04:00
parent 345c8a29ad
commit 422edd8812
4 changed files with 7 additions and 41 deletions

View File

@ -216,7 +216,7 @@ dnl *********************************************************************
_gdk_tgt=`$PKG_CONFIG --variable=target gdk-2.0`
if test "x$_gdk_tgt" = xquartz; then
PKG_CHECK_MODULES(GTK_MAC, gtk-mac-integration, [
PKG_CHECK_MODULES(GTK_MAC, gtk-mac-integration-gtk2, [
GUI_LIBS="$GUI_LIBS $GTK_MAC_LIBS"
GUI_CFLAGS="$GUI_CFLAGS $GTK_MAC_CFLAGS"
AC_DEFINE(HAVE_GTK_MAC)

View File

@ -2,7 +2,8 @@
<app-bundle>
<meta>
<prefix name="default">${env:JHBUILD_PREFIX}</prefix>
<prefix name="default">/usr/local</prefix>
<prefix name="enchant">/usr/local/opt/enchant-applespell</prefix>
<destination overwrite="yes">${project}</destination>
<run-install-name-tool/>
@ -21,25 +22,12 @@
</binary>
<binary>
${prefix}/lib/libenchant.dylib
${prefix:enchant}/lib/libenchant.dylib
</binary>
<binary>
${prefix}/lib/enchant/libenchant_applespell.so
${prefix:enchant}/lib/enchant/libenchant_applespell.so
</binary>
<binary dest="${bundle}/Contents/MacOS">
${prefix}/bin/python
</binary>
<binary>
${prefix}/lib/libpython2.7.dylib
</binary>
<data>
${prefix}/lib/python2.7/
</data>
<data>
${prefix}/include/python2.7/pyconfig.h
</data>
<binary>
${prefix}/lib/${gtkdir}/modules/*.so
</binary>
@ -59,7 +47,7 @@
${prefix}/lib/pango/${pkg:pango:pango_module_version}/modules/
</binary>
<data>
${prefix}/share/themes/Mac/
${prefix}/share/themes/Mac/gtk-2.0-key/gtkrc
</data>
<translations name="gtk20">
@ -77,7 +65,4 @@
${project}/hexchat.icns
</data>
<!-- icon-theme icons="none">
</icon-theme -->
</app-bundle>

View File

@ -36,10 +36,6 @@ export GDK_PIXBUF_MODULE_FILE="$bundle_etc/gtk-2.0/gdk-pixbuf.loaders"
export PANGO_LIBDIR="$bundle_lib"
export PANGO_SYSCONFDIR="$bundle_etc"
export PYTHON="$bundle_contents/MacOS/python"
export PYTHONHOME="$bundle_res"
export PYTHONPATH="$bundle_lib/python2.7:$bundle_lib/python2.7/site-packages"
export OPENSSL_CONF="/System/Library/OpenSSL/openssl.cnf"
export HEXCHAT_LIBDIR="$bundle_lib/hexchat/plugins"

View File

@ -1,24 +1,9 @@
#!/bin/sh
if [ -z "$JHBUILD_PREFIX" ]; then
echo "You must run this within a jhbuild shell."
exit 1
fi
if [ ! -f $JHBUILD_PREFIX/bin/python ]; then
echo "You must install python with jhbuild."
exit 1
fi
rm -rf HexChat.app
rm -f *.app.zip
$JHBUILD_PREFIX/bin/python $HOME/.local/bin/gtk-mac-bundler hexchat.bundle
# These take up a lot of space in the bundle
echo "Cleaning up python files"
find ./HexChat.app/Contents/Resources/lib/python2.7 -name "*.pyc" -delete
find ./HexChat.app/Contents/Resources/lib/python2.7 -name "*.pyo" -delete
python $HOME/.local/bin/gtk-mac-bundler hexchat.bundle
echo "Compressing bundle"
#hdiutil create -format UDBZ -srcdir HexChat.app -quiet HexChat-2.9.6.1-$(git rev-parse --short master).dmg