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

def install():
    # Uninstall previous version if needed
    for toremove in installed_softwares('FlameRobin'):
        print('Uninstalling existing versions')
        run(uninstall_cmd(toremove['key']))

    # Install last version
    install_msi_if_needed(
        glob.glob("FlameRobin*.msi")[0]
    )