From 61402146440d24de2d2c6f5eaa770b1721e6aff5 Mon Sep 17 00:00:00 2001 From: Lenny4 Date: Tue, 20 Jun 2023 23:21:49 -0400 Subject: [PATCH 1/2] chown windows --- CHANGELOG.md | 25 +++- lib/class/release.dart | 3 + lib/class/release.g.dart | 2 + lib/class/release_asset.dart | 5 + lib/class/release_asset.g.dart | 4 + lib/main.dart | 36 ++---- lib/screens/help_screen.dart | 66 ++++++++++ lib/screens/tutorial_screen.dart | 115 ------------------ .../common/deepfacelab_command_widget.dart | 25 ++-- lib/widget/common/open_issue_widget.dart | 68 +++-------- lib/widget/common/release_widget.dart | 30 ++++- lib/widget/common/self_promotion_widget.dart | 20 +++ .../installation/has_requirements_widget.dart | 3 +- .../installation/installation_widget.dart | 47 ++----- .../requirement_linux_widget.dart | 101 ++------------- pubspec.lock | 8 ++ pubspec.yaml | 3 +- 17 files changed, 213 insertions(+), 348 deletions(-) create mode 100644 lib/screens/help_screen.dart delete mode 100644 lib/screens/tutorial_screen.dart create mode 100644 lib/widget/common/self_promotion_widget.dart diff --git a/CHANGELOG.md b/CHANGELOG.md index 61812d3..6eb7a40 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,21 @@ ### Removed +## [0.3.0] - 2023-06-20 + +### Added + +- Add self promotion on the home screen and help screen +- Add more info on release (download count, release date) + +### Changed + +- Copy `msvcp140.dll` `vcruntime140.dll` and `vcruntime140_1.dll` directly from the github host ( + windows) + +see `Copy dll files` in `.github/workflows/release.yml` +- Change screen `Tutorials` to `Help` and add more useful links + ## [0.2.0] - 2023-06-18 ### Added @@ -22,20 +37,22 @@ Note: need to install it manually from the github if on windows. ### Fixed -- Fix the bug on windows which erased DeepFaceLabClient when trying to install a release (/!\ the bug is still present in earlier versions) +- Fix the bug on windows which erased DeepFaceLabClient when trying to install a release (/!\ the + bug is still present in earlier versions) ## [0.1.1] - 2023-06-13 -Note: on this version installing another release doesn't work (on windows), you need to install it manually from the github. +Note: on this version installing another release doesn't work (on windows), you need to install it +manually from the github. ### Fixed - Fix download Miniconda3-latest-Linux-x86_64.sh with no certificate - ## [0.1.0] - 2023-06-12 -Note: on this version installing another release doesn't work (on windows), you need to install it manually from the github. +Note: on this version installing another release doesn't work (on windows), you need to install it +manually from the github. ### Added diff --git a/lib/class/release.dart b/lib/class/release.dart index e379779..d6045a3 100644 --- a/lib/class/release.dart +++ b/lib/class/release.dart @@ -9,11 +9,14 @@ class Release { @JsonKey(name: 'tag_name') String tagName; List assets; + @JsonKey(name: 'published_at') + DateTime publishedAt; Release({ required this.body, required this.assets, required this.tagName, + required this.publishedAt, }); factory Release.fromJson(Map json) => diff --git a/lib/class/release.g.dart b/lib/class/release.g.dart index b430170..3d71ae8 100644 --- a/lib/class/release.g.dart +++ b/lib/class/release.g.dart @@ -12,10 +12,12 @@ Release _$ReleaseFromJson(Map json) => Release( .map((e) => ReleaseAsset.fromJson(e as Map)) .toList(), tagName: json['tag_name'] as String, + publishedAt: DateTime.parse(json['published_at'] as String), ); Map _$ReleaseToJson(Release instance) => { 'body': instance.body, 'tag_name': instance.tagName, 'assets': instance.assets, + 'published_at': instance.publishedAt.toIso8601String(), }; diff --git a/lib/class/release_asset.dart b/lib/class/release_asset.dart index 49f0511..923b3fe 100644 --- a/lib/class/release_asset.dart +++ b/lib/class/release_asset.dart @@ -6,9 +6,14 @@ part 'release_asset.g.dart'; class ReleaseAsset { @JsonKey(name: 'browser_download_url') String browserDownloadUrl; + String name; + @JsonKey(name: 'download_count') + int downloadCount; ReleaseAsset({ required this.browserDownloadUrl, + required this.name, + required this.downloadCount, }); factory ReleaseAsset.fromJson(Map json) => diff --git a/lib/class/release_asset.g.dart b/lib/class/release_asset.g.dart index 6a75ca1..ffa1e77 100644 --- a/lib/class/release_asset.g.dart +++ b/lib/class/release_asset.g.dart @@ -8,9 +8,13 @@ part of 'release_asset.dart'; ReleaseAsset _$ReleaseAssetFromJson(Map json) => ReleaseAsset( browserDownloadUrl: json['browser_download_url'] as String, + name: json['name'] as String, + downloadCount: json['download_count'] as int, ); Map _$ReleaseAssetToJson(ReleaseAsset instance) => { 'browser_download_url': instance.browserDownloadUrl, + 'name': instance.name, + 'download_count': instance.downloadCount, }; diff --git a/lib/main.dart b/lib/main.dart index c5e4d6f..4e05253 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -6,18 +6,18 @@ import 'package:deepfacelab_client/class/storage.dart'; import 'package:deepfacelab_client/class/window_command.dart'; import 'package:deepfacelab_client/class/workspace.dart'; import 'package:deepfacelab_client/screens/dashboard_screen.dart'; +import 'package:deepfacelab_client/screens/help_screen.dart'; import 'package:deepfacelab_client/screens/loading_screen.dart'; import 'package:deepfacelab_client/screens/settings_screen.dart'; -import 'package:deepfacelab_client/screens/tutorial_screen.dart'; import 'package:deepfacelab_client/screens/window_command_screen.dart'; import 'package:deepfacelab_client/screens/workspace_screen.dart'; import 'package:deepfacelab_client/service/locale_storage_service.dart'; import 'package:deepfacelab_client/widget/installation/has_requirements_widget.dart'; import 'package:file_sizes/file_sizes.dart'; import 'package:filesystem_picker/filesystem_picker.dart'; -import 'package:flutter/gestures.dart'; import 'package:flutter/material.dart'; import 'package:flutter_hooks/flutter_hooks.dart'; +import 'package:flutter_markdown/flutter_markdown.dart'; import 'package:flutter_redux_hooks/flutter_redux_hooks.dart'; import 'package:package_info_plus/package_info_plus.dart'; import 'package:redux/redux.dart' as redux; @@ -134,9 +134,9 @@ class Root extends HookWidget { destination: const NavigationRailDestination( icon: Icon(Icons.lightbulb), selectedIcon: Icon(Icons.lightbulb), - label: Text('Tutorials'), + label: Text('Help'), ), - widget: const TutorialScreen()), + widget: const HelpScreen()), ); return result; } @@ -181,25 +181,15 @@ class Root extends HookWidget { alignment: Alignment.bottomCenter, child: Padding( padding: const EdgeInsets.only(bottom: 8.0), - child: SelectableText.rich( - TextSpan( - children: [ - TextSpan( - text: packageInfo?.version ?? "", - style: const TextStyle( - color: Colors.blue), - recognizer: TapGestureRecognizer() - ..onTap = () { - launchUrl( - Uri.parse( - 'https://github.com/Lenny4/DeepFaceLabClient/releases'), - mode: LaunchMode - .platformDefault); - }, - ), - ], - ), - ), + child: MarkdownBody( + selectable: true, + data: + "[${packageInfo?.version ?? ''}](https://github.com/Lenny4/DeepFaceLabClient/releases)", + onTapLink: (text, url, title) { + if (url != null) { + launchUrl(Uri.parse(url)); + } + }), ), ), ), diff --git a/lib/screens/help_screen.dart b/lib/screens/help_screen.dart new file mode 100644 index 0000000..b9aacc7 --- /dev/null +++ b/lib/screens/help_screen.dart @@ -0,0 +1,66 @@ +import 'package:deepfacelab_client/widget/common/self_promotion_widget.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_hooks/flutter_hooks.dart'; +import 'package:flutter_markdown/flutter_markdown.dart'; +import 'package:url_launcher/url_launcher.dart'; + +class HelpScreen extends HookWidget { + const HelpScreen({Key? key}) : super(key: key); + + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: AppBar( + title: const SelectableText('Help'), + ), + body: SingleChildScrollView( + child: Container( + margin: const EdgeInsets.all(10.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + const Padding( + padding: EdgeInsets.only(bottom: 16), + child: SelfPromotionWidget(), + ), + Padding( + padding: const EdgeInsets.only(bottom: 8.0), + child: MarkdownBody( + selectable: true, + data: """ +## Video tutorials + +Watching all videos takes time (about 7h20) but worth it. + +Please not that none of these tutorials have been made with DeepFaceLabClient but only with DeepFaceLab. + +1. [DeepFace Lab Tutorial: How to make a DeepFake](https://www.youtube.com/watch?v=QSmHho1uHFM) by Druuzil [Dec 17, 2021] +2. [Deepface Live Tutorial - How to make your own Live Model!](https://www.youtube.com/watch?v=_bc3SPbCdW8) by Druuzil [Apr 14, 2022] +3. [Deepface Lab Tutorial - Advanced Training Methods](https://www.youtube.com/watch?v=1Bt5wyGqdk4) by Druuzil [Aug 29, 2022] + """, + onTapLink: (text, url, title) { + if (url != null) launchUrl(Uri.parse(url)); + }), + ), + Padding( + padding: const EdgeInsets.only(top: 8.0), + child: MarkdownBody( + selectable: true, + data: """ +## DeepfakeVFX + +If you don't know where to start we suggest you to visit [deepfakevfx.com](https://www.deepfakevfx.com/) +- [Deepfake Guides](https://www.deepfakevfx.com/guides/) +- [Deepfake Tutorials](https://www.deepfakevfx.com/tutorials/) +- [Deepfake Downloads](https://www.deepfakevfx.com/downloads/) + """, + onTapLink: (text, url, title) { + if (url != null) launchUrl(Uri.parse(url)); + }), + ), + ], + )), + ), + ); + } +} diff --git a/lib/screens/tutorial_screen.dart b/lib/screens/tutorial_screen.dart deleted file mode 100644 index 8c41098..0000000 --- a/lib/screens/tutorial_screen.dart +++ /dev/null @@ -1,115 +0,0 @@ -import 'package:flutter/gestures.dart'; -import 'package:flutter/material.dart'; -import 'package:flutter_hooks/flutter_hooks.dart'; -import 'package:flutter_markdown/flutter_markdown.dart'; -import 'package:url_launcher/url_launcher.dart'; - -class TutorialScreen extends HookWidget { - const TutorialScreen({Key? key}) : super(key: key); - - @override - Widget build(BuildContext context) { - return Scaffold( - appBar: AppBar( - title: const SelectableText('Tutorials'), - ), - body: SingleChildScrollView( - child: Container( - margin: const EdgeInsets.all(10.0), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - const Padding( - padding: EdgeInsets.only(bottom: 8.0), - child: MarkdownBody(selectable: true, data: """ -Watching all videos takes time (about 7h20) but worth it. - -Please not that none of these tutorials have been made with DeepFaceLabClient but only with DeepFaceLab. - """), - ), - Padding( - padding: const EdgeInsets.only(bottom: 8.0), - child: SelectableText.rich( - TextSpan( - children: [ - const TextSpan( - text: '1) ', - ), - TextSpan( - text: "DeepFace Lab Tutorial: How to make a DeepFake", - style: const TextStyle(color: Colors.blue), - recognizer: TapGestureRecognizer() - ..onTap = () { - launchUrl( - Uri.parse( - 'https://www.youtube.com/watch?v=QSmHho1uHFM'), - mode: LaunchMode.platformDefault); - }, - ), - const TextSpan( - text: ' by Druuzil [Dec 17, 2021]', - ), - ], - ), - ), - ), - Padding( - padding: const EdgeInsets.only(bottom: 8.0), - child: SelectableText.rich( - TextSpan( - children: [ - const TextSpan( - text: '2) ', - ), - TextSpan( - text: - "Deepface Live Tutorial - How to make your own Live Model!", - style: const TextStyle(color: Colors.blue), - recognizer: TapGestureRecognizer() - ..onTap = () { - launchUrl( - Uri.parse( - 'https://www.youtube.com/watch?v=_bc3SPbCdW8'), - mode: LaunchMode.platformDefault); - }, - ), - const TextSpan( - text: ' by Druuzil [Apr 14, 2022]', - ), - ], - ), - ), - ), - Padding( - padding: const EdgeInsets.only(bottom: 8.0), - child: SelectableText.rich( - TextSpan( - children: [ - const TextSpan( - text: '3) ', - ), - TextSpan( - text: - "Deepface Lab Tutorial - Advanced Training Methods", - style: const TextStyle(color: Colors.blue), - recognizer: TapGestureRecognizer() - ..onTap = () { - launchUrl( - Uri.parse( - 'https://www.youtube.com/watch?v=1Bt5wyGqdk4&t=2s'), - mode: LaunchMode.platformDefault); - }, - ), - const TextSpan( - text: ' by Druuzil [Aug 29, 2022]', - ), - ], - ), - ), - ) - ], - )), - ), - ); - } -} diff --git a/lib/widget/common/deepfacelab_command_widget.dart b/lib/widget/common/deepfacelab_command_widget.dart index 7406c26..69bdae5 100644 --- a/lib/widget/common/deepfacelab_command_widget.dart +++ b/lib/widget/common/deepfacelab_command_widget.dart @@ -11,9 +11,9 @@ import 'package:deepfacelab_client/class/workspace.dart'; import 'package:deepfacelab_client/service/window_command_service.dart'; import 'package:deepfacelab_client/widget/common/form/deepfacelab_command_form_widget.dart'; import 'package:desktop_multi_window/desktop_multi_window.dart'; -import 'package:flutter/gestures.dart'; import 'package:flutter/material.dart'; import 'package:flutter_hooks/flutter_hooks.dart'; +import 'package:flutter_markdown/flutter_markdown.dart'; import 'package:flutter_redux_hooks/flutter_redux_hooks.dart'; import 'package:url_launcher/url_launcher.dart'; @@ -45,22 +45,13 @@ class _SingleDeepfacelabCommandWidget extends HookWidget { child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - SelectableText.rich( - TextSpan( - children: [ - TextSpan( - text: "Documentation", - style: const TextStyle(color: Colors.blue), - recognizer: TapGestureRecognizer() - ..onTap = () { - launchUrl( - Uri.parse(windowCommand.documentationLink), - mode: LaunchMode.platformDefault); - }, - ), - ], - ), - ), + MarkdownBody( + selectable: true, + data: + "[Documentation](${windowCommand.documentationLink})", + onTapLink: (text, url, title) { + if (url != null) launchUrl(Uri.parse(url)); + }), if (workspace != null) DeepfacelabCommandFormWidget( workspace: workspace!, diff --git a/lib/widget/common/open_issue_widget.dart b/lib/widget/common/open_issue_widget.dart index e7769c2..eee5036 100644 --- a/lib/widget/common/open_issue_widget.dart +++ b/lib/widget/common/open_issue_widget.dart @@ -1,6 +1,6 @@ -import 'package:flutter/gestures.dart'; import 'package:flutter/material.dart'; import 'package:flutter_hooks/flutter_hooks.dart'; +import 'package:flutter_markdown/flutter_markdown.dart'; import 'package:url_launcher/url_launcher.dart'; class OpenIssueWidget extends HookWidget { @@ -8,35 +8,13 @@ class OpenIssueWidget extends HookWidget { @override Widget build(BuildContext context) { - return SelectableText.rich( - TextSpan( - children: [ - TextSpan( - text: 'If you encounter a problem please ', - style: TextStyle( - color: Theme.of(context).textTheme.bodyMedium?.color, - ), - ), - TextSpan( - text: 'open an issue', - style: const TextStyle(color: Colors.blue), - recognizer: TapGestureRecognizer() - ..onTap = () { - launchUrl( - Uri.parse( - 'https://github.com/Lenny4/DeepFaceLabClient/issues'), - mode: LaunchMode.platformDefault); - }, - ), - TextSpan( - style: TextStyle( - color: Theme.of(context).textTheme.bodyMedium?.color, - ), - text: '.', - ), - ], - ), - ); + return MarkdownBody( + selectable: true, + data: + "If you encounter a problem please [open an issue](https://github.com/Lenny4/DeepFaceLabClient/issues).", + onTapLink: (text, url, title) { + if (url != null) launchUrl(Uri.parse(url)); + }); } } @@ -45,28 +23,12 @@ class OpenIssue2Widget extends HookWidget { @override Widget build(BuildContext context) { - return SelectableText.rich( - TextSpan( - children: [ - TextSpan( - text: 'Open an issue', - style: const TextStyle(color: Colors.blue), - recognizer: TapGestureRecognizer() - ..onTap = () { - launchUrl( - Uri.parse( - 'https://github.com/Lenny4/DeepFaceLabClient/issues'), - mode: LaunchMode.platformDefault); - }, - ), - TextSpan( - style: TextStyle( - color: Theme.of(context).textTheme.bodyMedium?.color, - ), - text: '.', - ), - ], - ), - ); + return MarkdownBody( + selectable: true, + data: + "[Open an issue](https://github.com/Lenny4/DeepFaceLabClient/issues).", + onTapLink: (text, url, title) { + if (url != null) launchUrl(Uri.parse(url)); + }); } } diff --git a/lib/widget/common/release_widget.dart b/lib/widget/common/release_widget.dart index 9627281..643f6d9 100644 --- a/lib/widget/common/release_widget.dart +++ b/lib/widget/common/release_widget.dart @@ -6,11 +6,13 @@ import 'package:deepfacelab_client/class/app_state.dart'; import 'package:deepfacelab_client/class/release.dart'; import 'package:deepfacelab_client/class/release_asset.dart'; import 'package:deepfacelab_client/service/platform_service.dart'; +import 'package:deepfacelab_client/widget/common/self_promotion_widget.dart'; import 'package:flutter/material.dart'; import 'package:flutter_hooks/flutter_hooks.dart'; import 'package:flutter_markdown/flutter_markdown.dart'; import 'package:flutter_redux_hooks/flutter_redux_hooks.dart'; import 'package:http/http.dart' as http; +import 'package:intl/intl.dart'; import 'package:package_info_plus/package_info_plus.dart'; class ReleaseWidget extends HookWidget { @@ -106,7 +108,7 @@ class ReleaseWidget extends HookWidget { } var releaseFilename = PlatformService.getReleaseFilename(); var scriptFile = await File( - "${Directory.current.path}${Platform.pathSeparator}script${Platform.pathSeparator}$platform${Platform.pathSeparator}$releaseFilename") + "${Directory.current.path}${Platform.pathSeparator}script${Platform.pathSeparator}$platform${Platform.pathSeparator}$releaseFilename") .copy(folderPath + Platform.pathSeparator + releaseFilename); Process.run( scriptFile.path, @@ -134,6 +136,7 @@ class ReleaseWidget extends HookWidget { child: Column( children: [ const MarkdownBody(selectable: true, data: "# Releases"), + const SelfPromotionWidget(), ListView.builder( shrinkWrap: true, itemCount: releases.length, @@ -181,6 +184,31 @@ class ReleaseWidget extends HookWidget { ) ], ), + ), + const Divider(), + Padding( + padding: const EdgeInsets.only( + left: 8, bottom: 8, right: 8), + child: Row( + crossAxisAlignment: + CrossAxisAlignment.end, + mainAxisAlignment: + MainAxisAlignment.spaceBetween, + children: [ + Column( + crossAxisAlignment: + CrossAxisAlignment.start, + children: releases[index] + .assets + .map((asset) => SelectableText( + "${asset.name}, downloaded ${asset.downloadCount} times.")) + .toList()), + SelectableText(DateFormat( + 'yyyy-MM-dd HH:mm:ss') + .format( + releases[index].publishedAt)) + ], + ), ) ], )) diff --git a/lib/widget/common/self_promotion_widget.dart b/lib/widget/common/self_promotion_widget.dart new file mode 100644 index 0000000..134f64c --- /dev/null +++ b/lib/widget/common/self_promotion_widget.dart @@ -0,0 +1,20 @@ +import 'package:flutter/material.dart'; +import 'package:flutter_hooks/flutter_hooks.dart'; +import 'package:flutter_markdown/flutter_markdown.dart'; +import 'package:url_launcher/url_launcher.dart'; + +class SelfPromotionWidget extends HookWidget { + const SelfPromotionWidget({Key? key}) : super(key: key); + + @override + Widget build(BuildContext context) { + return MarkdownBody( + selectable: true, + data: """ +If you like DeepFaceLabClient please consider adding a star on the [repository](https://github.com/Lenny4/DeepFaceLabClient). + """, + onTapLink: (text, url, title) { + if (url != null) launchUrl(Uri.parse(url)); + }); + } +} diff --git a/lib/widget/installation/has_requirements_widget.dart b/lib/widget/installation/has_requirements_widget.dart index 45891c0..c387c18 100644 --- a/lib/widget/installation/has_requirements_widget.dart +++ b/lib/widget/installation/has_requirements_widget.dart @@ -18,8 +18,7 @@ class HasRequirementsWidget extends HookWidget { if (Platform.isWindows) ...[ const RequirementWindowsWidget(), ], - Container( - margin: const EdgeInsets.all(10.0), child: InstallationWidget()), + InstallationWidget(), ]); } } diff --git a/lib/widget/installation/installation_widget.dart b/lib/widget/installation/installation_widget.dart index cc2c5c6..cd9b4bb 100644 --- a/lib/widget/installation/installation_widget.dart +++ b/lib/widget/installation/installation_widget.dart @@ -7,7 +7,6 @@ import 'package:deepfacelab_client/service/platform_service.dart'; import 'package:deepfacelab_client/widget/common/open_issue_widget.dart'; import 'package:deepfacelab_client/widget/common/start_process_widget.dart'; import 'package:filesystem_picker/filesystem_picker.dart'; -import 'package:flutter/gestures.dart'; import 'package:flutter/material.dart'; import 'package:flutter_hooks/flutter_hooks.dart'; import 'package:flutter_markdown/flutter_markdown.dart'; @@ -216,48 +215,20 @@ git clone --depth 1 https://github.com/iperov/DeepFaceLab.git $thisInstallationP ? Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - SelectableText.rich( - TextSpan( - children: [ - TextSpan( - text: "We did not find ", - style: TextStyle( - color: Theme.of(context) - .textTheme - .bodyMedium - ?.color, - ), - ), - TextSpan( - text: ' DeepFaceLab', - style: const TextStyle(color: Colors.blue), - recognizer: TapGestureRecognizer() - ..onTap = () { - launchUrl( - Uri.parse( - 'https://github.com/iperov/DeepFaceLab'), - mode: LaunchMode.platformDefault); - }, - ), - TextSpan( - text: " on your computer.", - style: TextStyle( - color: Theme.of(context) - .textTheme - .bodyMedium - ?.color, - ), - ), - ], - ), - ), Container( margin: const EdgeInsets.only(top: 10.0), child: Row( children: [ - const MarkdownBody(selectable: true, data: """ + MarkdownBody( + selectable: true, + data: """ +We did not find [DeepFaceLab](https://github.com/iperov/DeepFaceLab) on your computer. + Please download it and specify where it is with the folder icon. - """), + """, + onTapLink: (text, url, title) { + if (url != null) launchUrl(Uri.parse(url)); + }), _SelectDeepfacelabFolderWidget( selectFolder: selectFolder), ], diff --git a/lib/widget/installation/requirement_linux_widget.dart b/lib/widget/installation/requirement_linux_widget.dart index 1b6a8e8..f1d1dde 100644 --- a/lib/widget/installation/requirement_linux_widget.dart +++ b/lib/widget/installation/requirement_linux_widget.dart @@ -141,8 +141,8 @@ fi ), if (requirements.value != null) ...[ MarkdownBody( - selectable: true, - data: """ + selectable: true, + data: """ ${requirements.value!['hasWget'] == true ? "✅ `wget`" : "❌ `wget` was not found by running command `which wget`, just run `sudo apt install wget -y` to install it"} ${requirements.value!['hasBash'] == true ? "✅ `bash`" : "❌ `bash` was not found by running command `which bash`, just run `sudo apt install bash -y` to install it"} @@ -152,99 +152,12 @@ ${requirements.value!['hasGit'] == true ? "✅ `git`" : "❌ `git` was not found ${requirements.value!['hasFfmpeg'] == true ? "✅ `ffmpeg`" : "❌ `ffmpeg` was not found by running command `which ffmpeg`, just run `sudo apt install ffmpeg -y` to install it"} ${requirements.value!['hasUnzip'] == true ? "✅ `unzip`" : "❌ `unzip` was not found by running command `which unzip`, just run `sudo apt install unzip -y` to install it"} + +${requirements.value!['hasConda'] == true ? "✅ `conda`" : "❌ `conda` was not found by running command which conda, to install conda [follow the tutorial](https://docs.conda.io/projects/conda/en/latest/user-guide/install/)"} """, - ), - requirements.value!['hasConda'] == true - ? Container( - margin: const EdgeInsets.only(top: 10.0), - child: SelectableText.rich(TextSpan( - children: [ - TextSpan( - style: TextStyle( - color: Theme.of(context) - .textTheme - .bodyMedium - ?.color), - text: "✅ ", - ), - TextSpan( - text: "conda", - style: TextStyle( - background: Paint()..color = Colors.white10, - color: - Theme.of(context).textTheme.bodyMedium?.color, - )), - ], - )), - ) - : Container( - margin: const EdgeInsets.only(top: 10.0), - child: SelectableText.rich( - TextSpan( - children: [ - TextSpan( - text: "❌ ", - style: TextStyle( - color: - Theme.of(context).textTheme.bodyMedium?.color, - ), - ), - TextSpan( - text: "conda", - style: TextStyle( - background: Paint()..color = Colors.white10, - color: Theme.of(context) - .textTheme - .bodyMedium - ?.color, - )), - TextSpan( - text: " was not found by running command ", - style: TextStyle( - color: - Theme.of(context).textTheme.bodyMedium?.color, - ), - ), - TextSpan( - text: "which conda", - style: TextStyle( - background: Paint()..color = Colors.white10, - color: Theme.of(context) - .textTheme - .bodyMedium - ?.color, - )), - TextSpan( - text: ", to install ", - style: TextStyle( - color: - Theme.of(context).textTheme.bodyMedium?.color, - ), - ), - TextSpan( - text: "conda", - style: TextStyle( - background: Paint()..color = Colors.white10, - color: Theme.of(context) - .textTheme - .bodyMedium - ?.color, - )), - TextSpan( - text: ' follow the tutorial', - style: const TextStyle(color: Colors.blue), - recognizer: TapGestureRecognizer() - ..onTap = () { - launchUrl( - Uri.parse( - 'https://docs.conda.io/projects/conda/en/latest/user-guide/install/'), - mode: LaunchMode.platformDefault); - }, - ), - ], - ), - ), - ), + onTapLink: (text, url, title) { + if (url != null) launchUrl(Uri.parse(url)); + }), hasRequirements != true ? Column( crossAxisAlignment: CrossAxisAlignment.start, diff --git a/pubspec.lock b/pubspec.lock index eb57250..724cbb9 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -344,6 +344,14 @@ packages: url: "https://pub.dev" source: hosted version: "4.0.2" + intl: + dependency: "direct main" + description: + name: intl + sha256: "3bc132a9dbce73a7e4a21a17d06e1878839ffbf975568bc875c60537824b0c4d" + url: "https://pub.dev" + source: hosted + version: "0.18.1" io: dependency: transitive description: diff --git a/pubspec.yaml b/pubspec.yaml index 9351133..a753736 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -16,7 +16,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html # In Windows, build-name is used as the major, minor, and patch parts # of the product and file versions while build-number is used as the build suffix. -version: 0.2.0 +version: 0.3.0 environment: sdk: '>=2.19.4 <3.0.0' @@ -51,6 +51,7 @@ dependencies: desktop_drop: ^0.4.1 http: ^0.13.6 file_sizes: ^1.0.6 + intl: ^0.18.1 dev_dependencies: flutter_test: From 57d08326864a59a2c64ecedea56d06ca268a4590 Mon Sep 17 00:00:00 2001 From: Lenny4 Date: Tue, 20 Jun 2023 23:30:16 -0400 Subject: [PATCH 2/2] revert Copy dll files --- .github/workflows/release.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 07b8893..3e8f010 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -110,9 +110,9 @@ jobs: run: flutter build windows --release - name: Copy dll files run: | - copy .\requirements\windows\msvcp140.dll build\windows\runner\Release - copy .\requirements\windows\vcruntime140.dll build\windows\runner\Release - copy .\requirements\windows\vcruntime140_1.dll build\windows\runner\Release + copy C:\Windows\System32\msvcp140.dll build\windows\runner\Release + copy C:\Windows\System32\vcruntime140.dll build\windows\runner\Release + copy C:\Windows\System32\vcruntime140_1.dll build\windows\runner\Release - name: Copy script files run: | mkdir .\build\windows\runner\Release\script\