Updated Installer to Download Portable 7zip Executable
This commit is contained in:
parent
790929c9d6
commit
4d074a4565
|
@ -8,6 +8,7 @@ echo %repository%
|
||||||
|
|
||||||
:: Set path to the portable Git executable (change this if needed)
|
:: Set path to the portable Git executable (change this if needed)
|
||||||
set "portable_git=%mo2_install%\PortableGit\bin\git.exe"
|
set "portable_git=%mo2_install%\PortableGit\bin\git.exe"
|
||||||
|
set "portable_7z=%mod_install%\7zr.exe"
|
||||||
|
|
||||||
:: Check if curl is installed
|
:: Check if curl is installed
|
||||||
where curl >nul 2>nul
|
where curl >nul 2>nul
|
||||||
|
@ -38,14 +39,21 @@ if not exist "%mo2_install%\PortableGit\bin\git.exe" (
|
||||||
)
|
)
|
||||||
|
|
||||||
:: Check if 7z is installed
|
:: Check if 7z is installed
|
||||||
where 7z >nul 2>nul
|
if not exist "%mo2_install%\7zr.exe" (
|
||||||
if %errorlevel% neq 0 (
|
echo ----
|
||||||
echo ERROR: 7z is not installed or not in your PATH.
|
echo Installing 7zip Portable...
|
||||||
echo Please install 7-Zip or NanaZip and add it to your PATH.
|
:: Download 7zip Portable
|
||||||
pause
|
curl -L -o 7zr.exe https://www.7-zip.org/a/7zr.exe
|
||||||
exit /b
|
|
||||||
)
|
)
|
||||||
|
|
||||||
|
:: where 7z >nul 2>nul
|
||||||
|
:: if %errorlevel% neq 0 (
|
||||||
|
:: echo ERROR: 7z is not installed or not in your PATH.
|
||||||
|
:: echo Please install 7-Zip or NanaZip and add it to your PATH.
|
||||||
|
:: pause
|
||||||
|
:: exit /b
|
||||||
|
:: )
|
||||||
|
|
||||||
IF EXIST "%mo2_install%\ModOrganizer.exe" (
|
IF EXIST "%mo2_install%\ModOrganizer.exe" (
|
||||||
call :UpdateModpack
|
call :UpdateModpack
|
||||||
exit /B 0
|
exit /B 0
|
||||||
|
@ -111,7 +119,7 @@ IF EXIST "%mo2_install%\ModOrganizer.exe" (
|
||||||
)
|
)
|
||||||
|
|
||||||
:: Extracting MO2 and installing
|
:: Extracting MO2 and installing
|
||||||
7z x MO2.7z
|
.\7zr x MO2.7z
|
||||||
if %errorlevel% neq 0 (
|
if %errorlevel% neq 0 (
|
||||||
echo ERROR: Failed to extract the archive. Ensure the archive is valid and try again.
|
echo ERROR: Failed to extract the archive. Ensure the archive is valid and try again.
|
||||||
pause
|
pause
|
||||||
|
|
Loading…
Reference in New Issue