[31426] | 1 | @echo off
|
---|
| 2 | echo.
|
---|
| 3 | echo **
|
---|
[31411] | 4 |
|
---|
[31426] | 5 | :: There used to be a race condition when compiling apache httpd that caused GS2 compilation to fail.
|
---|
| 6 | :: See the notes on compiling GS2 on 64 bit Win 7 at
|
---|
| 7 | :: http://wiki.greenstone.org/doku.php?id=en:developer:compiling_apache&#compiling_the_apache-httpd_included_with_gs2_on_64_bit_windows_7
|
---|
| 8 | :: Sam fixed this for the release-kit with http://trac.greenstone.org/changeset/22490
|
---|
| 9 | :: while it's at last been fixed in the svn version with commit 31425 (building on flawed earlier attempts in commits 31421 and 31422).
|
---|
[31411] | 10 |
|
---|
[31410] | 11 | :: Get the strawberry perl we use for GS from http://trac.greenstone.org/browser/main/trunk/release-kits/shared/windows/perl.zip?rev=head
|
---|
| 12 | :: this is referred to below as strawberry-perl32no64
|
---|
| 13 |
|
---|
| 14 | set JAVA_HOME=C:\Program Files\Java\jdk1.7.0_55
|
---|
[31426] | 15 | if not exist "%JAVA_HOME%" echo %JAVA_HOME% does not exist& goto done
|
---|
[31411] | 16 |
|
---|
[31426] | 17 | set PERL_HOME=C:\strawberry-perl32no64\perl
|
---|
| 18 | if not exist "%PERL_HOME%" echo %PERL_HOME% does not exist& goto done
|
---|
[31411] | 19 |
|
---|
[31426] | 20 | set PATH=%JAVA_HOME%\bin;%PERL_HOME%\bin;C:\Program Files\SlikSvn\bin;%PATH%
|
---|
[31423] | 21 |
|
---|
[31410] | 22 |
|
---|
[31426] | 23 | echo + Set JAVA_HOME=%JAVA_HOME% and updated PATH
|
---|
| 24 | echo + Set PERL_PATH=%PERL_HOME% and updated PATH
|
---|
[31410] | 25 |
|
---|
[31426] | 26 |
|
---|
| 27 | :: Microsoft SDK no longer needed. Used to be needed only if compiling GS2 with debugging on,
|
---|
| 28 | :: but regular compiling (without debugging on) will also work with MS SDK environment.
|
---|
| 29 | rem set sdklocation=C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin
|
---|
| 30 | rem if not exist "%sdklocation%" echo %sdklocation% does not exist& goto done
|
---|
| 31 | rem pushd "%sdklocation%"
|
---|
| 32 | rem call "SetEnv.Cmd"
|
---|
| 33 | rem popd
|
---|
| 34 |
|
---|
| 35 |
|
---|
| 36 |
|
---|
| 37 | :: Set up Visual MS Studio env needed to compile GS2.
|
---|
| 38 | :: Running VS in 64 bit mode doesn't work, need to run in 32 bit mode.
|
---|
| 39 | :: (It may be apache httpd that needs 32 bit mode to compile.)
|
---|
| 40 | :: For now only VS9.0 (VS2008) works
|
---|
| 41 | set vslocation=C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\Tools
|
---|
| 42 | if not exist "%vslocation%" echo %vslocation% does not exist& goto done
|
---|
| 43 | pushd "%vslocation%"
|
---|
[31410] | 44 | call vsvars32.bat
|
---|
| 45 | popd
|
---|
| 46 |
|
---|
[31426] | 47 | :done
|
---|
| 48 | echo Leaving local/setup.bat
|
---|
| 49 | echo ******************************
|
---|
| 50 | echo.
|
---|
| 51 |
|
---|
| 52 |
|
---|
| 53 | :: **********************************************************************************
|
---|
| 54 | :: Porting further remarks and attempted code from older version of setup.bat file
|
---|
| 55 | :: **********************************************************************************
|
---|
| 56 | :: VS10 fails: Common Tools folder not found for VS10
|
---|
| 57 | rem call "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\vcvars32.bat"
|
---|
| 58 |
|
---|
| 59 | :: VS12 fails: Calling "vsvars32.bat" above produces the same error as calling
|
---|
| 60 | :: C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin\amd64_x86\vcvarsamd64_x86.bat
|
---|
| 61 | :: (and possibly the same error as calling
|
---|
| 62 | :: C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat without passing "amd64" param)
|
---|
| 63 | rem call "C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\Tools\vsvars32.bat"
|
---|
| 64 |
|
---|
| 65 | :: Error: https://groups.google.com/forum/#!topic/UniMRCP/Iybpn51UYnI
|
---|
| 66 | :: http://msdn.microsoft.com/en-us/library/ff770576.aspx
|
---|
| 67 | :: http://stackoverflow.com/questions/11544563/can-i-set-the-platform-toolset-from-the-command-line-when-building-with-vs2010s
|
---|
| 68 | :: /p:PlatformToolset=v100
|
---|
| 69 |
|
---|
| 70 |
|
---|
| 71 | :: If using SetEnv.cmd to set up MS SDK env (no longer needed even for compiling GS2 with debug):
|
---|
| 72 |
|
---|
| 73 | ::call "C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.cmd"
|
---|
| 74 | :: Run with /? to see what options it takes (/x86, /x64, /ia64, /vista, /xp, /win7 and more)
|
---|
| 75 |
|
---|
| 76 | ::set sdklocation=C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin
|
---|
| 77 | ::if not exist "%sdklocation%" echo %sdklocation% does not exist& goto done
|
---|
| 78 | ::pushd "%sdklocation%"
|
---|
| 79 | ::call SetEnv.cmd /x64
|
---|
| 80 | ::popd |
---|