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


def install():
    try:
        install_exe_if_needed(
            glob.glob("*.exe")[0],
            "/S",
            key="WinRAR archiver",
            min_version=control.version.split("-", 1)[0],
        )
    except:
        time.sleep(10)
        install_exe_if_needed(
            glob.glob("*.exe")[0],
            "/S",
            key="WinRAR archiver",
            min_version=control.version.split("-", 1)[0],
        )
