|
13 | 13 |
|
14 | 14 | `BetterDiscordAutoInstaller` is a script that works as the official [BetterDiscord installer](https://betterdiscord.app/). This script applies mod on **default** Discord (non canary, etc.). It automatically downloads `betterdiscord.asar` file from the official [BetterDiscord GitHub repo](https://github.com/BetterDiscord/BetterDiscord) and adds into loading modules.
|
15 | 15 |
|
16 |
| -Currently, `BetterDiscordAutoInstaller` is supported for **[Windows](https://github.com/Zwylair/BetterDiscordAutoInstaller?tab=readme-ov-file#windows)** and **[macOS](https://github.com/Zwylair/BetterDiscordAutoInstaller?tab=readme-ov-file#macos)** platforms. |
| 16 | +Currently, `BetterDiscordAutoInstaller` is supported for **[Windows](https://github.com/Zwylair/BetterDiscordAutoInstaller/tree/master)** and **[macOS](https://github.com/Zwylair/BetterDiscordAutoInstaller/tree/macos)** platforms. |
17 | 17 |
|
18 | 18 | `BetterDiscordAutoInstaller` also allows you to add/remove it from autostart, without having to run it manually every time. For MacOS, the user can also choose to bind script to a keyboard shortcut to manually update.
|
19 | 19 |
|
@@ -43,125 +43,10 @@ py startup_manager.py
|
43 | 43 |
|
44 | 44 | ### MacOS
|
45 | 45 |
|
46 |
| -This repository contains two Python scripts for automatically installing BetterDiscord on macOS. The scripts provide two different installation methods: one for manual installation with a keyboard shortcut and another for automatic installation on startup. |
47 |
| - |
48 |
| -#### Features |
49 |
| -- **Manual Installation with Keyboard Shortcut:** Provides a step-by-step process to manually install BetterDiscord using a keyboard shortcut on macOS. |
50 |
| -- **Automatic Installation on Startup:** Automatically installs BetterDiscord when your Mac starts up and detects a Discord update. |
51 |
| - |
52 |
| -#### Installation |
53 |
| - |
54 |
| -Clone the repository and change directory: |
55 |
| -```bash |
56 |
| -git clone https://github.com/Zwylair/BetterDiscordAutoInstaller |
57 |
| -cd BetterDiscordAutoInstaller |
58 |
| -``` |
59 |
| - |
60 |
| -Create virtual enviornment & activate it: |
61 |
| -```bash |
62 |
| -python3 -m venv venv |
63 |
| -source venv/bin/activate |
64 |
| -``` |
65 |
| - |
66 |
| -Install the dependencies: |
67 |
| -```bash |
68 |
| -pip install -r requirements.txt |
69 |
| -``` |
70 |
| - |
71 |
| -#### Usage |
72 |
| -##### Manual Installation with Keyboard Shortcut (recommended) |
73 |
| -You can just run this script and it would work. However, that's not ideal. We want to be able to run it with just a keyboard shortcut. In order to do that on mac, do the following: |
74 |
| - |
75 |
| -1. Open the `Automator` Application |
76 |
| -2. Select `Quick Action` and click "Choose" |
77 |
| -3. At the top, change it from |
78 |
| - 1. > Workflow recieves current ***Automatic (text)*** in any application |
79 |
| -4. to |
80 |
| - 1. > Workflow recieves current ***no input*** in any application |
81 |
| -5. In the search bar on the left, search `Run Shell Script` and double click |
82 |
| -6. Use shell script of choice. Example here will be for `/bin/bash`. Type the following: |
83 |
| - ```bash |
84 |
| -cd Projects/BetterDiscordAutoInstaller |
85 |
| -source venv/bin/activate |
86 |
| -pip install -r requirements.txt |
87 |
| -python3 macos/manual-installer-mac.py |
88 |
| -``` |
89 |
| -> Reminder: You can update the manual-installer-mac.py code to give you more or less notifications. Feel free to update the local code according to your preferences. |
90 |
| -7. Update the directory and virtual enviornment name to whatever you used. This example cloned the repo to the "Projects" directory and named the virtual env "venv". |
91 |
| -8. Make sure it's saved and name it something memorable (ex. "Run BetterDiscord Script"). |
92 |
| -9. Run manually to make sure it's working without errors. |
93 |
| -10. Go to `Settings` |
94 |
| -11. Search and click on `Keyboard Shortcuts` |
95 |
| -12. On the left pane, click `Services` |
96 |
| -13. Open the right pane, open the `General` dropdown. You should see the `.workflow` file you created in Automator. |
97 |
| -14. Click `none` and type in whatever keyboard shortcut you want to use. Make sure it doesn't conflict with something else (ex. `cmd + shift + 0`) |
98 |
| -15. Click `done`, click out, and test! |
99 |
| - |
100 |
| -You're all set! |
101 |
| - |
102 |
| -##### Automatic Installation on Startup |
103 |
| -We'd recommend using the manual installation as it's less resource-intensive. However, if you can't be bothered, this is the script for you! |
104 |
| - |
105 |
| -This script is more resource-intensive as it will continously wait until it Discord updates. Once Discord starts updating, it waits for it to finish, and then patches in BetterDiscord and waits for another update. |
106 |
| - |
107 |
| -For this script to work, you need to make it run everytime at startup. Here's how to do that. |
108 |
| - |
109 |
| -1. Open the `Automator` Application |
110 |
| -2. Select `Quick Action` and click `Choose` |
111 |
| -3. At the top, change it from |
112 |
| - 1. > Workflow recieves current ***Automatic (text)*** in any application |
113 |
| -4. to |
114 |
| - 1. > Workflow recieves current ***no input*** in any application |
115 |
| -5. In the search bar on the left, search `Run Shell Script` and double click |
116 |
| -6. Use shell script of choice. Example here will be for `/bin/bash`. Type the following: |
117 |
| - ```bash |
118 |
| -cd Projects/BetterDiscordAutoInstaller |
119 |
| -source venv/bin/activate |
120 |
| -pip install -r requirements.txt |
121 |
| -python3 macos/auto-installer-mac.py |
122 |
| -``` |
123 |
| -> Reminder: You can update the auto-installer-mac.py code to give you more or less notifications. Feel free to update the local code according to your preferences. |
124 |
| -7. Update the directory and virtual enviornment name to whatever you used. This example cloned the repo to the "Projects" directory and named the virtual env "venv". |
125 |
| -8. Make sure it's saved and name it something memorable (ex. "BetterDiscord AutoInstaller"). |
126 |
| -9. Run manually to make sure it's working without errors. |
127 |
| -10. Go to `Settings` |
128 |
| - |
129 |
| -> Note: this part is different for those who already did the manual installation |
130 |
| -11. Search and click on `Open at Login` |
131 |
| -12. Click the `+` button and navigate to `~/Library/Services` (you can press ctrl + shift + g and paste for easier naviation) |
132 |
| -13. You should see the `.workflow` file you created in Automator. |
133 |
| -14. Select it and hit `done`! |
134 |
| - |
135 |
| -You're all set! |
136 |
| - |
137 |
| -### How Each Script Works |
138 |
| - |
139 |
| -#### `manual-installer-mac.py` |
140 |
| -The manual-installer-mac.py script allows you to manually install BetterDiscord with a keyboard shortcut. Here’s how it works: |
141 |
| - |
142 |
| - |
143 |
| -1. **Check for Discord Updates:** Checks if Discord is in the process of updating by monitoring the presence of a "ShipIt" process. It also checks if the update folder is still present, indicating that the update process is not yet complete. |
144 |
| - |
145 |
| -2. **Automatic Patching:** After confirming that the update is complete, the script automatically downloads the latest BetterDiscord .asar file, patches Discord’s index.js file, and replaces existing BetterDiscord.asar file with the latest one. |
146 |
| - |
147 |
| -3. **Manual Execution:** You run this script manually, which gives you control over when and how BetterDiscord is installed. Trigger the installation process yourself, ideally after ensuring that Discord has finished updating. |
148 |
| - |
149 |
| -#### `auto-installer-mac.py` |
150 |
| - |
151 |
| -The auto-installer-mac.py script automates the installation of BetterDiscord whenever Discord updates. Here’s how it works: |
152 |
| - |
153 |
| - |
154 |
| -1. **Monitoring for Updates:** The script continuously monitors the system to detect when Discord begins an update. It checks for the presence of the "ShipIt" process, which is used by Discord during updates. |
155 |
| - |
156 |
| -2. **Wait for Update Completion:** Once an update is detected, the script waits for the update to finish. It periodically checks to ensure that both the "ShipIt" process has ended and that the update directory has been emptied. |
157 |
| - |
158 |
| -3. **Automatic Patching:** After confirming that the update is complete, the script automatically downloads the latest BetterDiscord .asar file, patches Discord’s index.js file, and replaces existing BetterDiscord.asar file with the latest one. |
159 |
| - |
160 |
| -4. **Continuous Monitoring:** This script runs in the background, continually checking for updates to Discord. It is designed to be run at startup, ensuring BetterDiscord is always reinstalled automatically after any Discord update. |
| 46 | +You need to move to this [README.md](https://github.com/Zwylair/BetterDiscordAutoInstaller/tree/macos?tab=readme-ov-file#setup-and-dependencies) |
161 | 47 |
|
162 | 48 | ## Contributing
|
163 | 49 |
|
164 |
| -### Windows |
165 | 50 | I will be grateful for any contribution and help given to improve the quality of the project :)
|
166 | 51 |
|
167 | 52 | _(especially about adapting the project to other platforms like linux, etc :3)_
|
|
0 commit comments