Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
121 changes: 92 additions & 29 deletions vo_dependency_installer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

#=======================================
# vo_dependency_installer.sh
VERSION="1.0.1.0"
VERSION="1.0.1.1"
#
# Howto use this script:
# From your browser, select 'Save' and choose or create an empty folder. Make sure the script has the extension '.sh'.
Expand All @@ -38,8 +38,19 @@ VERSION="1.0.1.0"
#
# It is advised that the computer is backed up, and important data is safely stored.
#
# There are some basic requirements before this script should be run.
# 1 You must have and run this under an Admin account, do not run under 'sudo'
# The dependancies that are required include some 'HEAD' versions, which are not yet
# considered to be stable. 'libimobiledevice' is installed under HEAD, which may bring
# other dependancies, possibly also HEAD versions.
# Some of the depenancies do not have functional formula to allow 'brew' to install them,
# and there for must be cloned from github and compiled.
#
# These include 'ifuse' and 'libimobiledevice-glue'
# see:
# git clone https://github.com/libimobiledevice/ifuse.git
# git clone https://github.com/libimobiledevice/libimobiledevice-glue.git
#
# There are some basic requirements before this script can be run.
# 1 You must have and run this under an Admin account, do not launch under 'sudo'
# 2 macOS 13.4 or 13.4.1
# 3 Xcode 14.3.1
# 4 brew (aka HomeBrew https://brew.sh)
Expand All @@ -58,15 +69,15 @@ echo "
then
brew update
brew upgrade

# make sure we can compile
brew install cmake
brew install automake
brew install autogen
brew install autoconf

else
echo "failded to find brew" >> error
echo "failed to find brew" >> error
exit_install
fi
}
Expand All @@ -84,9 +95,60 @@ echo ">>>>> uninstall <<<<<"
sudo rm `which ifuse` 2>/dev/null
}

#=======================================
function compile_libimobiledevice-glue () {
echo ""
echo ">>>>> compile_libimobiledevice-glue <<<<<"

# install dependencies
# 1 libplist non-head version

brew install --head libplist

if [ "${PWD##*/}" = "libimobiledevice-glue" ]; then
if [ "${ARCH_NAME}" = "x86_64" ]; then
touch "__compile_x86"
echo "./autogen.sh --prefix=/usr/local"
./autogen.sh --prefix=/usr/local
else
touch "__compile_aarch"
echo "./autogen.sh --prefix=/opt/homebrew"
./autogen.sh --prefix=/opt/homebrew
fi
make
echo "sudo make install"
sudo make install

if [ "${ARCH_NAME}" = "x86_64" ]; then
#For Intel / x86-64 machines -
ln -s /usr/local/lib/pkgconfig/libimobiledevice-glue-1.0.pc /usr/local/opt/libplist/lib/pkgconfig/libimobiledevice-glue-1.0.pc
else
#For M1 / aach64 machines -
ln -s /opt/homebrew/lib/pkgconfig/libimobiledevice-glue-1.0.pc /opt/homebrew/opt/libplist/lib/pkgconfig/libimobiledevice-glue-1.0.pc
fi

else
echo "libimobiledevice-glue failure, in wrong path: `pwd`"
exit_install
fi
}

#=======================================
function install_libimobiledevice () {
echo ""
echo ">>>>> install_libimobiledevice <<<<<"

brew uninstall --ignore-dependencies libimobiledevice 2>/dev/null

brew install --head usbmuxd
# brew install --head libplist
brew install --head libimobiledevice
brew unlink libimobiledevice && brew link libimobiledevice
}

#=======================================
# install ifuse
# plus openssl
# plus openssl
function install_ifuse () {
echo ""
echo ">>>>> install_ifuse <<<<<"
Expand All @@ -95,8 +157,7 @@ echo ">>>>> install_ifuse <<<<<"
# 1 libimobiledevice non-head version for openssl
# 2 openssl

brew install libimobiledevice

install_libimobiledevice
brew install openssl

LISTING=$(brew list openssl)
Expand Down Expand Up @@ -135,14 +196,8 @@ echo ">>>>> install_ifuse <<<<<"
# now compile ifuse
./autogen.sh
make

if [ "$ARCH_NAME" == "x86_64" ];then
echo "make install"
make install
else
echo "sudo make install"
sudo make install
fi
echo "sudo make install"
sudo make install
}

#=======================================
Expand All @@ -158,24 +213,32 @@ echo ""
if [[ -d /Library/PreferencePanes/macFUSE.prefPane ]]; then
init_brew
do_uninstall

echo "============================ compile iFuse ============================"
rm -fr ifuse
git clone https://github.com/libimobiledevice/ifuse.git
# unzip ../bu/ifuse.zip -d ./ ; rm -fr __MACOSX
if [ -d ifuse ]; then
( cd ifuse && install_ifuse )
else
echo "clone: failed to git clone https://github.com/libimobiledevice/ifuse.git" >> error
exit_install
fi

else
echo "MacFuse not detected"
echo "To install, visit https://osxfuse.github.io"
exit_install
fi

echo "============================ libimobiledevice-glue ============================"
rm -fr libimobiledevice-glue
git clone https://github.com/libimobiledevice/libimobiledevice-glue.git
# unzip ../bu/libimobiledevice-glue.zip -d ./ ; rm -fr __MACOSX
if [ -d libimobiledevice-glue ]; then
( cd libimobiledevice-glue && compile_libimobiledevice-glue )
else
echo "clone: failed to git clone https://github.com/libimobiledevice/libimobiledevice-glue.git" >> error
exit_install
fi

echo "============================ compile iFuse ============================"
rm -fr ifuse
git clone https://github.com/libimobiledevice/ifuse.git
# unzip ../bu/ifuse.zip -d ./ ; rm -fr __MACOSX
if [ -d ifuse ]; then
( cd ifuse && install_ifuse )
else
echo "clone: failed to git clone https://github.com/libimobiledevice/ifuse.git" >> error
exit_install
fi
}
#=======================================
function exit_install (){
Expand Down