tis-lm-studio icon

LM Studio

Silent install package for LM Studio

0.3.33-2
Development
Development

Preprod packages are packages built on LUTI. They remain in PREPROD usually for 5 days, after which a new VirusTotal scan is performed.
If the package passes this last check, it is promoted to PROD and published on the store.

  • package: tis-lm-studio
  • name: LM Studio
  • version: 0.3.33-2
  • categories: Development
  • maintainer: WAPT Team,Bertrand Lemoigne
  • target_os: linux
  • impacted_process: LM Studio
  • architecture: x64
  • signature_date:
  • size: 1.03 Go

package           : tis-lm-studio
version           : 0.3.33-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      : 370e24c6-f8ad-41a4-9bf9-64a5d7b5e5eb
valid_from        : 
valid_until       : 
forced_install_on : 
changelog         : 
min_os_version    : 
max_os_version    : 
icon_sha256sum    : 2e42597e5bfb096509f57f47bb6a208900325c6d3d5d63b4b458efc13b1bdf4e
signer            : test
signer_fingerprint: b82fc8ef4a4475c0f69ac168176c2bfc58f572eb716c4eadd65e4785c155dd8e
signature_date    : 2025-12-02T18:02:41.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         : mdlJsA5nsAVGkwcNifKBKXVm7JMWu91kNzGSPTGhSfjLq9F9PvuzxopvITeLtEXHJC0rI8Y6d2y32veGsfIfH8mmufj0NERODkf1y/m0yXg2VqYWhPMP3/X6bNeYCZKTTRiy9ZURNhxeEL37AF39FolckroEdML7aGgtwmbd1rYq83f+cOC9Wh7BCLzl7aZOuQBG4tFLdr35a40/DonYVOKYnPfdUUzJ3EUs/vOFbn+FisPpHh07U/+RC2kxUOjWxoYdOjx3d5iUWDsaDTos4+5NHgNCILBrNX8xWnenBgLm97DHfG+uhLXHVnNdKtMTpnzjhNSD5FYf0eC/iBy4Dw==

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

2b7e90f13bd20c57583ed01bcf6a95e1ad7ead4bdc07cfb0dfcef722f7a80e86 : LM-Studio-0.3.33-1-x64.AppImage
01ca7fe94636e5a08fcb73849d3b5df25d51e2c82f4dd1a08f01798b25899819 : WAPT/certificate.crt
0d651206172fbc07938a4524f767ba217c08a9240cca7100d465643934eb578f : WAPT/control
2e42597e5bfb096509f57f47bb6a208900325c6d3d5d63b4b458efc13b1bdf4e : WAPT/icon.png
6d692b2175202516fe838b58f677c72a3714efaaf4bfea45223804998453e8f8 : luti.json
a545345e9cb101fb268b725a54212a39e12b0e6b5bce1ea1bed70d9fcb3967b3 : setup.py
c39c9f0ccac2427f3fe84e003d773025fd751b2cdafb0c4e6ca9b714a84469ba : update_package.py