diff --git a/.github/workflows/win.yml b/.github/workflows/win.yml index 4043da204e..a3f305ce44 100644 --- a/.github/workflows/win.yml +++ b/.github/workflows/win.yml @@ -82,9 +82,6 @@ jobs: submodules: recursive path: ${{ env.TBUILD }}\${{ env.REPO_NAME }} - - name: Python installs. - run: pip3 install --upgrade pywin32 six - - name: Set up environment paths. shell: bash run: | diff --git a/Telegram/build/prepare/prepare.py b/Telegram/build/prepare/prepare.py index 2ddda7352a..a38b90bf50 100644 --- a/Telegram/build/prepare/prepare.py +++ b/Telegram/build/prepare/prepare.py @@ -418,6 +418,15 @@ win: SET PATH=%PATH_BACKUP_% """, 'ThirdParty') +stage('python', """ +version: """ + (subprocess.run(['python', '-V'], capture_output=True, env=modifiedEnv).stdout.decode().strip().split()[-1] if win else '0') + """ +win: + python -m venv python + python\\Scripts\\activate.bat + pip install pywin32 six + deactivate +""", 'ThirdParty') + stage('NuGet', """ win: mkdir NuGet @@ -953,6 +962,8 @@ win: ) else ( SET "FolderPostfix=" ) +depends:python/Scripts/activate.bat + %THIRDPARTY_DIR%\\python\\Scripts\\activate.bat cd src\\client\\windows gyp --no-circular-check breakpad_client.gyp --format=ninja cd ..\\.. @@ -963,6 +974,8 @@ release: gyp dump_syms.gyp --format=ninja cd ..\\..\\.. ninja -C out/Release%FolderPostfix% dump_syms +win: + deactivate mac: git clone https://chromium.googlesource.com/linux-syscall-support src/third_party/lss cd src/third_party/lss diff --git a/Telegram/configure.bat b/Telegram/configure.bat index 85b9ddebaf..75851b78e8 100644 --- a/Telegram/configure.bat +++ b/Telegram/configure.bat @@ -3,6 +3,7 @@ setlocal enabledelayedexpansion set "FullScriptPath=%~dp0" +call %FullScriptPath%..\..\ThirdParty\python\Scripts\activate.bat python %FullScriptPath%configure.py %* if %errorlevel% neq 0 goto error diff --git a/docs/building-win-x64.md b/docs/building-win-x64.md index 23d0f1d809..081df54b62 100644 --- a/docs/building-win-x64.md +++ b/docs/building-win-x64.md @@ -24,10 +24,6 @@ You will require **api_id** and **api_hash** to access the Telegram API servers. * Download **CMake 3.21 or later** installer from [https://cmake.org/download/](https://cmake.org/download/) and install to ***BuildPath*\\ThirdParty\\cmake** * Download **Git** installer from [https://git-scm.com/download/win](https://git-scm.com/download/win) and install it. -Open **x64 Native Tools Command Prompt for VS 2022.bat**, go to ***BuildPath*** and run - - python -m pip install pywin32 six - ## Clone source code and prepare libraries Open **x64 Native Tools Command Prompt for VS 2022.bat**, go to ***BuildPath*** and run diff --git a/docs/building-win.md b/docs/building-win.md index 41ae9b50bb..096f8ca183 100644 --- a/docs/building-win.md +++ b/docs/building-win.md @@ -24,10 +24,6 @@ You will require **api_id** and **api_hash** to access the Telegram API servers. * Download **CMake 3.21 or later** installer from [https://cmake.org/download/](https://cmake.org/download/) and install to ***BuildPath*\\ThirdParty\\cmake** * Download **Git** installer from [https://git-scm.com/download/win](https://git-scm.com/download/win) and install it. -Open **x86 Native Tools Command Prompt for VS 2022.bat**, go to ***BuildPath*** and run - - python -m pip install pywin32 six - ## Clone source code and prepare libraries Open **x86 Native Tools Command Prompt for VS 2022.bat**, go to ***BuildPath*** and run