1 | @echo off
|
---|
2 | echo.
|
---|
3 | echo ******************************
|
---|
4 |
|
---|
5 | set MY_HOME_DIR=C:\greenstone\gs-release-builder
|
---|
6 | set MY_PKG_DIR=%MY_HOME_DIR%\packages
|
---|
7 |
|
---|
8 | echo %MY_HOME_DIR% %MY_PKG_DIR%
|
---|
9 |
|
---|
10 | set JAVA_HOME=%MY_PKG_DIR%\jdk8.0.302
|
---|
11 | if not exist "%JAVA_HOME%" echo %JAVA_HOME% does not exist& goto done
|
---|
12 | set PATH=%JAVA_HOME%\bin;%PATH%
|
---|
13 |
|
---|
14 | echo + Set JAVA_HOME=%JAVA_HOME% and updated PATH
|
---|
15 |
|
---|
16 | set PERL_HOME=%MY_PKG_DIR%\strawberry-perl-5.18\perl
|
---|
17 | if not exist "%PERL_HOME%" echo %PERL_HOME% does not exist& goto done
|
---|
18 | set _PERL_TOPLEVEL=%MY_PKG_DIR%\strawberry-perl-5.18
|
---|
19 |
|
---|
20 | set PATH=%PERL_HOME%\bin;%PERL_HOME%\site\bin;%_PERL_TOPLEVEL%\c\bin;%PATH%
|
---|
21 | echo + Set PERL_HOME=%PERL_HOME% and updated PATH
|
---|
22 |
|
---|
23 | set ANT_HOME=%MY_PKG_DIR%\apache-ant-1.9.5
|
---|
24 | if not exist "%ANT_HOME%" echo %ANT_HOME% does not exist& goto done
|
---|
25 | set PATH=%ANT_HOME%\bin;%PATH%
|
---|
26 | echo + Set ANT_HOME=%ANT_HOME% and updated PATH
|
---|
27 |
|
---|
28 | :: Setup Visual Studio
|
---|
29 | set vslocation=C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build
|
---|
30 | if not exist "%vslocation%" echo %vslocation% does not exist& goto done
|
---|
31 | pushd "%vslocation%"
|
---|
32 | :: host 64bit, target 32 bit
|
---|
33 | call vcvarsamd64_x86
|
---|
34 | popd
|
---|
35 |
|
---|
36 | set "MY_HOME_DIR="
|
---|
37 | set "MY_PKG_DIR="
|
---|
38 |
|
---|
39 | goto done
|
---|
40 | ::: the rest of this is old stuff
|
---|
41 |
|
---|
42 | :: For notes on compiling GS2 on 64 bit Win 7 see
|
---|
43 | :: http://wiki.greenstone.org/doku.php?id=en:developer:compiling_apache&#compiling_the_apache-httpd_included_with_gs2_on_64_bit_windows_7
|
---|
44 |
|
---|
45 | :: The following JDK 6 is copied straight from the 32 bit Win machine into the 64 bit Win machine
|
---|
46 | :: It was used to debug gli's GS3ServerThread's changeover to use Process.waitFor()
|
---|
47 | ::set JAVA_HOME=C:\Program Files (x86)\Java\jdk1.6.0_13& echo @@@@@@@@@ USING JAVA 6 @@@@@@@@@
|
---|
48 | ::set JAVA_HOME=C:\Program Files\Java\jdk1.7.0_55
|
---|
49 | set JAVA_HOME=C:\Program Files\Java\jdk1.8.0_20
|
---|
50 | if not exist "%JAVA_HOME%" echo %JAVA_HOME% does not exist& goto done
|
---|
51 | set PATH=%JAVA_HOME%\bin;%PATH%
|
---|
52 |
|
---|
53 | echo + Set JAVA_HOME=%JAVA_HOME% and updated PATH
|
---|
54 |
|
---|
55 | rem set PERL_HOME=C:\Perl64
|
---|
56 | set PERL_HOME=C:\strawberry-perl32no64\perl
|
---|
57 | ::if not exist "%PERL_HOME%" echo %PERL_HOME% does not exist& goto done
|
---|
58 | set PATH=%PERL_HOME%\bin;%PATH%
|
---|
59 | ::set PATH=%PERL_HOME%\perl\site\bin;%PERL_HOME%\perl\bin;%PERL_HOME%\c\bin;%PATH%
|
---|
60 |
|
---|
61 | ::echo + Set PERL_PATH=%PERL_HOME% and updated PATH
|
---|
62 |
|
---|
63 | set ANT_HOME=C:\apache-ant-1.9.4
|
---|
64 | set PATH=%ANT_HOME%\bin;%PATH%
|
---|
65 |
|
---|
66 |
|
---|
67 | ::set PATH=%JAVA_HOME%\bin;%ANT_HOME%\bin;%PATH%
|
---|
68 | ::set PATH=%JAVA_HOME%\bin;%ANT_HOME%\bin;C:\Program Files (x86)\putty;C:\Windows\System32\UnxUtils\usr\local\wbin;%PATH%
|
---|
69 | rem set PATH=%JAVA_HOME%\bin;%ANT_HOME%\bin;C:\Program Files (x86)\putty;C:\Windows\System32\linuxtools;%PATH%
|
---|
70 |
|
---|
71 | rem echo + Set ANT_HOME=%ANT_HOME% and updated PATH
|
---|
72 |
|
---|
73 |
|
---|
74 | :: Setup Visual Studio env
|
---|
75 | :: WORKS:
|
---|
76 | ::call "C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\Tools\vsvars32.bat"
|
---|
77 |
|
---|
78 | :: Running VS in 64 bit mode doesn't work, need to run in 32 bit mode.
|
---|
79 | :: For now only VS9.0 (VS2008) works
|
---|
80 | :: call "C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\Tools\vsvars32.bat"
|
---|
81 |
|
---|
82 | ::::::set vslocation=C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\Tools
|
---|
83 | ::::::if not exist "%vslocation%" echo %vslocation% does not exist& goto done
|
---|
84 | ::::::pushd "%vslocation%"
|
---|
85 | ::::::call vsvars32.bat
|
---|
86 | ::::::popd
|
---|
87 |
|
---|
88 | :: Running VS in 64 bit works for Visual Studio 12:
|
---|
89 | set vslocation=C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC
|
---|
90 | if not exist "%vslocation%" echo %vslocation% does not exist& goto done
|
---|
91 | pushd "%vslocation%"
|
---|
92 | call vcvarsall.bat amd64
|
---|
93 | popd
|
---|
94 |
|
---|
95 | rem pushd "C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC"
|
---|
96 | rem call vcvarsall.bat amd64
|
---|
97 | rem popd
|
---|
98 |
|
---|
99 | :: VS10 fails: Common Tools folder not found for VS10
|
---|
100 | rem call "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\vcvars32.bat"
|
---|
101 |
|
---|
102 | :: VS12 fails: Calling "vsvars32.bat" above produces the same error as calling
|
---|
103 | :: C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin\amd64_x86\vcvarsamd64_x86.bat
|
---|
104 | :: (and possibly the same error as calling
|
---|
105 | :: C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat without passing "amd64" param)
|
---|
106 | rem call "C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\Tools\vsvars32.bat"
|
---|
107 |
|
---|
108 | :: Error: https://groups.google.com/forum/#!topic/UniMRCP/Iybpn51UYnI
|
---|
109 | :: http://msdn.microsoft.com/en-us/library/ff770576.aspx
|
---|
110 | :: http://stackoverflow.com/questions/11544563/can-i-set-the-platform-toolset-from-the-command-line-when-building-with-vs2010s
|
---|
111 | :: /p:PlatformToolset=v100
|
---|
112 |
|
---|
113 |
|
---|
114 | :: If using SetEnv.cmd to set up MS SDK env (no longer needed even for compiling GS2 with debug):
|
---|
115 |
|
---|
116 | ::call "C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.cmd"
|
---|
117 | :: Run with /? to see what options it takes (/x86, /x64, /ia64, /vista, /xp, /win7 and more)
|
---|
118 |
|
---|
119 | ::set sdklocation=C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin
|
---|
120 | ::if not exist "%sdklocation%" echo %sdklocation% does not exist& goto done
|
---|
121 | ::pushd "%sdklocation%"
|
---|
122 | ::call SetEnv.cmd /x64
|
---|
123 | ::popd
|
---|
124 |
|
---|
125 |
|
---|
126 | :done
|
---|
127 | echo Done
|
---|
128 | echo ******************************
|
---|
129 | echo.
|
---|
130 |
|
---|