tis-dotnet6 icon

.NET Runtime 6

Silent install package for .NET Runtime 6

6.0.36-1
Dependency
Dependency

  • package: tis-dotnet6
  • name: .NET Runtime 6
  • version: 6.0.36-1
  • 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: arm64
  • signature_date:
  • size: 161.07 Mo
  • homepage : https://github.com/dotnet/windowsdesktop

package           : tis-dotnet6
version           : 6.0.36-1
architecture      : arm64
section           : base
priority          : optional
name              : .NET Runtime 6
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      : 27e1f25f-5d4d-4db6-b7fb-ea4e58f407ca
valid_from        : 
valid_until       : 
forced_install_on : 
changelog         : https://github.com/dotnet/core/tree/main/release-notes/6.0
min_os_version    : 6.1
max_os_version    : 
icon_sha256sum    : c13943b8f92a4717f46bad189c0b91d9003d76a0127a41459ec91693b263830c
signer            : Tranquil IT
signer_fingerprint: 8c5127a75392be9cc9afd0dbae1222a673072c308c14d88ab246e23832e8c6bb
signature_date    : 2026-11-15T10:55:35.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         : qsodmdMCnZIKXq9jF3AJw2ODLfj8mxENUTInALOWIA7ZljX5O/sIgX+vXklg7RMs5AD+pKuCAAbMkRJ/3Oy9syLfV9NtTp4wK1jBsBXhEF7JGudi0YtX6SkA+mtha0PaV+BVpGptRwpaiu0eK1SGZ8e33RI8ZLpSMnq3/f6HVonZj581Mx+yQv7Gd4f7QBcWmuHiz3zNGfQ2AN5rBVwR2b3Lc5N6835YUsr0fVDJ65/PDC46fq0TCsLO9wZdA1c9ZRzKRC3/uK1Tey7XJsjPOpa8fYfaGMgFOqP3tyb1G8cZ9Tro8938zX/8estDXQdJHfLDNq/SBMIWwApe7mf92w==

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

"""
[
    {
        "key": "{3544B2EE-E62F-4D11-B79C-3DDEACE94DA5}",
        "name": "Microsoft .NET Runtime - 6.0.25 (x64)",
        "version": "48.100.4028",
        "install_date": "2023-11-27 00:00:00",
        "install_location": "",
        "uninstall_string": "MsiExec.exe /X{3544B2EE-E62F-4D11-B79C-3DDEACE94DA5}",
        "publisher": "Microsoft Corporation",
        "system_component": 0,
        "win64": true,
    },
    {
        "key": "{AE86D888-1404-47CC-A7BB-8D86C0503E58}",
        "name": "Microsoft .NET Host FX Resolver - 6.0.25 (x64)",
        "version": "48.100.4028",
        "install_date": "2023-11-27 00:00:00",
        "install_location": "",
        "uninstall_string": "MsiExec.exe /X{AE86D888-1404-47CC-A7BB-8D86C0503E58}",
        "publisher": "Microsoft Corporation",
        "system_component": 0,
        "win64": true,
    },
    {
        "key": "{C7141A99-592B-4226-A4E9-B767C1D0FBAF}",
        "name": "Microsoft .NET Host - 6.0.25 (x64)",
        "version": "48.100.4028",
        "install_date": "2023-11-27 00:00:00",
        "install_location": "",
        "uninstall_string": "MsiExec.exe /X{C7141A99-592B-4226-A4E9-B767C1D0FBAF}",
        "publisher": "Microsoft Corporation",
        "system_component": 0,
        "win64": true,
    },
    {
        "key": "{E016F2B9-01FE-4FAA-882E-ECC43FA49751}",
        "name": "Microsoft Windows Desktop Runtime - 6.0.25 (x64)",
        "version": "48.100.4037",
        "install_date": "2023-11-27 00:00:00",
        "install_location": "",
        "uninstall_string": "MsiExec.exe /X{E016F2B9-01FE-4FAA-882E-ECC43FA49751}",
        "publisher": "Microsoft Corporation",
        "system_component": 0,
        "win64": true,
    },
    {
        "key": "{2deb241e-99d9-4489-ae8d-4778d470fedd}",
        "name": "Microsoft Windows Desktop Runtime - 6.0.25 (x86)",
        "version": "6.0.25.33020",
        "install_date": "",
        "install_location": "",
        "uninstall_string": '"C:\\ProgramData\\Package Cache\\{2deb241e-99d9-4489-ae8d-4778d470fedd}\\windowsdesktop-runtime-6.0.25-win-x86.exe"  /uninstall',
        "publisher": "Microsoft Corporation",
        "system_component": 0,
        "win64": false,
    },
    {
        "key": "{6D7737C0-9538-48ED-ACB7-688A891417C4}",
        "name": "Microsoft .NET Runtime - 6.0.25 (x86)",
        "version": "48.100.4028",
        "install_date": "2023-11-27 00:00:00",
        "install_location": "",
        "uninstall_string": "MsiExec.exe /X{6D7737C0-9538-48ED-ACB7-688A891417C4}",
        "publisher": "Microsoft Corporation",
        "system_component": 0,
        "win64": false,
    },
    {
        "key": "{73191C34-7ACF-493B-B92E-FE368D8F4071}",
        "name": "Microsoft .NET Host FX Resolver - 6.0.25 (x86)",
        "version": "48.100.4028",
        "install_date": "2023-11-27 00:00:00",
        "install_location": "",
        "uninstall_string": "MsiExec.exe /X{73191C34-7ACF-493B-B92E-FE368D8F4071}",
        "publisher": "Microsoft Corporation",
        "system_component": 0,
        "win64": false,
    },
    {
        "key": "{906F835E-F52B-47C2-A996-A769EB284880}",
        "name": "Microsoft .NET Host - 6.0.25 (x86)",
        "version": "48.100.4028",
        "install_date": "2023-11-27 00:00:00",
        "install_location": "",
        "uninstall_string": "MsiExec.exe /X{906F835E-F52B-47C2-A996-A769EB284880}",
        "publisher": "Microsoft Corporation",
        "system_component": 0,
        "win64": false,
    },
    {
        "key": "{AF1BA644-A730-46A9-BFE1-C1B79EBBE36D}",
        "name": "Microsoft Windows Desktop Runtime - 6.0.25 (x86)",
        "version": "48.100.4037",
        "install_date": "2023-11-27 00:00:00",
        "install_location": "",
        "uninstall_string": "MsiExec.exe /X{AF1BA644-A730-46A9-BFE1-C1B79EBBE36D}",
        "publisher": "Microsoft Corporation",
        "system_component": 0,
        "win64": false,
    },
    {
        "key": "{fb0500c1-f968-4621-a48b-985b52884c49}",
        "name": "Microsoft Windows Desktop Runtime - 6.0.25 (x64)",
        "version": "6.0.25.33020",
        "install_date": "",
        "install_location": "",
        "uninstall_string": '"C:\\ProgramData\\Package Cache\\{fb0500c1-f968-4621-a48b-985b52884c49}\\windowsdesktop-runtime-6.0.25-win-x64.exe"  /uninstall',
        "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"

    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.
    )
    
    if iswin64() or iswinarm():
        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.
        )

    if iswinarm():
        install_exe_if_needed(
            glob.glob("windowsdesktop-runtime-*arm64.exe")[0],
            silentflags=silentflags,
            name=f"Microsoft Windows Desktop Runtime - {dotnet_version}.*(arm64)",
            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"])


def iswinarm():
    return platform.machine() =='ARM64'

from setuphelpers import *
from setupdevhelpers import *

"""

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

"""

dotnet_version = "6.0"

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
55659d3497254cb73d2e79a6f7c8fc1eccffab57e7fd0794538f9cb4037f7ea6 : WAPT/control
c13943b8f92a4717f46bad189c0b91d9003d76a0127a41459ec91693b263830c : WAPT/icon.png
3c1fdf34823668853000e4ede20e559e1c89b343c118eea63372afb50026f050 : luti.json
12ff1aff22c93c2c77f6d29f42e3c226cd4e4fc580e1653179ce08d433ffec44 : setup.py
ffaae0fa694c641b5ac030419eb6fe54ca293e6985ffdc9858de301ffb0a1094 : update_package.py
8bb01362d7525a42cc4f27e1b863242d8136c3f491bdf00efca627658735a118 : windowsdesktop-runtime-6.0.36-win-arm64.exe
0d20debb26fc8b2bc84f25fbd9d4596a6364af8517ebf012e8b871127b798941 : windowsdesktop-runtime-6.0.36-win-x64.exe
4e77bd970df0a06528ee88d33e4a8c9fb85beedbdd7219b017083acf0c3aa39e : windowsdesktop-runtime-6.0.36-win-x86.exe