BeautifulDiscord icon indicating copy to clipboard operation
BeautifulDiscord copied to clipboard

Added Discord Dynamic Paths detection, Flatpak and NixOS

Open SparrowOchon opened this issue 5 years ago • 12 comments

Some people have been having trouble finding discord and being given; " Could not find Discord executable" this is mainly due to the change in discord name in different installation. As such it is related to;

fixes #62 fixes #25

and supersedes; Pull Request #63

SparrowOchon avatar Dec 15 '18 09:12 SparrowOchon

Dynamically fetch config directory path as such fixes issues from snap and flatpak users as well as addressing issues such as #66.

SparrowOchon avatar Jul 02 '19 00:07 SparrowOchon

Also fixes #53

SparrowOchon avatar Jul 02 '19 15:07 SparrowOchon

After 5be055c4f510636b09f61a5b3d48850f50006142 this PR no longer fixes #63

tadeokondrak avatar Sep 06 '19 00:09 tadeokondrak

@tadeokondrak should be fixed now. Let me know if theres anything else.

SparrowOchon avatar Sep 06 '19 00:09 SparrowOchon

Config path autofinding still not in the main branch. The injection patch changed to use .cache

SparrowOchon avatar Dec 23 '19 22:12 SparrowOchon

I've attempted to use this branch on NixOS version 20.03 and while it succeeded to find discord, it hangs before reporting the following:

Traceback (most recent call last):
  File "/home/suskeyhose/tmp/.venv/bin/beautifuldiscord", line 11, in <module>
    load_entry_point('BeautifulDiscord==0.1.1', 'console_scripts', 'beautifuldiscord')()
  File "/home/suskeyhose/tmp/.venv/lib/python3.7/site-packages/beautifuldiscord/app.py", line 280, in main
    os.chdir(discord.script_path)
  File "/home/suskeyhose/tmp/.venv/lib/python3.7/site-packages/beautifuldiscord/app.py", line 128, in script_path
    config
RuntimeError: Could not find discord application version under "/home/suskeyhose/.config/discord/0.0.10/modules/discord_desktop_core".

Notable is that there are files under that directory which appear to be acting as normal (although the package.json does list the "version" property as "0.0.0", however changing this to "0.0.10" fixes nothing)

IGJoshua avatar May 12 '20 17:05 IGJoshua

Hey @IGJoshua can you post a ls -la of /home/suskeyhose/.config/discord/0.0.10/modules/discord_desktop_core I cant seem to reproduce this error

SparrowOchon avatar May 13 '20 19:05 SparrowOchon

ls -la

total 7424
drwxr-xr-x  2 suskeyhose 985    4096 May 12 12:33 ./
drwxr-xr-x 10 suskeyhose 985    4096 Feb 27 07:29 ../
-rw-r--r--  1 suskeyhose 985 7583089 Feb 27 07:28 core.asar
-rw-r--r--  1 suskeyhose 985      40 Feb 27 07:28 index.js
-rw-r--r--  1 suskeyhose 985      85 May 12 12:31 package.json

package.json

{"name":"discord_desktop_core","version":"0.0.0","private":"true","main":"index.js"}

IGJoshua avatar May 13 '20 20:05 IGJoshua

@IGJoshua Hey, mind trying it now ?. It should be fixed

SparrowOchon avatar May 17 '20 00:05 SparrowOchon

@SparrowOchon Awesome, it works! Thanks!

IGJoshua avatar May 17 '20 01:05 IGJoshua

Trying to use this with a flatpak installation, and it never writes core.asar. Just moves the old one to original_core.asar and causes Discord to fail to start.

unresolvedsymbol avatar Oct 09 '20 02:10 unresolvedsymbol

Truth be told, I don't use Discord, and seeing as this most likely won't ever be merged I won't bother putting time into keeping this up to date. Feel free to make modifications or fork my fork.

@unresolvedsymbol This is most likely related to the directory not being found thus, with the discord update. Make sure the in the app.py file the directory is being properly found. Since the Flatpak most likely moved files around.

@GunnerBasil There should be nothing stopping this from working on Arch already. Auto path detection is distro independent.

SparrowOchon avatar Dec 21 '20 08:12 SparrowOchon