Removed nonworking msys support

- to clean up the code a bit, msys support has been removed (that isn't working anyway)
- it's now in the separate win branch again with some fixes
- win branch will only be merged if I ever get a working futurerestore with libipatcher for windows
This commit is contained in:
LukeeGD 2020-09-02 13:46:55 +08:00
parent 479b320bc7
commit f2456f3b1d

View File

@ -54,15 +54,9 @@ function Main {
futurerestore2="${futurerestore2}_bionic"
tsschecker="${tsschecker}_bionic"
fi
else
if [[ $OSTYPE == "darwin"* ]]; then
elif [[ $OSTYPE == "darwin"* ]]; then
platform='macos'
lsusb="system_profiler SPUSBDataType 2>/dev/null"
elif [[ $(uname -s) == "MINGW64_NT"* ]]; then
platform='win'
lsusb="wmic path Win32_USBControllerDevice get Dependent"
ping="ping -n 1"
fi
bspatch="resources/tools/bspatch_$platform"
ideviceenterrecovery="resources/libimobiledevice_$platform/ideviceenterrecovery"
ideviceinfo="resources/libimobiledevice_$platform/ideviceinfo"
@ -75,10 +69,9 @@ function Main {
tsschecker="resources/tools/tsschecker_$platform"
fi
partialzip="resources/tools/partialzip_$platform"
[[ ! $ping ]] && ping="ping -c1"
[[ ! $platform ]] && Error "Platform unknown/not supported."
[[ ! $($ping google.com 2>/dev/null) ]] && Error "Please check your Internet connection before proceeding."
[[ ! $(ping -c1 google.com 2>/dev/null) ]] && Error "Please check your Internet connection before proceeding."
[[ $(uname -m) != 'x86_64' ]] && Error "Only x86_64 distributions are supported. Use a 64-bit distro and try again"
DFUDevice=$($lsusb | grep -ci '1227')
@ -115,7 +108,7 @@ function Main {
Echo "* UniqueChipID (ECID): $UniqueChipID"
echo
if [[ $DFUDevice == 1 ]] && [[ $A7Device != 1 ]] && [[ $platform != win ]]; then
if [[ $DFUDevice == 1 ]] && [[ $A7Device != 1 ]]; then
DFUManual=1
Mode='Downgrade'
Log "32-bit device in DFU mode detected."
@ -406,7 +399,7 @@ function Downgrade {
Log "Preparing for futurerestore... (Enter root password of your PC/Mac when prompted)"
cd resources
[[ $platform != win ]] && sudo bash -c "$python -m SimpleHTTPServer 80 &" || python3 -m http.server --bind 127.0.0.1 80 &
sudo bash -c "$python -m SimpleHTTPServer 80 &"
cd ..
if [ $Baseband == 0 ]; then
@ -508,16 +501,6 @@ function InstallDependencies {
xcode-select --install
SaveFile https://github.com/libimobiledevice-win32/imobiledevice-net/releases/download/v1.3.4/libimobiledevice.1.2.1-r1079-osx-x64.zip libimobiledevice.zip 2812e01fc7c09b5980b46b97236b2981dbec7307
elif [[ $platform == "win" ]]; then
# Windows MSYS2 MinGW64
pacman -Sy --noconfirm --needed mingw-w64-x86_64-python openssh unzip
SaveFile https://github.com/libimobiledevice-win32/imobiledevice-net/releases/download/v1.3.4/libimobiledevice.1.2.1-r1079-win-x64.zip libimobiledevice.zip 6d23f7d28e2212d9acc0723fe4f3fdec8e2ddeb8
if [[ ! $(ls ../resources/tools/*win) ]]; then
SaveFile https://github.com/LukeZGD/iOS-OTA-Downgrader/releases/download/tools/tools_win.zip tools_win.zip 92dd493c2128ad81255180b2536445dc1643ed55
unzip tools_win.zip -d ../resources/tools
fi
ln -sf /mingw64/bin/libplist-2.0.dll /mingw64/bin/libplist.dll
else
Error "Distro not detected/supported by the install script." "See the repo README for supported OS versions/distros"
fi
@ -670,10 +653,6 @@ function BasebandDetect {
iBEC="iBEC.$iBSS.RELEASE"
iBSS="iBSS.$iBSS.RELEASE"
SEP=sep-firmware.$HWModel.RELEASE.im4p
if [[ $platform == win ]] && [[ $A7Device == 1 ]]; then
Error "A7 devices are not supported on Windows." "Supports Linux and macOS only"
fi
}
Main $1