Develop and Download Open Source Software

Browse Subversion Repository

Contents of /trunk/installer/release.bat

Parent Directory Parent Directory | Revision Log Revision Log


Revision 10834 - (show annotations) (download) (as text)
Mon Aug 14 12:36:06 2023 UTC (6 months, 3 weeks ago) by zmatsuo
File MIME type: application/x-msdos-program
File size: 6653 byte(s)
ライブラリのダウンロード/展開に失敗したときビルドを停止するようにした
1 @echo off
2 setlocal
3 set CUR=%~dp0
4 cd /d %CUR%
5
6 rem set VS_VERSION=2019
7 if "%VS_VERSION%" == "" set VS_VERSION=2022
8
9 if "%APPVEYOR%" == "True" set NOPAUSE=1
10 if exist ..\buildtools\svnrev\sourcetree_info.bat del ..\buildtools\svnrev\sourcetree_info.bat
11
12 call :setup_tools_env
13
14 echo =======
15 echo 1. force download and rebuild libs / rebuild Tera Term, installer, archive
16 echo 2. download and build libs / rebuild Tera Term, installer, archive
17 echo 3. download and build libs / build Tera Term, installer, archive
18 echo 4. download and build libs
19 echo 5. build libs / rebuild Tera Term, installer, archive
20 echo 6. build libs / build Tera Term, installer, archive
21 echo 7. exec cmd.exe
22 echo 8. check tools
23 echo 9. exit
24
25 if "%1" == "" (
26 set /p no="select no "
27 ) else (
28 set no=%1
29 )
30 echo %no%
31
32 if "%no%" == "1" (
33 call :download_libs force
34 call :build_libs
35 call :build_teraterm rebuild
36 )
37
38 if "%no%" == "2" (
39 call :download_libs
40 call :build_libs
41 call :build_teraterm rebuild
42 )
43
44 if "%no%" == "3" (
45 call :download_libs
46 call :build_libs
47 call :build_teraterm
48 )
49
50 if "%no%" == "4" (
51 call :download_libs
52 call :build_libs
53 )
54
55 if "%no%" == "5" (
56 call :build_teraterm rebuild
57 )
58
59 if "%no%" == "6" (
60 call :build_teraterm
61 )
62
63 if "%no%" == "7" (
64 call :exec_cmd
65 )
66
67 if "%no%" == "8" (
68 call :check_tools
69 )
70
71 if not "%NOPAUSE%" == "1" pause
72 exit /b 0
73
74
75 rem ####################
76 :download_libs
77
78 setlocal
79 cd /d %CUR%..\libs
80
81 set OPT=
82 if "%1" == "force" set OPT=-DFORCE_DOWNLOAD=on
83 %CMAKE% %OPT% -P download.cmake
84 if errorlevel 1 (
85 echo download error
86 exit 1
87 )
88
89 endlocal
90 exit /b 0
91
92 rem ####################
93 :build_libs
94
95 setlocal
96 cd /d %CUR%..\libs
97 call buildall.bat
98 endlocal
99 exit /b 0
100
101 rem ####################
102 :build_teraterm
103
104 setlocal
105 cd /d %CUR%
106 call ..\buildtools\svnrev\svnrev.bat
107 call ..\buildtools\svnrev\sourcetree_info.bat
108
109 if "%RELEASE%" == "1" (
110 call build.bat rebuild
111 call makearchive.bat release
112 ) else if "%1" == "rebuild" (
113 call build.bat rebuild
114 call makearchive.bat
115 ) else (
116 call makearchive.bat
117 )
118 call iscc.bat
119
120 endlocal
121 exit /b 0
122
123 rem ####################
124 :setup_tools_env
125
126 set CYGWIN_PATH=%CUR%..\buildtools\cygwin64\bin
127 if exist "%CYGWIN_PATH%" goto cygwin_path_pass
128 set CYGWIN_PATH=C:\cygwin64\bin
129 if exist "%CYGWIN_PATH%" goto cygwin_path_pass
130 echo cygwin not found
131 if not "%NOPAUSE%" == "1" pause
132 exit
133 :cygwin_path_pass
134 set VS_BASE=C:\Program Files\Microsoft Visual Studio\%VS_VERSION%
135 if exist "%VS_BASE%" goto vs_base_pass
136 set VS_BASE=C:\Program Files (x86)\Microsoft Visual Studio\%VS_VERSION%
137 :vs_base_pass
138
139
140 if exist toolinfo.bat (
141 echo found toolinfo.bat
142 call toolinfo.bat
143 echo toolinfo.bat ok
144 ) else (
145 set PATH=
146 )
147
148 set PATH=%SystemRoot%;%PATH%
149 set PATH=%SystemRoot%\system32;%PATH%
150 call :search_perl
151 call :search_svn
152 call :search_iscc
153 set PATH=%SVN_PATH%;%PATH%
154 set PATH=%PERL_PATH%;%PATH%
155 call :set_vs_env
156 call :search_cmake
157 set PATH=%CMAKE_PATH%;%PATH%
158 set PATH=%PATH%;%CYGWIN_PATH%
159 exit /b 0
160
161 rem ####################
162 :search_perl
163 if exist %PERL_PATH%\perl.exe (
164 set PERL=%PERL_PATH%\perl.exe
165 exit /b 0
166 )
167
168 set PERL=perl.exe
169 where %PERL% > nul 2>&1
170 if %errorlevel% == 0 exit /b 0
171 set PERL=%CUR%..\buildtools\cygwin64\bin\perl.exe
172 if exist %PERL% exit /b 0
173 set PERL=%CUR%..\buildtools\perl\perl\bin\perl.exe
174 if exist %PERL% exit /b 0
175 set PERL=C:\Strawberry\perl\bin\perl.exe
176 if exist %PERL% exit /b 0
177 set PERL=C:\Perl64\bin\perl.exe
178 if exist %PERL% exit /b 0
179 set PERL=C:\Perl\bin\perl.exe
180 if exist %PERL% exit /b 0
181 set PERL=C:\cygwin64\bin\perl.exe
182 if exist %PERL% exit /b 0
183 set PERL=C:\cygwin\bin\perl.exe
184 if exist %PERL% exit /b 0
185 echo perl not found
186 if not "%NOPAUSE%" == "1" pause
187 exit
188
189 rem ####################
190 :search_svn
191 if exist %SVN_PATH%\svn.exe (
192 set SVN=%SVN_PATH%\svn.exe
193 exit /b 0
194 )
195
196 set SVN=svn.exe
197 where %SVN% > nul 2>&1
198 if %errorlevel% == 0 exit /b 0
199 set SVN_PATH=C:\Program Files (x86)\Subversion\bin
200 set SVN="%SVN_PATH%\svn.exe"
201 if exist %SVN% exit /b 0
202 set SVN_PATH=C:\Program Files\TortoiseSVN\bin
203 set SVN="%SVN_PATH%\svn.exe"
204 if exist %SVN% exit /b 0
205 echo svn not found
206 if not "%NOPAUSE%" == "1" pause
207 exit
208
209 rem ####################
210 :search_cmake
211 if exist %CMAKE_PATH%\cmake.exe (
212 set CMAKE="%CMAKE_PATH%\cmake.exe"
213 exit /b 0
214 )
215 if "%CMAKE%" == "" set CMAKE="cmake.exe"
216
217 where %CMAKE% > nul 2>&1
218 if %errorlevel% == 0 exit /b 0
219 set CMAKE_PATH=C:\Program Files\CMake\bin
220 set CMAKE="%CMAKE_PATH%\cmake.exe"
221 if exist %CMAKE% exit /b 0
222 set CMAKE_PATH=%VCINSTALLDIR%\..\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin
223 set CMAKE="%CMAKE_PATH%\cmake.exe"
224 if exist %CMAKE% exit /b 0
225 echo cmake not found
226 if not "%NOPAUSE%" == "1" pause
227 exit
228
229 rem ####################
230 :search_iscc
231 if [%INNO_SETUP%] == [] goto search_iscc_1
232 if exist %INNO_SETUP% (
233 exit /b 0
234 )
235 echo INNO_SETUP=%INNO_SETUP%
236 goto search_iscc_not_found
237
238 :search_iscc_1
239 set INNO_SETUP=%CUR%..\buildtools\innosetup6\bin\ISCC.exe
240 if exist %INNO_SETUP% exit /b 0
241 set INNO_SETUP="C:\Program Files (x86)\Inno Setup 6\iscc.exe"
242 if exist %INNO_SETUP% exit /b 0
243 :search_iscc_not_found
244 echo iscc(inno setup) not found
245 if not "%NOPAUSE%" == "1" pause
246 exit
247
248 rem ####################
249 :set_vs_env
250
251 if exist "%VS_BASE%\Community" (
252 call "%VS_BASE%\Community\VC\Auxiliary\Build\vcvars32.bat"
253 exit /b 0
254 )
255 if exist "%VS_BASE%\Professional" (
256 call "%VS_BASE%\Profssional\VC\Auxiliary\Build\vcvars32.bat"
257 exit /b 0
258 )
259 if exist "%VS_BASE%\Enterprise" (
260 call "%VS_BASE%\Enterprise\VC\Auxiliary\Build\vcvars32.bat"
261 exit /b 0
262 )
263 :vs_not_found
264 echo Visual Studio not found
265 echo VS_BASE=%VS_BASE%
266 if not "%NOPAUSE%" == "1" pause
267 exit
268
269 rem ####################
270 :exec_cmd
271 call ..\buildtools\svnrev\svnrev.bat
272 call ..\buildtools\svnrev\sourcetree_info.bat
273 cmd
274 exit /b 0
275
276 rem ####################
277 :check_tools
278
279 echo cmd(windows)
280 ver
281
282 echo Visual Studio
283 echo VS_BASE=%VS_BASE%
284 cl
285
286 echo svn
287 where svn
288 echo SVN_PATH=%SVN_PATH%
289 echo SVN=%SVN%
290 svn --version
291
292 echo perl
293 where perl
294 echo PERL_PATH=%PERL_PATH%
295 echo PERL=%PERL%
296 %PERL% --version
297
298 echo cmake
299 where cmake
300 echo CMAKE_PATH=%CMAKE_PATH%
301 echo CMAKE=%CMAKE%
302 %CMAKE% --version
303
304 echo cygwin
305 echo CYGWIN_PATH=%CYGWIN_PATH%
306 cygcheck -c base-cygwin
307 cygcheck -c gcc-core
308 cygcheck -c w32api-headers
309 cygcheck -c make
310
311 echo inno setup
312 echo INNO_SETUP=%INNO_SETUP%
313 %INNO_SETUP% /?
314
315 exit /b 0

Back to OSDN">Back to OSDN
ViewVC Help
Powered by ViewVC 1.1.26