aboutsummaryrefslogtreecommitdiffhomepage
path: root/scripts/osx
diff options
context:
space:
mode:
authorGravatar mitchell <70453897+667e-11@users.noreply.github.com>2013-06-09 21:03:53 -0400
committerGravatar mitchell <70453897+667e-11@users.noreply.github.com>2013-06-09 21:03:53 -0400
commite511c67fa74162308c6986d05487fd633ff37da0 (patch)
treefb248607cde1a7d06be6de259a2733d644928a2e /scripts/osx
parent173869a597ae29d96a32faf876d7280ffa1af525 (diff)
New makefile 'osx-app' rule for building Textadept.app.
Also added some OSX scripts from the bundle to the repository. Requires the latest "GTK+ for OSX bundle".
Diffstat (limited to 'scripts/osx')
-rwxr-xr-xscripts/osx/ta12
-rwxr-xr-xscripts/osx/textadept24
2 files changed, 36 insertions, 0 deletions
diff --git a/scripts/osx/ta b/scripts/osx/ta
new file mode 100755
index 00000000..9b2d8f43
--- /dev/null
+++ b/scripts/osx/ta
@@ -0,0 +1,12 @@
+#!/bin/bash
+# Copyright 2007-2013 Mitchell mitchell.att.foicica.com. See LICENSE.
+
+if [[ "$1" == "-h" || "$1" == "--help" ]]; then
+ echo "ta - shell script to launch Textadept.app"
+ echo "Usage: ta [args] [filenames]"
+ echo "Run textadept --help for available args."
+elif [ "${1:0:1}" == "-" ]; then
+ open -n -a Textadept.app --args $@
+else
+ open -a Textadept.app $@
+fi
diff --git a/scripts/osx/textadept b/scripts/osx/textadept
new file mode 100755
index 00000000..2c933465
--- /dev/null
+++ b/scripts/osx/textadept
@@ -0,0 +1,24 @@
+#!/bin/sh
+# Copyright 2007-2013 Mitchell mitchell.att.foicica.com. See LICENSE.
+
+# Set the GTK environment variables of resources within Textadept.app.
+bundle=$(cd "$(dirname "$0")/../../" && pwd)
+bundle_res="$bundle/Contents/Resources"
+export DYLD_LIBRARY_PATH="$bundle_res/lib:$DYLD_LIBRARY_PATH"
+export GTK_DATA_PREFIX="$bundle_res"
+export GTK_EXE_PREFIX="$bundle_res"
+export GTK_PATH="$bundle_res"
+export GTK2_RC_FILES="$bundle_res/etc/gtk-2.0/gtkrc"
+export GTK_IM_MODULE_FILE="$bundle_res/etc/gtk-2.0/gtk.immodules"
+export GDK_PIXBUF_MODULE_FILE="$bundle_res/etc/gtk-2.0/gdk-pixbuf.loaders"
+export PANGO_LIBDIR="$bundle_res/lib"
+export PANGO_SYSCONFDIR="$bundle_res/etc"
+export CHARSETALIASDIR="$bundle_res/lib"
+
+# Strip out the argument added by OSX.
+if [ x`echo "x$1" | sed -e "s/^x-psn_.*//"` == x ]; then shift 1; fi
+
+# Run Textadept.
+textadept=textadept.osx
+if [ ! -z $TEXTADEPTJIT ]; then textadept=textadeptjit.osx; fi
+exec "$bundle/Contents/MacOS/$textadept" "$@"