tis-stoatchat icon

stoatchat

Silent install package for stoatchat

1.3.0-0
Office
Office

  • package: tis-stoatchat
  • name: stoatchat
  • version: 1.3.0-0
  • categories: Office
  • maintainer: WAPT Team,Tranquil IT,Gwenaël Adam
  • editor: Revolt Platforms Ltd
  • locale: all
  • target_os: windows
  • architecture: x64
  • signature_date:
  • size: 122.24 Mo
  • homepage : https://stoat.chat/

package           : tis-stoatchat
version           : 1.3.0-0
architecture      : x64
section           : base
priority          : optional
name              : stoatchat
categories        : Office
maintainer        : WAPT Team,Tranquil IT,Gwenaël Adam
description       : Open source, user-first chat platform. (formerly Revolt)
depends           : 
conflicts         : 
maturity          : PROD
locale            : all
target_os         : windows
min_wapt_version  : 2.0
sources           : https://github.com/stoatchat/for-desktop
installed_size    : 
impacted_process  : 
description_fr    : Plateforme de chat open source axée sur l'utilisateur. (Anciennement Revolt)
description_pl    : Platforma czatu o otwartym kodzie źródłowym, nastawiona na użytkownika. (dawniej Revolt)
description_de    : Open-Source-Chatplattform mit Fokus auf den Benutzer. (ehemals Revolt)
description_es    : Plataforma de chat de código abierto centrada en el usuario (anteriormente Revolt).
description_pt    : Plataforma de chat de código aberto, focada no utilizador. (anteriormente Revolt)
description_it    : Piattaforma di chat open source incentrata sull'utente. (in precedenza Revolt)
description_nl    : Open source, gebruikersgericht chatplatform. (voorheen Revolt)
description_ru    : Платформа для чата с открытым исходным кодом, ориентированная на пользователя (ранее Revolt).
audit_schedule    : 
editor            : Revolt Platforms Ltd
keywords          : 
licence           : 
homepage          : https://stoat.chat/
package_uuid      : 77c2f2c7-50bc-4726-8198-dd397ff1daab
valid_from        : 
valid_until       : 
forced_install_on : 
changelog         : https://github.com/stoatchat/for-desktop/releases
min_os_version    : 10
max_os_version    : 
icon_sha256sum    : a7a98681bed5f5148a5b527b53eb1df504be49769d981fbcf6d6fbb0aae65396
signer            : Tranquil IT
signer_fingerprint: 8c5127a75392be9cc9afd0dbae1222a673072c308c14d88ab246e23832e8c6bb
signature_date    : 2026-02-24T14:09:53.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         : DjnrpoRh6+OxzdqFATsvjNTURBs/jhjlNtd0MwGc33GUvikqanGLalR4KGIOLDwXSZE0NcX3YA5yo8k7/4l4eySrwZHUGlrEUhzN91okd7Z+gAQRi3HrgE0m1EXaa6uYfqiWjRDQCDn5c7nRSeGmdU7+I27h4VoFh2g1FcMwCA6XgHwUiIfI+Kqa/LCZMfKQMoZo8noaq9ufw+Ul9Cj6btGY99bv771BkeNA8GZ5qA48jKhQNMlB/1UllfMQFOPuGzX7NsMU4SikSJ63iiDsmW8LzY9HRUevYpM474gXWtgMpRj0fmoQtx/sj+RceAeiVxSupeUdVQds9m4t328Trg==

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


stoat_install_dir = makepath(programfiles32, "stoat_install")
stoat_install_path = makepath(stoat_install_dir, "stoat-desktop-setup.exe")


def install():
    mkdirs(stoat_install_dir)
    filecopyto("stoat-desktop-setup.exe", stoat_install_path)
    stoat_squirrel_remove()


def session_setup():
    # Remove appdata installs
    localappdata_app_dir = makepath(user_local_appdata, "Stoat")
    localappdata_squirrel_dir = makepath(user_local_appdata, "SquirrelTemp")

    if isdir(localappdata_app_dir):
        if not isfile(makepath(localappdata_app_dir, ".dead")):
            try:
                app_uninstall_cmd = rf'"{localappdata_app_dir}\Update.exe" --uninstall -s'
                run(app_uninstall_cmd)
            except:
                print(f"Unable to remove Stoat in: {localappdata_app_dir}")
        remove_tree(localappdata_app_dir)

    if isdir(localappdata_squirrel_dir):
        remove_tree(localappdata_squirrel_dir)

    # Install app
    user_app_dir = makepath(user_local_appdata, "Stoat")
    stoat_versions = glob.glob(makepath(user_app_dir, "**/stoat-desktop.exe"))
    if stoat_versions:
        stoat_version = "1.0"
        for d in stoat_versions:
            if Version(get_file_properties(d)["ProductVersion"]) > Version(stoat_version):
                stoat_version = get_file_properties(d)["ProductVersion"]
        if Version(control.get_software_version()) > Version(stoat_version):
            run('"%s"' % stoat_install_path)
        else:
            print(f"Stoat already up-to-date ({stoat_version})")
    else:
        run('"%s"' % stoat_install_path)

    # Disable app run at startup
    reg_app_run = None
    loop = 0
    loop_timer = 1
    max_loop = 120
    while not reg_app_run:
        reg_app_run = registry_readstring(HKEY_CURRENT_USER, r"SOFTWARE\Microsoft\Windows\CurrentVersion\Run", "stoat-desktop")
        loop += loop_timer
        if loop >= max_loop:
            break
        time.sleep(loop_timer)
    if reg_app_run:
        registry_setstring(HKEY_CURRENT_USER, r"SOFTWARE\Microsoft\Windows\CurrentVersion\Run\AutorunsDisabled", "stoat-desktop", reg_app_run)
        registry_delete(HKEY_CURRENT_USER, r"SOFTWARE\Microsoft\Windows\CurrentVersion\Run", "stoat-desktop")

    # Stoat interact differently if user is admin
    if running_as_admin():
        stoat_squirrel_remove()


def uninstall():
    if isdir(stoat_install_dir):
        remove_tree(stoat_install_dir)
    stoat_squirrel_remove()
    # registry_delete(HKEY_LOCAL_MACHINE, r"SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\StartupApproved\Run", "Stoat")
    # registry_delete(HKEY_LOCAL_MACHINE, r"SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\StartupApproved\Run32", "Stoat")

    # if Stoat was uninstalled a .dead file is left behind to prevent automatic reinstall
    for user_dir in glob.glob(makepath(systemdrive, "Users", "*")):
        # "C:\Users\username\AppData\Local\Stoat\Update.exe"
        local_appdata_app_dir = makepath(user_dir, "AppData", "Local", "Stoat")
        if isdir(local_appdata_app_dir):
            if not isfile(makepath(local_appdata_app_dir, ".dead")):
                try:
                    app_uninstall_cmd = rf'"{local_appdata_app_dir}\Update.exe" --uninstall -s'
                    print(app_uninstall_cmd)
                    run(app_uninstall_cmd)
                except:
                    print("Unable to remove Stoat for user: %s" % user_dir.split(os.sep)[-1])
            remove_tree(local_appdata_app_dir)


def stoat_squirrel_remove():
    # squirrel_dir = makepath(programdata, "SquirrelMachineInstalls")
    stoat_old_installer = makepath(user_local_appdata, "stoat-desktop.exe")
    if isfile(stoat_old_installer):
        remove_file(stoat_old_installer)
    # if dir_is_empty(squirrel_dir):
    #     remove_tree(squirrel_dir)

    # registry_delete(HKEY_LOCAL_MACHINE, r"SOFTWARE\Microsoft\Windows\CurrentVersion\Run", "Stoat")
    # registry_delete(HKEY_LOCAL_MACHINE, r"SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Run", "Stoat")

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

def update_package():
    # Declaring local variables
    result = False
    proxies = get_proxies()
    if not proxies:
        proxies = get_proxies_from_wapt_console()
    app_name = control.name
    url_api = "https://api.github.com/repos/stoatchat/for-desktop/releases/latest"
    bin_ends = "desktop-setup.exe"

    # Getting latest informations from Github API
    json_load = json.loads(wgets(url_api, proxies=proxies))

    for download in json_load["assets"]:
        if download["browser_download_url"].endswith(bin_ends):
            download_url = download["browser_download_url"]
            latest_bin = download["name"]
            break

    version = json_load["tag_name"].replace("v", "")

    print(f"Latest {app_name} version is: {version}")
    print(f"Download URL is: {download_url}")

    # Downloading latest binaries
    if not isfile(latest_bin):
        print(f"Downloading: {latest_bin}")
        wget(download_url, latest_bin, proxies=proxies)

        # Checking version from file
        version_from_file = get_version_from_binary(latest_bin)
        if not version_from_file.startswith(version) and version_from_file != "":
            print(f"Changing version to the version number of the binary (from: {version} to: {version_from_file})")
            os.rename(latest_bin, bin_contains + version_from_file + bin_ends)
            version = version_from_file
        else:
            print("Binary file version corresponds to online version")

    # Changing version of the package
    if Version(version) > Version(control.get_software_version()):
        print(f"Software version updated (from: {control.get_software_version()} to: {Version(version)})")
        result = True
    else:
        print(f"Software version up-to-date ({Version(version)})")
    control.version = "%s-%s" % (Version(version), control.version.split("-", 1)[-1])
    # control.set_software_version(version)
    control.save_control_to_wapt()

    # Deleting outdated binaries
    remove_outdated_binaries(version)

    # Validating or not update-package-sources
    return result

f871e94abf8c2845b6fad0f8dd2471ffaf36cbec678caaf0d7d5614668abe089 : .gitignore
38d056ab130f7bf7c481c12636a4e9959de36561d3dfcbe54c6e3571bc0c1dc3 : WAPT/certificate.crt
6b7e1766392599bcbc0a84464786d17e7abe5b2a48fa2557ac55b4c73147e7e5 : WAPT/control
a7a98681bed5f5148a5b527b53eb1df504be49769d981fbcf6d6fbb0aae65396 : WAPT/icon.png
b6ccd7c5f0fa577258d311c26f8bb05d1eb0401f072c000961e98f731f8d0b5a : luti.json
ca24f8db6b4cd74ec3c5c561bfa2b253c33b99ec8fa6a57754f64d9eac6d2dfa : setup.py
8ece74e6c11dc5dd68a3d2d90580f1f8226b2c402d55cac20544636acc9e3ed0 : stoat-desktop-setup.exe
73c2f2711a50e58340b1c0791c7b158937498db831572b60f600c0612c70e772 : update_package.py