tis-pencil-portable icon

pencil2d

Silent install package for pencil2d

0.7.1-1

Preprod packages are packages built on LUTI. They remain in PREPROD usually for 5 days, after which a second VirusTotal scan is performed to verify that the status has not changed.
If the package passes this last check, it is promoted to PROD and published on the store.

  • package: tis-pencil-portable
  • name: pencil2d
  • version: 0.7.1-1
  • maintainer: Administrator
  • target_os: debian_based
  • architecture: x64
  • signature_date:
  • size: 59.79 Mo

package           : tis-pencil-portable
version           : 0.7.1-1
architecture      : x64
section           : base
priority          : optional
name              : pencil2d
categories        : 
maintainer        : Administrator
description       : HMI modeling tool (static and/or dynamic)
depends           : 
conflicts         : 
maturity          : PREPROD
locale            : 
target_os         : debian_based
min_wapt_version  : 
sources           : 
installed_size    : 
impacted_process  : 
description_fr    : Outil de maquettage IHM (statique et/ou dynamique)
description_pl    : Narzędzie do modelowania HMI (statyczne i/lub dynamiczne)
description_de    : HMI-Mapping-Tool (statisch und/oder dynamisch)
description_es    : Herramienta de modelización HMI (estática y/o dinámica)
description_pt    : Ferramenta de modelação HMI (estática e/ou dinâmica)
description_it    : Strumento di modellazione HMI (statico e/o dinamico)
description_nl    : HMI-modelleringstool (statisch en/of dynamisch)
description_ru    : Инструмент моделирования HMI (статический и/или динамический)
audit_schedule    : 
editor            : 
keywords          : 
licence           : 
homepage          : 
package_uuid      : 3039c01b-4084-4ce3-92ac-f4434decdc1d
valid_from        : 
valid_until       : 
forced_install_on : 
changelog         : 
min_os_version    : 
max_os_version    : 
icon_sha256sum    : ccd9a5c5d95a8a56173028da4992105dc8bbf081f7bfd72f9671a1fbd66e5098
signer            : test
signer_fingerprint: b82fc8ef4a4475c0f69ac168176c2bfc58f572eb716c4eadd65e4785c155dd8e
signature_date    : 2026-03-09T08:05:43.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         : mSIEHHBshF1rAeBt5q3CQpxlFxgKCU3WxLQL8MTeHwKdMOgEBbitbRR5BSNoTXF1A94sclmUHcSoE1/Eng+PvX+1jkH1GFy2ukwSfo6FW0b1vkJw3RbtvsV4234OY7HxuZiYXyV4Ndqjp34tYQCwnr7bNbKMqc0L61D0CIOH7bfg+vO2nqUlb1RfnIJqGfiRmck+2ILOdIljZszAxXSDP+pvDe01/G34b8za3FGSs6fVxv9tRqs4gCV71MItU42Vjnj5+HbDuDNbjJXxSIrmOIplfPZYNeN33cJ/ScbI8eigGvEhnKDLQN5a50vTuyOU8bRMoFd8C6GEE5WMVIEAzQ==

# -*- coding: utf-8 -*-
from setuphelpers import *
from iniparse import ConfigParser
import os


def install():
    install_dir = makepath('/','opt',control.package.split('-',1)[1])
    appimage = glob.glob("*.AppImage")[0]
    install_appimage(appimage,install_dir)

def uninstall():
    install_dir = makepath('/','opt',control.package.split('-',1)[1])
    uninstall_appimage(install_dir)

def install_appimage(appimage,install_dir,binaliasname=None):
    run('chmod a+x ./' + appimage)

    if isdir(install_dir):
        uninstall_appimage(install_dir)

    mkdirs(install_dir)

    name_appimage = appimage.split('/')[-1]
    filecopyto(appimage, makepath(install_dir, name_appimage))
    run('"./%s" --appimage-extract' % appimage)
    

    for desktop in glob.glob(makepath('squashfs-root','*.desktop')):
 
        desktop_cp = ConfigParser()
        desktop_cp.optionxform = str
        desktop_file = open(desktop, encoding="utf-8")
        desktop_cp.readfp(desktop_file)
        bin_path = desktop_cp.get('Desktop Entry',"Exec")

        newbin_path = install_dir + '/' + name_appimage
        if ' %' in bin_path:
            newbin_path = newbin_path + ' %' + bin_path.split(' %',1)[1]

        icon_path = desktop_cp.get('Desktop Entry',"Icon")

        srcicon = makepath('squashfs-root',icon_path +'.svg')
        if not isfile(srcicon):
            srcicon = makepath('squashfs-root',icon_path +'.png')

        if not isfile(srcicon):
            lstglob = glob.glob(makepath('squashfs-root','*.svg'))
            if lstglob :
                srcicon=lstglob[0]

        if not isfile(srcicon):
            lstglob = glob.glob(makepath('squashfs-root','*.png'))
            if lstglob :
                srcicon=lstglob[0]
            else:
                srcicon = None

        if srcicon:            
            new_icon = install_dir + '/' + srcicon.split('/')[-1]
            filecopyto(srcicon,new_icon)
            desktop_cp.set('Desktop Entry',"Icon",new_icon) 

        desktop_cp.set('Desktop Entry',"Exec",newbin_path)
       
        with open(desktop, 'w', encoding="utf-8") as f:
            desktop_cp.write(f)

        pathdesk = makepath(install_dir,desktop.split('/')[-1])
        filecopyto(desktop, pathdesk)
        run('chown root:root "%s" ' % pathdesk)

    for f in glob.glob(makepath(install_dir,'*.desktop')):
        run('ln -sf "%s" "/usr/share/applications/%s"' % (f,f.split('/')[-1]))

    if binaliasname :
        run(f"ln -sf {install_dir}/{name_appimage} /usr/bin/{binaliasname}")

    remove_tree('squashfs-root')

def uninstall_appimage(install_dir):

    if not glob.glob(makepath(install_dir,'*.desktop')):
        error('.desktop not found')

    for f in glob.glob(makepath(install_dir,'*.desktop')):
        deskfile = f.split('/')[-1]
        system_desktop = makepath("/","usr","share","applications",deskfile)
        if isfile(system_desktop):
            remove_file(system_desktop)
    remove_tree(install_dir)

# -*- coding: utf-8 -*-
##################################################
# This file is part of WAPT Enterprise
# All right reserved, (c) Tranquil IT Systems 2023
# For more information please refer to
# https://wapt.tranquil.it/store/licences.html
##################################################
from setuphelpers import *
import json


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/pencil2d/pencil/releases/latest"
    os_dict = {"windows": ".exe", "debian_based": ".AppImage", "redhat_based": ".AppImage", "darwin": ".dmg"}

    # Getting latest version information from official sources
    print("API used is: %s" % api_url)
    json_load = json.loads(wgets(api_url, proxies=proxies))
    for to_download in json_load["assets"]:
        if os_dict[control.target_os] in to_download["name"]:
            download_url = to_download["browser_download_url"]
            version = json_load["tag_name"].split("-")[-1].replace("v", "")
            latest_bin = to_download["name"]
            break

    # Downloading latest binaries
    print("Latest %s version is: %s" % (control.name, version))
    print("Download URL is: %s" % download_url)
    if not isfile(latest_bin):
        print("Downloading: %s" % latest_bin)
        wget(download_url, latest_bin, proxies=proxies)
    else:
        print("Binary is present: %s" % latest_bin)

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

    # Deleting outdated binaries
    remove_outdated_binaries(version)

    # Validating update-package-sources
    return package_updated

01ca7fe94636e5a08fcb73849d3b5df25d51e2c82f4dd1a08f01798b25899819 : WAPT/certificate.crt
ec09bd2c0c407f30ce96130c53dd378fdca31f05440ec2baf9cd781446f73a51 : WAPT/control
ccd9a5c5d95a8a56173028da4992105dc8bbf081f7bfd72f9671a1fbd66e5098 : WAPT/icon.png
63c1a3d9d7001dec80a00b40d5b0bb41b781d6481b28e6f14ddd1f6d7637beb7 : luti.json
02416a6777f3b5aca826285b85d66476c1352d0d8252b55714cc7bc55ba463f6 : pencil2d-linux-amd64-v0.7.1.AppImage
dbf398aa16ae478e7ba1611a1dabf45906e8bbbaecacd36e33dc0d197ac9ab92 : setup.py
6d1f645ea540914167dbae550a702687612862d54a578a092861ca7445a01d70 : update_package.py