source: local/greenstone2/windows-64bit/setup32.bat@ 29059

Last change on this file since 29059 was 29059, checked in by ak19, 10 years ago

Before calling VS bat file, pushd into there and then popd out of it after the call. Also changed the many comments to just the current commands attempted to get VS12 and 10 to work and which failed, with notes on why only VS9 works for us at present.

File size: 2.2 KB
Line 
1@echo off
2echo.
3echo ******************************
4
5set JAVA_HOME=C:\Program Files\Java\jdk1.7.0_55
6if not exist "%JAVA_HOME%" echo %JAVA_HOME% does not exist& goto done
7set PATH=%JAVA_HOME%\bin;%PATH%
8
9echo + Set JAVA_HOME=%JAVA_HOME% and updated PATH
10
11set PERL_HOME=C:\Perl64
12if not exist "%PERL_HOME%" echo %PERL_HOME% does not exist& goto done
13set PATH=%PERL_HOME%\bin;%PATH%
14
15echo + Set PERL_PATH=%PERL_HOME% and updated PATH
16
17:: Setup Visual Studio env
18
19:: Running VS in 64 bit mode doesn't work, need to run in 32 bit mode.
20:: For now only VS9.0 (VS2008) works
21:: call "C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\Tools\vsvars32.bat"
22set vslocation=C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\Tools
23if not exist "%vslocation%" echo %vslocation% does not exist& goto done
24pushd "%vslocation%"
25call vsvars32.bat
26popd
27
28:: VS10 fails: Common Tools folder not found for VS10
29rem call "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\vcvars32.bat"
30
31:: VS12 fails: Calling "vsvars32.bat" above produces the same error as calling
32:: C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin\amd64_x86\vcvarsamd64_x86.bat
33:: (and possibly the same error as calling
34:: C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat without passing "amd64" param)
35rem call "C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\Tools\vsvars32.bat"
36
37:: Error: https://groups.google.com/forum/#!topic/UniMRCP/Iybpn51UYnI
38:: http://msdn.microsoft.com/en-us/library/ff770576.aspx
39:: http://stackoverflow.com/questions/11544563/can-i-set-the-platform-toolset-from-the-command-line-when-building-with-vs2010s
40:: /p:PlatformToolset=v100
41
42
43:: If using SetEnv.cmd to set up MS SDK env (no longer needed even for compiling GS2 with debug):
44
45::call "C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.cmd"
46:: Run with /? to see what options it takes (/x86, /x64, /ia64, /vista, /xp, /win7 and more)
47
48::set sdklocation=C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin
49::if not exist "%sdklocation%" echo %sdklocation% does not exist& goto done
50::pushd "%sdklocation%"
51::call SetEnv.cmd /x64
52::popd
53
54
55
56:done
57echo Leaving local/setup.bat
58echo ******************************
59echo.
60
Note: See TracBrowser for help on using the repository browser.