tis-jan icon

Jan

Silent install package for Jan

0.5.14-0

  • package: tis-jan
  • name: Jan
  • version: 0.5.14-0
  • categories: Utilities
  • maintainer: WAPT Team,Tranquil IT,Jimmy PELÉ
  • licence: opensource_free,cpe:/a:gnu:agpl_v3,wapt_public
  • target_os: debian_based
  • architecture: x64
  • signature_date:
  • size: 812.34 Mo

package           : tis-jan
version           : 0.5.14-0
architecture      : x64
section           : base
priority          : optional
name              : Jan
categories        : Utilities
maintainer        : WAPT Team,Tranquil IT,Jimmy PELÉ
description       : Jan - Bring AI to your Desktop
depends           : 
conflicts         : 
maturity          : PROD
locale            : 
target_os         : debian_based
min_wapt_version  : 2.3
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           : opensource_free,cpe:/a:gnu:agpl_v3,wapt_public
homepage          : 
package_uuid      : d6b5312b-7f26-4f9c-943d-9541e15f683d
valid_from        : 
valid_until       : 
forced_install_on : 
changelog         : 
min_os_version    : 
max_os_version    : 
icon_sha256sum    : 5f9aa2aaa342d6a7468a65ff28ae30917eb3c88ee0e9cf27734175d5dc0a73ce
signer            : Tranquil IT
signer_fingerprint: 8c5127a75392be9cc9afd0dbae1222a673072c308c14d88ab246e23832e8c6bb
signature_date    : 2025-01-28T04:15:46.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         : QVGS8m3RlkKpnjhnGIiIf7xdHiZ6RnfN2HqXOa1EbAJ0m+8g8WUT4dB/Dzm4/cyavIV7E71xpPxvhNVvggaCZn7nDMMaWaXAbAPDSOOD0Eaj6BHlV2z0Sni21CO37lYrQJJY62Jxb5VBNbUvnYMr1Th7eyQdE1l2HWilBSHeA1H7Gvpg8H0fOE4jVFSYU/6PIr9O6C20YgdWPAti33UNyQzqXRSZepat6tJK7Q7raVxyeLAgvkK0fz2Q7rLrlfgnPgXNx4hkFPOegQk3tOHLfrW0ybKsM7G7Yu2XAS2nTtPDKE4KDZ/ebxbQ9vWhPMX7azucR+RCQ/x/0zNlj1yU6w==

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


def install():
    bin_name = glob.glob("jan-linux-amd64-*.deb")[0]
    install_deb(bin_name)


def uninstall():
    uninstall_apt("jan")
    autoremove_apt()

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


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/janhq/jan/releases/latest"
    update_dict = {
        "bin_contains": {
            "windows": ".exe",
            "debian_based": ".deb",
        },
    }

    # Getting latest version information from official sources
    print("API used is: %s" % api_url)
    json_load = wgets(api_url, proxies=proxies, as_json=True)
    version = json_load["tag_name"].replace("v", "").replace(".windows", "")
    for to_download in json_load["assets"]:
        if update_dict["bin_contains"][control.target_os] in to_download["name"]:
            download_url = to_download["browser_download_url"]
            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)

    # Deleting outdated binaries
    remove_outdated_binaries(latest_bin)
    # arch_list = ensure_list(control.architecture)
    # remove_outdated_binaries(version, filename_contains=("x64" if "x64" in arch_list else "x86" if "x86" in arch_list else []))

    # Checking version from file
    if get_os_name() == "Windows" and "windows" in control.target_os.lower():
        version_from_file = get_version_from_binary(latest_bin)
        if Version(version_from_file, 4) == Version(version, 4):
            print(f"INFO: Binary file version ({version_from_file}) corresponds to online version ({version})")
        else:
            error(f"ERROR: Binary file version ({version_from_file}) do NOT corresponds to online version ({version})")

    # Changing version of the package
    if Version(version, 4) > Version(control.get_software_version(), 4):
        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()

    # Validating update-package-sources
    return package_updated

    # # Changing version of the package and validating update-package-sources
    # return complete_control_version(control, version)

38d056ab130f7bf7c481c12636a4e9959de36561d3dfcbe54c6e3571bc0c1dc3 : WAPT/certificate.crt
1d9a54127c2b394e7a108765543c9dc99e1429b754e925dddedcb54facf6ca03 : WAPT/control
5f9aa2aaa342d6a7468a65ff28ae30917eb3c88ee0e9cf27734175d5dc0a73ce : WAPT/icon.png
c190e3d1f0994a1fa7f0ee259babac65ba5a410c04f36a601581af62b0910ffa : jan-linux-amd64-0.5.14.deb
4f0f14e3d27a15005ed8088d691336cee807b26645f1ba26476cdc65e90f6ab2 : luti.json
5bb8d529b9a4b8005c7812b7aa7e19890d03974123b07087382a9a19a862df17 : setup.py
6da060420c5784e9930a65fc622626dc85f57c2bf8b8f497c8586fa35967baff : update_package.py