tis-thebrain icon

TheBrain

Silent install package for TheBrain

14.0.113.0-4
Utilities
Utilities

  • package: tis-thebrain
  • name: TheBrain
  • version: 14.0.113.0-4
  • categories: Utilities
  • maintainer: WAPT Team,Tranquil IT,Amel FRADJ
  • licence: proprietary_free,wapt_private
  • target_os: mac
  • impacted_process: TheBrain
  • architecture: all
  • signature_date:
  • size: 209.53 Mo
  • homepage : https://www.thebrain.com/

package           : tis-thebrain
version           : 14.0.113.0-4
architecture      : all
section           : base
priority          : optional
name              : TheBrain
categories        : Utilities
maintainer        : WAPT Team,Tranquil IT,Amel FRADJ
description       : TheBrain organizes and finds everything the way you think it is
depends           : 
conflicts         : 
maturity          : PROD
locale            : 
target_os         : mac
min_wapt_version  : 2.3
sources           : 
installed_size    : 
impacted_process  : TheBrain
description_fr    : TheBrain organisez et trouvez tout comme vous le pensez
description_pl    : TheBrain organizuje i znajduje wszystko tak, jak myślisz
description_de    : TheBrain organisieren und finden Sie alles so, wie Sie es sich vorstellen
description_es    : TheBrain organiza y encuentra todo como tú crees
description_pt    : TheBrain organiza e encontra tudo da forma como pensa que está
description_it    : TheBrain organizza e trova tutto nel modo in cui pensate che sia
description_nl    : TheBrain organiseert en vindt alles zoals jij denkt dat het is
description_ru    : TheBrain организует и находит все так, как вы думаете
audit_schedule    : 
editor            : 
keywords          : 
licence           : proprietary_free,wapt_private
homepage          : https://www.thebrain.com/
package_uuid      : 1532f030-c89c-4742-ab9e-78fb888b9bf5
valid_from        : 
valid_until       : 
forced_install_on : 
changelog         : 
min_os_version    : 12
max_os_version    : 
icon_sha256sum    : 01bfc5dbbd94d46fb483b61445d5028a00f5b04e768b578bacc75f2ef422ae0a
signer            : Tranquil IT
signer_fingerprint: 8c5127a75392be9cc9afd0dbae1222a673072c308c14d88ab246e23832e8c6bb
signature_date    : 2026-01-03T16:00:27.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         : JZSbBW+DtLZd8ng/FM0IdjwntFWvpMWmuydZxdk3CFdPwMbPy8TRLXLBNd1/6xWM1A/QaZw4IsGTn55QKTaB3XH3qa6HNT2ib8dQZ6GA6fRj73QAnbsYQjGbfiLe7TvQzbXU0MUuNhE674/zhMsrX3bIp+oZ/sziQ5vT5HujaOqnyfnnDobB1gTP1EZV4knvau1omsmdIU/hGXFzgsukVKSD58i0aH6+lGPjT4yPC+2EqupGlewsIjoHIfR0o5X4gV8Q0DdFQq8BV2mBDZhm4o6skvdCBeaPxjbbd/0V5p4atkDt5r2NgAG9Hou2arWG05Ygm9uhvD6LeKKLziKsNw==

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

def install():
    bin_name = glob.glob('TheBrain*.dmg')[0],
    install_dmg(bin_name)

def uninstall():
    remove_tree("/Applications/TheBrain 14.app")

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

def update_package():
    package_updated = False
    proxies = get_proxies_from_wapt_console()
    if not proxies:
        proxies = get_proxies()

    app_name = control.name
    target_os = control.target_os.lower()

    # IDs de téléchargement selon l'OS
    if target_os in ['windows', 'win64']:
        download_id = '14001'
        os_name = 'Windows'
    elif target_os in ['mac']:
        download_id = '14000'
        os_name = 'mac'
    else:
        error(f"Unsupported OS: {target_os}")

    # URL de l'API qui redirige vers le téléchargement
    api_url = f"https://salesapi.thebrain.com/?a=doDirectDownload&id={download_id}"

    # Suivre la redirection pour obtenir l'URL
    print(f"Getting download URL for {os_name}...")
    download_url = requests.head(api_url, proxies=proxies, allow_redirects=True).url

    # Nom du fichier
    latest_bin = download_url.rsplit('/', 1)[-1].replace("%20", "_")
    latest_bin_extension = latest_bin.rsplit('.', 1)[-1]
    print(f"Latest binary filename: {latest_bin}")

    # Cherche une suite de chiffres avec des points pour retrouver la version, ex: 14.0.113.0
    version_match = re.search(r'(\d+(?:\.\d+){1,3})', latest_bin)
    if version_match:
        version = version_match.group(1)
    else:
        error(f"Could not extract version from filename: {latest_bin}")

    print(f"Latest {app_name} version is: {version}")
    print(f"Download URL is: {download_url}")

    # Télécharger si nécessaire
    if not isfile(latest_bin):
        print(f"Downloading: {latest_bin}")
        wget(download_url, latest_bin, proxies=proxies)
    else:
        print(f"Binary already present: {latest_bin}")

    # Mettre à jour la version du package
    if Version(version) > Version(control.get_software_version()):
        print(f"Version updated: {control.get_software_version()} -> {version}")
        package_updated = True
    else:
        print(f"Version up-to-date: {version}")

    # Supprimer les anciens binaires
    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

47e676dbf93d559cf16d9773854ce0d0bb31c038a36bb8186d3c86b2a1228be0 : TheBrain14.0.113.0.dmg
38d056ab130f7bf7c481c12636a4e9959de36561d3dfcbe54c6e3571bc0c1dc3 : WAPT/certificate.crt
d9f18338c0f0e190fabe7a21a138419d875fde4f332321cf860b2f7c79c3be0e : WAPT/control
01bfc5dbbd94d46fb483b61445d5028a00f5b04e768b578bacc75f2ef422ae0a : WAPT/icon.png
09e675b722b91790342e88029af922600bf4c0f731ef03c725ea0bb4cc0992c2 : luti.json
9860ae7af95cb73a41ce2e825a5a265cd1837eef9cb2a9d9f86ef815189bd4fe : setup.py
5033a2b180d9a89c844abe459c6aa81a1c7459d0f79b735570d0863935017a7d : update_package.py