| 1 | #!/bin/bashscip-shell filesystem . . `/bin/bash`. |
| 2 | |
| 3 | #locate the application bundle |
| 4 | name=$(basenamescip-shell system . . basename. "$0") |
| 5 | echoscip-shell system . . echo. $name |
| 6 | |
| 7 | dirn=$(dirnamescip-shell system . . dirname. "$0") |
| 8 | echoscip-shell system . . echo. $dirn |
| 9 | |
| 10 | #locate application bundle subdirectories |
| 11 | bundle=$(cd "$dirn/../../" && pwdscip-shell system . . pwd.) |
| 12 | bundle_contents="$bundle"/Contents |
| 13 | bundle_res="$bundle_contents"/Resources |
| 14 | |
| 15 | #make temporary directories |
| 16 | TMPDIR=`mktempscip-shell system . . mktemp. -d /tmp/BRPXXXXXscip-shell filesystem . . `/tmp/BRPXXXXX`.` |
| 17 | mkdirscip-shell system . . mkdir. -p "$TMPDIR"/modules |
| 18 | |
| 19 | #create pango.modules file |
| 20 | echoscip-shell system . . echo. $TMPDIR'/modules/pango-basic-coretext.so BasicScriptEngineCoreText PangoEngineShape PangoRenderCoreText common:' > $TMPDIR/pango.modules |
| 21 | |
| 22 | #create pangorc file |
| 23 | echoscip-shell system . . echo. '[Pango] |
| 24 | ModuleFiles = '$TMPDIR'/pango.modules' > $TMPDIR/pangorc |
| 25 | |
| 26 | #create links to modules |
| 27 | lnscip-shell system . . 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 | rmscip-shell system . . rm. -rf $TMPDIR |