Détails du package smp-cmder_1.3.11-3_all.wapt
retour Revenir à la liste des packages

smp-cmder

ATTENTION CE DÉPÔT n'est plus compatible 1.3 vous devez migrer en 1.5.1.21 !

Fichier control :

package           : smp-cmder
version           : 1.3.11-3
architecture      : all
section           : base
priority          : optional
maintainer        : Simon Fonteneau
description       : Emulateur de console ergonomique. Basé sur ConEmu. Inclus dans le paquet ssh, git, rsync, arping, dig ,mtr, nmap, ls ...
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    : 
audit_schedule    : 
editor            : 
keywords          : 
licence           : 
homepage          : 
package_uuid      : ac036f8b-c0b3-4401-9e7b-c9a5d50448c0
signer            : wapt.lesfourmisduweb.org
signer_fingerprint: 8da83ebdac1a25e820b186510d049f47407b11835b0664fdc5bacd3595b1671d
signature         : EKsPgvf2UE21UJG2Mc/9BZ8TBcD2QhDiSRiKY/aLZRkuz0+hrKkbXRZ+pRXrsRvRNNMVg3rw0Gbc6tYz8rtfyDJ730p9lpl9716XA1bu0aunYmyJ3H4j9o1Lh3pFk6ob7D6E+FmeMHTuEkCu16uCtgdSmX2r/64zDtEkEF3OSFSlOKC2zWWaF2iv4mv249/U3QSkQ2zoZwToon03neCi/5CV/dTI8DotDy/MUORVM3AgiSN3pZst9RCUwF6vAsy4IlpuRvslAWNCS/AF4YFbbe4yc+hyrDDer2JLD4UtiqD1Yv6r99++XuEqvWxpPwa5GedX8k3WfewrSepYQENPgQ==
signature_date    : 2019-02-10T21:40:56.424000
signed_attributes : package,version,architecture,section,priority,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,audit_schedule,editor,keywords,licence,homepage,package_uuid,signer,signer_fingerprint,signature_date,signed_attributes






Fichier setup.py :

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

uninstallkey = []

path = makepath(programfiles32,'cmder')
iconemu = makepath(path,'icons','cmder.ico')
pathbin = makepath(path,'vendor','git-for-windows','usr','bin')

def install():


    fichier = open(makepath("cmder",'vendor','user_aliases.cmd.default'), "r")
    olddata = fichier.read()
    fichier.close()

    fichier = open(makepath("cmder",'vendor','user_aliases.cmd.default'), "w")
    fichier.write(olddata.replace(r'history=cat "%CMDER_ROOT%\config\.history"',r'history=cat "%appdata%\cmder\config\.history"'))
    fichier.close()

    print('installing Cmder')
    versionsoft = control['version'].split('-',1)[0]
    maintainer = control['signer']
    namepackage= control['package']

    print('Install cmder')
    if isdir(path):
        remove_tree(path)
    copytree2('cmder',path)

    create_programs_menu_shortcut('Cmder', target=makepath(path,'Cmder.exe'), arguments=r'/c %appdata%\cmder\\', wDir=path, icon=iconemu)
#    create_programs_menu_shortcut('Cmder', target=makepath(path,'cmder.exe'), arguments=r'', wDir=path, icon=iconemu)
    run('"%s" /REGISTER ALL' % makepath(path,'Cmder.exe'))
    register_uninstall('cmder','wapt-get remove ' + namepackage,win64app=False,
        quiet_uninstall_string='',
        install_location = path , display_name='Cmder',display_version=versionsoft,publisher=maintainer)

    print('Install rsync')
    copytree2('rsync',makepath(pathbin,'rsync'))

    print('Install wget')
    copytree2('wget',makepath(pathbin,'wget'))
    add_to_system_path(makepath(pathbin,'wget'))

    print('Install curl')
    copytree2('curl',makepath(pathbin,'curl'))
    add_to_system_path(makepath(pathbin,'curl'))

    print('Install arping')
    filecopyto('arping.exe',makepath(pathbin,'arping.exe'))

    add_to_system_path(path)
    add_to_system_path(pathbin)
    add_to_system_path(makepath(pathbin,'rsync'))

    commandestart = 'start "cmder" "' + path + '\\cmder.exe" /start %1 /c %appdata%\cmder\\'
    fichier = open(makepath(path,'start.bat'), "w")
    fichier.write(commandestart)
    fichier.close()
    pathstart = '"' + path + '\start.bat" "%V"'

    registry_setstring(HKEY_CLASSES_ROOT, r"Directory\shell\Cmder\command",'',pathstart, type=REG_SZ)
    registry_setstring(HKEY_LOCAL_MACHINE, r"SOFTWARE\Classes\Directory\Background\shell\Cmder\command",'',pathstart, type=REG_SZ)
    registry_setstring(HKEY_LOCAL_MACHINE, r"SOFTWARE\Classes\Directory\shell\Cmder\command",'',pathstart, type=REG_SZ)

    print('Enable telnet')
    with disable_file_system_redirection():
        run_notfatal(r'dism /online /Enable-Feature /FeatureName:TelnetClient')

    print('install dig')
    run('"vcredist_x86.exe" /Q')
    copytree2('dig',makepath(pathbin,'dig'))
    add_to_system_path(makepath(pathbin,'dig'))

    print('install nmap')
    run('"vcredist_x86_2013.exe" /Q')
    copytree2('nmap',makepath(pathbin,'nmap'))
    add_to_system_path(makepath(pathbin,'nmap'))

    print('install mtr')
    if iswin64():
        filecopyto(makepath('mtr','Release_x64','mtr.exe'),makepath(pathbin,'mtr.exe'))
    else:
        filecopyto(makepath('mtr','Release_x32','mtr.exe'),makepath(pathbin,'mtr.exe'))


def uninstall():
    run_notfatal('"%s" /UNREGISTER ALL' % makepath(path,'Cmder.exe'))
    if isdir(path):
        remove_tree(path)
    remove_programs_menu_shortcut('Cmder')
    unregister_uninstall('cmder',win64app=False)
    remove_from_system_path(path)
    remove_from_system_path(pathbin)
    remove_from_system_path(makepath(pathbin,'rsync'))
    remove_from_system_path(makepath(pathbin,'dig'))
    remove_from_system_path(makepath(pathbin,'nmap'))