tis-opencode icon

opencode

Silent install package for opencode

2.0.21-0

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

package           : tis-opencode
version           : 2.0.21-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      : f69742a6-e918-44b9-ba04-fa85b889c797
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-06T01:24:03.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         : K/g+tcUJF4eXdBtEJWRg8M4JYUjOAHQb4rDsraQ8ZhbkKamI5F4/3fFcoV2Ti3cyftYfEvM0Pj1Gc9tauWqlg/VtFHiZdqIO50P/J5iQkEc6NzRWpNup5VLYvfEO7QSAL6GUTLkvoS+yE12sY4cZWlU47IWJewBp35mzSQBDv9M3c+QvUBkJo9YsZA703wC7YUTx511Zp0S8oeVW6LyDsZmFxjogjZ/RxLj00g4xTsCjyGNUYwzKdfQSyYxzvGML5jl3Scz2mucPM8TPkoCsO/jJzHkptIfHBa+6qJCpX62uQt+BJEKK22fQe0WCIhbBQ+hZvIU9HG+Nxgj3Q8OuWA==

# -*- 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
f5577646000016e1f841a2f4eef13890facc2bfc67dd0bbf9360d74ecd1b2a4b : WAPT/control
2ef8d582e62e65a55adf11d09f0ef621d56592cd7e319178dff4c968aae27ba2 : WAPT/icon.png
56d32463fa66a9ef1178c7b9f84d4425aef3737a384b419fa02a7310c7f5b7c7 : luti.json
1b3323484a9d258ed277d6746ffdcffa1757faad83430edbec6ae8458ce0eacc : opencode-desktop-win-x64.exe
d374d450653074135d09994ea064dc94ccd568e56a3a50d3c0c5933706cb58e9 : setup.py
bfcc46327d848f249b07d7c87973dba01d176bed7cc64309baba3e745e441637 : update_package.py