@echo off echo. echo ** :: There used to be a race condition when compiling apache httpd that caused GS2 compilation to fail. :: See the notes on compiling GS2 on 64 bit Win 7 at :: http://wiki.greenstone.org/doku.php?id=en:developer:compiling_apache&#compiling_the_apache-httpd_included_with_gs2_on_64_bit_windows_7 :: Sam fixed this for the release-kit with http://trac.greenstone.org/changeset/22490 :: while it's at last been fixed in the svn version with commit 31425 (building on flawed earlier attempts in commits 31421 and 31422). :: Get the strawberry perl we use for GS from http://trac.greenstone.org/browser/main/trunk/release-kits/shared/windows/perl.zip?rev=head :: this is referred to below as strawberry-perl32no64 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 PERL_HOME=C:\strawberry-perl32no64\perl if not exist "%PERL_HOME%" echo %PERL_HOME% does not exist& goto done set PATH=%JAVA_HOME%\bin;%PERL_HOME%\bin;C:\Program Files\SlikSvn\bin;%PATH% echo + Set JAVA_HOME=%JAVA_HOME% and updated PATH echo + Set PERL_PATH=%PERL_HOME% and updated PATH :: Microsoft SDK no longer needed. Used to be needed only if compiling GS2 with debugging on, :: but regular compiling (without debugging on) will also work with MS SDK environment. rem set sdklocation=C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin rem if not exist "%sdklocation%" echo %sdklocation% does not exist& goto done rem pushd "%sdklocation%" rem call "SetEnv.Cmd" rem popd :: Set up Visual MS Studio env needed to compile GS2. :: Running VS in 64 bit mode doesn't work, need to run in 32 bit mode. :: (It may be apache httpd that needs 32 bit mode to compile.) :: For now only VS9.0 (VS2008) works 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 :done echo Leaving local/setup.bat echo ****************************** echo. :: ********************************************************************************** :: Porting further remarks and attempted code from older version of setup.bat file :: ********************************************************************************** :: 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