-
-
Notifications
You must be signed in to change notification settings - Fork 184
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Silent install switch #52
Comments
This is a good suggestion and will be considered for a future release. A possible solution to your current situation would be to use the manual install scripts bundled in the BetterDiscordApp repos and build it from the source. |
I will definitely see if I can automate the process of manually installing BD in the meantime, thank you for the suggestion and for considering my request! :) |
This is a large GUI installer, and is not meant for automated tasks like this. See my response here: BetterDiscord/BetterDiscord#382 (comment) |
Being able to install BD silently only makes sense to me as doing it otherwise requires a lot of prerequisites. It requires git, nodejs, npm, all the needed npm packages, and some kind of package manager or predownloaded exes to install all of these things. For example, here is the code for installing it manually via powershell:
Thats a ton of code versus the two lines it would take to install it if there was switches I could use.
|
Wouldn't 3 lines actually be enough?
|
What asar are you talking about? Am I blind ._. EDIT: yes i am blind |
I didn't know thats what the installer was doing when it injected the file That would be easier I suppose, though I still think a silent option should be added, if only just in case. |
Actually, I forgot it only uses that method on Linux. |
I wrote a basic PowerShell script for the installation: param([string]$DiscordPath = (Join-Path $env:LOCALAPPDATA "Discord" "app-0.0.309" "resources"))
$asarUrl = "https://github.com/rauenzi/BetterDiscordApp/releases/latest/download/betterdiscord.asar"
$asarFile = Join-Path $env:APPDATA "BetterDiscord" "data" "betterdiscord.asar"
Invoke-WebRequest -Uri $asarUrl -OutFile (New-Item -Path $asarFile -Force)
New-Item -ItemType Directory -Path (Join-Path $DiscordPath "app") -Force >$null
Set-Content -Path (Join-Path $DiscordPath "app" "package.json") `
-Value '{"name": "betterdiscord", "main": "index.js"}'
Set-Content -Path (Join-Path $DiscordPath "app" "index.js") `
-Value "require('$($asarFile.Replace("\", "/").Replace("'", "\'"))')" You can manually provide the The script can be improved to allow the user to select between Stable/PTB/Canary and automatically find the path, as well as support repairing and uninstalling BD, but I will leave that to someone else. |
Thanks for that pretty good script! I will probably integrate this into mine later. I still stand by having an official switch for this, though. |
Why would you download a 63MB installer for something that can be done with a <1MB script? |
I agree with Observer's view on this. If really needed the inject script from the main repo could be adapted for automated installs. |
@rauenzi We will still need to clone the main repository, whose uncompressed size is ~130Mb. It would be much better if there was a simple silent parameter in installer. |
Is your feature request related to a problem? Please describe.
I want to create a Windows setup script that installs all my favorite programs and I want as much as it as humanly possible to be silent and installed in the background.
Describe the solution you'd like
A switch you can use when running the installer exe, in the same format as most .msi files (/S, /SILENT, /VERYSILENT, /quiet, etc) that will automatically accept the license agreement, and start the installation immediately. (Preferably without even showing the GUI using /VERYSILENT). Since you can install the program to multiple installations of discord and you cant be certain of which one the user wants to install to, you can also have a secondary switch like /stable, /canary, /ptb.
Example:
BetterDiscord-Installer.exe /S /stable
Describe alternatives you've considered
I could use AutoHotKey or some kind of memory alteration but that's really difficult to do consistently, and will probably break after any updates to the software.
Additional context
Please forgive me if something like this is already possible that I missed. I tried all the aforementioned switches as well as looking at the index.js of the code and I see no references to process.argv within the entire project
The text was updated successfully, but these errors were encountered: