2014-11-12 20:18:00 +00:00
|
|
|
@echo OFF
|
|
|
|
|
2015-02-09 23:29:02 +00:00
|
|
|
set "AppVersionStrSmall=0.7.13"
|
|
|
|
set "AppVersionStr=0.7.13"
|
|
|
|
set "AppVersionStrFull=0.7.13.0"
|
|
|
|
set "DevChannel=0"
|
2015-02-05 14:49:50 +00:00
|
|
|
|
|
|
|
if %DevChannel% neq 0 goto preparedev
|
|
|
|
|
|
|
|
set "DevPostfix="
|
|
|
|
set "DevParam="
|
|
|
|
goto devprepared
|
|
|
|
|
|
|
|
:preparedev
|
|
|
|
|
|
|
|
set "DevPostfix=.dev"
|
|
|
|
set "DevParam=-dev"
|
|
|
|
|
|
|
|
:devprepared
|
2014-11-22 10:23:30 +00:00
|
|
|
|
2014-11-12 20:18:00 +00:00
|
|
|
echo.
|
2015-02-05 14:49:50 +00:00
|
|
|
echo Preparing version %AppVersionStr%%DevPostfix%..
|
2014-11-12 20:18:00 +00:00
|
|
|
echo.
|
|
|
|
|
|
|
|
set "PATH=%PATH%;C:\Program Files\7-Zip;C:\Program Files (x86)\Inno Setup 5"
|
2014-07-15 06:00:54 +00:00
|
|
|
cd ..\Win32\Deploy
|
2014-11-12 20:18:00 +00:00
|
|
|
|
|
|
|
call ..\..\..\TelegramPrivate\Sign.bat Telegram.exe
|
|
|
|
if %errorlevel% neq 0 goto error1
|
|
|
|
|
|
|
|
call ..\..\..\TelegramPrivate\Sign.bat Updater.exe
|
|
|
|
if %errorlevel% neq 0 goto error1
|
|
|
|
|
2015-02-05 14:49:50 +00:00
|
|
|
iscc /dMyAppVersion=%AppVersionStrSmall% /dMyAppVersionZero=%AppVersionStr% /dMyAppFullVersion=%AppVersionStrFull% /dMyAppVersionForExe=%AppVersionStr%%DevPostfix% ..\..\Telegram\Setup.iss
|
2014-11-12 20:18:00 +00:00
|
|
|
if %errorlevel% neq 0 goto error1
|
|
|
|
|
2015-02-05 14:49:50 +00:00
|
|
|
call ..\..\..\TelegramPrivate\Sign.bat tsetup.%AppVersionStr%%DevPostfix%.exe
|
2014-11-12 20:18:00 +00:00
|
|
|
if %errorlevel% neq 0 goto error1
|
|
|
|
|
2015-02-05 14:49:50 +00:00
|
|
|
call Prepare.exe -path Telegram.exe -path Updater.exe %DevParam%
|
2014-11-12 20:18:00 +00:00
|
|
|
if %errorlevel% neq 0 goto error1
|
|
|
|
|
2015-02-05 14:49:50 +00:00
|
|
|
cd deploy\%AppVersionStr%%DevPostfix%
|
2014-11-12 20:18:00 +00:00
|
|
|
mkdir Telegram
|
|
|
|
move Telegram.exe Telegram\
|
2015-02-05 14:49:50 +00:00
|
|
|
7z a -mx9 tportable.%AppVersionStr%%DevPostfix%.zip Telegram\
|
2014-11-12 20:18:00 +00:00
|
|
|
if %errorlevel% neq 0 goto error2
|
|
|
|
|
|
|
|
echo .
|
2015-02-05 14:49:50 +00:00
|
|
|
echo Version %AppVersionStr%%DevPostfix% is ready for deploy!
|
2014-11-12 20:18:00 +00:00
|
|
|
echo .
|
|
|
|
|
|
|
|
cd ..\..\..\..\Telegram
|
|
|
|
goto eof
|
|
|
|
|
|
|
|
:error2
|
|
|
|
cd ..\..
|
|
|
|
:error1
|
2014-07-15 06:00:54 +00:00
|
|
|
cd ..\..\Telegram
|
2014-11-12 20:18:00 +00:00
|
|
|
echo ERROR occured!
|
|
|
|
exit /b %errorlevel%
|
|
|
|
|
|
|
|
:eof
|