tis-lm-studio icon

LM Studio

Paquet d’installation silencieuse pour LM Studio

0.4.1-3
Development
Development

Les paquets PREPROD sont des paquets construits via LUTI. Ils restent généralement 5 jours en PREPROD, après quoi un deuxième scan VirusTotal est effectué pour vérifier que le status n'a pas changé.
Si le paquet réussit ce dernier contrôle, il est promu en PROD et publié sur le store.

  • package: tis-lm-studio
  • name: LM Studio
  • version: 0.4.1-3
  • categories: Development
  • maintainer: WAPT Team,Bertrand Lemoigne
  • target_os: linux
  • impacted_process: LM Studio
  • architecture: arm64
  • signature_date:
  • size: 1.08 Go

package           : tis-lm-studio
version           : 0.4.1-3
architecture      : arm64
section           : base
priority          : optional
name              : LM Studio
categories        : Development
maintainer        : WAPT Team,Bertrand Lemoigne
description       : LM Studio is a desktop app for developing and experimenting with LLMs locally on your computer.
depends           : 
conflicts         : 
maturity          : PREPROD
locale            : 
target_os         : linux
min_wapt_version  : 2.5
sources           : 
installed_size    : 
impacted_process  : LM Studio
description_fr    : LM Studio est une application de bureau permettant de développer et d'expérimenter des modèles de langage (LLM) localement sur votre ordinateur.
description_pl    : LM Studio to aplikacja komputerowa do tworzenia i eksperymentowania z dużymi modelami językowymi (LLM) lokalnie na twoim komputerze.
description_de    : LM Studio ist eine Desktop-App zum Entwickeln und Experimentieren mit Sprachmodellen (LLMs) lokal auf Ihrem Computer.
description_es    : LM Studio es una aplicación de escritorio para desarrollar y experimentar con modelos de lenguaje (LLM) localmente en tu ordenador.
description_pt    : O LM Studio é um aplicativo de desktop para desenvolver e experimentar com modelos de linguagem (LLMs) localmente no seu computador.
description_it    : LM Studio è un'app desktop per sviluppare ed effettuare esperimenti con modelli linguistici (LLM) localmente sul tuo computer.
description_nl    : LM Studio is een desktopapp voor het ontwikkelen en experimenteren met taalmodellen (LLM's) lokaal op je computer.
description_ru    : LM Studio — это настольное приложение для разработки и экспериментов с языковыми моделями (LLM) локально на вашем компьютере.
audit_schedule    : 
editor            : 
keywords          : 
licence           : 
homepage          : 
package_uuid      : a6831c8b-4c6e-493c-bee8-4ddd24308090
valid_from        : 
valid_until       : 
forced_install_on : 
changelog         : 
min_os_version    : 
max_os_version    : 
icon_sha256sum    : 2e42597e5bfb096509f57f47bb6a208900325c6d3d5d63b4b458efc13b1bdf4e
signer            : test
signer_fingerprint: b82fc8ef4a4475c0f69ac168176c2bfc58f572eb716c4eadd65e4785c155dd8e
signature_date    : 2026-01-30T21:33:40.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         : hVzFe55xppoCZVzR8B/tgtUPjT2J0FJ9i/H4segwytdHiUeY3fG4x2GGAE98p5NxyOeaZjLILseGVfpq8Oi6VZQy4oO43YgpaLWDxbDeAuSks30xx5cDd9V8A0X+JIA5batdCTtl/YLb5hrD3lVXU21/FZPIpU6DSthsgM+vFlDg6YobkLfnyLKEEzN4K3SqKkbxrRbklCyzF5LIQbSr28+yA1VQnr1H0LFx3GOThfmy+Fo7Mu4+PBlDJ//jE3VWA18T4PjTCaZXGmAGcmTaF028qHRuQT0i+CP4BEZ5tnN+g5NDwu/daaO4R98n7+rDbgcAxWGqNvWwSrP6hyGTjQ==

# -*- coding: utf-8 -*-
from setuphelpers import *
from iniparse import ConfigParser
import os


def install():
    install_dir = makepath('/','opt',control.package.split('-',1)[1])
    appimage = glob.glob("*arm64.AppImage")[0]

    if is_debian_based():
        install_apt("zlib1g-dev")
    elif is_redhat_based():
        install_rpm("zlib")

    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 *


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
    
    base_url_download = "https://lmstudio.ai/download/latest"
    os_download_dict = {
        'windows-x64': '/win32/x64',
        'windows-arm': '/win32/arm64',
        'darwin-arm': '/darwin/arm64',
        'linux-x64': '/linux/x64',
        'linux-arm64': '/linux/arm64',
    }

    os_type = control.target_os + "-" + ensure_list(control.architecture)[0]
    download_url = requests.head(f"{base_url_download}{os_download_dict[os_type]}", proxies=proxies).headers['Location']
    latest_bin = download_url.rsplit('/', 1)[-1]
    latest_bin_extension = latest_bin.rsplit('.', 1)[-1]
    version = latest_bin.split('-')[2]

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

    # 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

e1f78d37209e504ef6bb928425f4d075fc416ca85fc2d8a1a8d9694060f644c5 : LM-Studio-0.4.1-1-arm64.AppImage
01ca7fe94636e5a08fcb73849d3b5df25d51e2c82f4dd1a08f01798b25899819 : WAPT/certificate.crt
7860c2e24f29c1b3389b33a8581940fa844d9a92215c65360ecb803045041ac8 : WAPT/control
2e42597e5bfb096509f57f47bb6a208900325c6d3d5d63b4b458efc13b1bdf4e : WAPT/icon.png
3efdc399ee0cf83c82c930286009284fe7c1d0edf1d0fa17e0c32723f0352857 : luti.json
f4fbf6451c8c82f0de49d7061f6c99d19129580b369a41eadee6e0289b46d527 : setup.py
c39c9f0ccac2427f3fe84e003d773025fd751b2cdafb0c4e6ca9b714a84469ba : update_package.py