Open sourced NatiBot
This commit is contained in:
33
packages/Mac OS X/NatiBot.app/Contents/MacOS/NatiBot
Executable file
33
packages/Mac OS X/NatiBot.app/Contents/MacOS/NatiBot
Executable file
@@ -0,0 +1,33 @@
|
||||
#!/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.
|
||||
#
|
||||
|
||||
# Edited by claunia to be used with NatiBot
|
||||
|
||||
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]); }'`
|
||||
|
||||
echo $PWD >> /tmp/log.txt
|
||||
echo $APP_PATH >> /tmp/log.txt
|
||||
echo $APP_NAME >> /tmp/log.txt
|
||||
echo $ASSEMBLY >> /tmp/log.txt
|
||||
|
||||
export MONO_MWF_MAC_FORCE_X11=1
|
||||
export DYLD_LIBRARY_PATH=$PWD/$APP_PATH/Contents/Resources:$DYLD_LIBRARY_PATH
|
||||
|
||||
cd "$APP_PATH/Contents/Resources"
|
||||
|
||||
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"
|
||||
Reference in New Issue
Block a user