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: windows
  • architecture: x86
  • signature_date:
  • size: 53.56 Mo

package           : tis-pencil-portable
version           : 0.7.1-1
architecture      : x86
section           : base
priority          : optional
name              : pencil2d
categories        : 
maintainer        : Administrator
description       : HMI modeling tool (static and/or dynamic)
depends           : 
conflicts         : 
maturity          : PREPROD
locale            : 
target_os         : windows
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      : 53b15221-f856-456e-88cb-3271236a604e
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:07:25.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         : iJ5husviwmR0MM8zAzcdiV5234fjiXO/8ayt+JUAnpErnwb6KVPMfpr8KyCuoPXLnFseyyLbba+YRFNDKs/rfE4RcsbfvqjqHIb6KwwesIf6DdczdJNXMpXSL2VYyokWAjK/MErkH0prUK3Xo6t5d1eU505EVFrSzffwhsHsLpvAQB1YhLWy1/kmzl4bW/WjfnG7N3LAvF2Ms7+Ti00AWyBanusaXfFTTKJwIb9EapWEFBb0sSPIeF7Uy6Vqxo8wxIR+orHyK6ROvO8VBPh4Gi0BRHBqe3OwngsieZjTmNuLi1eZH4VSOGUUA5DYMOYiwuchdux6hJUEcmiY0bgo+Q==

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


app_name = "Pencil2D"
app_dir = makepath(programfiles, app_name)
app_path = makepath(app_dir,"Pencil2D","pencil2d.exe")
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"{app_name}*.zip")[0]
    unzip_dest = "."
    unzip_dest = app_name
    unzipped_dir = zip_name.rsplit(".", 1)[0]
    unzipped_dir = app_name

    

    # 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, app_dir))
    unzip(zip_name, unzip_dest)
    copytree2(unzipped_dir, app_dir, onreplace=default_overwrite)

    # Creating custom shortcuts
    create_desktop_shortcut(app_name, target=app_path)
    create_programs_menu_shortcut(app_name, target=app_path)


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
    remove_desktop_shortcut(app_name)
    remove_programs_menu_shortcut(app_name)

# -*- 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()
    dict_arch = {
        "x64":"-win64",
        "x86":"-win32"}    
        
    git_repo = "pencil2d/pencil"
    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') and dict_arch[control.architecture] in download["browser_download_url"]:
            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()

01ca7fe94636e5a08fcb73849d3b5df25d51e2c82f4dd1a08f01798b25899819 : WAPT/certificate.crt
f7c8e7cd8f0dee3976db5d92632d303e918ff3a1330bcd5d9214057c126015a7 : WAPT/control
ccd9a5c5d95a8a56173028da4992105dc8bbf081f7bfd72f9671a1fbd66e5098 : WAPT/icon.png
81b83d8b0a7080055f78cad110d9f4664096c83a0d7d524526c5d7f2e955f1e8 : luti.json
b3a43ee4c948f90c526e4d128f22254a0c1f4165f958ee90228b84ce8979d8d7 : pencil2d-win32-v0.7.1.zip
0cfca1edffdbd543b8e78383c118596ccab213271ae22afafaba1dff8ee461a4 : setup.py
89984c87e61a790d9d0e4b3ed34ce76f8c72e873adfaf268b5681a54f30ff032 : update_package.py