tis-notepadnext icon

NotepadNext

Silent install package for NotepadNext

0.15-1
Office
Development
Office
Development

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-notepadnext
  • name: NotepadNext
  • version: 0.15-1
  • categories: Office,Development
  • maintainer: WAPT Team,Tranquil IT,Jofrey Le Piquet,Stan SALOMON
  • editor: dail8859
  • licence: opensource, GPLv3
  • target_os: linux
  • impacted_process: NotepadNext
  • architecture: x64
  • signature_date:
  • size: 36.10 Mo
  • homepage : https://github.com/dail8859/NotepadNext

package           : tis-notepadnext
version           : 0.15-1
architecture      : x64
section           : base
priority          : optional
name              : NotepadNext
categories        : Office,Development
maintainer        : WAPT Team,Tranquil IT,Jofrey Le Piquet,Stan SALOMON
description       : A cross-platform, reimplementation of Notepad++.
depends           : 
conflicts         : 
maturity          : PREPROD
locale            : 
target_os         : linux
min_wapt_version  : 2.5
sources           : https://github.com/dail8859/NotepadNext/releases
installed_size    : 
impacted_process  : NotepadNext
description_fr    : Une réimplémentation multiplateforme de Notepad++.
description_pl    : Wieloplatformowa reimplementacja Notepad++.
description_de    : Eine plattformübergreifende Neuimplementierung von Notepad++.
description_es    : Una reimplementación multiplataforma de Notepad++.
description_pt    : Uma reimplementação multiplataforma do Notepad++.
description_it    : Una reimplementazione multipiattaforma di Notepad++.
description_nl    : Een cross-platform herimplementatie van Notepad++.
description_ru    : Кроссплатформенная реализация Notepad++.
audit_schedule    : 
editor            : dail8859
keywords          : notepadnext, notepad++,plus,cross-platform,text,editor
licence           : opensource, GPLv3
homepage          : https://github.com/dail8859/NotepadNext
package_uuid      : 02790375-2c63-4534-b837-4fd9e9c9d588
valid_from        : 
valid_until       : 
forced_install_on : 
changelog         : https://github.com/dail8859/NotepadNext/releases
min_os_version    : 
max_os_version    : 
icon_sha256sum    : 4a310b55f8d8270b07236df09dfa7c437017f80f2a19488e7ce566722e59c662
signer            : test
signer_fingerprint: b82fc8ef4a4475c0f69ac168176c2bfc58f572eb716c4eadd65e4785c155dd8e
signature_date    : 2026-11-20T15:17:08.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         : T7GFKY9R6DRJ6wGwN2bCkCP91sz3VB/Lbb9RFNEZoTJhUWXKFuPf3weXr8F9jhd4MatLhYKCoC5Xrft3fE07ShmaNfwBBikZysVmD4JiTwYxTypn3TSTZ3t3BrRJ+Nl0UFA3EqK2x/ellsZdUbLzwkVG8UNiY/qBEW1BfQ1p/YCuE7k7sLbq9xI7WoWshkugdg4Dk9HFWYZFKEY/Asdbg2lXt/8OjWHG5uAfvg+H9opte5FPVRZbxfQQuMORYCcYWsLS0xum5ph2D2dMXFmjoyyDZ/YBBkxAxaY690H2QKqY5SZJZqFGOb5gGMIgydJzxXd8DsrEWKXiNC8cSi/a/A==


# -*- 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')
        new_icon = install_dir + '/' + srcicon.split('/')[-1]
        filecopyto(srcicon,new_icon)

        desktop_cp.set('Desktop Entry',"Exec",newbin_path)
        desktop_cp.set('Desktop Entry',"Icon",new_icon)        
        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 waptlicences

def update_package():
    # Declaring local variables
    package_updated = False
    proxies = get_proxies()
    if not proxies:
        proxies = get_proxies_from_wapt_console()
    app_name = control.name

    os_dict = {
        "windows-x64": "-Installer.exe",
        "windows-arm64": "-Installer-arm64.exe",
        "darwin-x64": "-x64.dmg",
        "darwin-arm": "-arm64.dmg",
        "linux-x64": "-x86_64.AppImage"
    }

    repo = "dail8859/NotepadNext"
    api_url = f"https://api.github.com/repos/{repo}/releases/latest"
    
    print("API used is: %s" % api_url)
    json_load = wgets(api_url, proxies=proxies, as_json=True)
    version = json_load["tag_name"].replace("v", "")

    os_type = control.target_os + "-" + ensure_list(control.architecture)[0]

    print(f"Latest {app_name} version is: {version}")

    for to_download in json_load["assets"]:
        if to_download["name"].endswith(os_dict[os_type]):
            download_url = to_download["browser_download_url"]
            latest_bin = to_download["name"]
            latest_bin_extension = latest_bin.rsplit('.', 1)[-1]
            break

    # Downloading latest binaries
    print(f"Download URL is: {download_url}")
    if isfile(latest_bin):
        remove_file(latest_bin)

    print(f"Downloading: {latest_bin}")
    wget(download_url, latest_bin, proxies=proxies)
    print(f"Binary is present: {latest_bin}")

    # Changing version of the package
    if Version(version) > Version(control.get_software_version()):
        print(f"Software version updated (from: {control.get_software_version()} to: {Version(version)})")
        package_updated = True
    else:
        print(f"Software version up-to-date ({Version(version)})")

    for f in glob.glob(f'*.{latest_bin_extension}'):
        if f != latest_bin:
            remove_file(f)

    control.set_software_version(version)
    control.save_control_to_wapt()

    return package_updated

33e092fb52fb4f8bdbe57c63ac14104a5e092ce5c614040a1dd322eebc44aa87 : NotepadNext-v0.15-x86_64.AppImage
01ca7fe94636e5a08fcb73849d3b5df25d51e2c82f4dd1a08f01798b25899819 : WAPT/certificate.crt
1c711a1a08f5c2103fafb698ef641967be536b498fd89bf4a15434957dfaafad : WAPT/control
4a310b55f8d8270b07236df09dfa7c437017f80f2a19488e7ce566722e59c662 : WAPT/icon.png
01ffacaffe5f1ddaf61103fe1efc665c657d470724e63661e36d4f0545429d75 : luti.json
cdd138039f331f99f9892c0d1761fa50883579eaccbfe09ea0d093489eee4c2d : setup.py
6c9460779dd896a81d141756f18267f599f1e9ed58d66e8162a4621c7ab9702f : update_package.py