Develop and Download Open Source Software

Browse Subversion Repository

Contents of /trunk/installer/release.bat

Parent Directory Parent Directory | Revision Log Revision Log


Revision 10158 - (show annotations) (download) (as text)
Mon Aug 15 15:51:47 2022 UTC (18 months, 3 weeks ago) by zmatsuo
File MIME type: application/x-msdos-program
File size: 7097 byte(s)
Appveyor で snapshot zip の作成に失敗するので修正

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

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