1 | #!/bin/bash
|
---|
2 |
|
---|
3 | WXLIBNAME_ALL=libwx*2.8*.dylib
|
---|
4 | BOOSTLIBNAME_ALL=libboost*.dylib
|
---|
5 | WX_SUFFIX_MED=2.8.0.dylib
|
---|
6 | WX_SUFFIX_LONG=2.8.0.6.0.dylib
|
---|
7 | BOOST_SUFFIX=xgcc40-mt-1_39.dylib
|
---|
8 | BOOST_SUFFIX_2=xgcc40-mt.dylib
|
---|
9 | APPNAME="Installer"
|
---|
10 |
|
---|
11 | WXLIBDIR=~/Programming/Third-Party/Development/wxMac-2.8.10/build-dynamic-universal/lib
|
---|
12 | BOOSTLIBDIR=~/Programming/Third-Party/Development/boost_1_39_0/build-dynamic-universal
|
---|
13 | BINDIR=/Games/Oni-Test/edition/install/$APPNAME.app/Contents/MacOS
|
---|
14 | SYSLIBDIR=/usr/local/lib
|
---|
15 |
|
---|
16 |
|
---|
17 | echo "Copying dynamic libraries to " $BINDIR " ..."
|
---|
18 | cp -R $WXLIBDIR/$WXLIBNAME_ALL $BINDIR
|
---|
19 |
|
---|
20 | for file in `cat ~/Programming/Pre-Release/AE_Installer/projects/xcode/AE_Installer-GUI/libnames-boost.txt`
|
---|
21 | do
|
---|
22 | cp -R $BOOSTLIBDIR/$file$BOOST_SUFFIX $BINDIR
|
---|
23 | cp -R $BOOSTLIBDIR/$file$BOOST_SUFFIX_2 $BINDIR
|
---|
24 | done
|
---|
25 |
|
---|
26 | cp ~/Programming/Third-Party/Development/libiconv-1.13/build-static-universal/lib/libiconv.2.dylib $BINDIR
|
---|
27 |
|
---|
28 | for file in `cat ~/Programming/Pre-Release/AE_Installer/projects/xcode/AE_Installer-GUI/libnames-wx.txt`
|
---|
29 | do
|
---|
30 | echo "Patching " $file "..."
|
---|
31 | for fileother in `cat ~/Programming/Pre-Release/AE_Installer/projects/xcode/AE_Installer-GUI/libnames-wx.txt`
|
---|
32 | do
|
---|
33 | # patch all library internal cross references
|
---|
34 | echo " Patching " $fileother " with " $file "..."
|
---|
35 | install_name_tool -change $SYSLIBDIR/$file$WX_SUFFIX_MED @executable_path/$file$WX_SUFFIX_MED $BINDIR/$fileother$WX_SUFFIX_MED
|
---|
36 | done
|
---|
37 | # patch current library itself
|
---|
38 | install_name_tool -id @executable_path/$file$WX_SUFFIX_LONG $BINDIR/$file$WX_SUFFIX_LONG
|
---|
39 | # patch binary
|
---|
40 | echo " Patching " $APPNAME " with " $file "..."
|
---|
41 | install_name_tool -change $SYSLIBDIR/$file$WX_SUFFIX_MED @executable_path/$file$WX_SUFFIX_MED $BINDIR/$APPNAME;
|
---|
42 | done
|
---|
43 |
|
---|
44 | for file in `cat ~/Programming/Pre-Release/AE_Installer/projects/xcode/AE_Installer-GUI/libnames-boost.txt`
|
---|
45 | do
|
---|
46 | echo "Patching " $file "..."
|
---|
47 | for fileother in `cat ~/Programming/Pre-Release/AE_Installer/projects/xcode/AE_Installer-GUI/libnames-boost.txt`
|
---|
48 | do
|
---|
49 | # patch all library internal cross references
|
---|
50 | echo " Patching " $fileother " with " $file "..."
|
---|
51 | install_name_tool -change $file$BOOST_SUFFIX @executable_path/$file$BOOST_SUFFIX $BINDIR/$fileother$BOOST_SUFFIX
|
---|
52 | done
|
---|
53 | # patch current library itself
|
---|
54 | install_name_tool -id @executable_path/$file$BOOST_SUFFIX $BINDIR/$file$BOOST_SUFFIX
|
---|
55 | # patch binary
|
---|
56 | echo " Patching " $APPNAME " with " $file "..."
|
---|
57 | install_name_tool -change $file$BOOST_SUFFIX @executable_path/$file$BOOST_SUFFIX $BINDIR/$APPNAME;
|
---|
58 | done
|
---|
59 |
|
---|
60 | install_name_tool -change /usr/lib/libiconv.2.dylib @executable_path/libiconv.2.dylib $BINDIR/$APPNAME
|
---|