tis-discord

0.0.307-2
Discord Desktop Client - Installation in user environment
1085 downloads
Download

  Description 

  • package : tis-discord
  • version : 0.0.307-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_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-08-19T17:22:27.283266
  • 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.txt.
									
  manifest.sha256