tis-rocketchat

2.14.0-2
Client Rocket.Chat+ (Rocket.Chat Support)
8004 downloads
Download

  Description 

  • package : tis-rocketchat
  • version : 2.14.0-2
  • architecture : all
  • categories :
  • maintainer : Alexandre Gauvrit
  • description : Client Rocket.Chat+ (Rocket.Chat Support)
  • 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 :
  • editor :
  • licence :
  • signature_date : 2020-02-27T15:11:59.217571

  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():
    proxy={'http':'http://srvproxy:3128','https':'http://srvproxy:3128'}

    import requests,BeautifulSoup
    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"

    pattern=re.compile(r'version (.*)')
    page = wgets(version_software_url,user_agent='Mozilla/5.0 (Windows NT 6.1; Win64; x64)',proxies=proxy)
    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=proxy)

            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","df3e2fa87fea9c7bdfcc22039b9ef7303f092898882d9f3f4233f5d92f90b3c7"],["rocketchat-setup2.14.0.exe","4786e378b3a24dd5faa0548242cc875a5f4bfd36e7ea0c51b6819b9ddc9ef594"],["setup.py","abceca427797cc854d54ad856d8f23fc777072c808440ed37a00abd6da366bc9"],["WAPT/control","16562373182c0bda9f47f7b46f6b981cd946862909fc535dcfe8cfab0626ea48"]]