tis-fbreader icon

FBReader

Paquet d’installation silencieuse pour FBReader

2.0.5.0-1

  • package: tis-fbreader
  • name: FBReader
  • version: 2.0.5.0-1
  • categories: Media
  • maintainer: WAPT Team,Tranquil IT,Simon FONTENEAU,Pierre Cosson
  • editor: Nikolay Pultsin
  • licence: GPLv2
  • locale: all
  • target_os: windows
  • architecture: x64
  • signature_date:
  • size: 52.39 Mo
  • homepage : https://fbreader.org/

package           : tis-fbreader
version           : 2.0.5.0-1
architecture      : x64
section           : base
priority          : optional
name              : FBReader
categories        : Media
maintainer        : WAPT Team,Tranquil IT,Simon FONTENEAU,Pierre Cosson
description       : FBReader is a popular multi-platform ebook reader.
depends           : 
conflicts         : 
maturity          : PROD
locale            : all
target_os         : windows
min_wapt_version  : 2.1
sources           : https://www.microsoft.com/store/apps/9PMZ94127M4G
installed_size    : 
impacted_process  : 
description_fr    : FBReader est un lecteur de livres électroniques multiplateforme populaire.
description_pl    : FBReader jest popularnym wieloplatformowym czytnikiem książek elektronicznych.
description_de    : FBReader ist ein beliebter Multiplattform-E-Book-Reader.
description_es    : FBReader es un popular lector de libros electrónicos multiplataforma.
description_pt    : O FBReader é um popular leitor de livros electrónicos multiplataforma
description_it    : FBReader è un popolare lettore di ebook multipiattaforma
description_nl    : FBReader is een populaire multi-platform ebook lezer
description_ru    : FBReader - это популярная многоплатформенная программа для чтения электронных книг
audit_schedule    : 
editor            : Nikolay Pultsin
keywords          : 
licence           : GPLv2
homepage          : https://fbreader.org/
package_uuid      : e30831ec-fac9-4e11-9f39-62ff45e29381
valid_from        : 
valid_until       : 
forced_install_on : 
changelog         : 
min_os_version    : 10.0
max_os_version    : 
icon_sha256sum    : 88cce342ed17993f72abf8e7e4121c9b9aaa06068ab074bdfe08678a3c9164fc
signer            : Tranquil IT
signer_fingerprint: 8c5127a75392be9cc9afd0dbae1222a673072c308c14d88ab246e23832e8c6bb
signature         : phU+VEKfYwCNUGBl8lndNyH31ckRRxwxEOvEny7KNsNV9PB+nrBxzaap7O0mcCGta0jqa1wMGFLHVlv7z+e4bxjLoVBhM/SKq/hOqmlJhnjhxLtP+Or4lDJy4SmhhCXURM46cYtdZ1gcqLGvmFR6EC51f086taGehl7cuEAec+oV9dPhSDh77ibs37BQrsDBdHrHV2W5GzjToc/V5QFVDjG5l0f3dqcod9M3IXe7sy7q9C/eAQx4jaMVxNwdajA047kP31s1l6mzIGYGFZubBB62sVZWrpLWCT529HZgAByfKrUNQqNVLA5AA+IVtfIMGDES8RlJ+hmMZYarREM3BA==
signature_date    : 2023-09-25T11:00:14.491601
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 *

bin_contains = "FBReader"
appx_package = "FBReader.ORGLimited.FBReader"
appx_dir = makepath(programfiles, "WindowsAppsInstallers")
file_extension = "msix"


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.Windows10v1809:
        # 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.Windows10v1809)
        )


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))

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


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 = "9pmz94127m4g"
    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,
    )
    page = BeautifulSoup.BeautifulSoup(res.content, features="html.parser")
    for bs_search in page.find_all("a"):
        if "FBReader" in bs_search.text and ".msix" 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

25c443e03fddfc96e72bea3685c885727e7595103fc9dcb9cbb3945ccf00e9e2 : setup.py
5699c9e4106121b7be5f2bc4ffffe5ab22914e9dc5fd03359afa2b4423c9c810 : update_package.py
88cce342ed17993f72abf8e7e4121c9b9aaa06068ab074bdfe08678a3c9164fc : WAPT/icon.png
a5a97261381e1d0ad46ee15916abec9c2631d0201f5cc50ceb0197a165a0bbbf : WAPT/certificate.crt
1a304b9a7a29eb496de3c8a61ce3f0e16dff797ea73dc5a2dc778354c76ad662 : luti.json
836381a7650f8bbbe8391a0dc5282014d0b0f45a504fbd4c431b08ae10327714 : FBReader.ORGLimited.FBReader_2.0.5.0_x64__n9cpejf4jr0x8.msix
1233930a1877b027211eb810607669eeb0f7d110df04f85dcfad1c105244fa18 : WAPT/control