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

Option to check whether a new version is available #79

Closed
orontee opened this issue Nov 19, 2023 · 11 comments
Closed

Option to check whether a new version is available #79

orontee opened this issue Nov 19, 2023 · 11 comments

Comments

@orontee
Copy link
Owner

orontee commented Nov 19, 2023

Proposal

  1. Remove menu item to open about dialog
  2. Add a "Software" sub-menu in "Parameters" view
  3. Three items:
  • "Software version", action that pops up the about dialog (with current version)
  • "Software update", action that checks whether a new version is available, pops up a dialog to notify user and offers choice to download last version if different from current version and move file to current executable file
  • "Auto Update", on/off choice to periodically perform the previous action

Remarks

  • Removing the about dialog item menu make the menu shorter!
  • The "Auto update" periodicity could be once a week; A timestamp for last check should be serialized in application state
  • First implementation may stop after the version check, since I don't know whether it's possible to find current executable path, or extract from a zip archive, nor (main concern) it is acceptable from user point of view to have the application install things from the Internet.
  • Complement: Install is acceptable iff a signature check is implemented; Challenging but interesting! Openssl is installed so seems reasonable.
@orontee orontee added this to the Noël 2023 release milestone Nov 19, 2023
orontee added a commit that referenced this issue Nov 22, 2023
orontee added a commit that referenced this issue Nov 22, 2023
orontee added a commit that referenced this issue Nov 22, 2023
orontee added a commit that referenced this issue Nov 22, 2023
orontee added a commit that referenced this issue Nov 22, 2023
@orontee
Copy link
Owner Author

orontee commented Nov 22, 2023

Work is ongoing and a MVP is already working with manual version check.

Still have to save last check timestamp in model and application state, and automatize the check.

But working on this I feel that all that stuff is irrelevant to a weather application and should move to a 3rd party application with version check, signature check, unzip and install... In two words, an application store!

orontee added a commit that referenced this issue Nov 23, 2023
orontee added a commit that referenced this issue Nov 23, 2023
@orontee
Copy link
Owner Author

orontee commented Nov 23, 2023

Users interested in pre-relesaes can set version_check_keep_pre_releases to 1 in taranis.cfg file.

orontee added a commit that referenced this issue Nov 23, 2023
orontee added a commit that referenced this issue Nov 23, 2023
@orontee
Copy link
Owner Author

orontee commented Nov 25, 2023

The "check for new version" is implemented. Let's take some time to think of the "download, verify and update software" part.

@orontee orontee closed this as completed Nov 25, 2023
@neilswann80
Copy link

This app has a download mechanism: http://komary.net/pbdownload/

@orontee
Copy link
Owner Author

orontee commented Nov 28, 2023

This app has a download mechanism: http://komary.net/pbdownload/

Thank you, @neilswann80. Nice example of the use of the SDK functions to perform and track downloads. It's definitively the path to follow: Provide an application dedicated to version check, download, verify and install.

Unfortunately, it:

  • Manage a single application only
  • Lacks "unzipping"
  • Lacks the verification step

The third step is difficult and require playing with OpenSSL or GnuPG.

@orontee
Copy link
Owner Author

orontee commented Jan 6, 2024

Interesting investigations on the ".pbi" format: https://www.mobileread.com/forums/showpost.php?p=4385836&postcount=1

@neilswann80
Copy link

neilswann80 commented Dec 21, 2024

FYI I use the following update script on my device to update my version of Taranis when a new version becomes available,

#!/bin/sh
mkdir /var/tmp/taranis
wget https://github.com/orontee/taranis/releases/latest/download/taranis.zip -O /var/tmp/taranis/taranis.zip
unzip /var/tmp/taranis/taranis.zip -d /var/tmp/taranis
cp -f /var/tmp/taranis/taranis.app /mnt/ext1/applications/taranis.app
rm -rf /var/tmp/taranis

Could this be streamlined into Taranis?

@orontee
Copy link
Owner Author

orontee commented Dec 21, 2024

Do you reboot after that? My experience is that there's a kind of cache and replacing the executable then restarting through an icon click isn't enough to start the new executable...

Side remark. Reading your commment, I realized that the '.app' file could be attached to the release. Unzipping would then be unnecessary. Missing '.app' file from the release would tell that a manual install is required. Interesting. But I'd still prefer to download the '.pbi' to be able to perform a full install.

Then back to my rengaine: This is the work of a dedicated application, not Taranis.

Since I made no progress on the gargoyle port, I am worrying whether I should work on that application...

Last remark, I've found that downloading the installer manually, copying to the device, etc. is so boring... I even didn't installed last minor release on my device. Improvment required!

@neilswann80
Copy link

neilswann80 commented Dec 21, 2024

I don't need to reboot. I don't run the script with Taranis open, if that is what is causing your issue? Although a killall command could be added to close Taranis and then relaunch it after the update. Is it a symptom of USB transfer? I usually send files to my device via FTP, or direct downloads on the device and never experience a cached old file issue.

If you've done the initial install via .pbi... do you really need to run a .pbi for every update?

@orontee
Copy link
Owner Author

orontee commented Dec 21, 2024

No I don't think my problem comes from the application being running. I guess it comes from the application having run before in the same boot.

I must do some tests.

@neilswann80
Copy link

No I don't think my problem comes from the application being running. I guess it comes from the application having run before in the same boot.

I launched the old version of Tananis, ran my script, launched the new version of Taranis all within the same
session, no reboot required. I checked the version number within the app before and after, so no cached issue on my device.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

When branches are created from issues, their pull requests are automatically linked.

2 participants