tis-ffmpeg-portable icon

ffmpeg

Paquet d’installation silencieuse pour ffmpeg

7.1-1

  • package: tis-ffmpeg-portable
  • name: ffmpeg
  • version: 7.1-1
  • maintainer: Administrator
  • target_os: windows
  • architecture: all
  • signature_date:
  • size: 92.11 Mo

package           : tis-ffmpeg-portable
version           : 7.1-1
architecture      : all
section           : base
priority          : optional
name              : ffmpeg
categories        : 
maintainer        : Administrator
description       : FFmpeg is the leading multimedia framework, capable of decoding, encoding, transcoding, muxing, demuxing, streaming, filtering and playing just about anything created by humans and machines
depends           : 
conflicts         : 
maturity          : PROD
locale            : 
target_os         : windows
min_wapt_version  : 
sources           : 
installed_size    : 
impacted_process  : 
description_fr    : FFmpeg est le principal framework multimédia, capable de décoder, encoder, transcoder, muxer, démuxer, streamer, filtrer et lire à peu près tout ce que les humains et les machines ont créé
description_pl    : FFmpeg jest wiodącym frameworkiem multimedialnym, zdolnym do dekodowania, kodowania, transkodowania, muxowania, demuxowania, strumieniowania, filtrowania i odtwarzania niemal wszystkiego, co zostało stworzone przez ludzi i maszyny
description_de    : FFmpeg ist das führende Multimedia-Framework, das so ziemlich alles dekodieren, kodieren, transkodieren, muxen, demuxen, streamen, filtern und abspielen kann, was Menschen und Maschinen geschaffen haben
description_es    : FFmpeg es el marco multimedia líder, capaz de descodificar, codificar, transcodificar, muxar, demuxar, transmitir, filtrar y reproducir casi todo lo creado por humanos y máquinas
description_pt    : O FFmpeg é a principal estrutura multimédia, capaz de descodificar, codificar, transcodificar, muxing, demuxing, streaming, filtrar e reproduzir praticamente tudo o que é criado por humanos e máquinas
description_it    : FFmpeg è il principale framework multimediale, in grado di decodificare, codificare, transcodificare, muxare, demuxare, trasmettere, filtrare e riprodurre praticamente tutto ciò che viene creato dall'uomo e dalla macchina
description_nl    : FFmpeg is het toonaangevende multimedia framework dat in staat is om alles wat door mensen en machines gemaakt is te decoderen, coderen, transcoderen, muxen, demuxen, streamen, filteren en af te spelen
description_ru    : FFmpeg - это ведущий мультимедийный фреймворк, способный декодировать, кодировать, транскодировать, муксировать, демуксировать, стримить, фильтровать и воспроизводить практически все, что создано людьми и машинами
audit_schedule    : 
editor            : 
keywords          : 
licence           : 
homepage          : 
package_uuid      : 4f198ddc-6de0-4b51-99ba-f10397ea9c0e
valid_from        : 
valid_until       : 
forced_install_on : 
changelog         : 
min_os_version    : 
max_os_version    : 
icon_sha256sum    : 76c7d708aa82649271c37df548d7fdcf5b7ae6f7da73bdb7205db9fb4aee7e87
signer            : Tranquil IT
signer_fingerprint: 8c5127a75392be9cc9afd0dbae1222a673072c308c14d88ab246e23832e8c6bb
signature_date    : 2024-10-05T14:02:14.000000
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
signature         : QewaE5UY+MRMqSwxk+KTeOY0V1a8CMV1+kr6JPF0eSWdASn1wuc+Sz1JJ6nZGA7Fs06jYn3t+SU8TsAgpte2NGPht/WA1OKEN5tIre4D2tm/4MDSSSe3IrElKsYiEJP3rTUIQIACEJb4qZKM2RpkJsB1OMu+0PhndZ1eyVblNxIIMpuCqBywwg3Ueb+Smtv3E6HFK1NtpjLoVisbD/ehXUSZLGImiMfhITCCREma2eZ0XBT81AqVWXzkC1Ax2E6/CzUihm3jTclA2ZSD02NLW5A6cvELVjHAxBcRlzdJGRFvMVyzTjjbvoiWunAKFe6Dw3tErmZGG1B2xPBU4hBLRQ==

# -*- coding: utf-8 -*-
from setuphelpers import *
import glob
import os

app_name = "ffmpeg"
app_dir = makepath(programfiles, app_name)
app_path = makepath(app_dir, "bin","ffmpeg.exe")
audit_version = False

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

def install():
    # Find the zip file
    zip_name = glob.glob(f"{app_name}*.zip")[0]
    unzip_dest = makepath(".", "temp_dezip")
    
    # Remove the temporary directory if it already exists
    if isdir(unzip_dest):
        remove_tree(unzip_dest)
    
    # Extract the zip file
    print(f"Extracting: {zip_name} to: {unzip_dest}")
    unzip(zip_name, unzip_dest)
    
    # List the contents of the temporary directory
    extracted_files = os.listdir(unzip_dest)
    print(f"Contents of the temporary directory after extraction: {extracted_files}")
    
    # Find the name of the extracted directory or the extracted files
    if not extracted_files:
        raise Exception("No extracted files or directories found")
    
    # If the first extracted item is a directory, use that directory, otherwise use unzip_dest
    first_extracted_item = makepath(unzip_dest, extracted_files[0])
    if isdir(first_extracted_item):
        unzipped_dir = first_extracted_item
    else:
        unzipped_dir = unzip_dest
    
    # Verify that the extracted directory exists
    if not isdir(unzipped_dir):
        raise Exception(f"Invalid source directory for copytree2: {unzipped_dir}")
    
    # Remove the old application directory if it exists
    if isdir(app_dir):
        remove_tree(app_dir)
    
    # Move the new extracted directory or files to the final installation directory
    copytree2(unzipped_dir, app_dir, onreplace=default_overwrite)
    
    # Remove the temporary directory
    remove_tree(unzip_dest)
    
    # Create custom shortcuts
    create_programs_menu_shortcut(app_name, target=app_path)
    
    # Get the desktop path
    desktop_path = os.path.expanduser("~\\Desktop")
    desktop_shortcut_path = makepath(desktop_path, f"{app_name}.lnk")
    
    # Create the desktop shortcut
    print(f"Creating desktop shortcut: {desktop_shortcut_path}")
    create_shortcut(desktop_shortcut_path, target=app_path)
    
    print(f"Desktop shortcut created successfully: {desktop_shortcut_path}")

def create_shortcut(shortcut_path, target):
    try:
        create_desktop_shortcut(shortcut_path, target=target)
        return True
    except Exception as e:
        print(f"Error creating shortcut: {e}")
        return False

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)

    # Removing shortcuts
    desktop_path = os.path.expanduser("~\\Desktop")
    desktop_shortcut_path = makepath(desktop_path, f"{app_name}.lnk")
    
    if os.path.exists(desktop_shortcut_path):
        print(f"Removing desktop shortcut: {desktop_shortcut_path}")
        os.remove(desktop_shortcut_path)
    
    remove_programs_menu_shortcut(app_name)

    # Additional check
    if os.path.exists(desktop_shortcut_path):
        print(f"Failed to remove desktop shortcut: {desktop_shortcut_path}")
    else:
        print(f"Desktop shortcut removed successfully: {desktop_shortcut_path}")

# -*- coding: utf-8 -*-
from setuphelpers import *
from setupdevhelpers import *
import json

# Declaring global variables - Warnings: 1) WAPT context is only available in package functions; 2) Global variables are not persistent between calls


def update_package():
    result = False
    proxies = get_proxies()
    
    if not proxies:
        proxies = get_proxies_from_wapt_console()
   
    git_repo = "GyanD/codexffmpeg"
    url_api = "https://api.github.com/repos/%s/releases/latest" % git_repo   
    # Getting latest version information from official sources
    print("API used is: %s" % url_api)
    json_load = json.loads(wgets(url_api, proxies=proxies))

    for download in json_load["assets"]:
        if  download["browser_download_url"].endswith('.zip'):
            url_dl = download["browser_download_url"]
            version = json_load["tag_name"].replace("v","")
            filename = download["name"]
            break

    if not isfile(filename):
        package_updated = True
        wget(url_dl,filename,proxies=proxies)

    #nettoyer les fichiers temporaires
    for f in glob.glob('*.zip'):
        if f != filename:
            remove_file(f)
    
    control.set_software_version(version)
    control.save_control_to_wapt()

38d056ab130f7bf7c481c12636a4e9959de36561d3dfcbe54c6e3571bc0c1dc3 : WAPT/certificate.crt
786e7e8aa1368d347dfb45fc3a6ac070ed9398923905708d32698834b0975be7 : WAPT/control
76c7d708aa82649271c37df548d7fdcf5b7ae6f7da73bdb7205db9fb4aee7e87 : WAPT/icon.png
fa7d4d7e795db0e2503f49f105f46ed5852386f0cfdd819899be3b65ebde24fc : ffmpeg-7.1-essentials_build.zip
3fe21df2103fe766c42b4e969dce854003a0b8f2072c6a1da9dd4e5bee5858ba : luti.json
8d0f19f8d7a113ef199f7f2415bb8beefb2912a609816e4c76c6caad186412f2 : setup.py
3265852a510ae04133a522c7105ae65a5950d1575f052f4b4511487b4ccc2475 : update_package.py