ScoopInstaller / Extras

📦 The Extras bucket for Scoop.
https://scoop.sh
The Unlicense
1.75k stars 1.32k forks source link

Update discord version #8051

Closed SonaliBendre closed 2 years ago

SonaliBendre commented 2 years ago

The discord version we are using from scoop is very very old. discord now don't update nupkg so either we will have have extract DiscordSetup.exe or use https://github.com/portapps/discord-portable . I think we should use https://github.com/portapps/discord-portable because its portable and stores data in scoop\apps\discord\data folder instead %appdata%\discord (the electron shit) and also its configurable

rashil2000 commented 2 years ago

Where can we see what is the latest version of discord?

The portapps build is also very old it seems

SonaliBendre commented 2 years ago

not possible as https://discord.com/api/downloads/distributions/app/installers/latest?channel=stable&platform=win&arch=x86 doesn't show version

SonaliBendre commented 2 years ago

oh wait this url https://dl.discordapp.net/distro/app/stable/win/x86/1.0.9004/DiscordSetup.exe

SonaliBendre commented 2 years ago

we just have to extract exe file to get nupkg file

rashil2000 commented 2 years ago

Where did you get the url?

HUMORCE commented 2 years ago

not possible as https://discord.com/api/downloads/distributions/app/installers/latest?channel=stable&platform=win&arch=x86 doesn't show version

oh wait this url https://dl.discordapp.net/distro/app/stable/win/x86/1.0.9004/DiscordSetup.exe

i have tried this, its built-in updater blows everything up.

rashil2000 commented 2 years ago

discord.json was recently updated to include a script for disabling automatic updates

SonaliBendre commented 2 years ago

discord.json was recently updated to include a script for disabling automatic updates

it doesn't work correctly

rashil2000 commented 2 years ago

What is the error?

/cc @MathewBlock

ShadowCreator250 commented 2 years ago

Yes, I also noticed this.

Discord checks its updates on startup. It has to get the new versions from somewhere. I suspect it does that per module. I looked at the installer log while trying to figure exactly that out and it seemed like it makes a POST to some route. I'm currently not on my PC else I would copy that in this comment.

I wish we could force electron to start the network traffic recording on startup instead of manually in the developer console. Another possibility could be forcing Discord to use http instead of https and using a VM or some proxy to record the traffic.

MathewBlock commented 2 years ago

I've managed to get the checkver stuff working again and the download pointing at the new files, however now I believe I experience the issue @SonaliBendre describes.

Error: Cannot find module 'discord_desktop_core'

Bringing back the auto-updater avoids this issue, but that doesn't feel like a good solution. I've seen other providers such as https://github.com/portapps/discord-portable are now up-to-date and they use a method involving USE_PINNED_UPDATE_MANIFEST and a pinned_update.json. I haven't done enough research yet to understand this and whether we can do a similar solution.

Pointing our download towards the non-affiliated discord-portable as @SonaliBendre suggests is potentially a solution but I feel that is more a question for the moderators since it's a matter of policy. Personally I think we should point directly at official sources but I accept we don't have a workable solution yet.

rashil2000 commented 2 years ago

The brave manifest uses portapps. If the version is up to date, we can switch to using portapps.