Develop and Download Open Source Software

Browse Subversion Repository

Contents of /trunk/installer/release.bat

Parent Directory Parent Directory | Revision Log Revision Log


Revision 10083 - (show annotations) (download) (as text)
Fri Jul 22 22:56:34 2022 UTC (19 months, 2 weeks ago) by nmaya
File MIME type: application/x-msdos-program
File size: 6830 byte(s)
release.bat で出力されるファイル名を修正

- Release時 (tags の下で実行したとき) は、teraterm-x.y.exe/zip (OSDN のリリースにアップロードするファイル名)
- それ以外は teraterm-x.y-rREV-YYMMDD_HHMMSS-username-snapshot.exe/zip
- zip を解凍したときのフォルダ名が、zip ファイル名と同じになるようにした

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

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