build/build.cmd
| r32561 | r32562 | |
| 82 | 82 | |
| 83 | 83 | |
| 84 | 84 | @rem --- perform validation steps
|
| 85 | | set VALIDATED=0
|
| 86 | | call :dovalidate
|
| 85 | rem Uncomment next line for doing validation
|
| 86 | rem set VALIDATED=0
|
| 87 | rem call :dovalidate
|
| 88 | set VALIDATED=1
|
| 87 | 89 | if "%VALIDATED%"=="0" goto :eof
|
| 88 | 90 | |
| 89 | 91 | |
| r32561 | r32562 | |
| 133 | 135 | set DSTBRANCH=mame%2
|
| 134 | 136 | set FINALZIP=mame%2s
|
| 135 | 137 | set FINALBINZIP=mame%2b
|
| 138 | set FINALBINZIP_MESS=mess%2b
|
| 136 | 139 | set TEMP=%2
|
| 137 | 140 | set VERSION=%temp:~0,1%.%temp:~1%
|
| 138 | 141 | |
| r32561 | r32562 | |
| 150 | 153 | |
| 151 | 154 | |
| 152 | 155 | @rem --- perform validation steps
|
| 153 | | set VALIDATED=0
|
| 154 | | call :dovalidate
|
| 156 | rem Uncomment next lines for doing validation
|
| 157 | rem set VALIDATED=0
|
| 158 | rem call :dovalidate
|
| 159 | set VALIDATED=1
|
| 155 | 160 | if "%VALIDATED%"=="0" goto :eof
|
| 156 | 161 | |
| 157 | 162 | |
| 158 | 163 | @rem --- all systems go, create the branch
|
| 159 | 164 | @echo Creating target branch %DESTBRANCH%....
|
| 160 | | if "%TEST%" == "" svn copy svn://dspnet.fr/mame/trunk -r %REVISION% svn://dspnet.fr/mame/tags/%DSTBRANCH% -m "MAME %VERSION% tag"
|
| 165 | svn copy svn://dspnet.fr/mame/trunk -r %REVISION% svn://dspnet.fr/mame/tags/%DSTBRANCH% -m "MAME %VERSION% tag"
|
| 161 | 166 | |
| 162 | 167 | |
| 163 | 168 | @rem --- export the tree for building
|
| 164 | 169 | :destexistsfull
|
| 165 | 170 | @echo Checking out a temp copy....
|
| 166 | | if exist tempbuild rd /s/q tempbuild
|
| 167 | | svn export svn://dspnet.fr/mame/tags/%DSTBRANCH% tempbuild %NULLOUT%
|
| 171 | if "%RESUME%"=="0" if exist tempbuild rd /s/q tempbuild
|
| 172 | if "%RESUME%"=="0" svn export svn://dspnet.fr/mame/tags/%DSTBRANCH% tempbuild %NULLOUT%
|
| 168 | 173 | |
| 174 | @rem goto :createpackage
|
| 169 | 175 | |
| 170 | 176 | @rem --- build the debug version
|
| 171 | 177 | @echo Building debug version....
|
| r32561 | r32562 | |
| 183 | 189 | set SYMLEVEL=1
|
| 184 | 190 | set OSD=
|
| 185 | 191 | pushd tempbuild
|
| 186 | | call :performbuild mamed windowsd || goto :eof
|
| 192 | call :performbuild mamed windowsd messd || goto :eof
|
| 187 | 193 | popd
|
| 188 | 194 | |
| 189 | 195 | |
| r32561 | r32562 | |
| 200 | 206 | set SYMLEVEL=1
|
| 201 | 207 | set SUFFIX=
|
| 202 | 208 | pushd tempbuild
|
| 203 | | call :performbuild mame windows || goto :eof
|
| 209 | call :performbuild mame windows mess|| goto :eof
|
| 204 | 210 | popd
|
| 205 | 211 | |
| 206 | 212 | |
| r32561 | r32562 | |
| 218 | 224 | set SYMLEVEL=1
|
| 219 | 225 | set SUFFIX=pp
|
| 220 | 226 | pushd tempbuild
|
| 221 | | call :performbuild mamepp windowspp || goto :eof
|
| 227 | call :performbuild mamepp windowspp messpp || goto :eof
|
| 222 | 228 | popd
|
| 223 | 229 | |
| 224 | 230 | |
| r32561 | r32562 | |
| 237 | 243 | set SYMLEVEL=1
|
| 238 | 244 | set SUFFIX=
|
| 239 | 245 | pushd tempbuild
|
| 240 | | call :performbuild mame64 windows64 || goto :eof
|
| 246 | call :performbuild mame64 windows64 mess64 || goto :eof
|
| 241 | 247 | popd
|
| 242 | 248 | |
| 243 | 249 | |
| r32561 | r32562 | |
| 248 | 254 | |
| 249 | 255 | |
| 250 | 256 | @rem --- copy in the whatsnew file
|
| 251 | | rem copy %WHATSNEW% tempexport\whatsnew.txt
|
| 257 | copy %WHATSNEW% tempexport\whatsnew.txt
|
| 258 | copy %MESSNEW% tempexport\messnew.txt
|
| 252 | 259 | |
| 253 | 260 | |
| 254 | 261 | @rem --- now package the results
|
| r32561 | r32562 | |
| 265 | 272 | 7za a -mpass=4 -mfb=255 -y -tzip %FINALZIP%.zip mame.zip %NULLOUT%
|
| 266 | 273 | del mame.zip
|
| 267 | 274 | |
| 268 | | |
| 275 | :createpackage
|
| 269 | 276 | @rem --- now build the official binary
|
| 270 | 277 | @echo Building official binary....
|
| 271 | | call :buildbinary mame %FINALBINZIP%.exe windows
|
| 278 | call :buildbinary mame %FINALBINZIP%.exe windows 1
|
| 279 | call :buildbinary mess %FINALBINZIP_MESS%.exe windows 2
|
| 272 | 280 | |
| 273 | 281 | @echo Building official debug binary....
|
| 274 | | call :buildbinary mamed %FINALBINZIP%_debug.exe windowsd
|
| 282 | call :buildbinary mamed %FINALBINZIP%_debug.exe windowsd 1
|
| 283 | call :buildbinary messd %FINALBINZIP_MESS%_debug.exe windowsd 2
|
| 275 | 284 | |
| 276 | 285 | @echo Building official I686 binary....
|
| 277 | | call :buildbinary mamepp %FINALBINZIP%_i686.exe windowspp
|
| 286 | call :buildbinary mamepp %FINALBINZIP%_i686.exe windowspp 1
|
| 287 | call :buildbinary messpp %FINALBINZIP_MESS%_i686.exe windowspp 2
|
| 278 | 288 | |
| 279 | 289 | @echo Building official 64-bit binary....
|
| 280 | | call :buildbinary mame64 %FINALBINZIP%_64bit.exe windows64
|
| 290 | call :buildbinary mame64 %FINALBINZIP%_64bit.exe windows64 1
|
| 291 | call :buildbinary mess64 %FINALBINZIP_MESS%_64bit.exe windows64 2
|
| 281 | 292 | |
| 282 | 293 | goto :eof
|
| 283 | 294 | |
| r32561 | r32562 | |
| 295 | 306 | if exist %2 del %2
|
| 296 | 307 | mkdir tempbin
|
| 297 | 308 | pushd tempbin
|
| 309 | if "%4"=="2" copy ..\%MESSNEW% messnew.txt
|
| 298 | 310 | copy ..\%WHATSNEW% whatsnew.txt
|
| 299 | 311 | copy ..\tempbuild\%1.exe
|
| 300 | 312 | copy ..\tempbuild\%1.sym
|
| r32561 | r32562 | |
| 305 | 317 | copy ..\tempbuild\obj\%3\jedutil.exe
|
| 306 | 318 | copy ..\tempbuild\obj\%3\ledutil.exe
|
| 307 | 319 | copy ..\tempbuild\obj\%3\unidasm.exe
|
| 320 | copy ..\tempbuild\obj\%3\nltool.exe |
| 308 | 321 | mkdir docs
|
| 309 | 322 | copy ..\tempbuild\docs\*.* docs
|
| 310 | 323 | mkdir hash
|
| 311 | | copy ..\tempbuild\hash\*.* hash
|
| 324 | if "%4"=="1" copy ..\tempbuild\hash\*.dtd hash
|
| 325 | if "%4"=="1" copy ..\tempbuild\hash\megatech.xml hash
|
| 326 | if "%4"=="1" copy ..\tempbuild\hash\neogeo.xml hash
|
| 327 | if "%4"=="1" copy ..\tempbuild\hash\vectrex.xml hash
|
| 328 | if "%4"=="1" copy ..\tempbuild\hash\stv.xml hash |
| 329 | if "%4"=="2" copy ..\tempbuild\hash\*.* hash
|
| 312 | 330 | mkdir hlsl
|
| 313 | 331 | copy ..\tempbuild\hlsl\*.* hlsl
|
| 332 | mkdir web
|
| 333 | copy ..\tempbuild\web\*.* web
|
| 334 | mkdir web\css
|
| 335 | copy ..\tempbuild\web\css\*.* web\css
|
| 336 | mkdir web\css\images
|
| 337 | copy ..\tempbuild\web\css\images\*.* web\css\images
|
| 338 | mkdir web\images
|
| 339 | copy ..\tempbuild\web\images\*.* web\images
|
| 340 | mkdir web\js
|
| 341 | copy ..\tempbuild\web\js\*.* web\js
|
| 342 | mkdir nl_examples
|
| 343 | copy ..\tempbuild\nl_examples\*.* nl_examples
|
| 314 | 344 | 7za x ..\mamedirs.zip
|
| 315 | 345 | 7za a -mx=9 -y -r -t7z -sfx7z.sfx ..\%2
|
| 316 | 346 | popd
|
| r32561 | r32562 | |
| 332 | 362 | @rem --- First cleanup old files
|
| 333 | 363 | if "%RESUME%"=="0" rd /s/q obj\%2
|
| 334 | 364 | if exist %1.exe del %1.exe
|
| 365 | if exist %3.exe del %3.exe
|
| 335 | 366 | if exist chdman.exe del chdman.exe
|
| 336 | 367 | if exist ldverify.exe del ldverify.exe
|
| 337 | 368 | if exist ldresample.exe del ldresample.exe
|
| r32561 | r32562 | |
| 339 | 370 | if exist jedutil.exe del jedutil.exe
|
| 340 | 371 | if exist ledutil.exe del ledutil.exe
|
| 341 | 372 | if exist unidasm.exe del unidasm.exe
|
| 373 | if exist nltool.exe del nltool.exe
|
| 342 | 374 | |
| 343 | | |
| 344 | 375 | @rem --- Do the build
|
| 345 | | @echo make buildtools %~3 %~4 %~5 %~6
|
| 346 | | make buildtools %~3 %~4 %~5 %~6 || goto :builderror %1
|
| 347 | | @echo make all %MAKEPARAMS% %~3 %~4 %~5 %~6
|
| 348 | | make all %MAKEPARAMS% %~3 %~4 %~5 %~6 || goto :builderror %1
|
| 376 | @echo make buildtools %~4 %~5 %~6 %~7
|
| 377 | make buildtools %~4 %~5 %~6 %~7 || goto :builderror %1
|
| 378 | @echo make all %MAKEPARAMS% %~4 %~5 %~6 %~7
|
| 379 | make all %MAKEPARAMS% %~4 %~5 %~6 %~7 || goto :builderror %1
|
| 380 | @echo make TARGET=mess all %MAKEPARAMS% %~4 %~5 %~6 %~7
|
| 381 | make all TARGET=mess %MAKEPARAMS% %~4 %~5 %~6 %~7 || goto :builderror %1
|
| 349 | 382 | if exist %1.exe strip -s %1.exe
|
| 383 | if exist %3.exe strip -s %3.exe
|
| 350 | 384 | |
| 351 | 385 | |
| 352 | 386 | @rem --- Stash the specific binaries
|
| r32561 | r32562 | |
| 357 | 391 | move /y jedutil.exe obj\%2\
|
| 358 | 392 | move /y ledutil.exe obj\%2\
|
| 359 | 393 | move /y unidasm.exe obj\%2
|
| 394 | move /y nltool.exe obj\%2\
|
| 360 | 395 | |
| 361 | 396 | goto :eof
|
| 362 | 397 | |