tis-photofiltre

7.2.1.0-13
PhotoFiltre is an image editing program created by Antonio Da Cruz. In addition to the classic image treatments, it has a hundred filters to improve and transform digital photos.
7810 downloads
Download
View on luti logo
tis-photofiltre icon

  Description 

  • package : tis-photofiltre
  • version : 7.2.1.0-13
  • architecture : all
  • categories : Media,Utilities
  • maintainer : WAPT Team,Tranquil IT,Simon Fonteneau,Pierre Cosson
  • description : PhotoFiltre is an image editing program created by Antonio Da Cruz. In addition to the classic image treatments, it has a hundred filters to improve and transform digital photos.
  • locale :
  • target_os : windows
  • min_wapt_version : 1.8
  • sources : http://www.photofiltre-studio.com/download.htm
  • installed_size :
  • impacted_process :
  • description_fr : PhotoFiltre est un logiciel de retouche d'image créé par Antonio Da Cruz. Outre les traitements classiques de l'image, il dispose d'une centaine de filtres pour améliorer et transformer des photos numériques.
  • description_pl :
  • description_de :
  • description_es :
  • description_pt :
  • description_it :
  • description_nl :
  • description_ru :
  • editor : Antonio Da Cruz
  • licence : Gratuiciel
  • signature_date : 2022-04-03T17:01:43.027732
  • Homepage : http://www.photofiltre-studio.com/

  Setup.py 

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

r"""
Usable WAPT package functions: install(), uninstall(), session_setup(), audit(), update_package()

"""
# Declaring global variables - Warnings: 1) WAPT context is only available in package functions; 2) Global variables are not persistent between calls
bin_name_sub = "pf7"
app_uninstallkey = "Photofiltre7"
app_dir = makepath(programfiles32, app_uninstallkey)
app_bin_path = makepath(app_dir, "PhotoFiltre7.exe")


def install():

    # Declaring local variables
    package_version = control.get_software_version()
    impacted_process_list = control.impacted_process.split(",")
    bin_name = glob.glob("*%s*.zip" % bin_name_sub)[0]
    app_name = control.name
    non_portable_uninstall = makepath(programfiles32, "PhotoFiltre 7", "Uninst.exe")
    # uninstalling non portable version :

    if isfile(non_portable_uninstall):
        run('"%s" /S' % non_portable_uninstall)
        unregister_uninstall("PhotoFiltre")
        remove_programs_menu_shortcut("PhotoFiltre 7", folder="PhotoFiltre 7")

    # Getting installed software version
    if isfile(app_bin_path):
        installed_version = get_version_from_binary(app_name)
    else:
        installed_version = ""

    # Installing the software
    print("Installing: %s" % app_name)
    if installed_version < package_version:
        killalltasks(impacted_process_list)
        if isdir(app_dir):
            remove_tree(app_dir)
        mkdirs(app_dir)
        print("Extracting: %s to: %s " % (bin_name, app_dir))
        unzip(bin_name, ".")
        temp_dir = "PhotoFiltre7"
        for file_to_move in glob.glob("%s/*" % temp_dir):
            shutil.move(file_to_move, app_dir)
        create_programs_menu_shortcut(app_name, app_bin_path)

        # Adding the software to the "list-registry"
        register_windows_uninstall(control)  # control is a PackageEntry object corresponding to the package
    else:
        print("%s portable is already installed in the correct version" % app_name)


def uninstall():
    # Declaring local variables
    impacted_process_list = control.version.split(",")

    # Uninstalling the software
    print("Uninstalling: %s" % app_uninstallkey)
    killalltasks(impacted_process_list)
    if isdir(app_dir):
        remove_tree(app_dir)
    unregister_uninstall("PhotoFiltre")
    remove_programs_menu_shortcut("PhotoFiltre")


def audit():
    # Declaring local variables
    package_version = control.version.split("-")[0]
    app_version = get_version_from_binary(app_bin_path, property_name="FileVersion")

    if isdir(app_dir):
        if package_version == app_version:
            print("OK: Folder exists: %s" % app_dir)
            return "OK"
        else:
            print("WARNING app version %s != %s package_version" % (app_version, package_version))
            return "WARNING"
    else:
        print("ERROR: Folder not exists: %s" % app_dir)
        return "ERROR"


def update_package():
    # Declaring local variables
    result = False
    proxies = get_proxies()
    if not proxies:
        proxies = get_proxies_from_wapt_console()
    app_name = control.name
    url = "http://www.photofiltre-studio.com/pf7-en.htm"

    # Getting latest version from official sources
    print("URL used is: %s" % url)
    for bs_search in bs_find_all(url, "a", proxies=proxies, timeout=10):
        if bin_name_sub in bs_search["href"]:
            version = bs_search["href"].split("/")[-1].split("-")[-1].replace(".zip", "")
            latest_bin = bs_search["href"].split("/")[-1]
            download_url = bs_search["href"]
            break

    print("Latest %s version is: %s" % (app_name, version))
    print("Download URL is: %s" % download_url)

    # Downloading latest binaries
    if isfile(latest_bin):
        remove_file(latest_bin)

    print("Downloading: %s" % latest_bin)
    wget(download_url, latest_bin, proxies=proxies)
    # Checking version from file
    unzip(latest_bin)
    dir_names = glob.glob("pf7*")
    for folder in dir_names:
        if ".zip" not in folder:
            version_from_file = get_version_from_binary(makepath(folder, "Photofiltre7", "PhotoFiltre7.exe"), property_name="FileVersion")

    # if not version_from_file.startswith(version) and version_from_file != '':
    if Version(version_from_file) != Version(version) and version_from_file != "":
        version = version_from_file
    else:
        print("Binary file version corresponds to online version")

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

    remove_tree(latest_bin.split(".zip")[0])
    control.version = "%s-%s" % (Version(version), control.version.split("-", 1)[-1])
    # control.set_software_version(version)
    control.save_control_to_wapt()

    # Validating or not update-package-sources
    return result

										

  Changelog 



No changelog.txt.
									
  manifest.sha256