OpenAsar/README.md

67 lines
2.7 KiB
Markdown
Raw Normal View History

2021-12-09 11:14:14 +00:00
# OpenAsar
**Open-source alternative of Discord desktop's `app.asar`** OpenAsar is currently made of **~80% own code**, with the rest being from Discord as it hasn't been rewritten yet or because of compatibility reasons.
2021-12-09 11:25:01 +00:00
## Goals
- **Hotpluggable** - just swap the asar file, nothing else needed
- **Lightweight** - currently improving startup times ~2x (up to ~4x with experimental config)
2021-12-09 19:25:40 +00:00
- **No Tracking** - no crash reporting or error tracking (in normal Discord)
2021-12-11 01:18:18 +00:00
- **Minimal** - current size is only ~150kb (compared to original ~9mb)
2021-12-09 18:30:07 +00:00
- **Patch Platform** - provide a platform for future patching
2021-12-09 11:50:16 +00:00
## Implementation
Below is a list in order of priority, marked as complete when finished:
2021-12-09 16:25:14 +00:00
- [X] Bootstrapping
- [X] Splash screen
- [X] Error handling
- [ ] A bunch of specific minor fixes / features
- [X] Handle hardware acceleration
- [ ] Add Discord-specific Electron flags?
- [X] Asar auto-updating
- [X] Multi-instance handling
2021-12-09 11:50:16 +00:00
- [ ] Auto start
2021-12-09 16:25:14 +00:00
- [ ] First run
2021-12-09 16:58:47 +00:00
- [ ] Self-write some small parts of internals
2021-12-09 18:30:07 +00:00
- [ ] Patch updater to survive host updates
- [ ] Self-write updater code (currently mostly copied)
2021-12-09 22:29:16 +00:00
- [ ] Compatibility / replication of original Discord splash?
2021-12-09 22:29:52 +00:00
## Custom Patches
Custom patches are another main goal of OpenAsar, patching enhancements where otherwise impossible to do so with traditional mods. Our current ideas for patches to do:
- [X] Rewrite portions of Discord's code to not rely on external dependencies, increasing speed and decreasing size
2021-12-09 22:29:52 +00:00
- [X] Skipping checking for updates on startup
- [ ] Linux host app updating
## Install Guide
**OpenAsar is heavily disrecommened due to it being in early development.**
2021-12-11 08:13:27 +00:00
1. Download latest release (nightly recommended)
2021-12-09 22:29:52 +00:00
4. Backup your original `app.asar` (rename to `app.asar.backup` / etc)
5. Install OpenAsar `app.asar` into the original path
2021-12-09 22:29:16 +00:00
## Config
You can configure OpenAsar via `settings.json` (found in your Discord app data / user data), under a `openasar` object. Keep in mind most options are defaults for good reason, they may temporarily brick your client until you revert your changes. The avaliable options are:
- `quickstart` (bool, default false) - whether to use Quickstart (experimental)
- `skipStartupUpdateChecks` (bool, default false) - skips startup update checking (Linux-only)
- `autoupdate` (bool, default true) - whether to autoupdate OpenAsar after Discord startup
- `multiInstance` (bool, default false) - whether to enable multi-instance
2021-12-09 22:29:16 +00:00
An example of a settings.json with OpenAsar config:
```json
{
"BACKGROUND_COLOR": "#202225",
"IS_MAXIMIZED": false,
"IS_MINIMIZED": false,
"WINDOW_BOUNDS": {
"x": 801,
"y": 22,
"width": 797,
"height": 876
},
"MINIMIZE_TO_TRAY": false,
"OPEN_ON_STARTUP": false,
"openasar": {
"quickstart": true
}
}
2021-12-11 08:13:27 +00:00
```