Skip to content

Commit

Permalink
remove: GraalVM Java 20
Browse files Browse the repository at this point in the history
  • Loading branch information
uchks committed Aug 21, 2023
1 parent 5ad5857 commit 00bb403
Showing 1 changed file with 7 additions and 27 deletions.
34 changes: 7 additions & 27 deletions lcbud.bat
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ echo Created by unethical
echo https://discord.gg/vhJ8Dsp9qa
echo.
echo JREs:
echo 1) GraalVM
echo 1) GraalVM 17
echo 2) Go Back
echo.
set /p jres="Select an option: "
Expand All @@ -366,50 +366,30 @@ echo lcbud - Lunar Client Batch Utility Downloader: %ver%
echo Created by unethical
echo https://discord.gg/vhJ8Dsp9qa
echo.
echo 1) GraalVM Java 20
echo 2) GraalVM Java 17
echo 3) Go Back
echo.
set /p selection="Select an option: "

set "javaVersion="
if "%selection%"=="1" (
set "javaVersion=20"
) else if "%selection%"=="2" (
set "javaVersion=17"
) else if "%selection%"=="3" (
goto :jres
) else (
goto :graalvmdownloader
)

echo Opening folder picker...
:: Open folder picker
for /f %%I in ('cscript //nologo FolderPicker.vbs') do set "outputPath=%%~I"

if not defined outputPath (
echo No folder selected.
goto :graalvmdownloader
)

set "graalFolderName=graalvm-jdk%javaVersion%-%javaVersion%"
set "folder=%outputPath%\%graalFolderName%"
set "zip=%graalFolderName%.zip"
set "downloadUrl=https://download.oracle.com/graalvm/%javaVersion%/latest/graalvm-jdk-%javaVersion%_windows-x64_bin.zip"
set "folder=%outputPath%\graalvm-jdk17"
set "zip=graalvm-jdk17.zip"
set "downloadUrl=https://download.oracle.com/graalvm/17/latest/graalvm-jdk-17_windows-x64_bin.zip"

if not exist "%zip%" (
echo Downloading GraalVM from %downloadUrl%
call :DownloadFile "%downloadUrl%" "%zip%"
if errorlevel 1 (
echo Failed to download GraalVM!
exit /b 1
goto :jres
)
)

echo Extracting GraalVM to the specified folder...
mkdir "%folder%"
mkdir "%folder%" 2>nul
tar -xzf "%zip%" -C "%folder%" --strip-components=1

echo Cleaning up...
del "%zip%" > nul 2>&1

echo Completed!
Expand Down

0 comments on commit 00bb403

Please sign in to comment.