2014-09-06 17:30:03 -04:00
|
|
|
@echo off
|
|
|
|
|
|
|
|
setlocal
|
|
|
|
|
|
|
|
:: Modify variable when makensis.exe doesn't exist in PATH
|
|
|
|
set NSIS_EXE=makensis.exe
|
|
|
|
|
|
|
|
:: Needed environment variables
|
|
|
|
set SourceDir=%~dp0..\..
|
|
|
|
::set ReleaseDir=
|
|
|
|
::set QtDir=
|
|
|
|
::set MinGWDir=
|
|
|
|
|
|
|
|
:: Optional environment variables
|
|
|
|
::set OutDir=
|
|
|
|
|
|
|
|
:: Build defines for script
|
|
|
|
set NSIS_PARAM=
|
|
|
|
|
|
|
|
if "%SourceDir%" NEQ "" set NSIS_PARAM=%NSIS_PARAM% /DSOURCEDIR="%SourceDir%"
|
|
|
|
if "%ReleaseDir%" NEQ "" set NSIS_PARAM=%NSIS_PARAM% /DRELEASEDIR="%ReleaseDir%"
|
|
|
|
if "%QtDir%" NEQ "" set NSIS_PARAM=%NSIS_PARAM% /DQTDIR="%QtDir%"
|
|
|
|
if "%MinGWDir%" NEQ "" set NSIS_PARAM=%NSIS_PARAM% /DMINGWDIR="%MinGWDir%"
|
|
|
|
if "%OutDir%" NEQ "" set NSIS_PARAM=%NSIS_PARAM% /DOUTDIR="%OutDir%"
|
|
|
|
|
|
|
|
:: Scan version from source
|
2015-08-04 13:02:13 -04:00
|
|
|
set Revision=
|
2015-01-14 18:26:51 -05:00
|
|
|
set BuildAdd=
|
2015-08-04 13:02:13 -04:00
|
|
|
call "%~dp0GetRsVersion.bat" RS_REVISION_STRING Revision
|
|
|
|
if errorlevel 1 goto exit
|
|
|
|
call "%~dp0GetRsVersion.bat" RS_BUILD_NUMBER_ADD BuildAdd
|
|
|
|
if errorlevel 1 goto exit
|
2014-09-06 17:30:03 -04:00
|
|
|
|
2015-08-04 13:02:13 -04:00
|
|
|
if "%Revision%"=="" (
|
2014-09-06 17:30:03 -04:00
|
|
|
echo.
|
2016-02-06 13:18:22 -05:00
|
|
|
echo Version not found
|
2015-08-04 13:02:13 -04:00
|
|
|
goto exit
|
2014-09-06 17:30:03 -04:00
|
|
|
)
|
|
|
|
|
2015-08-04 13:02:13 -04:00
|
|
|
set NSIS_PARAM=%NSIS_PARAM% /DREVISION=%Revision% /DBUILDADD=%BuildAdd%
|
2014-09-06 17:30:03 -04:00
|
|
|
|
|
|
|
:: Create installer
|
|
|
|
"%NSIS_EXE%" %NSIS_PARAM% "%~dp0retroshare.nsi"
|
|
|
|
|
|
|
|
:exit
|
|
|
|
endlocal
|