| 1 | #!/bin/bash |
| 2 | |
| 3 | #locate the application bundle |
| 4 | name=$(basename "$0") |
| 5 | echo $name |
| 6 | |
| 7 | dirn=$(dirname "$0") |
| 8 | echo $dirn |
| 9 | |
| 10 | #locate application bundle subdirectories |
| 11 | bundle=$(cd "$dirn/../../" && pwd) |
| 12 | bundle_contents="$bundle"/Contents |
| 13 | bundle_res="$bundle_contents"/Resources |
| 14 | |
| 15 | #make temporary directories |
| 16 | TMPDIR=`mktemp -d /tmp/BRPXXXXX` |
| 17 | mkdir -p "$TMPDIR"/modules |
| 18 | |
| 19 | #create pango.modules file |
| 20 | echo $TMPDIR'/modules/pango-basic-coretext.so BasicScriptEngineCoreText PangoEngineShape PangoRenderCoreText common:' > $TMPDIR/pango.modules |
| 21 | |
| 22 | #create pangorc file |
| 23 | echo '[Pango] |
| 24 | ModuleFiles = '$TMPDIR'/pango.modules' > $TMPDIR/pangorc |
| 25 | |
| 26 | #create links to modules |
| 27 | ln -s "$bundle_res"/pango/modules/* $TMPDIR/modules |
| 28 | |
| 29 | # Help pango find pangorc |
| 30 | export PANGO_RC_FILE="$TMPDIR/pangorc" |
| 31 | |
| 32 | #execute PRP-PACU binary |
| 33 | "$bundle_contents/MacOS/BRP_PACU" |
| 34 | |
| 35 | #clean up |
| 36 | rm -rf $TMPDIR |