Updated deployment script. Now should work regardless of the current directory.
This commit is contained in:
parent
d6d8454d57
commit
7a0ef2a464
@ -4,7 +4,7 @@ echo ----------------------------------------------------------------
|
|||||||
echo Solution File: %1
|
echo Solution File: %1
|
||||||
echo Configuration: %~2
|
echo Configuration: %~2
|
||||||
echo ----------------------------------------------------------------
|
echo ----------------------------------------------------------------
|
||||||
call _paths.bat
|
call "%~d0%~p0\_paths.bat"
|
||||||
if not "%LAMEXP_ERROR%"=="0" GOTO:EOF
|
if not "%LAMEXP_ERROR%"=="0" GOTO:EOF
|
||||||
REM -----------------------------------------------------------------
|
REM -----------------------------------------------------------------
|
||||||
call "%PATH_MSVC90%\VC\bin\vcvars32.bat" x86
|
call "%PATH_MSVC90%\VC\bin\vcvars32.bat" x86
|
||||||
|
@ -3,9 +3,9 @@ setlocal ENABLEDELAYEDEXPANSION
|
|||||||
REM ------------------------------------------
|
REM ------------------------------------------
|
||||||
REM :: SETUP ENVIRONMENT ::
|
REM :: SETUP ENVIRONMENT ::
|
||||||
REM ------------------------------------------
|
REM ------------------------------------------
|
||||||
call _paths.bat
|
call "%~d0%~p0\_paths.bat"
|
||||||
if not "%LAMEXP_ERROR%"=="0" (
|
if not "%LAMEXP_ERROR%"=="0" (
|
||||||
call _error.bat "FAILD TO SETUP PATHS. CHECK YOUR 'BUILDENV.TXT' FILE"
|
call "%~d0%~p0\_error.bat" "FAILD TO SETUP PATHS. CHECK YOUR 'BUILDENV.TXT' FILE"
|
||||||
GOTO:EOF
|
GOTO:EOF
|
||||||
)
|
)
|
||||||
REM ------------------------------------------
|
REM ------------------------------------------
|
||||||
@ -18,13 +18,16 @@ if not "%LAMEXP_REDIST%"=="0" (
|
|||||||
REM ------------------------------------------
|
REM ------------------------------------------
|
||||||
REM :: SETUP PATHS ::
|
REM :: SETUP PATHS ::
|
||||||
REM ------------------------------------------
|
REM ------------------------------------------
|
||||||
set "OUT_PATH=..\..\bin\%LAMEXP_CONFIG%"
|
set "OUT_PATH=%~d0%~p0\..\..\bin\%LAMEXP_CONFIG%"
|
||||||
set "OUT_DATE=%DATE:~6,4%-%DATE:~3,2%-%DATE:~0,2%"
|
set "OUT_DATE=%DATE:~6,4%-%DATE:~3,2%-%DATE:~0,2%"
|
||||||
set "TMP_PATH=%TEMP%\~LameXP.%LAMEXP_CONFIG%.%OUT_DATE%.tmp"
|
set "TMP_PATH=%TEMP%\~LameXP.%LAMEXP_CONFIG%.%OUT_DATE%.tmp"
|
||||||
set "OBJ_PATH=..\..\obj\%LAMEXP_CONFIG%"
|
set "OBJ_PATH=%~d0%~p0\..\..\obj\%LAMEXP_CONFIG%"
|
||||||
set "MOC_PATH=..\..\tmp"
|
set "MOC_PATH=%~d0%~p0\..\..\tmp"
|
||||||
|
set "IPC_PATH=%~d0%~p0\..\..\ipch"
|
||||||
REM ------------------------------------------
|
REM ------------------------------------------
|
||||||
REM goto SkipBuildThisTime
|
if "%LAMEXP_SKIP_BUILD%"=="YES" (
|
||||||
|
goto SkipBuildThisTime
|
||||||
|
)
|
||||||
REM ------------------------------------------
|
REM ------------------------------------------
|
||||||
REM :: CLEAN UP ::
|
REM :: CLEAN UP ::
|
||||||
REM ------------------------------------------
|
REM ------------------------------------------
|
||||||
@ -41,23 +44,24 @@ del /Q "%OBJ_PATH%\*.htm"
|
|||||||
del /Q "%OBJ_PATH%\*.dep"
|
del /Q "%OBJ_PATH%\*.dep"
|
||||||
del /Q "%MOC_PATH%\*.cpp"
|
del /Q "%MOC_PATH%\*.cpp"
|
||||||
del /Q "%MOC_PATH%\*.h"
|
del /Q "%MOC_PATH%\*.h"
|
||||||
|
del /Q /S "%IPC_PATH%\*.*"
|
||||||
REM ------------------------------------------
|
REM ------------------------------------------
|
||||||
REM :: BUILD BINARIES ::
|
REM :: BUILD BINARIES ::
|
||||||
REM ------------------------------------------
|
REM ------------------------------------------
|
||||||
call _lupdate.bat
|
call "%~d0%~p0\_lupdate.bat"
|
||||||
call _build.bat "%PATH_VCPROJ%" "%LAMEXP_CONFIG%"
|
call "%~d0%~p0\_build.bat" "%~d0%~p0\..\..\%PATH_VCPROJ%" "%LAMEXP_CONFIG%"
|
||||||
if not "%LAMEXP_ERROR%"=="0" (
|
if not "%LAMEXP_ERROR%"=="0" (
|
||||||
call _error.bat "BUILD HAS FAILED"
|
call "%~d0%~p0\_error.bat" "BUILD HAS FAILED"
|
||||||
GOTO:EOF
|
GOTO:EOF
|
||||||
)
|
)
|
||||||
REM ------------------------------------------
|
REM ------------------------------------------
|
||||||
REM :SkipBuildThisTime
|
:SkipBuildThisTime
|
||||||
REM ------------------------------------------
|
REM ------------------------------------------
|
||||||
REM :: READ VERSION INFO ::
|
REM :: READ VERSION INFO ::
|
||||||
REM ------------------------------------------
|
REM ------------------------------------------
|
||||||
call _version.bat
|
call "%~d0%~p0\_version.bat"
|
||||||
if not "%LAMEXP_ERROR%"=="0" (
|
if not "%LAMEXP_ERROR%"=="0" (
|
||||||
call _error.bat "FAILD TO READ VERSION INFO!"
|
call "%~d0%~p0\_error.bat" "FAILD TO READ VERSION INFO!"
|
||||||
GOTO:EOF
|
GOTO:EOF
|
||||||
)
|
)
|
||||||
REM ------------------------------------------
|
REM ------------------------------------------
|
||||||
@ -73,11 +77,11 @@ del "%OUT_FILE%.exe"
|
|||||||
del "%OUT_FILE%.zip"
|
del "%OUT_FILE%.zip"
|
||||||
REM ------------------------------------------
|
REM ------------------------------------------
|
||||||
if exist "%OUT_FILE%.exe" (
|
if exist "%OUT_FILE%.exe" (
|
||||||
call _error.bat "FAILD TO DELET EXISTING FILE"
|
call "%~d0%~p0\_error.bat" "FAILD TO DELET EXISTING FILE"
|
||||||
GOTO:EOF
|
GOTO:EOF
|
||||||
)
|
)
|
||||||
if exist "%OUT_FILE%.zip" (
|
if exist "%OUT_FILE%.zip" (
|
||||||
call _error.bat "FAILD TO DELET EXISTING FILE"
|
call "%~d0%~p0\_error.bat" "FAILD TO DELET EXISTING FILE"
|
||||||
GOTO:EOF
|
GOTO:EOF
|
||||||
)
|
)
|
||||||
REM ------------------------------------------
|
REM ------------------------------------------
|
||||||
@ -103,31 +107,31 @@ for %%f in ("%TMP_PATH%\*.dll") do (
|
|||||||
"%PATH_UPXBIN%\upx.exe" --best "%%f"
|
"%PATH_UPXBIN%\upx.exe" --best "%%f"
|
||||||
)
|
)
|
||||||
REM ------------------------------------------
|
REM ------------------------------------------
|
||||||
if exist _postproc.bat (
|
if exist "%~d0%~p0\_postproc.bat" (
|
||||||
call _postproc.bat "%TMP_PATH%"
|
call "%~d0%~p0\_postproc.bat" "%TMP_PATH%"
|
||||||
)
|
)
|
||||||
REM ------------------------------------------
|
REM ------------------------------------------
|
||||||
if "%LAMEXP_REDIST%"=="1" (
|
if "%LAMEXP_REDIST%"=="1" (
|
||||||
copy "..\Redist\*.*" "%TMP_PATH%"
|
copy "..\Redist\*.*" "%TMP_PATH%"
|
||||||
)
|
)
|
||||||
copy "..\..\ReadMe.txt" "%TMP_PATH%"
|
copy "%~d0%~p0\..\..\ReadMe.txt" "%TMP_PATH%"
|
||||||
copy "..\..\License.txt" "%TMP_PATH%"
|
copy "%~d0%~p0\..\..\License.txt" "%TMP_PATH%"
|
||||||
copy "..\..\doc\Changelog.html" "%TMP_PATH%"
|
copy "%~d0%~p0\..\..\doc\Changelog.html" "%TMP_PATH%"
|
||||||
copy "..\..\doc\Translate.html" "%TMP_PATH%"
|
copy "%~d0%~p0\..\..\doc\Translate.html" "%TMP_PATH%"
|
||||||
copy "..\..\doc\FAQ.html" "%TMP_PATH%"
|
copy "%~d0%~p0\..\..\doc\FAQ.html" "%TMP_PATH%"
|
||||||
REM ------------------------------------------
|
REM ------------------------------------------
|
||||||
REM :: CREATE PACKAGES ::
|
REM :: CREATE PACKAGES ::
|
||||||
REM ------------------------------------------
|
REM ------------------------------------------
|
||||||
"%PATH_SEVENZ%\7z.exe" a -tzip -r "%OUT_FILE%.zip" "%TMP_PATH%\*"
|
"%PATH_SEVENZ%\7z.exe" a -tzip -r "%OUT_FILE%.zip" "%TMP_PATH%\*"
|
||||||
"%PATH_MKNSIS%\makensis.exe" "/DLAMEXP_SOURCE_PATH=%TMP_PATH%" "/DLAMEXP_OUTPUT_FILE=%OUT_FILE%.exe" "/DLAMEXP_UPX_PATH=%PATH_UPXBIN%" "/DLAMEXP_DATE=%OUT_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%" "..\NSIS\setup.nsi"
|
"%PATH_MKNSIS%\makensis.exe" "/DLAMEXP_SOURCE_PATH=%TMP_PATH%" "/DLAMEXP_OUTPUT_FILE=%OUT_FILE%.exe" "/DLAMEXP_UPX_PATH=%PATH_UPXBIN%" "/DLAMEXP_DATE=%OUT_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%" "%~d0%~p0\..\NSIS\setup.nsi"
|
||||||
rd /S /Q "%TMP_PATH%"
|
rd /S /Q "%TMP_PATH%"
|
||||||
REM ------------------------------------------
|
REM ------------------------------------------
|
||||||
if not exist "%OUT_FILE%.zip" (
|
if not exist "%OUT_FILE%.zip" (
|
||||||
call _error.bat "PACKAGING HAS FAILED"
|
call "%~d0%~p0\_error.bat" "PACKAGING HAS FAILED"
|
||||||
GOTO:EOF
|
GOTO:EOF
|
||||||
)
|
)
|
||||||
if not exist "%OUT_FILE%.exe" (
|
if not exist "%OUT_FILE%.exe" (
|
||||||
call _error.bat "PACKAGING HAS FAILED"
|
call "%~d0%~p0\_error.bat" "PACKAGING HAS FAILED"
|
||||||
GOTO:EOF
|
GOTO:EOF
|
||||||
)
|
)
|
||||||
REM ------------------------------------------
|
REM ------------------------------------------
|
||||||
|
@ -3,7 +3,7 @@ set "LAMEXP_ERROR=1"
|
|||||||
echo ----------------------------------------------------------------
|
echo ----------------------------------------------------------------
|
||||||
echo Updating Translation files
|
echo Updating Translation files
|
||||||
echo ----------------------------------------------------------------
|
echo ----------------------------------------------------------------
|
||||||
call _paths.bat
|
call "%~d0%~p0\_paths.bat"
|
||||||
if not "%LAMEXP_ERROR%"=="0" GOTO:EOF
|
if not "%LAMEXP_ERROR%"=="0" GOTO:EOF
|
||||||
REM -----------------------------------------------------------------
|
REM -----------------------------------------------------------------
|
||||||
call "%PATH_MSVC90%\VC\bin\vcvars32.bat" x86
|
call "%PATH_MSVC90%\VC\bin\vcvars32.bat" x86
|
||||||
@ -14,25 +14,25 @@ set "LST_FILE=%TEMP%\~list.%DATE:~6,4%-%DATE:~3,2%-%DATE:~0,2%.lst"
|
|||||||
echo %LST_FILE%
|
echo %LST_FILE%
|
||||||
REM -----------------------------------------------------------------
|
REM -----------------------------------------------------------------
|
||||||
del "%LST_FILE%" 2> NUL
|
del "%LST_FILE%" 2> NUL
|
||||||
for %%f in (..\..\gui\*.ui) do (
|
for %%f in ("%~d0%~p0\..\..\gui\*.ui") do (
|
||||||
echo %%f >> "%LST_FILE%"
|
echo %%f >> "%LST_FILE%"
|
||||||
)
|
)
|
||||||
for %%f in (..\..\src\*.cpp) do (
|
for %%f in ("%~d0%~p0\..\..\src\*.cpp") do (
|
||||||
echo %%f >> "%LST_FILE%"
|
echo %%f >> "%LST_FILE%"
|
||||||
)
|
)
|
||||||
for %%f in (..\..\src\*.h) do (
|
for %%f in ("%~d0%~p0\..\..\src\*.h") do (
|
||||||
echo %%f >> "%LST_FILE%"
|
echo %%f >> "%LST_FILE%"
|
||||||
)
|
)
|
||||||
REM -----------------------------------------------------------------
|
REM -----------------------------------------------------------------
|
||||||
for %%f in (..\Translation\*.ts) do (
|
for %%f in ("%~d0%~p0\..\Translation\*.ts") do (
|
||||||
del %%f.bak 2> NUL
|
del %%f.bak 2> NUL
|
||||||
copy %%f %%f.bak
|
copy %%f %%f.bak
|
||||||
lupdate.exe "@%LST_FILE%" -no-obsolete -ts %%f
|
lupdate.exe "@%LST_FILE%" -no-obsolete -ts %%f
|
||||||
)
|
)
|
||||||
del "%LST_FILE%"
|
del "%LST_FILE%"
|
||||||
echo ----------------------------------------------------------------
|
echo ----------------------------------------------------------------
|
||||||
for %%f in (..\Translation\LameXP_??.ts) do (
|
for %%f in ("%~d0%~p0\..\Translation\LameXP_??.ts") do (
|
||||||
lrelease.exe %%f -qm ..\..\res\localization\%%~nf.qm
|
lrelease.exe %%f -qm "%~d0%~p0\..\..\res\localization\%%~nf.qm"
|
||||||
)
|
)
|
||||||
echo ----------------------------------------------------------------
|
echo ----------------------------------------------------------------
|
||||||
set "LST_FILE="
|
set "LST_FILE="
|
||||||
|
@ -62,6 +62,6 @@ if not exist "%PATH_QTMSVC%\bin\moc.exe" GOTO:EOF
|
|||||||
if not exist "%PATH_QTMSVC%\bin\rcc.exe" GOTO:EOF
|
if not exist "%PATH_QTMSVC%\bin\rcc.exe" GOTO:EOF
|
||||||
if not exist "%PATH_GNUPG1%\gpg.exe" GOTO:EOF
|
if not exist "%PATH_GNUPG1%\gpg.exe" GOTO:EOF
|
||||||
if not exist "%PATH_GNUPG1%\gpg.exe" GOTO:EOF
|
if not exist "%PATH_GNUPG1%\gpg.exe" GOTO:EOF
|
||||||
if not exist "%PATH_VCPROJ%" GOTO:EOF
|
if not exist "%~d0%~p0\..\..\%PATH_VCPROJ%" GOTO:EOF
|
||||||
REM ------------------------------------------
|
REM ------------------------------------------
|
||||||
set "LAMEXP_ERROR=0"
|
set "LAMEXP_ERROR=0"
|
||||||
|
@ -8,7 +8,7 @@ set "VER_LAMEXP_BUILD="
|
|||||||
set "VER_LAMEXP_TYPE="
|
set "VER_LAMEXP_TYPE="
|
||||||
set "VER_LAMEXP_PATCH="
|
set "VER_LAMEXP_PATCH="
|
||||||
REM ------------------------------------------
|
REM ------------------------------------------
|
||||||
for /f "tokens=2,*" %%s in (..\..\src\Config.h) do (
|
for /f "tokens=2,*" %%s in (%~d0%~p0\..\..\src\Config.h) do (
|
||||||
if "%%s"=="VER_LAMEXP_MAJOR" set "VER_LAMEXP_MAJOR=%%~t"
|
if "%%s"=="VER_LAMEXP_MAJOR" set "VER_LAMEXP_MAJOR=%%~t"
|
||||||
if "%%s"=="VER_LAMEXP_MINOR_HI" set "VER_LAMEXP_MINOR_HI=%%~t"
|
if "%%s"=="VER_LAMEXP_MINOR_HI" set "VER_LAMEXP_MINOR_HI=%%~t"
|
||||||
if "%%s"=="VER_LAMEXP_MINOR_LO" set "VER_LAMEXP_MINOR_LO=%%~t"
|
if "%%s"=="VER_LAMEXP_MINOR_LO" set "VER_LAMEXP_MINOR_LO=%%~t"
|
||||||
|
@ -5,4 +5,4 @@
|
|||||||
#define PATH_MSVC90 "C:\Program Files\Microsoft Visual Studio 9.0"
|
#define PATH_MSVC90 "C:\Program Files\Microsoft Visual Studio 9.0"
|
||||||
#define PATH_QTMSVC "C:\Qt\4.7.2"
|
#define PATH_QTMSVC "C:\Qt\4.7.2"
|
||||||
#define PATH_GNUPG1 "C:\Program Files\GNU\GnuPG"
|
#define PATH_GNUPG1 "C:\Program Files\GNU\GnuPG"
|
||||||
#define PATH_VCPROJ "..\..\LameXP_VS2008.sln"
|
#define PATH_VCPROJ "LameXP_VS2008.sln"
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
@echo off
|
@echo off
|
||||||
set "LAMEXP_CONFIG=Debug"
|
set "LAMEXP_CONFIG=Debug"
|
||||||
call _deploy.bat
|
call "%~d0%~p0\_deploy.bat"
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
@echo off
|
@echo off
|
||||||
set "LAMEXP_CONFIG=Release"
|
set "LAMEXP_CONFIG=Release"
|
||||||
call _deploy.bat
|
call "%~d0%~p0\_deploy.bat"
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
@echo off
|
@echo off
|
||||||
set "LAMEXP_CONFIG=Release_Static"
|
set "LAMEXP_CONFIG=Release_Static"
|
||||||
set "LAMEXP_REDIST=0"
|
set "LAMEXP_REDIST=0"
|
||||||
call _deploy.bat
|
call "%~d0%~p0\_deploy.bat"
|
||||||
|
Loading…
Reference in New Issue
Block a user