diff --git a/Telegram/SourceFiles/platform/win/specific_win.cpp b/Telegram/SourceFiles/platform/win/specific_win.cpp index a35cfd3c4..9b8b959e0 100644 --- a/Telegram/SourceFiles/platform/win/specific_win.cpp +++ b/Telegram/SourceFiles/platform/win/specific_win.cpp @@ -58,6 +58,8 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL #include #include +#include + #ifndef DCX_USESTYLE #define DCX_USESTYLE 0x00010000 #endif @@ -695,3 +697,18 @@ bool psLaunchMaps(const Data::LocationPoint &point) { return QDesktopServices::openUrl( url.arg(point.latAsString()).arg(point.lonAsString())); } + +// Stub while we still support Windows 7. +extern "C" { + +STDAPI GetDpiForMonitor( + _In_ HMONITOR hmonitor, + _In_ MONITOR_DPI_TYPE dpiType, + _Out_ UINT *dpiX, + _Out_ UINT *dpiY) { + return Dlls::GetDpiForMonitor + ? Dlls::GetDpiForMonitor(hmonitor, dpiType, dpiX, dpiY) + : E_FAIL; +} + +} // extern "C" diff --git a/Telegram/SourceFiles/platform/win/windows_dlls.cpp b/Telegram/SourceFiles/platform/win/windows_dlls.cpp index 0e03904f7..ded5dd0d1 100644 --- a/Telegram/SourceFiles/platform/win/windows_dlls.cpp +++ b/Telegram/SourceFiles/platform/win/windows_dlls.cpp @@ -63,6 +63,9 @@ SafeIniter::SafeIniter() { const auto LibUser32 = LoadLibrary(L"user32.dll"); LOAD_SYMBOL(LibUser32, SetWindowCompositionAttribute); + + const auto LibShCore = LoadLibrary(L"Shcore.dll"); + LOAD_SYMBOL(LibShCore, GetDpiForMonitor); } SafeIniter kSafeIniter; diff --git a/Telegram/SourceFiles/platform/win/windows_dlls.h b/Telegram/SourceFiles/platform/win/windows_dlls.h index 26f478376..9ebed92fc 100644 --- a/Telegram/SourceFiles/platform/win/windows_dlls.h +++ b/Telegram/SourceFiles/platform/win/windows_dlls.h @@ -11,6 +11,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL #include #include +#include #include #include #include @@ -124,5 +125,12 @@ inline BOOL(__stdcall *SetWindowCompositionAttribute)( HWND hWnd, WINDOWCOMPOSITIONATTRIBDATA*); +// SHCORE.DLL +inline HRESULT(__stdcall *GetDpiForMonitor)( + _In_ HMONITOR hmonitor, + _In_ MONITOR_DPI_TYPE dpiType, + _Out_ UINT *dpiX, + _Out_ UINT *dpiY); + } // namespace Dlls } // namespace Platform diff --git a/Telegram/ThirdParty/tgcalls b/Telegram/ThirdParty/tgcalls index b9fa8b84d..0c23e3803 160000 --- a/Telegram/ThirdParty/tgcalls +++ b/Telegram/ThirdParty/tgcalls @@ -1 +1 @@ -Subproject commit b9fa8b84d8abe741183f157218ac038c596a54a5 +Subproject commit 0c23e3803bc29e115f886308275bf0e3a313bc58 diff --git a/Telegram/build/docker/centos_env/Dockerfile b/Telegram/build/docker/centos_env/Dockerfile index e4f7d1fb1..00a3dc3b7 100644 --- a/Telegram/build/docker/centos_env/Dockerfile +++ b/Telegram/build/docker/centos_env/Dockerfile @@ -753,7 +753,7 @@ COPY --link --from=pipewire {{ LibrariesPath }}/pipewire-cache / RUN git init tg_owt \ && cd tg_owt \ && git remote add origin {{ GIT }}/desktop-app/tg_owt.git \ - && git fetch --depth=1 origin c9cc4390ab951f2cbc103ff783a11f398b27660b \ + && git fetch --depth=1 origin 996dbe2c83b5a71d9045ce47960b8432e223dbb3 \ && git reset --hard FETCH_HEAD \ && git submodule update --init --recursive --depth=1 \ && rm -rf .git \ diff --git a/Telegram/build/prepare/prepare.py b/Telegram/build/prepare/prepare.py index 6704bdbd2..2f5986864 100644 --- a/Telegram/build/prepare/prepare.py +++ b/Telegram/build/prepare/prepare.py @@ -1,4 +1,4 @@ -import os, sys, pprint, re, json, pathlib, hashlib, subprocess, glob +import os, sys, pprint, re, json, pathlib, hashlib, subprocess, glob, tempfile executePath = os.getcwd() sys.dont_write_bytecode = True @@ -435,8 +435,12 @@ if customRunCommand: modifiedEnv['PROMPT'] = '(prepare) $P$G' subprocess.run("cmd.exe", shell=True, env=modifiedEnv) else: - modifiedEnv['PS1'] = '(prepare) \\w \\$ ' - subprocess.run("bash --noprofile --norc", env=modifiedEnv) + prompt = '(prepare) %~ %# ' + with tempfile.NamedTemporaryFile(mode='w', delete=False) as tmp_zshrc: + tmp_zshrc.write(f'export PS1="{prompt}"\n') + tmp_zshrc_path = tmp_zshrc.name + subprocess.run(['zsh', '--rcs', tmp_zshrc_path], env=modifiedEnv) + os.remove(tmp_zshrc_path) elif not run(command): print('FAILED :(') finish(1) @@ -1616,7 +1620,7 @@ win: stage('tg_owt', """ git clone https://github.com/desktop-app/tg_owt.git cd tg_owt - git checkout afd9d5d317 + git checkout 996dbe2c83 git submodule init git submodule update win: diff --git a/Telegram/cmake/lib_tgcalls.cmake b/Telegram/cmake/lib_tgcalls.cmake index 881ad9952..3f6938e72 100644 --- a/Telegram/cmake/lib_tgcalls.cmake +++ b/Telegram/cmake/lib_tgcalls.cmake @@ -88,10 +88,6 @@ PRIVATE v2/SignalingEncryption.h v2/SignalingSctpConnection.cpp v2/SignalingSctpConnection.h - v2_4_0_0/InstanceV2_4_0_0Impl.cpp - v2_4_0_0/InstanceV2_4_0_0Impl.h - v2_4_0_0/Signaling_4_0_0.cpp - v2_4_0_0/Signaling_4_0_0.h # Desktop capturer desktop_capturer/DesktopCaptureSource.h @@ -152,10 +148,17 @@ PRIVATE platform/darwin/GLVideoView.mm platform/darwin/GLVideoViewMac.h platform/darwin/GLVideoViewMac.mm + platform/darwin/h265_nalu_rewriter.cc + platform/darwin/h265_nalu_rewriter.h platform/darwin/objc_video_encoder_factory.h platform/darwin/objc_video_encoder_factory.mm platform/darwin/objc_video_decoder_factory.h platform/darwin/objc_video_decoder_factory.mm + platform/darwin/RTCCodecSpecificInfoH265+Private.h + platform/darwin/RTCCodecSpecificInfoH265.h + platform/darwin/RTCCodecSpecificInfoH265.mm + platform/darwin/RTCH265ProfileLevelId.h + platform/darwin/RTCH265ProfileLevelId.mm platform/darwin/TGCMIOCapturer.h platform/darwin/TGCMIOCapturer.m platform/darwin/TGCMIODevice.h diff --git a/Telegram/lib_webrtc b/Telegram/lib_webrtc index eb9496540..81d01697c 160000 --- a/Telegram/lib_webrtc +++ b/Telegram/lib_webrtc @@ -1 +1 @@ -Subproject commit eb9496540356945e2c9fb700bcfa51444fd36f41 +Subproject commit 81d01697c2ee2b46c5e5c41ce1176c230264e4cb diff --git a/cmake b/cmake index 78b441c9c..d50ff1a71 160000 --- a/cmake +++ b/cmake @@ -1 +1 @@ -Subproject commit 78b441c9c6ad8a14a8f97a28825babcadc6bf781 +Subproject commit d50ff1a71e080e63f71c451f500a2f03f9d48539 diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml index 033424e1d..b3c8d1905 100644 --- a/snap/snapcraft.yaml +++ b/snap/snapcraft.yaml @@ -433,7 +433,7 @@ parts: webrtc: source: https://github.com/desktop-app/tg_owt.git source-depth: 1 - source-commit: c9cc4390ab951f2cbc103ff783a11f398b27660b + source-commit: 996dbe2c83b5a71d9045ce47960b8432e223dbb3 plugin: cmake build-environment: - LDFLAGS: ${LDFLAGS:+$LDFLAGS} -s