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

r"""
Usable WAPT package functions: install(), uninstall(), session_setup(), audit(), update_package()
{
   "key":"{C2A9FC00-AA48-4F17-9A72-62FBCEE2785B}_is1",
   "name":"Jackett",
   "version":"0.22.43",
   "install_date":"2024-06-03 00:00:00",
   "install_location":"C:\\ProgramData\\Jackett\\",
   "uninstall_string":"\"C:\\ProgramData\\Jackett\\unins000.exe\"",
   "publisher":"Jackett",
   "system_component":0,
   "win64":false
  }

"""
# 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('Jackett.Installer.Windows.exe')[0]
    # Installing the software
    install_exe_if_needed(bin_name,
        silentflags='/VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP-',
        key='{C2A9FC00-AA48-4F17-9A72-62FBCEE2785B}_is1',
        min_version=control.get_software_version(),
    )



