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