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