commit
f4f3622cb1
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,415 @@ |
||||
diff --git a/Telegram/SourceFiles/platform/mac/file_bookmark_mac.mm b/Telegram/SourceFiles/platform/mac/file_bookmark_mac.mm
|
||||
index 337055443..09604b117 100644
|
||||
--- a/Telegram/SourceFiles/platform/mac/file_bookmark_mac.mm
|
||||
+++ b/Telegram/SourceFiles/platform/mac/file_bookmark_mac.mm
|
||||
@@ -12,6 +12,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||
|
||||
#include <Cocoa/Cocoa.h>
|
||||
#include <CoreFoundation/CFURL.h>
|
||||
+#undef check
|
||||
|
||||
namespace Platform {
|
||||
namespace {
|
||||
diff --git a/Telegram/SourceFiles/platform/mac/specific_mac.mm b/Telegram/SourceFiles/platform/mac/specific_mac.mm
|
||||
index 3b4395ae3..7f8ee401f 100644
|
||||
--- a/Telegram/SourceFiles/platform/mac/specific_mac.mm
|
||||
+++ b/Telegram/SourceFiles/platform/mac/specific_mac.mm
|
||||
@@ -119,6 +119,7 @@ PermissionStatus GetPermissionStatus(PermissionType type) {
|
||||
switch (type) {
|
||||
case PermissionType::Microphone:
|
||||
case PermissionType::Camera:
|
||||
+#if 0
|
||||
const auto nativeType = (type == PermissionType::Microphone)
|
||||
? AVMediaTypeAudio
|
||||
: AVMediaTypeVideo;
|
||||
@@ -133,6 +134,7 @@ PermissionStatus GetPermissionStatus(PermissionType type) {
|
||||
return PermissionStatus::Denied;
|
||||
}
|
||||
}
|
||||
+#endif
|
||||
break;
|
||||
}
|
||||
return PermissionStatus::Granted;
|
||||
@@ -142,6 +144,7 @@ void RequestPermission(PermissionType type, Fn<void(PermissionStatus)> resultCal
|
||||
switch (type) {
|
||||
case PermissionType::Microphone:
|
||||
case PermissionType::Camera:
|
||||
+#if 0
|
||||
const auto nativeType = (type == PermissionType::Microphone)
|
||||
? AVMediaTypeAudio
|
||||
: AVMediaTypeVideo;
|
||||
@@ -152,6 +155,7 @@ void RequestPermission(PermissionType type, Fn<void(PermissionStatus)> resultCal
|
||||
});
|
||||
}];
|
||||
}
|
||||
+#endif
|
||||
break;
|
||||
}
|
||||
resultCallback(PermissionStatus::Granted);
|
||||
diff --git a/Telegram/SourceFiles/platform/mac/touchbar/items/mac_formatter_item.h b/Telegram/SourceFiles/platform/mac/touchbar/items/mac_formatter_item.h
|
||||
index a537929c8..82ef2b837 100644
|
||||
--- a/Telegram/SourceFiles/platform/mac/touchbar/items/mac_formatter_item.h
|
||||
+++ b/Telegram/SourceFiles/platform/mac/touchbar/items/mac_formatter_item.h
|
||||
@@ -9,8 +9,8 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||
|
||||
#import <AppKit/NSPopoverTouchBarItem.h>
|
||||
#import <AppKit/NSTouchBar.h>
|
||||
+#undef check
|
||||
|
||||
-API_AVAILABLE(macos(10.12.2))
|
||||
@interface TextFormatPopover : NSPopoverTouchBarItem
|
||||
- (id)init:(NSTouchBarItemIdentifier)identifier;
|
||||
@end
|
||||
diff --git a/Telegram/SourceFiles/platform/mac/touchbar/items/mac_pinned_chats_item.h b/Telegram/SourceFiles/platform/mac/touchbar/items/mac_pinned_chats_item.h
|
||||
index c6a4b886f..d2e0936c0 100644
|
||||
--- a/Telegram/SourceFiles/platform/mac/touchbar/items/mac_pinned_chats_item.h
|
||||
+++ b/Telegram/SourceFiles/platform/mac/touchbar/items/mac_pinned_chats_item.h
|
||||
@@ -8,12 +8,12 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||
#pragma once
|
||||
|
||||
#include <AppKit/NSImageView.h>
|
||||
+#undef check
|
||||
|
||||
namespace Main {
|
||||
class Session;
|
||||
} // namespace Main
|
||||
|
||||
-API_AVAILABLE(macos(10.12.2))
|
||||
@interface PinnedDialogsPanel : NSImageView
|
||||
- (id)init:(not_null<Main::Session*>)session
|
||||
destroyEvent:(rpl::producer<>)touchBarSwitches;
|
||||
diff --git a/Telegram/SourceFiles/platform/mac/touchbar/items/mac_scrubber_item.h b/Telegram/SourceFiles/platform/mac/touchbar/items/mac_scrubber_item.h
|
||||
index 27b04467c..b1a7dfbd9 100644
|
||||
--- a/Telegram/SourceFiles/platform/mac/touchbar/items/mac_scrubber_item.h
|
||||
+++ b/Telegram/SourceFiles/platform/mac/touchbar/items/mac_scrubber_item.h
|
||||
@@ -9,12 +9,12 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||
|
||||
#import <AppKit/NSPopoverTouchBarItem.h>
|
||||
#import <AppKit/NSTouchBar.h>
|
||||
+#undef check
|
||||
|
||||
namespace Window {
|
||||
class Controller;
|
||||
} // namespace Window
|
||||
|
||||
-API_AVAILABLE(macos(10.12.2))
|
||||
@interface StickerEmojiPopover : NSPopoverTouchBarItem<NSTouchBarDelegate>
|
||||
- (id)init:(not_null<Window::Controller*>)controller
|
||||
identifier:(NSTouchBarItemIdentifier)identifier;
|
||||
diff --git a/Telegram/SourceFiles/platform/mac/touchbar/mac_touchbar_audio.h b/Telegram/SourceFiles/platform/mac/touchbar/mac_touchbar_audio.h
|
||||
index ec4596c67..972461aef 100644
|
||||
--- a/Telegram/SourceFiles/platform/mac/touchbar/mac_touchbar_audio.h
|
||||
+++ b/Telegram/SourceFiles/platform/mac/touchbar/mac_touchbar_audio.h
|
||||
@@ -8,8 +8,8 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||
#pragma once
|
||||
|
||||
#import <AppKit/NSTouchBar.h>
|
||||
+#undef check
|
||||
|
||||
-API_AVAILABLE(macos(10.12.2))
|
||||
@interface TouchBarAudioPlayer : NSTouchBar<NSTouchBarDelegate>
|
||||
- (rpl::producer<>)closeRequests;
|
||||
@end
|
||||
diff --git a/Telegram/SourceFiles/platform/mac/touchbar/mac_touchbar_common.h b/Telegram/SourceFiles/platform/mac/touchbar/mac_touchbar_common.h
|
||||
index 52b54de12..ac3857f9b 100644
|
||||
--- a/Telegram/SourceFiles/platform/mac/touchbar/mac_touchbar_common.h
|
||||
+++ b/Telegram/SourceFiles/platform/mac/touchbar/mac_touchbar_common.h
|
||||
@@ -9,6 +9,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||
|
||||
#import <AppKit/NSImage.h>
|
||||
#import <Foundation/Foundation.h>
|
||||
+#undef check
|
||||
|
||||
namespace TouchBar {
|
||||
|
||||
diff --git a/Telegram/SourceFiles/platform/mac/touchbar/mac_touchbar_controls.h b/Telegram/SourceFiles/platform/mac/touchbar/mac_touchbar_controls.h
|
||||
index 1cc8c832f..c2178c975 100644
|
||||
--- a/Telegram/SourceFiles/platform/mac/touchbar/mac_touchbar_controls.h
|
||||
+++ b/Telegram/SourceFiles/platform/mac/touchbar/mac_touchbar_controls.h
|
||||
@@ -20,19 +20,19 @@ struct TrackState;
|
||||
|
||||
namespace TouchBar {
|
||||
|
||||
-[[nodiscard]] API_AVAILABLE(macos(10.12.2))
|
||||
+[[nodiscard]]
|
||||
NSButton *CreateTouchBarButton(
|
||||
NSImage *image,
|
||||
rpl::lifetime &lifetime,
|
||||
Fn<void()> callback);
|
||||
|
||||
-[[nodiscard]] API_AVAILABLE(macos(10.12.2))
|
||||
+[[nodiscard]]
|
||||
NSButton *CreateTouchBarButton(
|
||||
const style::icon &icon,
|
||||
rpl::lifetime &lifetime,
|
||||
Fn<void()> callback);
|
||||
|
||||
-[[nodiscard]] API_AVAILABLE(macos(10.12.2))
|
||||
+[[nodiscard]]
|
||||
NSButton *CreateTouchBarButtonWithTwoStates(
|
||||
NSImage *icon1,
|
||||
NSImage *icon2,
|
||||
@@ -41,7 +41,7 @@ NSButton *CreateTouchBarButtonWithTwoStates(
|
||||
bool firstState,
|
||||
rpl::producer<bool> stateChanged = rpl::never<bool>());
|
||||
|
||||
-[[nodiscard]] API_AVAILABLE(macos(10.12.2))
|
||||
+[[nodiscard]]
|
||||
NSButton *CreateTouchBarButtonWithTwoStates(
|
||||
const style::icon &icon1,
|
||||
const style::icon &icon2,
|
||||
@@ -50,14 +50,14 @@ NSButton *CreateTouchBarButtonWithTwoStates(
|
||||
bool firstState,
|
||||
rpl::producer<bool> stateChanged = rpl::never<bool>());
|
||||
|
||||
-[[nodiscard]] API_AVAILABLE(macos(10.12.2))
|
||||
+[[nodiscard]]
|
||||
NSSliderTouchBarItem *CreateTouchBarSlider(
|
||||
NSString *itemId,
|
||||
rpl::lifetime &lifetime,
|
||||
Fn<void(bool, double, double)> callback,
|
||||
rpl::producer<Media::Player::TrackState> stateChanged);
|
||||
|
||||
-[[nodiscard]] API_AVAILABLE(macos(10.12.2))
|
||||
+[[nodiscard]]
|
||||
NSCustomTouchBarItem *CreateTouchBarTrackPosition(
|
||||
NSString *itemId,
|
||||
rpl::producer<Media::Player::TrackState> stateChanged);
|
||||
diff --git a/Telegram/SourceFiles/platform/mac/touchbar/mac_touchbar_main.h b/Telegram/SourceFiles/platform/mac/touchbar/mac_touchbar_main.h
|
||||
index f03546eaf..bc8c63678 100644
|
||||
--- a/Telegram/SourceFiles/platform/mac/touchbar/mac_touchbar_main.h
|
||||
+++ b/Telegram/SourceFiles/platform/mac/touchbar/mac_touchbar_main.h
|
||||
@@ -8,6 +8,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||
#pragma once
|
||||
|
||||
#import <AppKit/NSTouchBar.h>
|
||||
+#undef check
|
||||
|
||||
namespace Window {
|
||||
class Controller;
|
||||
@@ -21,7 +22,6 @@ const auto kPopoverPickerItemIdentifier = @"pickerButtons";
|
||||
|
||||
} // namespace TouchBar::Main
|
||||
|
||||
-API_AVAILABLE(macos(10.12.2))
|
||||
@interface TouchBarMain : NSTouchBar
|
||||
- (id)init:(not_null<Window::Controller*>)controller
|
||||
touchBarSwitches:(rpl::producer<>)touchBarSwitches;
|
||||
diff --git a/Telegram/SourceFiles/platform/mac/touchbar/mac_touchbar_manager.h b/Telegram/SourceFiles/platform/mac/touchbar/mac_touchbar_manager.h
|
||||
index 464f87c9c..9a008c75e 100644
|
||||
--- a/Telegram/SourceFiles/platform/mac/touchbar/mac_touchbar_manager.h
|
||||
+++ b/Telegram/SourceFiles/platform/mac/touchbar/mac_touchbar_manager.h
|
||||
@@ -8,6 +8,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||
#pragma once
|
||||
|
||||
#import <AppKit/NSTouchBar.h>
|
||||
+#undef check
|
||||
|
||||
namespace Main {
|
||||
class Domain;
|
||||
@@ -17,7 +18,6 @@ namespace Window {
|
||||
class Controller;
|
||||
} // namespace Window
|
||||
|
||||
-API_AVAILABLE(macos(10.12.2))
|
||||
@interface RootTouchBar : NSTouchBar<NSTouchBarDelegate>
|
||||
- (id)init:(rpl::producer<bool>)canApplyMarkdown
|
||||
controller:(not_null<Window::Controller*>)controller
|
||||
Submodule Telegram/ThirdParty/tgcalls contains modified content
|
||||
diff --git a/Telegram/ThirdParty/tgcalls/tgcalls/platform/darwin/TGRTCDefaultVideoDecoderFactory.mm b/Telegram/ThirdParty/tgcalls/tgcalls/platform/darwin/TGRTCDefaultVideoDecoderFactory.mm
|
||||
index 8a4417b..2d9794e 100644
|
||||
--- a/Telegram/ThirdParty/tgcalls/tgcalls/platform/darwin/TGRTCDefaultVideoDecoderFactory.mm
|
||||
+++ b/Telegram/ThirdParty/tgcalls/tgcalls/platform/darwin/TGRTCDefaultVideoDecoderFactory.mm
|
||||
@@ -71,7 +71,7 @@
|
||||
if (@available(iOS 11.0, *)) {
|
||||
[result addObject:h265Info];
|
||||
}
|
||||
-#else // WEBRTC_IOS
|
||||
+#elif 0 // WEBRTC_IOS
|
||||
if (@available(macOS 10.13, *)) {
|
||||
[result addObject:h265Info];
|
||||
}
|
||||
@@ -101,7 +101,7 @@
|
||||
return [[TGRTCVideoDecoderH265 alloc] init];
|
||||
}
|
||||
}
|
||||
-#else // WEBRTC_IOS
|
||||
+#elif 0 // WEBRTC_IOS
|
||||
if (@available(macOS 10.13, *)) {
|
||||
if ([info.name isEqualToString:kRTCVideoCodecH265Name]) {
|
||||
return [[TGRTCVideoDecoderH265 alloc] init];
|
||||
diff --git a/Telegram/ThirdParty/tgcalls/tgcalls/platform/darwin/TGRTCDefaultVideoEncoderFactory.mm b/Telegram/ThirdParty/tgcalls/tgcalls/platform/darwin/TGRTCDefaultVideoEncoderFactory.mm
|
||||
index 2901417..ac9ec2a 100644
|
||||
--- a/Telegram/ThirdParty/tgcalls/tgcalls/platform/darwin/TGRTCDefaultVideoEncoderFactory.mm
|
||||
+++ b/Telegram/ThirdParty/tgcalls/tgcalls/platform/darwin/TGRTCDefaultVideoEncoderFactory.mm
|
||||
@@ -76,7 +76,7 @@
|
||||
[result addObject:h265Info];
|
||||
}
|
||||
}
|
||||
-#else // WEBRTC_IOS
|
||||
+#elif 0 // WEBRTC_IOS
|
||||
if (@available(macOS 10.13, *)) {
|
||||
if ([[AVAssetExportSession allExportPresets] containsObject:AVAssetExportPresetHEVCHighestQuality]) {
|
||||
[result addObject:h265Info];
|
||||
@@ -112,7 +112,7 @@
|
||||
return [[TGRTCVideoEncoderH265 alloc] initWithCodecInfo:info];
|
||||
}
|
||||
}
|
||||
-#else // WEBRTC_IOS
|
||||
+#elif 0 // WEBRTC_IOS
|
||||
if (@available(macOS 10.13, *)) {
|
||||
if ([info.name isEqualToString:kRTCVideoCodecH265Name]) {
|
||||
return [[TGRTCVideoEncoderH265 alloc] initWithCodecInfo:info];
|
||||
diff --git a/Telegram/ThirdParty/tgcalls/tgcalls/platform/darwin/VideoCameraCapturerMac.mm b/Telegram/ThirdParty/tgcalls/tgcalls/platform/darwin/VideoCameraCapturerMac.mm
|
||||
index de92427..9a5b20d 100644
|
||||
--- a/Telegram/ThirdParty/tgcalls/tgcalls/platform/darwin/VideoCameraCapturerMac.mm
|
||||
+++ b/Telegram/ThirdParty/tgcalls/tgcalls/platform/darwin/VideoCameraCapturerMac.mm
|
||||
@@ -507,8 +507,7 @@ static tgcalls::DarwinVideoTrackSource *getObjCVideoSource(const rtc::scoped_ref
|
||||
- (void)captureOutput:(AVCaptureOutput *)captureOutput
|
||||
didDropSampleBuffer:(CMSampleBufferRef)sampleBuffer
|
||||
fromConnection:(AVCaptureConnection *)connection {
|
||||
- NSString *droppedReason =
|
||||
- (__bridge NSString *)CMGetAttachment(sampleBuffer, kCMSampleBufferAttachmentKey_DroppedFrameReason, nil);
|
||||
+ NSString *droppedReason = nil;
|
||||
RTCLogError(@"Dropped sample buffer. Reason: %@", droppedReason);
|
||||
}
|
||||
|
||||
diff --git a/Telegram/ThirdParty/tgcalls/tgcalls/platform/darwin/VideoMetalViewMac.mm b/Telegram/ThirdParty/tgcalls/tgcalls/platform/darwin/VideoMetalViewMac.mm
|
||||
index bcabcf7..de7b6c7 100644
|
||||
--- a/Telegram/ThirdParty/tgcalls/tgcalls/platform/darwin/VideoMetalViewMac.mm
|
||||
+++ b/Telegram/ThirdParty/tgcalls/tgcalls/platform/darwin/VideoMetalViewMac.mm
|
||||
@@ -245,9 +245,11 @@ private:
|
||||
layer.framebufferOnly = true;
|
||||
layer.opaque = false;
|
||||
// layer.cornerRadius = 4;
|
||||
+#if 0
|
||||
if (@available(macOS 10.13, *)) {
|
||||
layer.displaySyncEnabled = NO;
|
||||
}
|
||||
+#endif
|
||||
// layer.presentsWithTransaction = YES;
|
||||
layer.backgroundColor = [NSColor clearColor].CGColor;
|
||||
layer.contentsGravity = kCAGravityResizeAspectFill;
|
||||
@@ -334,9 +336,7 @@ private:
|
||||
- (RTCVideoRotation)rtcFrameRotation {
|
||||
if (_rotationOverride) {
|
||||
RTCVideoRotation rotation;
|
||||
- if (@available(macOS 10.13, *)) {
|
||||
- [_rotationOverride getValue:&rotation size:sizeof(rotation)];
|
||||
- } else {
|
||||
+ {
|
||||
[_rotationOverride getValue:&rotation];
|
||||
}
|
||||
return rotation;
|
||||
Submodule Telegram/lib_base contains modified content
|
||||
diff --git a/Telegram/lib_base/base/platform/mac/base_global_shortcuts_mac.mm b/Telegram/lib_base/base/platform/mac/base_global_shortcuts_mac.mm
|
||||
index 5491702..32befc6 100644
|
||||
--- a/Telegram/lib_base/base/platform/mac/base_global_shortcuts_mac.mm
|
||||
+++ b/Telegram/lib_base/base/platform/mac/base_global_shortcuts_mac.mm
|
||||
@@ -128,6 +128,7 @@ bool Available() {
|
||||
}
|
||||
|
||||
bool Allowed() {
|
||||
+#if 0
|
||||
if (@available(macOS 10.15, *)) {
|
||||
// Input Monitoring is required on macOS 10.15 an later.
|
||||
// Even if user grants access, restart is required.
|
||||
@@ -141,6 +142,7 @@ bool Allowed() {
|
||||
return AXIsProcessTrustedWithOptions(
|
||||
(__bridge CFDictionaryRef)options);
|
||||
}
|
||||
+#endif
|
||||
return true;
|
||||
}
|
||||
|
||||
diff --git a/Telegram/lib_base/base/platform/mac/base_info_mac.mm b/Telegram/lib_base/base/platform/mac/base_info_mac.mm
|
||||
index 29e368f..ea1f65f 100644
|
||||
--- a/Telegram/lib_base/base/platform/mac/base_info_mac.mm
|
||||
+++ b/Telegram/lib_base/base/platform/mac/base_info_mac.mm
|
||||
@@ -203,16 +203,20 @@ void Finish() {
|
||||
}
|
||||
|
||||
void OpenInputMonitoringPrivacySettings() {
|
||||
+#if 0
|
||||
if (@available(macOS 10.15, *)) {
|
||||
IOHIDRequestAccess(kIOHIDRequestTypeListenEvent);
|
||||
}
|
||||
+#endif
|
||||
[[NSWorkspace sharedWorkspace] openURL:PrivacySettingsUrl("Privacy_ListenEvent")];
|
||||
}
|
||||
|
||||
void OpenDesktopCapturePrivacySettings() {
|
||||
+#if 0
|
||||
if (@available(macOS 11.0, *)) {
|
||||
CGRequestScreenCaptureAccess();
|
||||
}
|
||||
+#endif
|
||||
[[NSWorkspace sharedWorkspace] openURL:PrivacySettingsUrl("Privacy_ScreenCapture")];
|
||||
}
|
||||
|
||||
diff --git a/Telegram/lib_base/base/platform/mac/base_system_media_controls_mac.mm b/Telegram/lib_base/base/platform/mac/base_system_media_controls_mac.mm
|
||||
index c86ac77..b081162 100644
|
||||
--- a/Telegram/lib_base/base/platform/mac/base_system_media_controls_mac.mm
|
||||
+++ b/Telegram/lib_base/base/platform/mac/base_system_media_controls_mac.mm
|
||||
@@ -271,6 +271,7 @@ void SystemMediaControls::setThumbnail(const QImage &thumbnail) {
|
||||
if (thumbnail.isNull()) {
|
||||
return;
|
||||
}
|
||||
+#if 0
|
||||
if (@available(macOS 10.13.2, *)) {
|
||||
const auto copy = thumbnail;
|
||||
[_private->info
|
||||
@@ -284,6 +285,7 @@ void SystemMediaControls::setThumbnail(const QImage &thumbnail) {
|
||||
forKey:MPMediaItemPropertyArtwork];
|
||||
updateDisplay();
|
||||
}
|
||||
+#endif
|
||||
}
|
||||
|
||||
void SystemMediaControls::setDuration(int duration) {
|
||||
@@ -302,10 +304,12 @@ void SystemMediaControls::setVolume(float64 volume) {
|
||||
}
|
||||
|
||||
void SystemMediaControls::clearThumbnail() {
|
||||
+#if 0
|
||||
if (@available(macOS 10.13.2, *)) {
|
||||
[_private->info removeObjectForKey:MPMediaItemPropertyArtwork];
|
||||
updateDisplay();
|
||||
}
|
||||
+#endif
|
||||
}
|
||||
|
||||
void SystemMediaControls::clearMetadata() {
|
||||
@@ -367,9 +371,11 @@ bool SystemMediaControls::volumeSupported() const {
|
||||
}
|
||||
|
||||
bool SystemMediaControls::Supported() {
|
||||
+#if 0
|
||||
if (@available(macOS 10.12.2, *)) {
|
||||
return true;
|
||||
}
|
||||
+#endif
|
||||
return false;
|
||||
}
|
||||
|
||||
Submodule Telegram/lib_webrtc contains modified content
|
||||
diff --git a/Telegram/lib_webrtc/webrtc/mac/webrtc_media_devices_mac.mm b/Telegram/lib_webrtc/webrtc/mac/webrtc_media_devices_mac.mm
|
||||
index 21e93f7..10a3890 100644
|
||||
--- a/Telegram/lib_webrtc/webrtc/mac/webrtc_media_devices_mac.mm
|
||||
+++ b/Telegram/lib_webrtc/webrtc/mac/webrtc_media_devices_mac.mm
|
||||
@@ -397,6 +397,7 @@ void MacMediaDevices::videoInputRefreshed() {
|
||||
}
|
||||
|
||||
bool MacDesktopCaptureAllowed() {
|
||||
+#if 0
|
||||
if (@available(macOS 11.0, *)) {
|
||||
// Screen Recording is required on macOS 10.15 an later.
|
||||
// Even if user grants access, restart is required.
|
||||
@@ -421,6 +422,7 @@ bool MacDesktopCaptureAllowed() {
|
||||
CFRelease(stream);
|
||||
return true;
|
||||
}
|
||||
+#endif
|
||||
return true;
|
||||
}
|
||||
|
@ -0,0 +1,38 @@ |
||||
diff --git a/Telegram/SourceFiles/core/application.cpp b/Telegram/SourceFiles/core/application.cpp
|
||||
index 2a092c6ea..de46dd269 100644
|
||||
--- a/Telegram/SourceFiles/core/application.cpp
|
||||
+++ b/Telegram/SourceFiles/core/application.cpp
|
||||
@@ -1173,7 +1173,7 @@ void Application::startShortcuts() {
|
||||
|
||||
void Application::RegisterUrlScheme() {
|
||||
base::Platform::RegisterUrlScheme(base::Platform::UrlSchemeDescriptor{
|
||||
- .executable = cExeDir() + cExeName(),
|
||||
+ .executable = qsl("kotatogram-desktop"),
|
||||
.arguments = qsl("-workdir \"%1\"").arg(cWorkingDir()),
|
||||
.protocol = qsl("tg"),
|
||||
.protocolName = qsl("Telegram Link"),
|
||||
diff --git a/Telegram/SourceFiles/platform/linux/specific_linux.cpp b/Telegram/SourceFiles/platform/linux/specific_linux.cpp
|
||||
index 26168baa7..00d2525a0 100644
|
||||
--- a/Telegram/SourceFiles/platform/linux/specific_linux.cpp
|
||||
+++ b/Telegram/SourceFiles/platform/linux/specific_linux.cpp
|
||||
@@ -303,19 +303,11 @@ bool GenerateDesktopFile(
|
||||
|
||||
QFile target(targetFile);
|
||||
if (target.open(QIODevice::WriteOnly)) {
|
||||
- fileText = fileText.replace(
|
||||
- QRegularExpression(
|
||||
- qsl("^TryExec=.*$"),
|
||||
- QRegularExpression::MultilineOption),
|
||||
- qsl("TryExec=%1").arg(
|
||||
- QString(cExeDir() + cExeName()).replace('\\', "\\\\")));
|
||||
-
|
||||
fileText = fileText.replace(
|
||||
QRegularExpression(
|
||||
qsl("^Exec=kotatogram-desktop(.*)$"),
|
||||
QRegularExpression::MultilineOption),
|
||||
- qsl("Exec=%1 -workdir %2\\1").arg(
|
||||
- EscapeShellInLauncher(cExeDir() + cExeName()),
|
||||
+ qsl("Exec=kotatogram-desktop -workdir %1\\1").arg(
|
||||
EscapeShellInLauncher(cWorkingDir())));
|
||||
|
||||
fileText = fileText.replace(
|
@ -0,0 +1,55 @@ |
||||
diff --git a/src/rtc_base/system/gcd_helpers.m b/src/rtc_base/system/gcd_helpers.m
|
||||
index fd9a361f..3a63be6d 100644
|
||||
--- a/src/rtc_base/system/gcd_helpers.m
|
||||
+++ b/src/rtc_base/system/gcd_helpers.m
|
||||
@@ -13,9 +13,6 @@
|
||||
dispatch_queue_t RTCDispatchQueueCreateWithTarget(const char *label,
|
||||
dispatch_queue_attr_t attr,
|
||||
dispatch_queue_t target) {
|
||||
- if (@available(iOS 10, macOS 10.12, tvOS 10, watchOS 3, *)) {
|
||||
- return dispatch_queue_create_with_target(label, attr, target);
|
||||
- }
|
||||
dispatch_queue_t queue = dispatch_queue_create(label, attr);
|
||||
dispatch_set_target_queue(queue, target);
|
||||
return queue;
|
||||
diff --git a/src/sdk/objc/components/video_codec/nalu_rewriter.cc b/src/sdk/objc/components/video_codec/nalu_rewriter.cc
|
||||
index 61c1e7d6..b19f3f91 100644
|
||||
--- a/src/sdk/objc/components/video_codec/nalu_rewriter.cc
|
||||
+++ b/src/sdk/objc/components/video_codec/nalu_rewriter.cc
|
||||
@@ -245,10 +245,7 @@ bool H265CMSampleBufferToAnnexBBuffer(
|
||||
int nalu_header_size = 0;
|
||||
size_t param_set_count = 0;
|
||||
OSStatus status = noErr;
|
||||
- if (__builtin_available(macOS 10.13, *)) {
|
||||
- status = CMVideoFormatDescriptionGetHEVCParameterSetAtIndex(
|
||||
- description, 0, nullptr, nullptr, ¶m_set_count, &nalu_header_size);
|
||||
- } else {
|
||||
+ {
|
||||
RTC_LOG(LS_ERROR) << "Not supported.";
|
||||
return false;
|
||||
}
|
||||
@@ -271,10 +268,7 @@ bool H265CMSampleBufferToAnnexBBuffer(
|
||||
size_t param_set_size = 0;
|
||||
const uint8_t* param_set = nullptr;
|
||||
for (size_t i = 0; i < param_set_count; ++i) {
|
||||
- if (__builtin_available(macOS 10.13, *)) {
|
||||
- status = CMVideoFormatDescriptionGetHEVCParameterSetAtIndex(
|
||||
- description, i, ¶m_set, ¶m_set_size, nullptr, nullptr);
|
||||
- } else {
|
||||
+ {
|
||||
RTC_LOG(LS_ERROR) << "Not supported.";
|
||||
return false;
|
||||
}
|
||||
@@ -514,11 +508,7 @@ CMVideoFormatDescriptionRef CreateH265VideoFormatDescription(
|
||||
// Parse the SPS and PPS into a CMVideoFormatDescription.
|
||||
CMVideoFormatDescriptionRef description = nullptr;
|
||||
OSStatus status = noErr;
|
||||
- if (__builtin_available(macOS 10.13, *)) {
|
||||
- status = CMVideoFormatDescriptionCreateFromHEVCParameterSets(
|
||||
- kCFAllocatorDefault, 3, param_set_ptrs, param_set_sizes, 4, nullptr,
|
||||
- &description);
|
||||
- } else {
|
||||
+ {
|
||||
RTC_LOG(LS_ERROR) << "Not supported.";
|
||||
return nullptr;
|
||||
}
|
@ -1,51 +0,0 @@ |
||||
{ lib |
||||
, fetchFromGitHub |
||||
, buildGoPackage |
||||
, btrfs-progs |
||||
, go-md2man |
||||
, installShellFiles |
||||
, util-linux |
||||
, nixosTests |
||||
}: |
||||
|
||||
buildGoPackage rec { |
||||
pname = "containerd"; |
||||
version = "1.4.11"; |
||||
|
||||
src = fetchFromGitHub { |
||||
owner = "containerd"; |
||||
repo = "containerd"; |
||||
rev = "v${version}"; |
||||
sha256 = "sha256-mUagr1/LqTCFvshWuiSMxsqdRqjzogt2tZ0uwR7ZVAs="; |
||||
}; |
||||
|
||||
goPackagePath = "github.com/containerd/containerd"; |
||||
outputs = [ "out" "man" ]; |
||||
|
||||
nativeBuildInputs = [ go-md2man installShellFiles util-linux ]; |
||||
|
||||
buildInputs = [ btrfs-progs ]; |
||||
|
||||
buildPhase = '' |
||||
cd go/src/${goPackagePath} |
||||
patchShebangs . |
||||
make binaries man "VERSION=v${version}" "REVISION=${src.rev}" |
||||
''; |
||||
|
||||
installPhase = '' |
||||
install -Dm555 bin/* -t $out/bin |
||||
installManPage man/*.[1-9] |
||||
installShellCompletion --bash contrib/autocomplete/ctr |
||||
installShellCompletion --zsh --name _ctr contrib/autocomplete/zsh_autocomplete |
||||
''; |
||||
|
||||
passthru.tests = { inherit (nixosTests) docker; }; |
||||
|
||||
meta = with lib; { |
||||
homepage = "https://containerd.io/"; |
||||
description = "A daemon to control runC"; |
||||
license = licenses.asl20; |
||||
maintainers = with maintainers; [ ]; |
||||
platforms = platforms.linux; |
||||
}; |
||||
} |
@ -1,69 +1,110 @@ |
||||
#!/usr/bin/env nix-shell |
||||
#!nix-shell -i bash -p curl |
||||
#!nix-shell -i bash -p curl jq |
||||
|
||||
set -eu |
||||
|
||||
if [[ $# -lt 1 ]]; then |
||||
echo \"usage: $0 version\" >&2 |
||||
release () { |
||||
local content="$1" |
||||
local version="$2" |
||||
|
||||
jq -r '.releases[] | select(."release-version" == "'"$version"'")' <<< "$content" |
||||
} |
||||
|
||||
release_files () { |
||||
local release="$1" |
||||
local type="$2" |
||||
|
||||
jq -r '[."'"$type"'".files[] | select(.name | test("^.*.tar.gz$"))]' <<< "$release" |
||||
} |
||||
|
||||
release_platform_attr () { |
||||
local release_files="$1" |
||||
local platform="$2" |
||||
local attr="$3" |
||||
|
||||
jq -r '.[] | select(.rid == "'"$platform"'") | ."'"$attr"'"' <<< "$release_files" |
||||
} |
||||
|
||||
platform_sources () { |
||||
local release_files="$1" |
||||
local platforms=( \ |
||||
"x86_64-linux linux-x64" \ |
||||
"aarch64-linux linux-arm64" \ |
||||
"x86_64-darwin osx-x64" \ |
||||
"aarch64-darwin osx-arm64" \ |
||||
) |
||||
|
||||
echo "srcs = {" |
||||
for kv in "${platforms[@]}"; do |
||||
local nix_platform=${kv%% *} |
||||
local ms_platform=${kv##* } |
||||
|
||||
local url=$(release_platform_attr "$release_files" "$ms_platform" url) |
||||
local hash=$(release_platform_attr "$release_files" "$ms_platform" hash) |
||||
|
||||
[[ -z "$url" || -z "$hash" ]] && continue |
||||
echo " $nix_platform = { |
||||
url = \"$url\"; |
||||
sha512 = \"$hash\"; |
||||
}; " |
||||
done |
||||
echo " };" |
||||
} |
||||
|
||||
main () { |
||||
pname=$(basename "$0") |
||||
if [[ ! "$*" =~ ^.*[0-9]{1,}\.[0-9]{1,}.*$ ]]; then |
||||
echo "Usage: $pname [sem-versions] |
||||
Get updated dotnet src (platform - url & sha512) expressions for specified versions |
||||
|
||||
Examples: |
||||
$pname 3.1.21 5.0.12 - specific x.y.z versions |
||||
$pname 3.1 5.0 6.0 - latest x.y versions |
||||
" >&2 |
||||
exit 1 |
||||
fi |
||||
|
||||
VERSION=$1 |
||||
HASHFILE=$(mktemp /tmp/dotnet.hashes.XXXXXXXX) |
||||
trap "rm -f $HASHFILE" EXIT |
||||
|
||||
curl -L https://dotnetcli.blob.core.windows.net/dotnet/checksums/$VERSION-sha.txt -o $HASHFILE |
||||
|
||||
ASPNETCORE_VERSION=$(grep aspnetcore-runtime- $HASHFILE | grep -- -linux-x64.tar.gz | tail -n -1 | sed -e 's:.*aspnetcore-runtime-::' -e 's:-linux-x64.tar.gz.*$::' ) |
||||
ASPNETCORE_HASH_LINUX_X64=$(grep aspnetcore-runtime- $HASHFILE | grep -- -linux-x64.tar.gz | cut -d ' ' -f 1) |
||||
ASPNETCORE_HASH_LINUX_ARM64=$(grep aspnetcore-runtime- $HASHFILE | grep -- -linux-arm64.tar.gz | cut -d ' ' -f 1) |
||||
ASPNETCORE_HASH_OSX_X64=$(grep aspnetcore-runtime- $HASHFILE | grep -- -osx-x64.tar.gz | cut -d ' ' -f 1) |
||||
ASPNETCORE_HASH_OSX_ARM64=$(grep aspnetcore-runtime- $HASHFILE | grep -- -osx-arm64.tar.gz | cut -d ' ' -f 1) |
||||
|
||||
RUNTIME_VERSION=$(grep dotnet-runtime- $HASHFILE | grep -- -linux-x64.tar.gz | tail -n -1 | sed -e 's:.*dotnet-runtime-::' -e 's:-linux-x64.tar.gz.*$::' ) |
||||
RUNTIME_HASH_LINUX_X64=$(grep dotnet-runtime- $HASHFILE | grep -- -linux-x64.tar.gz | cut -d ' ' -f 1) |
||||
RUNTIME_HASH_LINUX_ARM64=$(grep dotnet-runtime- $HASHFILE | grep -- -linux-arm64.tar.gz | cut -d ' ' -f 1) |
||||
RUNTIME_HASH_OSX_X64=$(grep dotnet-runtime- $HASHFILE | grep -- -osx-x64.tar.gz | cut -d ' ' -f 1) |
||||
RUNTIME_HASH_OSX_ARM64=$(grep dotnet-runtime- $HASHFILE | grep -- -osx-arm64.tar.gz | cut -d ' ' -f 1) |
||||
|
||||
# dotnet-sdk has multiple entries in file, but the latest is the newest |
||||
SDK_VERSION=$(grep dotnet-sdk- $HASHFILE | grep -- -linux-x64.tar.gz | tail -n -1 | sed -e 's:.*dotnet-sdk-::' -e 's:-linux-x64.tar.gz.*$::' ) |
||||
SDK_HASH_LINUX_X64=$(grep dotnet-sdk- $HASHFILE | grep -- -linux-x64.tar.gz | tail -n 1 | cut -d ' ' -f 1) |
||||
SDK_HASH_LINUX_ARM64=$(grep dotnet-sdk- $HASHFILE | grep -- -linux-arm64.tar.gz | tail -n 1 | cut -d ' ' -f 1) |
||||
SDK_HASH_OSX_X64=$(grep dotnet-sdk- $HASHFILE | grep -- -osx-x64.tar.gz | tail -n 1 | cut -d ' ' -f 1) |
||||
SDK_HASH_OSX_ARM64=$(grep dotnet-sdk- $HASHFILE | grep -- -osx-arm64.tar.gz | tail -n 1 | cut -d ' ' -f 1) |
||||
|
||||
V=${VERSION/./_} |
||||
MAJOR_MINOR_VERSION=${V%%.*} |
||||
|
||||
echo """ |
||||
aspnetcore_${MAJOR_MINOR_VERSION} = buildAspNetCore { |
||||
version = \"${ASPNETCORE_VERSION}\"; |
||||
sha512 = { |
||||
x86_64-linux = \"${ASPNETCORE_HASH_LINUX_X64}\"; |
||||
aarch64-linux = \"${ASPNETCORE_HASH_LINUX_ARM64}\"; |
||||
x86_64-darwin = \"${ASPNETCORE_HASH_OSX_X64}\"; |
||||
aarch64-darwin = \"${ASPNETCORE_HASH_OSX_ARM64}\"; |
||||
}; |
||||
}; |
||||
fi |
||||
|
||||
for sem_version in "$@"; do |
||||
patch_specified=false |
||||
if [[ "$sem_version" =~ ^[0-9]{1,}\.[0-9]{1,}\.[0-9]{1,}$ ]]; then |
||||
patch_specified=true |
||||
elif [[ ! "$sem_version" =~ ^[0-9]{1,}\.[0-9]{1,}$ ]]; then |
||||
continue |
||||
fi |
||||
|
||||
major_minor=$(sed 's/^\([0-9]*\.[0-9]*\).*$/\1/' <<< "$sem_version") |
||||
content=$(curl -sL https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/"$major_minor"/releases.json) |
||||
major_minor_patch=$([ "$patch_specified" == true ] && echo "$sem_version" || jq -r '."latest-release"' <<< "$content") |
||||
|
||||
runtime_${MAJOR_MINOR_VERSION} = buildNetRuntime { |
||||
version = \"${RUNTIME_VERSION}\"; |
||||
sha512 = { |
||||
x86_64-linux = \"${RUNTIME_HASH_LINUX_X64}\"; |
||||
aarch64-linux = \"${RUNTIME_HASH_LINUX_ARM64}\"; |
||||
x86_64-darwin = \"${RUNTIME_HASH_OSX_X64}\"; |
||||
aarch64-darwin = \"${RUNTIME_HASH_OSX_ARM64}\"; |
||||
}; |
||||
release_content=$(release "$content" "$major_minor_patch") |
||||
aspnetcore_version=$(jq -r '."aspnetcore-runtime".version' <<< "$release_content") |
||||
runtime_version=$(jq -r '.runtime.version' <<< "$release_content") |
||||
sdk_version=$(jq -r '.sdk.version' <<< "$release_content") |
||||
|
||||
aspnetcore_files="$(release_files "$release_content" "aspnetcore-runtime")" |
||||
runtime_files="$(release_files "$release_content" "runtime")" |
||||
sdk_files="$(release_files "$release_content" "sdk")" |
||||
|
||||
major_minor_underscore=${major_minor/./_} |
||||
channel_version=$(jq -r '."channel-version"' <<< "$content") |
||||
support_phase=$(jq -r '."support-phase"' <<< "$content") |
||||
echo " |
||||
# v$channel_version ($support_phase) |
||||
aspnetcore_$major_minor_underscore = buildAspNetCore { |
||||
version = \"${aspnetcore_version}\"; |
||||
$(platform_sources "$aspnetcore_files") |
||||
}; |
||||
|
||||
sdk_${MAJOR_MINOR_VERSION} = buildNetSdk { |
||||
version = \"${SDK_VERSION}\"; |
||||
sha512 = { |
||||
x86_64-linux = \"${SDK_HASH_LINUX_X64}\"; |
||||
aarch64-linux = \"${SDK_HASH_LINUX_ARM64}\"; |
||||
x86_64-darwin = \"${SDK_HASH_OSX_X64}\"; |
||||
aarch64-darwin = \"${SDK_HASH_OSX_ARM64}\"; |
||||
}; |
||||
runtime_$major_minor_underscore = buildNetRuntime { |
||||
version = \"${runtime_version}\"; |
||||
$(platform_sources "$runtime_files") |
||||
}; |
||||
""" |
||||
|
||||
sdk_$major_minor_underscore = buildNetSdk { |
||||
version = \"${sdk_version}\"; |
||||
$(platform_sources "$sdk_files") |
||||
}; " |
||||
done |
||||
} |
||||
|
||||
main "$@" |
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue