Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[0.6.x] Link to release instead of updating #3619

Open
wants to merge 4 commits into
base: 0.6.x
Choose a base branch
from

Conversation

Mrcubix
Copy link
Contributor

@Mrcubix Mrcubix commented Dec 18, 2024

Open the Github release instead of using the faulty updater for now.

One thing to note is that since no updater object is provided for Linux, they aren't notified of new updates.
That is, until they manually check for one via their Package Manager.

Closes #3618

@Mrcubix Mrcubix changed the title Link to release instead of updating [0.6.x] Link to release instead of updating Dec 18, 2024
@Mrcubix
Copy link
Contributor Author

Mrcubix commented Dec 18, 2024

Now that i re-think about, it https://github.com/OpenTabletDriver/OpenTabletDriver/releases/latest exists

Use latest instead of targetting specific tag
Copy link
Member

@gonX gonX left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Idea of removing updater with a direct link is LGTM, but I also want to hear others opinions

@gonX gonX added windows/wpf Affects the Windows platform gui Affects driver GUI enhancement New feature or request and removed windows/wpf Affects the Windows platform labels Dec 22, 2024
@Mrcubix Mrcubix requested a review from gonX December 22, 2024 17:32
Copy link
Member

@gonX gonX left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM but looking for opinions from others as well

@Kuuuube
Copy link
Member

Kuuuube commented Dec 27, 2024

Since this will rely entirely on the user manually updating, it would be a good idea to list the folder path where OTD is. Maybe a readonly textbox so the user can copy paste it.

@Mrcubix
Copy link
Contributor Author

Mrcubix commented Dec 27, 2024

Might as well have a button that open the directory then.

@Mrcubix
Copy link
Contributor Author

Mrcubix commented Dec 28, 2024

Might as well have a button that open the directory then.

Using AppContext.BaseDirectory will just open the location where the UX.
The path to the daemon isn't provided anywhere, so i guess that's the only thing we can use unless we check processes, which is probably not worth it.

diff --git a/OpenTabletDriver.UX/Windows/Updater/UpdaterWindow.cs b/OpenTabletDriver.UX/Windows/Updater/UpdaterWindow.cs
index 4f08a153..fd94acc0 100644
--- a/OpenTabletDriver.UX/Windows/Updater/UpdaterWindow.cs
+++ b/OpenTabletDriver.UX/Windows/Updater/UpdaterWindow.cs
@@ -2,6 +2,7 @@ using System;
 using System.Threading.Tasks;
 using Eto.Drawing;
 using Eto.Forms;
+using OpenTabletDriver.Desktop;
 using OpenTabletDriver.Desktop.Interop;
 using OpenTabletDriver.UX.Controls;
 using OpenTabletDriver.UX.Controls.Generic;
@@ -49,9 +50,22 @@ namespace OpenTabletDriver.UX.Windows.Updater
                         new Bitmap(App.Logo.WithSize(256, 256)),
                         "An update is available to install",
                         $"OpenTabletDriver v{updateAvailable.Version}",
-                        new Button(OpenRelease)
+                        new PaddingSpacerItem(),
+                        new StackLayout()
                         {
-                            Text = "Go to Release"
+                            Orientation = Orientation.Horizontal,
+                            Items =
+                            {
+                                new Button(OpenRelease)
+                                {
+                                    Text = "Go to Release"
+                                },
+                                new Button(OpenDirectory)
+                                {
+                                    Text = "Open Directory"
+                                }
+                            },
+                            Spacing = 5
                         },
                         new PaddingSpacerItem(),
                     }
@@ -70,5 +84,8 @@ namespace OpenTabletDriver.UX.Windows.Updater

         private void OpenRelease(object sender, EventArgs e)
             => DesktopInterop.Open(LATEST_RELEASE_URL);
+
+        private void OpenDirectory(object sender, EventArgs e)
+            => DesktopInterop.Open(AppContext.BaseDirectory);
     }
 }

@gonX gonX linked an issue Jan 3, 2025 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request gui Affects driver GUI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Consider linking the user to new updates instead in 0.6.x
3 participants