diff --git a/etc/Deployment/_build.bat b/etc/Deployment/_build.bat index 757b61eb..1a9c63d0 100644 --- a/etc/Deployment/_build.bat +++ b/etc/Deployment/_build.bat @@ -4,7 +4,7 @@ echo ---------------------------------------------------------------- echo Solution File: %1 echo Configuration: %~2 echo ---------------------------------------------------------------- -call _paths.bat +call "%~d0%~p0\_paths.bat" if not "%LAMEXP_ERROR%"=="0" GOTO:EOF REM ----------------------------------------------------------------- call "%PATH_MSVC90%\VC\bin\vcvars32.bat" x86 diff --git a/etc/Deployment/_deploy.bat b/etc/Deployment/_deploy.bat index 6ed4bbde..f8a25c5d 100644 --- a/etc/Deployment/_deploy.bat +++ b/etc/Deployment/_deploy.bat @@ -3,9 +3,9 @@ setlocal ENABLEDELAYEDEXPANSION REM ------------------------------------------ REM :: SETUP ENVIRONMENT :: REM ------------------------------------------ -call _paths.bat +call "%~d0%~p0\_paths.bat" 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 ) REM ------------------------------------------ @@ -18,13 +18,16 @@ if not "%LAMEXP_REDIST%"=="0" ( REM ------------------------------------------ REM :: SETUP PATHS :: 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 "TMP_PATH=%TEMP%\~LameXP.%LAMEXP_CONFIG%.%OUT_DATE%.tmp" -set "OBJ_PATH=..\..\obj\%LAMEXP_CONFIG%" -set "MOC_PATH=..\..\tmp" +set "OBJ_PATH=%~d0%~p0\..\..\obj\%LAMEXP_CONFIG%" +set "MOC_PATH=%~d0%~p0\..\..\tmp" +set "IPC_PATH=%~d0%~p0\..\..\ipch" REM ------------------------------------------ -REM goto SkipBuildThisTime +if "%LAMEXP_SKIP_BUILD%"=="YES" ( + goto SkipBuildThisTime +) REM ------------------------------------------ REM :: CLEAN UP :: REM ------------------------------------------ @@ -41,23 +44,24 @@ del /Q "%OBJ_PATH%\*.htm" del /Q "%OBJ_PATH%\*.dep" del /Q "%MOC_PATH%\*.cpp" del /Q "%MOC_PATH%\*.h" +del /Q /S "%IPC_PATH%\*.*" REM ------------------------------------------ REM :: BUILD BINARIES :: REM ------------------------------------------ -call _lupdate.bat -call _build.bat "%PATH_VCPROJ%" "%LAMEXP_CONFIG%" +call "%~d0%~p0\_lupdate.bat" +call "%~d0%~p0\_build.bat" "%~d0%~p0\..\..\%PATH_VCPROJ%" "%LAMEXP_CONFIG%" if not "%LAMEXP_ERROR%"=="0" ( - call _error.bat "BUILD HAS FAILED" + call "%~d0%~p0\_error.bat" "BUILD HAS FAILED" GOTO:EOF ) REM ------------------------------------------ -REM :SkipBuildThisTime +:SkipBuildThisTime REM ------------------------------------------ REM :: READ VERSION INFO :: REM ------------------------------------------ -call _version.bat +call "%~d0%~p0\_version.bat" 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 ) REM ------------------------------------------ @@ -73,11 +77,11 @@ del "%OUT_FILE%.exe" del "%OUT_FILE%.zip" REM ------------------------------------------ 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 ) 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 ) REM ------------------------------------------ @@ -103,31 +107,31 @@ for %%f in ("%TMP_PATH%\*.dll") do ( "%PATH_UPXBIN%\upx.exe" --best "%%f" ) REM ------------------------------------------ -if exist _postproc.bat ( - call _postproc.bat "%TMP_PATH%" +if exist "%~d0%~p0\_postproc.bat" ( + call "%~d0%~p0\_postproc.bat" "%TMP_PATH%" ) REM ------------------------------------------ if "%LAMEXP_REDIST%"=="1" ( copy "..\Redist\*.*" "%TMP_PATH%" ) -copy "..\..\ReadMe.txt" "%TMP_PATH%" -copy "..\..\License.txt" "%TMP_PATH%" -copy "..\..\doc\Changelog.html" "%TMP_PATH%" -copy "..\..\doc\Translate.html" "%TMP_PATH%" -copy "..\..\doc\FAQ.html" "%TMP_PATH%" +copy "%~d0%~p0\..\..\ReadMe.txt" "%TMP_PATH%" +copy "%~d0%~p0\..\..\License.txt" "%TMP_PATH%" +copy "%~d0%~p0\..\..\doc\Changelog.html" "%TMP_PATH%" +copy "%~d0%~p0\..\..\doc\Translate.html" "%TMP_PATH%" +copy "%~d0%~p0\..\..\doc\FAQ.html" "%TMP_PATH%" REM ------------------------------------------ REM :: CREATE PACKAGES :: REM ------------------------------------------ "%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%" REM ------------------------------------------ if not exist "%OUT_FILE%.zip" ( - call _error.bat "PACKAGING HAS FAILED" + call "%~d0%~p0\_error.bat" "PACKAGING HAS FAILED" GOTO:EOF ) if not exist "%OUT_FILE%.exe" ( - call _error.bat "PACKAGING HAS FAILED" + call "%~d0%~p0\_error.bat" "PACKAGING HAS FAILED" GOTO:EOF ) REM ------------------------------------------ diff --git a/etc/Deployment/_lupdate.bat b/etc/Deployment/_lupdate.bat index c380d4e6..5813c304 100644 --- a/etc/Deployment/_lupdate.bat +++ b/etc/Deployment/_lupdate.bat @@ -3,7 +3,7 @@ set "LAMEXP_ERROR=1" echo ---------------------------------------------------------------- echo Updating Translation files echo ---------------------------------------------------------------- -call _paths.bat +call "%~d0%~p0\_paths.bat" if not "%LAMEXP_ERROR%"=="0" GOTO:EOF REM ----------------------------------------------------------------- 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% REM ----------------------------------------------------------------- del "%LST_FILE%" 2> NUL -for %%f in (..\..\gui\*.ui) do ( +for %%f in ("%~d0%~p0\..\..\gui\*.ui") do ( echo %%f >> "%LST_FILE%" ) -for %%f in (..\..\src\*.cpp) do ( +for %%f in ("%~d0%~p0\..\..\src\*.cpp") do ( echo %%f >> "%LST_FILE%" ) -for %%f in (..\..\src\*.h) do ( +for %%f in ("%~d0%~p0\..\..\src\*.h") do ( echo %%f >> "%LST_FILE%" ) REM ----------------------------------------------------------------- -for %%f in (..\Translation\*.ts) do ( +for %%f in ("%~d0%~p0\..\Translation\*.ts") do ( del %%f.bak 2> NUL copy %%f %%f.bak lupdate.exe "@%LST_FILE%" -no-obsolete -ts %%f ) del "%LST_FILE%" echo ---------------------------------------------------------------- -for %%f in (..\Translation\LameXP_??.ts) do ( - lrelease.exe %%f -qm ..\..\res\localization\%%~nf.qm +for %%f in ("%~d0%~p0\..\Translation\LameXP_??.ts") do ( + lrelease.exe %%f -qm "%~d0%~p0\..\..\res\localization\%%~nf.qm" ) echo ---------------------------------------------------------------- set "LST_FILE=" diff --git a/etc/Deployment/_paths.bat b/etc/Deployment/_paths.bat index 44915e89..7e027919 100644 --- a/etc/Deployment/_paths.bat +++ b/etc/Deployment/_paths.bat @@ -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_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 ------------------------------------------ set "LAMEXP_ERROR=0" diff --git a/etc/Deployment/_version.bat b/etc/Deployment/_version.bat index 5c78a6dd..da8dae0f 100644 --- a/etc/Deployment/_version.bat +++ b/etc/Deployment/_version.bat @@ -8,7 +8,7 @@ set "VER_LAMEXP_BUILD=" set "VER_LAMEXP_TYPE=" set "VER_LAMEXP_PATCH=" 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_MINOR_HI" set "VER_LAMEXP_MINOR_HI=%%~t" if "%%s"=="VER_LAMEXP_MINOR_LO" set "VER_LAMEXP_MINOR_LO=%%~t" diff --git a/etc/Deployment/buildenv.template.txt b/etc/Deployment/buildenv.template.txt index 1a7898a9..139435e5 100644 --- a/etc/Deployment/buildenv.template.txt +++ b/etc/Deployment/buildenv.template.txt @@ -5,4 +5,4 @@ #define PATH_MSVC90 "C:\Program Files\Microsoft Visual Studio 9.0" #define PATH_QTMSVC "C:\Qt\4.7.2" #define PATH_GNUPG1 "C:\Program Files\GNU\GnuPG" -#define PATH_VCPROJ "..\..\LameXP_VS2008.sln" +#define PATH_VCPROJ "LameXP_VS2008.sln" diff --git a/etc/Deployment/debug.bat b/etc/Deployment/debug.bat index 06b4f7bc..82e67b6e 100644 --- a/etc/Deployment/debug.bat +++ b/etc/Deployment/debug.bat @@ -1,3 +1,3 @@ @echo off set "LAMEXP_CONFIG=Debug" -call _deploy.bat +call "%~d0%~p0\_deploy.bat" diff --git a/etc/Deployment/release.bat b/etc/Deployment/release.bat index 393a49c7..9ba1ac85 100644 --- a/etc/Deployment/release.bat +++ b/etc/Deployment/release.bat @@ -1,3 +1,3 @@ @echo off set "LAMEXP_CONFIG=Release" -call _deploy.bat +call "%~d0%~p0\_deploy.bat" diff --git a/etc/Deployment/release_static.bat b/etc/Deployment/release_static.bat index 088e7266..57e905b1 100644 --- a/etc/Deployment/release_static.bat +++ b/etc/Deployment/release_static.bat @@ -1,4 +1,4 @@ @echo off set "LAMEXP_CONFIG=Release_Static" set "LAMEXP_REDIST=0" -call _deploy.bat +call "%~d0%~p0\_deploy.bat"