diff options
author | Jeff Ames | 2008-05-02 03:30:44 +0000 |
---|---|---|
committer | Jeff Ames | 2008-05-02 03:30:44 +0000 |
commit | f94099b485248ebcaa943a6437fbec86b3fd567c (patch) | |
tree | d152fea93945444b67fd9ecb89bac1f7dccf43f2 /OpenSim/Tools/LaunchSLClient | |
parent | * DuplicateOnRay with copy center works in two directions... Still fightin... (diff) | |
download | opensim-SC_OLD-f94099b485248ebcaa943a6437fbec86b3fd567c.zip opensim-SC_OLD-f94099b485248ebcaa943a6437fbec86b3fd567c.tar.gz opensim-SC_OLD-f94099b485248ebcaa943a6437fbec86b3fd567c.tar.bz2 opensim-SC_OLD-f94099b485248ebcaa943a6437fbec86b3fd567c.tar.xz |
Minimize binary size and external dependencies in OS X LaunchSLClient.app creation script.
Diffstat (limited to 'OpenSim/Tools/LaunchSLClient')
3 files changed, 47 insertions, 20 deletions
diff --git a/OpenSim/Tools/LaunchSLClient/LaunchSLClient.app.skel/Contents/Info.plist b/OpenSim/Tools/LaunchSLClient/LaunchSLClient.app.skel/Contents/Info.plist new file mode 100644 index 0000000..7139350 --- /dev/null +++ b/OpenSim/Tools/LaunchSLClient/LaunchSLClient.app.skel/Contents/Info.plist | |||
@@ -0,0 +1,12 @@ | |||
1 | <?xml version="1.0" encoding="UTF-8"?> | ||
2 | <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
3 | <plist version="1.0"> | ||
4 | <dict> | ||
5 | <key>CFBundleIdentifier</key> | ||
6 | <string>LaunchSLClient</string> | ||
7 | <key>CFBundleExecutable</key> | ||
8 | <string>LaunchSLClient</string> | ||
9 | <key>CFBundleIconFile</key> | ||
10 | <string></string> | ||
11 | </dict> | ||
12 | </plist> | ||
diff --git a/OpenSim/Tools/LaunchSLClient/LaunchSLClient.app.skel/Contents/MacOS/LaunchSLClient b/OpenSim/Tools/LaunchSLClient/LaunchSLClient.app.skel/Contents/MacOS/LaunchSLClient new file mode 100755 index 0000000..22acade --- /dev/null +++ b/OpenSim/Tools/LaunchSLClient/LaunchSLClient.app.skel/Contents/MacOS/LaunchSLClient | |||
@@ -0,0 +1,13 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | PWD=`pwd` | ||
4 | |||
5 | # Fetch the path relative to the launch point where this shell script exists. | ||
6 | APP_PATH=`echo $0 | awk '{split($0,patharr,"/"); idx=1; while(patharr[idx+3] != "") { if (patharr[idx] != "/") {printf("%s/", patharr[idx]); idx++ }} }'` | ||
7 | |||
8 | # Fetch the app name (its our own name) | ||
9 | APP_NAME=`echo $0 | awk '{split($0,patharr,"/"); idx=1; while(patharr[idx+1] != "") {idx++} printf("%s", patharr[idx]); }'` | ||
10 | |||
11 | cd "$APP_PATH/Contents/Resources" | ||
12 | |||
13 | ./$APP_NAME | ||
diff --git a/OpenSim/Tools/LaunchSLClient/make-OSX-app.sh b/OpenSim/Tools/LaunchSLClient/make-OSX-app.sh index 9b9177e..aa37cb6 100755 --- a/OpenSim/Tools/LaunchSLClient/make-OSX-app.sh +++ b/OpenSim/Tools/LaunchSLClient/make-OSX-app.sh | |||
@@ -6,13 +6,22 @@ | |||
6 | # This should be run from the bin directory. | 6 | # This should be run from the bin directory. |
7 | 7 | ||
8 | APP_NAME="LaunchSLClient" | 8 | APP_NAME="LaunchSLClient" |
9 | 9 | SOURCE_PATH="../OpenSim/Tools/${APP_NAME}" | |
10 | # Note that proper form is to copy Frameworks to | 10 | |
11 | # *.app/Contents/Frameworks, but because @executable_path resolves to | 11 | ASSEMBLIES="mscorlib.dll \ |
12 | # [...]/Resources/bin, and the libraries reference | 12 | System.Windows.Forms.dll \ |
13 | # @executable_path/../Frameworks, we put frameworks in | 13 | System.Drawing.dll \ |
14 | # Contents/Resources instead. | 14 | System.Configuration.dll \ |
15 | FRAMEWORKS_PATH="${APP_NAME}.app/Contents/Resources/Frameworks" | 15 | System.Xml.dll \ |
16 | System.Security.dll \ | ||
17 | Mono.Security.dll \ | ||
18 | System.Data.dll \ | ||
19 | Mono.Data.Tds.dll \ | ||
20 | System.Transactions.dll \ | ||
21 | System.EnterpriseServices.dll \ | ||
22 | Mono.Mozilla.dll \ | ||
23 | Mono.Posix.dll \ | ||
24 | Accessibility.dll" | ||
16 | 25 | ||
17 | if [ ! -e ${APP_NAME}.exe ]; then | 26 | if [ ! -e ${APP_NAME}.exe ]; then |
18 | echo "Error: Could not find ${APP_NAME}.exe." >& 2 | 27 | echo "Error: Could not find ${APP_NAME}.exe." >& 2 |
@@ -20,19 +29,12 @@ if [ ! -e ${APP_NAME}.exe ]; then | |||
20 | exit 1 | 29 | exit 1 |
21 | fi | 30 | fi |
22 | 31 | ||
23 | CMDFLAGS="-m console -n ${APP_NAME} -a ${APP_NAME}.exe" | 32 | mkbundle2 -z -o ${APP_NAME} ${APP_NAME}.exe ${ASSEMBLIES} || exit 1 |
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 | 33 | ||
35 | if [ -d ${APP_NAME}.app ]; then rm -rf ${APP_NAME}.app; fi | 34 | if [ -d ${APP_NAME}.app ]; then rm -rf ${APP_NAME}.app; fi |
36 | macpack ${REFERENCES} ${CMDFLAGS} | 35 | cp -r ${SOURCE_PATH}/${APP_NAME}.app.skel ${APP_NAME}.app |
36 | |||
37 | # mkbundle doesn't seem to recognize the -L option, so we can't include Nini.dll in the bundling | ||
38 | cp Nini.dll ${APP_NAME}.app/Contents/Resources | ||
37 | 39 | ||
38 | mkdir -p ${FRAMEWORKS_PATH} | 40 | cp ${APP_NAME} ${APP_NAME}.ini ${APP_NAME}.app/Contents/Resources |