# -*- coding: utf-8 -*-
from setuphelpers import *


def install():
    print("installing pyzo")

    def verspyzo(key):
        return key["name"].replace("pyzo version ", "")

    install_exe_if_needed(
        glob.glob("*.exe")[0],
        "/VERYSILENT /SUPPRESSMSGBOXES /NORESTART",
        key="pyzo_is1",
        min_version=control.get_software_version(),
        get_version=verspyzo,
    )
    remove_desktop_shortcut("pyzo")
