diff --git a/ios/Podfile.lock b/ios/Podfile.lock index 231dfafb..c9335527 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -6,8 +6,6 @@ PODS: - Flutter (1.0.0) - flutter_native_splash (0.0.1): - Flutter - - flutter_secure_storage (6.0.0): - - Flutter - icloud_storage (0.0.1): - Flutter - local_auth_ios (0.0.1): @@ -34,7 +32,6 @@ DEPENDENCIES: - file_picker (from `.symlinks/plugins/file_picker/ios`) - Flutter (from `Flutter`) - flutter_native_splash (from `.symlinks/plugins/flutter_native_splash/ios`) - - flutter_secure_storage (from `.symlinks/plugins/flutter_secure_storage/ios`) - icloud_storage (from `.symlinks/plugins/icloud_storage/ios`) - local_auth_ios (from `.symlinks/plugins/local_auth_ios/ios`) - path_provider_foundation (from `.symlinks/plugins/path_provider_foundation/darwin`) @@ -54,8 +51,6 @@ EXTERNAL SOURCES: :path: Flutter flutter_native_splash: :path: ".symlinks/plugins/flutter_native_splash/ios" - flutter_secure_storage: - :path: ".symlinks/plugins/flutter_secure_storage/ios" icloud_storage: :path: ".symlinks/plugins/icloud_storage/ios" local_auth_ios: @@ -80,7 +75,6 @@ SPEC CHECKSUMS: file_picker: 1d63c4949e05e386da864365f8c13e1e64787675 Flutter: f04841e97a9d0b0a8025694d0796dd46242b2854 flutter_native_splash: 52501b97d1c0a5f898d687f1646226c1f93c56ef - flutter_secure_storage: 23fc622d89d073675f2eaa109381aefbcf5a49be icloud_storage: d9ac7a33ced81df08ba7ea1bf3099cc0ee58f60a local_auth_ios: c6cf091ded637a88f24f86a8875d8b0f526e2605 path_provider_foundation: 29f094ae23ebbca9d3d0cec13889cd9060c0e943 diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj index 41727cbf..b91f8b01 100644 --- a/ios/Runner.xcodeproj/project.pbxproj +++ b/ios/Runner.xcodeproj/project.pbxproj @@ -586,7 +586,7 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; - CURRENT_PROJECT_VERSION = 648; + CURRENT_PROJECT_VERSION = 649; DEVELOPMENT_TEAM = BA88US33G6; ENABLE_BITCODE = NO; INFOPLIST_FILE = "Runner/Info-$(CONFIGURATION).plist"; @@ -596,7 +596,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 1.0.648; + MARKETING_VERSION = 1.0.649; PRODUCT_BUNDLE_IDENTIFIER = com.lollipopkit.toolbox; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; @@ -720,7 +720,7 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; - CURRENT_PROJECT_VERSION = 648; + CURRENT_PROJECT_VERSION = 649; DEVELOPMENT_TEAM = BA88US33G6; ENABLE_BITCODE = NO; INFOPLIST_FILE = "Runner/Info-$(CONFIGURATION).plist"; @@ -730,7 +730,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 1.0.648; + MARKETING_VERSION = 1.0.649; PRODUCT_BUNDLE_IDENTIFIER = com.lollipopkit.toolbox; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; @@ -748,7 +748,7 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; - CURRENT_PROJECT_VERSION = 648; + CURRENT_PROJECT_VERSION = 649; DEVELOPMENT_TEAM = BA88US33G6; ENABLE_BITCODE = NO; INFOPLIST_FILE = "Runner/Info-$(CONFIGURATION).plist"; @@ -758,7 +758,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 1.0.648; + MARKETING_VERSION = 1.0.649; PRODUCT_BUNDLE_IDENTIFIER = com.lollipopkit.toolbox; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; @@ -779,7 +779,7 @@ CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 648; + CURRENT_PROJECT_VERSION = 649; DEVELOPMENT_TEAM = BA88US33G6; GCC_C_LANGUAGE_STANDARD = gnu11; GENERATE_INFOPLIST_FILE = YES; @@ -792,7 +792,7 @@ "@executable_path/Frameworks", "@executable_path/../../Frameworks", ); - MARKETING_VERSION = 1.0.648; + MARKETING_VERSION = 1.0.649; MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; MTL_FAST_MATH = YES; PRODUCT_BUNDLE_IDENTIFIER = com.lollipopkit.toolbox.StatusWidget; @@ -818,7 +818,7 @@ CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 648; + CURRENT_PROJECT_VERSION = 649; DEVELOPMENT_TEAM = BA88US33G6; GCC_C_LANGUAGE_STANDARD = gnu11; GENERATE_INFOPLIST_FILE = YES; @@ -831,7 +831,7 @@ "@executable_path/Frameworks", "@executable_path/../../Frameworks", ); - MARKETING_VERSION = 1.0.648; + MARKETING_VERSION = 1.0.649; MTL_FAST_MATH = YES; PRODUCT_BUNDLE_IDENTIFIER = com.lollipopkit.toolbox.StatusWidget; PRODUCT_NAME = "$(TARGET_NAME)"; @@ -854,7 +854,7 @@ CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 648; + CURRENT_PROJECT_VERSION = 649; DEVELOPMENT_TEAM = BA88US33G6; GCC_C_LANGUAGE_STANDARD = gnu11; GENERATE_INFOPLIST_FILE = YES; @@ -867,7 +867,7 @@ "@executable_path/Frameworks", "@executable_path/../../Frameworks", ); - MARKETING_VERSION = 1.0.648; + MARKETING_VERSION = 1.0.649; MTL_FAST_MATH = YES; PRODUCT_BUNDLE_IDENTIFIER = com.lollipopkit.toolbox.StatusWidget; PRODUCT_NAME = "$(TARGET_NAME)"; @@ -890,7 +890,7 @@ CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 648; + CURRENT_PROJECT_VERSION = 649; DEVELOPMENT_ASSET_PATHS = ""; DEVELOPMENT_TEAM = BA88US33G6; ENABLE_PREVIEWS = YES; @@ -902,7 +902,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 1.0.648; + MARKETING_VERSION = 1.0.649; MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; MTL_FAST_MATH = YES; PRODUCT_BUNDLE_IDENTIFIER = com.lollipopkit.toolbox.WatchEnd; @@ -931,7 +931,7 @@ CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 648; + CURRENT_PROJECT_VERSION = 649; DEVELOPMENT_ASSET_PATHS = ""; DEVELOPMENT_TEAM = BA88US33G6; ENABLE_PREVIEWS = YES; @@ -943,7 +943,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 1.0.648; + MARKETING_VERSION = 1.0.649; MTL_FAST_MATH = YES; PRODUCT_BUNDLE_IDENTIFIER = com.lollipopkit.toolbox.WatchEnd; PRODUCT_NAME = ServerBox; @@ -969,7 +969,7 @@ CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 648; + CURRENT_PROJECT_VERSION = 649; DEVELOPMENT_ASSET_PATHS = ""; DEVELOPMENT_TEAM = BA88US33G6; ENABLE_PREVIEWS = YES; @@ -981,7 +981,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 1.0.648; + MARKETING_VERSION = 1.0.649; MTL_FAST_MATH = YES; PRODUCT_BUNDLE_IDENTIFIER = com.lollipopkit.toolbox.WatchEnd; PRODUCT_NAME = ServerBox; diff --git a/lib/core/persistant_store.dart b/lib/core/persistant_store.dart index 73f7f3f1..bb409e0b 100644 --- a/lib/core/persistant_store.dart +++ b/lib/core/persistant_store.dart @@ -1,38 +1,36 @@ import 'dart:async'; -import 'dart:convert'; import 'dart:io'; import 'package:flutter/foundation.dart'; -import 'package:flutter_secure_storage/flutter_secure_storage.dart'; import 'package:hive_flutter/hive_flutter.dart'; import 'package:toolbox/data/res/path.dart'; -class SecureStore { - SecureStore._(); +// class SecureStore { +// SecureStore._(); - static const _secureStorage = FlutterSecureStorage(); +// static const _secureStorage = FlutterSecureStorage(); - static HiveAesCipher? _cipher; +// static HiveAesCipher? _cipher; - static const _hiveKey = 'hive_key'; +// static const _hiveKey = 'hive_key'; - static Future init() async { - final encryptionKeyString = await _secureStorage.read(key: _hiveKey); - if (encryptionKeyString == null) { - final key = Hive.generateSecureKey(); - await _secureStorage.write( - key: _hiveKey, - value: base64UrlEncode(key), - ); - } - final key = await _secureStorage.read(key: _hiveKey); - if (key == null) { - throw Exception('Failed to init SecureStore'); - } - final encryptionKeyUint8List = base64Url.decode(key); - _cipher = HiveAesCipher(encryptionKeyUint8List); - } -} +// static Future init() async { +// final encryptionKeyString = await _secureStorage.read(key: _hiveKey); +// if (encryptionKeyString == null) { +// final key = Hive.generateSecureKey(); +// await _secureStorage.write( +// key: _hiveKey, +// value: base64UrlEncode(key), +// ); +// } +// final key = await _secureStorage.read(key: _hiveKey); +// if (key == null) { +// throw Exception('Failed to init SecureStore'); +// } +// final encryptionKeyUint8List = base64Url.decode(key); +// _cipher = HiveAesCipher(encryptionKeyUint8List); +// } +// } class PersistentStore { late final Box box; @@ -43,7 +41,7 @@ class PersistentStore { Future init() async => box = await Hive.openBox( boxName, - encryptionCipher: SecureStore._cipher, + //encryptionCipher: SecureStore._cipher, ); /// Get all db filenames. diff --git a/lib/data/res/build_data.dart b/lib/data/res/build_data.dart index c0a61a1e..8c73773f 100644 --- a/lib/data/res/build_data.dart +++ b/lib/data/res/build_data.dart @@ -2,9 +2,9 @@ class BuildData { static const String name = "ServerBox"; - static const int build = 648; + static const int build = 649; static const String engine = "3.16.0"; - static const String buildAt = "2023-11-23 22:02:19"; - static const int modifications = 4; + static const String buildAt = "2023-11-23 22:29:30"; + static const int modifications = 11; static const int script = 29; } diff --git a/linux/flutter/generated_plugin_registrant.cc b/linux/flutter/generated_plugin_registrant.cc index 075ecba3..fe56f8d8 100644 --- a/linux/flutter/generated_plugin_registrant.cc +++ b/linux/flutter/generated_plugin_registrant.cc @@ -7,16 +7,12 @@ #include "generated_plugin_registrant.h" #include -#include #include void fl_register_plugins(FlPluginRegistry* registry) { g_autoptr(FlPluginRegistrar) dynamic_color_registrar = fl_plugin_registry_get_registrar_for_plugin(registry, "DynamicColorPlugin"); dynamic_color_plugin_register_with_registrar(dynamic_color_registrar); - g_autoptr(FlPluginRegistrar) flutter_secure_storage_linux_registrar = - fl_plugin_registry_get_registrar_for_plugin(registry, "FlutterSecureStorageLinuxPlugin"); - flutter_secure_storage_linux_plugin_register_with_registrar(flutter_secure_storage_linux_registrar); g_autoptr(FlPluginRegistrar) url_launcher_linux_registrar = fl_plugin_registry_get_registrar_for_plugin(registry, "UrlLauncherPlugin"); url_launcher_plugin_register_with_registrar(url_launcher_linux_registrar); diff --git a/linux/flutter/generated_plugins.cmake b/linux/flutter/generated_plugins.cmake index 6fd458b2..18366213 100644 --- a/linux/flutter/generated_plugins.cmake +++ b/linux/flutter/generated_plugins.cmake @@ -4,7 +4,6 @@ list(APPEND FLUTTER_PLUGIN_LIST dynamic_color - flutter_secure_storage_linux url_launcher_linux ) diff --git a/macos/Flutter/GeneratedPluginRegistrant.swift b/macos/Flutter/GeneratedPluginRegistrant.swift index e9fcb352..d192c478 100644 --- a/macos/Flutter/GeneratedPluginRegistrant.swift +++ b/macos/Flutter/GeneratedPluginRegistrant.swift @@ -6,7 +6,6 @@ import FlutterMacOS import Foundation import dynamic_color -import flutter_secure_storage_macos import icloud_storage import macos_window_utils import path_provider_foundation @@ -16,7 +15,6 @@ import url_launcher_macos func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) { DynamicColorPlugin.register(with: registry.registrar(forPlugin: "DynamicColorPlugin")) - FlutterSecureStoragePlugin.register(with: registry.registrar(forPlugin: "FlutterSecureStoragePlugin")) IcloudStoragePlugin.register(with: registry.registrar(forPlugin: "IcloudStoragePlugin")) MacOSWindowUtilsPlugin.register(with: registry.registrar(forPlugin: "MacOSWindowUtilsPlugin")) PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin")) diff --git a/make.dart b/make.dart index 75cc7530..37252854 100755 --- a/make.dart +++ b/make.dart @@ -11,6 +11,7 @@ const apkPath = 'build/app/outputs/flutter-apk/app-release.apk'; const appleXCConfigPath = 'Runner.xcodeproj/project.pbxproj'; const macOSArchievePath = 'build/macos/Build/Products/Release/server_box.app'; const releaseDir = '/Volumes/pm981/release/serverbox'; +const shellScriptPath = 'lib/data/model/app/shell_func.dart'; var regAppleProjectVer = RegExp(r'CURRENT_PROJECT_VERSION = .+;'); var regAppleMarketVer = RegExp(r'MARKETING_VERSION = .+'); @@ -34,8 +35,12 @@ Future getGitCommitCount() async { } Future getScriptCommitCount() async { - final result = await Process.run( - 'git', ['log', '--oneline', 'lib/data/model/app/shell_func.dart']); + if (!await File(shellScriptPath).exists()) { + print('File not found: $shellScriptPath'); + exit(1); + } + final result = + await Process.run('git', ['log', '--oneline', shellScriptPath]); return (result.stdout as String) .split('\n') .where((line) => line.isNotEmpty) diff --git a/pubspec.lock b/pubspec.lock index 0e7e32ba..5aa0e0fc 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -364,54 +364,6 @@ packages: url: "https://pub.dev" source: hosted version: "2.0.17" - flutter_secure_storage: - dependency: "direct main" - description: - name: flutter_secure_storage - sha256: ffdbb60130e4665d2af814a0267c481bcf522c41ae2e43caf69fa0146876d685 - url: "https://pub.dev" - source: hosted - version: "9.0.0" - flutter_secure_storage_linux: - dependency: transitive - description: - name: flutter_secure_storage_linux - sha256: "3d5032e314774ee0e1a7d0a9f5e2793486f0dff2dd9ef5a23f4e3fb2a0ae6a9e" - url: "https://pub.dev" - source: hosted - version: "1.2.0" - flutter_secure_storage_macos: - dependency: transitive - description: - name: flutter_secure_storage_macos - sha256: bd33935b4b628abd0b86c8ca20655c5b36275c3a3f5194769a7b3f37c905369c - url: "https://pub.dev" - source: hosted - version: "3.0.1" - flutter_secure_storage_platform_interface: - dependency: transitive - description: - name: flutter_secure_storage_platform_interface - sha256: "0d4d3a5dd4db28c96ae414d7ba3b8422fd735a8255642774803b2532c9a61d7e" - url: "https://pub.dev" - source: hosted - version: "1.0.2" - flutter_secure_storage_web: - dependency: transitive - description: - name: flutter_secure_storage_web - sha256: "30f84f102df9dcdaa2241866a958c2ec976902ebdaa8883fbfe525f1f2f3cf20" - url: "https://pub.dev" - source: hosted - version: "1.1.2" - flutter_secure_storage_windows: - dependency: transitive - description: - name: flutter_secure_storage_windows - sha256: "5809c66f9dd3b4b93b0a6e2e8561539405322ee767ac2f64d084e2ab5429d108" - url: "https://pub.dev" - source: hosted - version: "3.0.0" flutter_test: dependency: "direct dev" description: flutter diff --git a/pubspec.yaml b/pubspec.yaml index 6876f79e..ce226bba 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -59,7 +59,7 @@ dependencies: ref: master url: https://github.com/lollipopkit/watch_connectivity choice: ^2.0.0 - flutter_secure_storage: ^9.0.0 + #flutter_secure_storage: ^9.0.0 dev_dependencies: flutter_native_splash: ^2.1.6 diff --git a/test/nvdia.dart b/test/nvdia.dart new file mode 100644 index 00000000..d5ef5aea --- /dev/null +++ b/test/nvdia.dart @@ -0,0 +1,55 @@ +import 'package:flutter_test/flutter_test.dart'; + +const _raw = ''' ++-----------------------------------------------------------------------------+ +| NVIDIA-SMI 455.23 Driver Version: 455.23 CUDA Version: 11.1 | +|-------------------------------+----------------------+----------------------+ +| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC | +| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. | +| | | MIG M. | +|===============================+======================+======================| +| 0 GeForce RTX 3090 Off | 00000000:01:00.0 Off | N/A | +| 30% 40C P8 30W / 350W | 240MiB / 24268MiB | 5% Default | ++-------------------------------+----------------------+----------------------+ +| 1 GeForce RTX 2080 Off | 00000000:02:00.0 On | N/A | +| 30% 51C P2 70W / 225W | 1080MiB / 8192MiB | 27% Default | ++-------------------------------+----------------------+----------------------+ + ++-----------------------------------------------------------------------------+ +| Processes: | +| GPU GI CI PID Type Process name GPU Memory | +| ID ID Usage | +|=============================================================================| +| 0 N/A N/A 1456 G /usr/lib/xorg/Xorg 40MiB | +| 0 N/A N/A 1589 G /usr/bin/gnome-shell 70MiB | +| 1 N/A N/A 1456 G /usr/lib/xorg/Xorg 400MiB | +| 1 N/A N/A 1589 G /usr/bin/gnome-shell 300MiB | +| 1 N/A N/A 2112 G ...AAAAAAAAA= --shared-files 200MiB | ++-----------------------------------------------------------------------------+ +'''; + +/// [ +/// { +/// "name": "GeForce RTX 3090", +/// "temp": 40, +/// "power": "30W / 350W", +/// "memory": { +/// "total": 24268, +/// "used": 240, +/// "unit": "MiB", +/// "processes": [ +/// { +/// "pid": 1456, +/// "name": "/usr/lib/xorg/Xorg", +/// "memory": 40 +/// }, +/// ] +/// }, +/// } +/// ] + +void main() { + test('nvdia-smi', () { + + }); +} \ No newline at end of file diff --git a/windows/flutter/generated_plugin_registrant.cc b/windows/flutter/generated_plugin_registrant.cc index c9376028..7a68426d 100644 --- a/windows/flutter/generated_plugin_registrant.cc +++ b/windows/flutter/generated_plugin_registrant.cc @@ -7,7 +7,6 @@ #include "generated_plugin_registrant.h" #include -#include #include #include #include @@ -15,8 +14,6 @@ void RegisterPlugins(flutter::PluginRegistry* registry) { DynamicColorPluginCApiRegisterWithRegistrar( registry->GetRegistrarForPlugin("DynamicColorPluginCApi")); - FlutterSecureStorageWindowsPluginRegisterWithRegistrar( - registry->GetRegistrarForPlugin("FlutterSecureStorageWindowsPlugin")); LocalAuthPluginRegisterWithRegistrar( registry->GetRegistrarForPlugin("LocalAuthPlugin")); SharePlusWindowsPluginCApiRegisterWithRegistrar( diff --git a/windows/flutter/generated_plugins.cmake b/windows/flutter/generated_plugins.cmake index f365b677..d8bef0fa 100644 --- a/windows/flutter/generated_plugins.cmake +++ b/windows/flutter/generated_plugins.cmake @@ -4,7 +4,6 @@ list(APPEND FLUTTER_PLUGIN_LIST dynamic_color - flutter_secure_storage_windows local_auth_windows share_plus url_launcher_windows