tis-opencode icon

opencode

Paquet d'installation silencieuse pour opencode

2.0.24-0

  • package: tis-opencode
  • name: opencode
  • version: 2.0.24-0
  • maintainer: Tranquil IT, WAPT TEAM, Kevin Cherel
  • licence: ©
  • target_os: windows
  • impacted_process: OpenCode.exe
  • architecture: all
  • signature_date:
  • size: 216.42 Mo
  • homepage : https://opencode.ai/
  • depends:

package           : tis-opencode
version           : 2.0.24-0
architecture      : all
section           : base
priority          : optional
name              : opencode
categories        : 
maintainer        : Tranquil IT, WAPT TEAM, Kevin Cherel
description       : OpenCode is an open-source agent that helps you write code in your terminal, IDE, or desktop app
depends           : tis-7zip
conflicts         : 
maturity          : PROD
locale            : 
target_os         : windows
min_wapt_version  : 2.3
sources           : 
installed_size    : 
impacted_process  : OpenCode.exe
description_fr    : OpenCode est un agent open source qui vous aide à écrire du code dans votre terminal, IDE ou desktop
description_pl    : OpenCode to agent open source, który pomaga pisać kod w terminalu, IDE lub aplikacji desktopowej
description_de    : OpenCode ist ein Open-Source-Agent, der Ihnen hilft, Code in Ihrem Terminal, Ihrer IDE oder Desktop-Anwendung zu schreiben
description_es    : OpenCode es un agente de código abierto que le ayuda a escribir código en su terminal, IDE o aplicación de escritorio
description_pt    : OpenCode é um agente de código aberto que ajuda você a escrever código no terminal, IDE ou aplicativo desktop
description_it    : OpenCode è un agente open source che ti aiuta a scrivere codice nel terminale, nell'IDE o nell'applicazione desktop
description_nl    : OpenCode is een open-sourceagent die u helpt code te schrijven in uw terminal, IDE of desktoptoepassing
description_ru    : OpenCode — это агент с открытым исходным кодом, который помогает писать код в терминале, IDE или настольном приложении
audit_schedule    : 
editor            : 
keywords          : 
licence           : ©
homepage          : https://opencode.ai/
package_uuid      : d3adcca6-14ff-48b8-bf0a-dd1cd6dda50b
valid_from        : 
valid_until       : 
forced_install_on : 
changelog         : 
min_os_version    : 10.0
max_os_version    : 
icon_sha256sum    : 2ef8d582e62e65a55adf11d09f0ef621d56592cd7e319178dff4c968aae27ba2
signer            : Tranquil IT
signer_fingerprint: 8c5127a75392be9cc9afd0dbae1222a673072c308c14d88ab246e23832e8c6bb
signature_date    : 2026-10-11T12:37:35.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         : xMMx4SthQ4Q9MEGcr8/jbXc7PH3gIFIt4NfGeiUPCJZXHnCZxwQ/Qg9ZYDuzDoxB4l8agR8d7nVk7NXIFW16vwnrARpA91L+k0x0Iqj4xFGT3VzCAdy5amayPMYO8gg+TpQyHjArJ2xzguHRaZYAiDhdDko/3z8veVjG1Ay52p0AyyrIJQBtfAgbxCiTHhC/G2DZqjtrmlA4uflU70EDAo5KOwZmF25sh0fuhTb22juifVnMWMSqbLvMKGUkVfbqNLp1XEga35gnOnxkWIvyNqUOKpBkPHFdN2q0HT/94YqlB6kWqZvwMRw4do8UuG+jLvJt/Gh2Ao/IjxrYOzycog==

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

app_name = "OpenCode"

install_dir = makepath(programfiles32, app_name)
temp_dir = "OpenCode_temp"

def install():
    bin_name = glob.glob("OpenCode*.exe")[0]
    print("Installing: OpenCode Desktop")
    killalltasks(ensure_list(control.impacted_process))

    # Nettoyage d'une éventuelle ancienne installation et du repertoire temporaire
    if isdir(install_dir):
        remove_tree(install_dir)
    if isdir(temp_dir):
        remove_tree(temp_dir)

    # Extraction de l'installateur NSIS et recherche de "app-64.7z"
    print("Extracting %s" % bin_name)
    unzip_with_7zip(bin_name, temp_dir)
    app_7z = makepath(temp_dir, "$PLUGINSDIR", "app-64.7z")

    if not isfile(app_7z):
        raise Exception("OpenCode application archive not found: %s" % app_7z)

    # Extraction de l'application
    print("Extracting OpenCode application")
    unzip_with_7zip(app_7z, install_dir)

    # Nettoyage
    if isdir(temp_dir):
        remove_tree(temp_dir)

    # Raccourci
    app_exe = makepath(install_dir, "OpenCode.exe")
    create_programs_menu_shortcut(app_name, target=app_exe)

def uninstall():
    killalltasks(ensure_list(control.impacted_process))
    if isdir(install_dir):
        remove_tree(install_dir)

    remove_programs_menu_shortcut(app_name)

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

def update_package():
    # Autres sources à surveiller:
    # - https://github.com/anomalyco/opencode/releases
    package_updated = False

    proxies = get_proxies()
    if not proxies:
        proxies = get_proxies_from_wapt_console()

    app_name = control.name
    download_url = "https://opencode.ai/fr/download/stable/windows-x64-nsis"

    # Récupération du nom du binaire
    requests_result = requests.head(download_url,proxies=proxies,allow_redirects=True)
    latest_bin = requests_result.headers.get("Content-Disposition").split("\"")[1]

    # Suppression des anciens fichiers .exe
    for f in glob.glob("*.exe"):
        print("Removing: %s" % f)
        remove_file(f)

    # Téléchargement
    print("Download URL is: %s" % download_url)

    if not isfile(latest_bin):
        print("Downloading: %s" % latest_bin)
        wget(download_url, latest_bin, proxies=proxies)
    else:
        print("Binary is present: %s" % latest_bin)

    # Détermination de la version
    version = get_version_from_binary(latest_bin)

    print("Latest %s version is: %s" % (app_name, version))

    if version == "":
        print("Unable to determine binary version")
        return False

    current_version = control.get_software_version()

    if Version(version) > Version(current_version):
        print("Software version updated (from: %s to: %s)" % (current_version, version))
        package_updated = True
    else:
        print("Software version up-to-date (%s)" % Version(version))

    # Mise à jour de la version du paquet
    control.set_software_version(version)
    control.save_control_to_wapt()

    print("Update package completed successfully.")
    return package_updated

38d056ab130f7bf7c481c12636a4e9959de36561d3dfcbe54c6e3571bc0c1dc3 : WAPT/certificate.crt
b0ed3ff69376fbd32d85746a97dcb037645c592be947cf3350d5c952b5162797 : WAPT/control
2ef8d582e62e65a55adf11d09f0ef621d56592cd7e319178dff4c968aae27ba2 : WAPT/icon.png
45ed5f71260b0c6d939eac256767c4431e80983ae5420d614648e2e4eac51edd : luti.json
602d1505f2c3a739b9929b2a4ca1fb314423df4554993c6daccb1923f58a36ab : opencode-desktop-win-x64.exe
d374d450653074135d09994ea064dc94ccd568e56a3a50d3c0c5933706cb58e9 : setup.py
bfcc46327d848f249b07d7c87973dba01d176bed7cc64309baba3e745e441637 : update_package.py