diff --git a/lib/constants/meta_info.dart b/lib/constants/meta_info.dart index 18d5838..cceab28 100644 --- a/lib/constants/meta_info.dart +++ b/lib/constants/meta_info.dart @@ -3,7 +3,8 @@ import 'package:cliptopia/core/utils.dart'; class MetaInfo { MetaInfo._(); - static String get version => "v1.0.0+2"; + static String get version => "v1.0.0+3"; + static String get daemonCompatibleVersion => "v0.0.3"; static const daemonDownloadUrl = "https://github.com/omegaui/cliptopia_daemon/raw/master/cliptopia-daemon"; static final daemonDownloadedBinaryPath = combineHomePath([ diff --git a/lib/constants/usage.dart b/lib/constants/usage.dart index 796ba78..526d50a 100644 --- a/lib/constants/usage.dart +++ b/lib/constants/usage.dart @@ -4,19 +4,26 @@ class Usage { static void logUsage({describe = true}) { if (describe) { stdout.writeln("The state-of-the-art clipboard manager."); + stdout.writeln( + "See Project on GitHub: https://github.com/omegaui/cliptopia"); stdout.writeln(); } stdout.writeln("Usage: cliptopia [OPTIONS]"); stdout.writeln("where OPTIONS could be one of these:"); stdout.writeln(); - stdout.writeln("\t--debug Enable printing logs to the terminal"); stdout.writeln( - "\t--silent Closes the GUI once an insertion choice is made"); - stdout.writeln("\t--version Prints program version"); - stdout - .writeln("\t--silent Closes the app once you make a selection"); + "\t--debug Enable printing logs to the terminal"); stdout.writeln( - "\t--power An Effective Mode can be triggered with Super + V"); - stdout.writeln("\t--help Prints this help message"); + "\t--silent Closes the GUI once an insertion choice is made"); + stdout.writeln( + "\t--version Prints program version"); + stdout.writeln( + "\t--silent Closes the app once you make a selection"); + stdout.writeln( + "\t--power An Effective Mode can be triggered with Super + V"); + stdout.writeln( + "\t--daemon-compatible-version Prints the required daemon version"); + stdout.writeln( + "\t--help Prints this help message"); } } diff --git a/lib/core/argument_handler.dart b/lib/core/argument_handler.dart index d742a98..9861efc 100644 --- a/lib/core/argument_handler.dart +++ b/lib/core/argument_handler.dart @@ -8,6 +8,7 @@ class ArgumentHandler { '--silent', '--power', '--version', + '--daemon-compatible-version', '--help', ]; @@ -23,6 +24,10 @@ class ArgumentHandler { return _arguments.contains('--version'); } + static bool shouldShowDaemonCompatibleVersion() { + return _arguments.contains('--daemon-compatible-version'); + } + static bool isDebugMode() { return _arguments.contains('--debug'); } diff --git a/lib/main.dart b/lib/main.dart index 6059ddf..0871803 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -42,6 +42,12 @@ void main(List arguments) { return; } + if (ArgumentHandler.shouldShowDaemonCompatibleVersion()) { + stdout.writeln( + "Compatible Cliptopia Daemon version ${MetaInfo.daemonCompatibleVersion}"); + return; + } + WidgetsFlutterBinding.ensureInitialized(); // Initializing App Storage diff --git a/pubspec.yaml b/pubspec.yaml index d6735b9..062946e 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -3,7 +3,7 @@ description: The state-of-the-art clipboard manager. publish_to: 'none' # Remove this line if you wish to publish to pub.dev -version: 1.0.0+2 +version: 1.0.0+3 environment: sdk: '>=3.1.4 <4.0.0'