tis-dittoreceiver-uwp icon

DittoReceiver

Paquet d’installation silencieuse pour DittoReceiver

2.0.66.3-1

  • package: tis-dittoreceiver-uwp
  • name: DittoReceiver
  • version: 2.0.66.3-1
  • maintainer: WAPT Team,Tranquil IT,Amel FRADJ
  • licence: proprietary_restricted,wapt_private
  • target_os: windows
  • architecture: x64
  • signature_date:
  • size: 55.42 Mo

package           : tis-dittoreceiver-uwp
version           : 2.0.66.3-1
architecture      : x64
section           : base
priority          : optional
name              : DittoReceiver
categories        : 
maintainer        : WAPT Team,Tranquil IT,Amel FRADJ
description       : Destination for mirrored devices, signalling and alerts
depends           : 
conflicts         : 
maturity          : PROD
locale            : 
target_os         : windows
min_wapt_version  : 2.3
sources           : 
installed_size    : 
impacted_process  : 
description_fr    : Destination pour les appareils en miroir, la signalisation et les alertes
description_pl    : Miejsce docelowe dla urządzeń lustrzanych, sygnalizacja i alerty
description_de    : Bestimmung für gespiegelte Geräte, Signalisierung und Warnungen
description_es    : Destino para dispositivos duplicados, señalización y alertas
description_pt    : Destino para dispositivos espelhados, sinalização e alertas
description_it    : Destinazione per i dispositivi in mirroring, segnalazione e avvisi
description_nl    : Bestemming voor gespiegelde apparaten, signalering en waarschuwingen
description_ru    : Назначение для зеркальных устройств, сигнализации и оповещений
audit_schedule    : 
editor            : 
keywords          : 
licence           : proprietary_restricted,wapt_private
homepage          : 
package_uuid      : 2264e639-27f7-4289-b8bc-272da6ddf618
valid_from        : 
valid_until       : 
forced_install_on : 
changelog         : 
min_os_version    : 10.0
max_os_version    : 
icon_sha256sum    : 88065bbd91e1a95373ef5d447e00e917ee8619de675f5998016260a2e5c43aa6
signer            : Tranquil IT
signer_fingerprint: 8c5127a75392be9cc9afd0dbae1222a673072c308c14d88ab246e23832e8c6bb
signature_date    : 2024-10-13T11:00:42.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         : rw6A3Orxk2DYl2blNc4BD2g3QU/+FNrnl2cXrHcvKB/HSMq8BidS6b6FAGyT5XBCysRajCnV3oUyIEab8OZZaS24BeDYu3bYRQsas0DF95eqAcbaWC4gAHT6zqheXRT+nRPPK6QdXPJeMKgk1OqnsYpki8K9LFbPVdeq/gaRxP5byBKVL4wK/lpzyITl79H6y0MRSl+jWTmIXwygz93QGq/oYItsbIP91Qu9j/1DaBuTGtDYTZVjFTgo98IqlZnHgIaSgGIO4MguvggsEKIMw6qSTxvOUw7WuGhHQ5zOl05yPMxCkSzGjm4kkmIWcyJp9EGYLar6IQMrvaJnjygkzw==

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


appx_package_name = "Squirrels.DittoReceiver"
appx_dir = makepath(programfiles, "WindowsAppsInstallers")


def install():
    # Declare local variables
    bin_path = glob.glob(f"DittoReceiver*.msix")[0]
    add_appx_cmd = f'Add-AppxProvisionedPackage -Online -PackagePath "{bin_path}" -SkipLicense'

    # Installing the UWP application if needed
    appxprovisionedpackage = run_powershell(f'Get-AppXProvisionedPackage -Online | Where-Object DisplayName -Like "{appx_package_name}"')
    if appxprovisionedpackage is None:
        remove_appx(appx_package_name, False)
        appxprovisionedpackage = {"Version": "0"}
    elif force:
        uninstall()
    if Version(appxprovisionedpackage["Version"], 4) < Version(control.get_software_version(), 4):
        print(f"Installing: {bin_path.split(os.sep)[-1]} ({control.get_software_version()})")
        killalltasks(ensure_list(control.impacted_process))
        run_powershell(add_appx_cmd, output_format="text")
    else:
        print(f'{appxprovisionedpackage["PackageName"]} is already installed and up-to-date.')


def uninstall():
    print(f"Removing AppX: {appx_package_name}")
    remove_appx(appx_package_name)


def audit():
    # Declaring local variables
    audit_result = "OK"
    audit_version = True
    appxprovisionedpackage = run_powershell(f'Get-AppXProvisionedPackage -Online | Where-Object DisplayName -Like "{appx_package_name}"')

    # Auditing software
    if appxprovisionedpackage is None:
        print(f"{appx_package_name} is not installed.")
        audit_result = "ERROR"
    elif audit_version:
        if Version(appxprovisionedpackage.get("Version", "0"), 4) < Version(control.get_software_version(), 4):
            print(
                f'{appxprovisionedpackage["PackageName"]} is installed in version: {appxprovisionedpackage["Version"]} instead of: {control.get_software_version()}.'
            )
            audit_result = "WARNING"
        else:
            print(f'{appxprovisionedpackage["PackageName"]} is installed and up-to-date.')
    else:
        print(f'{appxprovisionedpackage["PackageName"]} is installed.')

    return audit_result


def remove_appx(package, default_user=True):
    if running_as_admin() or running_as_system():
        if default_user:
            run_powershell(
                f'Get-AppXProvisionedPackage -Online | Where-Object DisplayName -Like "{package}" | Remove-AppxProvisionedPackage -Online -AllUsers',
                output_format="text",
            )
        run_powershell(
            r'Get-AppxPackage -Name "%s" -AllUsers | Where-Object {{ -not ($_.NonRemovable) }} | Remove-AppxPackage -AllUsers' % package,
            output_format="text",
        )
    else:
        run_powershell(r'Get-AppxPackage -Name "%s" | Where-Object {{ -not ($_.NonRemovable) }} | Remove-AppxPackage' % package, output_format="text")


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



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

  
    url_base = "https://www.airsquirrels.com/ditto/download"
    response = requests.get(url_base,allow_redirects=True, proxies=proxies)
    # Extract the correct div using bs_find_all
    divs = bs_find_all(response.text, "div", proxies=proxies)
    msix_file = None
    for div in divs:
        if msix_file:
            break
        links = div.find_all('a', href=True)
        for link in links:
            if link['href'].endswith('.msix'):
                href = link['href']
                msix_file = href
                download_url = msix_file
                latest_bin = msix_file.split('/')[-1]
                version = latest_bin.split('_')[-2]
                break


    # Downloading latest binaries
    print("Download URL is: %s" % download_url)
    if not isfile(latest_bin):
        print("Downloading: %s" % latest_bin)
        wget(download_url, latest_bin, proxies=proxies)
        package_updated = True
    else:
        print("Binary is present: %s" % latest_bin)


    # Deleting outdated binaries
    for f in glob.glob('*.msix'):
        if f != latest_bin:
            remove_file(f)

    # Mettre à jour le package
    control.set_software_version(version)
    control.save_control_to_wapt()    
        

63d1fce8dc555cf793ea79cfa12b0618e5d5a222d2ec0957617e782a58c3f9f2 : DittoReceiver_2.0.66.3_x64.msix
38d056ab130f7bf7c481c12636a4e9959de36561d3dfcbe54c6e3571bc0c1dc3 : WAPT/certificate.crt
9d995fb100465dffcd41fddc181eb6886ec79e74900e032d8e5dbce4de957271 : WAPT/control
88065bbd91e1a95373ef5d447e00e917ee8619de675f5998016260a2e5c43aa6 : WAPT/icon.png
1e9d216813c070e059d33cbd10d4a6afe15d7bc0b0bd023d0595e5933710a737 : luti.json
260d18aae8cb373a40557192bf8a25dfb89ba71f42369e95e1b73be3a6d99a97 : setup.py
6ebf2eec49437bacc179b27c743331401d63898ba3a105d82dffb629b448da46 : update_package.py