From bec0006f5fa0de32b69bd6f959567d5507502776 Mon Sep 17 00:00:00 2001 From: gosha20777 Date: Thu, 26 Oct 2023 13:59:21 +0200 Subject: [PATCH 01/12] update packages to fix bug with wrong skeasharp decoder --- .../LacmusApp.Avalonia.csproj | 20 ++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/src/LacmusApp.Avalonia/LacmusApp.Avalonia.csproj b/src/LacmusApp.Avalonia/LacmusApp.Avalonia.csproj index 2491204..ddf2ec2 100755 --- a/src/LacmusApp.Avalonia/LacmusApp.Avalonia.csproj +++ b/src/LacmusApp.Avalonia/LacmusApp.Avalonia.csproj @@ -48,15 +48,20 @@ - - + + - - - + + + + + + + + @@ -71,6 +76,11 @@ + + + + + From e8e2218f85b6f2e2e12a861f40a3646d56225a42 Mon Sep 17 00:00:00 2001 From: gosha20777 Date: Thu, 26 Oct 2023 14:06:14 +0200 Subject: [PATCH 02/12] change domain from .ml to .tech --- src/LacmusApp/Appearance/Models/ConfigManager.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/LacmusApp/Appearance/Models/ConfigManager.cs b/src/LacmusApp/Appearance/Models/ConfigManager.cs index fcc5e11..c534e39 100644 --- a/src/LacmusApp/Appearance/Models/ConfigManager.cs +++ b/src/LacmusApp/Appearance/Models/ConfigManager.cs @@ -52,7 +52,7 @@ public async Task ReadConfig() OperatingSystem.OsxAmd64 } }, - Repository = "http://api.lacmus.ml", + Repository = "http://api.lacmus.tech", Theme = Theme.Light, PredictionThreshold = 0.15f, BoundingBoxColour = BoundingBoxColour.Red From 213749a2c73a3434efa16aa85733e7a5fad47a03 Mon Sep 17 00:00:00 2001 From: gosha20777 Date: Thu, 26 Oct 2023 14:13:33 +0200 Subject: [PATCH 03/12] fix domain name --- README.md | 2 +- packages/windows/script.iss | 2 +- .../Appearence/ViewModels/VersionViewModel.cs | 4 ++-- src/LacmusApp.Avalonia/LacmusApp.Avalonia.csproj | 6 +++--- src/LacmusApp.Avalonia/Program.cs | 2 +- src/LacmusApp.Avalonia/ViewModels/LoadingWindowViewModel.cs | 4 ++-- src/LacmusApp.Avalonia/ViewModels/MainWindowViewModel.cs | 6 +++--- 7 files changed, 13 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index eb116fb..d434ceb 100755 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ Cross-platform application that searches for lost people in the forest using obj ## Docs -You can find more documentation here: [Rus](https://docs.lacmus.ml/v/russian) [Eng](https://docs.lacmus.ml) +You can find more documentation here: [Rus](https://docs.lacmus.tech/v/russian) [Eng](https://docs.lacmus.tech) ### System requirements and supported platforms diff --git a/packages/windows/script.iss b/packages/windows/script.iss index d5e1ed1..a4218b5 100644 --- a/packages/windows/script.iss +++ b/packages/windows/script.iss @@ -1,7 +1,7 @@ #define MyAppName "Lacmus Application" #define MyAppVersion "0.7.0" #define MyAppPublisher "Lacmus Foundation" -#define MyAppURL "https://lacmus.ml/" +#define MyAppURL "https://lacmus.tech/" #define MyAppExeName "LacmusApp.Avalonia.exe" [Setup] diff --git a/src/LacmusApp.Avalonia/Appearence/ViewModels/VersionViewModel.cs b/src/LacmusApp.Avalonia/Appearence/ViewModels/VersionViewModel.cs index 3092214..55e87eb 100644 --- a/src/LacmusApp.Avalonia/Appearence/ViewModels/VersionViewModel.cs +++ b/src/LacmusApp.Avalonia/Appearence/ViewModels/VersionViewModel.cs @@ -11,11 +11,11 @@ public VersionViewModel() { var revision = $"preview-{version?.Revision}"; - Version = $"{version?.Major}.{version?.Minor}.{version?.Build} {revision} beta"; + Version = $"{version?.Major}.{version?.Minor}.{version?.Build} {revision}"; } else { - Version = $"{version.Major}.{version.Minor}.{version.Build} beta"; + Version = $"{version.Major}.{version.Minor}.{version.Build}"; } } diff --git a/src/LacmusApp.Avalonia/LacmusApp.Avalonia.csproj b/src/LacmusApp.Avalonia/LacmusApp.Avalonia.csproj index ddf2ec2..6725354 100755 --- a/src/LacmusApp.Avalonia/LacmusApp.Avalonia.csproj +++ b/src/LacmusApp.Avalonia/LacmusApp.Avalonia.csproj @@ -4,15 +4,15 @@ net6.0 linux-x64;win-x64;osx-x64 Lacmus Foundation - 0.7.0 - 0.7.0 + 1.0.0 + 1.0.0 0.7.0 gosha20777 Copyright (c) Lacmus Foundation 2022 Lacmus help to find lost people in Search and Rescue operations. Lacmus is a cross-platform application which use computer vision and neural networks and written with C#, .NET Core, ReactiveUI and Avalonia. LacmusApp.Avalonia Lacmus Application - https://lacmus.ml/ + https://lacmus.tech/ https://github.com/lacmus-foundation/lacmus-app/blob/master/LICENSE https://github.com/lacmus-foundation/lacmus-app git diff --git a/src/LacmusApp.Avalonia/Program.cs b/src/LacmusApp.Avalonia/Program.cs index 0eeb63d..073ef01 100755 --- a/src/LacmusApp.Avalonia/Program.cs +++ b/src/LacmusApp.Avalonia/Program.cs @@ -12,7 +12,7 @@ internal static class Program { private static void Main(string[] args) { - Console.WriteLine($"Lacmus desktop application. Version {GetVersion()} beta."); + Console.WriteLine($"Lacmus desktop application. Version {GetVersion()}."); Console.WriteLine("Copyright (c) 2022 Lacmus Foundation ."); Console.WriteLine("Github page: https://github.com/lacmus-foundation."); Console.WriteLine("Powered by ODS ."); diff --git a/src/LacmusApp.Avalonia/ViewModels/LoadingWindowViewModel.cs b/src/LacmusApp.Avalonia/ViewModels/LoadingWindowViewModel.cs index 3b37106..b4e0699 100755 --- a/src/LacmusApp.Avalonia/ViewModels/LoadingWindowViewModel.cs +++ b/src/LacmusApp.Avalonia/ViewModels/LoadingWindowViewModel.cs @@ -71,7 +71,7 @@ private async void Init() await Task.Delay(1000); var dialog = new AvaloniaPluginDialog(window); var pluginManager = new PluginManager( - Path.Join(confDir, "plugins"), "http://api.lacmus.ml"); + Path.Join(confDir, "plugins"), "http://api.lacmus.tech"); var themeManager = new ThemeManager(window); themeManager.UseTheme(config.Theme); var settingsViewModel = new SettingsViewModel( @@ -103,7 +103,7 @@ private static string GetVersion() var revision = ""; if (typeof(Program).Assembly.GetName().Version.Revision != 0) revision = $"preview-{typeof(Program).Assembly.GetName().Version.Revision}"; - return $"{typeof(Program).Assembly.GetName().Version.Major}.{typeof(Program).Assembly.GetName().Version.Minor}.{typeof(Program).Assembly.GetName().Version.Build}.{revision} beta"; + return $"{typeof(Program).Assembly.GetName().Version.Major}.{typeof(Program).Assembly.GetName().Version.Minor}.{typeof(Program).Assembly.GetName().Version.Build}.{revision}"; } } } \ No newline at end of file diff --git a/src/LacmusApp.Avalonia/ViewModels/MainWindowViewModel.cs b/src/LacmusApp.Avalonia/ViewModels/MainWindowViewModel.cs index e993f91..3c11453 100755 --- a/src/LacmusApp.Avalonia/ViewModels/MainWindowViewModel.cs +++ b/src/LacmusApp.Avalonia/ViewModels/MainWindowViewModel.cs @@ -499,13 +499,13 @@ public void Help() switch (_settingsViewModel.Language) { case Language.English: - OpenUrl("https://docs.lacmus.ml"); + OpenUrl("https://docs.lacmus.tech"); break; case Language.Russian: - OpenUrl("https://docs.lacmus.ml/v/russian/"); + OpenUrl("https://docs.lacmus.tech/v/russian/"); break; default: - OpenUrl("https://docs.lacmus.ml"); + OpenUrl("https://docs.lacmus.tech"); break; } } From 947490e26bbd5d22e738f2c98d83eeb8b454700a Mon Sep 17 00:00:00 2001 From: gosha20777 Date: Thu, 18 Apr 2024 11:57:36 +0200 Subject: [PATCH 04/12] rename domain name --- README.md | 2 +- packages/windows/script.iss | 2 +- src/LacmusApp.Avalonia/LacmusApp.Avalonia.csproj | 2 +- src/LacmusApp.Avalonia/ViewModels/LoadingWindowViewModel.cs | 2 +- src/LacmusApp.Avalonia/ViewModels/MainWindowViewModel.cs | 6 +++--- src/LacmusApp/Appearance/Models/ConfigManager.cs | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index d434ceb..eb116fb 100755 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ Cross-platform application that searches for lost people in the forest using obj ## Docs -You can find more documentation here: [Rus](https://docs.lacmus.tech/v/russian) [Eng](https://docs.lacmus.tech) +You can find more documentation here: [Rus](https://docs.lacmus.ml/v/russian) [Eng](https://docs.lacmus.ml) ### System requirements and supported platforms diff --git a/packages/windows/script.iss b/packages/windows/script.iss index a4218b5..d5e1ed1 100644 --- a/packages/windows/script.iss +++ b/packages/windows/script.iss @@ -1,7 +1,7 @@ #define MyAppName "Lacmus Application" #define MyAppVersion "0.7.0" #define MyAppPublisher "Lacmus Foundation" -#define MyAppURL "https://lacmus.tech/" +#define MyAppURL "https://lacmus.ml/" #define MyAppExeName "LacmusApp.Avalonia.exe" [Setup] diff --git a/src/LacmusApp.Avalonia/LacmusApp.Avalonia.csproj b/src/LacmusApp.Avalonia/LacmusApp.Avalonia.csproj index 6725354..20ce762 100755 --- a/src/LacmusApp.Avalonia/LacmusApp.Avalonia.csproj +++ b/src/LacmusApp.Avalonia/LacmusApp.Avalonia.csproj @@ -12,7 +12,7 @@ Lacmus help to find lost people in Search and Rescue operations. Lacmus is a cross-platform application which use computer vision and neural networks and written with C#, .NET Core, ReactiveUI and Avalonia. LacmusApp.Avalonia Lacmus Application - https://lacmus.tech/ + https://lacmus.ml/ https://github.com/lacmus-foundation/lacmus-app/blob/master/LICENSE https://github.com/lacmus-foundation/lacmus-app git diff --git a/src/LacmusApp.Avalonia/ViewModels/LoadingWindowViewModel.cs b/src/LacmusApp.Avalonia/ViewModels/LoadingWindowViewModel.cs index b4e0699..8123512 100755 --- a/src/LacmusApp.Avalonia/ViewModels/LoadingWindowViewModel.cs +++ b/src/LacmusApp.Avalonia/ViewModels/LoadingWindowViewModel.cs @@ -71,7 +71,7 @@ private async void Init() await Task.Delay(1000); var dialog = new AvaloniaPluginDialog(window); var pluginManager = new PluginManager( - Path.Join(confDir, "plugins"), "http://api.lacmus.tech"); + Path.Join(confDir, "plugins"), "http://api.lacmus.ml"); var themeManager = new ThemeManager(window); themeManager.UseTheme(config.Theme); var settingsViewModel = new SettingsViewModel( diff --git a/src/LacmusApp.Avalonia/ViewModels/MainWindowViewModel.cs b/src/LacmusApp.Avalonia/ViewModels/MainWindowViewModel.cs index 3c11453..e993f91 100755 --- a/src/LacmusApp.Avalonia/ViewModels/MainWindowViewModel.cs +++ b/src/LacmusApp.Avalonia/ViewModels/MainWindowViewModel.cs @@ -499,13 +499,13 @@ public void Help() switch (_settingsViewModel.Language) { case Language.English: - OpenUrl("https://docs.lacmus.tech"); + OpenUrl("https://docs.lacmus.ml"); break; case Language.Russian: - OpenUrl("https://docs.lacmus.tech/v/russian/"); + OpenUrl("https://docs.lacmus.ml/v/russian/"); break; default: - OpenUrl("https://docs.lacmus.tech"); + OpenUrl("https://docs.lacmus.ml"); break; } } diff --git a/src/LacmusApp/Appearance/Models/ConfigManager.cs b/src/LacmusApp/Appearance/Models/ConfigManager.cs index c534e39..fcc5e11 100644 --- a/src/LacmusApp/Appearance/Models/ConfigManager.cs +++ b/src/LacmusApp/Appearance/Models/ConfigManager.cs @@ -52,7 +52,7 @@ public async Task ReadConfig() OperatingSystem.OsxAmd64 } }, - Repository = "http://api.lacmus.tech", + Repository = "http://api.lacmus.ml", Theme = Theme.Light, PredictionThreshold = 0.15f, BoundingBoxColour = BoundingBoxColour.Red From 2d4e6fb23d20f431194e83372ea931bc4e777073 Mon Sep 17 00:00:00 2001 From: gosha20777 Date: Thu, 18 Apr 2024 13:24:40 +0200 Subject: [PATCH 05/12] update packages and add altitude --- .../LacmusApp.Avalonia.csproj | 16 +++++----- .../Services/PhotoLoader.cs | 9 ++++-- .../ViewModels/FourthWizardViewModel.cs | 3 +- .../ViewModels/MetadataViewModel.cs | 31 +++++-------------- .../Views/MetadataWindow.xaml | 5 +++ src/LacmusApp/Image/Models/Image.cs | 1 + src/LacmusApp/Image/Services/ExifConvertor.cs | 25 +++++++++++++-- src/LacmusApp/Image/Services/ImageLoader.cs | 3 +- src/LacmusApp/LacmusApp.csproj | 4 +-- .../Screens/ViewModels/AboutViewModel.cs | 2 +- 10 files changed, 57 insertions(+), 42 deletions(-) diff --git a/src/LacmusApp.Avalonia/LacmusApp.Avalonia.csproj b/src/LacmusApp.Avalonia/LacmusApp.Avalonia.csproj index 20ce762..f1cf204 100755 --- a/src/LacmusApp.Avalonia/LacmusApp.Avalonia.csproj +++ b/src/LacmusApp.Avalonia/LacmusApp.Avalonia.csproj @@ -1,7 +1,7 @@ Exe - net6.0 + net8.0 linux-x64;win-x64;osx-x64 Lacmus Foundation 1.0.0 @@ -64,7 +64,7 @@ - + @@ -76,12 +76,12 @@ - - - - - - + + + + + + diff --git a/src/LacmusApp.Avalonia/Services/PhotoLoader.cs b/src/LacmusApp.Avalonia/Services/PhotoLoader.cs index 3fd00d1..a42c910 100755 --- a/src/LacmusApp.Avalonia/Services/PhotoLoader.cs +++ b/src/LacmusApp.Avalonia/Services/PhotoLoader.cs @@ -51,7 +51,7 @@ public async Task ReadAllFromDirByPhoto(LoadType loadType = Lo using (var stream = File.OpenRead(path)) { var (brush, height, width) = await reader.Read(stream); - var (metadata, latitude, longitude) = ExifConvertor.ConvertExif( + var (metadata, latitude, longitude, altitude) = ExifConvertor.ConvertExif( ImageMetadataReader.ReadMetadata(path)); var photoViewModel = new PhotoViewModel(index) { @@ -63,6 +63,7 @@ public async Task ReadAllFromDirByPhoto(LoadType loadType = Lo Name = GetNameFromPath(path), Latitude = latitude, Longitude = longitude, + Altitude = altitude, ExifDataCollection = metadata }; photoList.Add(photoViewModel); @@ -109,7 +110,7 @@ public async Task ReadAllFromDirByAnnotation(LoadType loadType using (var photoStream = File.OpenRead(photoPath)) { var (brush, height, width) = await reader.Read(photoStream); - var (metadata, latitude, longitude) = ExifConvertor.ConvertExif( + var (metadata, latitude, longitude, altitude) = ExifConvertor.ConvertExif( ImageMetadataReader.ReadMetadata(photoPath)); var photoViewModel = new PhotoViewModel(index) { @@ -121,6 +122,7 @@ public async Task ReadAllFromDirByAnnotation(LoadType loadType Name = GetNameFromPath(photoPath), Latitude = latitude, Longitude = longitude, + Altitude = altitude, ExifDataCollection = metadata }; photoList.Add(photoViewModel); @@ -147,7 +149,7 @@ public async Task LoadFromFile(string path, int index, IEnumerab using (var photoStream = File.OpenRead(path)) { var (brush, height, width) = await reader.ReadFromStream(photoStream); - var (metadata, latitude, longitude) = ExifConvertor.ConvertExif( + var (metadata, latitude, longitude, altitude) = ExifConvertor.ConvertExif( ImageMetadataReader.ReadMetadata(path)); return new PhotoViewModel(index) { @@ -159,6 +161,7 @@ public async Task LoadFromFile(string path, int index, IEnumerab Name = GetNameFromPath(path), Latitude = latitude, Longitude = longitude, + Altitude = altitude, ExifDataCollection = metadata }; } diff --git a/src/LacmusApp.Avalonia/ViewModels/FourthWizardViewModel.cs b/src/LacmusApp.Avalonia/ViewModels/FourthWizardViewModel.cs index 3ee0af4..6906942 100755 --- a/src/LacmusApp.Avalonia/ViewModels/FourthWizardViewModel.cs +++ b/src/LacmusApp.Avalonia/ViewModels/FourthWizardViewModel.cs @@ -85,7 +85,7 @@ public async Task OpenFile(string inputPath) await using (var stream = File.OpenRead(path)) { var (brush, height, width) = await reader.Read(stream); - var (metadata, latitude, longitude) = ExifConvertor.ConvertExif( + var (metadata, latitude, longitude, altitude) = ExifConvertor.ConvertExif( ImageMetadataReader.ReadMetadata(path)); var photoViewModel = new PhotoViewModel(id) { @@ -96,6 +96,7 @@ public async Task OpenFile(string inputPath) Path = path, Latitude = latitude, Longitude = longitude, + Altitude = altitude, ExifDataCollection = metadata }; diff --git a/src/LacmusApp.Avalonia/ViewModels/MetadataViewModel.cs b/src/LacmusApp.Avalonia/ViewModels/MetadataViewModel.cs index 27dd50c..73b24c8 100755 --- a/src/LacmusApp.Avalonia/ViewModels/MetadataViewModel.cs +++ b/src/LacmusApp.Avalonia/ViewModels/MetadataViewModel.cs @@ -29,12 +29,14 @@ public class MetadataViewModel : ReactiveValidationObject public ReadOnlyObservableCollection MetaDataCollection => _metaDataCollection; [Reactive] public string Latitude { get; set; } = "N/A"; [Reactive] public string Longitude { get; set; } = "N/A"; + [Reactive] public string Altitude { get; set; } = "N/A"; [Reactive] public ImageBrush QrImage { get; set; } [Reactive] public LocalizationContext LocalizationContext { get; set; } public MetadataViewModel(Window window, PhotoViewModel photoViewModel, LocalizationContext localizationContext) { Latitude = $"{photoViewModel.Latitude}"; Longitude = $"{photoViewModel.Longitude}"; + Altitude = $"{photoViewModel.Altitude} m"; _metaDataList.AddRange(photoViewModel.ExifDataCollection); @@ -53,6 +55,10 @@ public MetadataViewModel(Window window, PhotoViewModel photoViewModel, Localizat viewModel => viewModel.Longitude, x => x != "N/A", path => $"Cannot parse gps longitude"); + this.ValidationRule( + viewModel => viewModel.Altitude, + x => x != "N/A", + path => $"Cannot parse gps altitude"); OpenYandexCommand = ReactiveCommand.Create(OpenYandex, this.IsValid()); OpenGoogleCommand = ReactiveCommand.Create(OpenGoogle, this.IsValid()); @@ -82,30 +88,6 @@ public void OpenOSM() $"#map=15/{Latitude.Replace(',', '.')}/{Longitude.Replace(',', '.')}"); } - private string TranslateGeoTag(string tag) - { - try - { - if (!tag.Contains('°')) - return tag; - tag = tag.Replace('°', ';'); - tag = tag.Replace('\'', ';'); - tag = tag.Replace('"', ';'); - tag = tag.Replace(" ", ""); - - var splitTag = tag.Split(';'); - var grad = float.Parse(splitTag[0]); - var min = float.Parse(splitTag[1]); - var sec = float.Parse(splitTag[2]); - - var result = grad + min / 60 + sec / 3600; - return $"{result}"; - } - catch - { - return "N/A"; - } - } private void OpenUrl(string url) { try @@ -134,6 +116,7 @@ private void OpenUrl(string url) } } + [Obsolete("Obsolete")] private void RenderQr() { using (var generator = new QRCodeGenerator()) diff --git a/src/LacmusApp.Avalonia/Views/MetadataWindow.xaml b/src/LacmusApp.Avalonia/Views/MetadataWindow.xaml index 0b16e62..78d22d0 100755 --- a/src/LacmusApp.Avalonia/Views/MetadataWindow.xaml +++ b/src/LacmusApp.Avalonia/Views/MetadataWindow.xaml @@ -45,6 +45,11 @@ + + + + + ExifDataCollection { get; set; } public TBrush Brush { get; set; } public string Path { get; set; } diff --git a/src/LacmusApp/Image/Services/ExifConvertor.cs b/src/LacmusApp/Image/Services/ExifConvertor.cs index f261929..c348da3 100644 --- a/src/LacmusApp/Image/Services/ExifConvertor.cs +++ b/src/LacmusApp/Image/Services/ExifConvertor.cs @@ -1,5 +1,7 @@ using System; using System.Collections.Generic; +using System.Linq; +using System.Text.RegularExpressions; using LacmusApp.Image.Models; using MetadataExtractor; using Serilog; @@ -8,11 +10,12 @@ namespace LacmusApp.Image.Services { public static class ExifConvertor { - public static (IEnumerable, float, float) ConvertExif(IReadOnlyList directories) + public static (IEnumerable, float, float, float) ConvertExif(IReadOnlyList directories) { var list = new List(); var latitude = 0f; var longitude = 0f; + var altitude = 0f; foreach (var directory in directories) { @@ -22,6 +25,8 @@ public static (IEnumerable, float, float) ConvertExif(IReadOnlyList, float, float) ConvertExif(IReadOnlyList> LoadFromFile(string path) await using (var stream = File.OpenRead(path)) { - var (metadata, latitude, longitude) = ExifConvertor.ConvertExif( + var (metadata, latitude, longitude, altitude) = ExifConvertor.ConvertExif( ImageMetadataReader.ReadMetadata(stream)); var (imageBrush, width, height) = await _brushReader.Read(stream); @@ -43,6 +43,7 @@ public async Task> LoadFromFile(string path) IsWatched = false, Latitude = latitude, Longitude = longitude, + Altitude = altitude, Path = path }; } diff --git a/src/LacmusApp/LacmusApp.csproj b/src/LacmusApp/LacmusApp.csproj index e78760b..ec2c31b 100644 --- a/src/LacmusApp/LacmusApp.csproj +++ b/src/LacmusApp/LacmusApp.csproj @@ -1,13 +1,13 @@ - net6.0 + net8.0 - + diff --git a/src/LacmusApp/Screens/ViewModels/AboutViewModel.cs b/src/LacmusApp/Screens/ViewModels/AboutViewModel.cs index 5e54b08..ffd566a 100644 --- a/src/LacmusApp/Screens/ViewModels/AboutViewModel.cs +++ b/src/LacmusApp/Screens/ViewModels/AboutViewModel.cs @@ -22,7 +22,7 @@ public AboutViewModel(IVersionViewModel versionViewModel) }); OpenSiteCommand = ReactiveCommand.Create(() => { - manager.OpenLink("https://lacmus-foundation.github.io/"); + manager.OpenLink("https://lacmus.ml/"); }); } From 039b74dcd74e97c39f372e31b72a1ae4b5c018d9 Mon Sep 17 00:00:00 2001 From: gosha20777 Date: Thu, 18 Apr 2024 14:33:09 +0200 Subject: [PATCH 06/12] fix: version --- src/LacmusApp.Avalonia/Program.cs | 5 ++--- src/LacmusApp.Avalonia/ViewModels/LoadingWindowViewModel.cs | 5 ++--- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/LacmusApp.Avalonia/Program.cs b/src/LacmusApp.Avalonia/Program.cs index 073ef01..57d5952 100755 --- a/src/LacmusApp.Avalonia/Program.cs +++ b/src/LacmusApp.Avalonia/Program.cs @@ -33,10 +33,9 @@ private static void Main(string[] args) public static string GetVersion() { - var revision = ""; if (typeof(Program).Assembly.GetName().Version.Revision != 0) - revision = $"preview-{typeof(Program).Assembly.GetName().Version.Revision}"; - return $"{typeof(Program).Assembly.GetName().Version.Major}.{typeof(Program).Assembly.GetName().Version.Minor}.{typeof(Program).Assembly.GetName().Version.Build}.{revision}"; + return $"{typeof(Program).Assembly.GetName().Version.Major}.{typeof(Program).Assembly.GetName().Version.Minor}.{typeof(Program).Assembly.GetName().Version.Build} preview-{typeof(Program).Assembly.GetName().Version.Revision}"; + return $"{typeof(Program).Assembly.GetName().Version.Major}.{typeof(Program).Assembly.GetName().Version.Minor}.{typeof(Program).Assembly.GetName().Version.Build}"; } private static AppBuilder BuildAvaloniaApp() diff --git a/src/LacmusApp.Avalonia/ViewModels/LoadingWindowViewModel.cs b/src/LacmusApp.Avalonia/ViewModels/LoadingWindowViewModel.cs index 8123512..601af3d 100755 --- a/src/LacmusApp.Avalonia/ViewModels/LoadingWindowViewModel.cs +++ b/src/LacmusApp.Avalonia/ViewModels/LoadingWindowViewModel.cs @@ -100,10 +100,9 @@ private async void Init() private static string GetVersion() { - var revision = ""; if (typeof(Program).Assembly.GetName().Version.Revision != 0) - revision = $"preview-{typeof(Program).Assembly.GetName().Version.Revision}"; - return $"{typeof(Program).Assembly.GetName().Version.Major}.{typeof(Program).Assembly.GetName().Version.Minor}.{typeof(Program).Assembly.GetName().Version.Build}.{revision}"; + return $"{typeof(Program).Assembly.GetName().Version.Major}.{typeof(Program).Assembly.GetName().Version.Minor}.{typeof(Program).Assembly.GetName().Version.Build} preview-{typeof(Program).Assembly.GetName().Version.Revision}"; + return $"{typeof(Program).Assembly.GetName().Version.Major}.{typeof(Program).Assembly.GetName().Version.Minor}.{typeof(Program).Assembly.GetName().Version.Build}"; } } } \ No newline at end of file From 4a6ecfaefb2d4ccf9128f8b27c5091f26bc59151 Mon Sep 17 00:00:00 2001 From: gosha20777 Date: Thu, 18 Apr 2024 14:44:29 +0200 Subject: [PATCH 07/12] update workflow --- .github/workflows/dotnetcore.yml | 2 +- .github/workflows/release.yaml | 18 +++++++++--------- mk-release.sh | 6 +++--- packages/osx/build-osx.sh | 2 +- packages/windows/script.iss | 2 +- .../LacmusApp.Avalonia.csproj | 6 +++--- 6 files changed, 18 insertions(+), 18 deletions(-) diff --git a/.github/workflows/dotnetcore.yml b/.github/workflows/dotnetcore.yml index 051f961..b72e450 100755 --- a/.github/workflows/dotnetcore.yml +++ b/.github/workflows/dotnetcore.yml @@ -8,7 +8,7 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - dotnet_version: ['6.0.x'] + dotnet_version: ['8.0.x'] os: [ubuntu-latest, windows-latest, macOS-latest] steps: diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 2c0b1b9..cc4e9a4 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -11,7 +11,7 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - dotnet_version: ['6.0.x'] + dotnet_version: ['8.0.x'] os: - ubuntu-latest steps: @@ -30,9 +30,9 @@ jobs: dotnet rpm install dotnet deb install dotnet tarball install - dotnet rpm --framework net6.0 -c Release --runtime="linux-x64" -o ../../bin/linux LacmusApp.Avalonia.csproj - dotnet deb --framework net6.0 -c Release --runtime="linux-x64" -o ../../bin/linux LacmusApp.Avalonia.csproj - dotnet tarball --framework net6.0 -c Release --runtime="linux-x64" -o ../../bin/linux LacmusApp.Avalonia.csproj + dotnet rpm --framework net8.0 -c Release --runtime="linux-x64" -o ../../bin/linux LacmusApp.Avalonia.csproj + dotnet deb --framework net8.0 -c Release --runtime="linux-x64" -o ../../bin/linux LacmusApp.Avalonia.csproj + dotnet tarball --framework net8.0 -c Release --runtime="linux-x64" -o ../../bin/linux LacmusApp.Avalonia.csproj shell: bash - uses: actions/upload-artifact@v3 with: @@ -53,7 +53,7 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - dotnet_version: ['6.0.x'] + dotnet_version: ['8.0.x'] os: - windows-latest steps: @@ -69,8 +69,8 @@ jobs: mkdir -p bin/windows/installer cd src/LacmusApp.Avalonia dotnet zip install - dotnet zip --framework net6.0 -c Release --runtime="win-x64" -o ../../bin/windows LacmusApp.Avalonia.csproj - dotnet publish --framework net6.0 -c Release --runtime="win-x64" -o ../../bin/windows/app LacmusApp.Avalonia.csproj + dotnet zip --framework net8.0 -c Release --runtime="win-x64" -o ../../bin/windows LacmusApp.Avalonia.csproj + dotnet publish --framework net8.0 -c Release --runtime="win-x64" -o ../../bin/windows/app LacmusApp.Avalonia.csproj cd ../../ curl -L --output bin/windows/installer/temp.zip https://github.com/lacmus-foundation/inno-setup-gihtub-action/releases/download/v.1.0.0/innoSetupCli.zip unzip bin/windows/installer/temp.zip -d bin/windows/installer @@ -90,7 +90,7 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - dotnet_version: ['6.0.x'] + dotnet_version: ['8.0.x'] os: - osx-latest steps: @@ -104,7 +104,7 @@ jobs: dotnet restore src/LacmusApp.sln cd src/LacmusApp.Avalonia dotnet tarball install - dotnet tarball --framework net6.0 -c Release --runtime="osx-x64" -o ../../bin/osx LacmusApp.Avalonia.csproj + dotnet tarball --framework net8.0 -c Release --runtime="osx-x64" -o ../../bin/osx LacmusApp.Avalonia.csproj shell: bash - uses: actions/upload-artifact@v3 with: diff --git a/mk-release.sh b/mk-release.sh index f595c34..8dcb735 100755 --- a/mk-release.sh +++ b/mk-release.sh @@ -5,13 +5,13 @@ rm -rf ./bin/app/ && \ echo "restoring packeges" dotnet restore src/LacmusApp.sln echo -n "building for linux" -dotnet publish --framework net6.0 --runtime="linux-x64" -c Release -o ./bin/app/linux src/LacmusApp.sln +dotnet publish --framework net8.0 --runtime="linux-x64" -c Release -o ./bin/app/linux src/LacmusApp.sln mv ./bin/app/linux/LacmusApp.Avalonia ./bin/app/linux/LacmusApp echo -n "building for win10" -dotnet publish --framework net6.0 --runtime="win10-x64" -c Release -o ./bin/app/win10 src/LacmusApp.sln +dotnet publish --framework net8.0 --runtime="win10-x64" -c Release -o ./bin/app/win10 src/LacmusApp.sln mv ./bin/app/win10/LacmusApp.Avalonia.exe ./bin/app/win10/LacmusApp.exe echo -n "building for osx" -dotnet publish --framework net6.0 --runtime="osx-x64" -c Release -o ./bin/app/osx src/LacmusApp.sln +dotnet publish --framework net8.0 --runtime="osx-x64" -c Release -o ./bin/app/osx src/LacmusApp.sln mv ./bin/app/osx/LacmusApp.Avalonia ./bin/app/osx/LacmusApp cd ./bin/app/ zip -r -9 ./linux.zip ./linux/ diff --git a/packages/osx/build-osx.sh b/packages/osx/build-osx.sh index 23098aa..8405756 100644 --- a/packages/osx/build-osx.sh +++ b/packages/osx/build-osx.sh @@ -7,7 +7,7 @@ CERT_NAME="" # Name of certification to sign the application echo "********** Start building $APP_NAME **********" # Get application version -VERSION="0.7.0" +VERSION="1.0.0" if [ "$?" != "0" ]; then echo "Unable to get version of $APP_NAME" exit diff --git a/packages/windows/script.iss b/packages/windows/script.iss index d5e1ed1..bc94c12 100644 --- a/packages/windows/script.iss +++ b/packages/windows/script.iss @@ -1,5 +1,5 @@ #define MyAppName "Lacmus Application" -#define MyAppVersion "0.7.0" +#define MyAppVersion "1.0.0" #define MyAppPublisher "Lacmus Foundation" #define MyAppURL "https://lacmus.ml/" #define MyAppExeName "LacmusApp.Avalonia.exe" diff --git a/src/LacmusApp.Avalonia/LacmusApp.Avalonia.csproj b/src/LacmusApp.Avalonia/LacmusApp.Avalonia.csproj index f1cf204..7e39e93 100755 --- a/src/LacmusApp.Avalonia/LacmusApp.Avalonia.csproj +++ b/src/LacmusApp.Avalonia/LacmusApp.Avalonia.csproj @@ -6,7 +6,7 @@ Lacmus Foundation 1.0.0 1.0.0 - 0.7.0 + 1.0.0 gosha20777 Copyright (c) Lacmus Foundation 2022 Lacmus help to find lost people in Search and Rescue operations. Lacmus is a cross-platform application which use computer vision and neural networks and written with C#, .NET Core, ReactiveUI and Avalonia. @@ -22,8 +22,8 @@ Lacmus Lacmus com.example - 0.7.0 - 0.7.0 + 1.0.0 + 1.0.0 APPL LacmusApp.Avalonia ..\..\packages\osx\LacmusApp.icns From cfc7705f702c2989c8fb912902894f6a56bb1dd4 Mon Sep 17 00:00:00 2001 From: gosha20777 Date: Thu, 18 Apr 2024 15:16:48 +0200 Subject: [PATCH 08/12] update builder --- .github/workflows/release.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index cc4e9a4..c06dcc9 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -20,9 +20,9 @@ jobs: - run: cd src && dotnet build --configuration Release - name: Create artifact linux run: | - dotnet tool install --global dotnet-rpm - dotnet tool install --global dotnet-deb - dotnet tool install --global dotnet-tarball + dotnet tool install --global dotnet-rpm8 + dotnet tool install --global dotnet-deb8 + dotnet tool install --global dotnet-tarball-net8 echo "building packeges" dotnet restore src/LacmusApp.sln mkdir -p bin/linux From 90894bf6a002823d1da7241986bf95e85a0810e9 Mon Sep 17 00:00:00 2001 From: gosha20777 Date: Thu, 18 Apr 2024 15:22:00 +0200 Subject: [PATCH 09/12] update builder --- .github/workflows/release.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index c06dcc9..cd81544 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -20,8 +20,8 @@ jobs: - run: cd src && dotnet build --configuration Release - name: Create artifact linux run: | - dotnet tool install --global dotnet-rpm8 - dotnet tool install --global dotnet-deb8 + dotnet tool install --global dotnet-rpm-net8 + dotnet tool install --global dotnet-deb-net8 dotnet tool install --global dotnet-tarball-net8 echo "building packeges" dotnet restore src/LacmusApp.sln From df19c35b86b0278d759b0cc4b0b2d81fc592e73f Mon Sep 17 00:00:00 2001 From: gosha20777 Date: Thu, 18 Apr 2024 16:12:26 +0200 Subject: [PATCH 10/12] update build targets --- .github/workflows/release.yaml | 2 +- src/LacmusApp.Avalonia/Directory.Build.props | 9 +++++++++ src/LacmusApp/Directory.Build.props | 9 +++++++++ 3 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 src/LacmusApp.Avalonia/Directory.Build.props create mode 100644 src/LacmusApp/Directory.Build.props diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index cd81544..fa7d046 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -61,7 +61,7 @@ jobs: - uses: actions/setup-dotnet@v1 - name: Create artifact windows run: | - dotnet tool install --global dotnet-zip + dotnet tool install --global dotnet-zip-net8 echo "building packeges" dotnet restore src/LacmusApp.sln mkdir -p bin/windows diff --git a/src/LacmusApp.Avalonia/Directory.Build.props b/src/LacmusApp.Avalonia/Directory.Build.props new file mode 100644 index 0000000..d761386 --- /dev/null +++ b/src/LacmusApp.Avalonia/Directory.Build.props @@ -0,0 +1,9 @@ + + + + + 0.1.220-* + all + + + \ No newline at end of file diff --git a/src/LacmusApp/Directory.Build.props b/src/LacmusApp/Directory.Build.props new file mode 100644 index 0000000..d761386 --- /dev/null +++ b/src/LacmusApp/Directory.Build.props @@ -0,0 +1,9 @@ + + + + + 0.1.220-* + all + + + \ No newline at end of file From bbe0e55f716cd184a9eb38d4cd0a0de482eb1d38 Mon Sep 17 00:00:00 2001 From: gosha20777 Date: Thu, 18 Apr 2024 16:18:21 +0200 Subject: [PATCH 11/12] update osx workflow --- .github/workflows/release.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index fa7d046..c81c9c2 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -99,7 +99,7 @@ jobs: - name: Create artifact osx run: | bash packages/osx/build-osx.sh - dotnet tool install --global dotnet-tarball + dotnet tool install --global dotnet-tarball-net8 echo "building packeges" dotnet restore src/LacmusApp.sln cd src/LacmusApp.Avalonia From b8bb2d23cece854dc8a24e3419ee15648627e7de Mon Sep 17 00:00:00 2001 From: gosha20777 Date: Thu, 18 Apr 2024 16:38:03 +0200 Subject: [PATCH 12/12] update osx os --- .github/workflows/release.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index c81c9c2..0f4914d 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -92,7 +92,7 @@ jobs: matrix: dotnet_version: ['8.0.x'] os: - - osx-latest + - macOS-latest steps: - uses: actions/checkout@v3 - uses: actions/setup-dotnet@v1