tis-openshot-video icon

OpenShot Video Editor

Paquet d’installation silencieuse pour OpenShot Video Editor

3.2.1-9

  • package: tis-openshot-video
  • name: OpenShot Video Editor
  • version: 3.2.1-9
  • categories: Media
  • maintainer: WAPT Team,Tranquil IT,Kenan KILICARSLAN,Jimmy PELÉ
  • editor: Jonathan Thomas,Andy Finch,Helen McCall,Olivier Girard,Karlinux,TJ,Maël Lavault
  • licence: GPL
  • locale: all
  • target_os: debian_based
  • impacted_process: openshot-qt,openshot-qt-cli
  • architecture: x64
  • signature_date:
  • size: 239.20 Mo
  • homepage : https://www.openshot.org

package           : tis-openshot-video
version           : 3.2.1-9
architecture      : x64
section           : base
priority          : optional
name              : OpenShot Video Editor
categories        : Media
maintainer        : WAPT Team,Tranquil IT,Kenan KILICARSLAN,Jimmy PELÉ
description       : OpenShot Video Editor is a free and open-source video editor for Linux, macOS, and Windows.
depends           : 
conflicts         : 
maturity          : PROD
locale            : all
target_os         : debian_based
min_wapt_version  : 2.3
sources           : https://www.openshot.org/fr/download/
installed_size    : 
impacted_process  : openshot-qt,openshot-qt-cli
description_fr    : OpenShot Video Editor est un éditeur vidéo non linéaire libre pour GNU/Linux, OS X et Windows.
description_pl    : OpenShot Video Editor to darmowy i open-source'owy edytor wideo dla systemów Linux, macOS i Windows
description_de    : OpenShot Video Editor ist ein freier und quelloffener Videoeditor für Linux, macOS und Windows
description_es    : OpenShot Video Editor es un editor de vídeo gratuito y de código abierto para Linux, macOS y Windows
description_pt    : OpenShot Video Editor é um editor de vídeo gratuito e de código aberto para Linux, MacOS, e Windows
description_it    : OpenShot Video Editor è un editor video gratuito e open-source per Linux, macOS e Windows
description_nl    : OpenShot Video Editor is een gratis en open-source video-editor voor Linux, macOS en Windows
description_ru    : OpenShot Video Editor - это бесплатный видеоредактор с открытым исходным кодом для Linux, macOS и Windows
audit_schedule    : 
editor            : Jonathan Thomas,Andy Finch,Helen McCall,Olivier Girard,Karlinux,TJ,Maël Lavault
keywords          : video,editor,shot
licence           : GPL
homepage          : https://www.openshot.org
package_uuid      : 7a88898c-e053-40f7-8ecf-d1634a3416ed
valid_from        : 
valid_until       : 
forced_install_on : 
changelog         : 
min_os_version    : 
max_os_version    : 
icon_sha256sum    : 
signer            : Tranquil IT
signer_fingerprint: 8c5127a75392be9cc9afd0dbae1222a673072c308c14d88ab246e23832e8c6bb
signature         : pIVVfMkysYXzyJ9r3nBLhKBmcQNrgZ/YHyLcyNQdvX2eIOo12b/+aZlhxpZL7Dh9vTUSqNOYQe7oE2feVpz/dfv4uedyRKBaRVnCvSA4OC/PWEJ35rAKPKXrc9aFwT7/I5PMsgOs5hhCtfPLuAXZoPWY6/jZTHc1GU0ZSVAJY0A+Woe4LAGiJzi9cebSucRj1hI7m8HGnbigHPpq+nSkoeXBDVQZwGXra89z7G6+PQhfsfkqi13YTnQwjoT0L90Q9H3V9Lc6U2Z5f+nEYm7+WquA1UL9HK5MpQ11uBkCQkHkQND//6IbMGZNooFBibsdYgp3GlAR34w4xRGHhyLa6A==
signature_date    : 2024-08-28T14:11:12.472892
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 -*-
##################################################
# This file is part of WAPT Enterprise
# All right reserved, (c) Tranquil IT Systems 2024
# For more information please refer to
# https://wapt.tranquil.it/store/licences.html
##################################################
from setuphelpers import *
import os

def install():
    appimage = glob.glob("*.AppImage")[0]
    install_dir = "/opt/OpenShot/"
    if not isdir(install_dir):
        mkdirs(install_dir)


    filecopyto(appimage, os.path.join(install_dir, appimage))
    run(f"chmod +x /opt/OpenShot/{appimage}")

    run(f"ln -sf /opt/OpenShot/{appimage} /usr/bin/openshot")
    add_alias("OpenShot", "openshot")
    
    icon = glob.glob("./WAPT/openshot-qt.png")[0]
    filecopyto(icon, os.path.join(install_dir, os.path.basename(icon)))
    filecopyto("org.openshot.OpenShot.desktop", "/usr/share/applications/org.openshot.OpenShot.desktop")
    run("chown root:root /usr/share/applications/org.openshot.OpenShot.desktop")


def uninstall():
    remove_file("/usr/bin/OpenShot")
    remove_file("/usr/share/applications/org.openshot.OpenShot.desktop")
    remove_tree("/opt/OpenShot")

    # Remove global aliases
    remove_alias("OpenShot")


def add_alias(alias_name, command_name):
    bashrc_global = "/etc/bash.bashrc"
    alias_command = f"alias {alias_name}='{command_name}'\n"
    
    # Check if alias already exists to avoid duplicates
    if not alias_exists(bashrc_global, alias_name):
        with open(bashrc_global, "a") as bashrc:
            bashrc.write(alias_command)

def alias_exists(file_path, alias_name):
    # Check if the alias is already defined in the file
    with open(file_path, "r") as file:
        lines = file.readlines()
        for line in lines:
            if line.strip().startswith(f"alias {alias_name}="):
                return True
    return False

def remove_alias(alias_name):
    bashrc_global = "/etc/bash.bashrc"
    
    if alias_exists(bashrc_global, alias_name):
        # Remove the alias line from /etc/bash.bashrc
        run(f"sed -i '/alias {alias_name}=/d' {bashrc_global}")

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


def update_package():
    # Initializing variables
    proxies = get_proxies()
    bin_name_string = "OpenShot-%s-x86_64.AppImage"
    if not proxies:
        proxies = get_proxies_from_wapt_console()
    app_name = control.name
    url_api = "https://api.github.com/repos/OpenShot/openshot-qt/releases/latest"
    bin_end = bin_name_string.split("-")[-1]

    # Getting latest version from official sources
    print("API used is: " + url_api)
    json_load = json.loads(wgets(url_api, proxies=proxies))

    for download in json_load["assets"]:
        if download["browser_download_url"].endswith(bin_end):
            url_dl = download["browser_download_url"]
            break

    version = (json_load["tag_name"]).replace("v", "")
    latest_bin = bin_name_string % version

    print("Latest %s version is: %s" % (app_name, version))
    print("Download url is: %s" % url_dl)

    # Downloading latest binaries
    if not isfile(latest_bin):
        print("Downloading: %s" % latest_bin)
        wget(url_dl, latest_bin, proxies=proxies)

        # Changing version of the package
        control.version = "%s-%s" % (version, int(control.version.split("-")[-1]) + 1)
        control.save_control_to_wapt()
        print("Changing package version to: %s in WAPT\\control" % control.version)

    # Deleting outdated binaries
    remove_outdated_binaries(version)

bc9c5449e862bbd8aae1ff8a6b2fb924c740b1db20773f5182c24e111bbfb8b2 : setup.py
d318fc24c81057241bdec3fb8eed68849ec5b918939c39417b47543fb326a693 : OpenShot-3.2.1-x86_64.AppImage
b9c1066e3f819d604498827dd85872e9f30b013e0a7826639a11d96aef9efef7 : update_package.py
f3cfe681657a358e7c9924f50cc4a961e5970bf1fa39912e011d6d256cdd19a6 : WAPT/openshot-qt.png
a5a97261381e1d0ad46ee15916abec9c2631d0201f5cc50ceb0197a165a0bbbf : WAPT/certificate.crt
6e9fbcc4e3a702cd251b373ee8978f08406d47dd283d545e0856ceca754dc823 : luti.json
3145f8c97337c290f68a731a8a131f919e4f84b6bc6bf715bcd0538f3599c337 : org.openshot.OpenShot.desktop
6d90dc43b4de79e3b87368f7aa6e0e114b765833ec0c3c1a6c83c8d6aa9e8253 : WAPT/control