Updated build scripts to use CEcho program.
This commit is contained in:
parent
dadeaec582
commit
577764bbc2
@ -28,18 +28,18 @@ if exist "%PATH_QTMSVC%\bin\qtvars.bat" (
|
|||||||
|
|
||||||
msbuild.exe /property:Configuration=%3 /property:Platform=%2 /target:Clean /verbosity:normal "%~1"
|
msbuild.exe /property:Configuration=%3 /property:Platform=%2 /target:Clean /verbosity:normal "%~1"
|
||||||
if not "%ERRORLEVEL%"=="0" (
|
if not "%ERRORLEVEL%"=="0" (
|
||||||
echo. && echo Build process has failed!
|
"%~dp0\..\Utilities\CEcho.exe" red "\nBuild process has failed!\n"
|
||||||
echo. && pause && exit
|
pause && exit
|
||||||
)
|
)
|
||||||
|
|
||||||
msbuild.exe /property:Configuration=%3 /property:Platform=%2 /target:Rebuild /verbosity:normal "%~1"
|
msbuild.exe /property:Configuration=%3 /property:Platform=%2 /target:Rebuild /verbosity:normal "%~1"
|
||||||
if not "%ERRORLEVEL%"=="0" (
|
if not "%ERRORLEVEL%"=="0" (
|
||||||
echo. && echo Build process has failed!
|
"%~dp0\..\Utilities\CEcho.exe" red "\nBuild process has failed!\n"
|
||||||
echo. && pause && exit
|
pause && exit
|
||||||
)
|
)
|
||||||
|
|
||||||
msbuild.exe /property:Configuration=%3 /property:Platform=%2 /target:Build /verbosity:normal "%~1"
|
msbuild.exe /property:Configuration=%3 /property:Platform=%2 /target:Build /verbosity:normal "%~1"
|
||||||
if not "%ERRORLEVEL%"=="0" (
|
if not "%ERRORLEVEL%"=="0" (
|
||||||
echo. && echo Build process has failed!
|
"%~dp0\..\Utilities\CEcho.exe" red "\nBuild process has failed!\n"
|
||||||
echo. && pause && exit
|
pause && exit
|
||||||
)
|
)
|
||||||
|
@ -13,8 +13,8 @@ if exist "%~dp0\..\Utilities\Date.exe" (
|
|||||||
)
|
)
|
||||||
|
|
||||||
if "%ISO_DATE%"=="" (
|
if "%ISO_DATE%"=="" (
|
||||||
echo. && echo "Failed to set up build date!"
|
"%~dp0\..\Utilities\CEcho.exe" red "\nFailed to set up build date!\n"
|
||||||
echo. && pause && exit
|
pause && exit
|
||||||
)
|
)
|
||||||
|
|
||||||
echo.
|
echo.
|
||||||
|
@ -37,11 +37,9 @@ if "%LAMEXP_SKIP_BUILD%"=="YES" (
|
|||||||
:: CLEAN UP
|
:: CLEAN UP
|
||||||
:: ---------------------------------------------------------------------------
|
:: ---------------------------------------------------------------------------
|
||||||
|
|
||||||
echo.
|
"%~dp0\..\Utilities\CEcho.exe" cyan "\n==========================================================================="
|
||||||
echo ----------------------------------------------------------------
|
"%~dp0\..\Utilities\CEcho.exe" cyan "Cleaning up..."
|
||||||
echo Cleaning up
|
"%~dp0\..\Utilities\CEcho.exe" cyan "===========================================================================\n"
|
||||||
echo ----------------------------------------------------------------
|
|
||||||
echo.
|
|
||||||
|
|
||||||
for %%i in (bin,obj,tmp,ipch) do (
|
for %%i in (bin,obj,tmp,ipch) do (
|
||||||
del /Q /S /F "%~dp0\..\..\%%i\*.*"
|
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 (
|
for %%i in (exe,sfx,zip,txt) do (
|
||||||
del "%OUT_FILE%.%%i" 2> NUL
|
del "%OUT_FILE%.%%i" 2> NUL
|
||||||
if exist "%OUT_FILE%.%%i" (
|
if exist "%OUT_FILE%.%%i" (
|
||||||
echo. && echo Failed to delete existing output file^^!
|
"%~dp0\..\Utilities\CEcho.exe" red "\nFailed to delete existing output file^^!\n"
|
||||||
echo. && pause && exit
|
pause && exit
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -95,6 +93,10 @@ for %%i in (exe,sfx,zip,txt) do (
|
|||||||
:: COPY BINARY FILES AND REDIST
|
:: 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%"
|
rd /S /Q "%TMP_PATH%"
|
||||||
mkdir "%TMP_PATH%"
|
mkdir "%TMP_PATH%"
|
||||||
|
|
||||||
@ -147,6 +149,10 @@ attrib +R "%TMP_PATH%\*.exe"
|
|||||||
:: CREATE PACKAGES
|
:: 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" 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" 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"
|
"%~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 (
|
for %%i in (zip,exe) do (
|
||||||
if not exist "%OUT_FILE%.zip" (
|
if not exist "%OUT_FILE%.zip" (
|
||||||
echo. && echo Failed to create release packages^^!
|
"%~dp0\..\Utilities\CEcho.exe" red "\nFailed to create release packages^^!\n"
|
||||||
echo. && pause && exit
|
pause && exit
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -182,6 +188,10 @@ attrib +R "%OUT_FILE%.exe"
|
|||||||
:: SIGN OUTPUT FILE
|
:: 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"
|
"%PATH_GNUPG1%\gpg.exe" --detach-sign "%OUT_FILE%.exe"
|
||||||
attrib +R "%OUT_FILE%.exe.sig"
|
attrib +R "%OUT_FILE%.exe.sig"
|
||||||
|
|
||||||
@ -189,8 +199,8 @@ attrib +R "%OUT_FILE%.exe.sig"
|
|||||||
:: COMPLETED
|
:: COMPLETED
|
||||||
:: ---------------------------------------------------------------------------
|
:: ---------------------------------------------------------------------------
|
||||||
|
|
||||||
echo.
|
"%~dp0\..\Utilities\CEcho.exe" green "\n==========================================================================="
|
||||||
echo BUIDL COMPLETED SUCCESSFULLY :-)
|
"%~dp0\..\Utilities\CEcho.exe" green "Completed successfully :-)"
|
||||||
echo.
|
"%~dp0\..\Utilities\CEcho.exe" green "===========================================================================\n"
|
||||||
|
|
||||||
pause
|
pause
|
||||||
|
@ -1,11 +1,9 @@
|
|||||||
@echo off
|
@echo off
|
||||||
setlocal ENABLEDELAYEDEXPANSION
|
setlocal ENABLEDELAYEDEXPANSION
|
||||||
|
|
||||||
echo.
|
"%~dp0\..\Utilities\CEcho.exe" cyan "\n==========================================================================="
|
||||||
echo ----------------------------------------------------------------
|
"%~dp0\..\Utilities\CEcho.exe" cyan "Updating translation files..."
|
||||||
echo Updating Translation Files
|
"%~dp0\..\Utilities\CEcho.exe" cyan "===========================================================================\n"
|
||||||
echo ----------------------------------------------------------------
|
|
||||||
echo.
|
|
||||||
|
|
||||||
:: ---------------------------------------------------------------------------
|
:: ---------------------------------------------------------------------------
|
||||||
:: SETUP PATHS
|
:: SETUP PATHS
|
||||||
@ -48,8 +46,8 @@ for %%f in ("%~dp0\..\Translation\*.ts") do (
|
|||||||
copy %%f %%f.bak
|
copy %%f %%f.bak
|
||||||
lupdate.exe "@%LST_FILE%" -no-obsolete -ts %%f
|
lupdate.exe "@%LST_FILE%" -no-obsolete -ts %%f
|
||||||
if not "!ERRORLEVEL!"=="0" (
|
if not "!ERRORLEVEL!"=="0" (
|
||||||
echo. && echo Something went wrong^^!
|
"%~dp0\..\Utilities\CEcho.exe" red "\nSomething went wrong^^!\n"
|
||||||
echo. && pause && exit
|
pause && exit
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -63,7 +61,7 @@ del "%LST_FILE%"
|
|||||||
for %%f in ("%~dp0\..\Translation\LameXP_??.ts") do (
|
for %%f in ("%~dp0\..\Translation\LameXP_??.ts") do (
|
||||||
lrelease.exe %%f -qm "%~dp0\..\..\res\localization\%%~nf.qm"
|
lrelease.exe %%f -qm "%~dp0\..\..\res\localization\%%~nf.qm"
|
||||||
if not "!ERRORLEVEL!"=="0" (
|
if not "!ERRORLEVEL!"=="0" (
|
||||||
echo. && echo Something went wrong^^!
|
"%~dp0\..\Utilities\CEcho.exe" red "\nSomething went wrong^^!\n"
|
||||||
echo. && pause && exit
|
pause && exit
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
@ -1,11 +1,9 @@
|
|||||||
@echo off
|
@echo off
|
||||||
setlocal EnableDelayedExpansion
|
setlocal EnableDelayedExpansion
|
||||||
|
|
||||||
echo.
|
"%~dp0\..\Utilities\CEcho.exe" cyan "\n==========================================================================="
|
||||||
echo ----------------------------------------------------------------
|
"%~dp0\..\Utilities\CEcho.exe" cyan "Building software documentation..."
|
||||||
echo Building software documentation
|
"%~dp0\..\Utilities\CEcho.exe" cyan "===========================================================================\n"
|
||||||
echo ----------------------------------------------------------------
|
|
||||||
echo.
|
|
||||||
|
|
||||||
:: ------------------------------------------
|
:: ------------------------------------------
|
||||||
:: Setup Paths
|
:: 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"
|
"%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.
|
echo.
|
||||||
if not "!ERRORLEVEL!"=="0" (
|
if not "!ERRORLEVEL!"=="0" (
|
||||||
echo. && echo Creating the document has failed^^!
|
"%~dp0\..\Utilities\CEcho.exe" red "\nSomething went wrong^^!\n"
|
||||||
echo. && pause && exit
|
pause && exit
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -30,12 +30,8 @@ if not "%~1"=="" (
|
|||||||
)
|
)
|
||||||
|
|
||||||
if not exist "%BUILDENV_TXT%" (
|
if not exist "%BUILDENV_TXT%" (
|
||||||
echo.
|
"%~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"
|
||||||
echo Could not find 'buildenv.txt' in current directory^!
|
pause && exit
|
||||||
echo Please create your 'buildenv.txt' file from 'buildenv.template.txt' first.
|
|
||||||
echo.
|
|
||||||
pause
|
|
||||||
exit
|
|
||||||
)
|
)
|
||||||
|
|
||||||
:: ------------------------------------------
|
:: ------------------------------------------
|
||||||
@ -58,17 +54,15 @@ set "BUILDENV_TXT="
|
|||||||
:: Print all paths
|
:: Print all paths
|
||||||
:: ------------------------------------------
|
:: ------------------------------------------
|
||||||
|
|
||||||
echo.
|
"%~dp0\..\Utilities\CEcho.exe" yellow "\n========== BEGIN PATHS =========="
|
||||||
echo ======= BEGIN PATHS =======
|
"%~dp0\..\Utilities\CEcho.exe" yellow "PATH_UPXBIN = \"%PATH_UPXBIN:\=\\%\""
|
||||||
echo PATH_UPXBIN = "%PATH_UPXBIN%"
|
"%~dp0\..\Utilities\CEcho.exe" yellow "PATH_MKNSIS = \"%PATH_MKNSIS:\=\\%\""
|
||||||
echo PATH_MKNSIS = "%PATH_MKNSIS%"
|
"%~dp0\..\Utilities\CEcho.exe" yellow "PATH_MSCDIR = \"%PATH_MSCDIR:\=\\%\""
|
||||||
echo PATH_MSCDIR = "%PATH_MSCDIR%"
|
"%~dp0\..\Utilities\CEcho.exe" yellow "PATH_QTMSVC = \"%PATH_QTMSVC:\=\\%\""
|
||||||
echo PATH_QTMSVC = "%PATH_QTMSVC%"
|
"%~dp0\..\Utilities\CEcho.exe" yellow "PATH_GNUPG1 = \"%PATH_GNUPG1:\=\\%\""
|
||||||
echo PATH_GNUPG1 = "%PATH_GNUPG1%"
|
"%~dp0\..\Utilities\CEcho.exe" yellow "PATH_PANDOC = \"%PATH_PANDOC:\=\\%\""
|
||||||
echo PATH_PANDOC = "%PATH_PANDOC%"
|
"%~dp0\..\Utilities\CEcho.exe" yellow "PATH_VCPROJ = \"%PATH_VCPROJ:\=\\%\""
|
||||||
echo PATH_VCPROJ = "%PATH_VCPROJ%"
|
"%~dp0\..\Utilities\CEcho.exe" yellow "=========== END PATHS ===========\n"
|
||||||
echo ======== END PATHS ========
|
|
||||||
echo.
|
|
||||||
|
|
||||||
:: ------------------------------------------
|
:: ------------------------------------------
|
||||||
:: Validate Paths
|
:: 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\qtvars.bat" goto:exit_success
|
||||||
if exist "%PATH_QTMSVC%\bin\qtenv2.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.
|
"%~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"
|
||||||
echo. && echo Please check your PATH_QTMSVC and try again!
|
pause && exit
|
||||||
echo. && pause && exit
|
|
||||||
|
|
||||||
:: ------------------------------------------
|
:: ------------------------------------------
|
||||||
:: Validate Path
|
:: Validate Path
|
||||||
@ -102,9 +95,8 @@ echo. && pause && exit
|
|||||||
|
|
||||||
:validate_path
|
:validate_path
|
||||||
if not exist "%~2" (
|
if not exist "%~2" (
|
||||||
echo. && echo Path could not be found: && echo "%~2"
|
"%~dp0\..\Utilities\CEcho.exe" red "\nPath %1 could not be found!\n\nPlease check your %1 path variable and try again...\n"
|
||||||
echo. && echo Please check your %1 and try again!
|
pause && exit
|
||||||
echo. && pause && exit
|
|
||||||
)
|
)
|
||||||
goto:eof
|
goto:eof
|
||||||
|
|
||||||
|
@ -39,8 +39,8 @@ if "%VER_LAMEXP_PATCH%"=="" goto:version_failure
|
|||||||
goto:version_success
|
goto:version_success
|
||||||
|
|
||||||
:version_failure
|
:version_failure
|
||||||
echo. && echo "Failed to set up build date!"
|
"%~dp0\..\Utilities\CEcho.exe" red "\nFailed to set up build date!\n"
|
||||||
echo. && pause && exit
|
pause && exit
|
||||||
|
|
||||||
:: ---------------------------------------------------------------------------
|
:: ---------------------------------------------------------------------------
|
||||||
:: GET RELEASE TYPE
|
:: GET RELEASE TYPE
|
||||||
@ -57,6 +57,4 @@ if "%VER_LAMEXP_TYPE%" == "RC" set "VER_LAMEXP_BASENAME=LameXP-RC%VER_LAMEXP_
|
|||||||
:: OUTPUT RESULT
|
:: OUTPUT RESULT
|
||||||
:: ---------------------------------------------------------------------------
|
:: ---------------------------------------------------------------------------
|
||||||
|
|
||||||
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"
|
||||||
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.
|
|
||||||
|
BIN
etc/Utilities/CEcho.exe
Normal file
BIN
etc/Utilities/CEcho.exe
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user