tis-xournal

1.2.8-2
Xournal++ is an open source, cross-platform note-taking software that is fast, flexible and functional
819 downloads

See build result
tis-xournal icon
  • package : tis-xournal
  • name : Xournal++
  • version : 1.2.8-2
  • categories :
  • maintainer : Jordan ARNAUD
  • editor :
  • licence : open source
  • locale : all
  • target_os : linux
  • impacted_process :
  • architecture : x64
  • signature_date : 2025-09-05 12:41
  • size : 37.96 Mo
  • homepage : https://xournalpp.github.io/
package           : tis-xournal
version           : 1.2.8-2
architecture      : x64
section           : base
priority          : optional
name              : Xournal++
categories        : 
maintainer        : Jordan ARNAUD
description       : Xournal++ is an open source, cross-platform note-taking software that is fast, flexible and functional
depends           : 
conflicts         : 
maturity          : PREPROD
locale            : all
target_os         : linux
min_wapt_version  : 2.3
sources           : https://github.com/xournalpp/xournalpp
installed_size    : 
impacted_process  : 
description_fr    : Xournal++ est un logiciel de prise de notes open source et multiplateforme rapide, flexible et fonctionnel
description_pl    : Xournal++ to otwarte, wieloplatformowe oprogramowanie do tworzenia notatek, które jest szybkie, elastyczne i funkcjonalne
description_de    : Xournal++ ist eine schnelle, flexible und funktionale Open-Source- und plattformübergreifende Notiz-Software
description_es    : Xournal++ es un software de código abierto y multiplataforma para tomar notas, rápido, flexible y funcional
description_pt    : O Xournal++ é um software de anotações de fonte aberta e multiplataforma que é rápido, flexível e funcional
description_it    : Xournal++ è un software open source multipiattaforma per prendere appunti, veloce, flessibile e funzionale
description_nl    : Xournal++ is een open source, cross-platform notitiesoftware die snel, flexibel en functioneel is
description_ru    : Xournal++ - это кроссплатформенное программное обеспечение для ведения заметок с открытым исходным кодом, быстрое, гибкое и функциональное
audit_schedule    : 
editor            : 
keywords          : 
licence           : open source
homepage          : https://xournalpp.github.io/
package_uuid      : 80fbec7c-5f5a-4de1-8b84-9d44b1906b64
valid_from        : 
valid_until       : 
forced_install_on : 
changelog         : https://github.com/xournalpp/xournalpp/blob/master/CHANGELOG.md
min_os_version    : 
max_os_version    : 
icon_sha256sum    : 9b5dc08f12257bc882402d80b81bfa11a67ac526d5d9b3e932dee13e6e5ea52b
signer            : test
signer_fingerprint: b82fc8ef4a4475c0f69ac168176c2bfc58f572eb716c4eadd65e4785c155dd8e
signature_date    : 2025-09-05T12:41:12.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         : RIiG3BOrO7herYORIEXflhh58+yZ64IKVrRUyFDsH9iOpwhdl5IkOEzXZe7xI+3OxE+9gUAlClhYNx8TAFyivam+Hq71OJIbsVwIPxPkt8uPNQlRTXlcqrt4bL+XzYnlTJSA20RxGyLfDlI0sHRWi0AiLqp5SisbT9K6GyHykmiBOiVSrYlQ/4v1ztbEXY63BHIWbQn+10glRYsL6oqhdTL8gtLzpgk6RSN/BNDdBE96BWW0nslq1BemXY/Y+4nuU3NlRQ2FPC+Q1/8LuAlWL/s0XaZlqQhCcUaAJRDQ6LHd2UkPvROi9JogJHDZSvfENbvAPRk8qboMd56YFPoq6A==
# -*- 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 *
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 -*-
from setuphelpers import *
import re


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/xournalpp/xournalpp/releases/latest"

     # Get data from API
    releases_dict = wgets(api_url, proxies=proxies, as_json=True)
    zip_found = False  # Flag pour indiquer la découverte d'un fichier .zip
    #target_extension = control.target_os + ".zip"
    for release in releases_dict:
        if zip_found:
            break
        for asset in releases_dict["assets"]:
            if asset["browser_download_url"].endswith("x86_64.AppImage"):
                url_download = asset["browser_download_url"]
                latest_bin = url_download.split('/')[-1]
                last_version = releases_dict["name"][10:]
                zip_found = True  # Mettre à jour le flag pour indiquer qu'un .zip a été trouvé
                break


   
    # Deleting binaries
    for f in glob.glob("*.AppImage"):
        if f != latest_bin:
            remove_file(f)


    # Downloading latest binaries
    print("Download URL is: %s" % url_download )
    if not isfile(latest_bin):
        print("Downloading: %s" % latest_bin)
        wget(url_download , latest_bin, proxies=proxies)
    else:
        print("Binary is present: %s" % latest_bin)
    
    # Updating the package
    control.set_software_version(last_version)
    control.save_control_to_wapt()

    return package_updated
01ca7fe94636e5a08fcb73849d3b5df25d51e2c82f4dd1a08f01798b25899819 : WAPT/certificate.crt
5494373ced5d7e9bff83efd679f71bf24994fc4ab3b928be4b5978d6232ea43b : WAPT/control
9b5dc08f12257bc882402d80b81bfa11a67ac526d5d9b3e932dee13e6e5ea52b : WAPT/icon.png
04c6b84f5f02ca4ed1564eaabfcc01249e2a0154fe39bcc4e18b6a65d0d34240 : luti.json
223fa6ca0b4ed15f7d1a2e29893619511e043c7907d145e8c8991405677bb4e1 : setup.py
6c889c5028a861c90df43c96f4d433c125ad6ade3fefad11d78e21241588c912 : update_package.py
baba26bfca72b56f09aaadd0845d31a93a8371432e58b33f0a22238549ea1636 : xournalpp-1.2.8-x86_64.AppImage