| 6914 |
dpurdie |
1 |
@echo off
|
|
|
2 |
setlocal
|
|
|
3 |
REM Used to setup the buildtool
|
|
|
4 |
REM ABT_HOME - Where the ABT config files are to be fornd
|
|
|
5 |
REM - Where the ABT fixed JARs are to be found
|
|
|
6 |
REM ABT_JARS - Where the buildtool distribution is to be found
|
|
|
7 |
REM - JAR file will be copied from here
|
|
|
8 |
REM ABT_WORK - Working directory for the buildtool
|
|
|
9 |
REM - The CWD of the buildtool execution
|
|
|
10 |
REM
|
|
|
11 |
REM Used by the buildtool
|
|
|
12 |
REM GBE_ABT - Indicates the JATS that it is running an an ABT environment
|
|
|
13 |
REM GBE_LOG - Path to the builtool logging directory
|
|
|
14 |
REM GBE_UNC - Web server path for error logs
|
|
|
15 |
REM GBE_RM_USERNAME - Release Manager credentials
|
|
|
16 |
REM GBE_RM_PASSWORD - Allowing write access to Release Manager
|
|
|
17 |
REM GBE_DPKG_SSH_PROPERTIES - path to ssh properties file holding ssh credentials
|
|
|
18 |
REM
|
|
|
19 |
REM Internal
|
|
|
20 |
REM JAR - Path to the buildtool jar
|
|
|
21 |
REM
|
|
|
22 |
set ABT_HOME=D:\work\buildtool
|
|
|
23 |
set ABT_JARS=V:\dpkg_archive\buildtool\latest\etc
|
|
|
24 |
set ABT_WORK=F:\abt
|
|
|
25 |
set GBE_ABT=1
|
|
|
26 |
set GBE_LOG=V:\abtlog
|
|
|
27 |
set GBE_UNC=http://auperaarc01/devl/abtlog
|
|
|
28 |
set GBE_RM_USERNAME=build_user
|
|
|
29 |
set GBE_RM_PASSWORD=frog123
|
|
|
30 |
set GBE_DPKG_SSH_PROPERTIES=%GBE_DPKG%\.dpkg_archive\fragments.properties
|
|
|
31 |
|
|
|
32 |
set JAR=%ABT_HOME%\abtdD.jar
|
|
|
33 |
|
|
|
34 |
if "%GBE_RM_LOCATION%" == "" (
|
|
|
35 |
echo Error: Program abtlaunch.bat
|
|
|
36 |
echo Error: EnvVar GBE_RM_LOCATION not set
|
|
|
37 |
echo Error: Run in a jats shell eg jats eprog abtlaunch
|
|
|
38 |
exit /B 1
|
|
|
39 |
)
|
|
|
40 |
|
|
|
41 |
if "%JAVA_HOME_1_6%" == "" (
|
|
|
42 |
echo Error: Program abtlaunch.bat
|
|
|
43 |
echo Error: EnvVar JAVA_HOME_1_6 not set
|
|
|
44 |
echo Error: Run in a jats shell eg jats eprog abtlaunch
|
|
|
45 |
exit /B 1
|
|
|
46 |
)
|
|
|
47 |
|
|
|
48 |
if not exist "%JAVA_HOME_1_6%\bin\java.exe" (
|
|
|
49 |
echo Error: Program abtlaunch.bat
|
|
|
50 |
echo Error: The java program does not exist
|
|
|
51 |
echo Error: Location: "%JAVA_HOME_1_6%\bin\java"
|
|
|
52 |
exit /B 1
|
|
|
53 |
)
|
|
|
54 |
|
|
|
55 |
if not exist "%ABT_JARS%" (
|
|
|
56 |
echo Error: Program abtlaunch.bat
|
|
|
57 |
echo Error: %ABT_JARS% does not exist
|
|
|
58 |
exit /B 1
|
|
|
59 |
)
|
|
|
60 |
|
|
|
61 |
if not exist "%ABT_HOME%" (
|
|
|
62 |
echo Error: Program abtlaunch.bat
|
|
|
63 |
echo Error: %ABT_HOME% does not exist
|
|
|
64 |
exit /B 1
|
|
|
65 |
)
|
|
|
66 |
|
|
|
67 |
if not exist "%ABT_WORK%" (
|
|
|
68 |
echo Error: Program abtlaunch.bat
|
|
|
69 |
echo Error: The ABT work directory does not exist
|
|
|
70 |
echo Error: Dir: %ABT_WORK%
|
|
|
71 |
exit /B 1
|
|
|
72 |
)
|
|
|
73 |
|
|
|
74 |
REM
|
|
|
75 |
REM Copy in the latest JARS
|
|
|
76 |
REM
|
|
|
77 |
echo Copy in JAR files
|
|
|
78 |
copy %ABT_JARS%\*.jar %ABT_HOME%
|
|
|
79 |
if ERRORLEVEL 1 (
|
|
|
80 |
echo Error: Program abtlaunch.bat
|
|
|
81 |
echo Error: Error occured copying latest builtool executables
|
|
|
82 |
exit /B 1
|
|
|
83 |
)
|
|
|
84 |
|
|
|
85 |
if not exist "%JAR%" (
|
|
|
86 |
echo Error: Program abtlaunch.bat
|
|
|
87 |
echo Error: Required Jar does not exist: %JAR%
|
|
|
88 |
exit /B 1
|
|
|
89 |
)
|
|
|
90 |
|
|
|
91 |
set PATH=%ABT_HOME%;%PATH%
|
|
|
92 |
rem change drive and folder
|
|
|
93 |
cd /D %ABT_WORK%
|
|
|
94 |
echo %DATE% %TIME% AbtLaunch. Start jar
|
|
|
95 |
"%JAVA_HOME_1_6%\bin\java" -jar %JAR%
|
|
|
96 |
echo %DATE% %TIME% AbtLaunch. End jar
|
|
|
97 |
|
|
|
98 |
endlocal
|