Updated build script.
This commit is contained in:
parent
998de9c1bc
commit
1218beb696
File diff suppressed because one or more lines are too long
@ -4,18 +4,30 @@
|
|||||||
:: COPY FILE
|
:: COPY FILE
|
||||||
:: ---------------------------------------------------------------------------
|
:: ---------------------------------------------------------------------------
|
||||||
|
|
||||||
set "CP_SRC=%~1"
|
set "CP_SRC=%~f1"
|
||||||
set "CP_DST=%~2"
|
set "CP_DST=%~f2"
|
||||||
|
|
||||||
"%~dp0\..\..\..\Prerequisites\CEcho\cecho.exe" white "copy \"%CP_SRC:\=\\%\" to \"%CP_DST:\=\\%\""
|
"%~dp0\..\..\..\Prerequisites\CEcho\cecho.exe" white "copy \"%CP_SRC:\=\\%\" to \"%CP_DST:\=\\%\""
|
||||||
|
|
||||||
if not exist "%~1" (
|
if not exist "%CP_SRC%" (
|
||||||
"%~dp0\..\..\..\Prerequisites\CEcho\cecho.exe" red "\nCopy failed: Source file \"%CP_SRC:\=\\%\" not found!\n"
|
"%~dp0\..\..\..\Prerequisites\CEcho\cecho.exe" red "\nCopy failed: Source file \"%CP_SRC:\=\\%\" not found!\n"
|
||||||
pause && exit
|
pause && exit
|
||||||
)
|
)
|
||||||
|
|
||||||
copy "%CP_SRC%" "%CP_DST%"
|
copy /B /Y /V "%CP_SRC%" "%CP_DST%"
|
||||||
|
|
||||||
if not "%ERRORLEVEL%" == "0" (
|
if not "%ERRORLEVEL%" == "0" (
|
||||||
"%~dp0\..\..\..\Prerequisites\CEcho\cecho.exe" red "\nCopy failed: Operation faild with error code %ERRORLEVEL%!\n"
|
"%~dp0\..\..\..\Prerequisites\CEcho\cecho.exe" red "\nCopy failed: Operation faild with error code %ERRORLEVEL%!\n"
|
||||||
pause && exit
|
pause && exit
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if exist "%CP_DST%\*" (
|
||||||
|
fc /B "%CP_SRC%" "%CP_DST%\%~nx1"
|
||||||
|
) else (
|
||||||
|
fc /B "%CP_SRC%" "%CP_DST%"
|
||||||
|
)
|
||||||
|
|
||||||
|
if not "%ERRORLEVEL%" == "0" (
|
||||||
|
"%~dp0\..\..\..\Prerequisites\CEcho\cecho.exe" red "\nCopy failed: File content does not match!\n"
|
||||||
|
pause && exit
|
||||||
|
)
|
||||||
|
@ -7,8 +7,8 @@
|
|||||||
set "ISO_DATE="
|
set "ISO_DATE="
|
||||||
set "ISO_TIME="
|
set "ISO_TIME="
|
||||||
|
|
||||||
if exist "%~dp0\..\..\..\Prerequisites\GnuWin32\date.exe" (
|
if exist "%~dp0\..\..\..\Prerequisites\MSYS\1.0\bin\date.exe" (
|
||||||
for /F "usebackq tokens=1,2" %%a in (`start /B "date" "%~dp0\..\..\..\Prerequisites\GnuWin32\date.exe" +"%%Y-%%m-%%d %%H:%%M:%%S"`) do (
|
for /F "usebackq tokens=1,2" %%a in (`start /B "date" "%~dp0\..\..\..\Prerequisites\MSYS\1.0\bin\date.exe" +"%%Y-%%m-%%d %%H:%%M:%%S"`) do (
|
||||||
set "ISO_DATE=%%a"
|
set "ISO_DATE=%%a"
|
||||||
set "ISO_TIME=%%b"
|
set "ISO_TIME=%%b"
|
||||||
)
|
)
|
||||||
|
@ -187,14 +187,14 @@ echo ---------------------------------------------------------------------------
|
|||||||
echo README.TXT>> "%OUT_FILE%.txt"
|
echo README.TXT>> "%OUT_FILE%.txt"
|
||||||
echo ------------------------------------------------------------------------------>> "%OUT_FILE%.txt"
|
echo ------------------------------------------------------------------------------>> "%OUT_FILE%.txt"
|
||||||
echo.>> "%OUT_FILE%.txt"
|
echo.>> "%OUT_FILE%.txt"
|
||||||
"%~dp0\..\..\..\Prerequisites\GnuWin32\cat.exe" "%~dp0\..\..\ReadMe.txt" >> "%OUT_FILE%.txt"
|
"%~dp0\..\..\..\Prerequisites\MSYS\1.0\bin\cat.exe" "%~dp0\..\..\ReadMe.txt" >> "%OUT_FILE%.txt"
|
||||||
echo.>> "%OUT_FILE%.txt"
|
echo.>> "%OUT_FILE%.txt"
|
||||||
|
|
||||||
echo ------------------------------------------------------------------------------>> "%OUT_FILE%.txt"
|
echo ------------------------------------------------------------------------------>> "%OUT_FILE%.txt"
|
||||||
echo LICENSE.TXT>> "%OUT_FILE%.txt"
|
echo LICENSE.TXT>> "%OUT_FILE%.txt"
|
||||||
echo ------------------------------------------------------------------------------>> "%OUT_FILE%.txt"
|
echo ------------------------------------------------------------------------------>> "%OUT_FILE%.txt"
|
||||||
echo.>> "%OUT_FILE%.txt"
|
echo.>> "%OUT_FILE%.txt"
|
||||||
"%~dp0\..\..\..\Prerequisites\GnuWin32\cat.exe" "%~dp0\..\..\License.txt" >> "%OUT_FILE%.txt"
|
"%~dp0\..\..\..\Prerequisites\MSYS\1.0\bin\cat.exe" "%~dp0\..\..\License.txt" >> "%OUT_FILE%.txt"
|
||||||
echo.>> "%OUT_FILE%.txt"
|
echo.>> "%OUT_FILE%.txt"
|
||||||
|
|
||||||
:: ---------------------------------------------------------------------------
|
:: ---------------------------------------------------------------------------
|
||||||
@ -206,7 +206,7 @@ echo.>> "%OUT_FILE%.txt"
|
|||||||
"%~dp0\..\..\..\Prerequisites\CEcho\cecho.exe" cyan "===========================================================================\n"
|
"%~dp0\..\..\..\Prerequisites\CEcho\cecho.exe" cyan "===========================================================================\n"
|
||||||
|
|
||||||
pushd "%TMP_PATH%"
|
pushd "%TMP_PATH%"
|
||||||
"%~dp0\..\..\..\Prerequisites\GnuWin32\zip.exe" -r -9 -z "%OUT_FILE%.zip" "*.*" < "%OUT_FILE%.txt"
|
"%~dp0\..\..\..\Prerequisites\InfoZip\zip.exe" -r -9 -z "%OUT_FILE%.zip" "*.*" < "%OUT_FILE%.txt"
|
||||||
popd
|
popd
|
||||||
|
|
||||||
"%~dp0\..\..\..\Prerequisites\NSIS\makensis.exe" "/DLAMEXP_DATE=%ISO_DATE%" "/DLAMEXP_VERSION=%VER_LAMEXP_MAJOR%.%VER_LAMEXP_MINOR_HI%%VER_LAMEXP_MINOR_LO%" "/DLAMEXP_BUILD=%VER_LAMEXP_BUILD%" "/DLAMEXP_INSTTYPE=%VER_LAMEXP_TYPE%" "/DLAMEXP_PATCH=%VER_LAMEXP_PATCH%" "/DLAMEXP_OUTPUT_FILE=%OUT_FILE%.sfx" "/DLAMEXP_SOURCE_PATH=%TMP_PATH%" "%~dp0\..\NSIS\setup.nsi"
|
"%~dp0\..\..\..\Prerequisites\NSIS\makensis.exe" "/DLAMEXP_DATE=%ISO_DATE%" "/DLAMEXP_VERSION=%VER_LAMEXP_MAJOR%.%VER_LAMEXP_MINOR_HI%%VER_LAMEXP_MINOR_LO%" "/DLAMEXP_BUILD=%VER_LAMEXP_BUILD%" "/DLAMEXP_INSTTYPE=%VER_LAMEXP_TYPE%" "/DLAMEXP_PATCH=%VER_LAMEXP_PATCH%" "/DLAMEXP_OUTPUT_FILE=%OUT_FILE%.sfx" "/DLAMEXP_SOURCE_PATH=%TMP_PATH%" "%~dp0\..\NSIS\setup.nsi"
|
||||||
|
Loading…
Reference in New Issue
Block a user