Merge pull request #4463 from Kingtous/test/flutter_3_10
feat: upgrade flutter to 3.10
This commit is contained in:
commit
f0cb01d880
5
.github/workflows/bridge.yml
vendored
5
.github/workflows/bridge.yml
vendored
@ -5,6 +5,9 @@ name: Build flutter-rust-bridge
|
|||||||
on:
|
on:
|
||||||
workflow_call:
|
workflow_call:
|
||||||
|
|
||||||
|
env:
|
||||||
|
FLUTTER_VERSION: "3.10.1"
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
generate_bridge:
|
generate_bridge:
|
||||||
runs-on: ${{ matrix.job.os }}
|
runs-on: ${{ matrix.job.os }}
|
||||||
@ -51,7 +54,7 @@ jobs:
|
|||||||
uses: subosito/flutter-action@v2
|
uses: subosito/flutter-action@v2
|
||||||
with:
|
with:
|
||||||
channel: "stable"
|
channel: "stable"
|
||||||
flutter-version: "3.7.0"
|
flutter-version: ${{ env.FLUTTER_VERSION }}
|
||||||
cache: true
|
cache: true
|
||||||
|
|
||||||
- name: Install flutter rust bridge deps
|
- name: Install flutter rust bridge deps
|
||||||
|
28
.github/workflows/flutter-build.yml
vendored
28
.github/workflows/flutter-build.yml
vendored
@ -9,7 +9,10 @@ on:
|
|||||||
|
|
||||||
env:
|
env:
|
||||||
LLVM_VERSION: "15.0.6"
|
LLVM_VERSION: "15.0.6"
|
||||||
FLUTTER_VERSION: "3.7.0"
|
FLUTTER_VERSION: "3.10.1"
|
||||||
|
# for arm64 linux
|
||||||
|
FLUTTER_ELINUX_VERSION: "3.10.1"
|
||||||
|
FLUTTER_ELINUX_COMMIT_ID: "410b3ca42f2cd0c485edf517a1666652bab442d4"
|
||||||
TAG_NAME: "nightly"
|
TAG_NAME: "nightly"
|
||||||
# vcpkg version: 2023.04.15
|
# vcpkg version: 2023.04.15
|
||||||
# for multiarch gcc compatibility
|
# for multiarch gcc compatibility
|
||||||
@ -52,13 +55,13 @@ jobs:
|
|||||||
flutter-version: ${{ env.FLUTTER_VERSION }}
|
flutter-version: ${{ env.FLUTTER_VERSION }}
|
||||||
cache: true
|
cache: true
|
||||||
|
|
||||||
- name: Replace engine with rustdesk custom flutter engine
|
# - name: Replace engine with rustdesk custom flutter engine
|
||||||
run: |
|
# run: |
|
||||||
flutter doctor -v
|
# flutter doctor -v
|
||||||
flutter precache --windows
|
# flutter precache --windows
|
||||||
Invoke-WebRequest -Uri https://github.com/Kingtous/engine/releases/download/v3.7.0-rustdesk/windows-x64-release-flutter.zip -OutFile windows-x64-flutter-release.zip
|
# Invoke-WebRequest -Uri https://github.com/Kingtous/engine/releases/download/v3.7.0-rustdesk/windows-x64-release-flutter.zip -OutFile windows-x64-flutter-release.zip
|
||||||
Expand-Archive windows-x64-flutter-release.zip -DestinationPath engine
|
# Expand-Archive windows-x64-flutter-release.zip -DestinationPath engine
|
||||||
mv -Force engine/* C:/hostedtoolcache/windows/flutter/stable-${{ env.FLUTTER_VERSION }}-x64/bin/cache/artifacts/engine/windows-x64-release/
|
# mv -Force engine/* C:/hostedtoolcache/windows/flutter/stable-${{ env.FLUTTER_VERSION }}-x64/bin/cache/artifacts/engine/windows-x64-release/
|
||||||
|
|
||||||
- name: Install Rust toolchain
|
- name: Install Rust toolchain
|
||||||
uses: actions-rs/toolchain@v1
|
uses: actions-rs/toolchain@v1
|
||||||
@ -1166,12 +1169,11 @@ jobs:
|
|||||||
# disable git safe.directory
|
# disable git safe.directory
|
||||||
git config --global --add safe.directory "*"
|
git config --global --add safe.directory "*"
|
||||||
pushd /opt
|
pushd /opt
|
||||||
# clone repo and reset to flutter 3.7.0
|
# clone repo and reset to flutter ${{ env.FLUTTER_VERSION }}
|
||||||
git clone https://github.com/sony/flutter-elinux.git || true
|
git clone https://github.com/sony/flutter-elinux.git || true
|
||||||
pushd flutter-elinux
|
pushd flutter-elinux
|
||||||
# reset to flutter 3.7.0
|
|
||||||
git fetch
|
git fetch
|
||||||
git reset --hard 51a1d685901f79fbac51665a967c3a1a789ecee5
|
git reset --hard ${{ env.FLUTTER_ELINUX_COMMIT_ID }}
|
||||||
popd
|
popd
|
||||||
|
|
||||||
- uses: Kingtous/run-on-arch-action@amd64-support
|
- uses: Kingtous/run-on-arch-action@amd64-support
|
||||||
@ -1203,8 +1205,8 @@ jobs:
|
|||||||
# Patch arm64 engine for flutter 3.6.0+
|
# Patch arm64 engine for flutter 3.6.0+
|
||||||
flutter-elinux precache --linux
|
flutter-elinux precache --linux
|
||||||
pushd /tmp
|
pushd /tmp
|
||||||
curl -O https://storage.googleapis.com/flutter_infra_release/releases/stable/linux/flutter_linux_3.7.0-stable.tar.xz
|
curl -O https://storage.googleapis.com/flutter_infra_release/releases/stable/linux/flutter_linux_${{ env.FLUTTER_ELINUX_VERSION }}-stable.tar.xz
|
||||||
tar -xvf flutter_linux_3.7.0-stable.tar.xz flutter/bin/cache/artifacts/engine/linux-x64/shader_lib
|
tar -xvf flutter_linux_${{ env.FLUTTER_ELINUX_VERSION }}-stable.tar.xz flutter/bin/cache/artifacts/engine/linux-x64/shader_lib
|
||||||
cp -R flutter/bin/cache/artifacts/engine/linux-x64/shader_lib /opt/flutter-elinux/flutter/bin/cache/artifacts/engine/linux-arm64
|
cp -R flutter/bin/cache/artifacts/engine/linux-x64/shader_lib /opt/flutter-elinux/flutter/bin/cache/artifacts/engine/linux-arm64
|
||||||
popd
|
popd
|
||||||
# edit to corresponding arch
|
# edit to corresponding arch
|
||||||
|
@ -27,6 +27,6 @@ subprojects {
|
|||||||
project.evaluationDependsOn(':app')
|
project.evaluationDependsOn(':app')
|
||||||
}
|
}
|
||||||
|
|
||||||
task clean(type: Delete) {
|
tasks.register("clean", Delete) {
|
||||||
delete rootProject.buildDir
|
delete rootProject.buildDir
|
||||||
}
|
}
|
||||||
|
@ -46,13 +46,13 @@ class _ScanPageState extends State<ScanPage> {
|
|||||||
await picker.pickImage(source: ImageSource.gallery);
|
await picker.pickImage(source: ImageSource.gallery);
|
||||||
if (file != null) {
|
if (file != null) {
|
||||||
var image = img.decodeNamedImage(
|
var image = img.decodeNamedImage(
|
||||||
File(file.path).readAsBytesSync(), file.path)!;
|
file.path, File(file.path).readAsBytesSync())!;
|
||||||
|
|
||||||
LuminanceSource source = RGBLuminanceSource(
|
LuminanceSource source = RGBLuminanceSource(
|
||||||
image.width,
|
image.width,
|
||||||
image.height,
|
image.height,
|
||||||
image
|
image
|
||||||
.getBytes(format: img.Format.abgr)
|
.getBytes(order: img.ChannelOrder.abgr)
|
||||||
.buffer
|
.buffer
|
||||||
.asInt32List());
|
.asInt32List());
|
||||||
var bitmap = BinaryBitmap(HybridBinarizer(source));
|
var bitmap = BinaryBitmap(HybridBinarizer(source));
|
||||||
|
@ -2,6 +2,7 @@ import 'dart:async';
|
|||||||
import 'dart:convert';
|
import 'dart:convert';
|
||||||
import 'dart:io';
|
import 'dart:io';
|
||||||
import 'dart:math';
|
import 'dart:math';
|
||||||
|
import 'dart:typed_data';
|
||||||
import 'dart:ui' as ui;
|
import 'dart:ui' as ui;
|
||||||
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
@ -1067,7 +1068,7 @@ class CursorData {
|
|||||||
height: (height * scale).toInt(),
|
height: (height * scale).toInt(),
|
||||||
interpolation: img2.Interpolation.average,
|
interpolation: img2.Interpolation.average,
|
||||||
)
|
)
|
||||||
.getBytes(format: img2.Format.bgra);
|
.getBytes(order: img2.ChannelOrder.bgra);
|
||||||
} else {
|
} else {
|
||||||
data = Uint8List.fromList(
|
data = Uint8List.fromList(
|
||||||
img2.encodePng(
|
img2.encodePng(
|
||||||
@ -1133,13 +1134,13 @@ class PredefinedCursor {
|
|||||||
() async {
|
() async {
|
||||||
final defaultImg = _image2!;
|
final defaultImg = _image2!;
|
||||||
// This function is called only one time, no need to care about the performance.
|
// This function is called only one time, no need to care about the performance.
|
||||||
Uint8List data = defaultImg.getBytes(format: img2.Format.rgba);
|
Uint8List data = defaultImg.getBytes(order: img2.ChannelOrder.rgba);
|
||||||
_image = await img.decodeImageFromPixels(
|
_image = await img.decodeImageFromPixels(
|
||||||
data, defaultImg.width, defaultImg.height, ui.PixelFormat.rgba8888);
|
data, defaultImg.width, defaultImg.height, ui.PixelFormat.rgba8888);
|
||||||
|
|
||||||
double scale = 1.0;
|
double scale = 1.0;
|
||||||
if (Platform.isWindows) {
|
if (Platform.isWindows) {
|
||||||
data = _image2!.getBytes(format: img2.Format.bgra);
|
data = _image2!.getBytes(order: img2.ChannelOrder.bgra);
|
||||||
} else {
|
} else {
|
||||||
data = Uint8List.fromList(img2.encodePng(_image2!));
|
data = Uint8List.fromList(img2.encodePng(_image2!));
|
||||||
}
|
}
|
||||||
@ -1358,9 +1359,9 @@ class CursorModel with ChangeNotifier {
|
|||||||
Uint8List rgba, ui.Image image, int id, int w, int h) async {
|
Uint8List rgba, ui.Image image, int id, int w, int h) async {
|
||||||
Uint8List? data;
|
Uint8List? data;
|
||||||
img2.Image imgOrigin =
|
img2.Image imgOrigin =
|
||||||
img2.Image.fromBytes(w, h, rgba, format: img2.Format.rgba);
|
img2.Image.fromBytes(width: w, height:h, bytes: rgba.buffer, order: img2.ChannelOrder.rgba);
|
||||||
if (Platform.isWindows) {
|
if (Platform.isWindows) {
|
||||||
data = imgOrigin.getBytes(format: img2.Format.bgra);
|
data = imgOrigin.getBytes(order: img2.ChannelOrder.bgra);
|
||||||
} else {
|
} else {
|
||||||
ByteData? imgBytes =
|
ByteData? imgBytes =
|
||||||
await image.toByteData(format: ui.ImageByteFormat.png);
|
await image.toByteData(format: ui.ImageByteFormat.png);
|
||||||
|
@ -11,7 +11,7 @@ PODS:
|
|||||||
- FMDB (2.7.5):
|
- FMDB (2.7.5):
|
||||||
- FMDB/standard (= 2.7.5)
|
- FMDB/standard (= 2.7.5)
|
||||||
- FMDB/standard (2.7.5)
|
- FMDB/standard (2.7.5)
|
||||||
- package_info_plus_macos (0.0.1):
|
- package_info_plus (0.0.1):
|
||||||
- FlutterMacOS
|
- FlutterMacOS
|
||||||
- path_provider_foundation (0.0.1):
|
- path_provider_foundation (0.0.1):
|
||||||
- Flutter
|
- Flutter
|
||||||
@ -40,8 +40,8 @@ DEPENDENCIES:
|
|||||||
- device_info_plus_macos (from `Flutter/ephemeral/.symlinks/plugins/device_info_plus_macos/macos`)
|
- device_info_plus_macos (from `Flutter/ephemeral/.symlinks/plugins/device_info_plus_macos/macos`)
|
||||||
- flutter_custom_cursor (from `Flutter/ephemeral/.symlinks/plugins/flutter_custom_cursor/macos`)
|
- flutter_custom_cursor (from `Flutter/ephemeral/.symlinks/plugins/flutter_custom_cursor/macos`)
|
||||||
- FlutterMacOS (from `Flutter/ephemeral`)
|
- FlutterMacOS (from `Flutter/ephemeral`)
|
||||||
- package_info_plus_macos (from `Flutter/ephemeral/.symlinks/plugins/package_info_plus_macos/macos`)
|
- package_info_plus (from `Flutter/ephemeral/.symlinks/plugins/package_info_plus/macos`)
|
||||||
- path_provider_foundation (from `Flutter/ephemeral/.symlinks/plugins/path_provider_foundation/macos`)
|
- path_provider_foundation (from `Flutter/ephemeral/.symlinks/plugins/path_provider_foundation/darwin`)
|
||||||
- screen_retriever (from `Flutter/ephemeral/.symlinks/plugins/screen_retriever/macos`)
|
- screen_retriever (from `Flutter/ephemeral/.symlinks/plugins/screen_retriever/macos`)
|
||||||
- sqflite (from `Flutter/ephemeral/.symlinks/plugins/sqflite/macos`)
|
- sqflite (from `Flutter/ephemeral/.symlinks/plugins/sqflite/macos`)
|
||||||
- texture_rgba_renderer (from `Flutter/ephemeral/.symlinks/plugins/texture_rgba_renderer/macos`)
|
- texture_rgba_renderer (from `Flutter/ephemeral/.symlinks/plugins/texture_rgba_renderer/macos`)
|
||||||
@ -66,10 +66,10 @@ EXTERNAL SOURCES:
|
|||||||
:path: Flutter/ephemeral/.symlinks/plugins/flutter_custom_cursor/macos
|
:path: Flutter/ephemeral/.symlinks/plugins/flutter_custom_cursor/macos
|
||||||
FlutterMacOS:
|
FlutterMacOS:
|
||||||
:path: Flutter/ephemeral
|
:path: Flutter/ephemeral
|
||||||
package_info_plus_macos:
|
package_info_plus:
|
||||||
:path: Flutter/ephemeral/.symlinks/plugins/package_info_plus_macos/macos
|
:path: Flutter/ephemeral/.symlinks/plugins/package_info_plus/macos
|
||||||
path_provider_foundation:
|
path_provider_foundation:
|
||||||
:path: Flutter/ephemeral/.symlinks/plugins/path_provider_foundation/macos
|
:path: Flutter/ephemeral/.symlinks/plugins/path_provider_foundation/darwin
|
||||||
screen_retriever:
|
screen_retriever:
|
||||||
:path: Flutter/ephemeral/.symlinks/plugins/screen_retriever/macos
|
:path: Flutter/ephemeral/.symlinks/plugins/screen_retriever/macos
|
||||||
sqflite:
|
sqflite:
|
||||||
@ -94,13 +94,13 @@ SPEC CHECKSUMS:
|
|||||||
flutter_custom_cursor: 629957115075c672287bd0fa979d863ccf6024f7
|
flutter_custom_cursor: 629957115075c672287bd0fa979d863ccf6024f7
|
||||||
FlutterMacOS: 8f6f14fa908a6fb3fba0cd85dbd81ec4b251fb24
|
FlutterMacOS: 8f6f14fa908a6fb3fba0cd85dbd81ec4b251fb24
|
||||||
FMDB: 2ce00b547f966261cd18927a3ddb07cb6f3db82a
|
FMDB: 2ce00b547f966261cd18927a3ddb07cb6f3db82a
|
||||||
package_info_plus_macos: f010621b07802a241d96d01876d6705f15e77c1c
|
package_info_plus: 02d7a575e80f194102bef286361c6c326e4c29ce
|
||||||
path_provider_foundation: 37748e03f12783f9de2cb2c4eadfaa25fe6d4852
|
path_provider_foundation: eaf5b3e458fc0e5fbb9940fb09980e853fe058b8
|
||||||
screen_retriever: 59634572a57080243dd1bf715e55b6c54f241a38
|
screen_retriever: 59634572a57080243dd1bf715e55b6c54f241a38
|
||||||
sqflite: a5789cceda41d54d23f31d6de539d65bb14100ea
|
sqflite: a5789cceda41d54d23f31d6de539d65bb14100ea
|
||||||
texture_rgba_renderer: cbed959a3c127122194a364e14b8577bd62dc8f2
|
texture_rgba_renderer: cbed959a3c127122194a364e14b8577bd62dc8f2
|
||||||
uni_links_desktop: 45900fb319df48fcdea2df0756e9c2626696b026
|
uni_links_desktop: 45900fb319df48fcdea2df0756e9c2626696b026
|
||||||
url_launcher_macos: c04e4fa86382d4f94f6b38f14625708be3ae52e2
|
url_launcher_macos: 5335912b679c073563f29d89d33d10d459f95451
|
||||||
wakelock_macos: bc3f2a9bd8d2e6c89fee1e1822e7ddac3bd004a9
|
wakelock_macos: bc3f2a9bd8d2e6c89fee1e1822e7ddac3bd004a9
|
||||||
window_manager: 3a1844359a6295ab1e47659b1a777e36773cd6e8
|
window_manager: 3a1844359a6295ab1e47659b1a777e36773cd6e8
|
||||||
window_size: 339dafa0b27a95a62a843042038fa6c3c48de195
|
window_size: 339dafa0b27a95a62a843042038fa6c3c48de195
|
||||||
|
@ -7,7 +7,7 @@ import desktop_multi_window
|
|||||||
import desktop_drop
|
import desktop_drop
|
||||||
import device_info_plus_macos
|
import device_info_plus_macos
|
||||||
import flutter_custom_cursor
|
import flutter_custom_cursor
|
||||||
import package_info_plus_macos
|
import package_info_plus
|
||||||
import path_provider_foundation
|
import path_provider_foundation
|
||||||
import screen_retriever
|
import screen_retriever
|
||||||
import sqflite
|
import sqflite
|
||||||
|
@ -36,30 +36,33 @@ dependencies:
|
|||||||
provider: ^6.0.3
|
provider: ^6.0.3
|
||||||
tuple: ^2.0.0
|
tuple: ^2.0.0
|
||||||
wakelock: ^0.6.2
|
wakelock: ^0.6.2
|
||||||
|
# Keep this version for the compatibility of some old systems like win7.
|
||||||
device_info_plus: ^4.1.2
|
device_info_plus: ^4.1.2
|
||||||
#firebase_analytics: ^9.1.5
|
#firebase_analytics: ^9.1.5
|
||||||
package_info_plus: ^1.4.2
|
package_info_plus: ^3.1.2
|
||||||
url_launcher: ^6.0.9
|
url_launcher: ^6.0.9
|
||||||
toggle_switch: ^1.4.0
|
toggle_switch: ^2.1.0
|
||||||
dash_chat_2: ^0.0.15
|
dash_chat_2:
|
||||||
|
git:
|
||||||
|
url: https://github.com/Kingtous/Dash-Chat-2.git
|
||||||
draggable_float_widget: ^0.0.2
|
draggable_float_widget: ^0.0.2
|
||||||
settings_ui: ^2.0.2
|
settings_ui: ^2.0.2
|
||||||
flutter_breadcrumb: ^1.0.1
|
flutter_breadcrumb: ^1.0.1
|
||||||
http: ^0.13.4
|
http: ^0.13.4
|
||||||
qr_code_scanner: ^1.0.0
|
qr_code_scanner: ^1.0.0
|
||||||
zxing2: ^0.1.0
|
zxing2: ^0.2.0
|
||||||
image_picker: ^0.8.5
|
image_picker: ^0.8.5
|
||||||
image: ^3.1.3
|
image: ^4.0.17
|
||||||
back_button_interceptor: ^6.0.1
|
back_button_interceptor: ^6.0.1
|
||||||
flutter_rust_bridge: ^1.61.1
|
flutter_rust_bridge: ^1.61.1
|
||||||
window_manager:
|
window_manager:
|
||||||
git:
|
git:
|
||||||
url: https://github.com/Kingtous/rustdesk_window_manager
|
url: https://github.com/Kingtous/rustdesk_window_manager
|
||||||
ref: 94ff0eeb7e20e93f50022b2090f0b6ffb725c7df
|
ref: 8cb5bf683e6b7b3f73280449900fe8d2c6bfe011
|
||||||
desktop_multi_window:
|
desktop_multi_window:
|
||||||
git:
|
git:
|
||||||
url: https://github.com/Kingtous/rustdesk_desktop_multi_window
|
url: https://github.com/Kingtous/rustdesk_desktop_multi_window
|
||||||
ref: 6cd00db1d68443aeeb13dc89f6a090a0ad5dbb3e
|
ref: 30518303e28702bf6b8110465293c05d21bc4cd2
|
||||||
freezed_annotation: ^2.0.3
|
freezed_annotation: ^2.0.3
|
||||||
flutter_custom_cursor: ^0.0.4
|
flutter_custom_cursor: ^0.0.4
|
||||||
window_size:
|
window_size:
|
||||||
@ -68,15 +71,19 @@ dependencies:
|
|||||||
path: plugins/window_size
|
path: plugins/window_size
|
||||||
ref: a738913c8ce2c9f47515382d40827e794a334274
|
ref: a738913c8ce2c9f47515382d40827e794a334274
|
||||||
get: ^4.6.5
|
get: ^4.6.5
|
||||||
visibility_detector: ^0.3.3
|
visibility_detector: ^0.4.0+2
|
||||||
contextmenu: ^3.0.0
|
contextmenu: ^3.0.0
|
||||||
desktop_drop: ^0.3.3
|
desktop_drop:
|
||||||
scroll_pos: ^0.3.0
|
git:
|
||||||
|
url: https://github.com/Kingtous/mixin-flutter-plugins.git
|
||||||
|
ref: ba76531701885d9de8a69ee0167e1610cf76e440
|
||||||
|
path: ./packages/desktop_drop
|
||||||
|
scroll_pos: ^0.4.0
|
||||||
debounce_throttle: ^2.0.0
|
debounce_throttle: ^2.0.0
|
||||||
file_picker: ^5.1.0
|
file_picker: ^5.1.0
|
||||||
flutter_svg: ^1.1.5
|
flutter_svg: ^2.0.5
|
||||||
flutter_improved_scrolling:
|
flutter_improved_scrolling:
|
||||||
# currently, we use flutter 3.7.0+.
|
# currently, we use flutter 3.10.0+.
|
||||||
#
|
#
|
||||||
# for flutter 3.0.5, please use official version(just comment code below).
|
# for flutter 3.0.5, please use official version(just comment code below).
|
||||||
# if build rustdesk by flutter >=3.3, please use our custom pub below (uncomment code below).
|
# if build rustdesk by flutter >=3.3, please use our custom pub below (uncomment code below).
|
||||||
@ -94,7 +101,7 @@ dependencies:
|
|||||||
bot_toast: ^4.0.3
|
bot_toast: ^4.0.3
|
||||||
win32: any
|
win32: any
|
||||||
password_strength: ^0.2.0
|
password_strength: ^0.2.0
|
||||||
flutter_launcher_icons: ^0.11.0
|
flutter_launcher_icons: ^0.13.1
|
||||||
flutter_keyboard_visibility: ^5.4.0
|
flutter_keyboard_visibility: ^5.4.0
|
||||||
texture_rgba_renderer: ^0.0.16
|
texture_rgba_renderer: ^0.0.16
|
||||||
percent_indicator: ^4.2.2
|
percent_indicator: ^4.2.2
|
||||||
|
Loading…
x
Reference in New Issue
Block a user