Final ieration of the new downloader and update_manager, implemented automatic updates only for windows

This commit is contained in:
Marco Dalla Tiezza
2024-06-13 15:46:25 +02:00
parent 146a5d1605
commit 77c43813a0
5 changed files with 285 additions and 231 deletions

View File

@@ -5159,174 +5159,174 @@ z7\x80\xec$\xf4c9\xf2\xd1\x8f4\xc6\xbc>\xb8\
\x116\x9d`\x1e\x97*W\xd9M\xe1\x09\x12\xa5\xfc\xda\
h;Q\xfc\xeb\x9c\x87 J\xfd\xc5\xd0c0\xc6[\
\xf7\xe4\x19\xd3~\xf5\xc8?\xf0\xff?E#\xf2\xe8\
\x00\x00\x0a[\
\x00\x00\x0aW\
\x00\
\x003#x\xda\xcd\x1ako\xdb8\xf2\xfb\x02\xfb\x1f\
x\xfe\xb0\xb5osJ\xdaC\x81=w{@j\xa7\
M\x80$\xcd\xd6i\x8bCQ\x14\xb4D\xdb\xbc\xd0\xa2\
\x96\xa2\xe2d\xdb\xfc\xf7\x9d!\xf5\xa2^\x96\x93\xf4\xf6\
\xdc\xc2\xb1\xc8\x19r^\x9c\x17\xc5\xd7\x91T\x9a\xfc\xa6\
\x7fK\xb8\x7f\xf5\xe3\x0f\xdcy\xf6>\xf20\x90\x9b\xda\
\xf0D\x86ZI\x11\xb7NxgT3\xc5\xa9\xa8A\
\x9c\xd2[\x99\xe8:\xe6\x14\x80\xe5\x12\xc6\xf1\x9f\xdd\x96\
|\xfd\xf1\x07\x02\x1f\x1e\x8c\xc9&%\x04\x9f7<\xd0\
\xab1y\xfa\xf4\xe0\xc0\x0e\xac\x18_\xae\xf4\x98\xfc\x82\
\x03vh\x22a\xf9\x90\x85\xda\x93!\xfe\x16L3X\
&]\x11?7\xe4%\x99\xf9\x8a\xb1\xd03\x0b\x92}\
\xf2\x8c\xfc\x83\xe4\xbf\x0b\xc8\xdb\x02\xd2\xee\x94\x82\x16\x0f\
\x16\xf6.\xdb\x5cs-\xd8\x98\xfc\x1e_\xaa\xe1\xe0P\
i\xb6\xe6\xf1`d\xe7\xaey\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da\xd9\xee\
\x00\x00\x08k\
\x00\
\x00r]x\xda\xed\x5cms\x9b\xb8\x1a\xfd\xde\x99\xfe\
@@ -7295,47 +7295,47 @@ qt_resource_struct = b"\
\x00\x00\x01\x8f\xff^8P\
\x00\x00\x01\x0e\x00\x00\x00\x00\x00\x01\x00\x01\x16\xe5\
\x00\x00\x01\x8f\xff^8P\
\x00\x00\x03\xb0\x00\x01\x00\x00\x00\x01\x00\x01Q\xb0\
\x00\x00\x03\xb0\x00\x01\x00\x00\x00\x01\x00\x01Q\xac\
\x00\x00\x01\x8f\xff^8_\
\x00\x00\x04\x22\x00\x01\x00\x00\x00\x01\x00\x01[\xa5\
\x00\x00\x04\x22\x00\x01\x00\x00\x00\x01\x00\x01[\xa1\
\x00\x00\x01\x8f\xff^8P\
\x00\x00\x03\xe6\x00\x01\x00\x00\x00\x01\x00\x01T\xcd\
\x00\x00\x03\xe6\x00\x01\x00\x00\x00\x01\x00\x01T\xc9\
\x00\x00\x01\x8f\xff^8P\
\x00\x00\x03\x12\x00\x01\x00\x00\x00\x01\x00\x019\x8e\
\x00\x00\x01\x8f\xff^8P\
\x00\x00\x03<\x00\x01\x00\x00\x00\x01\x00\x01>\xe2\
\x00\x00\x01\x90\x11\x9a\x93$\
\x00\x00\x05\xa8\x00\x00\x00\x00\x00\x01\x00\x01\xa0\xaf\
\x00\x00\x01\x90\x11\xc7\x00\xf9\
\x00\x00\x05\xa8\x00\x00\x00\x00\x00\x01\x00\x01\xa0\xab\
\x00\x00\x01\x8f\xff^8P\
\x00\x00\x03r\x00\x01\x00\x00\x00\x01\x00\x01IA\
\x00\x00\x03r\x00\x01\x00\x00\x00\x01\x00\x01I=\
\x00\x00\x01\x8f\xff^8_\
\x00\x00\x05\x86\x00\x00\x00\x00\x00\x01\x00\x01\x99{\
\x00\x00\x01\x90\x11U\xb4\x08\
\x00\x00\x05\x86\x00\x00\x00\x00\x00\x01\x00\x01\x99w\
\x00\x00\x01\x90\x11\xad[\xc5\
\x00\x00\x03X\x00\x02\x00\x00\x00\x04\x00\x00\x00+\
\x00\x00\x00\x00\x00\x00\x00\x00\
\x00\x00\x04\xc4\x00\x01\x00\x00\x00\x01\x00\x01vI\
\x00\x00\x01\x90\x11U\xb4\x08\
\x00\x00\x05d\x00\x01\x00\x00\x00\x01\x00\x01\x8f_\
\x00\x00\x04\xc4\x00\x01\x00\x00\x00\x01\x00\x01vE\
\x00\x00\x01\x90\x11\xad[\xc5\
\x00\x00\x05d\x00\x01\x00\x00\x00\x01\x00\x01\x8f[\
\x00\x00\x01\x90\x01\x93J\xb0\
\x00\x00\x04\xe6\x00\x01\x00\x00\x00\x01\x00\x01\x7fA\
\x00\x00\x04\xe6\x00\x01\x00\x00\x00\x01\x00\x01\x7f=\
\x00\x00\x01\x8f\xff^8P\
\x00\x00\x04H\x00\x01\x00\x00\x00\x01\x00\x01b1\
\x00\x00\x01\x90\x11U\xb4\x08\
\x00\x00\x04v\x00\x00\x00\x00\x00\x01\x00\x01nV\
\x00\x00\x04H\x00\x01\x00\x00\x00\x01\x00\x01b-\
\x00\x00\x01\x90\x11\xad[\xc5\
\x00\x00\x04v\x00\x00\x00\x00\x00\x01\x00\x01nR\
\x00\x00\x01\x8f\xff^8P\
\x00\x00\x04\x9e\x00\x01\x00\x00\x00\x01\x00\x01t\x1b\
\x00\x00\x04\x9e\x00\x01\x00\x00\x00\x01\x00\x01t\x17\
\x00\x00\x01\x8f\xff^8P\
\x00\x00\x05@\x00\x01\x00\x00\x00\x01\x00\x01\x8b\x0b\
\x00\x00\x05@\x00\x01\x00\x00\x00\x01\x00\x01\x8b\x07\
\x00\x00\x01\x8f\xff^8P\
\x00\x00\x05\x06\x00\x00\x00\x00\x00\x01\x00\x01\x85\xe2\
\x00\x00\x05\x06\x00\x00\x00\x00\x00\x01\x00\x01\x85\xde\
\x00\x00\x01\x8f\xff^8P\
\x00\x00\x05\xdc\x00\x01\x00\x00\x00\x01\x00\x01\xa9b\
\x00\x00\x05\xdc\x00\x01\x00\x00\x00\x01\x00\x01\xa9^\
\x00\x00\x01\x8f\xff^8_\
\x00\x00\x06$\x00\x01\x00\x00\x00\x01\x00\x01\xaf\xa7\
\x00\x00\x06$\x00\x01\x00\x00\x00\x01\x00\x01\xaf\xa3\
\x00\x00\x01\x8f\xff^8_\
\x00\x00\x05\xc0\x00\x01\x00\x00\x00\x01\x00\x01\xa6_\
\x00\x00\x05\xc0\x00\x01\x00\x00\x00\x01\x00\x01\xa6[\
\x00\x00\x01\x8f\xff^8_\
\x00\x00\x06\x00\x00\x01\x00\x00\x00\x01\x00\x01\xac%\
\x00\x00\x06\x00\x00\x01\x00\x00\x00\x01\x00\x01\xac!\
\x00\x00\x01\x8f\xff^8_\
"

View File

@@ -6,10 +6,10 @@ from PySide6.QtCore import QObject, Slot, Signal
from artemis.utils.constants import Constants, Messages
from artemis.utils.sys_utils import open_directory, make_tar, unpack_tar
from artemis.utils.sql_utils import ArtemisDatabase, ArtemisSignal
from artemis.utils.path_utils import DATA_DIR
from artemis.utils.update_utils import UpdateManager
from artemis.utils.generic_utils import generate_filter_query
from artemis.utils.path_utils import normalize_dialog_path
from artemis.utils.path_utils import DATA_DIR
from artemis.utils.config_utils import CONFIGURE_QT
from artemis.ui.preferences import UIPreferences
@@ -25,6 +25,7 @@ import artemis.resources
class UIArtemis(QObject):
# Python > QML Signals
close_ui = Signal()
populate_sig_list = Signal(list)
populate_sig_details = Signal(list)
populate_filter_modulation = Signal(list)
@@ -79,8 +80,8 @@ class UIArtemis(QObject):
self._window.loadSignal.connect(self.load_sig)
self._window.showPref.connect(self.show_pref_ui)
self._window.openSigEditor.connect(self.open_sig_editor)
self._window.startDownloader.connect(self.start_download_db)
self._window.checkDbUpdates.connect(self.check_update_db)
self._window.checkForUpdate.connect(self.check_for_update)
self._window.updateDb.connect(self.update_db)
self._window.updateArtemis.connect(self.update_artemis)
self._window.showSpaceWeather.connect(self.show_space_weather_ui)
self._window.openDbDirectory.connect(self.open_db_directory)
@@ -99,6 +100,7 @@ class UIArtemis(QObject):
self._window_signal.addCatTag.connect(self.add_cat_tag)
# Python > QML connections
self.close_ui.connect(self._window.close)
self.populate_sig_list.connect(self._window.populateList)
self.clear_list.connect(self._window.clearList)
self.update_info_bar.connect(self._window.bottomInfoBar)
@@ -215,22 +217,12 @@ class UIArtemis(QObject):
self.docmanager.load_documentsmanager_ui()
def check_update_db(self):
""" User manual check for updates db updates
def check_for_update(self):
""" User manual check for updates updates
"""
self.update_manager.check_updates(True)
def start_download_db(self):
""" Show the downloader and start the download of the sigid db
"""
self.downloader.finished.connect(self.update_manager.post_download_db)
self.downloader.on_start(
self.update_manager.remote_db_url,
DATA_DIR
)
def dialog_download_db(self, message_type, title, message):
""" Dialog popup for DB download confirmation
"""
@@ -238,14 +230,23 @@ class UIArtemis(QObject):
def dialog_update_artemis(self, message_type, title, message, auto=False):
""" Dialog popup for artemis download confirmation
""" Dialog popup for Artemis download confirmation
"""
self.show_dialog_update_artemis.emit(message_type, title, message, auto)
@Slot()
def update_db(self):
""" Start the download of the sigID DB
"""
self.update_manager.download_db()
@Slot()
def update_artemis(self):
print('ciao')
""" Start the download of Artemis
"""
self.update_manager.download_artemis()
def open_db_directory(self):

View File

@@ -55,7 +55,7 @@ class UIDownloader(QObject):
url (str): url from where download the file
save_path (str): path where to save the downloaded file
"""
self._clear_ui()
self.show_ui.emit()
self.file_url = QUrl(url)
@@ -85,8 +85,6 @@ class UIDownloader(QObject):
"""
if self.reply:
self.reply.abort()
self.update_progress_bar.emit(0, 0)
self.update_status.emit('')
if self.file:
self.file.cancelWriting()
@@ -103,8 +101,8 @@ class UIDownloader(QObject):
@Slot()
def on_finished(self):
""" Finalize the download process and if no errors
occurs emits the finished signal usefulle for
""" Finalize the download process and, if no errors
occurs, emits the finished signal usefull for
a callback
"""
if self.reply:
@@ -144,6 +142,7 @@ class UIDownloader(QObject):
def _get_filesize(self, url):
""" Get the file size by sending a HEAD request to the URL.
If the Content-Length in HTTP headers is missing, returns None
and set the progress_bar as 'indeterminate' like a 'busy indicator'
Args:
url (str): URL to check the file size
@@ -157,6 +156,11 @@ class UIDownloader(QObject):
return None
def _clear_ui(self):
self.update_progress_bar.emit(0, 0)
self.update_status.emit('')
def show_popup_error(self, error_msg):
self._parent.dialog_popup(
Messages.DIALOG_TYPE_ERROR,

View File

@@ -5,8 +5,8 @@ from packaging.version import Version
from artemis.utils.constants import Constants, Messages
from artemis.utils.sql_utils import ArtemisDatabase
from artemis.utils.sys_utils import is_windows, is_linux, is_macos, delete_file, delete_dir, match_hash, unpack_tar
from artemis.utils.path_utils import DATA_DIR
from artemis.utils.sys_utils import is_windows, is_linux, is_macos, delete_file, delete_dir, match_hash, unpack_tar, open_file
from artemis.utils.path_utils import DATA_DIR, APP_DIR
class UpdateManager:
@@ -26,19 +26,22 @@ class UpdateManager:
self.remote_db_size = None
self.remote_db_file_name = None
self.remote_art_version = None
self.remote_artemis_version = None
self.remote_artemis_url = None
self.remote_artemis_file_name = None
self.check_updates()
def check_updates(self, show_popup=False):
""" Checks if a software or DB update is available.
Prioritize Artemis update over DB one.
Prioritize Artemis updates over the DB one.
Args:
show_popup (bool, optional):
Suppress the "already up-to-date" message on startup.
Defaults to False.
If False, suppress the "already up-to-date" message on startup.
Defaults to False. True is usefull when the user manual check for
updates.
"""
latest_json = self._fetch_remote_json(Constants.LATEST_VERSION_URL, show_popup)
if latest_json:
@@ -52,13 +55,18 @@ class UpdateManager:
self.remote_db_file_name = self.remote_db_url.split('/')[-1]
if is_windows():
self.remote_art_version = latest_json['windows']['version']
self.remote_artemis_version = latest_json['windows']['version']
self.remote_artemis_url = latest_json['windows']['url']
elif is_linux():
self.remote_art_version = latest_json['linux']['version']
self.remote_artemis_version = latest_json['linux']['version']
self.remote_artemis_url = latest_json['linux']['url']
elif is_macos():
self.remote_art_version = latest_json['mac']['version']
self.remote_artemis_version = latest_json['mac']['version']
self.remote_artemis_url = latest_json['mac']['url']
self.remote_artemis_file_name = self.remote_artemis_url.split('/')[-1]
if Version(self.remote_art_version) > Version(Constants.APPLICATION_VERSION):
if Version(self.remote_artemis_version) > Version(Constants.APPLICATION_VERSION):
self.art_update = True
else:
self.art_update = False
@@ -77,6 +85,10 @@ class UpdateManager:
def _fetch_remote_json(self, url, show_popup=False):
""" Fetches the remote json from a url
Args:
show_popup (bool, optional): If false, suppress any error message
Defaults to False (to avoid error if the program is used offline)
"""
try:
response = requests.get(url)
@@ -100,9 +112,25 @@ class UpdateManager:
local_db.load()
return local_db
return None
def download_db(self):
""" Open the downloader and download the sigID database in the
DATA_DIR folder. After a succesfull download the callback function
from the downloader is post_download_db
"""
self._parent.downloader.finished.connect(self.post_download_db)
self._parent.downloader.on_start(
self.remote_db_url,
DATA_DIR
)
def post_download_db(self):
""" After a succesfull DB download, this function check the hash
for possible corrupted data, delete old sigID DB and extract
the new one
"""
latest_db_tar_path = DATA_DIR / self.remote_db_file_name
if match_hash(latest_db_tar_path, self.remote_db_hash):
delete_dir(DATA_DIR / 'SigID')
@@ -114,8 +142,29 @@ class UpdateManager:
delete_file(latest_db_tar_path)
def download_artemis(self):
""" Open the downloader and download Artemis in the
APP_DIR folder. After a succesfull download the callback function
from the downloader is post_download_artemis
"""
self._parent.downloader.finished.connect(self.post_download_artemis)
self._parent.downloader.on_start(
self.remote_artemis_url,
APP_DIR
)
def post_download_artemis(self):
""" After a succesfull Artemis download, this open the installer
and close the application
"""
if is_windows():
open_file(APP_DIR / self.remote_artemis_file_name)
self._parent.close_ui.emit()
def _show_popup_db_update(self):
""" Prompts the user to download the updated version of the database.
""" Prompts the user to download the updated version of the database
"""
self._parent.dialog_download_db(
Messages.DIALOG_TYPE_WARN,
@@ -133,20 +182,20 @@ class UpdateManager:
self._parent.dialog_update_artemis(
Messages.DIALOG_TYPE_QUEST,
Messages.ART_NEW_VER,
Messages.ART_NEW_VER_AUTO_MSG.format(self.remote_art_version),
Messages.ART_NEW_VER_AUTO_MSG.format(self.remote_artemis_version),
True
)
else:
self._parent.dialog_update_artemis(
Messages.DIALOG_TYPE_QUEST,
Messages.ART_NEW_VER,
Messages.ART_NEW_VER_MANUAL_MSG.format(self.remote_art_version),
Messages.ART_NEW_VER_MANUAL_MSG.format(self.remote_artemis_version),
False
)
def _show_popup_up_to_date(self):
""" Notifies the user that the database is up to date.
""" Notifies the user that the database is up to date
"""
self._parent.dialog_popup(
Messages.DIALOG_TYPE_INFO,
@@ -156,7 +205,7 @@ class UpdateManager:
def _show_popup_initial_db_download(self):
""" Prompts the user to download the database for the first time.
""" Prompts the user to download the database for the first time
"""
self._parent.dialog_download_db(
Messages.DIALOG_TYPE_QUEST,

View File

@@ -31,8 +31,8 @@ Window {
signal showCatManager()
signal openSigEditor(string type, var sig_param, bool is_new)
signal showSpaceWeather()
signal checkDbUpdates()
signal startDownloader()
signal checkForUpdate()
signal updateDb()
signal updateArtemis()
signal openDbDirectory()
signal newDb(string name)
@@ -137,7 +137,7 @@ Window {
standardButtons: Dialog.Cancel | Dialog.Yes
onAccepted: {
startDownloader()
updateDb()
}
}
@@ -323,7 +323,7 @@ Window {
MenuItem {
text: "Check for Updates"
onClicked: {checkDbUpdates()}
onClicked: {checkForUpdate()}
}
MenuSeparator {}