tis-rocketchat

2.16.2-3
Client Rocket.Chat+ (Rocket.Chat Support)
8004 downloads
Download

  Description 

  • package : tis-rocketchat
  • version : 2.16.2-3
  • architecture : all
  • categories :
  • maintainer : Alexandre Gauvrit
  • description : Client Rocket.Chat+ (Rocket.Chat Support)
  • locale : all
  • target_os : windows
  • min_os_version : 5.1
  • max_os_version :
  • min_wapt_version : 1.5
  • sources :
  • installed_size :
  • impacted_process : Rocket.Chat.exe
  • description_fr :
  • description_pl :
  • description_de :
  • description_es :
  • description_pt :
  • description_it :
  • description_nl :
  • description_ru :
  • editor :
  • licence : MIT
  • signature_date : 2020-02-27T21:40:35.392349
  • Homepage : https://rocket.chat/

  Setup.py 

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

uninstallkey = []

startup_folder = makepath(r'C:\ProgramData','Microsoft','Windows','Start Menu','Programs','StartUp')

def install():
    print('installing tis-rocketchat')
    versionsoft = control['version'].split('-',1)[0]

    for old_rocket in installed_softwares('Rocket.Chat'):
        if Version(old_rocket['version']) < Version('2.13.2'):
            killalltasks("Rocket.Chat.exe")
            print('Remove old RocketChat install')
            run(uninstall_cmd(old_rocket['key']))
            remove_file(makepath(startup,'Rocket.Chat.lnk'))
            remove_tree(programfiles + 'rocketchat')

    install_exe_if_needed("rocketchat-setup%s.exe" % versionsoft ,'/S /allusers',key='{9b73a9fb-f1d5-59ee-b41e-e1dd393a748a}',min_version=versionsoft)

    if not isfile(makepath(startup_folder,'Rocket.Chat.lnk')):
        create_programs_menu_shortcut("Rocket.Chat",target=makepath(programfiles,"Rocket.Chat","Rocket.Chat.exe"),folder=startup_folder)
    else:
        print('Shortcut already created')

def session_setup():
    remove_file(makepath(user_appdata(),'Microsoft','Windows','Start Menu','Programs','Startup','Rocket.Chat.lnk'))
    remove_file(makepath(user_appdata(),'Microsoft','Windows','Start Menu','Programs','Startup','Rocket.Chat+.lnk'))

def uninstall():
    remove_file(makepath(startup,'Rocket.Chat.lnk'))


def update_package():
    try:
        import BeautifulSoup
    except:
        import bs4 as BeautifulSoup

    import requests
    import re
    verify=True
    pe = PackageEntry()
    pe.load_control_from_wapt(os.getcwd())
    current_version = pe['version'].split('-',1)[0]

    software_name = "Rocket.Chat"

    version_software_url = "https://github.com/RocketChat/Rocket.Chat.Electron/releases/latest"

    proxies = {}
    if isfile(makepath(application_data(),'waptconsole','waptconsole.ini')):
        proxywapt = inifile_readstring(makepath(user_local_appdata(),'waptconsole','waptconsole.ini'),'global','http_proxy')
        if proxywapt:
            proxies = {'http':proxywapt,'https':proxywapt}

    pattern=re.compile(r'version (.*)')
    page = wgets(version_software_url,user_agent='Mozilla/5.0 (Windows NT 6.1; Win64; x64)',proxies=proxies)
    bs = BeautifulSoup.BeautifulSoup(page)
    software_version = str(bs.find('title')).split(' ')[1]

    print "Current %s WAPT package version is : %s" % (software_name,current_version)
    print "Latest %s version available is : %s" % (software_name,software_version)

    if Version(current_version) < Version(software_version):
            print "%s package is not up-to-date, updating" % software_name
            print "Cleanup current exe files"

            for exe in glob.glob('*.exe'):
                remove_file(exe)

            print("Downloading latest version")
            wget('https://github.com/RocketChat/Rocket.Chat.Electron/releases/download/' + software_version + '/rocketchat-setup-' + software_version + '.exe' , 'rocketchat-setup' + software_version + '.exe',proxies=proxies)

            pe.version = software_version + '-0'
            pe.save_control_to_wapt(os.getcwd())
    else:
        print("No update needed, package already up to date")

if __name__ == '__main__':
    update_package()


										

  Changelog 


No changelog
  manifest.sha256 
[["WAPT/icon.png","462317d2b5f90257f5e8cd2400743ff46dccc74aa967b97201b75bf81079d724"],["WAPT/certificate.crt","a5a97261381e1d0ad46ee15916abec9c2631d0201f5cc50ceb0197a165a0bbbf"],["WAPT/wapt.psproj","510d3af6fcf8f2eae5db684bb830ea9845576e76872b9b10854efaea6e4a4cd8"],["rocketchat-setup2.16.2.exe","47b60b26928208eed3b7ff47b9ff1edafcf14f51871017cc2e8cefa2fe571382"],["setup.py","4097c46bc488f100c875dd2b79906004ffd89ff011a61eaa1bf0ea9dd5892b30"],["WAPT/control","5d5725a834ddcacf902c39303b3f8599737d70f48fa060a05d566535eb0bd7a4"],["Jenkinsfile","54e5f5b903f9666bc53163cb7db7928f52d116f868371bcc52bcce9f74ee3acc"]]