New version

This commit is contained in:
Ambulance Clerc
2022-06-06 17:28:34 +02:00
parent 80fa01633e
commit e3c4ee9d3e
3 changed files with 10 additions and 4 deletions

View File

@@ -27,6 +27,7 @@ from version import *
src_dir = os.getenv('APPDATA') + "\Attrib2Biz\src"
dest_dir = os.getenv('APPDATA') + "\Attrib2Biz\output"
temp_dir = os.getenv('APPDATA') + '\Attrib2Biz\.temp'
file_path ="" #os.path.dirname(__file__)
Elements = []
@@ -40,6 +41,9 @@ if not os.path.exists(src_dir):
if not os.path.exists(dest_dir):
os.makedirs(dest_dir)
if not os.path.exists(temp_dir):
os.makedirs(temp_dir)
class SuggestionPopup(Toplevel):
x_row = 0
@@ -319,10 +323,11 @@ class ClercAttrib2Biz():
self.thread = Thread(target=self.start_parsing)
auto_update = auto_updater()
auto_update.temp_dir = temp_dir + '\\'
if auto_update.new_update_available():
self.logger.warning(f"Nouvelle version du script disponible. {auto_update.dl_version}")
if messagebox.askyesno(title="Nouvelle version trouvée", message=f"Une nouvelle version a été trouvée, vous pouvez l'installer dès maintenant !", ):
subprocess.call("update.exe")
subprocess.call(temp_dir + "\\update.exe")
self.fenetre.destroy()
def disable_prompt(self):