From 4e109e0517facc06f00af1d70e6c2df83d58bc7b Mon Sep 17 00:00:00 2001 From: 23rd <23rd@vivaldi.net> Date: Mon, 24 Jul 2023 01:15:32 +0300 Subject: [PATCH] Added support build of dav1d on arm machines. --- Telegram/build/prepare/prepare.py | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/Telegram/build/prepare/prepare.py b/Telegram/build/prepare/prepare.py index 8b8bfd1d33..a8f611a8c5 100644 --- a/Telegram/build/prepare/prepare.py +++ b/Telegram/build/prepare/prepare.py @@ -520,7 +520,7 @@ mac: """) stage('mozjpeg', """ - git clone -b v4.0.3 https://github.com/mozilla/mozjpeg.git + git clone -b v4.1.3 https://github.com/mozilla/mozjpeg.git cd mozjpeg win: cmake . ^ @@ -675,13 +675,31 @@ stage('dav1d', """ win: git clone -b 1.2.1 --depth 1 https://code.videolan.org/videolan/dav1d.git cd dav1d + + if "%X8664%" equ "x64" ( + SET "TARGET=x86_64" + ) else ( + SET "TARGET=x86" + ) + set FILE=cross-file.txt + echo [binaries] > %FILE% + echo c = 'cl' >> %FILE% + echo cpp = 'cl' >> %FILE% + echo ar = 'lib' >> %FILE% + echo windres = 'rc' >> %FILE% + echo [host_machine] >> %FILE% + echo system = 'windows' >> %FILE% + echo cpu_family = '%TARGET%' >> %FILE% + echo cpu = '%TARGET%' >> %FILE% + echo endian = 'little'>> %FILE% + depends:python/Scripts/activate.bat %THIRDPARTY_DIR%\\python\\Scripts\\activate.bat - meson setup --prefix %LIBS_DIR%/local --default-library=static --buildtype=debug -Denable_tools=false -Denable_tests=false -Db_vscrt=mtd builddir-debug + meson setup --cross-file %FILE% --prefix %LIBS_DIR%/local --default-library=static --buildtype=debug -Denable_tools=false -Denable_tests=false -Db_vscrt=mtd builddir-debug meson compile -C builddir-debug meson install -C builddir-debug release: - meson setup --prefix %LIBS_DIR%/local --default-library=static --buildtype=release -Denable_tools=false -Denable_tests=false -Db_vscrt=mt builddir-release + meson setup --cross-file %FILE% --prefix %LIBS_DIR%/local --default-library=static --buildtype=release -Denable_tools=false -Denable_tests=false -Db_vscrt=mt builddir-release meson compile -C builddir-release meson install -C builddir-release win: