diff options
Diffstat (limited to 'OpenSim/Tools/LaunchSLClient/make-OSX-app.sh')
-rwxr-xr-x | OpenSim/Tools/LaunchSLClient/make-OSX-app.sh | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/OpenSim/Tools/LaunchSLClient/make-OSX-app.sh b/OpenSim/Tools/LaunchSLClient/make-OSX-app.sh new file mode 100755 index 0000000..9b9177e --- /dev/null +++ b/OpenSim/Tools/LaunchSLClient/make-OSX-app.sh | |||
@@ -0,0 +1,38 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | # This script will build LaunchSLClient.app from the .exe, .dll's, and | ||
4 | # other necessary files. | ||
5 | # | ||
6 | # This should be run from the bin directory. | ||
7 | |||
8 | APP_NAME="LaunchSLClient" | ||
9 | |||
10 | # Note that proper form is to copy Frameworks to | ||
11 | # *.app/Contents/Frameworks, but because @executable_path resolves to | ||
12 | # [...]/Resources/bin, and the libraries reference | ||
13 | # @executable_path/../Frameworks, we put frameworks in | ||
14 | # Contents/Resources instead. | ||
15 | FRAMEWORKS_PATH="${APP_NAME}.app/Contents/Resources/Frameworks" | ||
16 | |||
17 | if [ ! -e ${APP_NAME}.exe ]; then | ||
18 | echo "Error: Could not find ${APP_NAME}.exe." >& 2 | ||
19 | echo "Have you built it, and are you currently in the bin directory?" >& 2 | ||
20 | exit 1 | ||
21 | fi | ||
22 | |||
23 | CMDFLAGS="-m console -n ${APP_NAME} -a ${APP_NAME}.exe" | ||
24 | |||
25 | REFERENCES="-r /Library/Frameworks/Mono.framework/Versions/Current/lib/ \ | ||
26 | -r Nini.dll \ | ||
27 | -r ${APP_NAME}.ini" | ||
28 | |||
29 | if [ -f ${APP_NAME}.icns ]; then | ||
30 | CMDFLAGS="${CMDFLAGS} -i ${APP_NAME}.icns" | ||
31 | else | ||
32 | echo "Warning: no icon file found. Will use default application icon." >&2 | ||
33 | fi | ||
34 | |||
35 | if [ -d ${APP_NAME}.app ]; then rm -rf ${APP_NAME}.app; fi | ||
36 | macpack ${REFERENCES} ${CMDFLAGS} | ||
37 | |||
38 | mkdir -p ${FRAMEWORKS_PATH} | ||