diff options
Diffstat (limited to 'rbutil/rbutilqt')
-rwxr-xr-x | rbutil/rbutilqt/osx_deploy.sh | 98 |
1 files changed, 0 insertions, 98 deletions
diff --git a/rbutil/rbutilqt/osx_deploy.sh b/rbutil/rbutilqt/osx_deploy.sh deleted file mode 100755 index 7969685ea6..0000000000 --- a/rbutil/rbutilqt/osx_deploy.sh +++ /dev/null | |||
@@ -1,98 +0,0 @@ | |||
1 | #!/bin/sh | ||
2 | # __________ __ ___. | ||
3 | # Open \______ \ ____ ____ | | _\_ |__ _______ ___ | ||
4 | # Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | ||
5 | # Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | ||
6 | # Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | ||
7 | # \/ \/ \/ \/ \/ | ||
8 | # $Id$ | ||
9 | # | ||
10 | # Copyright (c) 2007 Barry Wardell | ||
11 | # | ||
12 | # All files in this archive are subject to the GNU General Public License. | ||
13 | # See the file COPYING in the source tree root for full license agreement. | ||
14 | # | ||
15 | # This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY | ||
16 | # KIND, either express or implied. | ||
17 | # | ||
18 | # | ||
19 | # Purpose of this script: Prepare Mac OS X version of rbutil for distribution. | ||
20 | # | ||
21 | # Inputs: None | ||
22 | # | ||
23 | # Action: Copy necessary Qt frameworks into the rbutilqt application bundle. | ||
24 | # Update the linking of rbutilqt and the frameworks to refer to the new | ||
25 | # new location of the framework files (inside the app bundle). | ||
26 | # Create a compressed disk image from rbutilqt.app. | ||
27 | # | ||
28 | # Output: A compressed disk image called rbutilqt.dmg | ||
29 | # | ||
30 | # Requirement: This script assumes that you have rbutilqt.app in the current | ||
31 | # directory and a framework build of Qt in your $PATH | ||
32 | # | ||
33 | # See http://doc.trolltech.com/4.3/deployment-mac.html for an explanation of | ||
34 | # what we're doing here. | ||
35 | |||
36 | # scan the $PATH for the given command | ||
37 | findtool(){ | ||
38 | file="$1" | ||
39 | |||
40 | IFS=":" | ||
41 | for path in $PATH | ||
42 | do | ||
43 | # echo "checks for $file in $path" >&2 | ||
44 | if test -f "$path/$file"; then | ||
45 | echo "$path/$file" | ||
46 | return | ||
47 | fi | ||
48 | done | ||
49 | } | ||
50 | |||
51 | # Try to find Qt | ||
52 | QTDIR=`findtool qmake` | ||
53 | if test -z "$QTDIR"; then | ||
54 | # not in path | ||
55 | echo "Error: Couldn't find Qt. Make sure it is in your \$PATH" | ||
56 | exit | ||
57 | else | ||
58 | QTDIR=`dirname \`dirname $QTDIR\`` | ||
59 | echo "Found Qt: $QTDIR" | ||
60 | fi | ||
61 | |||
62 | # Check Qt was built as frameworks | ||
63 | if test ! -d "$QTDIR/lib/QtCore.framework"; then | ||
64 | echo "Error: Unable to find Qt frameworks in $QTDIR" | ||
65 | echo " Make sure you built Qt as frameworks and not statically." | ||
66 | exit | ||
67 | fi | ||
68 | |||
69 | mkdir -p rbutilqt.app/Contents/Frameworks/{QtCore,QtGui,QtNetwork}.framework/Versions/4 | ||
70 | |||
71 | echo "Copying frameworks" | ||
72 | cp $QTDIR/lib/QtCore.framework/Versions/4/QtCore rbutilqt.app/Contents/Frameworks/QtCore.framework/Versions/4/ | ||
73 | cp $QTDIR/lib/QtGui.framework/Versions/4/QtGui rbutilqt.app/Contents/Frameworks/QtGui.framework/Versions/4/ | ||
74 | cp $QTDIR/lib/QtNetwork.framework/Versions/4/QtNetwork rbutilqt.app/Contents/Frameworks/QtNetwork.framework/Versions/4/ | ||
75 | |||
76 | echo "Fixing framework linking" | ||
77 | install_name_tool -id @executable_path/../Frameworks/QtCore.framework/Versions/4/QtCore rbutilqt.app/Contents/Frameworks/QtCore.framework/Versions/4/QtCore | ||
78 | install_name_tool -id @executable_path/../Frameworks/QtGui.framework/Versions/4/QtGui rbutilqt.app/Contents/Frameworks/QtGui.framework/Versions/4/QtGui | ||
79 | install_name_tool -id @executable_path/../Frameworks/QtNetwork.framework/Versions/4/QtNetwork rbutilqt.app/Contents/Frameworks/QtNetwork.framework/Versions/4/QtNetwork | ||
80 | install_name_tool -change $QTDIR/lib/QtCore.framework/Versions/4/QtCore @executable_path/../Frameworks/QtCore.framework/Versions/4/QtCore rbutilqt.app/Contents/MacOS/rbutilqt | ||
81 | install_name_tool -change $QTDIR/lib/QtGui.framework/Versions/4/QtGui @executable_path/../Frameworks/QtGui.framework/Versions/4/QtGui rbutilqt.app/Contents/MacOS/rbutilqt | ||
82 | install_name_tool -change $QTDIR/lib/QtNetwork.framework/Versions/4/QtNetwork @executable_path/../Frameworks/QtNetwork.framework/Versions/4/QtNetwork rbutilqt.app/Contents/MacOS/rbutilqt | ||
83 | install_name_tool -change $QTDIR/lib/QtCore.framework/Versions/4/QtCore @executable_path/../Frameworks/QtCore.framework/Versions/4/QtCore rbutilqt.app/Contents/Frameworks/QtGui.framework/Versions/4/QtGui | ||
84 | install_name_tool -change $QTDIR/lib/QtCore.framework/Versions/4/QtCore @executable_path/../Frameworks/QtCore.framework/Versions/4/QtCore rbutilqt.app/Contents/Frameworks/QtNetwork.framework/Versions/4/QtNetwork | ||
85 | |||
86 | echo "insert accessibility plugins" | ||
87 | |||
88 | mkdir -p rbutilqt.app/Contents/plugins/accessible | ||
89 | |||
90 | cp $QTDIR/plugins/accessible/*.dylib rbutilqt.app/Contents/plugins/accessible | ||
91 | |||
92 | install_name_tool -change $QTDIR/lib/QtCore.framework/Versions/4/QtCore @executable_path/../Frameworks/QtCore.framework/Versions/4/QtCore rbutilqt.app/Contents/plugins/accessible/libqtaccessiblewidgets.dylib | ||
93 | install_name_tool -change $QTDIR/lib/QtGui.framework/Versions/4/QtGui @executable_path/../Frameworks/QtGui.framework/Versions/4/QtGui rbutilqt.app/Contents/plugins/accessible/libqtaccessiblewidgets.dylib | ||
94 | install_name_tool -change $QTDIR/lib/QtCore.framework/Versions/4/QtCore @executable_path/../Frameworks/QtCore.framework/Versions/4/QtCore rbutilqt.app/Contents/plugins/accessible/libqtaccessiblecompatwidgets.dylib | ||
95 | install_name_tool -change $QTDIR/lib/QtGui.framework/Versions/4/QtGui @executable_path/../Frameworks/QtGui.framework/Versions/4/QtGui rbutilqt.app/Contents/plugins/accessible/libqtaccessiblecompatwidgets.dylib | ||
96 | |||
97 | echo "Creating disk image" | ||
98 | hdiutil create -srcfolder rbutilqt.app -ov rbutilqt.dmg | ||