1.add code to support friendly output message.
[mirror_edk2.git] / Tools / bin / ContextTool.bat
CommitLineData
c74c7a43 1@REM\r
2@REM Copyright (c) 2006, Intel Corporation\r
3@REM All rights reserved. This program and the accompanying materials\r
4@REM are licensed and made available under the terms and conditions of the BSD License\r
5@REM which accompanies this distribution. The full text of the license may be found at\r
6@REM http://opensource.org/licenses/bsd-license.php\r
7@REM \r
8@REM THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
9@REM WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
10@REM\r
11\r
12@echo off\r
13\r
14:check_java\r
15if "%JAVA_HOME%"=="" goto no_jdk\r
16:check_wks\r
17if "%WORKSPACE%"=="" goto no_wks\r
18:check_ant\r
19if "%ANT_HOME%"=="" goto no_ant\r
20:check_xmlbeans\r
21if "%XMLBEANS_HOME%"=="" goto no_xmlbeans\r
22:check_surfacearea\r
23if not exist %WORKSPACE%\Tools\Jars\SurfaceArea.jar (\r
24 goto no_surfacearea\r
25)\r
26:check_ContextTool\r
27if not exist %WORKSPACE%\Tools\Jars\ContextTool.jar (\r
28 goto no_ContextTool\r
29)\r
30\r
31@REM Run Framework Wizard\r
c81f5d44 32java -cp %WORKSPACE%\Tools\Jars\ContextTool.jar org.tianocore.context.ContextMain %*\r
c74c7a43 33\r
34goto end\r
35\r
36:no_jdk\r
37@echo.\r
38@echo !!! Please set JAVA_HOME !!!\r
39@echo.\r
40goto check_wks\r
41\r
42:no_wks\r
43@echo.\r
44@echo !!! Please set WORKSPACE !!!\r
45@echo.\r
46goto check_ant\r
47\r
48:no_ant\r
49@echo.\r
50@echo !!! Please set ANT_HOME !!!\r
51@echo.\r
52goto check_xmlbeans\r
53\r
54:no_xmlbeans\r
55@echo.\r
56@echo !!! Please set XMLBEANS_HOME !!!\r
57@echo.\r
58goto end\r
59\r
60:no_surfacearea\r
61@echo.\r
62@echo !!! Please run edksetup.bat to build SurfaceArea.jar !!!\r
63@echo.\r
64goto end\r
65\r
66:no_ContextTool\r
67@echo.\r
68@echo !!! Please run edksetup.bat to build ContextTool.jar !!!\r
69@echo.\r
70goto end\r
71\r
72:end\r
73@echo on\r