[Mono-osx] Error with "psn" command line option for .app on OS X
stevenspencer
stevenspencer01 at gmail.com
Tue Sep 28 04:16:09 EDT 2010
Here is the launch script being used:
> #!/bin/sh
>
> PWD=`pwd`
> MACOS_PATH=`echo "$0" | awk -F"/" '{ for(i = 1; i <= NF - 1; i++) {
> printf("%s/", $i); } }'`
> cd "$MACOS_PATH"
> MACOS_PATH=`pwd`
>
> BASE_PATH=`echo "$MACOS_PATH" | awk -F"/" '{ for(i = 1; i <= NF - 2; i++)
> { printf("%s/", $i); } }'`
>
> RESOURCES_PATH=`echo "$MACOS_PATH" | awk -F"/" '{ for(i = 1; i <= NF - 1;
> i++) { printf("%s/", $i); } printf("Resources"); }'`
>
> export MONO_GDIP_USE_COCOA_BACKEND=1
> export DYLD_LIBRARY_PATH=$MACOS_PATH:$RESOURCES_PATH:$DYLD_LIBRARY_PATH
>
> APP_NAME=`echo $0 | awk -F"/" '{ printf("%s", $NF); }'`
> ASSEMBLY=`echo $0 | awk -F"/" '{ printf("%s.exe", $NF); }'`
>
> cd "$BASE_PATH"
> EXEC_PATH="./$APP_NAME"
> if [ -f "$EXEC_PATH" ]; then rm -f "$EXEC_PATH" ; fi
>
> MONO_PATH=`which mono`
> if [ "X$MONO_PATH" == "X" ]; then
> RESULT="`osascript -e 'tell app "Finder" to display dialog
> "Application requires Mono." with icon stop with title "Launch Failed"
> default button 1 buttons {"Get Mono...", "Cancel"}'`"
> case "$RESULT" in
> *Mono*) osascript -e 'open location "http://mono-project.com/"';;
> *) ;;
> esac
> else
> ln -s "$MONO_PATH" "$EXEC_PATH"
> exec "$EXEC_PATH" "$RESOURCES_PATH/$ASSEMBLY" 2> Error.txt
> fi
>
--
View this message in context: http://mono.1490590.n4.nabble.com/Error-with-psn-command-line-option-for-app-on-OS-X-tp2548503p2716778.html
Sent from the Mono - OSX mailing list archive at Nabble.com.
More information about the Mono-osx
mailing list