tis-cursor icon

Cursor

Silent install package for Cursor

1.7.46-1
Development
Development

  • package: tis-cursor
  • name: Cursor
  • version: 1.7.46-1
  • categories: Development
  • maintainer: WAPT Team,Tranquil IT,Flavien SCHELFAUT
  • editor: Anysphere
  • locale: all
  • target_os: linux
  • impacted_process: Cursor
  • architecture: arm64
  • signature_date:
  • size: 178.67 Mo
  • homepage : https://cursor.com/

package           : tis-cursor
version           : 1.7.46-1
architecture      : arm64
section           : base
priority          : optional
name              : Cursor
categories        : Development
maintainer        : WAPT Team,Tranquil IT,Flavien SCHELFAUT
description       : Cursor is a modern IDE built on VS Code, integrating AI to generate, explain, and fix code. It boosts development speed with smart, context-aware assistance.
depends           : 
conflicts         : 
maturity          : PROD
locale            : all
target_os         : linux
min_wapt_version  : 2.5
sources           : 
installed_size    : 
impacted_process  : Cursor
description_fr    : Cursor est un IDE moderne basé sur VS Code, intégrant une IA pour générer, expliquer et corriger le code. Il accélère le développement grâce à une assistance intelligente et contextuelle.
description_pl    : Cursor to nowoczesne IDE oparte na VS Code, integrujące sztuczną inteligencję do generowania, wyjaśniania i naprawiania kodu. Przyspiesza rozwój dzięki inteligentnej i kontekstowej pomocy.
description_de    : Cursor ist eine moderne IDE auf Basis von VS Code, die KI integriert, um Code zu generieren, zu erklären und zu korrigieren. Sie beschleunigt die Entwicklung durch intelligente, kontextbezogene Unterstützung.
description_es    : Cursor es un IDE moderno basado en VS Code que integra IA para generar, explicar y corregir código. Acelera el desarrollo con asistencia inteligente y contextual.
description_pt    : Cursor é um IDE moderno baseado no VS Code, integrando IA para gerar, explicar e corrigir código. Ele acelera o desenvolvimento com assistência inteligente e contextual.
description_it    : Cursor è un IDE moderno basato su VS Code che integra l'IA per generare, spiegare e correggere il codice. Accelera lo sviluppo grazie a un'assistenza intelligente e contestuale.
description_nl    : Cursor is een moderne IDE gebaseerd op VS Code, met geïntegreerde AI om code te genereren, uitleggen en corrigeren. Het versnelt de ontwikkeling met slimme, contextuele assistentie.
description_ru    : Cursor — это современная IDE на основе VS Code, интегрирующая ИИ для генерации, объяснения и исправления кода. Она ускоряет разработку благодаря умной и контекстной помощи.
audit_schedule    : 
editor            : Anysphere
keywords          : cursor,ide,integrated,development,environment
licence           : 
homepage          : https://cursor.com/
package_uuid      : 2ad57190-d1b0-4a78-9063-2d49d469d0b3
valid_from        : 
valid_until       : 
forced_install_on : 
changelog         : https://cursor.com/changelog
min_os_version    : 
max_os_version    : 
icon_sha256sum    : 9cba6454810418fa31660e69ced09aa546f75bcfd3d873a4414f250694fa623c
signer            : Tranquil IT
signer_fingerprint: 8c5127a75392be9cc9afd0dbae1222a673072c308c14d88ab246e23832e8c6bb
signature_date    : 2025-10-20T18:17:59.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         : WmNsRhuXWVxqPlXowK9ynVBXorl6/C8l21E1hlAr5UZdTJA3hD8hrO3ypbp4BMn5iJRU3xl2X61bx62LdxlqMfip7j3maW5V7HWY2W9p1Ob3MJc+yuxa57gM/33Twi6UZgy5lOvtZgfXoNzRdBb3GE09H2Pi8cU0R6ZW2p4MwxhIKc92cnUA/pA6KzNBDACh5FsR2OL1QsEkaY5bwdMcgFEdHjobadyBX6qAI1zDm2CymRjU67eSuVqlcKJfxnplZUWAcYRaatSx+i2XIPJpzV6pPHuIeMou6MP/G4NDQQlB33Y0k+pF8d9QvwUTuwUwcH+l/UMlxygKQEOk9psyVw==

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


def install():
    install_dir = makepath('/','opt',control.package.split('-',1)[1])
    appimage = glob.glob("*.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')
        new_icon = install_dir + '/' + srcicon.split('/')[-1]
        filecopyto(srcicon,new_icon)

        desktop_cp.set('Desktop Entry',"Exec",newbin_path)
        desktop_cp.set('Desktop Entry',"Icon",new_icon)        
        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 *
from setupdevhelpers 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

    os_dict = {
        'windows-x64': 'win32-x64',
        'windows-arm64': 'win32-arm64',
        'darwin-arm': 'darwin-arm64',
        'darwin-x64': 'darwin-x64',
        'linux-x64': 'linux-x64',
        'linux-arm64': 'linux-arm64',
    }

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

    user_agent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Cursor/1.7.43 Chrome/132.0.6834.210 Electron/34.5.8 Safari/537.36"
    latest_version = f"https://api2.cursor.sh/updates/download/golden/{os_dict[os_type]}/cursor/latest"
    download_url = requests.head(latest_version, proxies=proxies, headers={'User-agent': user_agent}).headers['location']

    latest_bin = download_url.rsplit('/', 1)[-1]
    latest_bin_extension = latest_bin.rsplit('.', 1)[-1]
    version = latest_bin.split('-')[1]

    # 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

1f9f03d752f13f2dba895f4c5341b38a072104cb120b544e94c3c83178c13b18 : Cursor-1.7.46-aarch64.AppImage
38d056ab130f7bf7c481c12636a4e9959de36561d3dfcbe54c6e3571bc0c1dc3 : WAPT/certificate.crt
b8105b8feee0391cfb824dc30cb8bfeec24863091056d7c86e1e5cc52c12f5b5 : WAPT/control
9cba6454810418fa31660e69ced09aa546f75bcfd3d873a4414f250694fa623c : WAPT/icon.png
c9d21679182a03181aa664ee1cf74fc206599c578d20185eaae3c12c48f409e9 : luti.json
00ae1ed1d79c947842ba2de3240a3b335ecbea6c4438acda634a0169fabb1042 : setup.py
4e57e0ea91fdca936198baf5c0e34015c19a04cbca2c7d74ff51129339083b75 : update_package.py