tis-crushee-portable icon

Crushee

Paquet d’installation silencieuse pour Crushee

2.4.6-1

  • package: tis-crushee-portable
  • name: Crushee
  • version: 2.4.6-1
  • categories: Utilities
  • maintainer: WAPT Team,Tranquil IT,Amel FRADJ
  • licence: proprietary_free,wapt_public
  • target_os: windows
  • architecture: all
  • signature_date:
  • size: 124.66 Mo
  • homepage : https://crushee.app/

package           : tis-crushee-portable
version           : 2.4.6-1
architecture      : all
section           : base
priority          : optional
name              : Crushee
categories        : Utilities
maintainer        : WAPT Team,Tranquil IT,Amel FRADJ
description       : Crushee (Xander Frangos) Drag-and-drop images to quickly shave bytes and pixels off of your images
depends           : 
conflicts         : 
maturity          : PROD
locale            : 
target_os         : windows
min_wapt_version  : 2.3
sources           : 
installed_size    : 
impacted_process  : 
description_fr    : Crushee (Xander Frangos) Glissez-déposez des images pour réduire rapidement le nombre d'octets et de pixels de vos images
description_pl    : Crushee (Xander Frangos) Przeciągnij i upuść obrazy, aby szybko usunąć bajty i piksele z obrazów
description_de    : Crushee (Xander Frangos) Ziehen und Ablegen von Bildern, um schnell Bytes und Pixel aus Ihren Bildern zu entfernen
description_es    : Crushee (Xander Frangos) Arrastre y suelte imágenes para eliminar rápidamente bytes y píxeles de sus imágenes
description_pt    : Crushee (Xander Frangos) Arraste e largue imagens para reduzir rapidamente os bytes e os pixels das suas imagens
description_it    : Crushee (Xander Frangos) Trascinamento di immagini per ridurre rapidamente byte e pixel delle immagini
description_nl    : Crushee (Xander Frangos) Versleep afbeeldingen om snel bytes en pixels van je afbeeldingen af te halen
description_ru    : Crushee (Xander Frangos) Перетаскивайте изображения, чтобы быстро сократить количество байтов и пикселей на ваших изображениях
audit_schedule    : 
editor            : 
keywords          : 
licence           : proprietary_free,wapt_public
homepage          : https://crushee.app/
package_uuid      : 12adb27f-66a5-4546-90f9-1135328ae44f
valid_from        : 
valid_until       : 
forced_install_on : 
changelog         : https://github.com/xanderfrangos/crushee/releases
min_os_version    : 10.0
max_os_version    : 
icon_sha256sum    : 455eb2c8c99e9a75204d17e59017509bf068fccb3cfc21de82af46a1b042f6a5
signer            : Tranquil IT
signer_fingerprint: 8c5127a75392be9cc9afd0dbae1222a673072c308c14d88ab246e23832e8c6bb
signature         : UnLCpOU0qmaIZRUMPkD+GrGcgmKkjXBWS70VUqEiELR4FNTrsXFcP6ZHc+pVMaOtCpTkZQpBSMxB2462l0Vyq43haMIhtOSnmxKM9foFg9S8pQZfGuu1v7LSK1imUtLZnOGGmdc45Q1cXOdWcQYz0mLspwYs5IlmPBUK74A+GJEyBKvDJH1K/ELkiAJG5edZAaFKVgYZfhujl2V96JrTfUC9D8Lj3tXnjzke7Kmvq5fn2H0foYIM8xdYuxbMCbwTQ4KYRC0mxpKBUUMGdi4tYtoIBevi4AtFgESAnnIpbA0pQIhVnDO69Yl9Sl+Wxc4chWqJ5Heev4Bjfn9K+0krZQ==
signature_date    : 2024-05-19T11:00:45.635767
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 *

"""


"""


app_name = "crushee portable "
editor_dir = makepath(programfiles, "crushee")
app_dir = makepath(editor_dir, "crushee")
app_path = makepath(app_dir, "crushee.jar")
icon_path = makepath(app_dir, "resources", "app", "build", "crushee.ico")   #tis-crushee\windows\crushee\resources\resources\build
audit_version = False


def get_installed_version(app_path):
    return get_file_properties(app_path).get("FileVersion", "")


def install():
    # Declaring local variables
    zip_name = glob.glob(f"crushee-*-win-portable.zip")[0]

    unzipped_dir = "crushee"


    # Installing software
    killalltasks(ensure_list(control.impacted_process))
    if isdir(app_dir) and force:
        remove_tree(app_dir)
    mkdirs(app_dir)
    print("Extracting: %s to: %s" % (zip_name, unzipped_dir))
    unzip(zip_name, unzipped_dir)
    print('Copy crushee to %s' % app_dir)
    copytree2(unzipped_dir, app_dir, onreplace=default_overwrite)

    # Creating custom shortcuts
    create_desktop_shortcut(app_name, target=app_path, icon=icon_path if icon_path != app_path else "")
    create_programs_menu_shortcut(app_name, target=app_path, icon=icon_path if icon_path != app_path else "")


def audit():
    # Auditing software
    audit_status = "OK"
    installed_version = get_installed_version(app_path)
    if Version(installed_version) < Version(control.get_software_version()) and audit_version:
        print("%s is installed in version (%s) instead of (%s)" % (app_name, installed_version, control.get_software_version()))
        audit_status = "WARNING"
    elif isdir(app_dir) and not dir_is_empty(app_dir):
        print("%s (%s) is installed" % (app_name, installed_version))
        audit_status = "OK"
    else:
        print("%s is not installed" % app_name)
        audit_status = "ERROR"
    return audit_status


def uninstall():
    # Uninstalling software
    killalltasks(ensure_list(control.impacted_process))
    if isdir(app_dir):
        remove_tree(app_dir)
    if dir_is_empty(editor_dir):
        remove_tree(editor_dir)

    # Removing shortcuts
    remove_desktop_shortcut(app_name)
    remove_programs_menu_shortcut(app_name)

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


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

    api_url = "https://api.github.com/repos/xanderfrangos/crushee/releases/latest"

     # Get data from API
    releases_dict = wgets(api_url, proxies=proxies, as_json=True)
    zip_found = False  # Flag pour indiquer la découverte d'un fichier .zip
    for release in releases_dict:
        if zip_found:
            break
        for asset in releases_dict["assets"]:
            if asset["browser_download_url"].endswith(".zip"):
                url_download = asset["browser_download_url"]
                latest_bin = url_download.split('/')[-1]
                last_version = releases_dict["name"][1:]
                zip_found = True  # Mettre à jour le flag pour indiquer qu'un .zip a été trouvé
                break

    # Deleting binaries
    for f in glob.glob("*.zip"):
        if f != latest_bin:
            remove_file(f)


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

    # Updating the package
    control.set_software_version(last_version)
    control.save_control_to_wapt()

    return package_updated

041a9ea7f5d821bb9f5068c74659b6300e0bcac98948951188362d82cd2c71f1 : setup.py
b5825294387434047ccc0eadf3120c126c9697396c611a3aac5b1faa70eaf1ac : update_package.py
455eb2c8c99e9a75204d17e59017509bf068fccb3cfc21de82af46a1b042f6a5 : WAPT/icon.png
a5a97261381e1d0ad46ee15916abec9c2631d0201f5cc50ceb0197a165a0bbbf : WAPT/certificate.crt
ed20302ce7ad55d37c35cd1977215c9f3356444aeeb5a521232d021aebe7eae3 : luti.json
0baf7d81c6a8578c7fab5c1c35246e0b3395b1d40e171605c50f6a86f1108da3 : Crushee-v2.4.6-win-portable.zip
63832e14d65c14d35c1b42b811e012495f7125afb9613b5dccfa1e933b49f432 : WAPT/control