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

r"""
Usable WAPT package functions: install(), uninstall(), session_setup(), audit(), update_package()

"""
# Declaring global variables - Warnings: 1) WAPT context is only available in package functions; 2) Global variables are not persistent between calls


def install():
    # Declaring local variables
    bin_name = glob.glob("unbound_setup_*.exe")[0]
    # Installing the software

    install_exe_if_needed(bin_name, silentflags="/S", key="Unbound", min_version=control.get_software_version(),
    get_version=get_version,
    timeout=600,
    )


def get_version(app_registry_dict):
    return app_registry_dict["version"].split("-")[0]

