tis-supergrate icon

SuperGrate

Paquet d’installation silencieuse pour SuperGrate

1.5.0.0-2

  • package: tis-supergrate
  • name: SuperGrate
  • version: 1.5.0.0-2
  • categories: utilities
  • maintainer: WAPT Team,Tranquil IT,Pierre COSSON,Clément Baziret
  • editor: https://github.com/belowaverage-org/
  • licence: opensource_free,cpe:/a:gnu:gpl_v3,wapt_public
  • locale: all
  • target_os: windows
  • impacted_process: SuperGrate
  • architecture: x64
  • signature_date:
  • size: 2.77 Mo
  • installed_size: 397.31 Ko
  • homepage : https://belowaverage.org/software/supersuite/supergrate/

package           : tis-supergrate
version           : 1.5.0.0-2
architecture      : x64
section           : base
priority          : optional
name              : SuperGrate
categories        : utilities
maintainer        : WAPT Team,Tranquil IT,Pierre COSSON,Clément Baziret
description       : Super Grate is a free & open source Windows User Profile backup & migration utility
depends           : 
conflicts         : 
maturity          : PROD
locale            : all
target_os         : windows
min_wapt_version  : 2.3
sources           : https://github.com/belowaverage-org/SuperGrate/releases
installed_size    : 397312
impacted_process  : SuperGrate
description_fr    : Super Grate est un utilitaire libre et gratuit de sauvegarde et de migration des profils d'utilisateurs Windows
description_pl    : Super Grate to darmowe i otwarte narzędzie do tworzenia kopii zapasowych i migracji profili użytkowników systemu Windows
description_de    : Super Grate ist ein kostenloses und quelloffenes Dienstprogramm zur Sicherung und Migration von Windows-Benutzerprofilen
description_es    : Super Grate es una utilidad de copia de seguridad y migración de perfiles de usuario de Windows gratuita y de código abierto
description_pt    : Super Grate é um utilitário de migração e cópia de segurança do perfil de utilizador do Windows gratuito e de código aberto
description_it    : Super Grate è un'utility gratuita e open source per il backup e la migrazione dei profili utente di Windows
description_nl    : Super Grate is een gratis en open source hulpprogramma voor back-up en migratie van Windows gebruikersprofielen
description_ru    : Super Grate - бесплатная утилита для резервного копирования и миграции пользовательских профилей Windows с открытым исходным кодом
audit_schedule    : 
editor            : https://github.com/belowaverage-org/
keywords          : super,grate,free,open,source,windows,user,profile,backup,migration,utility
licence           : opensource_free,cpe:/a:gnu:gpl_v3,wapt_public
homepage          : https://belowaverage.org/software/supersuite/supergrate/
package_uuid      : 2bc7058d-99a7-43d1-a6cf-bf25e7d62b46
valid_from        : 
valid_until       : 
forced_install_on : 
changelog         : https://github.com/belowaverage-org/SuperGrate/releases
min_os_version    : 
max_os_version    : 
icon_sha256sum    : 20933aeb4dd9c73efe3de676bfc7090acaeb0c00a56744b6fced6628194165f7
signer            : Tranquil IT
signer_fingerprint: 8c5127a75392be9cc9afd0dbae1222a673072c308c14d88ab246e23832e8c6bb
signature_date    : 2025-05-31T14:01:58.000000
signed_attributes : package,version,architecture,section,priority,name,categories,maintainer,description,depends,conflicts,maturity,locale,target_os,min_wapt_version,sources,installed_size,impacted_process,description_fr,description_pl,description_de,description_es,description_pt,description_it,description_nl,description_ru,audit_schedule,editor,keywords,licence,homepage,package_uuid,valid_from,valid_until,forced_install_on,changelog,min_os_version,max_os_version,icon_sha256sum,signer,signer_fingerprint,signature_date,signed_attributes
signature         : vOZEnPHMXNmUCWn3LEJAiaWDZmKktWzw0TgP5eXEprcxBZd/MS8rf7Ng6ZmRBPUl0Pc5lmE/Q9dX1d4ZuoGMs1JxBbK8DsH3qPTUzb93ebWqg+UUBukuguMm6IuKB2xjz7rSsm273RRiPyen9bI4FMJLSBbx8BUZHJ4RDGPbMLToRw6vkD9wbcScSxiGuVA/HCTgnRUemYGBZiGh+67UWo+AnK+H0zqj00UVLqLmVmpEqJVU72LhagxdLxv7xc/uNT8UKdJHA6ZZ9XMMIl0VzZDdlqAjtxwjpCfsBPVu9Wt54ZnCS64+2IczXASrOI83QpzZbmq9fOKsYcA0E20Vvg==

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


app_name = "SuperGrate"
app_dir = makepath(programfiles32, app_name)
app_path = makepath(app_dir, "SuperGrate.exe")
icon_path = app_path
audit_version_number = False
win64app = False


def get_installed_version(uninstallkey):
    for soft in installed_softwares(uninstallkey=uninstallkey):
        return soft.get("version", None)
    return None


def install():
    # Declaring local variables
    package_version = control.get_software_version()
    installed_version = get_installed_version(app_name)

    # Installing software
    if installed_version is None or Version(installed_version) < Version(package_version) or force:
        print("Installing: %s (%s)" % (app_name, control.get_software_version()))
        killalltasks(control.get_impacted_process_list())
        if isdir(app_dir):
            remove_tree(app_dir)
        mkdirs(app_dir)
        filecopyto("SuperGrate.exe", app_dir)
        # Creating shortcuts
        if not params.get("remove_desktop_shortcut"):
            create_desktop_shortcut(app_name, app_path, icon=icon_path)
            create_programs_menu_shortcut(app_name, app_path, icon=icon_path)

        # Adding software to "list-registry"
        print("Registering: %s to Windows Registry" % app_name)
        register_windows_uninstall(control, win64app=win64app)
        register_uninstall(app_name, win64app=win64app, icon=icon_path)
    else:
        print("%s is already installed and up-to-date (%s)" % (app_name, control.get_software_version()))


def audit():
    # Declaring local variables
    package_version = control.get_software_version()
    installed_version = get_installed_version(app_name)

    # Auditing software
    print("Auditing: %s" % control.package)
    if installed_version is None:
        print("%s is not installed" % app_name)
        return "ERROR"
    elif Version(installed_version) != Version(package_version) and audit_version_number:
        print("%s is installed in version (%s) instead of (%s)" % (app_name, installed_version, package_version))
        return "WARNING"
    else:
        print("%s (%s) is installed" % (app_name, installed_version))
        return "OK"


def uninstall():
    # Uninstalling software
    killalltasks(control.get_impacted_process_list())
    if isdir(app_dir):
        remove_tree(app_dir)
    unregister_uninstall(app_name, win64app=win64app)
    remove_from_system_path(app_dir)

    # Removing shortcuts
    remove_desktop_shortcut(app_name)
    remove_programs_menu_shortcut(app_name)

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


def update_package():
    # Declaring local variables
    package_updated = False
    proxies = get_proxies()
    if not proxies:
        proxies = get_proxies_from_wapt_console()
    api_url = "https://api.github.com/repos/belowaverage-org/SuperGrate/releases/latest"
    download_dict = {
        "windows-x64": "x64",
        "windows-x86": "x86",
    }

    # Getting latest version information from official sources
    print("API used is: %s" % api_url)
    json_load = wgets(api_url, proxies=proxies, as_json=True)
    version = json_load["tag_name"].replace("v", "").replace(".windows", "")
    for to_download in json_load["assets"]:
        if download_dict[control.target_os + "-" + ensure_list(control.architecture)[0]] in to_download["name"]:
            download_url = to_download["browser_download_url"]
            latest_bin = to_download["name"]
            break

    # Downloading latest binaries
    print("Latest %s version is: %s" % (control.name, version))
    print("Download URL is: %s" % download_url)
    if not isfile(latest_bin):
        print("Downloading: %s" % latest_bin)
        wget(download_url, latest_bin, proxies=proxies)
    else:
        print("Binary is present: %s" % latest_bin)

    # Deleting outdated binaries
    remove_outdated_binaries(latest_bin)
    
    # Extracting .exe
    print(f"Unzipping {latest_bin} to extract .exe file")
    if isdir(latest_bin.strip(".zip")):
        remove_tree(latest_bin.strip(".zip"))
    unzip(latest_bin)
    remove_file(latest_bin)

    # Moving .exe file to folder root
    latest_bin = glob.glob(latest_bin.strip(".zip") + os.sep + "*.exe")[0]
    shutil.move(latest_bin, basedir)
    remove_tree(latest_bin.split(os.sep)[0])
    latest_bin = glob.glob(latest_bin.split(os.sep)[1])[0]

    # Checking version from file
    if get_os_name() == "Windows" and "windows" in control.target_os.lower():
        version_from_file = get_version_from_binary(latest_bin)
        if Version(version_from_file, 4) == Version(version, 4):
            print(f"INFO: Binary file version ({version_from_file}) corresponds to online version ({version})")
        else:
            error(f"ERROR: Binary file version ({version_from_file}) do NOT corresponds to online version ({version})")

    # Changing version of the package
    if Version(version, 4) > Version(control.get_software_version(), 4):
        print("Software version updated (from: %s to: %s)" % (control.get_software_version(), Version(version)))
        package_updated = True
    else:
        print("Software version up-to-date (%s)" % Version(version))
    control.set_software_version(version)
    control.save_control_to_wapt()

    # Validating update-package-sources
    return package_updated

afcc36fb0f041286a10b918e0689d4d56a267b24e463dda1b87fd43f06894956 : SuperGrate.exe
38d056ab130f7bf7c481c12636a4e9959de36561d3dfcbe54c6e3571bc0c1dc3 : WAPT/certificate.crt
348d88644257507f1a049bc87c84b17a5e823c0fbdff75fd5371d97792ad1a12 : WAPT/control
20933aeb4dd9c73efe3de676bfc7090acaeb0c00a56744b6fced6628194165f7 : WAPT/icon.png
35ce9be8cfdc80b83b705f07fc8d764853aa4292e6c8cdd66b17f76e17c3129d : luti.json
efe8300aa349311da9b1d6551b02add78199dc94c90752e378f40e14b46d6df8 : setup.py
dc2b13c1b18bc53481c470d87fd918104a933a03674bc6aa05959ce7dc947274 : update_package.py