DiscordTauri / discord-tauri

A lightweight Discord wrapper made in Tauri
GNU General Public License v3.0
138 stars 12 forks source link

Decompressing asar ? #35

Open snowc0de opened 1 year ago

snowc0de commented 1 year ago

All the data on the normal Discord is stored in the app.asar file that can be decompressed using the command asar e app.asar out

It could also be possible to use the OpenAsar implementation of it which is ridiculously small however I don't know how it really works.

Generally speaking we can't just extract the thing because everything is in Javascript and uses the Electron API but it's just an idea, and maybe something could be done with that, it would avoid having to fetch all the assets and others from the website since everything would be bundled inside the binary.

RealDrPuc commented 1 year ago

I hace thought about this, we would need to fork OpenAsar to replace the Electron API

snowc0de commented 1 year ago

Yes but I'm suspicious of OpenAsar, the size is really suspiciously small, and the extracted content itself doesn't contain any asset (image, video, or anything). Just a few JS files. So I suspect it just fetches everything from the web version.

Meanwhile the original Discord app.asar has all the assets and stuff included.

thattheredstoner commented 1 year ago

This is actually quite a good idea, although might take a while to remake the scripts. But this will allow for a much more native-like experience