tis-dokiel icon

Dokiel

Silent install package for Dokiel

25.0.2-1

  • package: tis-dokiel
  • name: Dokiel
  • version: 25.0.2-1
  • categories: education
  • maintainer: Jordan ARNAUD
  • licence: MPL 2.0 GPL 3.0 LGPL 3.0 CeCILL 2.1
  • locale: en
  • target_os: darwin
  • architecture: all
  • signature_date:
  • size: 273.30 Mo
  • homepage : https://doc.scenari.software/Dokiel/

package           : tis-dokiel
version           : 25.0.2-1
architecture      : all
section           : base
priority          : optional
name              : Dokiel
categories        : education
maintainer        : Jordan ARNAUD
description       : Dokiel is dedicated to technical communication and software documentation
depends           : 
conflicts         : 
maturity          : PROD
locale            : en
target_os         : darwin
min_wapt_version  : 
sources           : 
installed_size    : 
impacted_process  : 
description_fr    : Dokiel est dédié au domaine de la communication technique et documentation logicielle
description_pl    : Dokiel zajmuje się komunikacją techniczną i dokumentacją oprogramowania
description_de    : Dokiel ist dem Bereich der technischen Kommunikation und Softwaredokumentation gewidmet
description_es    : Dokiel se dedica a la comunicación técnica y la documentación de software
description_pt    : A Dokiel dedica-se à comunicação técnica e à documentação de software
description_it    : Dokiel si occupa di comunicazione tecnica e documentazione software
description_nl    : Dokiel houdt zich bezig met technische communicatie en softwaredocumentatie
description_ru    : Dokiel занимается технической коммуникацией и документированием программного обеспечения
audit_schedule    : 
editor            : 
keywords          : 
licence           : MPL 2.0 GPL 3.0 LGPL 3.0 CeCILL 2.1
homepage          : https://doc.scenari.software/Dokiel/
package_uuid      : 70b7a38c-12d7-40bd-86ce-73d715963c23
valid_from        : 
valid_until       : 
forced_install_on : 
changelog         : 
min_os_version    : 10.0
max_os_version    : 
icon_sha256sum    : 4bd0533e447e7e42233e44fe44531538991148c0697d019986f7ed54e16e3277
signer            : Tranquil IT
signer_fingerprint: 8c5127a75392be9cc9afd0dbae1222a673072c308c14d88ab246e23832e8c6bb
signature_date    : 2025-08-11T08:06:22.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         : wW+X/vEg3jdaO7cqcRmMaf2Rkla35PkgMW3laE0rrI80nFRGol+eMXokMza3gdcq7W/HxLqD7wV/qG9xkjc9VicjaMC0I7xbB+iTmB+186ADM7ORFHSh+DtEIJiYmf3s8mmX8vqIv2z17HItiQHmAeglV8kq6WfD+beAxqlKL4aDSStJeezyodYuodyNQVSwANNsoCG5tsdy9TdI/WDbBi7dKOFhs7CXBW6szFIuJQaQXhsUKkBpVReQ0oVmAC6HM644yVk7jh7/PF7xiJM0TgIXo4YiwfEjA6dBRiYCaL30KlhDS1mjmnZHgHIhobn7hlgTozWNlIGrwX6aEuk0ow==

# -*- 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 *


def install():
    # Declaring local variables
    bin_name = glob.glob("Dokiel*.dmg")[0]


    def mount_dmg(dmg_path):
        """Mounts a dmg file.

        Returns: The path to the mount point.
        """
        try:
            return run("yes | hdiutil mount '" + dmg_path + "'").split("\t")[-1].rstrip()
        except subprocess.CalledProcessError as e:
            raise Exception("Error in mount_dmg : {0}".format(e.output))
    
    def install_dmg(dmg_path, key="", min_version="", get_version=None, force=False, killbefore=None, uninstallkeylist=None):
        """Installs a .dmg if it isn't already installed on the system.

        Arguments:
            dmg_path : the path to the dmg file

        Returns:
            True if it succeeded, False otherwise
        """
        ret_val = True

        dmg_name = os.path.basename(dmg_path)
        dmg_mount_path = mount_dmg(dmg_path)

        try:
            dmg_file_assoc = {".pkg": install_pkg, ".mpkg": install_pkg, ".app": install_app}
            files = [dmg_mount_path + "/" + fname for fname in os.listdir(dmg_mount_path)]
            nb_files_handled = 0
            for file in files:
                fname, fextension = os.path.splitext(file)
                if fextension in dmg_file_assoc:
                    dmg_file_assoc[fextension](
                        file,
                        key=key,
                        min_version=min_version,
                        get_version=get_version,
                        force=force,
                        uninstallkeylist=uninstallkeylist,
                        killbefore=killbefore,
                    )
                    nb_files_handled += 1

            if nb_files_handled == 0:
                error("Error : the dmg provided did not contain a package or an application, or none could be found.")

            unmount_dmg(dmg_mount_path)
        except Exception as e:
            unmount_dmg(dmg_mount_path)
            raise
    
    # Uninstalling older version of the software that can remains
    for to_uninstall in installed_softwares(name="Dokiel"):
      if Version(to_uninstall["version"]) < Version(control.get_software_version()):
        print(f"Removing: {to_uninstall['name']} ({to_uninstall['version']})")
        remove_tree(to_uninstall['key'])

    # Installing the software
    install_dmg(bin_name,
        key='/Applications/Dokiel 25.app',
        min_version=control.get_software_version(),
        get_version=get_version
    )



def uninstall():
    remove_tree("/Applications/Dokiel 25.app")

def get_version(key):
    return key['version'].split('-')[0]

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


def update_package():
    # Declaring local variables
    result = False
    proxies = get_proxies()
    if not proxies:
        proxies = get_proxies_from_wapt_console()
    
    lang_dict = {'fr':'fr-FR',
    'en':'en-US'}
    lang = control.locale
    url_base = "https://download.scenari.software/Dokiel/?productInfos"
    response = requests.get(url_base, proxies=proxies, allow_redirects=True)
    response.raise_for_status()

    # Supposons que la réponse soit un JSON contenant les informations du produit
    product_info = response.json()
    
    # Trouve la version la plus récente dans la liste 'hist'
    version = product_info.get('v', [])
    # Compose l'URL dynamique avec la dernière version
    url_latest_version = f"https://download.scenari.software/Dokiel@{version}/?productInfos"    
    response = requests.get(url_latest_version, proxies=proxies, allow_redirects=True)
    response.raise_for_status()
    # Supposons que la réponse soit un JSON contenant les informations des fichiers
    product_files_info = response.json()
    # Rechercher le fichier .dmg pour Windows correspondant à la langue de control.locale
    exe_file = None
    if 'ch' in product_files_info:
        for file in product_files_info['ch']:
            if isinstance(file, dict) and file['n'].endswith('.dmg') and file['metas']['os'] == 'mac' and file['metas']['lang'] == lang_dict[control.locale]:
                exe_file = file['metas']['path']
                break
    

    url_download = f"https://download.scenari.software{exe_file}"
    filename = exe_file.split('/')[-1]
    if not isfile(filename):
        package_updated = True
        wget(url_download, filename, proxies=proxies)
        print("download:", filename)


    for f in glob.glob("*.dmg"):
        if f != filename:
            remove_file(f)
 
    #version = str(Version(get_version_from_binary(filename).split('-')[0],3))

    control.set_software_version(version)
    control.save_control_to_wapt()

a6e6783c78fababf95ea3c6a4b9ac01b11dc02e3d98e70027ca8f244fffc17c7 : Dokiel25.0.2_en-US_202508051550_mac_x64.dmg
38d056ab130f7bf7c481c12636a4e9959de36561d3dfcbe54c6e3571bc0c1dc3 : WAPT/certificate.crt
4d0eeb373ea7b2cd343feb53b620960b54ff5b9724d16a774bfb20dff439b259 : WAPT/control
4bd0533e447e7e42233e44fe44531538991148c0697d019986f7ed54e16e3277 : WAPT/icon.png
8c1df9d9e38ff69423bd1e0ff90de3fd06fd5b612e8ff235feefb31377daf00f : luti.json
04158b609a7a488ea4ef1e5691506356a14776cf05ec8b00e0939e1135526095 : setup.py
768d1eb42d74eb53c2eb01ef03a51a602901b03ef079f6fbc387e70c2795b5c0 : update_package.py