Develop and Download Open Source Software

Browse Subversion Repository

Contents of /trunk/installer/release.bat

Parent Directory Parent Directory | Revision Log Revision Log


Revision 10304 - (show annotations) (download) (as text)
Mon Oct 10 12:22:07 2022 UTC (16 months, 4 weeks ago) by zmatsuo
File MIME type: application/x-msdos-program
File size: 7311 byte(s)
CMAKE環境変数のcmakeを使用する

- フルパス指定でその cmake を使用する
- 未指定時はパス指定なしの指定時は PATH の cmake を使用
  - set CMAKE=cmake.exe と同じ

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

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