diff --git a/.gitignore b/.gitignore index 22e5fc55f..bfc3d5081 100644 --- a/.gitignore +++ b/.gitignore @@ -18,6 +18,7 @@ /Telegram/Resources/art/sprite_150x.png /Telegram/*.user *.vcxproj* +*.sln *.suo *.sdf *.opensdf diff --git a/Telegram/gyp/utils.gyp b/Telegram/gyp/utils.gyp index a4eb2c588..1ff4110b7 100644 --- a/Telegram/gyp/utils.gyp +++ b/Telegram/gyp/utils.gyp @@ -23,6 +23,7 @@ 'variables': { 'libs_loc': '../../../Libraries', 'src_loc': '../SourceFiles', + 'res_loc': '../Resources', }, 'includes': [ 'common_executable.gypi', @@ -38,7 +39,7 @@ '<(src_loc)/_other/updater_osx.m', ], 'conditions': [ - [ '<(build_win)', { + [ 'build_win', { 'sources': [ '<(res_loc)/winrc/Updater.rc', ], diff --git a/doc/building-msvc.md b/doc/building-msvc.md index ec67b58d6..b532b6412 100644 --- a/doc/building-msvc.md +++ b/doc/building-msvc.md @@ -244,7 +244,6 @@ and run ..\depot_tools\gclient sync xcopy src\src\* src /s /i - #### Build * Open in VS2015 **D:\TBuild\Libraries\breakpad\src\client\windows\breakpad_client.sln** @@ -255,10 +254,33 @@ and run ## Building Telegram Desktop +#### Setup GYP/Ninja and generate VS solution + +* Download [Ninja binaries](https://github.com/ninja-build/ninja/releases/download/v1.7.1/ninja-win.zip) and unpack them to **D:\\TBuild\\Libraries\\ninja** to have **D:\\TBuild\\Libraries\\ninja\\ninja.exe** +* Open **VS2015 x86 Native Tools Command Prompt.bat** (should be in **Start Menu > Programs > Visual Studio 2015** menu folder) + +There go to Libraries directory + + D: + cd TBuild\Libraries + +and run + + git clone https://chromium.googlesource.com/external/gyp + SET PATH=%PATH%;D:\TBuild\Libraries\gyp;D:\TBuild\Libraries\ninja; + cd ..\tdesktop\Telegram + gyp\refresh.bat + +#### Configure VS + * Launch VS2015 for configuring Qt5Package * QT5 > Qt Options > Add * Version name: **Qt 5.6.0 Win32** * Path: **D:\TBuild\Libraries\qt5_6_0\qtbase** * Default Qt/Win version: **Qt 5.6.0 Win32** – **OK** - You may need to restart Visual Studio for this to take effect. + +#### Build the project + * File > Open > Project/Solution > **D:\TBuild\tdesktop\Telegram.sln** -* Build \ Build Solution (Debug and Release configurations) +* Select Telegram project and press Build > Build Telegram (Debug and Release configurations) +* The result Telegram.exe will be located in **D:\TBuild\tdesktop\out\Debug** (and **Release**)