From 873ed02c5ce9e344f4682ebf65e7390b9377606f Mon Sep 17 00:00:00 2001 From: Exception <59223342+Intevel@users.noreply.github.com> Date: Sun, 18 Apr 2021 14:15:51 +0200 Subject: [PATCH] Add files via upload --- scripts/setup/fosscord.txt | 10 +++ scripts/setup/setup.bat | 166 ++++++++++++++++++------------------- 2 files changed, 92 insertions(+), 84 deletions(-) create mode 100644 scripts/setup/fosscord.txt diff --git a/scripts/setup/fosscord.txt b/scripts/setup/fosscord.txt new file mode 100644 index 0000000..e0cb67f --- /dev/null +++ b/scripts/setup/fosscord.txt @@ -0,0 +1,10 @@ + + ____ _____ ____ ____ ____ _____ ____ ____ + /\ _`\ /\ __`\ /\ _`\ /\ _`\ /\ _`\ /\ __`\ /\ _`\ /\ _`\ + \ \ \L\_\\ \ \/\ \\ \,\L\_\\ \,\L\_\\ \ \/\_\\ \ \/\ \\ \ \L\ \\ \ \/\ \ + \ \ _\/ \ \ \ \ \\/_\__ \ \/_\__ \ \ \ \/_/_\ \ \ \ \\ \ , / \ \ \ \ \ + \ \ \/ \ \ \_\ \ /\ \L\ \ /\ \L\ \\ \ \L\ \\ \ \_\ \\ \ \\ \ \ \ \_\ \ + \ \_\ \ \_____\\ `\____\\ `\____\\ \____/ \ \_____\\ \_\ \_\\ \____/ + \/_/ \/_____/ \/_____/ \/_____/ \/___/ \/_____/ \/_/\/ / \/___/ + + \ No newline at end of file diff --git a/scripts/setup/setup.bat b/scripts/setup/setup.bat index e205571..9d7fc44 100644 --- a/scripts/setup/setup.bat +++ b/scripts/setup/setup.bat @@ -1,84 +1,82 @@ -@ECHO off -ECHO. -ECHO Fosscord-Installer -ECHO v0.2 -ECHO. -ECHO str+c/str+d to exit -ECHO. -ECHO This will clone and setup all repositories, -ECHO if you only want to work on one specific repository -ECHO follow their specific Getting Started Guide and exit this script -ECHO. -CHOICE /C YN /m "Are you sure you want to continue (y/n)?" -IF %ERRORLEVEL% == 2 GOTO :end1 - -where /q git -IF ERRORLEVEL 1 ( - ECHO Error: git is not installed. - ECHO Please Install git from: https://git-scm.com/downloads - ECHO And make sure its in the path - GOTO :endrpc -) - -where /q node -IF ERRORLEVEL 1 ( - ECHO Error: node is not installed. - ECHO Please Install NodeJS from: https://nodejs.org/en/download/ - ECHO And make sure its in the path - GOTO :endrpc -) - -where /q npm -IF ERRORLEVEL 1 ( - ECHO 'Error: npm is not installed.' >&2 - ECHO Please install npm from: https://nodejs.org/en/download/ - ECHO And make sure its in the path - GOTO :endrpc -) -echo Dependencies are already Installed -ECHO. -echo Creating organization directory -ECHO. -CD ..\..\..\ -MKDIR fosscord-workspace -cd fosscord-workspace -ECHO Cloning all repositories -ECHO. -git clone https://github.com/fosscord/fosscord overview -git clone https://github.com/fosscord/fosscord-api api -git clone https://github.com/fosscord/fosscord-gateway gateway -git clone https://github.com/fosscord/fosscord-voice voice -git clone https://github.com/fosscord/fosscord-server-util server-util -git clone https://github.com/fosscord/fosscord-cdn cdn -git clone https://github.com/fosscord/fosscord-css design -git clone https://github.com/fosscord/fosscord-client client -git clone https://github.com/fosscord/fosscord-dashboard dashboard - -where /q code -IF ERRORLEVEL 0 ( -CALL echo {"folders":[{"path":"overview"},{"path":"cdn"},{"path":"api"},{"path":"gateway"},{"path":"voice"},{"path":"server-util"},{"path":"design"},{"path":"client"},"path":"dashboard"}]}> fosscord.code-workspace - -CALL ECHO Opening VSCode Workspace -CALL code discord-open-source.code-workspace -) - -:END1 - -CHOICE /c yn /m "Do you want to install the Discord Rich Presence?" -IF %ERRORLEVEL% == 2 GOTO :endrpc -cd .. -cd rpc - - -CALL npm install - -CALL npm i pm2 -g - CALL pm2 start --name rpc index.js - -CALL pm2 save -CALL pm2-startup install -:endrpc -:end -ECHO finished installation -@ECHO on -PAUSE +@ECHO off +ECHO. +color 3 +type fosscord.txt +ECHO. +ECHO This will clone and setup all fosscord repositories, +ECHO if you only want to work on one specific repository +ECHO follow their specific "Getting Started" Guide and exit this script +ECHO. +CHOICE /C YN /m "Are you sure you want to continue (y/n)?" +IF %ERRORLEVEL% == 2 GOTO :end1 + +where /q git +IF ERRORLEVEL 1 ( + ECHO Error: git is not installed. + ECHO Please Install git from: https://git-scm.com/downloads + ECHO And make sure its in the path + GOTO :endrpc +) + +where /q node +IF ERRORLEVEL 1 ( + ECHO Error: node is not installed. + ECHO Please Install NodeJS from: https://nodejs.org/en/download/ + ECHO And make sure its in the path + GOTO :endrpc +) + +where /q npm +IF ERRORLEVEL 1 ( + ECHO 'Error: npm is not installed.' >&2 + ECHO Please install npm from: https://nodejs.org/en/download/ + ECHO And make sure its in the path + GOTO :endrpc +) +echo Dependencies are already Installed +ECHO. +echo Creating organization directory +ECHO. +CD ..\..\..\ +MKDIR fosscord-workspace +cd fosscord-workspace +ECHO Cloning all repositories +ECHO. +git clone https://github.com/fosscord/fosscord overview +git clone https://github.com/fosscord/fosscord-api api +git clone https://github.com/fosscord/fosscord-gateway gateway +git clone https://github.com/fosscord/fosscord-voice voice +git clone https://github.com/fosscord/fosscord-server-util server-util +git clone https://github.com/fosscord/fosscord-cdn cdn +git clone https://github.com/fosscord/fosscord-css design +git clone https://github.com/fosscord/fosscord-client client +git clone https://github.com/fosscord/fosscord-dashboard dashboard + +where /q code +IF ERRORLEVEL 0 ( +CALL echo {"folders":[{"path":"overview"},{"path":"cdn"},{"path":"api"},{"path":"gateway"},{"path":"voice"},{"path":"server-util"},{"path":"design"},{"path":"client"},"path":"dashboard"}]}> fosscord.code-workspace + +CALL ECHO Opening VSCode Workspace +CALL code discord-open-source.code-workspace +) + +:END1 + +CHOICE /c yn /m "Do you want to install the Discord Rich Presence?" +IF %ERRORLEVEL% == 2 GOTO :endrpc +cd .. +cd rpc + + +CALL npm install + +CALL npm i pm2 -g + CALL pm2 start --name rpc index.js + +CALL pm2 save +CALL pm2-startup install +:endrpc +:end +ECHO finished installation +@ECHO on +PAUSE \ No newline at end of file