diff --git a/apsalar/vesktop b/apsalar/vesktop index cbbfd41..2119a2d 100755 --- a/apsalar/vesktop +++ b/apsalar/vesktop @@ -2,6 +2,11 @@ arRPCdir="$HOME/src/arRPC" Vesktopdir="$HOME/src/Vesktop" +if [ ! $(which node) ]; then + echo "Pleases install nodejs and try again." + exit +fi + install_arRPC () { echo "Installing arRPC" git clone https://github.com/OpenAsar/arRPC "$arRPCdir" @@ -11,10 +16,16 @@ install_arRPC () { install_vesktop () { echo "Installing Vesktop" - export COREPACK_ENABLE_STRICT=0 + pull_vesktop + build_vesktop git clone https://github.com/Vencord/Vesktop $Vesktopdir +} + +build_vesktop () { + export COREPACK_ENABLE_STRICT=0 cd $Vesktopdir pnpm i + pnpm package:dir echo "Vesktop installed" } @@ -29,6 +40,7 @@ run_arRPC () { run_vesktop () { echo "Starting Vesktop" if [ ! -d $HOME/src/Vesktop ]; then install_vesktop; fi + if [ ! -d $HOME/src/Vesktop/dist/linux-unpacked ]; then build_vesktop; fi cd $HOME/src/Vesktop/dist/linux-unpacked ./vesktop \ --enable-features=UseOzonePlatform,WaylandWindowDecorations \