~ubuntu-branches/ubuntu/karmic/codelite/karmic

« back to all changes in this revision

Viewing changes to Runtime/make_mac_bundle.sh

  • Committer: Bazaar Package Importer
  • Author(s): Chow Loong Jin
  • Date: 2009-08-15 17:42:43 UTC
  • mfrom: (1.1.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20090815174243-nlb9ikgigbiybz12
Tags: 1.0.2893+dfsg-0ubuntu1
* debian/rules:
  + Tidy up get-orig-source rule
* debian/control:
  + Bump Standards-Version
  + Change Maintainer email address to @ubuntu.com
  + Drop cdbs build-dependency
* debian/copyright:
  + Update to DEP-5 format
* debian/patches/00_add-fPIC.patch:
  + Dropped, fix upstream
* Closes LP: #413992

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#!/bin/sh
2
2
 
 
3
fix_shared_object_depends() {
 
4
        search_string=$1
 
5
        
 
6
        ## Get list of files to work on
 
7
        file_list=`ls ../lib/*.so`
 
8
        file_list="${file_list} ${exe_name} "
 
9
 
 
10
        ## Since the plugins must use the same wx configuration as the
 
11
        ## executable, we can run the following command only once and
 
12
        ## use the results to manipulate the plugins as well
 
13
        orig_path=`otool -L ${exe_name}  | grep ${search_string} | awk '{print $1;}'`
 
14
        
 
15
        ## Loop over the files, and update the path of the wx library
 
16
        for file in ${file_list}
 
17
        do
 
18
                        for path in ${orig_path}
 
19
                        do
 
20
                                        new_path=`echo ${path} | xargs basename`
 
21
                                        install_name_tool -change ${orig_path} @executable_path/${new_path} ${file}
 
22
                        done
 
23
        done
 
24
}
 
25
 
3
26
## extract the file name from the Makefile
4
27
exe_name=`cat ../Makefile | grep ^EXE_NAME_NO_PATH | cut -d= -f2`
5
28
 
16
39
mkdir -p ./CodeLite.app/Contents/SharedSupport/debuggers
17
40
mkdir -p ./CodeLite.app/Contents/SharedSupport/config
18
41
 
19
 
 
20
 
## Get list of files to work on
21
 
file_list=`ls ../lib/*.so`
22
 
file_list="${file_list} ${exe_name} "
23
 
 
24
 
## Since the plugins must use the same wx configuration as the
25
 
## executable, we can run the following command only once and
26
 
## use the results to manipulate the plugins as well
27
 
orig_path=`otool -L ${exe_name}  | grep libwx | awk '{print $1;}'`
28
 
## Loop over the files, and update the path of the wx library
29
 
for file in ${file_list}
30
 
do
31
 
        for path in ${orig_path}
32
 
        do
33
 
                new_path=`echo ${path} | xargs basename`
34
 
                echo install_name_tool -change ${orig_path} @executable_path/${new_path} ${file}
35
 
                install_name_tool -change ${orig_path} @executable_path/${new_path} ${file}
36
 
        done
37
 
done
38
 
 
39
 
echo install_name_tool -change /usr/lib/libcurl.4.dylib @executable_path/libcurl.4.dylib ${exe_name}
40
 
install_name_tool -change /usr/lib/libcurl.4.dylib @executable_path/libcurl.4.dylib ${exe_name}
41
 
cp /usr/lib/libcurl.4.dylib ./CodeLite.app/Contents/MacOS/
42
 
 
43
 
cp ${exe_name} ./CodeLite.app/Contents/MacOS/${exe_name}
 
42
# fix the script
 
43
echo "Running install_name_tool..."
 
44
fix_shared_object_depends libwx_
44
45
## copy the wx dlls to the exeutable path which under Mac is located at ./CodeLite.app/Contents/MacOS/
45
46
for wx_file in ${orig_path}
46
47
do
47
 
        echo "Copying ${wx_file} to ./CodeLite.app/Contents/MacOS/"
48
 
        cp ${wx_file} ./CodeLite.app/Contents/MacOS/
 
48
                cp ${wx_file} ./CodeLite.app/Contents/MacOS/
49
49
done
50
50
 
 
51
fix_shared_object_depends libplugin
 
52
fix_shared_object_depends libcodelite
 
53
fix_shared_object_depends libwxscintilla
 
54
fix_shared_object_depends libwxsqlite
 
55
fix_shared_object_depends libwxpropgrid
 
56
 
 
57
#echo install_name_tool -change /usr/lib/libcurl.4.dylib @executable_path/libcurl.4.dylib ${exe_name}
 
58
#install_name_tool -change /usr/lib/libcurl.4.dylib @executable_path/libcurl.4.dylib ${exe_name}
 
59
#cp /usr/lib/libcurl.4.dylib ./CodeLite.app/Contents/MacOS/
 
60
 
 
61
cp ${exe_name} ./CodeLite.app/Contents/MacOS/${exe_name}
51
62
 
52
63
cp -r rc ./CodeLite.app/Contents/SharedSupport/
53
64
cp -r templates ./CodeLite.app/Contents/SharedSupport/
102
113
cp ../lib/SnipWiz.so ./CodeLite.app/Contents/SharedSupport/plugins/
103
114
cp ../lib/wxformbuilder.so ./CodeLite.app/Contents/SharedSupport/plugins/
104
115
cp ../lib/abbreviation.so ./CodeLite.app/Contents/SharedSupport/plugins/
 
116
cp ../lib/QmakePlugin.so ./CodeLite.app/Contents/SharedSupport/plugins/
 
117
cp ../lib/libwxscintillau.so ./CodeLite.app/Contents/MacOS/
 
118
cp ../lib/libpluginu.so ./CodeLite.app/Contents/MacOS/
 
119
cp ../lib/libcodeliteu.so ./CodeLite.app/Contents/MacOS/
 
120
cp ../lib/libwxsqlite3u.so ./CodeLite.app/Contents/MacOS/
 
121
cp ../lib/libwxpropgridu.so ./CodeLite.app/Contents/MacOS/
 
122
 
105
123
cp ../sdk/codelite_indexer/codelite_indexer ./CodeLite.app/Contents/SharedSupport/
106
124
cp plugins/resources/*.* ./CodeLite.app/Contents/SharedSupport/plugins/resources/
107