Skip to content
This repository has been archived by the owner on Nov 12, 2023. It is now read-only.

Commit

Permalink
Merge pull request #1 from Ryah/dev
Browse files Browse the repository at this point in the history
Auto close/open Discord Canary on install and uninstall
  • Loading branch information
Ryah authored Aug 8, 2021
2 parents e56ccad + e2c889f commit 27a979f
Show file tree
Hide file tree
Showing 3 changed files with 78 additions and 18 deletions.
82 changes: 67 additions & 15 deletions Powercord Utilities.bat
Original file line number Diff line number Diff line change
Expand Up @@ -163,17 +163,37 @@ if "%App%" EQU "Install PowerCord" (
for /f "delims=: tokens=*" %%A in ('findstr /b ::: "%~f0"') do @echo(%%A
echo º Installing Powercord º ³Scripts made by No Text To Speech on YouTube³
echo ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ

git clone https://github.com/powercord-org/powercord
echo.
echo.
echo This will close Discord Canary in the installation process.
echo.
echo.
echo|set /p="Press any key to continue"
pause >nul
cls
for /f "delims=: tokens=*" %%A in ('findstr /b ::: "%~f0"') do @echo(%%A
echo º Installing Powercord º ³Scripts made by No Text To Speech on YouTube³
echo ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
echo.
echo.
echo Cloning Powercord Repo
git clone -q https://github.com/powercord-org/powercord
cd powercord
npm i
npm run plug
powershell -Command "& {Add-Type -AssemblyName System.Windows.Forms; [System.Windows.Forms.MessageBox]::Show('Close DiscordCanary using the taskbar', 'Please read', 'OK', [System.Windows.Forms.MessageBoxIcon]::Information);}"
echo.
echo.
echo Running npm commands
npm i --silent >nul
npm run plug --silent >nul
echo.
echo.
echo Closing Discord Canary
taskkill /f /im DiscordCanary.exe >nul
timeout /t 5 >nul
cd %HOMEPATH%\powercord\src\Powercord\plugins
echo Installing Theme Toggler
git clone https://github.com/redstonekasi/theme-toggler
echo.
echo.
echo Installing Theme Toggler
git clone -q https://github.com/redstonekasi/theme-toggler
echo.
echo.
choice /M "Do you want to install PowercordPluginDownloader and PowercordThemeDownloader?"
Expand All @@ -183,22 +203,29 @@ if "%App%" EQU "Install PowerCord" (
) else if errorlevel 2 (
goto :InstallDone
) else if errorlevel 1 (
git clone https://github.com/LandenStephenss/PowercordPluginDownloader
git clone https://github.com/ploogins/PowercordThemeDownloader
echo Installing PowercordPluginDownloader
git clone -q https://github.com/LandenStephenss/PowercordPluginDownloader
echo Installing PowercordThemeDownloader
git clone -q https://github.com/ploogins/PowercordThemeDownloader
goto :InstallDone
) else if errorlevel 0 (
echo Error. Skipping install of plugins.
goto :InstallDone
echo Error. Skipping install of plugins.
goto :InstallDone
)

:InstallDone
echo Opening Discord Canary
START %appdata%/../Local/DiscordCanary/Update.exe --processStart DiscordCanary.exe
timeout /t 5 >nul
cls
echo.
echo.
echo|set /p="Powercord has been Installed!"
echo.
echo|set /p="If you would like to install plugins/themes manually, please restart this utility tool."
rem screw it I've been working on this for the past 3 hours and I still have no idea why it force closes here so whatever let's just say it has to do with reloading or something idk
pause >nul
goto :Menu
goto :MENU
)


Expand All @@ -223,12 +250,37 @@ if "%App%" EQU "Uninstall Powercord" (
pause >nul
goto :MENU
)
echo.
echo.
echo This will close Discord Canary in the installation process.
echo.
echo.
echo|set /p="Press any key to continue"
pause >nul
cls
for /f "delims=: tokens=*" %%A in ('findstr /b ::: "%~f0"') do @echo(%%A
echo º Uninstalling Powercord º ³Scripts made by No Text To Speech on YouTube³
echo ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
echo.
echo.
cd %HOMEPATH%\powercord
npm run unplug
powershell -Command "& {Add-Type -AssemblyName System.Windows.Forms; [System.Windows.Forms.MessageBox]::Show('Close DiscordCanary using the taskbar', 'Please read', 'OK', [System.Windows.Forms.MessageBoxIcon]::Information);}"
powershell -Command "& {Add-Type -AssemblyName System.Windows.Forms; [System.Windows.Forms.MessageBox]::Show('Please Start Discord Canary', 'Please read', 'OK', [System.Windows.Forms.MessageBoxIcon]::Information);}"
echo Running npm unplug
npm run unplug --silent >nul
rem powershell -Command "& {Add-Type -AssemblyName System.Windows.Forms; [System.Windows.Forms.MessageBox]::Show('Close DiscordCanary using the taskbar', 'Please read', 'OK', [System.Windows.Forms.MessageBoxIcon]::Information);}"
echo.
echo.
echo Closing Discord Canary
timeout /t 5 >nul
taskkill /f /im DiscordCanary.exe >nul
echo.
echo.
rem powershell -Command "& {Add-Type -AssemblyName System.Windows.Forms; [System.Windows.Forms.MessageBox]::Show('Please Start Discord Canary', 'Please read', 'OK', [System.Windows.Forms.MessageBoxIcon]::Information);}"
echo Opening Discord Canary
START %appdata%/../Local/DiscordCanary/Update.exe --processStart DiscordCanary.exe
timeout /t 10 >nul
cd %HOMEPATH%
echo.
echo.
echo Removing Powercord Git Folder
rmdir powercord /s /q
cls
Expand Down
11 changes: 9 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,15 @@ Currently supports semi-automated installation and uninstallation of Powercord,

It also supports manually installing plugins/themes with a github repo link.

Currently working on fully automating the installation of Powercord, instead of relying on the user to close/open Canary.
## Todo:
- ✔ Automate Killing/Opening of Discord Canary during installation @done(21-08-08 02:16)
- ☐ Plugin/theme backup & restore
- ☐ Automate installation of Git
- ☐ Automate installation of NodeJS
- ☐ Streamline Plugin installation
- ☐ (maybe) Make main menu a keyboard driven GUI (DOSKEY possibly?)
- ☐ I'm running out of tasks but I want this list to be more full
- ☐ Find more tasks

## Prerequisites

Expand All @@ -29,7 +37,6 @@ environment running

---


## Authors

- Ryah
Expand Down
3 changes: 2 additions & 1 deletion TODO
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@

Todo:
☐ Automate Killing/Opening of Discord Canary during installation
✔ Automate Killing/Opening of Discord Canary during installation @done(21-08-08 02:16)
☐ Plugin/Theme backup
☐ Automate installation of Git
☐ Automate installation of NodeJS
☐ Streamline Plugin installation
Expand Down

0 comments on commit 27a979f

Please sign in to comment.