diff --git a/.github/workflows/win.yml b/.github/workflows/win.yml index f8fd718bcb..fbb0d73a66 100644 --- a/.github/workflows/win.yml +++ b/.github/workflows/win.yml @@ -81,16 +81,12 @@ jobs: - name: Choco installs. run: | - choco install --no-progress -y nasm strawberryperl yasm jom ninja + choco install --no-progress -y jom py -m pip install pywin32 - name: Set up environment paths. shell: bash run: | - echo "C:\\Strawberry\\perl\\bin\\" >> $GITHUB_PATH - echo "C:\\Program Files\\NASM\\" >> $GITHUB_PATH - echo "C:\\ProgramData\\chocolatey\\lib\\ninja\\tools\\" >> $GITHUB_PATH - echo "CACHE_KEY=$(sha256sum $TBUILD/$REPO_NAME/$PREPARE_PATH | awk '{ print $1 }')" >> $GITHUB_ENV echo "Configurate git for cherry-picks." diff --git a/Telegram/build/prepare/prepare.py b/Telegram/build/prepare/prepare.py index e2e1a2e3cb..e4e4f2a281 100644 --- a/Telegram/build/prepare/prepare.py +++ b/Telegram/build/prepare/prepare.py @@ -61,14 +61,11 @@ if not os.path.isdir(os.path.join(thirdPartyDir, keysLoc)): pathlib.Path(os.path.join(thirdPartyDir, keysLoc)).mkdir(parents=True, exist_ok=True) pathPrefixes = [ - 'ThirdParty\\msys64\\usr\\bin', - 'ThirdParty\\Strawberry\\perl\\bin', + 'ThirdParty\\msys64\\mingw64\\bin', 'ThirdParty\\Python39', - 'ThirdParty\\NASM', 'ThirdParty\\jom', 'ThirdParty\\cmake\\bin', 'ThirdParty\\gyp', - 'ThirdParty\\Ninja', ] if win else [ 'ThirdParty/gyp', 'ThirdParty/yasm', @@ -405,9 +402,20 @@ stage('patches', """ stage('msys64', """ win: - powershell.exe -Command "Invoke-WebRequest -OutFile ./msys64.exe https://repo.msys2.org/distrib/x86_64/msys2-base-x86_64-20220603.sfx.exe" + SET PATH_BACKUP_=%PATH% + SET PATH=%ROOT_DIR%\\ThirdParty\\msys64\\usr\\bin;%PATH% + + SET CHERE_INVOKING=enabled_from_arguments + SET MSYS2_PATH_TYPE=inherit + + powershell -Command "Invoke-WebRequest -OutFile ./msys64.exe https://repo.msys2.org/distrib/x86_64/msys2-base-x86_64-20220603.sfx.exe" msys64.exe del msys64.exe + + bash -c "pacman-key --init; pacman-key --populate; pacman -Syu --noconfirm" + pacman -S --noconfirm mingw-w64-x86_64-perl mingw-w64-x86_64-nasm mingw-w64-x86_64-yasm mingw-w64-x86_64-ninja + + SET PATH=%PATH_BACKUP_% """, 'ThirdParty') stage('depot_tools', """ diff --git a/docs/building-win-x64.md b/docs/building-win-x64.md index 4b73789700..efd4203e3b 100644 --- a/docs/building-win-x64.md +++ b/docs/building-win-x64.md @@ -20,13 +20,9 @@ You will require **api_id** and **api_hash** to access the Telegram API servers. ## Install third party software -* Download **Strawberry Perl** installer from [http://strawberryperl.com/](http://strawberryperl.com/) and install to ***BuildPath*\\ThirdParty\\Strawberry** -* Download **NASM** installer from [http://www.nasm.us](http://www.nasm.us) and install to ***BuildPath*\\ThirdParty\\NASM** -* Download **Yasm** executable from [http://yasm.tortall.net/Download.html](http://yasm.tortall.net/Download.html), rename to *yasm.exe* and put to ***BuildPath*\\ThirdParty\\yasm** * Download **jom** archive from [http://download.qt.io/official_releases/jom/jom.zip](http://download.qt.io/official_releases/jom/jom.zip) and unpack to ***BuildPath*\\ThirdParty\\jom** * Download **Python 3.9** installer from [https://www.python.org/downloads/](https://www.python.org/downloads/) and install to ***BuildPath*\\ThirdParty\\Python39** with adding to PATH * Download **CMake 3.21 or later** installer from [https://cmake.org/download/](https://cmake.org/download/) and install to ***BuildPath*\\ThirdParty\\cmake** -* Download **Ninja** executable from [https://github.com/ninja-build/ninja/releases/download/v1.7.2/ninja-win.zip](https://github.com/ninja-build/ninja/releases/download/v1.7.2/ninja-win.zip) and unpack to ***BuildPath*\\ThirdParty\\Ninja** * Download **Git** installer from [https://git-scm.com/download/win](https://git-scm.com/download/win) and install it. * Download **NuGet** executable from [https://dist.nuget.org/win-x86-commandline/latest/nuget.exe](https://dist.nuget.org/win-x86-commandline/latest/nuget.exe) and put to ***BuildPath*\\ThirdParty\\NuGet** diff --git a/docs/building-win.md b/docs/building-win.md index 4c2d676271..0699764996 100644 --- a/docs/building-win.md +++ b/docs/building-win.md @@ -20,13 +20,9 @@ You will require **api_id** and **api_hash** to access the Telegram API servers. ## Install third party software -* Download **Strawberry Perl** installer from [http://strawberryperl.com/](http://strawberryperl.com/) and install to ***BuildPath*\\ThirdParty\\Strawberry** -* Download **NASM** installer from [http://www.nasm.us](http://www.nasm.us) and install to ***BuildPath*\\ThirdParty\\NASM** -* Download **Yasm** executable from [http://yasm.tortall.net/Download.html](http://yasm.tortall.net/Download.html), rename to *yasm.exe* and put to ***BuildPath*\\ThirdParty\\yasm** * Download **jom** archive from [http://download.qt.io/official_releases/jom/jom.zip](http://download.qt.io/official_releases/jom/jom.zip) and unpack to ***BuildPath*\\ThirdParty\\jom** * Download **Python 3.9** installer from [https://www.python.org/downloads/](https://www.python.org/downloads/) and install to ***BuildPath*\\ThirdParty\\Python39** with adding to PATH * Download **CMake 3.21 or later** installer from [https://cmake.org/download/](https://cmake.org/download/) and install to ***BuildPath*\\ThirdParty\\cmake** -* Download **Ninja** executable from [https://github.com/ninja-build/ninja/releases/download/v1.7.2/ninja-win.zip](https://github.com/ninja-build/ninja/releases/download/v1.7.2/ninja-win.zip) and unpack to ***BuildPath*\\ThirdParty\\Ninja** * Download **Git** installer from [https://git-scm.com/download/win](https://git-scm.com/download/win) and install it. * Download **NuGet** executable from [https://dist.nuget.org/win-x86-commandline/latest/nuget.exe](https://dist.nuget.org/win-x86-commandline/latest/nuget.exe) and put to ***BuildPath*\\ThirdParty\\NuGet**