Skip to content

Commit cce3073

Browse files
authored
Merge pull request #62 from attdevsupport/bn153x-patch-5
Update vo_dependency_installer.sh
2 parents 7b4d0cc + 7138c0b commit cce3073

1 file changed

Lines changed: 92 additions & 29 deletions

File tree

vo_dependency_installer.sh

Lines changed: 92 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
#=======================================
2020
# vo_dependency_installer.sh
21-
VERSION="1.0.1.0"
21+
VERSION="1.0.1.1"
2222
#
2323
# Howto use this script:
2424
# From your browser, select 'Save' and choose or create an empty folder. Make sure the script has the extension '.sh'.
@@ -38,8 +38,19 @@ VERSION="1.0.1.0"
3838
#
3939
# It is advised that the computer is backed up, and important data is safely stored.
4040
#
41-
# There are some basic requirements before this script should be run.
42-
# 1 You must have and run this under an Admin account, do not run under 'sudo'
41+
# The dependancies that are required include some 'HEAD' versions, which are not yet
42+
# considered to be stable. 'libimobiledevice' is installed under HEAD, which may bring
43+
# other dependancies, possibly also HEAD versions.
44+
# Some of the depenancies do not have functional formula to allow 'brew' to install them,
45+
# and there for must be cloned from github and compiled.
46+
#
47+
# These include 'ifuse' and 'libimobiledevice-glue'
48+
# see:
49+
# git clone https://github.com/libimobiledevice/ifuse.git
50+
# git clone https://github.com/libimobiledevice/libimobiledevice-glue.git
51+
#
52+
# There are some basic requirements before this script can be run.
53+
# 1 You must have and run this under an Admin account, do not launch under 'sudo'
4354
# 2 macOS 13.4 or 13.4.1
4455
# 3 Xcode 14.3.1
4556
# 4 brew (aka HomeBrew https://brew.sh)
@@ -58,15 +69,15 @@ echo "
5869
then
5970
brew update
6071
brew upgrade
61-
72+
6273
# make sure we can compile
6374
brew install cmake
6475
brew install automake
6576
brew install autogen
6677
brew install autoconf
6778

6879
else
69-
echo "failded to find brew" >> error
80+
echo "failed to find brew" >> error
7081
exit_install
7182
fi
7283
}
@@ -84,9 +95,60 @@ echo ">>>>> uninstall <<<<<"
8495
sudo rm `which ifuse` 2>/dev/null
8596
}
8697

98+
#=======================================
99+
function compile_libimobiledevice-glue () {
100+
echo ""
101+
echo ">>>>> compile_libimobiledevice-glue <<<<<"
102+
103+
# install dependencies
104+
# 1 libplist non-head version
105+
106+
brew install --head libplist
107+
108+
if [ "${PWD##*/}" = "libimobiledevice-glue" ]; then
109+
if [ "${ARCH_NAME}" = "x86_64" ]; then
110+
touch "__compile_x86"
111+
echo "./autogen.sh --prefix=/usr/local"
112+
./autogen.sh --prefix=/usr/local
113+
else
114+
touch "__compile_aarch"
115+
echo "./autogen.sh --prefix=/opt/homebrew"
116+
./autogen.sh --prefix=/opt/homebrew
117+
fi
118+
make
119+
echo "sudo make install"
120+
sudo make install
121+
122+
if [ "${ARCH_NAME}" = "x86_64" ]; then
123+
#For Intel / x86-64 machines -
124+
ln -s /usr/local/lib/pkgconfig/libimobiledevice-glue-1.0.pc /usr/local/opt/libplist/lib/pkgconfig/libimobiledevice-glue-1.0.pc
125+
else
126+
#For M1 / aach64 machines -
127+
ln -s /opt/homebrew/lib/pkgconfig/libimobiledevice-glue-1.0.pc /opt/homebrew/opt/libplist/lib/pkgconfig/libimobiledevice-glue-1.0.pc
128+
fi
129+
130+
else
131+
echo "libimobiledevice-glue failure, in wrong path: `pwd`"
132+
exit_install
133+
fi
134+
}
135+
136+
#=======================================
137+
function install_libimobiledevice () {
138+
echo ""
139+
echo ">>>>> install_libimobiledevice <<<<<"
140+
141+
brew uninstall --ignore-dependencies libimobiledevice 2>/dev/null
142+
143+
brew install --head usbmuxd
144+
# brew install --head libplist
145+
brew install --head libimobiledevice
146+
brew unlink libimobiledevice && brew link libimobiledevice
147+
}
148+
87149
#=======================================
88150
# install ifuse
89-
# plus openssl
151+
# plus openssl
90152
function install_ifuse () {
91153
echo ""
92154
echo ">>>>> install_ifuse <<<<<"
@@ -95,8 +157,7 @@ echo ">>>>> install_ifuse <<<<<"
95157
# 1 libimobiledevice non-head version for openssl
96158
# 2 openssl
97159

98-
brew install libimobiledevice
99-
160+
install_libimobiledevice
100161
brew install openssl
101162

102163
LISTING=$(brew list openssl)
@@ -135,14 +196,8 @@ echo ">>>>> install_ifuse <<<<<"
135196
# now compile ifuse
136197
./autogen.sh
137198
make
138-
139-
if [ "$ARCH_NAME" == "x86_64" ];then
140-
echo "make install"
141-
make install
142-
else
143-
echo "sudo make install"
144-
sudo make install
145-
fi
199+
echo "sudo make install"
200+
sudo make install
146201
}
147202

148203
#=======================================
@@ -158,24 +213,32 @@ echo ""
158213
if [[ -d /Library/PreferencePanes/macFUSE.prefPane ]]; then
159214
init_brew
160215
do_uninstall
161-
162-
echo "============================ compile iFuse ============================"
163-
rm -fr ifuse
164-
git clone https://github.com/libimobiledevice/ifuse.git
165-
# unzip ../bu/ifuse.zip -d ./ ; rm -fr __MACOSX
166-
if [ -d ifuse ]; then
167-
( cd ifuse && install_ifuse )
168-
else
169-
echo "clone: failed to git clone https://github.com/libimobiledevice/ifuse.git" >> error
170-
exit_install
171-
fi
172-
173216
else
174217
echo "MacFuse not detected"
175218
echo "To install, visit https://osxfuse.github.io"
176-
exit_install
177219
fi
178220

221+
echo "============================ libimobiledevice-glue ============================"
222+
rm -fr libimobiledevice-glue
223+
git clone https://github.com/libimobiledevice/libimobiledevice-glue.git
224+
# unzip ../bu/libimobiledevice-glue.zip -d ./ ; rm -fr __MACOSX
225+
if [ -d libimobiledevice-glue ]; then
226+
( cd libimobiledevice-glue && compile_libimobiledevice-glue )
227+
else
228+
echo "clone: failed to git clone https://github.com/libimobiledevice/libimobiledevice-glue.git" >> error
229+
exit_install
230+
fi
231+
232+
echo "============================ compile iFuse ============================"
233+
rm -fr ifuse
234+
git clone https://github.com/libimobiledevice/ifuse.git
235+
# unzip ../bu/ifuse.zip -d ./ ; rm -fr __MACOSX
236+
if [ -d ifuse ]; then
237+
( cd ifuse && install_ifuse )
238+
else
239+
echo "clone: failed to git clone https://github.com/libimobiledevice/ifuse.git" >> error
240+
exit_install
241+
fi
179242
}
180243
#=======================================
181244
function exit_install (){

0 commit comments

Comments
 (0)