- package: tis-discord
- name: Discord
- version: 1.0.9048-25
- categories: Media,Messaging
- maintainer: WAPT Team,Tranquil IT,Jimmy PELÉ,Pierre COSSON
- editor: Discord Inc.
- licence: Proprietary
- locale: all
- target_os: windows
- impacted_process: Discord
- architecture: all
- signature_date:
- size: 98.97 Mo
- installed_size: 367.31 Mo
- homepage : https://www.spotify.com/download
package : tis-discord
version : 1.0.9048-25
architecture : all
section : base
priority : optional
name : Discord
categories : Media,Messaging
maintainer : WAPT Team,Tranquil IT,Jimmy PELÉ,Pierre COSSON
description : Discord is a VoIP and instant messaging social platform. Users have the ability to communicate with voice calls, video calls, text messaging, media and files in private chats or as part of communities called "servers"
depends :
conflicts :
maturity : PROD
locale : all
target_os : windows
min_wapt_version : 2.0
sources : https://discord.com/download
installed_size : 367309728
impacted_process : Discord
description_fr : Discord est une plateforme sociale de VoIP et de messagerie instantanée. Les utilisateurs ont la possibilité de communiquer par des appels vocaux, des appels vidéo, des messages texte, des médias et des fichiers dans des chats privés ou en tant que membres de communautés appelées "serveurs"
description_pl : Discord to platforma społecznościowa VoIP i komunikatorów internetowych. Użytkownicy mają możliwość komunikacji za pomocą połączeń głosowych, połączeń wideo, wiadomości tekstowych, mediów i plików w prywatnych czatach lub w ramach społeczności zwanych "serwerami"
description_de : Discord ist eine soziale VoIP- und Instant-Messaging-Plattform. Benutzer haben die Möglichkeit, mit Sprachanrufen, Videoanrufen, Textnachrichten, Medien und Dateien in privaten Chats oder als Teil von Gemeinschaften, die "Server" genannt werden, zu kommunizieren
description_es : Discord es una plataforma social de VoIP y mensajería instantánea. Los usuarios tienen la posibilidad de comunicarse con llamadas de voz, videollamadas, mensajes de texto, medios y archivos en chats privados o como parte de comunidades llamadas "servidores"
description_pt : O Discord é uma plataforma social VoIP e de mensagens instantâneas. Os utilizadores têm a capacidade de comunicar com chamadas de voz, videochamadas, mensagens de texto, media e ficheiros em chats privados ou como parte de comunidades chamadas "servidores"
description_it : Discord è una piattaforma sociale VoIP e di messaggistica istantanea. Gli utenti hanno la possibilità di comunicare con chiamate vocali, videochiamate, messaggi di testo, media e file in chat private o come parte di comunità chiamate "server"
description_nl : Discord is een sociaal platform voor VoIP en instant messaging. Gebruikers hebben de mogelijkheid om te communiceren met spraakgesprekken, videogesprekken, tekstberichten, media en bestanden in privéchats of als onderdeel van gemeenschappen die "servers" worden genoemd
description_ru : Discord - это социальная платформа VoIP и обмена мгновенными сообщениями. Пользователи имеют возможность общаться с помощью голосовых звонков, видеозвонков, текстовых сообщений, медиа и файлов в частных чатах или в составе сообществ, называемых "серверами"
audit_schedule :
editor : Discord Inc.
keywords : chat,vocal,voice,channel,voip
licence : Proprietary
homepage : https://www.spotify.com/download
package_uuid : 5c79adb8-2f1b-4e03-805e-fbf902f28d72
valid_from :
valid_until :
forced_install_on :
changelog : https://discord.com/developers/docs/change-log
min_os_version : 6.1
max_os_version :
icon_sha256sum : 10af643692be619dcaabdf732b81c7544b4bf399e301051590dcc767f5bb32dc
signer : Tranquil IT
signer_fingerprint: 8c5127a75392be9cc9afd0dbae1222a673072c308c14d88ab246e23832e8c6bb
signature : I4HIyVxkgQt7g4I+jx0JU3ERUSGoRhpoXX7RX00JAR+HmbWnxuhRdMMmPBX+l8dA8wLgeJmE0bcrAfvOCUI/iMrSfnlJGifMQobUyitYithH4Xh7ZCNgydkZVvTq9bqpiN08PLJ14wcPyHeyPIEvMgMlru6c5H/UsZlXT9wxKBsIa86w8Z5BEeEatzvl7Uhu8CwwHYvf/3U/8zXVa05yqtJqVafyDJQFdlN/Cz43CW8+uB5jSvUKVJA0Yj3JGY3znT4MMYEiS18dWv5yyv5eVS6MbJ43md/2FfYFcG8U16bQiKxxeptjTNM81Hgox9R2GLGBXVNeIL6H/GiWoVnR+A==
signature_date : 2024-06-17T23:01:23.883998
signed_attributes : package,version,architecture,section,priority,name,categories,maintainer,description,depends,conflicts,maturity,locale,target_os,min_wapt_version,sources,installed_size,impacted_process,description_fr,description_pl,description_de,description_es,description_pt,description_it,description_nl,description_ru,audit_schedule,editor,keywords,licence,homepage,package_uuid,valid_from,valid_until,forced_install_on,changelog,min_os_version,max_os_version,icon_sha256sum,signer,signer_fingerprint,signature_date,signed_attributes
# -*- coding: utf-8 -*-
from setuphelpers import *
import time
discord_install_dir = makepath(programfiles32, "discord_install")
discord_install_path = makepath(discord_install_dir, "DiscordSetup.exe")
def install():
mkdirs(discord_install_dir)
filecopyto("DiscordSetup.exe", discord_install_path)
discord_squirrel_remove()
def session_setup():
# Remove programdata installs
programdata_user_dir = makepath(programdata, get_current_user)
programdata_app_dir = makepath(programdata_user_dir, "Discord")
programdata_squirrel_dir = makepath(programdata, get_current_user, "SquirrelTemp")
if isdir(programdata_app_dir):
if not isfile(makepath(programdata_app_dir, ".dead")):
try:
app_uninstall_cmd = rf'"{programdata_app_dir}\Update.exe" --uninstall -s'
run(app_uninstall_cmd)
except:
print("Unable to remove Discord in: %s" % programdata_app_dir)
remove_tree(programdata_app_dir)
if isdir(programdata_squirrel_dir):
remove_tree(programdata_squirrel_dir)
if dir_is_empty(programdata_user_dir):
remove_tree(programdata_user_dir)
# Install app
user_app_dir = makepath(user_local_appdata, "Discord")
discord_versions = glob.glob(makepath(user_app_dir, "**/Discord.exe"))
if discord_versions:
discord_version = "1.0"
for d in discord_versions:
if Version(get_file_properties(d)["ProductVersion"]) > Version(discord_version):
discord_version = get_file_properties(d)["ProductVersion"]
if Version(control.get_software_version()) > Version(discord_version):
run('"%s"' % discord_install_path)
else:
print("Discord already up-to-date (%s)" % discord_version)
else:
run('"%s"' % discord_install_path)
# Disable app run at startup
reg_app_run = None
loop = 0
loop_timer = 1
max_loop = 120
while not reg_app_run:
reg_app_run = registry_readstring(HKEY_CURRENT_USER, r"SOFTWARE\Microsoft\Windows\CurrentVersion\Run", "Discord")
loop += loop_timer
if loop >= max_loop:
break
time.sleep(loop_timer)
if reg_app_run:
registry_setstring(HKEY_CURRENT_USER, r"SOFTWARE\Microsoft\Windows\CurrentVersion\Run\AutorunsDisabled", "Discord", reg_app_run)
registry_delete(HKEY_CURRENT_USER, r"SOFTWARE\Microsoft\Windows\CurrentVersion\Run", "Discord")
# Discord interact differently if user is admin
if running_as_admin():
discord_squirrel_remove()
def uninstall():
if isdir(discord_install_dir):
remove_tree(discord_install_dir)
discord_squirrel_remove()
registry_delete(HKEY_LOCAL_MACHINE, r"SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\StartupApproved\Run", "Discord")
registry_delete(HKEY_LOCAL_MACHINE, r"SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\StartupApproved\Run32", "Discord")
# if discord was uninstalled a .dead file is left behind to prevent automatic reinstall
for user_dir in glob.glob(makepath(systemdrive, "Users", "*")):
# "C:\Users\username\AppData\Local\Discord\Update.exe"
local_appdata_app_dir = makepath(user_dir, "AppData", "Local", "Discord")
if isdir(local_appdata_app_dir):
if not isfile(makepath(local_appdata_app_dir, ".dead")):
try:
app_uninstall_cmd = rf'"{local_appdata_app_dir}\Update.exe" --uninstall -s'
print(app_uninstall_cmd)
run(app_uninstall_cmd)
except:
print("Unable to remove Discord for user: %s" % user_dir.split(os.sep)[-1])
remove_tree(local_appdata_app_dir)
# "C:\Users\jpadmin\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Discord Inc"
start_shortcut = makepath(user_dir, r"AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Discord Inc")
desktop_shortcut = makepath(user_dir, r"Desktop\Discord.lnk")
if isfile(desktop_shortcut):
remove_file(desktop_shortcut)
if isdir(start_shortcut):
remove_tree(start_shortcut)
def discord_squirrel_remove():
squirrel_dir = makepath(programdata, "SquirrelMachineInstalls")
discord_old_installer = makepath(programdata, "Discord.exe")
if isfile(discord_old_installer):
remove_file(discord_old_installer)
if dir_is_empty(squirrel_dir):
remove_tree(squirrel_dir)
registry_delete(HKEY_LOCAL_MACHINE, r"SOFTWARE\Microsoft\Windows\CurrentVersion\Run", "Discord")
registry_delete(HKEY_LOCAL_MACHINE, r"SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Run", "Discord")
# -*- coding: utf-8 -*-
from setuphelpers import *
import requests
def update_package():
# Declaring local variables
package_updated = False
proxies = get_proxies()
if not proxies:
proxies = get_proxies_from_wapt_console()
app_name = control.name
# download_url = "https://discord.com/api/download?platform=win"
download_url = "https://discord.com/api/downloads/distributions/app/installers/latest?arch=x86&channel=stable&platform=win"
# Getting latest version information from download url
requests_result = requests.head(download_url, proxies=proxies, allow_redirects=True)
latest_bin = requests_result.url.split("/")[-1]
version = requests_result.url.split("/")[-2]
# Deleting binaries
for f in glob.glob("*.exe") + glob.glob("*.msi"):
print("Removing: %s" % f)
remove_file(f)
# Downloading latest binaries
print("Latest %s version is: %s" % (app_name, version))
print("Download URL is: %s" % download_url)
if not isfile(latest_bin):
print("Downloading: %s" % latest_bin)
wget(download_url, latest_bin, proxies=proxies)
else:
print("Binary is present: %s" % latest_bin)
# Checking version from file
version_from_file = get_version_from_binary(latest_bin)
# if not version_from_file.startswith(version) and version_from_file != '':
if Version(version_from_file) != Version(version) and version_from_file != "":
print("Changing version to the version number of the binary (from: %s to: %s)" % (version, version_from_file))
os.rename(latest_bin, latest_bin.replace(version, version_from_file))
version = version_from_file
else:
print("Binary file version corresponds to online version")
# Changing version of the package
if Version(version) > Version(control.get_software_version()):
print("Software version updated (from: %s to: %s)" % (control.get_software_version(), Version(version)))
package_updated = True
else:
print("Software version up-to-date (%s)" % Version(version))
control.set_software_version(version)
control.save_control_to_wapt()
# Deleting outdated binaries
for exe in glob.glob('*.exe'):
if get_version_from_binary(exe) != Version(control.get_software_version()):
remove_file(exe)
# Validating or not update-package-sources
return package_updated
1bd1fbc8e069186ca85e6975732d94e6ab573c7eb3ac488b1dee9217d0edb608 : setup.py
1ec925d8fdbfabf4bf564ba76a035b7af31626ecd766f35a16e3b1e82ee3ad54 : update_package.py
10af643692be619dcaabdf732b81c7544b4bf399e301051590dcc767f5bb32dc : WAPT/icon.png
a5a97261381e1d0ad46ee15916abec9c2631d0201f5cc50ceb0197a165a0bbbf : WAPT/certificate.crt
e50c2d5b5667780d6484cab3724e67344a9831e6bc16283f761be97890b6c843 : WAPT/changelog.txt
e9ca8551a86f456d8c0ec209c43ace2f1ec8ec0991f4cd9c8f453d9601ffee78 : luti.json
e2af2391ad2edc8076d3ebb7038ef5e29e5edbe21830622d7b5d5cdbdce5e7db : DiscordSetup.exe
58a0bc7064b390da00a39539ad6941c6d5961b907cf2e37cbca14a8245e6def2 : WAPT/control
https://discord.com/developers/docs/change-log
1.0.9010-25
===
No longer silent install as it seems to break the installation, avoid installation on up-to-date installations
1.0.9008-23
===
No longer use SquirrelMachineInstalls
Disable app run at startup
Better discord_squirrel_remove() handling
Cleanup programdata
1.0.9007-17
===
Fixing multiple install scenarios
Killing before install
Killing firstrun for system install
Uninstalling system install when installed with WAPT service
1.0.9006-10
===
Migrate user install to machine install
update_package reworked