tis-dotnet3 icon

.NET Runtime 3

Paquet d'installation silencieuse pour .NET Runtime 3

3.1.32-13
Dependency
Dependency

  • package: tis-dotnet3
  • name: .NET Runtime 3
  • version: 3.1.32-13
  • categories: Dependency
  • maintainer: WAPT Team,Tranquil IT,Jimmy PELÉ,Stan SALOMON
  • editor: Microsoft
  • licence: opensource_free,cpe:/a:mit:x11_license,wapt_public
  • locale: all
  • target_os: windows
  • architecture: x86
  • signature_date:
  • size: 49.13 Mo
  • homepage : https://github.com/dotnet/windowsdesktop

package           : tis-dotnet3
version           : 3.1.32-13
architecture      : x86
section           : base
priority          : optional
name              : .NET Runtime 3
categories        : Dependency
maintainer        : WAPT Team,Tranquil IT,Jimmy PELÉ,Stan SALOMON
description       : The .NET Desktop Runtime enables you to run existing Windows desktop applications. This release includes the .NET Runtime; you don't need to install it separately
depends           : 
conflicts         : 
maturity          : PROD
locale            : all
target_os         : windows
min_wapt_version  : 2.5
sources           : https://github.com/dotnet/windowsdesktop
installed_size    : 
impacted_process  : 
description_fr    : Le moteur d'exécution .NET Desktop Runtime vous permet d'exécuter des applications de bureau Windows existantes. Cette version inclut le Runtime .NET ; vous n'avez pas besoin de l'installer séparément
description_pl    : Środowisko uruchomieniowe .NET Desktop Runtime umożliwia uruchamianie istniejących aplikacji pulpitu systemu Windows. Ta wersja zawiera środowisko uruchomieniowe .NET; nie trzeba go instalować osobno
description_de    : Mit der .NET Desktop Runtime können Sie vorhandene Windows-Desktop-Anwendungen ausführen. Diese Version enthält die .NET Runtime; Sie brauchen sie nicht separat zu installieren
description_es    : .NET Desktop Runtime le permite ejecutar las aplicaciones de escritorio de Windows existentes. Esta versión incluye .NET Runtime; no es necesario instalarlo por separado
description_pt    : O .NET Desktop Runtime permite-lhe executar aplicações existentes do ambiente de trabalho do Windows. Esta versão inclui o .NET Runtime; não é necessário instalá-lo separadamente
description_it    : Il .NET Desktop Runtime consente di eseguire le applicazioni desktop di Windows esistenti. Questa versione include il .NET Runtime; non è necessario installarlo separatamente
description_nl    : Met de .NET Desktop Runtime kun je bestaande Windows desktopapplicaties uitvoeren. Deze release bevat de .NET Runtime; je hoeft deze niet apart te installeren
description_ru    : .NET Desktop Runtime позволяет запускать существующие приложения для настольных систем Windows. Данный выпуск включает в себя .NET Runtime; устанавливать его отдельно не требуется
audit_schedule    : 
editor            : Microsoft
keywords          : .net,desktop,windows,windowsdesktop,il,msil,clr,jit,fc,bcl,runtime,wpf,winforms,windows forms,Microsoft,net
licence           : opensource_free,cpe:/a:mit:x11_license,wapt_public
homepage          : https://github.com/dotnet/windowsdesktop
package_uuid      : c90bc5c6-3cc0-4231-ab1e-1e5e04e052e1
valid_from        : 
valid_until       : 
forced_install_on : 
changelog         : https://github.com/dotnet/core/tree/main/release-notes/3.1
min_os_version    : 6.1
max_os_version    : 
icon_sha256sum    : c13943b8f92a4717f46bad189c0b91d9003d76a0127a41459ec91693b263830c
signer            : Tranquil IT
signer_fingerprint: 8c5127a75392be9cc9afd0dbae1222a673072c308c14d88ab246e23832e8c6bb
signature_date    : 2026-11-15T12:52:08.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         : PJ6vk/m/ns0+zQ86KrKBpAolN1gvB6Idr4RWQOoG3dMl9MfnoD7YM3LSI3kyPTiaggG4YKjEjRZuByx1nH3PR7l+zaCqBNtgW+ztmju9C6UUl3a7G2h4kaRZAKThWOYnxaTq95YwDgP19CVNQsHZrfls1C8HTbwJZsANU9QCyls3LdPBDJeE6g4cA+CTfnIr8po1Mj5w2M7t/sEGfUnvIxprsv+Xh5IleIE5qmXJabqR6/sOF6PZr06aWDnIYl2boZkXP1egYA7L09ArguNU/yktI6moaTCH/eSV0WZf9r3qoDl7MnEqO9u7GW6iFSow2bn7a0Dao6plF4V0jB1LiA==

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

"""
[
    {
        "key": "{5BEE5F3E-4D78-4DE8-A8F3-36D3E9D8868C}",
        "name": "Microsoft Windows Desktop Runtime - 3.1.32 (x64)",
        "version": "24.192.31915",
        "install_date": "2023-11-28 00:00:00",
        "install_location": "",
        "uninstall_string": "MsiExec.exe /X{5BEE5F3E-4D78-4DE8-A8F3-36D3E9D8868C}",
        "publisher": "Microsoft Corporation",
        "system_component": 0,
        "win64": true,
    },
    {
        "key": "{8A8E3A04-83BC-4CDE-9259-893B666C1AB1}",
        "name": "Microsoft .NET Core Host - 3.1.32 (x64)",
        "version": "24.192.31915",
        "install_date": "2023-11-28 00:00:00",
        "install_location": "",
        "uninstall_string": "MsiExec.exe /X{8A8E3A04-83BC-4CDE-9259-893B666C1AB1}",
        "publisher": "Microsoft Corporation",
        "system_component": 0,
        "win64": true,
    },
    {
        "key": "{A741B803-3F0E-4684-81EF-FC128D15A92C}",
        "name": "Microsoft .NET Core Runtime - 3.1.32 (x64)",
        "version": "24.192.31915",
        "install_date": "2023-11-28 00:00:00",
        "install_location": "",
        "uninstall_string": "MsiExec.exe /X{A741B803-3F0E-4684-81EF-FC128D15A92C}",
        "publisher": "Microsoft Corporation",
        "system_component": 0,
        "win64": true,
    },
    {
        "key": "{ABC6B3C2-1A8D-4C5E-AC16-C2AE44F02743}",
        "name": "Microsoft .NET Core Host FX Resolver - 3.1.32 (x64)",
        "version": "24.192.31915",
        "install_date": "2023-11-28 00:00:00",
        "install_location": "",
        "uninstall_string": "MsiExec.exe /X{ABC6B3C2-1A8D-4C5E-AC16-C2AE44F02743}",
        "publisher": "Microsoft Corporation",
        "system_component": 0,
        "win64": true,
    },
    {
        "key": "{0eddeab6-01c1-4cf7-83ba-164ea8974c90}",
        "name": "Microsoft Windows Desktop Runtime - 3.1.32 (x64)",
        "version": "3.1.32.31915",
        "install_date": "",
        "install_location": "",
        "uninstall_string": '"C:\\ProgramData\\Package Cache\\{0eddeab6-01c1-4cf7-83ba-164ea8974c90}\\windowsdesktop-runtime-3.1.32-win-x64.exe"  /uninstall',
        "publisher": "Microsoft Corporation",
        "system_component": 0,
        "win64": false,
    },
    {
        "key": "{25D5B94A-E3CD-44E8-9C3A-FE320B7B38FC}",
        "name": "Microsoft Windows Desktop Runtime - 3.1.32 (x86)",
        "version": "24.192.31915",
        "install_date": "2023-11-28 00:00:00",
        "install_location": "",
        "uninstall_string": "MsiExec.exe /X{25D5B94A-E3CD-44E8-9C3A-FE320B7B38FC}",
        "publisher": "Microsoft Corporation",
        "system_component": 0,
        "win64": false,
    },
    {
        "key": "{3C73457A-1A33-4DE0-B6C2-6FBA877E1FCF}",
        "name": "Microsoft .NET Core Host - 3.1.32 (x86)",
        "version": "24.192.31915",
        "install_date": "2023-11-28 00:00:00",
        "install_location": "",
        "uninstall_string": "MsiExec.exe /X{3C73457A-1A33-4DE0-B6C2-6FBA877E1FCF}",
        "publisher": "Microsoft Corporation",
        "system_component": 0,
        "win64": false,
    },
    {
        "key": "{4f894285-fd43-43ac-8669-33e8b7c0a97d}",
        "name": "Microsoft Windows Desktop Runtime - 3.1.32 (x86)",
        "version": "3.1.32.31915",
        "install_date": "",
        "install_location": "",
        "uninstall_string": '"C:\\ProgramData\\Package Cache\\{4f894285-fd43-43ac-8669-33e8b7c0a97d}\\windowsdesktop-runtime-3.1.32-win-x86.exe"  /uninstall',
        "publisher": "Microsoft Corporation",
        "system_component": 0,
        "win64": false,
    },
    {
        "key": "{841FE4B1-2C3F-4304-A686-6DF41B4CC1A1}",
        "name": "Microsoft .NET Core Runtime - 3.1.32 (x86)",
        "version": "24.192.31915",
        "install_date": "2023-11-28 00:00:00",
        "install_location": "",
        "uninstall_string": "MsiExec.exe /X{841FE4B1-2C3F-4304-A686-6DF41B4CC1A1}",
        "publisher": "Microsoft Corporation",
        "system_component": 0,
        "win64": false,
    },
    {
        "key": "{CE1A992F-4571-423D-9CAE-1184E8F29471}",
        "name": "Microsoft .NET Core Host FX Resolver - 3.1.32 (x86)",
        "version": "24.192.31915",
        "install_date": "2023-11-28 00:00:00",
        "install_location": "",
        "uninstall_string": "MsiExec.exe /X{CE1A992F-4571-423D-9CAE-1184E8F29471}",
        "publisher": "Microsoft Corporation",
        "system_component": 0,
        "win64": false,
    },
]


"""


def install():
    dotnet_version = control.get_software_version().split(".")[0]

    # Installing the software
    silentflags = "/install /quiet /norestart"
    if iswin64():
        install_exe_if_needed(
            glob.glob("windowsdesktop-runtime-*x64.exe")[0],
            silentflags=silentflags,
            name=f"Microsoft Windows Desktop Runtime - {dotnet_version}.*(x64)",
            min_version="",
            force=True,  # force option, since the version is not easy to check, and the installer will take care of it.
        )
    install_exe_if_needed(
        glob.glob("windowsdesktop-runtime-*x86.exe")[0],
        silentflags=silentflags,
        name=f"Microsoft Windows Desktop Runtime - {dotnet_version}.*(x86)",
        min_version="",
        force=True,  # force option, since the version is not easy to check, and the installer will take care of it.
    )

    # Clear uninstallkey to avoid the no-code audit and uninstall
    uninstallkey.clear()


def audit():
    # Declaring local variables
    audit_result = "OK"
    dotnet_version = control.get_software_version().split(".")[0]
    app_check = installed_softwares(name=f"Microsoft Windows Desktop Runtime - {dotnet_version}.*")
    audit_version = True

    # Auditing software
    if not app_check:
        print("%s is not installed" % control.package.split("-", 1)[-1].replace("-", " ").title())
        audit_result = "ERROR"
    elif audit_version:
        for to_audit in app_check:
            if r"ProgramData\Package Cache" in to_audit["uninstall_string"]:
                if Version(to_audit["version"]) < Version(control.get_software_version()):
                    print(f'{to_audit["name"]} is installed in version: {to_audit["version"]} instead of: {control.get_software_version()}.')
                    audit_result = "WARNING"
                else:
                    print("%s is installed and up-to-date." % to_audit["name"])

    return audit_result


def uninstall():
    # Declaring local variables
    dotnet_version = control.get_software_version().split(".")[0]

    for to_uninstall in installed_softwares(name=f"Microsoft Windows Desktop Runtime - {dotnet_version}.*"):
        if r"ProgramData\Package Cache" in to_uninstall["uninstall_string"]:
            print("Removing: %s (%s)" % (to_uninstall["name"], to_uninstall["version"]))
            killalltasks(ensure_list(control.impacted_process))
            run(uninstall_cmd(to_uninstall["key"]) + " /norestart")
            wait_uninstallkey_absent(to_uninstall["key"])
            if isdir(to_uninstall["install_location"]):
                remove_tree(to_uninstall["install_location"])

from setuphelpers import *
from setupdevhelpers import *

"""

https://builds.dotnet.microsoft.com/dotnet/release-metadata/{version}/releases.json

"""

dotnet_version = "3.1"

def update_package():
    # Declaring local variables
    package_updated = False
    proxies = get_proxies()

    os_dict = {
        "windows-x64": "win-x64",
        "windows-x86": "win-x86",
        "windows-arm64": "win-arm64",
        "linux-x64": "linux-x64",
        "linux-arm64": "linux-arm64",
        "darwin-x64": "osx-x64",
        "darwin-arm64": "osx-arm64"
    }

    os_type = control.target_os + "-" + ensure_list(control.architecture)[0]

    if not proxies:
        proxies = get_proxies_from_wapt_console()

    data = wgets(f"https://builds.dotnet.microsoft.com/dotnet/release-metadata/{dotnet_version}/releases.json", proxies=proxies, as_json=True)
    runtime = data["releases"][0]["windowsdesktop"] if "windows" in control.target_os else data["releases"][0]["runtime"]
    version = runtime["version"]
    download_url = []
    for asset in runtime["files"]:
        if control.target_os == "windows":
            if asset["name"].endswith(".exe"):
                print("Found %s " % (asset["name"]))
                download_url.append({
                    "url": asset["url"],
                    "latest_bin": asset["url"].split("/")[-1]
                })
                # No need to break here, because we want to download all the runtimes for the different architectures (x86, x64, arm64)
        elif control.target_os == "darwin":
            if asset["rid"] == os_dict[os_type] and asset["name"].endswith(".pkg"):
                download_url = asset["url"]
                latest_bin = download_url.split("/")[-1]
                break
        elif control.target_os == "linux" and asset["rid"] == os_dict[os_type]:
                download_url = asset["url"]
                latest_bin = download_url.split("/")[-1]
                break

    arch = ensure_list(control.architecture)
    print(arch)
    if "arm64" in arch:
        archs = ["arm64", "x64", "x86"]
    if "x64" in arch:
        archs = ["x64", "x86"]
    if "x86" in arch:
        archs = ["x86"]
    # Checking version from file
    if control.target_os == "windows":
        print(archs)
        print(download_url)
        for dl_info in download_url:
            if dl_info["latest_bin"].split("-")[-1].split(".exe")[0] in archs:
                print("Latest %s version is: %s" % (control.name, version))
                print("Download URL is: %s" % dl_info["url"])
                if not isfile(dl_info["latest_bin"]):
                    print("Downloading: %s" % dl_info["latest_bin"])
                    wget(dl_info["url"], dl_info["latest_bin"], proxies=proxies)
    else:
        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)

    remove_outdated_binaries(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 or not update-package-sources
    return package_updated

38d056ab130f7bf7c481c12636a4e9959de36561d3dfcbe54c6e3571bc0c1dc3 : WAPT/certificate.crt
4b6876491fd10deb130553dfa90442913df7cb957863eb221e3f35a4d52d8ef2 : WAPT/control
c13943b8f92a4717f46bad189c0b91d9003d76a0127a41459ec91693b263830c : WAPT/icon.png
07d4dd7f143df68eb009c4d97fbdf1fd1615d99a79a4b39d12d2b274c933d142 : luti.json
ccf320ec08b1ede2262ccd862dc7870207e504ec963dc5a8301612369531b200 : setup.py
87673d55612d9b8d12bda42c691ad1b8420e9083c919325d39cfc0e6b7f0220b : update_package.py
765436d4aa3de87af8b390d1cd16fce94c5f72dd04173adbb49c940b98b47704 : windowsdesktop-runtime-3.1.32-win-x86.exe