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


def install():
    # Declaring local variables
    bin_name = glob.glob("*.msi")[0]

    for soft in installed_softwares('imhex'):
        if Version(control.get_software_version()) > Version(soft['version']):
            run(uninstall_cmd(soft["key"]))

    install_msi_if_needed(bin_name)