mirror of
https://gitlab.os-k.eu/neox/CNIRevelator.git
synced 2023-08-25 14:03:10 +02:00
Enhancing update system
This commit is contained in:
parent
43dfc7b812
commit
9daa095665
@ -69,5 +69,8 @@ except Exception:
|
|||||||
logfile.printerr("A FATAL ERROR OCCURED : " + str(traceback.format_exc()))
|
logfile.printerr("A FATAL ERROR OCCURED : " + str(traceback.format_exc()))
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
|
if updater.UPDATE_IS_MADE:
|
||||||
|
sys.exit(0)
|
||||||
|
|
||||||
main()
|
main()
|
||||||
sys.exit(0)
|
sys.exit(0)
|
||||||
|
@ -38,6 +38,8 @@ import globs # globs.py
|
|||||||
import ihm # ihm.py
|
import ihm # ihm.py
|
||||||
import downloader # downloader.py
|
import downloader # downloader.py
|
||||||
|
|
||||||
|
UPDATE_IS_MADE = False
|
||||||
|
|
||||||
def createShortcut(path, target='', wDir='', icon=''):
|
def createShortcut(path, target='', wDir='', icon=''):
|
||||||
ext = path[-3:]
|
ext = path[-3:]
|
||||||
if ext == 'url':
|
if ext == 'url':
|
||||||
@ -175,15 +177,19 @@ def batch():
|
|||||||
|
|
||||||
launcherWindow.mainCanvas.itemconfigure(launcherWindow.msg, text=('Success !'))
|
launcherWindow.mainCanvas.itemconfigure(launcherWindow.msg, text=('Success !'))
|
||||||
|
|
||||||
|
# Cleanup
|
||||||
|
try:
|
||||||
|
os.remove(globs.CNIRFolder + '\\..\\CNIPackage.zip')
|
||||||
|
except:
|
||||||
|
pass
|
||||||
# Launch app !
|
# Launch app !
|
||||||
args = [UPATH + '\\CNIRevelator.exe', globs.CNIRFolder]
|
args = [UPATH + '\\CNIRevelator.exe', globs.CNIRFolder]
|
||||||
subprocess.Popen(args)
|
subprocess.Popen(args)
|
||||||
|
|
||||||
launcherWindow.mainCanvas.itemconfigure(launcherWindow.msg, text=('Launched the new process.'))
|
launcherWindow.mainCanvas.itemconfigure(launcherWindow.msg, text=('Launched the new process.'))
|
||||||
|
|
||||||
launcherWindow.destroy()
|
UPDATE_IS_MADE = True
|
||||||
sys.exit(0)
|
return True
|
||||||
return
|
|
||||||
|
|
||||||
## Main Function
|
## Main Function
|
||||||
def umain():
|
def umain():
|
||||||
|
Loading…
Reference in New Issue
Block a user