diff --git a/Download Modpack.bat b/Download Modpack.bat index f676bf0..95c93cb 100644 --- a/Download Modpack.bat +++ b/Download Modpack.bat @@ -8,6 +8,7 @@ echo %repository% :: Set path to the portable Git executable (change this if needed) set "portable_git=%mo2_install%\PortableGit\bin\git.exe" +set "portable_7z=%mod_install%\7zr.exe" :: Check if curl is installed where curl >nul 2>nul @@ -38,14 +39,21 @@ if not exist "%mo2_install%\PortableGit\bin\git.exe" ( ) :: Check if 7z is installed -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 not exist "%mo2_install%\7zr.exe" ( + echo ---- + echo Installing 7zip Portable... + :: Download 7zip Portable + curl -L -o 7zr.exe https://www.7-zip.org/a/7zr.exe ) +:: 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" ( call :UpdateModpack exit /B 0 @@ -111,7 +119,7 @@ IF EXIST "%mo2_install%\ModOrganizer.exe" ( ) :: Extracting MO2 and installing - 7z x MO2.7z + .\7zr x MO2.7z if %errorlevel% neq 0 ( echo ERROR: Failed to extract the archive. Ensure the archive is valid and try again. pause