3
fix_shared_object_depends() {
6
## Get list of files to work on
7
file_list=`ls ../lib/*.so`
8
file_list="${file_list} ${exe_name} "
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;}'`
15
## Loop over the files, and update the path of the wx library
16
for file in ${file_list}
18
for path in ${orig_path}
20
new_path=`echo ${path} | xargs basename`
21
install_name_tool -change ${orig_path} @executable_path/${new_path} ${file}
3
26
## extract the file name from the Makefile
4
27
exe_name=`cat ../Makefile | grep ^EXE_NAME_NO_PATH | cut -d= -f2`
16
39
mkdir -p ./CodeLite.app/Contents/SharedSupport/debuggers
17
40
mkdir -p ./CodeLite.app/Contents/SharedSupport/config
20
## Get list of files to work on
21
file_list=`ls ../lib/*.so`
22
file_list="${file_list} ${exe_name} "
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}
31
for path in ${orig_path}
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}
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/
43
cp ${exe_name} ./CodeLite.app/Contents/MacOS/${exe_name}
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}
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/
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
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/
61
cp ${exe_name} ./CodeLite.app/Contents/MacOS/${exe_name}
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/
105
123
cp ../sdk/codelite_indexer/codelite_indexer ./CodeLite.app/Contents/SharedSupport/
106
124
cp plugins/resources/*.* ./CodeLite.app/Contents/SharedSupport/plugins/resources/