File: LOADER

package info (click to toggle)
mono-reference-assemblies 3.12.1%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 604,240 kB
  • ctags: 625,505
  • sloc: cs: 3,967,741; xml: 2,793,081; ansic: 418,042; java: 60,435; sh: 14,833; makefile: 11,576; sql: 7,956; perl: 1,467; cpp: 1,446; yacc: 1,203; python: 598; asm: 422; sed: 16; php: 1
file content (43 lines) | stat: -rwxr-xr-x 1,445 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#!/bin/sh
#
# This is a stub script that allows .apps to be relocatable on OSX but still
# find the managed assembly.
#
# You should never have to edit this file directly as its generated by the 
# bundle maker.
#

X11_MODE=%X11_MODE%
MWF_MODE=%MWF_MODE%
COCOASHARP_MODE=%COCOASHARP_MODE%

PWD=`pwd`
# Fetch the path relative to the launch point where this shell script exists.
APP_PATH=`echo $0 | awk '{split($0,patharr,"/"); idx=1; while(patharr[idx+3] != "") { if (patharr[idx] != "/") {printf("%s/", patharr[idx]); idx++ }} }'`

# Fetch the app name (its our own name)
APP_NAME=`echo $0 | awk '{split($0,patharr,"/"); idx=1; while(patharr[idx+1] != "") {idx++} printf("%s", patharr[idx]); }'`
ASSEMBLY=`echo $0 | awk '{split($0,patharr,"/"); idx=1; while(patharr[idx+1] != "") {idx++} printf("%s.exe", patharr[idx]); }'`

# Setup the environment for MWF if needed
if [ "$MWF_MODE" -eq "1" ]; then
	export MONO_MWF_USE_CARBON_BACKEND=1
	export GDIPLUS_NOX=1
fi

# Setup the environment for Cocoa# if needed
if [ "$COCOASHARP_MODE" -eq "1" ]; then
	export MONO_GDIP_USE_COCOA_BACKEND=1
	export DYLD_LIBRARY_PATH=$PWD/$APP_PATH/Contents/Resources:$DYLD_LIBRARY_PATH
fi

cd "$APP_PATH/Contents/Resources"

if [ "$X11_MODE" -eq "1" ]; then
	open-x11 "$APP_NAME"
else
	if [ ! -d "./bin" ]; then mkdir bin ; fi
	if [ -f "./bin/$APP_NAME" ]; then rm -f "./bin/$APP_NAME" ; fi
	ln -s `which mono` "./bin/$APP_NAME" 
	"./bin/$APP_NAME" "$ASSEMBLY"
fi