tis-gyazo icon

Gazyo

Silent install package for Gazyo

5.8.2-1

  • package: tis-gyazo
  • name: Gazyo
  • version: 5.8.2-1
  • categories: Utilities
  • maintainer: WAPT Team,Tranquil IT,Kenan KILICARSLAN,Gaëtan SEGAT
  • editor: Toshiyuki Masui,Nota Inc
  • licence: GPL3
  • locale: all
  • target_os: windows
  • impacted_process: GyazoGIF,GyazoReplay,Gyazowin,GyOnboarding,GyStation
  • architecture: all
  • signature_date:
  • size: 49.29 Mo
  • installed_size: 19.84 Mo
  • homepage : https://gyazo.com/

package           : tis-gyazo
version           : 5.8.2-1
architecture      : all
section           : base
priority          : optional
name              : Gazyo
categories        : Utilities
maintainer        : WAPT Team,Tranquil IT,Kenan KILICARSLAN,Gaëtan SEGAT
description       : Gyazo is an open-source and free screenshot program
depends           : 
conflicts         : 
maturity          : PROD
locale            : all
target_os         : windows
min_wapt_version  : 2.0
sources           : https://gyazo.com/download
installed_size    : 19841024
impacted_process  : GyazoGIF,GyazoReplay,Gyazowin,GyOnboarding,GyStation
description_fr    : Gyazo est un programme de capture d'écran gratuit et open-source
description_pl    : Gyazo to open-source'owy i darmowy program do tworzenia zrzutów ekranu
description_de    : Gyazo ist ein kostenloses Open-Source-Programm für Bildschirmfotos
description_es    : Gyazo es un programa de captura de pantalla de código abierto y gratuito
description_pt    : Gyazo é um programa de código-fonte aberto e gratuito
description_it    : Gyazo è un programma open-source e gratuito per fare screenshot
description_nl    : Gyazo is een open-source en gratis screenshot programma
description_ru    : Gyazo - бесплатная программа для создания скриншотов с открытым исходным кодом
audit_schedule    : 
editor            : Toshiyuki Masui,Nota Inc
keywords          : screenshot,recorder
licence           : GPL3
homepage          : https://gyazo.com/
package_uuid      : 4ac6ba3a-68f9-425c-9e55-7ce2bdcc02f1
valid_from        : 
valid_until       : 
forced_install_on : 
changelog         : 
min_os_version    : 6.1
max_os_version    : 
icon_sha256sum    : 73ccd3bcedf31d311fcfbb9f40664b51cbe92c87b11c442877998053263d4748
signer            : Tranquil IT
signer_fingerprint: 8c5127a75392be9cc9afd0dbae1222a673072c308c14d88ab246e23832e8c6bb
signature_date    : 2025-06-28T08:00:15.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         : Tz6KLRiZ78TYpnTgAVeuPs6DkhRZhfJELY4UgDYbKWo9hFEp/6lyWVaRp72l8BUBE573u71/Y3RHrZ/hPctiTA/eYaEOSXG92eV+InN7MK3nFjLqhUiIOuwzUC7UowLysq3+6tdjtc95nS0p4NhRFlRmBW32ZDXiJ7ZPV9abyYx5s35Pwhq3qjs6tBVrucYqSndb8e0tXg+u1tCHcmRb39F11gz4vV+J80re405GtJOepQW9gQTg/Str4omzu3mbecnjo3r0Fcv7+ME4Fnh9kFWXiqKc0z3x0pr4GyTmLu+h4jVl+3WDqhZK9kaVzN5x6bkWAtpTAz2t1baNyNrO8A==

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


def install():
    # Initializing variables
    app_uninstallkey = "{6DB8C365-E719-4BA5-9594-10DFC244D3FD}_is1"
    app_dir = makepath(programfiles32, "Gyazo")
    package_version = control.version.split("-")[0]
    bin_name = "Gyazo-%s.exe" % package_version

    def get_version_soft(key):
        return key["name"].split(" ")[1]

    # Installing the package
    print("Installing: %s" % bin_name)
    install_exe_if_needed(bin_name, silentflags="/VERYSILENT /SUPPRESSMSGBOXES /NORESTART", key=app_uninstallkey, min_version=package_version, get_version=get_version_soft)

    if not installed_softwares(uninstallkey=app_uninstallkey)[0]["version"]:
        # Create silent uninstall command in registry
        app_uninstallkey_quiet = installed_softwares(uninstallkey=app_uninstallkey)[0]["uninstall_string"] + "/VERYSILENT"
        # Add in registry
        register_uninstall(app_uninstallkey, app_uninstallkey_quiet, display_version=package_version)
    # Remove updater
    remove_file(makepath(app_dir, "GyazoUpdate.exe"))

    for soft in ["Gyazowin.exe", "GyazoGIF.exe", "GyazoReplay.exe"]:
        create_programs_menu_shortcut(soft.split(".exe")[0], makepath(app_dir, soft))
    create_programs_menu_shortcut("Gyazo Settings", makepath(app_dir, "GyStation.exe"), "/option")


def uninstall():

    for soft in ["Gyazowin.exe", "GyazoGIF.exe", "GyazoReplay.exe"]:
        remove_programs_menu_shortcut(soft.split(".exe")[0])
    remove_programs_menu_shortcut("Gyazo Settings")


def get_version_from_binary(filename, parameter="ProductVersion"):
    if filename.endswith(".msi"):
        return get_msi_properties(filename)[parameter]
    else:
        return get_file_properties(filename)[parameter]


def remove_outdated_binaries(version, list_extensions=["exe", "msi", "deb", "rpm", "dmg", "pkg", "zip"], list_filename_contain=None):
    if type(list_extensions) != list:
        list_extensions = [list_extensions]
    if list_filename_contain:
        if type(list_filename_contain) != list:
            list_filename_contain = [list_filename_contain]
    list_extensions = ["." + ext for ext in list_extensions if ext[0] != "."]
    for file_ext in list_extensions:
        for bin_in_dir in glob.glob("*%s" % file_ext):
            if not version in bin_in_dir:
                remove_file(bin_in_dir)
            if list_filename_contain:
                for filename_contain in list_filename_contain:
                    if not filename_contain in bin_in_dir:
                        remove_file(bin_in_dir)

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



def update_package():
    # Initializing variables
    bin_name_sub = "Gyazo-%s.exe"
    proxies = get_proxies()
    if not proxies:
        proxies = get_proxies_from_wapt_console()
    app_name = control.name
    url = "https://gyazo.com/download"
    bin_end = bin_name_sub.split("%s")[-1]
    # bin_start = bin_name_sub.split('%s')[0]

    # Getting latest version from official sources
    print("URL used is: %s" % url)
    for bs_search in bs_find_all(
        url,
        "a",
        "id",
        "download_btn",
        headers={"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Firefox/78.0"},
        proxies=proxies,
    ):
        if bs_search["href"].split("/")[-1].endswith(bin_end):
            latest_bin = bs_search["href"].split("/")[-1]
            version = bs_search["href"].split("-")[-1].split(bin_end)[0]
            url_dl = bs_search["href"]
            break

    print("Latest %s version is: %s" % (app_name, version))
    print("Download url is: %s" % url_dl)

    # Downloading latest binaries
    if not isfile(latest_bin):
        print("Downloading: %s" % latest_bin)
        wget(url_dl, latest_bin, proxies=proxies)

        # Checking version from file
        version_from_file = get_version_from_binary(latest_bin)
        if version != version_from_file:
            os.rename(latest_bin, bin_name_sub % version_from_file)
            version = version_from_file

        # Changing version of the package
        control.version = "%s-%s" % (version, control.version.split("-", 1)[-1])
        control.save_control_to_wapt()
        print("Changing package version to: %s in WAPT\\control" % control.version)

    # Deleting outdated binaries
    remove_outdated_binaries(version)

d97d3491c7c23db7ca1a445b1be7bf44f03e83d1dd1652ad98c60af97af82a68 : Gyazo-5.8.2.exe
38d056ab130f7bf7c481c12636a4e9959de36561d3dfcbe54c6e3571bc0c1dc3 : WAPT/certificate.crt
9b7265a0b44ba20d29ec6a34c7c7f4d2e039b3779ad764da56009f848fb195bc : WAPT/control
73ccd3bcedf31d311fcfbb9f40664b51cbe92c87b11c442877998053263d4748 : WAPT/icon.png
760c307123edc5ab50bd854bd68d9a2b5f2892655d86f1904e0170afbe21b818 : luti.json
b44369ee788d48dc255d12619ea3ee3054c6b83c1c7b4a57db88b389fd0ffa69 : setup.py
9368cbea4d7501f27d01b6aed4992ee90246923c5f594c45f6849b14de4b3cc7 : update_package.py