-
-
Notifications
You must be signed in to change notification settings - Fork 5.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
13 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,36 @@ | ||
@echo off | ||
setlocal enabledelayedexpansion | ||
|
||
:: Create activate/deactivate directories | ||
echo on | ||
|
||
echo "listing files..." | ||
dir | ||
|
||
echo "Creating activate/deactivate directories..." | ||
for %%C in (activate deactivate) do ( | ||
if not exist "%PREFIX%\etc\conda\%%C.d" mkdir "%PREFIX%\etc\conda\%%C.d" | ||
copy "%RECIPE_DIR%\scripts\%%C.bat" "%PREFIX%\etc\conda\%%C.d\%PKG_NAME%_%%C.bat" | ||
) | ||
|
||
:: Create temurin directory and move files | ||
echo "Creates java home" | ||
if not exist "%PREFIX%\opt" mkdir "%PREFIX%\opt" | ||
if not exist "%PREFIX%\opt\temurin" mkdir "%PREFIX%\opt\temurin" | ||
|
||
echo "Moving files to temurin directory..." | ||
move bin "%PREFIX%\opt\temurin\" | ||
move conf "%PREFIX%\opt\temurin\" | ||
move legal "%PREFIX%\opt\temurin\" | ||
move lib "%PREFIX%\opt\temurin\" | ||
move NOTICE "%PREFIX%\opt\temurin\" | ||
move release "%PREFIX%\opt\temurin\" | ||
|
||
:: Create bin directory if it doesn't exist | ||
echo "Create bin directory if it doesn't exist" | ||
if not exist "%PREFIX%\bin" mkdir "%PREFIX%\bin" | ||
|
||
:: Create symlink to java.exe | ||
echo "Create symlink to java.exe" | ||
mklink "%PREFIX%\bin\java.exe" "%PREFIX%\opt\temurin\bin\java.exe" | ||
|
||
:: Set environment variables | ||
echo "Set environment variables" | ||
set "JAVA_HOME=%PREFIX%\opt\temurin" | ||
set "PATH=%JAVA_HOME%\bin;%PATH%" | ||
set "PATH=%PREFIX%\bin;%PATH%" | ||
set "JAVA_LD_LIBRARY_PATH=%JAVA_HOME%\lib\server" | ||
|
||
:: Run java -Xshare:dump | ||
java.exe -Xshare:dump | ||
|
||
if errorlevel 1 exit 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters