fix: update instructions

fix: update submodules
This commit is contained in:
ZavaruKitsu 2023-08-11 16:15:53 +00:00
parent e5ff26b2eb
commit ec91c772b3
7 changed files with 19 additions and 138 deletions

View file

@ -1250,12 +1250,13 @@ void Updater::start(bool forceWait) {
&_httpImplementation,
std::make_unique<HttpChecker>(_testing));
// AyuGram: removed
if (false) {
startImplementation(
&_mtpImplementation,
std::make_unique<MtpChecker>(_session, _testing));
}
// AyuGram: removed
if (false)
{
startImplementation(
&_mtpImplementation,
std::make_unique<MtpChecker>(_session, _testing));
}
_checking.fire({});
} else {

@ -1 +1 @@
Subproject commit 74dc0054b6190af1f49b0505e59a6c722e8852c5
Subproject commit 7f6b5cf3b68f08ca64aa7416bb56f64cd6171c06

View file

@ -4,41 +4,39 @@
Choose a folder for the future build, for example **/home/user/TBuild**. It will be named ***BuildPath*** in the rest of this document. All commands will be launched from Terminal.
### Obtain your API credentials
You will require **api_id** and **api_hash** to access the Telegram API servers. To learn how to obtain them [click here][api_credentials].
### Clone source code and prepare libraries
Install [poetry](https://python-poetry.org), go to ***BuildPath*** and run
git clone --recursive https://github.com/telegramdesktop/tdesktop.git
git clone --recursive https://github.com/AyuGram/AyuGramDesktop.git tdesktop
./tdesktop/Telegram/build/prepare/linux.sh
### Building the project
Go to ***BuildPath*/tdesktop** and run (using [your **api_id** and **api_hash**](#obtain-your-api-credentials))
Go to ***BuildPath*/tdesktop** and run
docker run --rm -it \
-v $PWD:/usr/src/tdesktop \
tdesktop:centos_env \
/usr/src/tdesktop/Telegram/build/docker/centos_env/build.sh \
-D TDESKTOP_API_ID=YOUR_API_ID \
-D TDESKTOP_API_HASH=YOUR_API_HASH
-D TDESKTOP_API_ID=2040 \
-D TDESKTOP_API_HASH=b18441a1ff607e10a989891a5462e627 \
-D CMAKE_INTERPROCEDURAL_OPTIMIZATION=ON
Or, to create a debug build, run (also using [your **api_id** and **api_hash**](#obtain-your-api-credentials))
Or, to create a debug build, run
docker run --rm -it \
-v $PWD:/usr/src/tdesktop \
-e DEBUG=1 \
tdesktop:centos_env \
/usr/src/tdesktop/Telegram/build/docker/centos_env/build.sh \
-D TDESKTOP_API_ID=YOUR_API_ID \
-D TDESKTOP_API_HASH=YOUR_API_HASH
-D TDESKTOP_API_ID=2040 \
-D TDESKTOP_API_HASH=b18441a1ff607e10a989891a5462e627 \
-D CMAKE_INTERPROCEDURAL_OPTIMIZATION=ON
If you need a backward compatible binary (running on older OS like the official one), you should build the binary with LTO.
To do this, add `-D CMAKE_INTERPROCEDURAL_OPTIMIZATION=ON` option.
The built files will be in the `out` directory.
[api_credentials]: api_credentials.md
You can use `strip` command to reduce binary size.

View file

@ -1,31 +0,0 @@
## Build instructions for macOS
### Prepare folder
Choose a folder for the future build, for example **/Users/user/TBuild**. It will be named ***BuildPath*** in the rest of this document. All commands will be launched from Terminal.
### Obtain your API credentials
You will require **api_id** and **api_hash** to access the Telegram API servers. To learn how to obtain them [click here][api_credentials].
### Clone source code and prepare libraries
Go to ***BuildPath*** and run
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew install git automake cmake wget pkg-config gnu-tar ninja
sudo xcode-select -s /Applications/Xcode.app/Contents/Developer
git clone --recursive https://github.com/telegramdesktop/tdesktop.git
./tdesktop/Telegram/build/prepare/mac.sh
### Building the project
Go to ***BuildPath*/tdesktop/Telegram** and run (using [your **api_id** and **api_hash**](#obtain-your-api-credentials))
./configure.sh -D TDESKTOP_API_ID=YOUR_API_ID -D TDESKTOP_API_HASH=YOUR_API_HASH
Then launch Xcode, open ***BuildPath*/tdesktop/out/Telegram.xcodeproj** and build for Debug / Release.
[api_credentials]: api_credentials.md

View file

@ -1,28 +0,0 @@
## Build instructions for Mac App Store
**NB** These are used for Mac App Store build, after the [Build for macOS][mac] instructions.
### Prepare breakpad
Go to ***BuildPath*** and run
MACOSX_DEPLOYMENT_TARGET=10.12
cd Libraries
git clone https://chromium.googlesource.com/breakpad/breakpad
cd breakpad
git checkout bc8fb886
git clone https://chromium.googlesource.com/linux-syscall-support src/third_party/lss
cd src/third_party/lss
git checkout a91633d1
cd ../../..
git apply ../patches/breakpad.diff
cd src/client/mac
xcodebuild -project Breakpad.xcodeproj -target Breakpad -configuration Debug build
xcodebuild -project Breakpad.xcodeproj -target Breakpad -configuration Release build
cd ../../tools/mac/dump_syms
xcodebuild -project dump_syms.xcodeproj -target dump_syms -configuration Release build
cd ../../../../..
[xcode]: building-xcode.md

View file

@ -14,10 +14,6 @@ Choose an empty folder for the future build, for example **D:\\TBuild**. It will
All commands (if not stated otherwise) will be launched from **x64 Native Tools Command Prompt for VS 2022.bat** (should be in **Start Menu > Visual Studio 2022** menu folder). Pay attention not to use any other Command Prompt.
### Obtain your API credentials
You will require **api_id** and **api_hash** to access the Telegram API servers. To learn how to obtain them [click here][api_credentials].
## Install third party software
* Download **Python 3.10** installer from [https://www.python.org/downloads/](https://www.python.org/downloads/) and install it with adding to PATH.
@ -39,7 +35,7 @@ Go to ***BuildPath*\\tdesktop\\Telegram** and run
* Open ***BuildPath*\\tdesktop\\out\\Telegram.sln** in Visual Studio 2022
* 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**)
* The result AyuGram.exe will be located in **D:\TBuild\tdesktop\out\Debug** (and **Release**)
### Qt Visual Studio Tools
@ -49,5 +45,3 @@ For better debugging you may want to install Qt Visual Studio Tools:
* Go to **Online** tab
* Search for **Qt**
* Install **Qt Visual Studio Tools** extension
[api_credentials]: api_credentials.md

View file

@ -1,53 +0,0 @@
# Build instructions for Windows
- [Prepare folder](#prepare-folder)
- [Install third party software](#install-third-party-software)
- [Clone source code and prepare libraries](#clone-source-code-and-prepare-libraries)
- [Build the project](#build-the-project)
- [Qt Visual Studio Tools](#qt-visual-studio-tools)
## Prepare folder
The build is done in **Visual Studio 2022** with **10.0.22000.0** SDK version.
Choose an empty folder for the future build, for example **D:\\TBuild**. It will be named ***BuildPath*** in the rest of this document. Create two folders there, ***BuildPath*\\ThirdParty** and ***BuildPath*\\Libraries**.
All commands (if not stated otherwise) will be launched from **x86 Native Tools Command Prompt for VS 2022.bat** (should be in **Start Menu > Visual Studio 2022** menu folder). Pay attention not to use any other Command Prompt.
### Obtain your API credentials
You will require **api_id** and **api_hash** to access the Telegram API servers. To learn how to obtain them [click here][api_credentials].
## Install third party software
* Download **Python 3.10** installer from [https://www.python.org/downloads/](https://www.python.org/downloads/) and install it with adding to PATH.
* Download **CMake 3.21 or later** installer from [https://cmake.org/download/](https://cmake.org/download/) and install it.
* Download **Git** installer from [https://git-scm.com/download/win](https://git-scm.com/download/win) and install it.
## Clone source code and prepare libraries
Open **x86 Native Tools Command Prompt for VS 2022.bat**, go to ***BuildPath*** and run
git clone --recursive https://github.com/telegramdesktop/tdesktop.git
tdesktop\Telegram\build\prepare\win.bat
## Build the project
Go to ***BuildPath*\\tdesktop\\Telegram** and run (using [your **api_id** and **api_hash**](#obtain-your-api-credentials))
configure.bat -D TDESKTOP_API_ID=YOUR_API_ID -D TDESKTOP_API_HASH=YOUR_API_HASH
* Open ***BuildPath*\\tdesktop\\out\\Telegram.sln** in Visual Studio 2022
* 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**)
### Qt Visual Studio Tools
For better debugging you may want to install Qt Visual Studio Tools:
* Open **Extensions** -> **Manage Extensions**
* Go to **Online** tab
* Search for **Qt**
* Install **Qt Visual Studio Tools** extension
[api_credentials]: api_credentials.md