1 | @echo off
|
---|
2 | echo.
|
---|
3 | echo ******************************
|
---|
4 |
|
---|
5 | set JAVA_HOME=C:\Program Files\Java\jdk1.7.0_55
|
---|
6 | if not exist "%JAVA_HOME%" echo %JAVA_HOME% does not exist& goto done
|
---|
7 | set PATH=%JAVA_HOME%\bin;%PATH%
|
---|
8 |
|
---|
9 | echo + Set JAVA_HOME=%JAVA_HOME% and updated PATH
|
---|
10 |
|
---|
11 | set PERL_HOME=C:\Perl64
|
---|
12 | if not exist "%PERL_HOME%" echo %PERL_HOME% does not exist& goto done
|
---|
13 | set PATH=%PERL_HOME%\bin;%PATH%
|
---|
14 |
|
---|
15 | echo + Set PERL_PATH=%PERL_HOME% and updated PATH
|
---|
16 |
|
---|
17 | :: WORKS:
|
---|
18 | call "C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\Tools\vsvars32.bat"
|
---|
19 |
|
---|
20 | :: Common Tools folder not found
|
---|
21 | :: call "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\vcvars32.bat"
|
---|
22 |
|
---|
23 | :: Same problem as with C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin\amd64_x86\vcvarsamd64_x86.bat
|
---|
24 | :: call "C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\Tools\vsvars32.bat"
|
---|
25 |
|
---|
26 |
|
---|
27 | :: 64 bit mode doesn't work
|
---|
28 | :: Running vcvarsamd64_x86 has the same problem as below
|
---|
29 | ::set vclocation=C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC
|
---|
30 | ::set vclocation=C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC
|
---|
31 | ::::set vclocation=C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin\amd64_x86
|
---|
32 | ::if not exist "%vclocation%" echo %vclocation% does not exist& goto done
|
---|
33 | ::pushd "%vclocation%"
|
---|
34 | ::call vcvarsamd64_x86.bat
|
---|
35 | ::::call vcvarsall.bat amd64
|
---|
36 | ::popd
|
---|
37 |
|
---|
38 |
|
---|
39 | :: Error: https://groups.google.com/forum/#!topic/UniMRCP/Iybpn51UYnI
|
---|
40 | :: http://msdn.microsoft.com/en-us/library/ff770576.aspx
|
---|
41 | :: http://stackoverflow.com/questions/11544563/can-i-set-the-platform-toolset-from-the-command-line-when-building-with-vs2010s
|
---|
42 | :: /p:PlatformToolset=v100
|
---|
43 | :: call "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin\amd64_x86\vcvarsamd64_x86.bat"
|
---|
44 |
|
---|
45 |
|
---|
46 | :: If using SetEnv.cmd:
|
---|
47 |
|
---|
48 | :: http://go4answers.webhost4life.com/Example/windows-sdk-v70a-setenvbat-218785.aspx
|
---|
49 | :: explains that SetEnv.cmd does exist in the new Microsoft SDK:
|
---|
50 | :: C:\Windows\System32\cmd.exe /E:ON /V:ON /T:0E /K "C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.cmd"
|
---|
51 | :: (Unused: http://stackoverflow.com/questions/887894/how-to-find-windows-sdks-setenv-cmd-setenv-cmd-does-not-work-correctly )
|
---|
52 |
|
---|
53 | ::call "C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.cmd"
|
---|
54 | :: Run with /? to see what options it takes (/x86, /x64, /ia64, /vista, /xp, /win7 and more)
|
---|
55 |
|
---|
56 | ::set sdklocation=C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin
|
---|
57 | ::if not exist "%sdklocation%" echo %sdklocation% does not exist& goto done
|
---|
58 | ::pushd "%sdklocation%"
|
---|
59 | ::call SetEnv.cmd /x64
|
---|
60 | ::popd
|
---|
61 |
|
---|
62 | :: http://www.apachelounge.com/viewtopic.php?t=3348
|
---|
63 | :: http://stackoverflow.com/questions/10888391/error-link-fatal-error-lnk1123-failure-during-conversion-to-coff-file-inval
|
---|
64 | :: https://ask.mozilla.org/question/256/failure-during-conversion-to-coff-file-invalid-or-corrupt/
|
---|
65 | :: Rename cvtres.exe in C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\amd64, then put the one from
|
---|
66 | :: C:\Windows\Microsoft.NET\Framework\v4.0.30319 (or from C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin\amd64) in there
|
---|
67 | ::set cvlocation=C:\Windows\Microsoft.NET\Framework\v4.0.30319
|
---|
68 | ::set cvlocation=C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin\amd64
|
---|
69 | ::if exist "%cvlocation%\cvtres.exe" set PATH=%cvlocation%;%PATH%
|
---|
70 |
|
---|
71 | :done
|
---|
72 | echo Leaving local/setup.bat
|
---|
73 | echo ******************************
|
---|
74 | echo.
|
---|
75 |
|
---|
76 | :: http://stackoverflow.com/questions/10888391/error-link-fatal-error-lnk1123-failure-during-conversion-to-coff-file-inval
|
---|