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


uninstallkey = []

# Defining variables
bin_name_sub = "Zotero-%s_setup.exe"
silent_args = "-ms"
app_uninstallkey_sub = "Zotero %s (x86 en-US)"


def install():
    # Initializing variables
    package_version = control.get_software_version()
    bin_name = bin_name_sub % package_version
    app_uninstallkey = app_uninstallkey_sub % package_version

    # Installing the package
    print("Installing: %s" % bin_name)
    install_exe_if_needed(
        bin_name,
        silentflags=silent_args,
        key=app_uninstallkey,
        min_version=package_version,
    )
