diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 0000000..769c6ed --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,65 @@ +{ + // 使用 IntelliSense 了解相关属性。 + // 悬停以查看现有属性的描述。 + // 欲了解更多信息,请访问: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + "name": "StarCitizenToolBox", + "request": "launch", + "type": "dart", + }, + { + "name": "StarCitizenToolBox (MSE mode)", + "request": "launch", + "type": "dart", + "args": [ + "--dart-define=MSE=true" + ] + }, + { + "name": "StarCitizenToolBox (profile mode)", + "request": "launch", + "type": "dart", + "flutterMode": "profile" + }, + { + "name": "StarCitizenToolBox (release mode)", + "request": "launch", + "type": "dart", + "flutterMode": "release" + }, + { + "name": "rust_builder", + "cwd": "rust_builder", + "request": "launch", + "type": "dart" + }, + { + "name": "rust_builder (profile mode)", + "cwd": "rust_builder", + "request": "launch", + "type": "dart", + "flutterMode": "profile" + }, + { + "name": "rust_builder (release mode)", + "cwd": "rust_builder", + "request": "launch", + "type": "dart", + "flutterMode": "release" + }, + { + "name": "sct_dev_tools", + "cwd": "packages\\sct_dev_tools", + "request": "launch", + "type": "dart" + }, + { + "name": "build_tool", + "cwd": "rust_builder\\cargokit\\build_tool", + "request": "launch", + "type": "dart" + } + ] +} \ No newline at end of file diff --git a/lib/app.g.dart b/lib/app.g.dart index 10be7e9..136ce31 100644 --- a/lib/app.g.dart +++ b/lib/app.g.dart @@ -22,7 +22,7 @@ final routerProvider = AutoDisposeProvider.internal( @Deprecated('Will be removed in 3.0. Use Ref instead') // ignore: unused_element typedef RouterRef = AutoDisposeProviderRef; -String _$appGlobalModelHash() => r'69ebc282feb714060ad3f9e0dd21ff55f4c46c0d'; +String _$appGlobalModelHash() => r'8aa468bda409c425a76e3ef9e7739ca4ed055d2b'; /// See also [AppGlobalModel]. @ProviderFor(AppGlobalModel) diff --git a/lib/common/rust/api/asar_api.dart b/lib/common/rust/api/asar_api.dart index 719ec7d..f46986d 100644 --- a/lib/common/rust/api/asar_api.dart +++ b/lib/common/rust/api/asar_api.dart @@ -1,5 +1,5 @@ // This file is automatically generated, so please do not edit it. -// @generated by `flutter_rust_bridge`@ 2.7.0. +// @generated by `flutter_rust_bridge`@ 2.8.0. // ignore_for_file: invalid_use_of_internal_member, unused_import, unnecessary_import diff --git a/lib/common/rust/api/http_api.dart b/lib/common/rust/api/http_api.dart index 6024305..09cfcdd 100644 --- a/lib/common/rust/api/http_api.dart +++ b/lib/common/rust/api/http_api.dart @@ -1,5 +1,5 @@ // This file is automatically generated, so please do not edit it. -// @generated by `flutter_rust_bridge`@ 2.7.0. +// @generated by `flutter_rust_bridge`@ 2.8.0. // ignore_for_file: invalid_use_of_internal_member, unused_import, unnecessary_import diff --git a/lib/common/rust/api/rs_process.dart b/lib/common/rust/api/rs_process.dart index 60afc52..a303733 100644 --- a/lib/common/rust/api/rs_process.dart +++ b/lib/common/rust/api/rs_process.dart @@ -1,5 +1,5 @@ // This file is automatically generated, so please do not edit it. -// @generated by `flutter_rust_bridge`@ 2.7.0. +// @generated by `flutter_rust_bridge`@ 2.8.0. // ignore_for_file: invalid_use_of_internal_member, unused_import, unnecessary_import @@ -7,7 +7,7 @@ import '../frb_generated.dart'; import 'package:flutter_rust_bridge/flutter_rust_bridge_for_generated.dart'; // These functions are ignored because they are not marked as `pub`: `_process_output` -// These types are ignored because they are not used by any `pub` functions: `RsProcess` +// These types are ignored because they are neither used by any `pub` functions nor (for structs and enums) marked `#[frb(unignore)]`: `RsProcess` // These function are ignored because they are on traits that is not defined in current crate (put an empty `#[frb]` on it to unignore): `clone` Stream start( diff --git a/lib/common/rust/api/win32_api.dart b/lib/common/rust/api/win32_api.dart index bbab3bf..b2aaadb 100644 --- a/lib/common/rust/api/win32_api.dart +++ b/lib/common/rust/api/win32_api.dart @@ -1,5 +1,5 @@ // This file is automatically generated, so please do not edit it. -// @generated by `flutter_rust_bridge`@ 2.7.0. +// @generated by `flutter_rust_bridge`@ 2.8.0. // ignore_for_file: invalid_use_of_internal_member, unused_import, unnecessary_import diff --git a/lib/common/rust/frb_generated.dart b/lib/common/rust/frb_generated.dart index b643a55..dab23fb 100644 --- a/lib/common/rust/frb_generated.dart +++ b/lib/common/rust/frb_generated.dart @@ -1,5 +1,5 @@ // This file is automatically generated, so please do not edit it. -// @generated by `flutter_rust_bridge`@ 2.7.0. +// @generated by `flutter_rust_bridge`@ 2.8.0. // ignore_for_file: unused_import, unused_element, unnecessary_import, duplicate_ignore, invalid_use_of_internal_member, annotate_overrides, non_constant_identifier_names, curly_braces_in_flow_control_structures, prefer_const_literals_to_create_immutables, unused_field @@ -67,7 +67,7 @@ class RustLib extends BaseEntrypoint { kDefaultExternalLibraryLoaderConfig; @override - String get codegenVersion => '2.7.0'; + String get codegenVersion => '2.8.0'; @override int get rustContentHash => 1832496273; diff --git a/lib/common/rust/frb_generated.io.dart b/lib/common/rust/frb_generated.io.dart index a97489d..b2d5710 100644 --- a/lib/common/rust/frb_generated.io.dart +++ b/lib/common/rust/frb_generated.io.dart @@ -1,5 +1,5 @@ // This file is automatically generated, so please do not edit it. -// @generated by `flutter_rust_bridge`@ 2.7.0. +// @generated by `flutter_rust_bridge`@ 2.8.0. // ignore_for_file: unused_import, unused_element, unnecessary_import, duplicate_ignore, invalid_use_of_internal_member, annotate_overrides, non_constant_identifier_names, curly_braces_in_flow_control_structures, prefer_const_literals_to_create_immutables, unused_field diff --git a/lib/common/rust/http_package.dart b/lib/common/rust/http_package.dart index 24c8ad5..ac2d226 100644 --- a/lib/common/rust/http_package.dart +++ b/lib/common/rust/http_package.dart @@ -1,5 +1,5 @@ // This file is automatically generated, so please do not edit it. -// @generated by `flutter_rust_bridge`@ 2.7.0. +// @generated by `flutter_rust_bridge`@ 2.8.0. // ignore_for_file: invalid_use_of_internal_member, unused_import, unnecessary_import diff --git a/lib/ui/home/dialogs/home_game_login_dialog_ui_model.g.dart b/lib/ui/home/dialogs/home_game_login_dialog_ui_model.g.dart index 6988bf1..5b61602 100644 --- a/lib/ui/home/dialogs/home_game_login_dialog_ui_model.g.dart +++ b/lib/ui/home/dialogs/home_game_login_dialog_ui_model.g.dart @@ -7,7 +7,7 @@ part of 'home_game_login_dialog_ui_model.dart'; // ************************************************************************** String _$homeGameLoginUIModelHash() => - r'8564b8154c2b3d555448e2bf21f62ab6a63bcd29'; + r'85533839693681a697ea7e0b5de9ac766a46d41e'; /// See also [HomeGameLoginUIModel]. @ProviderFor(HomeGameLoginUIModel) diff --git a/lib/ui/home/downloader/home_downloader_ui_model.g.dart b/lib/ui/home/downloader/home_downloader_ui_model.g.dart index 34e71b9..463dd0e 100644 --- a/lib/ui/home/downloader/home_downloader_ui_model.g.dart +++ b/lib/ui/home/downloader/home_downloader_ui_model.g.dart @@ -7,7 +7,7 @@ part of 'home_downloader_ui_model.dart'; // ************************************************************************** String _$homeDownloaderUIModelHash() => - r'ece2e6da4576b945ead5767aea2ccacf5e3e17aa'; + r'24db9bc498a898750c5075e08a9a6c3af6ff9647'; /// See also [HomeDownloaderUIModel]. @ProviderFor(HomeDownloaderUIModel) diff --git a/lib/ui/home/game_doctor/game_doctor_ui_model.dart b/lib/ui/home/game_doctor/game_doctor_ui_model.dart index 822fe37..3b16fa5 100644 --- a/lib/ui/home/game_doctor/game_doctor_ui_model.dart +++ b/lib/ui/home/game_doctor/game_doctor_ui_model.dart @@ -129,7 +129,7 @@ class HomeGameDoctorUIModel extends _$HomeGameDoctorUIModel { final scInstalledPath = homeState.scInstalledPath!; final checkResult = >[]; - // TODO for debug + // for debug // checkResult?.add(MapEntry("unSupport_system", "android")); // checkResult?.add(MapEntry("nvme_PhysicalBytes", "C")); // checkResult?.add(MapEntry("no_live_path", "")); diff --git a/lib/ui/home/home_ui_model.g.dart b/lib/ui/home/home_ui_model.g.dart index 52a3124..b171b51 100644 --- a/lib/ui/home/home_ui_model.g.dart +++ b/lib/ui/home/home_ui_model.g.dart @@ -6,7 +6,7 @@ part of 'home_ui_model.dart'; // RiverpodGenerator // ************************************************************************** -String _$homeUIModelHash() => r'10389d5b134e1ab545b792a814d13a832c2cfc06'; +String _$homeUIModelHash() => r'3ff5a689cae80acdaf95ee823da9b86615bed95f'; /// See also [HomeUIModel]. @ProviderFor(HomeUIModel) diff --git a/lib/ui/home/localization/localization_ui_model.g.dart b/lib/ui/home/localization/localization_ui_model.g.dart index 6dc0eb9..6a67c3d 100644 --- a/lib/ui/home/localization/localization_ui_model.g.dart +++ b/lib/ui/home/localization/localization_ui_model.g.dart @@ -7,7 +7,7 @@ part of 'localization_ui_model.dart'; // ************************************************************************** String _$localizationUIModelHash() => - r'4d77028b8fb92490a1ff3292c667e9a2923d32cc'; + r'03f091f71cf0422c36c987844c92139a4407ecaa'; /// See also [LocalizationUIModel]. @ProviderFor(LocalizationUIModel) diff --git a/lib/ui/tools/tools_ui_model.g.dart b/lib/ui/tools/tools_ui_model.g.dart index bfcdd63..8f0a1b9 100644 --- a/lib/ui/tools/tools_ui_model.g.dart +++ b/lib/ui/tools/tools_ui_model.g.dart @@ -6,7 +6,7 @@ part of 'tools_ui_model.dart'; // RiverpodGenerator // ************************************************************************** -String _$toolsUIModelHash() => r'b0f314abe69c56d4e5e1ac0e89d848b55daabb4f'; +String _$toolsUIModelHash() => r'ba4d824a61e83b496dbff4d7b5f2e29bd2ed4904'; /// See also [ToolsUIModel]. @ProviderFor(ToolsUIModel) diff --git a/macos/Flutter/GeneratedPluginRegistrant.swift b/macos/Flutter/GeneratedPluginRegistrant.swift index 91ff0cb..5630bd4 100644 --- a/macos/Flutter/GeneratedPluginRegistrant.swift +++ b/macos/Flutter/GeneratedPluginRegistrant.swift @@ -7,6 +7,7 @@ import Foundation import desktop_webview_window import device_info_plus +import file_picker import macos_window_utils import path_provider_foundation import screen_retriever_macos @@ -16,6 +17,7 @@ import window_manager func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) { DesktopWebviewWindowPlugin.register(with: registry.registrar(forPlugin: "DesktopWebviewWindowPlugin")) DeviceInfoPlusMacosPlugin.register(with: registry.registrar(forPlugin: "DeviceInfoPlusMacosPlugin")) + FilePickerPlugin.register(with: registry.registrar(forPlugin: "FilePickerPlugin")) MacOSWindowUtilsPlugin.register(with: registry.registrar(forPlugin: "MacOSWindowUtilsPlugin")) PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin")) ScreenRetrieverMacosPlugin.register(with: registry.registrar(forPlugin: "ScreenRetrieverMacosPlugin")) diff --git a/rust/src/frb_generated.rs b/rust/src/frb_generated.rs index 1c71df7..8e293c4 100644 --- a/rust/src/frb_generated.rs +++ b/rust/src/frb_generated.rs @@ -1,5 +1,5 @@ // This file is automatically generated, so please do not edit it. -// @generated by `flutter_rust_bridge`@ 2.7.0. +// @generated by `flutter_rust_bridge`@ 2.8.0. #![allow( non_camel_case_types, @@ -36,7 +36,7 @@ flutter_rust_bridge::frb_generated_boilerplate!( default_rust_opaque = RustOpaqueNom, default_rust_auto_opaque = RustAutoOpaqueNom, ); -pub(crate) const FLUTTER_RUST_BRIDGE_CODEGEN_VERSION: &str = "2.7.0"; +pub(crate) const FLUTTER_RUST_BRIDGE_CODEGEN_VERSION: &str = "2.8.0"; pub(crate) const FLUTTER_RUST_BRIDGE_CODEGEN_CONTENT_HASH: i32 = 1832496273; // Section: executor @@ -1144,7 +1144,7 @@ impl SseEncode for () { #[cfg(not(target_family = "wasm"))] mod io { // This file is automatically generated, so please do not edit it. - // @generated by `flutter_rust_bridge`@ 2.7.0. + // @generated by `flutter_rust_bridge`@ 2.8.0. // Section: imports @@ -1361,7 +1361,7 @@ mod io { } } - #[no_mangle] + #[unsafe(no_mangle)] pub extern "C" fn frbgen_starcitizen_doctor_wire__crate__api__http_api__dns_lookup_ips( port_: i64, host: *mut wire_cst_list_prim_u_8_strict, @@ -1369,7 +1369,7 @@ mod io { wire__crate__api__http_api__dns_lookup_ips_impl(port_, host) } - #[no_mangle] + #[unsafe(no_mangle)] pub extern "C" fn frbgen_starcitizen_doctor_wire__crate__api__http_api__dns_lookup_txt( port_: i64, host: *mut wire_cst_list_prim_u_8_strict, @@ -1377,7 +1377,7 @@ mod io { wire__crate__api__http_api__dns_lookup_txt_impl(port_, host) } - #[no_mangle] + #[unsafe(no_mangle)] pub extern "C" fn frbgen_starcitizen_doctor_wire__crate__api__http_api__fetch( port_: i64, method: i32, @@ -1398,7 +1398,7 @@ mod io { ) } - #[no_mangle] + #[unsafe(no_mangle)] pub extern "C" fn frbgen_starcitizen_doctor_wire__crate__api__asar_api__get_rsi_launcher_asar_data( port_: i64, asar_path: *mut wire_cst_list_prim_u_8_strict, @@ -1406,7 +1406,7 @@ mod io { wire__crate__api__asar_api__get_rsi_launcher_asar_data_impl(port_, asar_path) } - #[no_mangle] + #[unsafe(no_mangle)] pub extern "C" fn frbgen_starcitizen_doctor_wire__crate__api__asar_api__rsi_launcher_asar_data_write_main_js( port_: i64, that: *mut wire_cst_rsi_launcher_asar_data, @@ -1415,7 +1415,7 @@ mod io { wire__crate__api__asar_api__rsi_launcher_asar_data_write_main_js_impl(port_, that, content) } - #[no_mangle] + #[unsafe(no_mangle)] pub extern "C" fn frbgen_starcitizen_doctor_wire__crate__api__win32_api__send_notify( port_: i64, summary: *mut wire_cst_list_prim_u_8_strict, @@ -1426,7 +1426,7 @@ mod io { wire__crate__api__win32_api__send_notify_impl(port_, summary, body, app_name, app_id) } - #[no_mangle] + #[unsafe(no_mangle)] pub extern "C" fn frbgen_starcitizen_doctor_wire__crate__api__http_api__set_default_header( port_: i64, headers: *mut wire_cst_list_record_string_string, @@ -1434,7 +1434,7 @@ mod io { wire__crate__api__http_api__set_default_header_impl(port_, headers) } - #[no_mangle] + #[unsafe(no_mangle)] pub extern "C" fn frbgen_starcitizen_doctor_wire__crate__api__win32_api__set_foreground_window( port_: i64, window_name: *mut wire_cst_list_prim_u_8_strict, @@ -1442,7 +1442,7 @@ mod io { wire__crate__api__win32_api__set_foreground_window_impl(port_, window_name) } - #[no_mangle] + #[unsafe(no_mangle)] pub extern "C" fn frbgen_starcitizen_doctor_wire__crate__api__rs_process__start( port_: i64, executable: *mut wire_cst_list_prim_u_8_strict, @@ -1459,7 +1459,7 @@ mod io { ) } - #[no_mangle] + #[unsafe(no_mangle)] pub extern "C" fn frbgen_starcitizen_doctor_wire__crate__api__rs_process__write( port_: i64, rs_pid: u32, @@ -1468,12 +1468,12 @@ mod io { wire__crate__api__rs_process__write_impl(port_, rs_pid, data) } - #[no_mangle] + #[unsafe(no_mangle)] pub extern "C" fn frbgen_starcitizen_doctor_cst_new_box_autoadd_bool(value: bool) -> *mut bool { flutter_rust_bridge::for_generated::new_leak_box_ptr(value) } - #[no_mangle] + #[unsafe(no_mangle)] pub extern "C" fn frbgen_starcitizen_doctor_cst_new_box_autoadd_rsi_launcher_asar_data( ) -> *mut wire_cst_rsi_launcher_asar_data { flutter_rust_bridge::for_generated::new_leak_box_ptr( @@ -1481,12 +1481,12 @@ mod io { ) } - #[no_mangle] + #[unsafe(no_mangle)] pub extern "C" fn frbgen_starcitizen_doctor_cst_new_box_autoadd_u_64(value: u64) -> *mut u64 { flutter_rust_bridge::for_generated::new_leak_box_ptr(value) } - #[no_mangle] + #[unsafe(no_mangle)] pub extern "C" fn frbgen_starcitizen_doctor_cst_new_list_String( len: i32, ) -> *mut wire_cst_list_String { @@ -1500,7 +1500,7 @@ mod io { flutter_rust_bridge::for_generated::new_leak_box_ptr(wrap) } - #[no_mangle] + #[unsafe(no_mangle)] pub extern "C" fn frbgen_starcitizen_doctor_cst_new_list_prim_u_8_loose( len: i32, ) -> *mut wire_cst_list_prim_u_8_loose { @@ -1511,7 +1511,7 @@ mod io { flutter_rust_bridge::for_generated::new_leak_box_ptr(ans) } - #[no_mangle] + #[unsafe(no_mangle)] pub extern "C" fn frbgen_starcitizen_doctor_cst_new_list_prim_u_8_strict( len: i32, ) -> *mut wire_cst_list_prim_u_8_strict { @@ -1522,7 +1522,7 @@ mod io { flutter_rust_bridge::for_generated::new_leak_box_ptr(ans) } - #[no_mangle] + #[unsafe(no_mangle)] pub extern "C" fn frbgen_starcitizen_doctor_cst_new_list_record_string_string( len: i32, ) -> *mut wire_cst_list_record_string_string {