tis-rocketchat
3.0.6-12
Rocket.Chat permit to communicate and collaborate with your team, share files, chat in real time or switch to video/audio conferencing.
8007 downloads

Description
- package : tis-rocketchat
- version : 3.0.6-12
- architecture : all
- categories : Messaging
- maintainer : WAPT Team,Tranquil IT,Jimmy PELÉ
- description : Rocket.Chat permit to communicate and collaborate with your team, share files, chat in real time or switch to video/audio conferencing.
- locale : all
- target_os : windows
- min_os_version : 6.1
- max_os_version :
- min_wapt_version : 1.7
- sources : https://github.com/RocketChat/Rocket.Chat/releases
- installed_size :
- impacted_process : Rocket.Chat
- description_fr : Rocket.Chat permet de communiquer et collaborer avec votre équipe, partager des fichiers, chatter en temps réel ou passer en conférence audio/vidéo.
- description_pl :
- description_de :
- description_es :
- description_pt :
- description_it :
- description_nl :
- description_ru :
- editor : Team Rocket.Chat
- licence : MIT
- signature_date : 2020-11-03T19:02:13.848144
- Homepage : https://rocket.chat/
Setup.py
# -*- coding: utf-8 -*-
from setuphelpers import *
import json
import platform
uninstallkey = []
# Defining variables
bin_name_string = 'rocketchat-setup-%s.exe'
uninstallkey_app = '9b73a9fb-f1d5-59ee-b41e-e1dd393a748a'
silent_args = '/S /allusers /disableAutoUpdates'
dics_dir = 'dictionaries'
dictionaries_dir = makepath(programfiles,'Rocket.Chat','resources','dictionaries')
spell_checker_list = ('en','fr','pl','de','es','pt','it','nl','ru')
def install():
# Initializing variables
package_version = control.version.split('-',1)[0]
bin_name = bin_name_string % package_version
# Installing the package
print('Installing: %s' % bin_name)
install_exe_if_needed(bin_name,
silentflags=silent_args,
key=uninstallkey_app,
min_version=package_version)
# Copying RC Dictionaries
if isdir(dictionaries_dir):
remove_tree(dictionaries_dir)
mkdirs(dictionaries_dir)
for copy_dic in glob.glob(makepath(dics_dir,'*')):
filecopyto(copy_dic,dictionaries_dir)
# Deleting desktop shortcut
remove_desktop_shortcut('Rocket.Chat')
def session_setup():
print("Disabling: auto-update-check")
user_config_json = 'config.json'
user_config_dir = makepath(user_appdata,'Rocket.Chat')
user_config_json_path = makepath(user_config_dir,user_config_json)
user_config_json_content = json.loads('{"doCheckForUpdatesOnStartup": false,"isEachUpdatesSettingConfigurable": false,"isUpdatingEnabled": false,"isTrayIconEnabled": true}')
# Writting configuration file
if not isdir(user_config_dir):
mkdirs(user_config_dir)
if isfile(user_config_json_path):
data = json_load(user_config_json_path)
data.update(user_config_json_content)
else:
data = user_config_json_content
json_write(user_config_json_path,data)
print("Copying: Spell Check Dictionaries")
user_dictionaries_dir = makepath(user_appdata,'Rocket.Chat','Dictionaries')
if not isdir(user_dictionaries_dir):
mkdirs(user_dictionaries_dir)
for copy_dic in glob.glob(makepath(dictionaries_dir,'*')):
bdic_file_name = copy_dic.split('\\')[-1]
if not isfile(makepath(user_dictionaries_dir, bdic_file_name)):
filecopyto(copy_dic, makepath(user_dictionaries_dir, bdic_file_name))
def update_package():
print('Download/Update package content from upstream binary sources')
# Getting proxy informations from WAPT settings
proxy = {}
if platform.system()=='Windows' and isfile(makepath(user_local_appdata(),'waptconsole','waptconsole.ini')):
proxywapt = inifile_readstring(makepath(user_local_appdata(),'waptconsole','waptconsole.ini'),'global','http_proxy')
if proxywapt :
proxy = {'http':proxywapt,'https':proxywapt}
# Specific app values
app_name = control.name
url_api = 'https://api.github.com/repos/RocketChat/Rocket.Chat.Electron/releases/latest'
bin_end = bin_name_string.split('%s')[-1]
# Getting latest informations from Github API
json_load = json.loads(wgets(url_api,proxies=proxy))
for download in json_load['assets']:
if download['browser_download_url'].endswith(bin_end):
url_dl = download['browser_download_url']
break
version = (url_dl.split('-')[-1]).replace(bin_end,'')
latest_bin = bin_name_string % version
print('Latest ' + app_name + ' version is: ' + version)
print('Download url is: ' + url_dl)
# Downloading latest binaries
if not isfile(latest_bin):
print('Downloading: ' + latest_bin)
wget(url_dl,latest_bin,proxies=proxy)
# Checking version from file
version_from_file = get_version_from_binary(latest_bin)
if version != version_from_file:
os.rename(latest_bin,bin_name_string % version_from_file)
version = version_from_file
# Changing version of the package
control.version = '%s-%s'%(version,int(control.version.split('-')[-1])+1)
control.save_control_to_wapt()
print('Changing package version to: %s in WAPT\\control' % control.version)
# Deleting outdated binaries
remove_outdated_binaries(version)
# Downloading electron dictionaries from Google repo
url_git_dics = 'https://chromium.googlesource.com/chromium/deps/hunspell_dictionaries'
git_dir = url_git_dics.split('/')[-1]
if isdir(git_dir):
remove_tree(git_dir)
if isdir(dics_dir):
remove_tree(dics_dir)
mkdirs(dics_dir)
run('git config --global http.sslVerify false')
run('git clone %s' % url_git_dics)
for bdic_file in glob.glob(makepath(git_dir,'*.bdic')):
bdic_file_name = bdic_file.split('\\')[-1]
for lang in spell_checker_list:
if lang in bdic_file_name:
filecopyto(bdic_file, makepath(dics_dir, bdic_file_name))
remove_tree(git_dir)
def get_proxies():
if platform.python_version_tuple()[0] == '3':
from urllib.request import getproxies
else:
from urllib import getproxies
return getproxies()
def get_version_from_binary(filename):
if filename.endswith('.msi'):
return get_msi_properties(filename)['ProductVersion']
else:
return get_file_properties(filename)['ProductVersion']
def remove_outdated_binaries(version,list_filename_contain=('x64','x86','win32','win64','32','64'),list_extensions=('exe','msi','deb','rpm','dmg','pkg')):
for file_ext in list_extensions:
for bin_in_dir in glob.glob('*.%s' % file_ext):
if not version in bin_in_dir:
for filename_contain in list_filename_contain:
if not filename_contain in bin_in_dir:
print('Outdated binary: %s Removed' % bin_in_dir)
remove_file(bin_in_dir)
def bs_find_all(url, element, attribute=None, value=None, headers=None, proxies=None, features='html.parser', **kwargs):
""""You may need to use a header for some websites. For example: headers={'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Firefox/78.0'}
"""
import requests
page = requests.get(url, proxies=proxies, headers=headers, **kwargs).text
try:
import bs4 as BeautifulSoup
soup = BeautifulSoup.BeautifulSoup(page, features=features)
except:
import BeautifulSoup
soup = BeautifulSoup.BeautifulSoup(page)
if value:
return soup.findAll(element,{attribute:value})
else:
return soup.findAll(element)
def json_load(json_file):
with open(json_file) as read_file:
data = json.load(read_file)
return data
def json_write(json_file,data,sort_keys=True, indent=4):
import codecs
with codecs.open(json_file, 'w', encoding='utf-8') as write_file:
json.dump(data, write_file, sort_keys=sort_keys, indent=indent)
Changelog
Changelog software url : https://github.com/RocketChat/Rocket.Chat.Electron/releases/
No changelog
[["dictionaries/de-DE-3-0.bdic","076a470700dbd0aa62bb8b3d24c34e1340bdfe83cbbcfc035ce972f23c140400"],["dictionaries/en-AU-9-0.bdic","da2957237ec6745bf6c8484e456814089a4f302168e409dd3348841508d0aaa7"],["dictionaries/en-CA-9-0.bdic","1cf5c01417c59d997b75a7980685b739ee9999a85ccbab3104ca70c785a86202"],["dictionaries/en-GB-9-0.bdic","73c79a410f80920c29b055f7ba907d93403b05a8c17d00e8e7054edb62f731ac"],["dictionaries/en-GB-oxendict-9-0.bdic","2683a63ce30a38d34eff0f97b0e17a7c37083837be3cd7c8716c759f5d17c564"],["dictionaries/en-US-9-0.bdic","0d6803758ff8f87081fafd62e90f0950dfb2dd7991e9607fe76a8f92d0e893fa"],["dictionaries/es-ES-3-0.bdic","e6334dcf080aaeca679db70565762a2c296ff5780c1af263530ac7345736bfa9"],["dictionaries/fr-FR-3-0.bdic","6cffc13b549c33d44180a3a7b13943fe0eadfbe80bcdbccc76f67c55c2012968"],["dictionaries/it-IT-3-0.bdic","8b83a0d4bba4cfcd4a4e7ee89b703014a00a5c08e721e568a5c552a732827fff"],["dictionaries/nl-NL-3-0.bdic","43eea1bd8149c1a24f4388ade6a261a981ca2e786e7df12e606295a8024b150e"],["dictionaries/pl-PL-3-0.bdic","a04c51759b6e54f01e628dfc6354ca88a0711d8bcefa6a8c0e8baa04156fb92e"],["dictionaries/pt-BR-3-0.bdic","6b2850f5a54994a5204a9a88d4b586e9d4e028a0360b67352b04cffdb2a3e0ea"],["dictionaries/pt-PT-3-0.bdic","a6dfc3332b15a6cdf06be3f28024f22e40e0467cf0400f8ce9c43cf1af2c3f40"],["dictionaries/ru-RU-3-0.bdic","92dcc64fb0b0c065b443abf9de6fb58116b2a64c49427d3715fa7536ad1c53b8"],["rocketchat-setup-3.0.6.exe","8ca432ae6e3b3fa8e25bb745dea58d191da66bdccf945916b4d3ce2da65fa920"],["setup.py","93e229040642471decbf9c906736149c2529530761221a4fc9ae7bb85982aaf5"],["WAPT/icon.png","b8127266889154a1af4f52b3add4e58cbb948d26621a60a81a5ce52243b4ed21"],["WAPT/wapt.psproj","39d59e4b264b47219b507096ff5a17a34388b6f42d62fc2b5daf6710d6dc9aa8"],["WAPT/certificate.crt","a5a97261381e1d0ad46ee15916abec9c2631d0201f5cc50ceb0197a165a0bbbf"],["WAPT/control","a9ebab9fec35e8e5fd0553747a9fcf28995c271b4f83b3e5f07f4d12a0c1488c"]]