-
Notifications
You must be signed in to change notification settings - Fork 1
/
link_library_for_MAC.sh
executable file
·74 lines (61 loc) · 5.4 KB
/
link_library_for_MAC.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
#!/bin/bash
if [[ $OSTYPE == darwin* ]]; then
# echo "Copy *.dylib into the src folder ...."
# cp lib/osx/* src/cpp
echo "link libtorrent-rasterbar"
cd lib/osx
install_name_tool -change libboost_thread.dylib @loader_path/libboost_thread.dylib libboost_thread.dylib
install_name_tool -change libboost_system.dylib @loader_path/libboost_system.dylib libboost_thread.dylib
install_name_tool -change libboost_system.dylib @loader_path/libboost_system.dylib libtorrent-rasterbar.8.dylib
cd ../../src/cpp
echo "link libtorrent wrap"
echo "session ..."
install_name_tool -change libboost_system.dylib @loader_path/../../lib/osx/libboost_system.dylib session.dylib
install_name_tool -change libboost_thread.dylib @loader_path/../../lib/osx/libboost_thread.dylib session.dylib
install_name_tool -change /usr/local/lib/libtorrent-rasterbar.8.dylib @loader_path/../../lib/osx/libtorrent-rasterbar.8.dylib session.dylib
install_name_tool -change /usr/local/lib/libGeoIP.1.dylib @loader_path/../../lib/osx/libGeoIP.1.dylib session.dylib
install_name_tool -change /usr/local/lib/libjson.0.dylib @loader_path/../../lib/osx/libjson.0.dylib session.dylib
echo "add_torrent_params ..."
install_name_tool -change libboost_system.dylib @loader_path/../../lib/osx/libboost_system.dylib add_torrent_params.dylib
install_name_tool -change libboost_thread.dylib @loader_path/../../lib/osx/libboost_thread.dylib add_torrent_params.dylib
install_name_tool -change /usr/local/lib/libtorrent-rasterbar.8.dylib @loader_path/../../lib/osx/libtorrent-rasterbar.8.dylib add_torrent_params.dylib
echo "create_torrent ..."
install_name_tool -change libboost_system.dylib @loader_path/../../lib/osx/libboost_system.dylib create_torrent.dylib
install_name_tool -change libboost_thread.dylib @loader_path/../../lib/osx/libboost_thread.dylib create_torrent.dylib
install_name_tool -change /usr/local/lib/libtorrent-rasterbar.8.dylib @loader_path/../../lib/osx/libtorrent-rasterbar.8.dylib create_torrent.dylib
echo "file_storage ..."
install_name_tool -change libboost_system.dylib @loader_path/../../lib/osx/libboost_system.dylib file_storage.dylib
install_name_tool -change libboost_thread.dylib @loader_path/../../lib/osx/libboost_thread.dylib file_storage.dylib
install_name_tool -change /usr/local/lib/libtorrent-rasterbar.8.dylib @loader_path/../../lib/osx/libtorrent-rasterbar.8.dylib file_storage.dylib
echo "session_status ..."
install_name_tool -change libboost_system.dylib @loader_path/../../lib/osx/libboost_system.dylib session_status.dylib
install_name_tool -change libboost_thread.dylib @loader_path/../../lib/osx/libboost_thread.dylib session_status.dylib
install_name_tool -change /usr/local/lib/libtorrent-rasterbar.8.dylib @loader_path/../../lib/osx/libtorrent-rasterbar.8.dylib session_status.dylib
echo "torrent_handle ..."
install_name_tool -change libboost_system.dylib @loader_path/../../lib/osx/libboost_system.dylib torrent_handle.dylib
install_name_tool -change libboost_thread.dylib @loader_path/../../lib/osx/libboost_thread.dylib torrent_handle.dylib
install_name_tool -change /usr/local/lib/libtorrent-rasterbar.8.dylib @loader_path/../../lib/osx/libtorrent-rasterbar.8.dylib torrent_handle.dylib
echo "torrent_info ..."
install_name_tool -change libboost_system.dylib @loader_path/../../lib/osx/libboost_system.dylib torrent_info.dylib
install_name_tool -change libboost_thread.dylib @loader_path/../../lib/osx/libboost_thread.dylib torrent_info.dylib
install_name_tool -change /usr/local/lib/libtorrent-rasterbar.8.dylib @loader_path/../../lib/osx/libtorrent-rasterbar.8.dylib torrent_info.dylib
echo "torrent_status ..."
install_name_tool -change libboost_system.dylib @loader_path/../../lib/osx/libboost_system.dylib torrent_status.dylib
install_name_tool -change libboost_thread.dylib @loader_path/../../lib/osx/libboost_thread.dylib torrent_status.dylib
install_name_tool -change /usr/local/lib/libtorrent-rasterbar.8.dylib @loader_path/../../lib/osx/libtorrent-rasterbar.8.dylib torrent_status.dylib
echo "utp_status ..."
install_name_tool -change libboost_system.dylib @loader_path/../../lib/osx/libboost_system.dylib utp_status.dylib
install_name_tool -change libboost_thread.dylib @loader_path/../../lib/osx/libboost_thread.dylib utp_status.dylib
install_name_tool -change /usr/local/lib/libtorrent-rasterbar.8.dylib @loader_path/../../lib/osx/libtorrent-rasterbar.8.dylib utp_status.dylib
echo "alert ..."
install_name_tool -change libboost_system.dylib @loader_path/../../lib/osx/libboost_system.dylib alert.dylib
install_name_tool -change libboost_thread.dylib @loader_path/../../lib/osx/libboost_thread.dylib alert.dylib
install_name_tool -change /usr/local/lib/libtorrent-rasterbar.8.dylib @loader_path/../../lib/osx/libtorrent-rasterbar.8.dylib alert.dylib
echo "peer_data ..."
install_name_tool -change libboost_system.dylib @loader_path/../../lib/osx/libboost_system.dylib peer_data.dylib
install_name_tool -change libboost_thread.dylib @loader_path/../../lib/osx/libboost_thread.dylib peer_data.dylib
install_name_tool -change /usr/local/lib/libtorrent-rasterbar.8.dylib @loader_path/../../lib/osx/libtorrent-rasterbar.8.dylib peer_data.dylib
install_name_tool -change /usr/local/lib/libGeoIP.1.dylib @loader_path/../../lib/osx/libGeoIP.1.dylib peer_data.dylib
install_name_tool -change /usr/local/lib/libjson.0.dylib @loader_path/../../lib/osx/libjson.0.dylib peer_data.dylib
cd ../../
fi