tis-scratch icon

Scratch

Paquet d’installation silencieuse pour Scratch

3.29.1-2

  • package: tis-scratch
  • name: Scratch
  • version: 3.29.1-2
  • categories: development
  • maintainer: WAPT Team,Tranquil IT,développeur du paquet,Gaëtan SEAGT
  • editor: Scratch Foundation
  • licence: BSD-3-Clause license
  • locale: all
  • target_os: windows
  • architecture: all
  • signature_date:
  • size: 168.93 Mo
  • homepage : https://scratch.mit.edu

package           : tis-scratch
version           : 3.29.1-2
architecture      : all
section           : base
priority          : optional
name              : Scratch
categories        : development
maintainer        : WAPT Team,Tranquil IT,développeur du paquet,Gaëtan SEAGT
description       : Scratch is the world's largest free coding community for children
depends           : 
conflicts         : 
maturity          : PROD
locale            : all
target_os         : windows
min_wapt_version  : 2.0
sources           : https://scratch.mit.edu/download
installed_size    : 
impacted_process  : 
description_fr    : Scratch est la plus grande communauté de codage gratuite au monde pour les enfants
description_pl    : Scratch to największa na świecie darmowa społeczność koderów dla dzieci
description_de    : Scratch ist die weltweit größte kostenlose Programmierer-Community für Kinder
description_es    : Scratch es la mayor comunidad de codificación gratuita del mundo para niños
description_pt    : Scratch é a maior comunidade mundial de codificação gratuita para crianças
description_it    : Scratch è la più grande comunità di coding gratuita per bambini al mondo
description_nl    : Scratch is 's werelds grootste gratis codeergemeenschap voor kinderen
description_ru    : Scratch - крупнейшее в мире бесплатное сообщество кодирования для детей
audit_schedule    : 
editor            : Scratch Foundation
keywords          : development
licence           : BSD-3-Clause license
homepage          : https://scratch.mit.edu
package_uuid      : 41d69ef2-79da-421c-98bb-355d60d95e47
valid_from        : 
valid_until       : 
forced_install_on : 
changelog         : 
min_os_version    : 
max_os_version    : 
icon_sha256sum    : dc19e951595554d12f3380c86362b4fb37cebafa2731dabb0d6a6c13b48b6fa4
signer            : Tranquil IT
signer_fingerprint: 8c5127a75392be9cc9afd0dbae1222a673072c308c14d88ab246e23832e8c6bb
signature         : vNZmBR32zl8hTYhpHilM+tpfIRPm+G0ARL2cDPofmnBKKxJjNOjb+BUTzv+QizNU5A8IfUxw77nIH+4N8juMD/PLaZi95935hW3nzwann54bC801jSEC89IQeM5KNMtCCojHyAYN9ALGk4XZdDgSu7hMH8buBZkfQtPJwl9mh9bUvYikcA9Qx6zQ0pFXMomyvZhqQAA59EYziOAPfZia1bCoK1D7lBnGtQ+9H3X3b/XHGbVlZnyDx8jPvn8lsViYx7viCn+G4sa1LusfOPjPmXHHcbNcp99bqIVMFxzbpI+07GAB+VcQOcPSHZ3B6i9RTEAJdEMGTrq2YZ9zIrZAXA==
signature_date    : 2023-10-03T12:02:08.118972
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

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

# 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
    package_version = control.get_software_version()
    bin_name = glob.glob("*Scratch-*.exe")[0]

    # Uninstalling older versions of the software
    for to_uninstall in installed_softwares(name=r"Scratch"):
        if to_uninstall["publisher"] == "Scratch Foundation" or to_uninstall["publisher"] == "MIT Media Lab Lifelong Kindergarten":
            if Version(to_uninstall["version"]) < Version(package_version) or force:
                print("Removing: %s (%s)" % (to_uninstall["name"], to_uninstall["version"]))
                killalltasks(control.impacted_process.split(","))
                run(uninstall_cmd(to_uninstall["key"]))
                wait_uninstallkey_absent(to_uninstall["key"])

    # Installing the software
    print("Installing: %s" % bin_name)
    install_exe_if_needed(
        bin_name,
        silentflags="/allusers /S",
        key="bad79d23-e888-5a7b-9e99-60ee89b6c8bf",
        min_version=package_version,
    )

    # Remove shorcut
    remove_desktop_shortcut("Scratch 3")


def session_setup():
    # Declaring local variables
    json_file_path = makepath(user_appdata(), "Scratch", "telemetry.json")
    json_file_dict = {"clientID": "", "packetQueue": [], "optIn": False}

    if not isdir(makepath(user_appdata(), "Scratch")):
        mkdirs(makepath(user_appdata(), "Scratch"))

    if isfile(json_file_path):
        json_file = json_load_file(json_file_path)
        json_file["optIn"] = False
        json_write_file(json_file_path, json_file)
    else:
        json_write_file(json_file_path, json_file_dict)

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

bin_contains = "Scratch-"


def update_package():
    import requests

    # Declaring local variables
    result = False
    proxies = get_proxies()
    if not proxies:
        proxies = get_proxies_from_wapt_console()
    app_name = control.name
    download_url = "https://downloads.scratch.mit.edu/desktop/Scratch%20Setup.exe"

    # Getting latest binariy name and replace "%20" by "-"
    latest_bin = (requests.head(download_url, allow_redirects=True).url.split("/")[-1]).replace("%20", "-")

    # Downloading latest binaries
    if not isfile(latest_bin):
        print("URL used is: %s" % download_url)
        wget(download_url, latest_bin)
    else:
        print("Binary is present: %s" % latest_bin)

    # Getting latest version from binary
    version = get_version_from_binary(latest_bin)
    print("Latest %s version is: %s" % (app_name, version))

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

    # Deleting outdated binaries
    remove_outdated_binaries(version)

    # Validating or not update-package-sources
    return result

eabbcfc7eb569864ae53631c929cfd115ab7953cb53ffac57f38c795c6204296 : setup.py
dfca2f1a842aea69a2b0a22ca66fa7852f86259e3da4f576f8ae7fa16f1e9134 : Scratch-3.29.1-Setup.exe
2bcaff52fe11e3f3c88af1d255362a54153504b6095b3642abfe7926e67bdc89 : update_package.py
dc19e951595554d12f3380c86362b4fb37cebafa2731dabb0d6a6c13b48b6fa4 : WAPT/icon.png
a5a97261381e1d0ad46ee15916abec9c2631d0201f5cc50ceb0197a165a0bbbf : WAPT/certificate.crt
2d02ac85122c7eebf6907a10f78275d8557329cf049974bd52019cb8b1aafb37 : luti.json
f81cb1437703feaf42777c0c21e5824b60eb0a8c87af1394dace64a66ba14181 : WAPT/control