New version
This commit is contained in:
7
main.py
7
main.py
@@ -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):
|
||||
|
Reference in New Issue
Block a user