tis-powerpoint-mobile

16001.11001.20041.0-0
Free but limited version of Powerpoint
0 downloads
Download
View on luti logo
tis-powerpoint-mobile icon

  Description 

  • package : tis-powerpoint-mobile
  • version : 16001.11001.20041.0-0
  • architecture : x64
  • categories : Office
  • maintainer : WAPT Team,Tranquil IT,Pierre Cosson
  • description : Free but limited version of Powerpoint
  • locale : all
  • target_os : windows
  • min_wapt_version : 2.1
  • sources : https://www.microsoft.com/fr-fr/p/powerpoint-mobile/9wzdncrfjb5q?activetab=pivot:overviewtab
  • installed_size :
  • impacted_process :
  • description_fr : Version gratuite mais limitée de Powerpoint
  • description_pl : Versão gratuita mas limitada do Powerpoint
  • description_de : Kostenlose, aber eingeschränkte Version von Powerpoint
  • description_es : Versión gratuita pero limitada de Powerpoint
  • description_pt :
  • description_it :
  • description_nl : Gratis maar beperkte versie van Powerpoint
  • description_ru : Бесплатная, но ограниченная версия Powerpoint
  • editor : microsoft
  • licence : proprietary
  • signature_date : 2022-04-26T04:01:34.309807
  • Homepage : https://www.microsoft.com/fr-fr/p/powerpoint-mobile/9wzdncrfjb5q?activetab=pivot:overviewtab

  Setup.py 

# -*- coding: utf-8 -*-
from setuphelpers import *
import requests
from bs4 import BeautifulSoup


# Declaring global variables - Warnings: 1) WAPT context is only available in package functions; 2) Global variables are not persistent between calls
bin_contains = "Microsoft.Office.PowerPoint"
appx_package = "Microsoft.Office.PowerPoint"
appx_dir = makepath(programfiles, "WindowsAppsInstallers")
file_extension = "appxbundle"


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

    # Checking minimum Windows version
    if windows_version() >= WindowsVersions.Windows10v1703:
        # Copying the software
        if not isdir(appx_dir):
            mkdirs(appx_dir)
        else:
            for appx_file in glob.glob("%s/*%s*.%s" % (appx_dir, bin_contains, file_extension)):
                if not package_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(), WindowsVersions.Windows10v1703)
        )


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

    # Uninstalling the package
    remove_appx(appx_package)
    if isfile(bin_path):
        remove_file(bin_path)
    if isdir(appx_dir) and dir_is_empty(appx_dir):
        print("Removing: %s since he is empty" % (appx_dir))
        remove_tree(appx_dir)


def session_setup():
    # Declaring local variables
    package_version = control.get_software_version()
    app_name = control.name
    bin_path = glob.glob(makepath(appx_dir, "*%s*.%s" % (bin_contains, file_extension)))[0]
    bin_name = bin_path.split("\\")[-1]

    # 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 < package_version or force:
        print("Installing: %s" % bin_name)
        run_powershell('Add-AppxPackage -Path "%s"' % bin_path)
    else:
        print("%s is installed in correct version (%s)" % (app_name, appx_version))


def update_package():
    # Declaring local variables
    result = False
    proxies = get_proxies()
    if not proxies:
        proxies = get_proxies_from_wapt_console()
    app_name = control.name
    store_id = "9wzdncrfjb5q"
    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"},
    )
    page = BeautifulSoup(res.content, features="html.parser")
    for bs_search in page.find_all("a"):
        if bin_contains in bs_search.text and ".%s" % file_extension in bs_search.text:
            version = bs_search.text.split("_")[1]
            latest_bin = bs_search.text
            download_url = bs_search["href"]
            break
    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")

        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])
    else:
        print("ERROR The retrieved url will not download from microsoft's servers")
    # control.set_software_version(version)
    control.save_control_to_wapt()

    # Deleting outdated binaries
    remove_outdated_binaries(version)

    # Validating or not update-package-sources
    return result


def remove_appx(package, default_user=True):
    r"""Uninstall and remove Windows AppX package from the computer in machine and user environnement

    Args:
        package (str): package name, asterisk character (*) can be used as joker
        default_user (bool): Remove from image that will be installed for each new user

    .. versionadded:: 2.2

    """
    if running_as_admin() or running_as_system():
        run_powershell('Get-AppxPackage "%s" -AllUsers | Remove-AppxPackage -AllUsers' % package)
        if default_user:
            run_powershell(
                'Get-AppXProvisionedPackage -Online | Where-Object DisplayName -Like "%s" | Remove-AppxProvisionedPackage -Online -AllUsers' % package
            )
    else:
        run_powershell('Get-AppxPackage "%s" | Remove-AppxPackage' % package)


def get_powershell_str(powershell_cmd, value=None):
    r"""Get a value as string from the output of a powershell command
    WARNING: Adding -AllUsers parameter may be necessary to make sure WAPT is enable to get the request value

    Args:
        powershell_cmd (str): Powershell command
        value (str)         : Value to get as string

    .. versionadded:: 2.2

    """
    if value:
        return str(run_powershell("%s | Select-Object -ExpandProperty %s | Write-Host -NoNewline" % (powershell_cmd, value), output_format="text"))
    else:
        return str(run_powershell("%s | Write-Host -NoNewline" % powershell_cmd, output_format="text"))

										
  manifest.sha256