Repository navigation
Expand file tree
/
Copy pathipatool-gui.bat
More file actions
61 lines (53 loc) · 1.52 KB
/
Copy pathipatool-gui.bat
File metadata and controls
61 lines (53 loc) · 1.52 KB
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
@echo off
title ipatool GUI — App Store Downloader for Windows
cd /d "%~dp0"
echo =======================================================
echo ipatool GUI for Windows
echo =======================================================
echo.
:: Check if port 54321 is already in use
netstat -ano | findstr :54321 | findstr LISTENING >nul 2>nul
if %ERRORLEVEL% equ 0 (
echo [ERROR] Port 54321 is already in use!
echo.
echo Another instance of ipatool GUI or another application
echo is already using port 54321.
echo.
echo Please close the other application and try again,
echo or wait a moment for it to fully shut down.
echo.
pause
exit /b 1
)
echo Checking for ipatool binary...
if exist "ipatool.exe" (
echo Found ipatool.exe. Starting GUI server...
ipatool.exe gui --port 54321
goto :exit
)
if exist "bin\ipatool.exe" (
echo Found bin\ipatool.exe. Starting GUI server...
bin\ipatool.exe gui --port 54321
goto :exit
)
where ipatool >nul 2>nul
if %ERRORLEVEL% equ 0 (
echo Found ipatool in PATH. Starting GUI server...
ipatool gui --port 54321
goto :exit
)
echo [ERROR] ipatool.exe was not found.
echo Please place ipatool.exe in this folder or add ipatool to PATH.
pause
exit /b 1
:exit
echo.
if %ERRORLEVEL% neq 0 (
echo.
echo =======================================================
echo An error occurred (exit code: %ERRORLEVEL%)
echo Read the output above for details.
echo =======================================================
)
echo.
pause