JsSucks / BetterDiscordApp

Better Discord App enhances Discord desktop app with new features.
MIT License
587 stars 116 forks source link

[Bug] Inject script incorrect location for Arch Linux #347

Open xstefen opened 5 years ago

xstefen commented 5 years ago

Inject script looks for /usr/share/discord/resources

On Arch Linux, discord is installed via an AUR package and defaults to /opt/discord

Therefore this injection script method fails. But you probably knew that. <3

intrnl commented 5 years ago

Discord on Fedora RPMFusion repository installs to /usr/lib64

Might as well put it here, 🤷

Programatic commented 5 years ago

I just went through with this on Arch, i edited the install script to where the location is pointed to in the PKGBUILD in thie: https://aur.archlinux.org/packages/discord/ so for me: ~/Downloads/discord/pkg/discord/opt/discord/resources

zerebos commented 5 years ago

Why is it in your downloads folder? Sounds like there's no easy way to make it work for all Linux flavors

xstefen commented 5 years ago

I just went through with this on Arch, i edited the install script to where the location is pointed to in the PKGBUILD in thie: https://aur.archlinux.org/packages/discord/ so for me: ~/Downloads/discord/pkg/discord/opt/discord/resources

Some people just want to see the world burn

Why is it in your downloads folder? Sounds like there's no easy way to make it work for all Linux flavors

Just tossing ideas out, what if we used a really obnoxious find or even asked the user? or had a list of typical locations that would be checked? im a noob, back to my nubdroid shib

Programatic commented 5 years ago

@rauenzi @xstefen The reason it was in my downloads folder, is because I just downloaded it and did everything from there. The pkg build also copies it over and links from /opt/discord/ but installin in either just results in discord perma crashing for me because it 'cant find a constructor' when I try and use the UI in any way

Programatic commented 5 years ago

Here is what i put that does install (i guess more consistently) on arch. I mean, discord just crashes but it at least says it successfully installed

    } else if (process.platform === 'linux') {
        const standardPath = path.join('/usr', 'share', release.toLowerCase().replace(/ /g, '-'), 'resources');
        if (!fs.existsSync(standardPath)) return path.join('/opt', 'discord', 'resources');
        return path1;
    }
marcussacana commented 5 years ago

ElementaryOS after the last update

image

--edit looks like my index.js of the betterdiscord became corrupted for some reason, I did a fresh installation and worked.

zerebos commented 5 years ago

Looks like you're using BBD. This is the wrong repo.

marcussacana commented 5 years ago

ow shit srry

xstefen commented 5 years ago

Well this was quite the unexpected revival, hello and g'day sirs