source: other-projects/nightly-tasks/crons-and-scripts/windows/setenv.bat@ 32407

Last change on this file since 32407 was 32407, checked in by ak19, 6 years ago

The Windows nightly and release binary generation scripts. Task scheduler task on Windows a.o.t. cron. The nightly task is called Nightly First Pass and has been exported from Windows Task Scheduler in xml format.

File size: 4.1 KB
Line 
1@echo off
2echo.
3echo ******************************
4
5:: https://spring.io/guides/gs/android/
6set ANDROID_HOME=C:\Apps\Android\adt\sdk
7::C:\Program Files (x86)\Android\android-studio\sdk
8set PATH=%ANDROID_HOME%\tools;%ANDROID_HOME%\platform-tools;%PATH%
9
10:: C:\Users\Anupama\tmp\myApp>npm install phonegap@latest
11:: phonegap
12:: cordova
13:: phonegap create myApp
14:: Make sure Android SDK and ANT are on PATH, then:
15:: cordova platform add android
16
17:: For notes on compiling GS2 on 64 bit Win 7 see
18:: http://wiki.greenstone.org/doku.php?id=en:developer:compiling_apache&#compiling_the_apache-httpd_included_with_gs2_on_64_bit_windows_7
19
20:: The following JDK 6 is copied straight from the 32 bit Win machine into the 64 bit Win machine
21:: It was used to debug gli's GS3ServerThread's changeover to use Process.waitFor()
22::set JAVA_HOME=C:\Program Files (x86)\Java\jdk1.6.0_13& echo @@@@@@@@@ USING JAVA 6 @@@@@@@@@
23::set JAVA_HOME=C:\Program Files\Java\jdk1.7.0_55
24set JAVA_HOME=C:\Program Files\Java\jdk1.8.0_20
25if not exist "%JAVA_HOME%" echo %JAVA_HOME% does not exist& goto done
26set PATH=%JAVA_HOME%\bin;%PATH%
27
28echo + Set JAVA_HOME=%JAVA_HOME% and updated PATH
29
30rem set PERL_HOME=C:\Perl64
31set PERL_HOME=C:\strawberry-perl32no64\perl
32::if not exist "%PERL_HOME%" echo %PERL_HOME% does not exist& goto done
33set PATH=%PERL_HOME%\bin;%PATH%
34::set PATH=%PERL_HOME%\perl\site\bin;%PERL_HOME%\perl\bin;%PERL_HOME%\c\bin;%PATH%
35
36::echo + Set PERL_PATH=%PERL_HOME% and updated PATH
37
38set ANT_HOME=C:\apache-ant-1.9.4
39set PATH=%ANT_HOME%\bin;%PATH%
40::set PATH=%JAVA_HOME%\bin;%ANT_HOME%\bin;%PATH%
41::set PATH=%JAVA_HOME%\bin;%ANT_HOME%\bin;C:\Program Files (x86)\putty;C:\Windows\System32\UnxUtils\usr\local\wbin;%PATH%
42rem set PATH=%JAVA_HOME%\bin;%ANT_HOME%\bin;C:\Program Files (x86)\putty;C:\Windows\System32\linuxtools;%PATH%
43
44rem echo + Set ANT_HOME=%ANT_HOME% and updated PATH
45
46
47:: Setup Visual Studio env
48:: WORKS:
49::call "C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\Tools\vsvars32.bat"
50
51:: Running VS in 64 bit mode doesn't work, need to run in 32 bit mode.
52:: For now only VS9.0 (VS2008) works
53:: call "C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\Tools\vsvars32.bat"
54
55::::::set vslocation=C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\Tools
56::::::if not exist "%vslocation%" echo %vslocation% does not exist& goto done
57::::::pushd "%vslocation%"
58::::::call vsvars32.bat
59::::::popd
60
61:: Running VS in 64 bit works for Visual Studio 12:
62set vslocation=C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC
63if not exist "%vslocation%" echo %vslocation% does not exist& goto done
64pushd "%vslocation%"
65call vcvarsall.bat amd64
66popd
67
68rem pushd "C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC"
69rem call vcvarsall.bat amd64
70rem popd
71
72:: VS10 fails: Common Tools folder not found for VS10
73rem call "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\vcvars32.bat"
74
75:: VS12 fails: Calling "vsvars32.bat" above produces the same error as calling
76:: C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin\amd64_x86\vcvarsamd64_x86.bat
77:: (and possibly the same error as calling
78:: C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat without passing "amd64" param)
79rem call "C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\Tools\vsvars32.bat"
80
81:: Error: https://groups.google.com/forum/#!topic/UniMRCP/Iybpn51UYnI
82:: http://msdn.microsoft.com/en-us/library/ff770576.aspx
83:: http://stackoverflow.com/questions/11544563/can-i-set-the-platform-toolset-from-the-command-line-when-building-with-vs2010s
84:: /p:PlatformToolset=v100
85
86
87:: If using SetEnv.cmd to set up MS SDK env (no longer needed even for compiling GS2 with debug):
88
89::call "C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.cmd"
90:: Run with /? to see what options it takes (/x86, /x64, /ia64, /vista, /xp, /win7 and more)
91
92::set sdklocation=C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin
93::if not exist "%sdklocation%" echo %sdklocation% does not exist& goto done
94::pushd "%sdklocation%"
95::call SetEnv.cmd /x64
96::popd
97
98
99:done
100echo Done
101echo ******************************
102echo.
103
Note: See TracBrowser for help on using the repository browser.