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

r"""
Usable WAPT package functions: install(), uninstall(), session_setup(), audit(), update_package()
{
   "key":"FireAlpaca64_is1",
   "name":"FireAlpaca 2.12.1 (64bit)",
   "version":"2.12.1",
   "install_date":"2024-08-21 00:00:00",
   "install_location":"C:\\Program Files\\FireAlpaca\\FireAlpaca64\\FireAlpaca20\\",
   "uninstall_string":"\"C:\\Program Files\\FireAlpaca\\FireAlpaca64\\FireAlpaca20\\unins000.exe\"",
   "publisher":"firealpaca.com",
   "system_component":0,
   "win64":true
  }

"""
# 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("FireAlpaca*.exe")[0]
    # Installing the software

    install_exe_if_needed(bin_name, silentflags="/VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP-", key="FireAlpaca64_is1", min_version=control.get_software_version(),
    )
