tis-files

2.4.70.0-0
Files is a file manager. It has features like multiple tabs, panes, columns, tags and shell extensions in the context menu.
3656 downloads
Download
See build result See VirusTotal scan
tis-files icon
package           : tis-files
version           : 2.4.70.0-0
architecture      : all
section           : base
priority          : optional
name              : Files
categories        : System and network
maintainer        : WAPT Team,Tranquil IT,Pierre Cosson
description       : Files is a file manager. It has features like multiple tabs, panes, columns, tags and shell extensions in the context menu.
depends           : tis-microsoft-ui-xaml,tis-microsoft-windowsappruntime,tis-microsoft-net-native-runtime,tis-microsoft-net-native-framework,tis-microsoft-vclibs
conflicts         : 
maturity          : PROD
locale            : all
target_os         : windows
min_wapt_version  : 2.1
sources           : https://apps.microsoft.com/store/detail/9nghp3dx8hdx
installed_size    : 
impacted_process  : Files
description_fr    : Files est un gestionnaire de fichiers. Il possède des fonctionnalités telles que des onglets multiples, des volets, des colonnes, des balises et des extensions shell dans le menu contextuel.
description_pl    : Files jest menedżerem plików. Posiada funkcje takie jak wiele zakładek, paneli, kolumn, znaczników i rozszerzeń powłoki w menu kontekstowym.
description_de    : Dateien ist ein Dateimanager. Er verfügt über Funktionen wie mehrere Registerkarten, Fenster, Spalten, Tags und Shell-Erweiterungen im Kontextmenü.
description_es    : Files es un gestor de archivos. Tiene características como múltiples pestañas, paneles, columnas, etiquetas y extensiones de shell en el menú contextual.
description_pt    : O ficheiro é um gestor de ficheiros. Tem características como múltiplos separadores, painéis, colunas, etiquetas e extensões de conchas no menu de contexto.
description_it    : Files è un gestore di file. Ha caratteristiche come schede multiple, riquadri, colonne, tag ed estensioni di shell nel menu contestuale.
description_nl    : Files is een bestandsbeheerder. Het heeft functies zoals meerdere tabbladen, vensters, kolommen, tags en shell extensies in het contextmenu.
description_ru    : Files - это файловый менеджер. Он имеет такие возможности, как несколько вкладок, панелей, колонок, тегов и расширений оболочки в контекстном меню.
audit_schedule    : 
editor            : Nikolay Pultsin
keywords          : 
licence           : GPLv3
homepage          : https://files.community/
package_uuid      : 4889d437-2106-491d-9703-374b1f0f5bf1
valid_from        : 
valid_until       : 
forced_install_on : 
changelog         : https://github.com/files-community/Files/releases
min_os_version    : 10.0
max_os_version    : 
icon_sha256sum    : b84181c9ca0904c41d19ca306b3356f0c07e384108796e879cdba03f89187cc2
signer            : Tranquil IT
signer_fingerprint: 8c5127a75392be9cc9afd0dbae1222a673072c308c14d88ab246e23832e8c6bb
signature         : mEDlUlPacM0KuiuY03bCddgoCzO0YCz5fOEldW9NuS7suokgnaakXHAtbtMiRn1O3sPvVwbuxphjoTn5sOoPLJglF+kG9U1UKItaDbohxl8qJIQ0Vvd6QmcF1nDoyW7ZTy2bq+EbeNL4cespvmWaZ3BHxrry9B2kqJ6xRwgIg8fRKzt/Ebd3nnfXpsLTxFNHjcQui4JvplNfaTnpbx4jtlNhbyyZ9/iWiJc8iRUFjU6KWN3+HGW1o7z1XVGOY/KBlh2fWmWJmabbOxAD0pvrM1/kvm9P6XN/1sIvordekGCBns4iRPSEzgGOZZ5uIiHuYgG2HvV7hw2hPH4JYPV0zQ==
signature_date    : 2023-05-03T12:06:52.255967
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 *


appx_package = "49306atecsolution.FilesUWP"
appx_dir = makepath(programfiles, "WindowsAppsInstallers")
windows_min_os_version = WindowsVersions.Windows10v1607
allow_remove = True


def install():
    # Declaring local variables
    bin_name = glob.glob("%s*%s*" % (appx_package, control.get_software_version()))[0]
    bin_path = makepath(appx_dir, bin_name)

    # Checking minimum Windows version for this UWP application
    if windows_version() >= windows_min_os_version:
        if not isdir(appx_dir):
            mkdirs(appx_dir)
        else:
            for appx_file in glob.glob(makepath(appx_dir, "%s*%s*" % (appx_package, control.get_software_version()))):
                if not control.get_software_version() in appx_file:
                    remove_file(appx_file)
        if not isfile(bin_path):
            print("Copying: %s to: %s" % (bin_name, appx_dir))
            filecopyto(bin_name, appx_dir)
    else:
        error(
            "This Windows version (%s) need to be upgraded to minimum version (%s) to use this package" % (windows_version(), windows_min_os_version)
        )


def session_setup():
    # Declaring local variables
    bin_path = glob.glob(makepath(appx_dir, "%s*%s*" % (appx_package, control.get_software_version())))[0]

    # Installing the software in user env
    appx_version = get_powershell_str("Get-AppxPackage -Name %s" % appx_package, "Version")
    if not appx_version or appx_version < control.get_software_version() or force:
        print("Installing: %s" % bin_path.split("\\")[-1])
        run_powershell('Add-AppxPackage -Path "%s"' % bin_path)
    else:
        print("%s is installed in correct version (%s)" % (appx_package, appx_version))


def uninstall():
    if allow_remove:
        remove_appx(appx_package)
    for appx_file in glob.glob(makepath(appx_dir, "%s*%s*" % (appx_package, control.get_software_version()))):
        remove_file(appx_file)
    if isdir(appx_dir) and dir_is_empty(appx_dir):
        print("Removing: %s since he is empty" % (appx_dir))
        remove_tree(appx_dir)
# -*- coding: utf-8 -*-
from setuphelpers import *
import requests

try:
    from setupdevhelpers import *
except:
    from bs4 import BeautifulSoup
import json
import waptguihelper
import re


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

    proxies = get_proxies()
    if not proxies:
        proxies = get_proxies_from_wapt_console()
    store_url = control.sources

    if not store_url:
        store_id = waptguihelper.input_dialog(
            "Choice of app", "Enter the windows store app id (foundable in package url: https://apps.microsoft.com/store/apps)", store_url
        ).split("/")[-1]
    else:
        store_id = store_url.split("/")[-1]
    url_ms = "https://apps.microsoft.com/store/detail/%s" % store_id
    control.sources = url_ms
    package_prefix = control.package.split("-")[0]

    # check setup.py incase the package name doesnt match the installer file
    with open("setup.py", "r") as f:
        for line in f.readlines():
            if line.startswith("appx_package"):
                store_package_name = line.split("=")[1].split('"')[1]
                break

    # Getting info from adguard api
    res = requests.post(
        "https://store.rg-adguard.net/api/GetFiles",
        "type=ProductId&url=%s&ring=RP&lang=fr-FR" % store_id,
        headers={"content-type": "application/x-www-form-urlencoded"},
        proxies=proxies,
    )
    all_files = []
    all_files_dict = {}
    page = BeautifulSoup.BeautifulSoup(res.content, features="html.parser")
    for bs_search in page.find_all("a"):
        if not "BlockMap" in bs_search.text and not "eappxbundle" in bs_search.text and not "emsixbundle" in bs_search.text:
            version = bs_search.text.split("_")[1]
            bin_name = bs_search.text.replace("~", "_")
            download_url = bs_search["href"]
            pkg_splitted = re.split(r".\d+.", bin_name)[0]
            if store_package_name == "":
                package_name = package_prefix + "-" + pkg_splitted.split("_")[0].replace(".", "-").lower()
            else:
                package_name = control.package
            all_files.append({"version": version, "bin_name": bin_name, "package_name": package_name})
            all_files_dict[bin_name] = {"version": version, "bin_name": bin_name, "download_url": download_url, "package_name": package_name}
    if "template-microsoft-store" in control.package:
        selected = waptguihelper.grid_dialog(
            "Please select the proper file",
            json.dumps(all_files),
            waptguihelper.GRT_SELECTED,
            '{"columns":[{"propertyname":"version","datatype":"String","required":false,"readonly":false,"width":130},{"propertyname":"bin_name","datatype":"String","required":false,"readonly":false,"width":500},{"propertyname":"package_name","datatype":"String","required":false,"readonly":false,"width":250}]}',
        )
    else:
        selected = [a for a in all_files if (control.architecture in a["bin_name"] or control.architecture == "all")]
        if len(selected) != 1:
            higer_version = "0"
            for a in all_files:
                if Version(higer_version) < Version(a["version"]) and store_package_name in a["bin_name"]:
                    higer_version = a["version"]
            selected = [a for a in all_files if higer_version == a["version"] and store_package_name in a["bin_name"]]

    for bin_selected in selected:
        latest_bin = bin_selected["bin_name"]
        version = all_files_dict[latest_bin]["version"]
        download_url = all_files_dict[latest_bin]["download_url"]
        package_name = all_files_dict[latest_bin]["package_name"]
        if download_url.split("/")[2].endswith("microsoft.com"):
            if not isfile(latest_bin):
                print("Downloading: %s" % latest_bin)
                wget(download_url, latest_bin, proxies=proxies)
            else:
                print("Binary file version corresponds to online version")
        else:
            print("ERROR: The retrieved url will not download from microsoft's servers")

    # Adding dependencies
    for dependency in list(set(d["package_name"] for d in all_files)):
        if dependency not in control.depends and package_name != dependency:
            control.add_depends(dependency)

    # Filling categories
    if control.categories == "Template":
        categories = waptguihelper.grid_dialog(
            "Select %s categories" % package_name,
            [
                "Internet",
                "Utilities",
                "Messaging",
                "Security",
                "System and network",
                "Media",
                "Development",
                "Office",
                "Drivers",
                "Education",
                "Configuration",
                "CAD",
                "Template",
                "Dependencies",
                "Extensions",
            ],
            waptguihelper.GRT_SELECTED,
        )
        control.categories = ",".join([a["unknown"] for a in categories])

    # Specifying arch
    if "arm" in latest_bin:
        control.architecture = "arm"
    elif "arm64" in latest_bin:
        control.architecture = "arm64"
    elif "x64" in latest_bin:
        control.architecture = "x64"
    elif "x86" in latest_bin:
        control.architecture = "x86"
    else:
        control.architecture = "all"

    # Updating pkg infos once
    if "tis-template-microsoft-store" in control.package:
        control.package = waptguihelper.input_dialog(control.package, "You can redefine the package name", package_name)
        control.name = waptguihelper.input_dialog(
            control.package, "You can redefine the name for the self-service", control.package.split("-", 1)[1].replace("-", " ").title()
        )
        # Removing template files
        remove_file("WAPT\\changelog.txt")
        remove_file("WAPT\\icon.png")

        # Warn end-user that depencies are required
        missing_depends = []
        for d in control.depends.split(","):
            if not WAPT.is_available(d) and d != "":
                missing_depends.append(d)
        if missing_depends:
            waptguihelper.message_dialog(
                control.package,
                'The following packages are not found in your repo, you must import them or use "tis-template-microsoft-store-dependency" to create them with the same Store ID as this package\n\n%s'
                % "\n".join(a for a in missing_depends),
            )
        # Filling description
        control.description = waptguihelper.input_dialog("Description", "Please fill the description", control.description)
        control.save_control_to_wapt()

    # Changing setup.py appx_package variable
    new_lines = []
    with open("setup.py", "r") as f:
        for line in f.readlines():
            if line.startswith("appx_package"):
                line = 'appx_package = "%s"\n' % latest_bin.split("_")[0]
            new_lines.append(line)
    with open("setup.py", "w") as f:
        f.writelines(new_lines)

    # 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)))
        package_updated = True
    else:
        print("Software version up-to-date (%s)" % Version(version))
    control.set_software_version(version)
    control.save_control_to_wapt()

    # Deleting outdated binaries
    remove_outdated_binaries(version, ["appxbundle", "msixbundle", "appx", "msix"])

    # Validating or not update-package-sources
    return package_updated
87896936970d5bdc4fcd62dcdc647f169f673f609aa8169b36cd5db3baba1e64 : setup.py
8b4ba76ba8e5f00fb6b4babac90352c1f7a0aa348e9ffb667c622173c2f26037 : update_package.py
8e073a34457dd48f0ebfd57ccaf80ba2ee981660ad0898fad3c6a2050db8a64d : 49306atecsolution.FilesUWP_2.4.70.0_neutral___et10x9a9vyk8t.msixbundle
b84181c9ca0904c41d19ca306b3356f0c07e384108796e879cdba03f89187cc2 : WAPT/icon.png
a5a97261381e1d0ad46ee15916abec9c2631d0201f5cc50ceb0197a165a0bbbf : WAPT/certificate.crt
5b0c33121091fd0906e18014cdfa589628f7e53286c01817ced308d44ea4e0b3 : WAPT/changelog.txt
4732be6f0e91d095520de5dff7f330cf5eddf36eed4736f714d305cd7b28fe82 : luti.json
e5b533803bce24670a528121c6cbb4bdc2ebd3e68267f41ba5a7394a62e9ac61 : WAPT/control
2.3.12.0-0
Switch to new template, that handle getting the latest version better in update_package