| 1 | @Rem Author: Jorge <josp.jorge@gmail.com>
|
|---|
| 2 |
|
|---|
| 3 | rem @Echo Off
|
|---|
| 4 | Rem Compila tol y toltcl, el postbuild se encarga de copiar los binarios
|
|---|
| 5 | Rem Copia stdlib hacia ActiveTOL
|
|---|
| 6 | Rem Copia tolbase\toltklib\byswidget, tolbase\lib\ hacia ActiveTOL
|
|---|
| 7 |
|
|---|
| 8 | rem SetLocal enableextensions enabledelayedexpansion
|
|---|
| 9 | Rem Validacion de argumentos
|
|---|
| 10 |
|
|---|
| 11 | Rem procesamiento de opciones de linea de comandos
|
|---|
| 12 | Set _rebuild=0
|
|---|
| 13 | Set _jup=0
|
|---|
| 14 | Set _pnsis=0
|
|---|
| 15 | Set _dotests=0
|
|---|
| 16 | Set _dodist=0
|
|---|
| 17 | Set _plog=!CD!\log2clog.exe
|
|---|
| 18 | Set _fbody=!CD!\test_status\BODY.txt
|
|---|
| 19 |
|
|---|
| 20 | If Not Exist test_status\nul (
|
|---|
| 21 | Md test_status
|
|---|
| 22 | )
|
|---|
| 23 |
|
|---|
| 24 | Rem !!!!!!!!!!!!!!!!!!!!!!!
|
|---|
| 25 |
|
|---|
| 26 | Set _url_bin_=https://www.tol-project.org/win32
|
|---|
| 27 |
|
|---|
| 28 | Set tdt_subject="UPTOL works fine"
|
|---|
| 29 | Set tdt_body=%_fbody%
|
|---|
| 30 | Set tdt_attach=""
|
|---|
| 31 |
|
|---|
| 32 |
|
|---|
| 33 | :READ_OPTS
|
|---|
| 34 | If "%1"=="" Goto END_OPTS
|
|---|
| 35 | If "%1"=="/?" Goto SHOW_HELP
|
|---|
| 36 | If "%1"=="/no_update" (
|
|---|
| 37 | Goto NEXT_OPTS
|
|---|
| 38 | )
|
|---|
| 39 | If "%1"=="/smartbuild" (
|
|---|
| 40 | Set _rebuild=0
|
|---|
| 41 | Goto NEXT_OPTS
|
|---|
| 42 | )
|
|---|
| 43 | If "%1"=="/rebuild" (
|
|---|
| 44 | Set _rebuild=1
|
|---|
| 45 | Goto NEXT_OPTS
|
|---|
| 46 | )
|
|---|
| 47 | If "%1"=="/jup" (
|
|---|
| 48 | Set _jup=1
|
|---|
| 49 | Goto NEXT_OPTS
|
|---|
| 50 | )
|
|---|
| 51 | If "%1"=="/pnsis" (
|
|---|
| 52 | Set _pnsis=1
|
|---|
| 53 | Goto NEXT_OPTS
|
|---|
| 54 | )
|
|---|
| 55 | If "%1"=="/dist" (
|
|---|
| 56 | Set _dodist=1
|
|---|
| 57 | Set _dotests=1
|
|---|
| 58 | Goto NEXT_OPTS
|
|---|
| 59 | )
|
|---|
| 60 | If "%1"=="/tests" (
|
|---|
| 61 | Set _dotests=1
|
|---|
| 62 | Goto NEXT_OPTS
|
|---|
| 63 | )
|
|---|
| 64 | If "%1"=="/no_tests" (
|
|---|
| 65 | Set _dotests=0
|
|---|
| 66 | Goto NEXT_OPTS
|
|---|
| 67 | )
|
|---|
| 68 |
|
|---|
| 69 | Set _msg_error=Opcion invalida %1
|
|---|
| 70 | Goto ERROR
|
|---|
| 71 | :NEXT_OPTS
|
|---|
| 72 | Shift
|
|---|
| 73 | Goto READ_OPTS
|
|---|
| 74 | :END_OPTS
|
|---|
| 75 |
|
|---|
| 76 | Rem Goto TMP
|
|---|
| 77 | Rem Goto DODIST
|
|---|
| 78 |
|
|---|
| 79 |
|
|---|
| 80 | If "%_rebuild%"=="1" (
|
|---|
| 81 | Set _rbopt=/rebuild
|
|---|
| 82 | )
|
|---|
| 83 |
|
|---|
| 84 | Set ATOLDIR=!CD!\..\ActiveTol\bin
|
|---|
| 85 |
|
|---|
| 86 | Goto BEGIN
|
|---|
| 87 |
|
|---|
| 88 | Rem Ayuda de uso
|
|---|
| 89 | :SHOW_HELP
|
|---|
| 90 | @more README
|
|---|
| 91 | Goto END
|
|---|
| 92 |
|
|---|
| 93 | Rem Codigo de error
|
|---|
| 94 | :ERROR
|
|---|
| 95 | If Not Defined _msg_error (
|
|---|
| 96 | Echo Error invocado sin mensage
|
|---|
| 97 | ) else (
|
|---|
| 98 | Echo %_msg_error%
|
|---|
| 99 | Set tdt_subject="UPTOL works badly"
|
|---|
| 100 | Echo %_msg_error% >> %_fbody%
|
|---|
| 101 | )
|
|---|
| 102 | Pause
|
|---|
| 103 | Goto END
|
|---|
| 104 |
|
|---|
| 105 | Rem Codigo de retorno generico
|
|---|
| 106 | :RET
|
|---|
| 107 | If Defined _ret (
|
|---|
| 108 | Goto %_ret%
|
|---|
| 109 | ) Else (
|
|---|
| 110 | Set _msg_error=Error interno! Punto de retorno no definido.
|
|---|
| 111 | Goto ERROR
|
|---|
| 112 | )
|
|---|
| 113 |
|
|---|
| 114 | Rem Actualiza scripts en ActiveTOL, recibe como argumento
|
|---|
| 115 | Rem - _dir_src, directorio origen
|
|---|
| 116 | Rem - _dir_dest, directorio destino
|
|---|
| 117 | :UP_SCRIPTS
|
|---|
| 118 | If Exist %_dir_dest%\nul (
|
|---|
| 119 | Echo Borrando scripts antiguos de %_dir_dest%
|
|---|
| 120 | Rmdir /S /Q %_dir_dest%
|
|---|
| 121 | )
|
|---|
| 122 | Echo Copiando scripts nuevos de %_dir_src% a %_dir_dest%
|
|---|
| 123 | xcopy %_dir_src% %_dir_dest% /S /F /Y /I /EXCLUDE:exclude.lst
|
|---|
| 124 | If errorlevel 1 (
|
|---|
| 125 | Set _msg_error=Error copiando %_dir_src% hacia %_dir_dest%
|
|---|
| 126 | Goto ERROR
|
|---|
| 127 | )
|
|---|
| 128 | Goto RET
|
|---|
| 129 |
|
|---|
| 130 | Rem Codigo generico de compilacion
|
|---|
| 131 | :COMPILE
|
|---|
| 132 | Rem Verifico que ejecutemos desde el SDK
|
|---|
| 133 | clrver 1> nul 2> nul
|
|---|
| 134 | If Not "%ERRORLEVEL%"=="0" (
|
|---|
| 135 | Set _msg_error=Solo se puede compilar desde una consola Microsoft Platform SDK
|
|---|
| 136 | Goto ERROR
|
|---|
| 137 | )
|
|---|
| 138 |
|
|---|
| 139 | If Not Defined _mod (
|
|---|
| 140 | Set _msg_error=Error interno! variable _mod no definida en COMPILE
|
|---|
| 141 | Goto ERROR
|
|---|
| 142 | )
|
|---|
| 143 | If Not Exist ..\..\%_mod%\nul (
|
|---|
| 144 | Set _msg_error=Error interno! el directorio %_mod% debia existir cuando se ha solicitado su compilacion.
|
|---|
| 145 | Goto ERROR
|
|---|
| 146 | )
|
|---|
| 147 | If Not Defined _sln (
|
|---|
| 148 | Set _msg_error=Error interno variable _sln no definida en COMPILE
|
|---|
| 149 | Goto ERROR
|
|---|
| 150 | )
|
|---|
| 151 | If Not Exist ..\..\%_mod%\%winSrc%\%_sln% (
|
|---|
| 152 | Set _msg_error=No se puede compilar, el archivo %_mod%\%winSrc%\%_sln% no existe
|
|---|
| 153 | Goto ERROR
|
|---|
| 154 | )
|
|---|
| 155 | If "%_vsvars32%"=="" (
|
|---|
| 156 | If Defined VSCOMNTOOLS (
|
|---|
| 157 | call "%VSCOMNTOOLS%vsvars32"
|
|---|
| 158 | If errorlevel 1 (
|
|---|
| 159 | Set _msg_error=No se pudo ejecutar vsvars32
|
|---|
| 160 | Goto ERROR
|
|---|
| 161 | )
|
|---|
| 162 | Set _vsvars32=1
|
|---|
| 163 | ) else (
|
|---|
| 164 | Echo VSCOMNTOOLS no esta definida intentanto vsvars32 desde el PATH
|
|---|
| 165 | call vsvars32
|
|---|
| 166 | If errorlevel 1 (
|
|---|
| 167 | Set _msg_error=No se pudo ejecutar vsvars32
|
|---|
| 168 | Goto ERROR
|
|---|
| 169 | )
|
|---|
| 170 | )
|
|---|
| 171 | ) else (
|
|---|
| 172 | Echo vsvars32 ya ha sido invocado
|
|---|
| 173 | )
|
|---|
| 174 | Rem Verifico postbuild.bat: aseguro que existe. postbuild copia la compilacion a ActiveTOL
|
|---|
| 175 | If Not Exist ..\..\%_mod%\%winSrc%\postbuild.bat (
|
|---|
| 176 | xcopy /F /Y postbuild.bat %_mod%\%winSrc%
|
|---|
| 177 | )
|
|---|
| 178 | vcbuild %_rbopt% /useenv ..\..\%_mod%\%winSrc%\%_sln% "Release|Win32"
|
|---|
| 179 | If errorlevel 1 (
|
|---|
| 180 | Set _msg_error=Fallo en vcbuild con la solucion %_sln%
|
|---|
| 181 | Goto ERROR
|
|---|
| 182 | )
|
|---|
| 183 | Goto RET
|
|---|
| 184 |
|
|---|
| 185 | :CHECK_VARS
|
|---|
| 186 | For %%v in %_vars% do (
|
|---|
| 187 | If Not defined %%v (
|
|---|
| 188 | Echo La variable %%v debe estar definida para compilar %_mod%
|
|---|
| 189 | If Not Defined _msg_extra Goto END
|
|---|
| 190 | If "%_msg_extra%"=="" Goto END
|
|---|
| 191 | Echo %_msg_extra%
|
|---|
| 192 | Pause
|
|---|
| 193 | Goto END
|
|---|
| 194 | )
|
|---|
| 195 | )
|
|---|
| 196 | Goto RET
|
|---|
| 197 |
|
|---|
| 198 | :BEGIN
|
|---|
| 199 |
|
|---|
| 200 | Rem Compilacion de TOL
|
|---|
| 201 | Set _mod=tol
|
|---|
| 202 | Set _sln=gnutol.sln
|
|---|
| 203 | Set _ret=RET_TOLCC
|
|---|
| 204 | Goto COMPILE
|
|---|
| 205 | :RET_TOLCC
|
|---|
| 206 |
|
|---|
| 207 | Rem Compilacion de TOLTCL
|
|---|
| 208 | Rem Verifico que las variable de entorno de TOLTCL esten definidas
|
|---|
| 209 | Set _vars=(TCL_INCLUDE TCL_LIB)
|
|---|
| 210 | Set _msg_extra=TCL_INCLUDE debe apuntar a los include de Tcl. TCL_LIB debe apuntar a las librerias de Tcl.
|
|---|
| 211 | Set _ret=RET_VARTT
|
|---|
| 212 | Goto CHECK_VARS
|
|---|
| 213 | :RET_VARTT
|
|---|
| 214 | Set _mod=toltcl
|
|---|
| 215 | Set _sln=toltcl.sln
|
|---|
| 216 | Set _ret=RET_TTCC
|
|---|
| 217 | Goto COMPILE
|
|---|
| 218 | :RET_TTCC
|
|---|
| 219 |
|
|---|
| 220 | Rem Compilacion de VBTOL
|
|---|
| 221 | If "%_jup%"=="1" Goto RET_VBCC
|
|---|
| 222 | Set _mod=vbtol
|
|---|
| 223 | Set _sln=vbtol.sln
|
|---|
| 224 | Set _ret=RET_VBCC
|
|---|
| 225 | Goto COMPILE
|
|---|
| 226 | :RET_VBCC
|
|---|
| 227 |
|
|---|
| 228 | Rem Compilacion de TOLSH
|
|---|
| 229 | If "%_jup%"=="1" Goto RET_TSHCC
|
|---|
| 230 | PushD ..\..\tolsh
|
|---|
| 231 | call build
|
|---|
| 232 | xcopy /F /Y tolsh.exe !ATOLDIR!
|
|---|
| 233 | PopD
|
|---|
| 234 | :RET_TSHCC
|
|---|
| 235 |
|
|---|
| 236 | If "%_jup%"=="1" Goto END
|
|---|
| 237 |
|
|---|
| 238 | Rem Copio scripts TOL y TCL hacia ActiveTOL
|
|---|
| 239 | If Not Exist ..\ActiveTOL\nul (
|
|---|
| 240 | Echo Directorio ActiveTOL no existente. No se copiaran scripts.
|
|---|
| 241 | Pause
|
|---|
| 242 | Goto END
|
|---|
| 243 | )
|
|---|
| 244 |
|
|---|
| 245 | Rem Copia de stdlib
|
|---|
| 246 | Set _dir_src=..\..\tol\stdlib
|
|---|
| 247 | Set _dir_dest=..\ActiveTOL\bin\stdlib
|
|---|
| 248 | Set _ret=RET_CPTL
|
|---|
| 249 | Goto UP_SCRIPTS
|
|---|
| 250 | :RET_CPTL
|
|---|
| 251 | Rem copiamos pkgIndex.tcl de toltcl
|
|---|
| 252 | xcopy ..\..\toltcl\pkgIndex.tcl ..\ActiveTOL\lib\toltcl\ /F /Y /I
|
|---|
| 253 | xcopy ..\..\toltcl\library\toltcl.tcl ..\ActiveTOL\lib\toltcl\ /F /Y /I
|
|---|
| 254 | If errorlevel 1 (
|
|---|
| 255 | Set _msg_error=Error copiando toltcl\pkgIndex.tcl hacia ActiveTOL
|
|---|
| 256 | Goto ERROR
|
|---|
| 257 | )
|
|---|
| 258 |
|
|---|
| 259 | Rem Copia de scripts tcl: autoscroll, byswidget, markupparser, markupviewer,
|
|---|
| 260 | Rem mimetex, mkWidgets1.3 ndbmanager, notebookdb, renderpane, rmtps_client,
|
|---|
| 261 | Rem toltk, trycatch, wtree
|
|---|
| 262 |
|
|---|
| 263 | For %%x in (autoscroll byswidget markupparser markupviewer mimetex mkWidgets1.3 nbdbmanager notebookdb renderpane toltk trycatch wtree) do (
|
|---|
| 264 | Set _dir_src=..\..\tolbase\lib\%%x
|
|---|
| 265 | Set _dir_dest=..\ActiveTOL\lib\%%x
|
|---|
| 266 |
|
|---|
| 267 | If Exist !_dir_dest!\nul (
|
|---|
| 268 | Echo Borrando scripts antiguos de !_dir_dest!
|
|---|
| 269 | Rmdir /S /Q !_dir_dest%!
|
|---|
| 270 | )
|
|---|
| 271 | Echo Copiando scripts nuevos de !_dir_src! a !_dir_dest!
|
|---|
| 272 | xcopy !_dir_src! !_dir_dest! /S /F /Y /I /EXCLUDE:exclude.lst
|
|---|
| 273 | If errorlevel 1 (
|
|---|
| 274 | Set _msg_error=Error copiando !_dir_src! hacia !_dir_dest!
|
|---|
| 275 | Goto ERROR
|
|---|
| 276 | )
|
|---|
| 277 | )
|
|---|
| 278 |
|
|---|
| 279 | Rem Recupero ficheros perdidos por cualquier causa
|
|---|
| 280 | If Not Exist ..\ActiveTOL\bin\tol.exe (
|
|---|
| 281 | Echo Recuperando ejecutable perdido ..\ActiveTOL\bin\tol.exe
|
|---|
| 282 | copy ..\..\tol\%winSrc%\release\tol.exe ..\ActiveTOL\bin\tol.exe
|
|---|
| 283 | )
|
|---|
| 284 | If Not Exist ..\ActiveTOL\bin\tol.dll (
|
|---|
| 285 | Echo Recuperando librería perdida ..\ActiveTOL\bin\tol.dll
|
|---|
| 286 | copy ..\..\tol\%winSrc%\release\tol.dll ..\ActiveTOL\bin\tol.dll
|
|---|
| 287 | )
|
|---|
| 288 | If Not Exist ..\ActiveTOL\bin\tolodbc*.dll (
|
|---|
| 289 | Echo Recuperando librería perdida ..\ActiveTOL\bin\tolodbc*.dll
|
|---|
| 290 | copy ..\..\tol\%winSrc%\libtolodbc\Release\*.dll ..\ActiveTOL\bin
|
|---|
| 291 | )
|
|---|
| 292 | If Not Exist ..\ActiveTOL\bin\tolmysql*.dll (
|
|---|
| 293 | Echo Recuperando librería perdida ..\ActiveTOL\bin\tolmysql*.dll
|
|---|
| 294 | copy ..\..\tol\%winSrc%\libtolmysql\Release\*.dll ..\ActiveTOL\bin
|
|---|
| 295 | )
|
|---|
| 296 | If Not Exist ..\ActiveTOL\bin\tolpgsql*.dll (
|
|---|
| 297 | Echo Recuperando librería perdida ..\ActiveTOL\bin\tolpgsql*.dll
|
|---|
| 298 | copy ..\..\tol\%winSrc%\libtolpgsql\Release\*.dll ..\ActiveTOL\bin
|
|---|
| 299 | )
|
|---|
| 300 | If Not Exist ..\ActiveTOL\lib\toltcl\toltcl.dll (
|
|---|
| 301 | Echo Recuperando librería perdida ..\ActiveTOL\lib\toltcl\toltcl.dll
|
|---|
| 302 | copy ..\..\toltcl\%winSrc%\Release\toltcl.dll ..\ActiveTOL\lib\toltcl\toltcl.dll
|
|---|
| 303 | )
|
|---|
| 304 | If Not Exist ..\ActiveTOL\bin\vbtol.dll (
|
|---|
| 305 | Echo Recuperando librería perdida ..\ActiveTOL\bin\vbtol.dll
|
|---|
| 306 | copy ..\..\vbtol\%winSrc%\Release\vbtol.dll ..\ActiveTOL\bin\vbtol.dll
|
|---|
| 307 | )
|
|---|
| 308 |
|
|---|
| 309 | Rem descargo paquetes que se distriburan por omision con TOL
|
|---|
| 310 | call download_default_packages.bat
|
|---|
| 311 |
|
|---|
| 312 | Rem Ejecuto los tests si me lo han pedido
|
|---|
| 313 | :DO_TESTS
|
|---|
| 314 | If "%_dodist%"=="1" (
|
|---|
| 315 | If "%_dotests%"=="0" (
|
|---|
| 316 | Echo "NO se estan forzando los test a pesar de haber solicitado /dist"
|
|---|
| 317 | )
|
|---|
| 318 | )
|
|---|
| 319 |
|
|---|
| 320 | If "%_dotests%"=="1" (
|
|---|
| 321 | If Exist ..\ActiveTOL\bin\tol.exe (
|
|---|
| 322 | If Not Exist test_status (
|
|---|
| 323 | Md test_status
|
|---|
| 324 | ) Else (
|
|---|
| 325 | Del /Q test_status\*.*
|
|---|
| 326 | )
|
|---|
| 327 | Set _tst_cd=!CD!\test_status
|
|---|
| 328 | PushD ..\ActiveTOL\bin
|
|---|
| 329 | Echo Ejecutando Tol standard tests ...
|
|---|
| 330 | echo %CD%\\test_status\
|
|---|
| 331 |
|
|---|
| 332 | tol.exe -v -c"Text DupTestIndicatorPath=\"%CD%\\test_status\"" "..\\..\\..\\tol_tests\\tol\\_tolTester.tol">!_tst_cd!\init.log
|
|---|
| 333 | PopD
|
|---|
| 334 | If Exist test_status\FAIL.txt (
|
|---|
| 335 | Set test_status=FAIL
|
|---|
| 336 | Set tdt_subject="ERROR ejecutando TOL_TESTS"
|
|---|
| 337 | Set tdt_body="La ejecucion de TOL_TESTS genero el archivo de estado FAIL.txt. No se ha actualizado Tolbase en %_url_bin_%."
|
|---|
| 338 | Set tdt_attach=test_status\FAIL.txt
|
|---|
| 339 | ) Else If Exist test_status\WARNING.txt (
|
|---|
| 340 | Set test_status=WARNING
|
|---|
| 341 | Set tdt_subject="Version %_branchid% actualizada, WARNING ejecutando TOL_TESTS"
|
|---|
| 342 | Set tdt_body=test_status\BODY.txt
|
|---|
| 343 | Set tdt_attach=test_status\WARNING.txt
|
|---|
| 344 | ) Else If Exist test_status\OK.txt (
|
|---|
| 345 | Set test_status=OK
|
|---|
| 346 | Set tdt_subject="Version %_branchid% actualizada, OK ejecutando TOL_TESTS"
|
|---|
| 347 | Set tdt_body=test_status\BODY.txt
|
|---|
| 348 | Set tdt_attach=test_status\OK.txt
|
|---|
| 349 | ) Else (
|
|---|
| 350 | Set test_status=FAIL
|
|---|
| 351 | Set tdt_subject="ERROR ejecutando TOL_TEST"
|
|---|
| 352 | Echo TOL_TEST no genero archivo de estado, verifique manualmente /tests>>%_fbody%
|
|---|
| 353 | Echo.>>%_fbody%
|
|---|
| 354 | Echo COMPUTERNAME = %COMPUTERNAME%>>%_fbody%
|
|---|
| 355 | Echo USERNAME = %USERNAME%>>%_fbody%
|
|---|
| 356 | Echo BRANCHID = ""RAMA SVN"
|
|---|
| 357 | Echo.>>%_fbody%
|
|---|
| 358 | Echo Se ha adjuntado el log de inicializacion de TOL.>>%_fbody%
|
|---|
| 359 | Set tdt_body=test_status\BODY.txt
|
|---|
| 360 | Set tdt_attach=test_status\init.log
|
|---|
| 361 | )
|
|---|
| 362 | ) Else (
|
|---|
| 363 | Set _msg_error=No se encuentra ..ºActiveTOL\bin\tol.exe necesario para ejecutar los tests de TOL
|
|---|
| 364 | Goto ERROR
|
|---|
| 365 | )
|
|---|
| 366 | )
|
|---|
| 367 | If "%test_status%"=="FAIL" (
|
|---|
| 368 | Echo TOL_TESTS finalizo con errores, chequee %CD%\test_status
|
|---|
| 369 | Goto SENDMAIL
|
|---|
| 370 | )
|
|---|
| 371 |
|
|---|
| 372 |
|
|---|
| 373 | Rem empaco la distribucion de tolbase si me lo han pedido
|
|---|
| 374 | If "%_dodist%"=="1" (
|
|---|
| 375 | If Not Exist ..\NSIS\tol*.exe (
|
|---|
| 376 | Echo ..\NSIS\tol*.exe no existe
|
|---|
| 377 | If Not "%_pnsis%"=="1" (
|
|---|
| 378 | Echo Habilitando /pnsis para poder hacer /dist
|
|---|
| 379 | Set _pnsis=1
|
|---|
| 380 | )
|
|---|
| 381 | )
|
|---|
| 382 | )
|
|---|
| 383 | Set _cwd=%CD%
|
|---|
| 384 | If "%_pnsis%"=="1" (
|
|---|
| 385 |
|
|---|
| 386 | Echo Generando el archivo de creación del instalador de TOL ...
|
|---|
| 387 | ..\ActiveTOL\bin\tol -v ..\NSIS\Tolbase.nsi.generate.tol
|
|---|
| 388 | If Not Exist ..\NSIS\Tolbase.nsi (
|
|---|
| 389 | Set _msg_error=El empaquetado de tolbase ..ºNSIS\Tolbase.nsi no existe.
|
|---|
| 390 | Goto ERROR
|
|---|
| 391 | )
|
|---|
| 392 | If Exist ..\NSIS\tol*.exe (
|
|---|
| 393 | Del /Q ..\NSIS\tol*.exe
|
|---|
| 394 | )
|
|---|
| 395 | Echo Creando instalador de TOL ...
|
|---|
| 396 | makensis /V2 /X"SetCompressor /FINAL /SOLID lzma" ..\NSIS\Tolbase.nsi
|
|---|
| 397 | If Exist ..\NSIS\tol*.exe (
|
|---|
| 398 | Echo El instalador de TOL ha sido creado en "%_cwd%\..\NSIS"
|
|---|
| 399 | ) Else (
|
|---|
| 400 | Set _msg_error=No se ha encontrado el resultado de ejecutar makensis
|
|---|
| 401 | Goto ERROR
|
|---|
| 402 | )
|
|---|
| 403 | )
|
|---|
| 404 |
|
|---|
| 405 | :DODIST
|
|---|
| 406 | Rem envio el empaquetado hacia www.tol-project.org si se ha pedido
|
|---|
| 407 | Echo status es %test_status%
|
|---|
| 408 | If "%_dodist%"=="1" (
|
|---|
| 409 | If Exist ..\NSIS\tol*.exe (
|
|---|
| 410 | For %%f In (..\NSIS\tol-msvc-v*-win32.exe) Do (
|
|---|
| 411 | Echo encontrado %%~nxf
|
|---|
| 412 | Set _fbin=%%~nxf
|
|---|
| 413 | )
|
|---|
| 414 | REM echo Creando el tag automatico correspondiente al empaquetado
|
|---|
| 415 | cd ..\NSIS
|
|---|
| 416 | REM ..\ActiveTOL\bin\tol -v create_tag_build.tol
|
|---|
| 417 | REM call create_tag_build.bat
|
|---|
| 418 | REM Echo copiando last_official_tol_release_win.txt hacia www.tol-project.org
|
|---|
| 419 | REM ..\ActiveTOL\bin\tol -v -c"Text WriteFile(\"last_official_tol_release_win.txt\",Version);"
|
|---|
| 420 | REM pscp last_official_tol_release_win.txt toldevel@tolp.localbayes.es:.
|
|---|
| 421 | Echo copiando el instalador hacia www.tol-project.org
|
|---|
| 422 | pscp tol*.exe toldevel@tolp.localbayes.es:/var/www/packages/win32/.
|
|---|
| 423 | If "%_branchid%"=="REMtrunkREM" (
|
|---|
| 424 | Echo copiando tol-msvc-v%_versionNumber%-win32.exe como tolbase-cvstrunk-setup.exe en www.tol-project.org
|
|---|
| 425 | plink tdt@cvs.tol-project.org "cp /home/bayes/pub/bin/win/tol-msvc-v%_versionNumber%-win32.exe /home/bayes/pub/bin/win/tolbase-cvstrunk-setup.exe"
|
|---|
| 426 | )
|
|---|
| 427 | REM Echo Moviendo el empaquetado a la carpeta de almacenamiento historico
|
|---|
| 428 | REM ..\ActiveTOL\bin\tol -v store_history.tol
|
|---|
| 429 | cd..
|
|---|
| 430 | GOTO END
|
|---|
| 431 | REM Echo Nueva version %_branchid% disponible en %_url_bin_%/!_fbin!>test_status\BODY.txt
|
|---|
| 432 | Echo.>>%_fbody%
|
|---|
| 433 | Echo El resultado de tol_tests esta disponible en el archivo adjunto.>>%_fbody%
|
|---|
| 434 | Echo.>>%_fbody%
|
|---|
| 435 | ) Else (
|
|---|
| 436 | Echo No se puede enviar el instalador hacia www.tol-project.exe pues no existe en NSIS
|
|---|
| 437 | Set _msg_error=Utilice /pnsis para construirlo
|
|---|
| 438 | Goto ERROR
|
|---|
| 439 | )
|
|---|
| 440 | ) Else (
|
|---|
| 441 | Goto END
|
|---|
| 442 | )
|
|---|
| 443 |
|
|---|
| 444 | GOTO END
|
|---|
| 445 |
|
|---|
| 446 | :MAILTDT
|
|---|
| 447 | If Not Defined _lastup (
|
|---|
| 448 | Echo.>>%_fbody%
|
|---|
| 449 | Echo Variable interna _lastup con la fecha de la ultima actualizacion no esta definida.>>%_fbody%
|
|---|
| 450 | Echo No se podra generar el reporte de cambios.>>%_fbody%
|
|---|
| 451 | Echo Verifique .cvsopts.bat>>%_fbody%
|
|---|
| 452 | Goto SENDMAIL
|
|---|
| 453 | )
|
|---|
| 454 | Echo Los cambios desde la fecha %_lastup% son los siguientes:>>%_fbody%
|
|---|
| 455 | Rem Log de TOL
|
|---|
| 456 | Set _mod=tol
|
|---|
| 457 | Set _ret=RET_TOLLOG
|
|---|
| 458 | Goto CVS_GENLOG
|
|---|
| 459 | :RET_TOLLOG
|
|---|
| 460 | Rem Log de TOLTCL
|
|---|
| 461 | Set _mod=toltcl
|
|---|
| 462 | Set _ret=RET_TTLOG
|
|---|
| 463 | Goto CVS_GENLOG
|
|---|
| 464 | :RET_TTLOG
|
|---|
| 465 | Rem Log de VBTOL
|
|---|
| 466 | Set _mod=vbtol
|
|---|
| 467 | Set _ret=RET_VBLOG
|
|---|
| 468 | Goto CVS_GENLOG
|
|---|
| 469 | :RET_VBLOG
|
|---|
| 470 | Rem Log de TOLBASE
|
|---|
| 471 | Set _mod=tolbase
|
|---|
| 472 | Set _ret=RET_TBLOG
|
|---|
| 473 | Goto CVS_GENLOG
|
|---|
| 474 | :RET_TBLOG
|
|---|
| 475 | Rem Log de TOL_TESTS
|
|---|
| 476 | Set _mod=tol_tests
|
|---|
| 477 | Set _ret=RET_TTSTLOG
|
|---|
| 478 | Goto CVS_GENLOG
|
|---|
| 479 | :RET_TTSTLOG
|
|---|
| 480 | Rem Actualizo la fecha de ultima actualizacion exitosa
|
|---|
| 481 | Echo Set _lastup=%DATE:~6,4%-%DATE:~3,2%-%DATE:~0,2%>>.cvsopts.bat
|
|---|
| 482 |
|
|---|
| 483 | :SENDMAIL
|
|---|
| 484 | mailtdt %tdt_subject% %tdt_body% %tdt_attach%
|
|---|
| 485 | :END
|
|---|
| 486 | Rem Limpia variables d entorno
|
|---|
| 487 | EndLocal
|
|---|