From 577764bbc241fd7754155ee9b88ed20dea50ffad Mon Sep 17 00:00:00 2001 From: LoRd_MuldeR Date: Tue, 23 Dec 2014 00:23:41 +0100 Subject: [PATCH] Updated build scripts to use CEcho program. --- etc/Deployment/_build.bat | 12 ++++++------ etc/Deployment/_date.bat | 4 ++-- etc/Deployment/_deploy.bat | 34 ++++++++++++++++++++------------ etc/Deployment/_lupdate.bat | 16 +++++++-------- etc/Deployment/_mkdocs.bat | 12 +++++------- etc/Deployment/_paths.bat | 38 ++++++++++++++---------------------- etc/Deployment/_version.bat | 8 +++----- etc/Utilities/CEcho.exe | Bin 0 -> 5632 bytes 8 files changed, 60 insertions(+), 64 deletions(-) create mode 100644 etc/Utilities/CEcho.exe diff --git a/etc/Deployment/_build.bat b/etc/Deployment/_build.bat index 1f2c2707..f9f587dd 100644 --- a/etc/Deployment/_build.bat +++ b/etc/Deployment/_build.bat @@ -28,18 +28,18 @@ if exist "%PATH_QTMSVC%\bin\qtvars.bat" ( msbuild.exe /property:Configuration=%3 /property:Platform=%2 /target:Clean /verbosity:normal "%~1" if not "%ERRORLEVEL%"=="0" ( - echo. && echo Build process has failed! - echo. && pause && exit + "%~dp0\..\Utilities\CEcho.exe" red "\nBuild process has failed!\n" + pause && exit ) msbuild.exe /property:Configuration=%3 /property:Platform=%2 /target:Rebuild /verbosity:normal "%~1" if not "%ERRORLEVEL%"=="0" ( - echo. && echo Build process has failed! - echo. && pause && exit + "%~dp0\..\Utilities\CEcho.exe" red "\nBuild process has failed!\n" + pause && exit ) msbuild.exe /property:Configuration=%3 /property:Platform=%2 /target:Build /verbosity:normal "%~1" if not "%ERRORLEVEL%"=="0" ( - echo. && echo Build process has failed! - echo. && pause && exit + "%~dp0\..\Utilities\CEcho.exe" red "\nBuild process has failed!\n" + pause && exit ) diff --git a/etc/Deployment/_date.bat b/etc/Deployment/_date.bat index 8d35d6be..63a013c3 100644 --- a/etc/Deployment/_date.bat +++ b/etc/Deployment/_date.bat @@ -13,8 +13,8 @@ if exist "%~dp0\..\Utilities\Date.exe" ( ) if "%ISO_DATE%"=="" ( - echo. && echo "Failed to set up build date!" - echo. && pause && exit + "%~dp0\..\Utilities\CEcho.exe" red "\nFailed to set up build date!\n" + pause && exit ) echo. diff --git a/etc/Deployment/_deploy.bat b/etc/Deployment/_deploy.bat index 7e1212d5..8ff46212 100644 --- a/etc/Deployment/_deploy.bat +++ b/etc/Deployment/_deploy.bat @@ -37,11 +37,9 @@ if "%LAMEXP_SKIP_BUILD%"=="YES" ( :: CLEAN UP :: --------------------------------------------------------------------------- -echo. -echo ---------------------------------------------------------------- -echo Cleaning up -echo ---------------------------------------------------------------- -echo. +"%~dp0\..\Utilities\CEcho.exe" cyan "\n===========================================================================" +"%~dp0\..\Utilities\CEcho.exe" cyan "Cleaning up..." +"%~dp0\..\Utilities\CEcho.exe" cyan "===========================================================================\n" for %%i in (bin,obj,tmp,ipch) do ( del /Q /S /F "%~dp0\..\..\%%i\*.*" @@ -86,8 +84,8 @@ for /L %%n in (1, 1, 99) do ( for %%i in (exe,sfx,zip,txt) do ( del "%OUT_FILE%.%%i" 2> NUL if exist "%OUT_FILE%.%%i" ( - echo. && echo Failed to delete existing output file^^! - echo. && pause && exit + "%~dp0\..\Utilities\CEcho.exe" red "\nFailed to delete existing output file^^!\n" + pause && exit ) ) @@ -95,6 +93,10 @@ for %%i in (exe,sfx,zip,txt) do ( :: COPY BINARY FILES AND REDIST :: --------------------------------------------------------------------------- +"%~dp0\..\Utilities\CEcho.exe" cyan "\n===========================================================================" +"%~dp0\..\Utilities\CEcho.exe" cyan "Copying binary files..." +"%~dp0\..\Utilities\CEcho.exe" cyan "===========================================================================\n" + rd /S /Q "%TMP_PATH%" mkdir "%TMP_PATH%" @@ -147,6 +149,10 @@ attrib +R "%TMP_PATH%\*.exe" :: CREATE PACKAGES :: --------------------------------------------------------------------------- +"%~dp0\..\Utilities\CEcho.exe" cyan "\n===========================================================================" +"%~dp0\..\Utilities\CEcho.exe" cyan "Creating release packages..." +"%~dp0\..\Utilities\CEcho.exe" cyan "===========================================================================\n" + "%~dp0\..\Utilities\Echo.exe" LameXP - Audio Encoder Front-End > "%OUT_FILE%.txt" "%~dp0\..\Utilities\Echo.exe" v%VER_LAMEXP_MAJOR%.%VER_LAMEXP_MINOR_HI%%VER_LAMEXP_MINOR_LO% %VER_LAMEXP_TYPE%-%VER_LAMEXP_PATCH% (Build #%VER_LAMEXP_BUILD%)\n >> "%OUT_FILE%.txt" "%~dp0\..\Utilities\Echo.exe" Built on %ISO_DATE% at %TIME%\n\n >> "%OUT_FILE%.txt" @@ -169,8 +175,8 @@ rd /S /Q "%TMP_PATH%" for %%i in (zip,exe) do ( if not exist "%OUT_FILE%.zip" ( - echo. && echo Failed to create release packages^^! - echo. && pause && exit + "%~dp0\..\Utilities\CEcho.exe" red "\nFailed to create release packages^^!\n" + pause && exit ) ) @@ -182,6 +188,10 @@ attrib +R "%OUT_FILE%.exe" :: SIGN OUTPUT FILE :: --------------------------------------------------------------------------- +"%~dp0\..\Utilities\CEcho.exe" cyan "\n===========================================================================" +"%~dp0\..\Utilities\CEcho.exe" cyan "Signing output file..." +"%~dp0\..\Utilities\CEcho.exe" cyan "===========================================================================\n" + "%PATH_GNUPG1%\gpg.exe" --detach-sign "%OUT_FILE%.exe" attrib +R "%OUT_FILE%.exe.sig" @@ -189,8 +199,8 @@ attrib +R "%OUT_FILE%.exe.sig" :: COMPLETED :: --------------------------------------------------------------------------- -echo. -echo BUIDL COMPLETED SUCCESSFULLY :-) -echo. +"%~dp0\..\Utilities\CEcho.exe" green "\n===========================================================================" +"%~dp0\..\Utilities\CEcho.exe" green "Completed successfully :-)" +"%~dp0\..\Utilities\CEcho.exe" green "===========================================================================\n" pause diff --git a/etc/Deployment/_lupdate.bat b/etc/Deployment/_lupdate.bat index fceac545..4acd7c4c 100644 --- a/etc/Deployment/_lupdate.bat +++ b/etc/Deployment/_lupdate.bat @@ -1,11 +1,9 @@ @echo off setlocal ENABLEDELAYEDEXPANSION -echo. -echo ---------------------------------------------------------------- -echo Updating Translation Files -echo ---------------------------------------------------------------- -echo. +"%~dp0\..\Utilities\CEcho.exe" cyan "\n===========================================================================" +"%~dp0\..\Utilities\CEcho.exe" cyan "Updating translation files..." +"%~dp0\..\Utilities\CEcho.exe" cyan "===========================================================================\n" :: --------------------------------------------------------------------------- :: SETUP PATHS @@ -48,8 +46,8 @@ for %%f in ("%~dp0\..\Translation\*.ts") do ( copy %%f %%f.bak lupdate.exe "@%LST_FILE%" -no-obsolete -ts %%f if not "!ERRORLEVEL!"=="0" ( - echo. && echo Something went wrong^^! - echo. && pause && exit + "%~dp0\..\Utilities\CEcho.exe" red "\nSomething went wrong^^!\n" + pause && exit ) ) @@ -63,7 +61,7 @@ del "%LST_FILE%" for %%f in ("%~dp0\..\Translation\LameXP_??.ts") do ( lrelease.exe %%f -qm "%~dp0\..\..\res\localization\%%~nf.qm" if not "!ERRORLEVEL!"=="0" ( - echo. && echo Something went wrong^^! - echo. && pause && exit + "%~dp0\..\Utilities\CEcho.exe" red "\nSomething went wrong^^!\n" + pause && exit ) ) diff --git a/etc/Deployment/_mkdocs.bat b/etc/Deployment/_mkdocs.bat index b6426cbe..37a658bf 100644 --- a/etc/Deployment/_mkdocs.bat +++ b/etc/Deployment/_mkdocs.bat @@ -1,11 +1,9 @@ @echo off setlocal EnableDelayedExpansion -echo. -echo ---------------------------------------------------------------- -echo Building software documentation -echo ---------------------------------------------------------------- -echo. +"%~dp0\..\Utilities\CEcho.exe" cyan "\n===========================================================================" +"%~dp0\..\Utilities\CEcho.exe" cyan "Building software documentation..." +"%~dp0\..\Utilities\CEcho.exe" cyan "===========================================================================\n" :: ------------------------------------------ :: Setup Paths @@ -22,8 +20,8 @@ for %%i in ("%~dp0\..\..\doc\*.md") do ( "%PATH_PANDOC%\pandoc.exe" --from markdown_github+pandoc_title_block --to html5 --toc -N --standalone -H "%~dp0\..\Style\style.css" "%%~i" --output "%%~dpni.html" echo. if not "!ERRORLEVEL!"=="0" ( - echo. && echo Creating the document has failed^^! - echo. && pause && exit + "%~dp0\..\Utilities\CEcho.exe" red "\nSomething went wrong^^!\n" + pause && exit ) ) diff --git a/etc/Deployment/_paths.bat b/etc/Deployment/_paths.bat index 670da22f..bb2f74a0 100644 --- a/etc/Deployment/_paths.bat +++ b/etc/Deployment/_paths.bat @@ -30,12 +30,8 @@ if not "%~1"=="" ( ) if not exist "%BUILDENV_TXT%" ( - echo. - echo Could not find 'buildenv.txt' in current directory^! - echo Please create your 'buildenv.txt' file from 'buildenv.template.txt' first. - echo. - pause - exit + "%~dp0\..\Utilities\CEcho.exe" red "\nCould not find \"buildenv.txt\" in current directory!\n\nPlease create your \"buildenv.txt\" file from 'buildenv.template.txt' first...\n" + pause && exit ) :: ------------------------------------------ @@ -58,17 +54,15 @@ set "BUILDENV_TXT=" :: Print all paths :: ------------------------------------------ -echo. -echo ======= BEGIN PATHS ======= -echo PATH_UPXBIN = "%PATH_UPXBIN%" -echo PATH_MKNSIS = "%PATH_MKNSIS%" -echo PATH_MSCDIR = "%PATH_MSCDIR%" -echo PATH_QTMSVC = "%PATH_QTMSVC%" -echo PATH_GNUPG1 = "%PATH_GNUPG1%" -echo PATH_PANDOC = "%PATH_PANDOC%" -echo PATH_VCPROJ = "%PATH_VCPROJ%" -echo ======== END PATHS ======== -echo. +"%~dp0\..\Utilities\CEcho.exe" yellow "\n========== BEGIN PATHS ==========" +"%~dp0\..\Utilities\CEcho.exe" yellow "PATH_UPXBIN = \"%PATH_UPXBIN:\=\\%\"" +"%~dp0\..\Utilities\CEcho.exe" yellow "PATH_MKNSIS = \"%PATH_MKNSIS:\=\\%\"" +"%~dp0\..\Utilities\CEcho.exe" yellow "PATH_MSCDIR = \"%PATH_MSCDIR:\=\\%\"" +"%~dp0\..\Utilities\CEcho.exe" yellow "PATH_QTMSVC = \"%PATH_QTMSVC:\=\\%\"" +"%~dp0\..\Utilities\CEcho.exe" yellow "PATH_GNUPG1 = \"%PATH_GNUPG1:\=\\%\"" +"%~dp0\..\Utilities\CEcho.exe" yellow "PATH_PANDOC = \"%PATH_PANDOC:\=\\%\"" +"%~dp0\..\Utilities\CEcho.exe" yellow "PATH_VCPROJ = \"%PATH_VCPROJ:\=\\%\"" +"%~dp0\..\Utilities\CEcho.exe" yellow "=========== END PATHS ===========\n" :: ------------------------------------------ :: Validate Paths @@ -92,9 +86,8 @@ call:validate_path PATH_VCPROJ "%~dp0\..\..\%PATH_VCPROJ%" if exist "%PATH_QTMSVC%\bin\qtvars.bat" goto:exit_success if exist "%PATH_QTMSVC%\bin\qtenv2.bat" goto:exit_success -echo. && echo Could not find "qtvars.bat" or "qtenv2.bat" in your Qt path. -echo. && echo Please check your PATH_QTMSVC and try again! -echo. && pause && exit +"%~dp0\..\Utilities\CEcho.exe" red "\nCould not find \"qtvars.bat\" or \"qtenv2.bat\" in your Qt path!\n\nPlease check your PATH_QTMSVC path variable and try again...\n" +pause && exit :: ------------------------------------------ :: Validate Path @@ -102,9 +95,8 @@ echo. && pause && exit :validate_path if not exist "%~2" ( - echo. && echo Path could not be found: && echo "%~2" - echo. && echo Please check your %1 and try again! - echo. && pause && exit + "%~dp0\..\Utilities\CEcho.exe" red "\nPath %1 could not be found!\n\nPlease check your %1 path variable and try again...\n" + pause && exit ) goto:eof diff --git a/etc/Deployment/_version.bat b/etc/Deployment/_version.bat index 8670d1a2..cace222f 100644 --- a/etc/Deployment/_version.bat +++ b/etc/Deployment/_version.bat @@ -39,8 +39,8 @@ if "%VER_LAMEXP_PATCH%"=="" goto:version_failure goto:version_success :version_failure -echo. && echo "Failed to set up build date!" -echo. && pause && exit +"%~dp0\..\Utilities\CEcho.exe" red "\nFailed to set up build date!\n" +pause && exit :: --------------------------------------------------------------------------- :: GET RELEASE TYPE @@ -57,6 +57,4 @@ if "%VER_LAMEXP_TYPE%" == "RC" set "VER_LAMEXP_BASENAME=LameXP-RC%VER_LAMEXP_ :: OUTPUT RESULT :: --------------------------------------------------------------------------- -echo. -echo LameXP Version: %VER_LAMEXP_MAJOR%.%VER_LAMEXP_MINOR_HI%%VER_LAMEXP_MINOR_LO%, Build #%VER_LAMEXP_BUILD% (%VER_LAMEXP_TYPE%-%VER_LAMEXP_PATCH%) -echo. +"%~dp0\..\Utilities\CEcho.exe" yellow "\nLameXP Version: %VER_LAMEXP_MAJOR%.%VER_LAMEXP_MINOR_HI%%VER_LAMEXP_MINOR_LO%, Build #%VER_LAMEXP_BUILD% (%VER_LAMEXP_TYPE%-%VER_LAMEXP_PATCH%)\n" diff --git a/etc/Utilities/CEcho.exe b/etc/Utilities/CEcho.exe new file mode 100644 index 0000000000000000000000000000000000000000..9600e4da69f789d71c159236dd9ff0a7ff4a8775 GIT binary patch literal 5632 zcmeHLdstIfw%;e@1tA0w1g{Sc2qHxS2nfhC0s<8z8Z=T62+0Wq^D^fofhrJ;XeFhj zwo}K^`gZJS+rf)hX?+0Vv(@^zRzy&+#St$E_<|_HnH>iGwBMb3|G9t6H+S~;t-a3r zt;b$_pX8i%R{95KU;_Z4LLx~38X&ih`0@FFo^C<4gU9y{;E3&I&juvzvS((I3`f-( zRiQ?tK*b`ZQbnKz7^=}KQJE4=%n+aol?3Cm*>>I&q5Ttm*Q6 z1o8s?*R9HNzIlRg8Rtu7;v%ch-^-An1V9>M1Fjz830~WD0SdxG>;Z6uh?VjI*!3ag zYDfl1)?Hh13IH^KSb;Yjn4w_R!C?d9tHykuxG# zE-VH%q^V87E_yf$p98LpZ7c7Rj^3uhs-g14<;By(PJN$FSl_xy)U~(D0BA-Y4W>-EHm|WmOtuTBDk_?*((z}D1MZ4G-ffgs-3fbp#4c> zl@kaVs(dg=MtFiip&$WyO>~*aTv$WZ8KbM_0@ussLxmh|2j^JG^0u6i zi;?V7kI_}RBM+sKbuRhGzT#!2Hg{2s^(xMe13>$$e*<|V+jM_r%RVDL(o(;rh-ERY zd^Mwvvx0AqcUJl~r+$KZ)Dnx_nsuHD4^j`$oFg2}eJG0}lZ&OD$keE-D+4Y8LnPVx ztp%8_5xJLYwg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