-
Notifications
You must be signed in to change notification settings - Fork 14
Expand file tree
/
Copy pathenv.bat
More file actions
101 lines (101 loc) · 4.36 KB
/
env.bat
File metadata and controls
101 lines (101 loc) · 4.36 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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
:: This file is generated by build.xml
@echo off
setlocal enabledelayedexpansion
if not exist "%~dp0download\" (
mkdir "%~dp0download"
)
if not exist "%~dp0build\tmp\build\" (
mkdir "%~dp0build\tmp\build"
)
set DOWNLOAD_HELP=download https://github.com/adoptium/temurin25-binaries/releases/download/jdk-25.0.2+10/OpenJDK25U-jdk_x64_windows_hotspot_25.0.2_10.zip manually, move it to %~dp0download and restart this script
if not exist "%~dp0download\OpenJDK25U-jdk_x64_windows_hotspot_25.0.2_10.zip" (
echo "In case of errors %DOWNLOAD_HELP%"
curl -f -o "%~dp0download\OpenJDK25U-jdk_x64_windows_hotspot_25.0.2_10.zip.tmp" -L https://github.com/adoptium/temurin25-binaries/releases/download/jdk-25.0.2+10/OpenJDK25U-jdk_x64_windows_hotspot_25.0.2_10.zip
if !errorlevel! neq 0 (
echo "Please %DOWNLOAD_HELP%"
goto error
)
move "%~dp0download\OpenJDK25U-jdk_x64_windows_hotspot_25.0.2_10.zip.tmp" "%~dp0download\OpenJDK25U-jdk_x64_windows_hotspot_25.0.2_10.zip"
)
if not exist "%~dp0build\jdk-25.0.2+10\" (
tar --exclude=*/demo --exclude=*/sample --exclude=*/manual --exclude=*/src.zip -xvf "%~dp0download\OpenJDK25U-jdk_x64_windows_hotspot_25.0.2_10.zip" -C "%~dp0build\tmp\build"
if !errorlevel! neq 0 (
echo "Please %DOWNLOAD_HELP%"
goto error
)
move "%~dp0build\tmp\build\jdk-25.0.2+10" "%~dp0build\jdk-25.0.2+10"
RUN_INSTALL="true"
)
set DOWNLOAD_HELP=download https://archive.apache.org/dist/ant/binaries/apache-ant-1.10.17-bin.zip manually, move it to %~dp0download and restart this script
if not exist "%~dp0download\apache-ant-1.10.17-bin.zip" (
echo "In case of errors %DOWNLOAD_HELP%"
curl -f -o "%~dp0download\apache-ant-1.10.17-bin.zip.tmp" -L https://archive.apache.org/dist/ant/binaries/apache-ant-1.10.17-bin.zip
if !errorlevel! neq 0 (
echo "Please %DOWNLOAD_HELP%"
goto error
)
move "%~dp0download\apache-ant-1.10.17-bin.zip.tmp" "%~dp0download\apache-ant-1.10.17-bin.zip"
)
if not exist "%~dp0build\apache-ant-1.10.17\" (
tar --exclude=*/demo --exclude=*/sample --exclude=*/manual --exclude=*/src.zip -xvf "%~dp0download\apache-ant-1.10.17-bin.zip" -C "%~dp0build\tmp\build"
if !errorlevel! neq 0 (
echo "Please %DOWNLOAD_HELP%"
goto error
)
move "%~dp0build\tmp\build\apache-ant-1.10.17" "%~dp0build\apache-ant-1.10.17"
)
set DOWNLOAD_HELP=download https://github.com/mozilla/rhino/releases/download/Rhino1_7_15_Release/rhino-1.7.15.zip manually, move it to %~dp0download and restart this script
if not exist "%~dp0download\rhino-1.7.15.zip" (
echo "In case of errors %DOWNLOAD_HELP%"
curl -f -o "%~dp0download\rhino-1.7.15.zip.tmp" -L https://github.com/mozilla/rhino/releases/download/Rhino1_7_15_Release/rhino-1.7.15.zip
if !errorlevel! neq 0 (
echo "Please %DOWNLOAD_HELP%"
goto error
)
move "%~dp0download\rhino-1.7.15.zip.tmp" "%~dp0download\rhino-1.7.15.zip"
)
if not exist "%~dp0build\rhino1.7.15\" (
tar --exclude=*/demo --exclude=*/sample --exclude=*/manual --exclude=*/src.zip -xvf "%~dp0download\rhino-1.7.15.zip" -C "%~dp0build\tmp\build"
if !errorlevel! neq 0 (
echo "Please %DOWNLOAD_HELP%"
goto error
)
move "%~dp0build\tmp\build\rhino1.7.15" "%~dp0build\rhino1.7.15"
)
if not exist "%~dp0build\apache-ant-1.10.17\lib\rhino-1.7.15.jar" (
del "%~dp0build\apache-ant-1.10.17\lib\rhino-*.jar"
copy "%~dp0build\rhino1.7.15\lib\rhino-*.jar" "%~dp0build\apache-ant-1.10.17\lib\"
)
if not exist "%~dp0build\apache-ant-1.10.17\lib\progressbarget.jar" (
copy "%~dp0extensions\progress-bar\progressbarget.jar" "%~dp0build\apache-ant-1.10.17\lib\"
)
set JDK_8_DIR=%~dp0%build\jdk8u482-b08
set JDK_11_DIR=%~dp0%build\jdk-11.0.30+7
set JDK_17_DIR=%~dp0%build\jdk-17.0.18+8
set JDK_21_DIR=%~dp0%build\jdk-21.0.10+7
set JDK_25_DIR=%~dp0%build\jdk-25.0.2+10
if not exist "%JDK_8_DIR%" (
set RUN_INSTALL=true
)
if not exist "%JDK_11_DIR%" (
set RUN_INSTALL=true
)
if not exist "%JDK_17_DIR%" (
set RUN_INSTALL=true
)
if not exist "%JDK_21_DIR%" (
set RUN_INSTALL=true
)
if not exist "%~dp0build\apache-maven-3.9.14" (
set RUN_INSTALL=true
)
set JAVA_HOME=%JDK_25_DIR%
set ANT_HOME=%~dp0build\apache-ant-1.10.17
if "%RUN_INSTALL%" == "true" (
call "%~dp0build\apache-ant-1.10.17\bin\ant" -emacs -buildfile "%~dp0build.xml" install
)
set PATH=%JAVA_HOME%\bin;%ANT_HOME%\bin;%~dp0build\apache-maven-3.9.14\bin;%PATH%
echo JAVA : %JAVA_HOME%
echo ANT : %ANT_HOME%
echo MAVEN: %~dp0build\apache-maven-3.9.14
endlocal & SET JAVA_HOME=%JAVA_HOME% & SET ANT_HOME=%ANT_HOME% & SET PATH=%PATH%