dont run ctl on win32

This commit is contained in:
j 2019-01-29 18:48:48 +05:30
parent 25b3f26d6b
commit 1c99e3277b

View file

@ -196,7 +196,7 @@ def install():
shutil.copy(os.path.join(settings.updates_path, 'release.json'), os.path.join(settings.data_path, 'release.json')) shutil.copy(os.path.join(settings.updates_path, 'release.json'), os.path.join(settings.data_path, 'release.json'))
upgrade_app() upgrade_app()
# FIXME: still needed? # FIXME: still needed?
if old_version < '20160112-651-de984a3': if old_version < '20160112-651-de984a3' and platform != 'win32':
subprocess.call(['./ctl', 'postupdate', '-o', old_version, '-n', new_version]) subprocess.call(['./ctl', 'postupdate', '-o', old_version, '-n', new_version])
return True return True
return True return True
@ -253,6 +253,7 @@ def upgrade_app():
shutil.copytree(bundled_app, app) shutil.copytree(bundled_app, app)
except: except:
logger.debug('Failed to update Application', exc_info=True) logger.debug('Failed to update Application', exc_info=True)
'''
elif sys.platform == 'win32': elif sys.platform == 'win32':
current_version = get_trayicon_version() current_version = get_trayicon_version()
if current_version != '0.2.0.0': if current_version != '0.2.0.0':
@ -262,6 +263,7 @@ def upgrade_app():
startupinfo.dwFlags |= subprocess.STARTF_USESHOWWINDOW startupinfo.dwFlags |= subprocess.STARTF_USESHOWWINDOW
startupinfo.wShowWindow = subprocess.SW_HIDE startupinfo.wShowWindow = subprocess.SW_HIDE
subprocess.Popen(cmd, cwd=settings.base_dir, start_new_session=True, startupinfo=startupinfo) subprocess.Popen(cmd, cwd=settings.base_dir, start_new_session=True, startupinfo=startupinfo)
'''
def getVersion(data): def getVersion(data):
''' '''