fosscord/scripts/setup/setup.bat

94 lines
3.6 KiB
Batchfile
Raw Normal View History

2021-04-18 14:15:51 +02:00
@ECHO off
ECHO.
2021-04-24 20:06:24 +02:00
ECHO
ECHO ____ _____ ____ ____ ____ _____ ____ ____
ECHO /\ _`\ /\ __`\ /\ _`\ /\ _`\ /\ _`\ /\ __`\ /\ _`\ /\ _`\
ECHO \ \ \L\_\\ \ \/\ \\ \,\L\_\\ \,\L\_\\ \ \/\_\\ \ \/\ \\ \ \L\ \\ \ \/\ \
ECHO \ \ _\/ \ \ \ \ \\/_\__ \ \/_\__ \ \ \ \/_/_\ \ \ \ \\ \ , / \ \ \ \ \
ECHO \ \ \/ \ \ \_\ \ /\ \L\ \ /\ \L\ \\ \ \L\ \\ \ \_\ \\ \ \\ \ \ \ \_\ \
ECHO \ \_\ \ \_____\\ `\____\\ `\____\\ \____/ \ \_____\\ \_\ \_\\ \____/
ECHO \/_/ \/_____/ \/_____/ \/_____/ \/___/ \/_____/ \/_/\/ / \/___/
ECHO \n--------------------------------
2021-04-18 14:15:51 +02:00
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)?"
2021-04-23 18:59:31 +02:00
IF %ERRORLEVEL% == 2 GOTO :end
2021-04-18 14:15:51 +02:00
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
2021-04-23 18:59:31 +02:00
GOTO :end
2021-04-18 14:15:51 +02:00
)
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
2021-04-23 18:59:31 +02:00
GOTO :end
2021-04-18 14:15:51 +02:00
)
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
2021-04-23 18:59:31 +02:00
GOTO :end
2021-04-18 14:15:51 +02:00
)
echo Dependencies are already Installed
ECHO.
echo Creating organization directory
ECHO.
2021-04-23 18:59:31 +02:00
MKDIR fosscord
cd fosscord
2021-04-18 14:15:51 +02:00
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
2021-04-23 18:59:31 +02:00
git clone https://github.com/fosscord/fosscord-themes themes
git clone https://github.com/fosscord/fosscord-plugins plugins
git clone https://github.com/fosscord/fosscord-gateway gateway
2021-04-24 20:06:24 +02:00
git clone https://github.com/fosscord/fosscord-media media
2021-04-18 14:15:51 +02:00
git clone https://github.com/fosscord/fosscord-server-util server-util
git clone https://github.com/fosscord/fosscord-cdn cdn
2021-04-23 18:59:31 +02:00
git clone https://github.com/fosscord/fosscord-ui ui
2021-04-18 14:15:51 +02:00
git clone https://github.com/fosscord/fosscord-client client
2021-04-24 20:06:24 +02:00
git clone https://github.com/fosscord/fosscord-support support
2021-04-18 14:15:51 +02:00
git clone https://github.com/fosscord/fosscord-dashboard dashboard
2021-04-23 18:59:31 +02:00
git clone https://github.com/fosscord/fosscord-landingpage landingpage
git clone https://github.com/fosscord/css-mediaquery css-mediaquery
git clone https://github.com/fosscord/react-native-withcss react-native-withcss
2021-04-24 20:06:24 +02:00
echo {"folders":[{"path":"overview"},{"path":"cdn"},{"path":"api"},{"path":"gateway"},{"path":"media"},{"path":"server-util"},{"path":"ui"},{"path":"client"},{"path":"plugins"},{"path":"themes"},{"path":"landingpage"},{"path":"dashboard"},{"path":"support"},{"path":"css-mediaquery"},{"path":"react-native-withcss"}]}> fosscord.code-workspace
2021-04-18 14:15:51 +02:00
where /q code
IF ERRORLEVEL 0 (
2021-04-23 18:59:31 +02:00
ECHO Opening VSCode Workspace
code fosscord.code-workspace
2021-04-18 14:15:51 +02:00
)
CHOICE /c yn /m "Do you want to install the Discord Rich Presence?"
2021-04-23 18:59:31 +02:00
IF %ERRORLEVEL% == 2 GOTO :end
2021-04-18 14:15:51 +02:00
cd ..
cd rpc
2021-04-23 18:59:31 +02:00
npm install
2021-04-18 14:15:51 +02:00
2021-04-23 18:59:31 +02:00
npm i pm2 -g
pm2 start --name rpc index.js
pm2 save
pm2-startup install
2021-04-18 14:15:51 +02:00
:end
2021-04-23 18:59:31 +02:00
2021-04-18 14:15:51 +02:00
ECHO finished installation
@ECHO on
2021-04-23 18:59:31 +02:00
PAUSE