root/trunk/llmozlib2/repackage_runtime_mac.sh

Revision 8, 2.1 kB (checked in by rob.linden, 2 years ago)

Latest internal snapshot
Last Changed Rev: 80909
Last Changed Date: 2008-02-27 15:08:55 -0800 (Wed, 27 Feb 2008)

  • Property svn:eol-style set to native
  • Property svn:executable set to *
Line 
1 #!/bin/bash
2
3 # This script adds or updates libllmozlib2.dylib in mozilla-universal-darwin.tgz.
4 sandbox_location="$1"
5
6 xcodebuild -project llmozlib2.xcodeproj -target llmozlib2 -configuration 'Release' build
7
8 if [ -f build/Release/libllmozlib2.dylib ]; then
9         echo "libllmozlib2.dylib found"
10 else
11         echo "libllmozlib2.dylib not found, please build the Release target in llmozlib.xcodeproj"
12         exit 1
13 fi
14
15 if [ -d "$sandbox_location" ]; then
16         echo "Using sandbox at $sandbox_location"
17 else
18         echo "Sandbox $sandbox_location not found, exiting."
19         exit 1
20 fi
21
22
23 # exit on any error
24 set -e
25
26 echo "Unpacking mozilla-universal-darwin-original.tgz..."
27
28 # expand the runtime archive
29 rm -rf mozilla-universal-darwin
30 mkdir -p mozilla-universal-darwin
31 (cd mozilla-universal-darwin && tar -zxf ../mozilla-universal-darwin-original.tgz)
32
33 echo "Adding libllmozlib2.dylib..."
34
35 # copy in the latest built version of llmozlib2
36 cp ./build/Release/libllmozlib2.dylib mozilla-universal-darwin
37
38 echo "Removing unneeded pieces..."
39
40 # remove bits of the mozilla runtime that we don't use
41 rm -rf mozilla-universal-darwin/Info.plist
42 rm -rf mozilla-universal-darwin/Resources
43 rm -rf mozilla-universal-darwin/run-mozilla.sh
44 rm -rf mozilla-universal-darwin/updater.app
45 rm -rf mozilla-universal-darwin/xpicleanup
46 rm -rf mozilla-universal-darwin/xulrunner
47 rm -rf mozilla-universal-darwin/xulrunner-bin
48
49 echo "Creating mozilla-universal-darwin.tgz..."
50
51 # tar up the runtime and llmozlib2
52 rm -f ./mozilla-universal-darwin.tgz
53 tar -zcf ./mozilla-universal-darwin.tgz \
54         -C mozilla-universal-darwin .
55
56 #rm -rf mozilla-universal-darwin
57
58 #echo '###############################'
59 #echo 'please copy mozilla-universal-darwin.tgz to indra/newview in your sandbox.'
60
61 echo "Copying mozilla-universal-darwin.tgz to $sandbox_location/indra/newview..."
62 cp mozilla-universal-darwin.tgz $sandbox_location/indra/newview/
63
64 echo "Copying stub library to $sandbox_location/libraries/universal-darwin/..."
65 cp build/Release_stub/libllmozlib2.dylib $sandbox_location/libraries/universal-darwin/lib_debug/libllmozlib2.dylib
66 cp build/Release_stub/libllmozlib2.dylib $sandbox_location/libraries/universal-darwin/lib_release/libllmozlib2.dylib
67
68 echo "done!"
69
Note: See TracBrowser for help on using the browser.