tis-discord
0.0.308-2
Discord Desktop Client - Installation in user environment
489 downloads

Description
- package : tis-discord
- version : 0.0.308-2
- architecture : all
- categories : Media,Messaging
- maintainer : WAPT Team,Tranquil IT,Jimmy PELÉ
- description : Discord Desktop Client - Installation in user environment
- locale : all
- target_os : windows
- min_os_version : 6.1
- max_os_version :
- min_wapt_version : 1.7
- sources : https://discord.com/download
- installed_size :
- impacted_process : Discord
- description_fr : Client Discord pour bureau - Installation dans l'environnement utilisateur
- description_pl :
- description_de :
- description_es :
- description_pt :
- description_it :
- description_nl :
- description_ru :
- editor : Discord Inc.
- licence : Proprietary
- signature_date : 2020-09-14T09:50:35.283697
- Homepage : https://www.spotify.com/download
Setup.py
# -*- coding: utf-8 -*-
from setuphelpers import *
import platform
uninstallkey = []
# Defining variables
bin_name = 'DiscordSetup.exe'
silent_args = '-s'
app_dir = makepath(programfiles,'Discord')
app_path = makepath(app_dir,bin_name)
def install():
# Installing the package
if not isdir(app_dir):
mkdirs(app_dir)
if isfile(app_path):
remove_file(app_path)
filecopyto(bin_name,app_dir)
def uninstall():
# Uninstalling the package
if isdir(app_dir):
remove_tree(app_dir)
def session_setup():
# Initializing variables
package_version = control.version.split('-')[0]
user_app_dir = makepath(user_local_appdata,'Discord','app-%s' % package_version)
user_reg_version = registry_readstring(HKEY_CURRENT_USER,r'SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Discord','DisplayVersion')
# Installing the package in user environment
if user_reg_version == '' or package_version > user_reg_version:
print("Installing: %s in user environment" % (bin_name))
install_exe_if_needed(app_path
,silentflags=silent_args)
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}
# Initializing variables
url_dl = "https://discord.com/api/download?platform=win"
latest_bin = bin_name
# Downloading latest binaries
if isfile(bin_name):
remove_file(bin_name)
wget(url_dl,bin_name,proxies=proxy)
# Checking version from file
version = get_file_properties(latest_bin)['ProductVersion']
# Changing version of the package
control.version = '%s-%s'%(version,int(control.version.split('-')[-1])+1)
control.save_control_to_wapt()
print('Changing version to: %s in WAPT\\control' % control.version)
Changelog
Changelog software url : https://discord.com/developers/docs/change-log
No changelog
[["DiscordSetup.exe","b6f969b8a2966262912d9ea00a8026059c61568079e2c319bd5f597588650c65"],["setup.py","476f956f76099f94c788ebd229ebbeb0964554d0ed6733a75d241b9b07f44fc8"],["WAPT/icon.png","8de7c101d7f2155e50bc2b10dc5c36cd170d5efdf956e86533492d69a2652be4"],["WAPT/certificate.crt","a5a97261381e1d0ad46ee15916abec9c2631d0201f5cc50ceb0197a165a0bbbf"],["WAPT/control","e31c86a85c6135b5a6029a2ee5ecb8ea2972fbc8da29eaeb5a53c71091009012"]]