2014-11-12 20:18:00 +00:00
|
|
|
@echo OFF
|
|
|
|
|
2015-04-30 23:05:19 +00:00
|
|
|
set "AppVersion=8010"
|
|
|
|
set "AppVersionStrSmall=0.8.10"
|
|
|
|
set "AppVersionStr=0.8.10"
|
|
|
|
set "AppVersionStrFull=0.8.10.0"
|
2015-04-30 13:53:36 +00:00
|
|
|
set "DevChannel=1"
|
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.
|
|
|
|
|
2015-02-18 16:52:04 +00:00
|
|
|
if exist ..\Win32\Deploy\deploy\%AppVersionStr%\ goto error_exist1
|
|
|
|
if exist ..\Win32\Deploy\deploy\%AppVersionStr%.dev\ goto error_exist2
|
|
|
|
if exist ..\Win32\Deploy\tupdate%AppVersion% goto error_exist3
|
|
|
|
|
2014-11-12 20:18:00 +00:00
|
|
|
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-18 16:52:04 +00:00
|
|
|
call Packer.exe -version %AppVersion% -path Telegram.exe -path Updater.exe %DevParam%
|
2014-11-12 20:18:00 +00:00
|
|
|
if %errorlevel% neq 0 goto error1
|
|
|
|
|
2015-02-18 16:52:04 +00:00
|
|
|
if not exist deploy mkdir deploy
|
|
|
|
mkdir deploy\%AppVersionStr%%DevPostfix%
|
|
|
|
mkdir deploy\%AppVersionStr%%DevPostfix%\Telegram
|
|
|
|
|
|
|
|
move Telegram.exe deploy\%AppVersionStr%%DevPostfix%\Telegram\
|
|
|
|
move Updater.exe deploy\%AppVersionStr%%DevPostfix%\
|
|
|
|
move Telegram.pdb deploy\%AppVersionStr%%DevPostfix%\
|
|
|
|
move Updater.pdb deploy\%AppVersionStr%%DevPostfix%\
|
|
|
|
move tsetup.%AppVersionStr%%DevPostfix%.exe deploy\%AppVersionStr%%DevPostfix%\
|
|
|
|
move tupdate%AppVersion% deploy\%AppVersionStr%%DevPostfix%\
|
|
|
|
|
2015-02-05 14:49:50 +00:00
|
|
|
cd deploy\%AppVersionStr%%DevPostfix%
|
|
|
|
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%
|
|
|
|
|
2015-02-18 16:52:04 +00:00
|
|
|
:error_exist1
|
|
|
|
echo Deploy folder for version %AppVersionStr% already exists!
|
|
|
|
exit /b 1
|
|
|
|
|
|
|
|
:error_exist2
|
|
|
|
echo Deploy folder for version %AppVersionStr%.dev already exists!
|
|
|
|
exit /b 1
|
|
|
|
|
|
|
|
:error_exist3
|
|
|
|
echo Update file for version %AppVersion% already exists!
|
|
|
|
exit /b 1
|
|
|
|
|
2014-11-12 20:18:00 +00:00
|
|
|
:eof
|