Détails du package

smp-terminator

retour Revenir à la liste des packages

smp-terminator

Fichier control :

package           : smp-terminator
version           : 1.0-20
architecture      : all
section           : base
priority          : optional
name              : 
categories        : 
maintainer        : agauvrit
description       : Terminator
depends           : smp-vcxsrv,smp-wsl-debian
conflicts         : 
maturity          : 
locale            : 
target_os         : windows
min_os_version    : 10
max_os_version    : 
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      : 79d194ab-f9f6-43b6-99a8-0f9fe45a81d3
valid_from        : 
valid_until       : 
forced_install_on : 
changelog         : 
signer            : wapt.lesfourmisduweb.org
signer_fingerprint: 1e54425be03a2a3ea1a264b40d984c31f17a6a489a3b722acb993cbf6561e903
signature         : ak5Igtb5yQfJgooBi5hwyOHAVXFlXpyJjAtpkyw1aIEoKA7lpmRDeTJT6Nv7iMbvUleW4/e58YJxzlPXsCMmMngJF/XdmGNoQlH4ZmG/WAtApTJSQcKRmOV6e3ywUM3ZQr5cnvkWqJgIQtBECStshwrEVregTwXtT1yfa8TTzKHYGCoKH3kkyMAT2dRvOCXpsYYPAeDitPaobC1kYxLXmNiOZUj0nJJwm8ymfCbUpH0yGRnWtSizZhvyHmqi6knjJhEAzXal74ewj+Tk2wxNTxN0KMP06H9veCI++9oXqSDg4MHaTT0ZbJfjNw1BZ/hDgi/J9EAscCkBLWu4NORvKQ==
signature_date    : 2020-07-04T11:07:12.068000
signed_attributes : package,version,architecture,section,priority,name,categories,maintainer,description,depends,conflicts,maturity,locale,target_os,min_os_version,max_os_version,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,signer,signer_fingerprint,signature_date,signed_attributes



Fichier setup.py :

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

uninstallkey = []
terminator_path = makepath(programfiles,'Terminator')
terminator_ico = 'terminator.ico'
launch_script = 'start_terminator.vbs'
wscript = makepath(system32(),'wscript.exe')
arg = makepath(terminator_path,launch_script)
icon = makepath(terminator_path,terminator_ico)

def install():
    print('installing %s' % control.asrequirement())
    mkdirs(terminator_path)
    filecopyto(launch_script,terminator_path)
    filecopyto(terminator_ico,terminator_path)

def session_setup():
    import win32ui
    import win32con
    import time
    installterminator = str(registry_readstring(HKEY_CURRENT_USER, "SOFTWARE\\wapt\\Terminator\\",'Install'))
    firstinstall = False

    if installterminator == '' :

        rc = win32ui.MessageBox('Souhaitez vous installer terminator sur votre profil ?', "Configuration de terminator", 4100)
        if rc == 6 :
            registry_setstring(HKEY_CURRENT_USER, "SOFTWARE\\wapt\\Terminator\\",'Install','yes', type=REG_SZ)
            run('start "" "%s" "exit"'  % makepath(user_local_appdata,'Microsoft','WindowsApps','debian.exe'),timeout=120)
            nbtest = 0
            while isrunning('debian.exe'):
                time.sleep(1)
                print('Debian.exe is running')
                nbtest = nbtest + 1
                if nbtest > 120 :
                    killalltasks('debian.exe')
            firstinstall = True
        else:
            registry_setstring(HKEY_CURRENT_USER, "SOFTWARE\\wapt\\Terminator\\",'Install','no', type=REG_SZ)

    installterminator = str(registry_readstring(HKEY_CURRENT_USER, "SOFTWARE\\wapt\\Terminator\\",'Install'))

    if installterminator == 'yes' :
        print('## Set default bash user as root to perform install')
        run('"%s" config --default-user root' % makepath(user_local_appdata,'Microsoft','WindowsApps','debian.exe'))
        print('## Install Terminator and Dbus-x11')
        run('start bash.exe -c -l "apt-get update"')
        time.sleep(10)
        run('start bash.exe -c -l "apt-get install dbus-x11 terminator -y"')
        print('## Restore current user as default bash user')
        run_notfatal('"%s" config --default-user %s' % (makepath(user_local_appdata,'Microsoft','WindowsApps','debian.exe'),get_current_user().lower()))
        start_menu_path = makepath(winshell.programs(0),'StartUp')
        create_shortcut(makepath(start_menu_path,'vcxsrv.lnk'),installed_softwares('VcXsrv')[0]['uninstall_string'].replace('uninstall.exe','vcxsrv.exe').split('"')[1],r':0 -ac -terminate -lesspointer -multiwindow -clipboard -wgl -dpi auto')
        create_user_desktop_shortcut('Terminator',wscript,'"%s"' % arg,r'%USERPROFILE%',icon)
        if not isrunning('vcxsrv.exe'):
            run('start "" "%s" :0 -ac -terminate -lesspointer -multiwindow -clipboard -wgl -dpi auto' % installed_softwares('VcXsrv')[0]['uninstall_string'].replace('uninstall.exe','vcxsrv.exe').split('"')[1],timeout=120)
    if firstinstall:
        resultask = win32ui.MessageBox(u"Installation de terminator terminée, l'icône est disponible sur le bureau", 'Terminator',4096)



def uninstall():
    print('uninstalling %s' % control.asrequirement())
    remove_desktop_shortcut('Terminator')
    remove_tree(terminator_path)