-
Notifications
You must be signed in to change notification settings - Fork 43
/
104fx_copy.sh
executable file
·62 lines (52 loc) · 5.8 KB
/
104fx_copy.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
#!/bin/csh -f
# from AuroraFox, modified for TenFourFox
set ppath="$1"
if ("$ppath" == "/" || "$ppath" == "") then
echo 'invalid path'
exit
endif
if (-e "$ppath/Contents/MacOS/firefox") then
rm -rf "$ppath" || exit
endif
set verbose
cp -RL obj-ff-dbg/dist/TenFourFox.app "$ppath" || cp -RL obj-ff-dbg/dist/TenFourFoxDebug.app "$ppath" || exit
cd $ppath/Contents/MacOS || exit
# determine which libgcc got linked (default to /opt/local/lib/gcc48)
set libgcc=gcc48
otool -L XUL | grep stdc | grep --silent /libgcc/ && set libgcc=libgcc
ditto /opt/local/lib/$libgcc/libstdc++.6.dylib ./
ditto /opt/local/lib/$libgcc/libgcc_s.1.dylib ./
ditto /opt/local/lib/$libgcc/libatomic.1.dylib ./
install_name_tool -id @executable_path/libgcc_s.1.dylib libgcc_s.1.dylib
install_name_tool -id @executable_path/libstdc++.6.dylib libstdc++.6.dylib
install_name_tool -id @executable_path/libatomic.1.dylib libatomic.1.dylib
install_name_tool -change /opt/local/lib/$libgcc/libgcc_s.1.dylib @executable_path/libgcc_s.1.dylib libstdc++.6.dylib
install_name_tool -change /opt/local/lib/$libgcc/libgcc_s.1.dylib @executable_path/libgcc_s.1.dylib libatomic.1.dylib
# fix Firefox and xpcshell
foreach w (XUL firefox firefox-bin xpcshell libfreebl3.dylib libicudata.56.dylib libicui18n.56.dylib libicuuc.56.dylib liblgpllibs.dylib libmozglue.dylib libnss3.dylib libnssckbi.dylib libnssdbm3.dylib libplugin_child_interpose.dylib libsoftokn3.dylib)
install_name_tool -change /opt/local/lib/$libgcc/libstdc++.6.dylib @executable_path/libstdc++.6.dylib -change /opt/local/lib/$libgcc/libgcc_s.1.dylib @executable_path/libgcc_s.1.dylib -change /opt/local/lib/$libgcc/libatomic.1.dylib @executable_path/libatomic.1.dylib $w
end
rm -rf updater.app
rm -rf ../Resources/webapprt-stub
install_name_tool -change /opt/local/lib/$libgcc/libstdc++.6.dylib @executable_path/../../../MacOS/libstdc++.6.dylib -change /opt/local/lib/$libgcc/libgcc_s.1.dylib @executable_path/../../../MacOS/libgcc_s.1.dylib -change /opt/local/lib/$libgcc/libatomic.1.dylib @executable_path/../../../MacOS/libatomic.1.dylib ../Resources/browser/components/libbrowsercomps.dylib
# obsolete??
#install_name_tool -change /opt/local/lib/$libgcc/libstdc++.6.dylib @executable_path/libstdc++.6.dylib -change /opt/local/lib/$libgcc/libgcc_s.1.dylib @executable_path/libgcc_s.1.dylib -change /opt/local/lib/$libgcc/libatomic.1.dylib @executable_path/libatomic.1.dylib libmozalloc.dylib
#install_name_tool -change /opt/local/lib/$libgcc/libstdc++.6.dylib @executable_path/libstdc++.6.dylib -change /opt/local/lib/$libgcc/libgcc_s.1.dylib @executable_path/libgcc_s.1.dylib updater.app/Contents/MacOS/updater
#install_name_tool -change /opt/local/lib/$libgcc/libstdc++.6.dylib @executable_path/libstdc++.6.dylib -change /opt/local/lib/$libgcc/libgcc_s.1.dylib @executable_path/libgcc_s.1.dylib libssl3.dylib
#install_name_tool -change /opt/local/lib/$libgcc/libstdc++.6.dylib @executable_path/libstdc++.6.dylib -change /opt/local/lib/$libgcc/libgcc_s.1.dylib @executable_path/libgcc_s.1.dylib libxpcom.dylib
#install_name_tool -change /opt/local/lib/$libgcc/libstdc++.6.dylib @executable_path/libstdc++.6.dylib -change /opt/local/lib/$libgcc/libgcc_s.1.dylib @executable_path/libgcc_s.1.dylib libsmime3.dylib
#install_name_tool -change /opt/local/lib/$libgcc/libstdc++.6.dylib @executable_path/libstdc++.6.dylib -change /opt/local/lib/$libgcc/libgcc_s.1.dylib @executable_path/libgcc_s.1.dylib libnssutil3.dylib
#install_name_tool -change /opt/local/lib/$libgcc/libstdc++.6.dylib @executable_path/libstdc++.6.dylib -change /opt/local/lib/$libgcc/libgcc_s.1.dylib @executable_path/libgcc_s.1.dylib libplc4.dylib
#install_name_tool -change /opt/local/lib/$libgcc/libstdc++.6.dylib @executable_path/libstdc++.6.dylib -change /opt/local/lib/$libgcc/libgcc_s.1.dylib @executable_path/libgcc_s.1.dylib libplds4.dylib
#install_name_tool -change /opt/local/lib/$libgcc/libstdc++.6.dylib @executable_path/libstdc++.6.dylib -change /opt/local/lib/$libgcc/libgcc_s.1.dylib @executable_path/libgcc_s.1.dylib components/libalerts.dylib
#install_name_tool -change /opt/local/lib/$libgcc/libstdc++.6.dylib @executable_path/libstdc++.6.dylib -change /opt/local/lib/$libgcc/libgcc_s.1.dylib @executable_path/libgcc_s.1.dylib libmozjs.dylib
#install_name_tool -change /opt/local/lib/$libgcc/libstdc++.6.dylib @executable_path/libstdc++.6.dylib -change /opt/local/lib/$libgcc/libgcc_s.1.dylib @executable_path/libgcc_s.1.dylib libmozsqlite3.dylib
#install_name_tool -change /opt/local/lib/$libgcc/libstdc++.6.dylib @executable_path/libstdc++.6.dylib -change /opt/local/lib/$libgcc/libgcc_s.1.dylib @executable_path/libgcc_s.1.dylib libnspr4.dylib
#install_name_tool -change /opt/local/lib/$libgcc/libstdc++.6.dylib @executable_path/libstdc++.6.dylib -change /opt/local/lib/$libgcc/libgcc_s.1.dylib @executable_path/libgcc_s.1.dylib plugin-container.app/Contents/MacOS/plugin-container
#install_name_tool -change /opt/local/lib/$libgcc/libstdc++.6.dylib @executable_path/libstdc++.6.dylib -change /opt/local/lib/$libgcc/libgcc_s.1.dylib @executable_path/libgcc_s.1.dylib crashreporter.app/Contents/MacOS/crashreporter
#install_name_tool -change /opt/local/lib/$libgcc/libstdc++.6.dylib @executable_path/libstdc++.6.dylib -change /opt/local/lib/$libgcc/libgcc_s.1.dylib @executable_path/libgcc_s.1.dylib libsoundtouch.dylib
#install_name_tool -change /opt/local/lib/$libgcc/libstdc++.6.dylib @executable_path/../MacOS/libstdc++.6.dylib -change /opt/local/lib/$libgcc/libgcc_s.1.dylib @executable_path/../MacOS/libgcc_s.1.dylib ../Resources/webapprt-stub
# fix JS
mv ../Resources/js . || exit
install_name_tool -change /opt/local/lib/$libgcc/libstdc++.6.dylib @executable_path/libstdc++.6.dylib -change /opt/local/lib/$libgcc/libgcc_s.1.dylib @executable_path/libgcc_s.1.dylib -change /opt/local/lib/$libgcc/libatomic.1.dylib @executable_path/libatomic.1.dylib js
echo "(used libraries from /opt/local/lib/$libgcc)"