Skip to content

Commit

Permalink
fix macos error
Browse files Browse the repository at this point in the history
  • Loading branch information
BurnWW committed Oct 22, 2024
1 parent cd4ab77 commit 442ee55
Show file tree
Hide file tree
Showing 20 changed files with 344 additions and 314 deletions.
11 changes: 1 addition & 10 deletions .github/workflows/lib_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,4 @@ on:
# paths:
# - 'rust_wraper'
pull_request:
branches: [ "main" ]

jobs:
build:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- name: Build
run: cd rust_wraper && rustup target add wasm32-unknown-unknown && cargo build --release

branches: [ "main" ]
12 changes: 6 additions & 6 deletions .metadata
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# This file should be version controlled and should not be manually edited.

version:
revision: "2663184aa79047d0a33a14a3b607954f8fdd8730"
revision: "54e66469a933b60ddf175f858f82eaeb97e48c8d"
channel: "stable"

project_type: app
Expand All @@ -13,11 +13,11 @@ project_type: app
migration:
platforms:
- platform: root
create_revision: 2663184aa79047d0a33a14a3b607954f8fdd8730
base_revision: 2663184aa79047d0a33a14a3b607954f8fdd8730
- platform: linux
create_revision: 2663184aa79047d0a33a14a3b607954f8fdd8730
base_revision: 2663184aa79047d0a33a14a3b607954f8fdd8730
create_revision: 54e66469a933b60ddf175f858f82eaeb97e48c8d
base_revision: 54e66469a933b60ddf175f858f82eaeb97e48c8d
- platform: macos
create_revision: 54e66469a933b60ddf175f858f82eaeb97e48c8d
base_revision: 54e66469a933b60ddf175f858f82eaeb97e48c8d

# User provided section

Expand Down
2 changes: 1 addition & 1 deletion lib/infra/components/mxc_image.dart
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@

import 'dart:typed_data';

import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:flutter_rust_bridge/flutter_rust_bridge.dart';
import 'package:http/http.dart' as http;
import 'package:matrix/matrix.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
Expand Down
1 change: 1 addition & 0 deletions lib/infra/components/window.dart
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import 'package:window_manager/window_manager.dart';

final _kIsLinux = !kIsWeb && Platform.isLinux;
final _kIsWindows = !kIsWeb && Platform.isWindows;
final _kIsMacos = !kIsWeb && Platform.isMacOS;

class WindowFrame extends StatefulWidget {
const WindowFrame({
Expand Down
2 changes: 1 addition & 1 deletion lib/infra/pages/channel/chat.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import 'package:dtim/domain/utils/localized_extension.dart';
import 'package:bot_toast/bot_toast.dart';
import 'package:date_format/date_format.dart';
import 'package:easy_debounce/easy_debounce.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:flutter_rust_bridge/flutter_rust_bridge.dart';
import 'package:window_manager/window_manager.dart';
import 'package:flutter_gen/gen_l10n/l10n.dart';
import 'package:matrix/matrix.dart' as link;
Expand Down
8 changes: 5 additions & 3 deletions lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Future<void> main() async {
WidgetsFlutterBinding.ensureInitialized();
if (isPc()) {
await windowManager.ensureInitialized();
await windowManager.hide();
// await windowManager.hide();
}
AdaptiveDialog.instance.updateConfiguration(defaultStyle: AdaptiveStyle.material);

Expand Down Expand Up @@ -72,7 +72,9 @@ Future<void> main() async {
if (PlatformInfos.isMacOS || PlatformInfos.isWindows) {
await windowManager.setHasShadow(true);
}
await windowManager.setAsFrameless();
if (Platform.isLinux) {
await windowManager.setAsFrameless();
}
await windowManager.setSize(winSize);
await windowManager.show();
await showtray();
Expand Down Expand Up @@ -114,7 +116,7 @@ class App extends StatelessWidget {
final MediaQueryData data = MediaQuery.of(context);
child = botToastBuilder(context, child);
ScreenUtil.setConText(context);
if (Platform.isLinux) {
if (Platform.isLinux || Platform.isMacOS) {
child = virtualWindowFrameBuilder(context, child);
}
return MediaQuery(
Expand Down
7 changes: 5 additions & 2 deletions macos/Podfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
platform :osx, '10.15'
platform :osx, '11.05'

# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
Expand Down Expand Up @@ -31,13 +31,16 @@ target 'Runner' do
use_modular_headers!

flutter_install_all_macos_pods File.dirname(File.realpath(__FILE__))
target 'RunnerTests' do
inherit! :search_paths
end
end

post_install do |installer|
installer.pods_project.targets.each do |target|
flutter_additional_macos_build_settings(target)
target.build_configurations.each do |config|
config.build_settings['MACOSX_DEPLOYMENT_TARGET'] = '10.15'
config.build_settings['MACOSX_DEPLOYMENT_TARGET'] = '11.05'
end
end
end
46 changes: 30 additions & 16 deletions macos/Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
PODS:
- appkit_ui_element_colors (1.0.0):
- FlutterMacOS
- audioplayers_darwin (0.0.1):
- FlutterMacOS
- desktop_lifecycle (0.0.1):
Expand All @@ -15,7 +17,7 @@ PODS:
- FlutterMacOS
- flutter_webrtc (0.9.36):
- FlutterMacOS
- WebRTC-SDK (= 114.5735.02)
- WebRTC-SDK (= 114.5735.08)
- FlutterMacOS (1.0.0)
- macos_ui (0.1.0):
- FlutterMacOS
Expand All @@ -26,7 +28,8 @@ PODS:
- path_provider_foundation (0.0.1):
- Flutter
- FlutterMacOS
- record_macos (0.2.0):
- record_darwin (1.0.0):
- Flutter
- FlutterMacOS
- screen_retriever (0.0.1):
- FlutterMacOS
Expand All @@ -39,13 +42,17 @@ PODS:
- FlutterMacOS
- video_compress (0.3.0):
- FlutterMacOS
- video_player_avfoundation (0.0.1):
- Flutter
- FlutterMacOS
- wakelock_plus (0.0.1):
- FlutterMacOS
- WebRTC-SDK (114.5735.02)
- WebRTC-SDK (114.5735.08)
- window_manager (0.2.0):
- FlutterMacOS

DEPENDENCIES:
- appkit_ui_element_colors (from `Flutter/ephemeral/.symlinks/plugins/appkit_ui_element_colors/macos`)
- audioplayers_darwin (from `Flutter/ephemeral/.symlinks/plugins/audioplayers_darwin/macos`)
- desktop_lifecycle (from `Flutter/ephemeral/.symlinks/plugins/desktop_lifecycle/macos`)
- device_info_plus (from `Flutter/ephemeral/.symlinks/plugins/device_info_plus/macos`)
Expand All @@ -59,12 +66,13 @@ DEPENDENCIES:
- macos_window_utils (from `Flutter/ephemeral/.symlinks/plugins/macos_window_utils/macos`)
- package_info_plus (from `Flutter/ephemeral/.symlinks/plugins/package_info_plus/macos`)
- path_provider_foundation (from `Flutter/ephemeral/.symlinks/plugins/path_provider_foundation/darwin`)
- record_macos (from `Flutter/ephemeral/.symlinks/plugins/record_macos/macos`)
- record_darwin (from `Flutter/ephemeral/.symlinks/plugins/record_darwin/macos`)
- screen_retriever (from `Flutter/ephemeral/.symlinks/plugins/screen_retriever/macos`)
- shared_preferences_foundation (from `Flutter/ephemeral/.symlinks/plugins/shared_preferences_foundation/darwin`)
- tray_manager (from `Flutter/ephemeral/.symlinks/plugins/tray_manager/macos`)
- url_launcher_macos (from `Flutter/ephemeral/.symlinks/plugins/url_launcher_macos/macos`)
- video_compress (from `Flutter/ephemeral/.symlinks/plugins/video_compress/macos`)
- video_player_avfoundation (from `Flutter/ephemeral/.symlinks/plugins/video_player_avfoundation/darwin`)
- wakelock_plus (from `Flutter/ephemeral/.symlinks/plugins/wakelock_plus/macos`)
- window_manager (from `Flutter/ephemeral/.symlinks/plugins/window_manager/macos`)

Expand All @@ -73,6 +81,8 @@ SPEC REPOS:
- WebRTC-SDK

EXTERNAL SOURCES:
appkit_ui_element_colors:
:path: Flutter/ephemeral/.symlinks/plugins/appkit_ui_element_colors/macos
audioplayers_darwin:
:path: Flutter/ephemeral/.symlinks/plugins/audioplayers_darwin/macos
desktop_lifecycle:
Expand All @@ -99,8 +109,8 @@ EXTERNAL SOURCES:
:path: Flutter/ephemeral/.symlinks/plugins/package_info_plus/macos
path_provider_foundation:
:path: Flutter/ephemeral/.symlinks/plugins/path_provider_foundation/darwin
record_macos:
:path: Flutter/ephemeral/.symlinks/plugins/record_macos/macos
record_darwin:
:path: Flutter/ephemeral/.symlinks/plugins/record_darwin/macos
screen_retriever:
:path: Flutter/ephemeral/.symlinks/plugins/screen_retriever/macos
shared_preferences_foundation:
Expand All @@ -111,35 +121,39 @@ EXTERNAL SOURCES:
:path: Flutter/ephemeral/.symlinks/plugins/url_launcher_macos/macos
video_compress:
:path: Flutter/ephemeral/.symlinks/plugins/video_compress/macos
video_player_avfoundation:
:path: Flutter/ephemeral/.symlinks/plugins/video_player_avfoundation/darwin
wakelock_plus:
:path: Flutter/ephemeral/.symlinks/plugins/wakelock_plus/macos
window_manager:
:path: Flutter/ephemeral/.symlinks/plugins/window_manager/macos

SPEC CHECKSUMS:
appkit_ui_element_colors: 39bb2d80be3f19b152ccf4c70d5bbe6cba43d74a
audioplayers_darwin: dcad41de4fbd0099cb3749f7ab3b0cb8f70b810c
desktop_lifecycle: a600c10e12fe033c7be9078f2e929b8241f2c1e3
device_info_plus: 5401765fde0b8d062a2f8eb65510fb17e77cf07f
dynamic_color: 2eaa27267de1ca20d879fbd6e01259773fb1670f
emoji_picker_flutter: 533634326b1c5de9a181ba14b9758e6dfe967a20
file_selector_macos: 468fb6b81fac7c0e88d71317f3eec34c3b008ff9
flutter_secure_storage_macos: d56e2d218c1130b262bef8b4a7d64f88d7f9c9ea
flutter_webrtc: b7de006ffa89334a52103ea577b6596c437e6b9e
file_selector_macos: 54fdab7caa3ac3fc43c9fac4d7d8d231277f8cf2
flutter_secure_storage_macos: 59459653abe1adb92abbc8ea747d79f8d19866c9
flutter_webrtc: cf7dc44d26cbb5c5f1ae5f583dab545871f287f9
FlutterMacOS: 8f6f14fa908a6fb3fba0cd85dbd81ec4b251fb24
macos_ui: 6229a8922cd97bafb7d9636c8eb8dfb0744183ca
macos_window_utils: 933f91f64805e2eb91a5bd057cf97cd097276663
package_info_plus: 02d7a575e80f194102bef286361c6c326e4c29ce
path_provider_foundation: 29f094ae23ebbca9d3d0cec13889cd9060c0e943
record_macos: 937889e0f2a7a12b6fc14e97a3678e5a18943de6
path_provider_foundation: 3784922295ac71e43754bd15e0653ccfd36a147c
record_darwin: 1f6619f2abac4d1ca91d3eeab038c980d76f1517
screen_retriever: 59634572a57080243dd1bf715e55b6c54f241a38
shared_preferences_foundation: 5b919d13b803cadd15ed2dc053125c68730e5126
shared_preferences_foundation: b4c3b4cddf1c21f02770737f147a3f5da9d39695
tray_manager: 9064e219c56d75c476e46b9a21182087930baf90
url_launcher_macos: d2691c7dd33ed713bf3544850a623080ec693d95
url_launcher_macos: 5f437abeda8c85500ceb03f5c1938a8c5a705399
video_compress: c896234f100791b5fef7f049afa38f6d2ef7b42f
video_player_avfoundation: e9e6f9cae7d7a6d9b43519b0aab382bca60fcfd1
wakelock_plus: 4783562c9a43d209c458cb9b30692134af456269
WebRTC-SDK: dd913fd31cfbf1d43b9a22d83f4c6354c960c623
WebRTC-SDK: c24d2a6c9f571f2ed42297cb8ffba9557093142b
window_manager: 3a1844359a6295ab1e47659b1a777e36773cd6e8

PODFILE CHECKSUM: dac0ddf03d136db544afc27b87cc6c08492e67b9
PODFILE CHECKSUM: d4f7bed7751a2548a288c0dc329459c782e59841

COCOAPODS: 1.12.0
COCOAPODS: 1.15.2
Loading

0 comments on commit 442ee55

Please sign in to comment.