OSDN Git Service

Updated build scripts to use CEcho program.
authorLoRd_MuldeR <mulder2@gmx.de>
Mon, 22 Dec 2014 23:23:41 +0000 (00:23 +0100)
committerLoRd_MuldeR <mulder2@gmx.de>
Mon, 22 Dec 2014 23:23:41 +0000 (00:23 +0100)
etc/Deployment/_build.bat
etc/Deployment/_date.bat
etc/Deployment/_deploy.bat
etc/Deployment/_lupdate.bat
etc/Deployment/_mkdocs.bat
etc/Deployment/_paths.bat
etc/Deployment/_version.bat
etc/Utilities/CEcho.exe [new file with mode: 0644]

index 1f2c270..f9f587d 100644 (file)
@@ -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
 )
index 8d35d6b..63a013c 100644 (file)
@@ -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.
index 7e1212d..8ff4621 100644 (file)
@@ -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
index fceac54..4acd7c4 100644 (file)
@@ -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
        )
 )
index b6426cb..37a658b 100644 (file)
@@ -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
        )
 )
 
index 670da22..bb2f74a 100644 (file)
@@ -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
 
index 8670d1a..cace222 100644 (file)
@@ -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 (file)
index 0000000..9600e4d
Binary files /dev/null and b/etc/Utilities/CEcho.exe differ