tis-jan icon

Jan

Paquet d’installation silencieuse pour Jan

0.6.5-4

  • package: tis-jan
  • name: Jan
  • version: 0.6.5-4
  • categories: Utilities
  • maintainer: WAPT Team,Tranquil IT,Jimmy PELÉ
  • target_os: windows
  • impacted_process: Jan.exe
  • architecture: x64
  • signature_date:
  • size: 409.55 Mo
  • installed_size: 2.89 Go
  • depends:

package           : tis-jan
version           : 0.6.5-4
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           : tis-7zip
conflicts         : 
maturity          : PROD
locale            : 
target_os         : windows
min_wapt_version  : 2.4
sources           : 
installed_size    : 2888863744
impacted_process  : Jan.exe
description_fr    : Jan - L'IA sur votre bureau
description_pl    : Jan - Przenieś sztuczną inteligencję na swój pulpit
description_de    : Jan - Bringen Sie AI auf Ihren Desktop
description_es    : Jan - Lleve la IA a su escritorio
description_pt    : Jan - Traga a IA para o seu ambiente de trabalho
description_it    : Jan - Porta l'intelligenza artificiale sul tuo desktop
description_nl    : Jan - Breng AI naar je desktop
description_ru    : Jan - Привнесите искусственный интеллект на рабочий стол
audit_schedule    : 
editor            : 
keywords          : 
licence           : 
homepage          : 
package_uuid      : ab98b6dc-438a-4193-8cc1-9c3d3ea7feac
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-07-19T10:01:06.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         : N5SWU5nquqndfJzGQ2kt1cm31AtzjBHl3jorErn9mze/lMQglh9tbwCb5TNUozyAlBWQiRSuLLFEGyA6dPURS/SmDh0PYoTgvEdjKDFegylKZ5R6fUpm0ioJsLi5tsekF/uc5JbDtjOtmmg/XBGqdpaGbh6DJggfvfNlVAk26V3nT4zL250IHuL/EYLyVPk6Vl6kBCI84cbP4TgmkvwX3+dQeygdlMSZW2NL3xZJ525DTPTEHDUAJta8ULnVjIJLvEB6KRAFAIO4K4dew2OrhdaUGtHTJwiEjyIRIob/pF3bihFdZt4EABvSPqG3MjxApdEidQ7YgEA5d45dx1635w==

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

app_name = "Jan"
app_dir = makepath(programfiles64, "Jan")
app_path = makepath(programfiles64, "Jan", "Jan.exe")

def get_installed_version(app_path):
    return get_file_properties(app_path).get("FileVersion", "")

def install():
    bin_name = glob.glob("Jan_*.exe")[0]
    bin_path = makepath(basedir, "Jan")
    unzip_with_7zip(bin_name, app_dir)

    create_desktop_shortcut(app_name, target=app_path)
    create_programs_menu_shortcut(app_name, target=app_path)

def session_setup():
    jan_dir_path_user = makepath(user_appdata, "Jan")
    jan_config_path_user = makepath(jan_dir_path_user, "config.json")

    current_conf = {}
    if isfile(jan_config_path_user):
        current_conf = json_load_file(jan_config_path_user)
    
    current_conf["migrated_version"] = control.get_software_version()

    if not isdir(jan_dir_path_user):
        mkdirs(jan_dir_path_user)
        
    json_write_file(jan_config_path_user, current_conf)

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

    api_url = "https://api.github.com/repos/janhq/jan/releases/latest"

    # 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", "")

    update_dict = {
        "windows-x64": f"Jan_{version}_x64-setup.exe",
    }

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

    for to_download in json_load["assets"]:
        if to_download["name"] == update_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"Latest {app_name} version is: {version}")
    print(f"Download URL is: {download_url}")
    if not isfile(latest_bin):
        print(f"Downloading: {latest_bin}")
        wget(download_url, latest_bin, proxies=proxies)
    else:
        print(f"Binary is present: {latest_bin}")

    expected_issuer = "Menlo Research Pte. Ltd."
    sign_name = waptlicences.check_msi_signature(latest_bin)[0]
    if sign_name != expected_issuer:
        error(f'Bad issuer {sign_name} != {expected_issuer} ')

    # 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

4d209b3b03888f0074cc7abbfab09bc1b219f46c3449cae3159d1137a969a42a : Jan_0.6.5_x64-setup.exe
38d056ab130f7bf7c481c12636a4e9959de36561d3dfcbe54c6e3571bc0c1dc3 : WAPT/certificate.crt
6d939c995540af949c7a05d0915ed65655f9823e413b2b8a42618fa93c1503ae : WAPT/control
5f9aa2aaa342d6a7468a65ff28ae30917eb3c88ee0e9cf27734175d5dc0a73ce : WAPT/icon.png
0e6902420bd9879a8022e21e2420edc4762081cb0b19d20d8f855701fa41326f : luti.json
a5226b0ee13f453c3c02bfbd39b35d0b979b31ff760ff98727193b0aa1aa775b : setup.py
836175a278442dbce454c2503a69d4d9998d7b4639f89392e7b82626707a3ae9 : update_package.py