source: local/greenstone2/windows-64bit/setup.bat@ 35535

Last change on this file since 35535 was 35535, checked in by anupama, 14 months ago

Script makegs2.bat to compile GS2 on Windows, also needs to rename PDFv2Plugin.pm to PDFv2Plugin.tmp so GLI can launch without pluginfo.pl -describeall blowing up over the require statement on the pdfboxconverter extension (the extension is needed by v2 plugin). The rk2 release-kit already handled this in the installer, and earlier today makegs2.sh was updated for linux/mac (commit 35534)

File size: 3.6 KB
Line 
1@echo off
2echo.
3echo **
4
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).
10
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
14set JAVA_HOME=C:\Program Files\Java\jdk1.8.0_20
15if not exist "%JAVA_HOME%" echo %JAVA_HOME% does not exist& goto done
16
17set PERL_HOME=C:\strawberry-perl32no64\perl
18if not exist "%PERL_HOME%" echo %PERL_HOME% does not exist& goto done
19
20set PATH=%JAVA_HOME%\bin;%PERL_HOME%\bin;C:\Program Files\SlikSvn\bin;%PATH%
21
22
23echo + Set JAVA_HOME=%JAVA_HOME% and updated PATH
24echo + Set PERL_PATH=%PERL_HOME% and updated PATH
25
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.
29rem set sdklocation=C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin
30rem if not exist "%sdklocation%" echo %sdklocation% does not exist& goto done
31rem pushd "%sdklocation%"
32rem call "SetEnv.Cmd"
33rem 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
41set vslocation=C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\Tools
42if not exist "%vslocation%" echo %vslocation% does not exist& goto done
43pushd "%vslocation%"
44call vsvars32.bat
45popd
46
47:done
48echo Leaving local/setup.bat
49echo ******************************
50echo.
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
57rem 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)
63rem 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
Note: See TracBrowser for help on using the repository browser.