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

"""
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

    # Installing the software
    print("Installing: %s" % control.package)
    install_exe_if_needed(
        "setup_optikos-1.1.exe",
        silentflags="/VERYSILENT /SUPPRESSMSGBOXES /NORESTART",
        key="",
        min_version=control.get_software_version(),
    )
    remove_desktop_shortcut("Optikos")
    remove_programs_menu_folder("Serge.LAGIER")


def uninstall():
    run(r'"C:\Program Files (x86)\Serge_LAGIER\Optikos\unins000.exe" /VERYSILENT /SUPPRESSMSGBOXES /NORESTART')
