ByzantineFailure / BPM-for-Discord

BPM for Discord's Desktop App. Includes one-click installers, update notifications, and custom script support.
GNU Affero General Public License v3.0
17 stars 8 forks source link

Support for Discord Canary? #78

Closed 1byte2bytes closed 6 years ago

1byte2bytes commented 7 years ago

Is it possible to get Discord Canary support? I would appreciate it a bunch! I looked at implementing it myself and making a pull request, but I don't quite understand how the install system works. I've never used Node before

Jibodeah commented 7 years ago

I've been using BPM on Canary since forever and it's always worked for me.

Except when some canary changes break little parts of it.

ByzantineFailure commented 7 years ago

@1byte2bytes Do you mean the Linux client or the PTR? Both are supported.

Please see "PTB Installation" here: https://github.com/ByzantineFailure/BPM-for-Discord/blob/discord/discord/INSTALLATION.md

ByzantineFailure commented 7 years ago

Closing this issue. If there is some problem with the PTB installers, feel free to reopen it.

1byte2bytes commented 7 years ago

Discord Canary on macOS and Windows are in different folders than PTB. You can't obtain them on the site via the normal downloads page though. Linux can install it fine since you have to manually specify the Discord path.

https://discordapp.com/api/download/canary?platform=win https://discordapp.com/api/download/canary?platform=osx

BytewaveMLP commented 7 years ago

Bump. Especially with video chat being a Canary user feature now, I'd imagine more people will be moving to Canary.

I've tried hacking together my own solution, but with no luck.

1byte2bytes commented 7 years ago

I’ve had success manually replacing PTB with Canary in the paths JS file, but that’s not really a permanent solution.

Sydney Erickson https://sydneyerickson.me/

On Sep 14, 2017, at 5:14 PM, Eliot Partridge notifications@github.com wrote:

Bump. Especially with video chat being a Canary user feature now, I'd imagine more people will be moving to Canary.

I've tried hacking together my own solution, but with no luck.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

BytewaveMLP commented 7 years ago

Could you share your modifications? I tried the same, but with no luck. I've also noticed that app.asar has moved to original_app.asar, but maybe that's due to BeautifulDiscord? I'm not sure.

1byte2bytes commented 7 years ago

Yeah, in a bit. Currently in school.

Sydney Erickson https://sydneyerickson.me/

On Sep 15, 2017, at 10:52 AM, Eliot Partridge notifications@github.com wrote:

Could you share your modifications? I tried the same, but with no luck. I've also noticed that app.asar has moved to original_app.asar, but maybe that's due to BeautifulDiscord? I'm not sure.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

ByzantineFailure commented 6 years ago

Re-opening. Super late doing this, but I do intend to look at this at some point when I'm no longer simultaneously working, traveling, and actively interviewing around for a new job (the last few months have been hellishly busy).

ByzantineFailure commented 6 years ago

@1byte2bytes if you have those changes could you actually post the diff here? They'd make a good starting point.

1byte2bytes commented 6 years ago

Yup! My MacBook is software updating at he moment, give me about 10 minutes

Sent from my iPhone

On Oct 4, 2017, at 2:02 PM, ByzantineFailure notifications@github.com wrote:

@1byte2bytes if you have those changes could you actually post the diff here? They'd make a good starting point.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

1byte2bytes commented 6 years ago

Diff for discord/installer/lib/paths.js

L48 | -             var localDataFolder = isPTB ? 'DiscordPTB' : 'Discord',
L48 | +             var localDataFolder = isPTB ? 'DiscordCanary' : 'Discord',
L70 | -             return '/Applications/Discord' + (isPTB ? ' PTB' : '') + '.app/Contents/Resources';
L70 | +             return '/Applications/Discord' + (isPTB ? ' Canary' : '') + '.app/Contents/Resources';

It's a very hacky solution and just hijacks the PTB paths and makes them into Canary paths, but it's been working for me so far.

BytewaveMLP commented 6 years ago

That's odd. I tried something similar on Windows and had no success. Perhaps I wasn't thurough enough in my modification, but everything seemed to run fine during the patching—no errors or anything.

On Oct 4, 2017 9:14 PM, "Sydney Erickson" notifications@github.com wrote:

Diff for discord/installer/lib/paths.js

  • var localDataFolder = isPTB ? 'DiscordPTB' : 'Discord',

  • var localDataFolder = isPTB ? 'DiscordCanary' : 'Discord',

  • return '/Applications/Discord' + (isPTB ? ' PTB' : '') + '.app/Contents/Resources';

  • return '/Applications/Discord' + (isPTB ? ' Canary' : '') + '.app/Contents/Resources';


It's a very hacky solution and just hijacks the PTB paths and makes them into Canary paths, but it's been working for me so far.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/ByzantineFailure/BPM-for-Discord/issues/78#issuecomment-334339951, or mute the thread https://github.com/notifications/unsubscribe-auth/AFXP2sKnRSKHjgKJd4dbmv8i3wLlYoDdks5spDtpgaJpZM4OMpXF .

ByzantineFailure commented 6 years ago

@BytewaveMLP do you know the exact path to the Canary client on Windows? That can help fix this.

I think what's going to happen is I'm just going to implement another flag, --isCanary, on the installer and check that it's not also flagged with --isPTB (will throw an error in that case). After that just create the right path from there. Need better logic for that anyway.

1byte2bytes commented 6 years ago

The app.asar on my Windows laptop is at C:\Users\sydne\AppData\Local\DiscordCanary\app-0.0.164\resources, dunno if that's the folder you're looking for. The Canary exe is in the app-0.0.164 folder.

Note, I do have an app-0.0.163 folder for the old version of Discord

ByzantineFailure commented 6 years ago

Thanks!

Yeah, that makes a ton of sense w/ the app version folder. There's logic in the installer to find the right one.

Shugabuga commented 6 years ago

I am currently trying to get BPM installed on the latest Canary build. Did a recent change break anything? The code is injected (the error shows up in the first place) but fails to run. Here's the error in console.

ByzantineFailure commented 6 years ago

Hmm, interesting. Will take a look into that when I get the chance later tonight (have a houseguest).

On Sun, Apr 22, 2018, 09:19 HeyItsShuga notifications@github.com wrote:

I am currently trying to get BPM installed on the latest Canary build. Did a recent change break anything? The code is injected (the error shows up in the first place) but fails to run. Here's the error in console.

https://user-images.githubusercontent.com/10801851/39097155-a5d45494-4626-11e8-808e-4751027931e5.png

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/ByzantineFailure/BPM-for-Discord/issues/78#issuecomment-383393172, or mute the thread https://github.com/notifications/unsubscribe-auth/AEwr6ZLkHT8mZPl6LFCle4TMW_mFSGpKks5trK1xgaJpZM4OMpXF .

Shugabuga commented 6 years ago

Okay. 👍

ByzantineFailure commented 6 years ago

Fixed via 172f730df6c90977dbe38fc81550974de1f714b8