aboutsummaryrefslogtreecommitdiff
path: root/setup-vc.cmd
diff options
context:
space:
mode:
Diffstat (limited to 'setup-vc.cmd')
-rw-r--r--setup-vc.cmd90
1 files changed, 90 insertions, 0 deletions
diff --git a/setup-vc.cmd b/setup-vc.cmd
new file mode 100644
index 0000000..e93262e
--- /dev/null
+++ b/setup-vc.cmd
@@ -0,0 +1,90 @@
1@echo off
2REM
3REM Setting up command line to use Visual C++ 2005/2008 Express
4REM
5REM Visual C++ 2005:
6REM VCINSTALLDIR=C:\Program Files\Microsoft Visual Studio 8\VC
7REM VS80COMNTOOLS=C:\Program Files\Microsoft Visual Studio 8\Common7\Tools\
8REM VSINSTALLDIR=C:\Program Files\Microsoft Visual Studio 8
9REM
10REM Visual C++ 2008:
11REM VCINSTALLDIR=C:\Program Files\Microsoft Visual Studio 9.0\VC
12REM VS90COMNTOOLS=C:\Program Files\Microsoft Visual Studio 9.0\Common7\Tools\
13REM VSINSTALLDIR=C:\Program Files\Microsoft Visual Studio 9.0
14REM
15
16REM Test for VC++2005 FIRST, because it is the norm with Lua 5.1.4
17REM LuaBinaries and LfW. All prebuilt modules and lua.exe are built
18REM with it.
19REM
20set VSINSTALLDIR=C:\Program Files\Microsoft Visual Studio 8
21if not exist "%VSINSTALLDIR%\VC\vcvarsall.bat" goto TRY_VC9
22
23REM Win32 headers must be separately downloaded for VC++2005
24REM (VC++2008 SP1 carries an SDK with it)
25REM
26set _SDK=C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\SetEnv.cmd
27if not exist "%_SDK%" goto ERR_NOSDK
28call "%_SDK%"
29goto FOUND_VC
30
31:TRY_VC9
32set VSINSTALLDIR=C:\Program Files\Microsoft Visual Studio 9.0
33if not exist "%VSINSTALLDIR%\VC\vcvarsall.bat" goto ERR_NOVC
34
35echo.
36echo *** Warning: Visual C++ 2008 in use ***
37echo.
38echo Using VC++2005 is recommended for runtime compatibility issues
39echo (LuaBinaries and LfW use it; if you compile everything from
40echo scratch, ignore this message)
41echo.
42
43:FOUND_VC
44set VCINSTALLDIR=%VSINSTALLDIR%\vc
45
46REM vcvars.bat sets the following values right:
47REM
48REM PATH=...
49REM INCLUDE=%VCINSTALLDIR%\ATLMFC\INCLUDE;%VCINSTALLDIR%\INCLUDE;%VCINSTALLDIR%\PlatformSDK\include;%FrameworkSDKDir%\include;%INCLUDE%
50REM LIB=%VCINSTALLDIR%\ATLMFC\LIB;%VCINSTALLDIR%\LIB;%VCINSTALLDIR%\PlatformSDK\lib;%FrameworkSDKDir%\lib;%LIB%
51REM LIBPATH=%FrameworkDir%\%FrameworkVersion%;%VCINSTALLDIR%\ATLMFC\LIB
52REM
53call "%VSINSTALLDIR%\VC\vcvarsall.bat"
54
55REM 'timeit.exe' is part of the MS Server Res Kit Tools (needed for "make perftest")
56REM
57set _RESKIT=C:\Program Files\Windows Resource Kits\Tools\
58if not exist "%_RESKIT%\timeit.exe" goto WARN_NOTIMEIT
59PATH=%PATH%;%_RESKIT%
60goto EXIT
61
62:WARN_NOTIMEIT
63echo.
64echo ** WARNING: Windows Server 2003 Resource Kit Tools - not detected
65echo You will need the 'timeit' utility to run 'make perftest'
66echo http://www.microsoft.com/downloads/details.aspx?familyid=9D467A69-57FF-4AE7-96EE-B18C4790CFFD
67echo.
68goto EXIT
69
70REM ---
71:ERR_NOVC
72echo.
73echo ** ERROR: Visual C++ 2005/08 Express - not detected
74echo You can set the environment variables separately, and run 'make-vc.cmd'
75echo or download the compiler from:
76echo http://msdn.microsoft.com/vstudio/express/downloads/
77echo.
78goto EXIT
79
80:ERR_NOSDK
81echo.
82echo ** ERROR: Windows Server 2003 Platform SDK - not detected
83echo You will need the core API's of it to compile Win32 applications.
84echo http://www.microsoft.com/downloads/details.aspx?familyid=0BAF2B35-C656-4969-ACE8-E4C0C0716ADB
85echo.
86goto EXIT
87
88:EXIT
89set _SDK=
90set _RESKIT=