tis-lm-studio icon

LM Studio

Paquet d’installation silencieuse pour LM Studio

0.4.1-2
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-2
  • categories: Development
  • maintainer: WAPT Team,Bertrand Lemoigne
  • target_os: linux
  • impacted_process: LM Studio
  • architecture: x64
  • signature_date:
  • size: 1.05 Go

package           : tis-lm-studio
version           : 0.4.1-2
architecture      : x64
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      : f1967ed3-2bbd-46ba-9b9f-c244398f3658
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:37.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         : BIjxaBgkETy8eiIiG+ewScfCgdr9wropPAzZW3WFS2O25Hg993HPN1X+sH3M8RT3O2TKDCw1lqHuzyKKNCBMfmTN6VmzJxt59As1m6WfadKtbFuuExc4DOLq0OxiKeLuvqvjCxU7+vOCqwkn7dTc/HU1PxnnIkmaYBVvuMvH6VirCu/c7UOivdRax07Gx7WiJZ7KwNOm2i3FcfDIfPCJlayQFQThwx2tcSgQd+BvFRIwyEUGfVbCjhIDKo64wIgK+EgkouqflIE0bcvl6qWt5sOivkydXoPITPuF3X2FxllrsvyVVkzWELDWnxFqkl7oI5J7VJkdXMckuVg7sggM1g==

# -*- 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("*x64.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 *


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

d18e178cadef7d6798f19e6d41f33a297e26a1d285091cbc30da8252d18a46f0 : LM-Studio-0.4.1-1-x64.AppImage
01ca7fe94636e5a08fcb73849d3b5df25d51e2c82f4dd1a08f01798b25899819 : WAPT/certificate.crt
9d028cb926968234562f5d5d3fc2fe892bbe5fd44baa0ef6b20f9614a6f51696 : WAPT/control
2e42597e5bfb096509f57f47bb6a208900325c6d3d5d63b4b458efc13b1bdf4e : WAPT/icon.png
faab0eae3a30f580a264328fc087e61a4a9b1f24cabfb9724dce0c84446cb616 : luti.json
a545345e9cb101fb268b725a54212a39e12b0e6b5bce1ea1bed70d9fcb3967b3 : setup.py
c39c9f0ccac2427f3fe84e003d773025fd751b2cdafb0c4e6ca9b714a84469ba : update_package.py