@echo off echo. echo ****************************** :: For notes on compiling GS2 on 64 bit Win 7 see :: http://wiki.greenstone.org/doku.php?id=en:developer:compiling_apache&#compiling_the_apache-httpd_included_with_gs2_on_64_bit_windows_7 set JAVA_HOME=C:\Program Files\Java\jdk1.7.0_55 if not exist "%JAVA_HOME%" echo %JAVA_HOME% does not exist& goto done set PATH=%JAVA_HOME%\bin;%PATH% echo + Set JAVA_HOME=%JAVA_HOME% and updated PATH set PERL_HOME=C:\Perl64 if not exist "%PERL_HOME%" echo %PERL_HOME% does not exist& goto done set PATH=%PERL_HOME%\bin;%PATH% echo + Set PERL_PATH=%PERL_HOME% and updated PATH :: Setup Visual Studio env :: Running VS in 64 bit mode doesn't work, need to run in 32 bit mode. :: For now only VS9.0 (VS2008) works :: call "C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\Tools\vsvars32.bat" set vslocation=C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\Tools if not exist "%vslocation%" echo %vslocation% does not exist& goto done pushd "%vslocation%" call vsvars32.bat popd :: VS10 fails: Common Tools folder not found for VS10 rem call "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\vcvars32.bat" :: VS12 fails: Calling "vsvars32.bat" above produces the same error as calling :: C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin\amd64_x86\vcvarsamd64_x86.bat :: (and possibly the same error as calling :: C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat without passing "amd64" param) rem call "C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\Tools\vsvars32.bat" :: Error: https://groups.google.com/forum/#!topic/UniMRCP/Iybpn51UYnI :: http://msdn.microsoft.com/en-us/library/ff770576.aspx :: http://stackoverflow.com/questions/11544563/can-i-set-the-platform-toolset-from-the-command-line-when-building-with-vs2010s :: /p:PlatformToolset=v100 :: If using SetEnv.cmd to set up MS SDK env (no longer needed even for compiling GS2 with debug): ::call "C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.cmd" :: Run with /? to see what options it takes (/x86, /x64, /ia64, /vista, /xp, /win7 and more) ::set sdklocation=C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin ::if not exist "%sdklocation%" echo %sdklocation% does not exist& goto done ::pushd "%sdklocation%" ::call SetEnv.cmd /x64 ::popd :done echo Leaving local/setup.bat echo ****************************** echo.