Tranquil IT recrute Tranquil IT recrute

tis-rocketchat

Version : 2.14.0-2

Download
  • package : tis-rocketchat
  • editor :
  • version : 2.14.0-2
  • licence :
  • architecture : all
  • locale :
  • description : Client Rocket.Chat+ (Rocket.Chat Support)
  • description_fr :
  • min_os_version :
  • max_os_version :
  • min_wapt_version :
  • installed_size :
  • impacted_process :
  • signature_date : 20181011-085811
  • maintainer : Alexandre Gauvrit

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

"""{% trans %}No changelog.{% endtrans %}"""
			

manifest.sha256

[["WAPT/icon.png", "462317d2b5f90257f5e8cd2400743ff46dccc74aa967b97201b75bf81079d724"], ["WAPT/certificate.crt", "13fb474c5c23c135a77aba592eb8821b9ecbcc463f5b7312312b87b20eac6779"], ["WAPT/wapt.psproj", "df3e2fa87fea9c7bdfcc22039b9ef7303f092898882d9f3f4233f5d92f90b3c7"], ["rocketchat-setup2.14.0.exe", "4786e378b3a24dd5faa0548242cc875a5f4bfd36e7ea0c51b6819b9ddc9ef594"], ["setup.py", "abceca427797cc854d54ad856d8f23fc777072c808440ed37a00abd6da366bc9"], ["WAPT/control", "87c26b66f52c92df3332e63956816a541b9a221035184b3f0a8019d2fcf4f3ed"]]