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

#uninstall_key="{08624F8E-556F-4844-AB04-2E893A746D22}_is1"

def install():
    # Define local variables
    bin_name = glob.glob("D5_Live_Sync_Archicad*.exe")[0]
    version = bin_name.split("_")[-1].replace(".exe", "")

    # Install software
    install_exe_if_needed(
        bin_name,
        name = f"D5 Live Sync for ARCHICAD version {version}",
        #key=uninstall_key,
        silentflags='/VERYSILENT /SUPPRESSMSGBOXES /NORESTART /ALLUSERS',
        min_version=control.version.split("-", 1)[0]
    )
