]>
Commit | Line | Data |
---|---|---|
bd63012c | 1 | @REM @file\r |
2 | @REM Windows batch file to set up the Microsoft Visual Studio environment\r | |
3 | @REM\r | |
4 | @REM This script is used to set up one of the Microsoft Visual Studio\r | |
5 | @REM environments, VS2008x86, VS2010x86, VS2012x86 or VS2013x86 for\r | |
6 | @REM building the Nt32Pkg/Nt32Pkg.dsc emulation environment to run on\r | |
7 | @REM an X64 version of Windows.\r | |
8 | @REM The system environment variables in this script are set by the\r | |
9 | @rem Edk2Setup.bat script (that will be renamed to edksetup.bat).\r | |
10 | @REM\r | |
11 | @REM This script can also be used to build the Win32 binaries\r | |
12 | @REM\r | |
13 | @REM Copyright (c) 2014, Intel Corporation. All rights reserved.<BR>\r | |
14 | @REM This program and the accompanying materials\r | |
15 | @REM are licensed and made available under the terms and conditions of the BSD License\r | |
16 | @REM which accompanies this distribution. The full text of the license may be found at\r | |
17 | @REM http://opensource.org/licenses/bsd-license.php\r | |
18 | @REM\r | |
19 | @REM THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r | |
20 | @REM WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r | |
21 | @REM\r | |
22 | @echo off\r | |
23 | @if defined NT32_X64 @goto CheckLatest\r | |
24 | @if "%REBUILD_TOOLS%"=="TRUE" @goto RebuildTools\r | |
25 | \r | |
26 | :CheckLatest\r | |
27 | echo.\r | |
28 | @if defined VS120COMNTOOLS (\r | |
29 | @set "COMMONTOOLSx64=C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin\x86_amd64"\r | |
30 | @goto SetVs\r | |
31 | )\r | |
32 | \r | |
33 | @if defined VS110COMNTOOLS (\r | |
34 | @set "COMMONTOOLSx64=C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\bin\x86_amd64"\r | |
35 | @goto SetVs\r | |
36 | )\r | |
37 | \r | |
38 | @if defined VS100COMNTOOLS (\r | |
39 | @set "COMMONTOOLSx64=C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\x86_amd64"\r | |
40 | @goto SetVs\r | |
41 | )\r | |
42 | \r | |
43 | @if defined VS90COMNTOOLS (\r | |
44 | @set "COMMONTOOLSx64=C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin\x86_amd64"\r | |
45 | @goto SetVs\r | |
46 | )\r | |
47 | @echo.\r | |
48 | @echo No version of Microsoft Visual Studio was found on this system\r | |
49 | @echo.\r | |
50 | @exit /B 1\r | |
51 | \r | |
52 | @REM Set up the X64 environment for building Nt32Pkg/Nt32Pkg.dsc to run on an X64 platform\r | |
53 | :SetVs\r | |
54 | if exist "%COMMONTOOLSx64%\vcvarsx86_amd64.bat" (\r | |
55 | @call "%COMMONTOOLSx64%\vcvarsx86_amd64.bat"\r | |
56 | @if errorlevel 1 (\r | |
57 | @echo. ERROR setting Microsoft Visual Studio %1\r | |
58 | @set COMMONTOOLSx64=\r | |
59 | @exit /B 1\r | |
60 | )\r | |
61 | )\r | |
62 | if not exist "%COMMONTOOLSx64%\vcvarsx86_amd64.bat" (\r | |
63 | @echo ERROR : This script does not exist: "%COMMONTOOLSx64%\vcvarsx86_amd64.bat"\r | |
64 | @set COMMONTOOLSx64=\r | |
65 | @exit /B 1\r | |
66 | )\r | |
67 | @set COMMONTOOLSx64=\r | |
68 | @goto End\r | |
69 | \r | |
70 | :RebuildTools\r | |
71 | @call python "%WORKSPACE%\BaseTools\Scripts\UpdateBuildVersions.py"\r | |
72 | @set "BIN_DIR=%EDK_TOOLS_PATH%\Bin\Win32"\r | |
73 | if not exist "%BIN_DIR%" @mkdir "%BIN_DIR%"\r | |
74 | @echo Removing temporary and binary files\r | |
75 | @cd "%BASE_TOOLS_PATH%"\r | |
76 | @call nmake cleanall\r | |
77 | @echo Rebuilding the EDK II BaseTools\r | |
78 | @cd "%BASE_TOOLS_PATH%\Source\C"\r | |
79 | @call nmake -nologo -a -f Makefile\r | |
80 | @if errorlevel 1 (\r | |
81 | @echo Error building the C-based BaseTools\r | |
82 | @cd "%WORKSPACE%"\r | |
83 | @exit /B1\r | |
84 | )\r | |
85 | @cd %BASE_TOOLS_PATH%\Source\Python\r | |
86 | @call nmake -nologo -a -f Makefile\r | |
87 | @if errorlevel 1 (\r | |
88 | @echo Error building the Python-based BaseTools\r | |
89 | @cd %WORKSPACE%\r | |
90 | @exit /B1\r | |
91 | )\r | |
92 | @cd %WORKSPACE%\r | |
93 | \r | |
94 | @goto End\r | |
95 | \r | |
96 | :VersionNotFound\r | |
97 | @echo.\r | |
98 | @echo This Microsoft Visual Studio version is in not installed on this system: %1\r | |
99 | @echo.\r | |
100 | @exit /B 1\r | |
101 | \r | |
102 | :End\r | |
103 | @exit /B 0\r |