From 6ad4ae1d73240e95f1763d36b2e5ab78af933a15 Mon Sep 17 00:00:00 2001 From: MuldeR Date: Tue, 21 May 2013 23:06:39 +0200 Subject: [PATCH] Updated build script. --- z_build.bat | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/z_build.bat b/z_build.bat index 7bdf7c5..e373b62 100644 --- a/z_build.bat +++ b/z_build.bat @@ -92,10 +92,21 @@ attrib +R "%PACK_PATH%\*.html" attrib +R "%PACK_PATH%\*.txt" REM /////////////////////////////////////////////////////////////////////////// -REM // Build the installer +REM // Generate outfile name REM /////////////////////////////////////////////////////////////////////////// -"%~dp0\etc\7za.exe" a -mm=Deflate -mfb=258 -mpass=15 -r "%~dp0\out\MediaInfo-GUI.%ISO_DATE%.zip" "%PACK_PATH%\*.*" +set "OUT_NAME=MediaInfo-GUI.%ISO_DATE%" +:CheckOutName +if exist "%~dp0\out\%OUT_NAME%.zip" ( + "OUT_NAME=%OUT_NAME%.new" + goto CheckOutName +) + +REM /////////////////////////////////////////////////////////////////////////// +REM // Build the package +REM /////////////////////////////////////////////////////////////////////////// +"%~dp0\etc\7za.exe" a -mm=Deflate -mfb=258 -mpass=15 -r "%~dp0\out\%OUT_NAME%.zip" "%PACK_PATH%\*.*" rmdir /Q /S "%PACK_PATH%" +attrib +R "%~dp0\out\%OUT_NAME%.zip" REM /////////////////////////////////////////////////////////////////////////// REM // COMPLETE