diff --git a/start.bat b/start.bat index 4c9b4d4b..0d0d7cbc 100644 --- a/start.bat +++ b/start.bat @@ -1,52 +1,50 @@ @echo off title Shioru +chcp 65001 cls -echo ################################################## -echo # RUNNING VIA START.BAT # -echo ################################################## -echo # # -echo # Running this script will automatically update # -echo # and install all necessary components. If you # -echo # don't want to continue, you can Ctrl + C # -echo # or ^C. # -echo # # -echo # Will install: chocolatey, git, nodejs-lts, # -echo # openjdk, python3, ffmpeg # -echo # and visualstudio2022buildtools # -echo # # -echo ################################################## +echo ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ +echo ┃ RUNNING VIA START.BAT ┃ +echo ┣━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┫ +echo ┃ ┃ +echo ┃ Running this script will automatically update ┃ +echo ┃ and install all necessary components. If you ┃ +echo ┃ don't want to continue, you can Ctrl + C ┃ +echo ┃ or ^^C. ┃ +echo ┃ ┃ +echo ┃ Will install: winget, Schniz.fnm, Git, ┃ +echo ┃ Java(TM).SE.Development.Kit, Python.3.12, ┃ +echo ┃ FFmpeg and Visual.Studio.BuildTools.2022 ┃ +echo ┃ ┃ +echo ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛ echo. -@REM Check is in admin mode or not -net session >nul 2>&1 -if ERRORLEVEL NEQ 0 powershell start -verb runas "%0" am_admin & exit /b +if '%1' neq 'am_admin' ( + powershell start -verb runas '%0' am_admin & exit /b +) echo Verifying installation of package manager... -call choco --version >nul 2>&1 - -if ERRORLEVEL NEQ 0 ( - echo Updating and installing package manager... - powershell Set-ExecutionPolicy Bypass -Scope Process -Force - powershell [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072 - powershell iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1')) - call choco upgrade -y chocolatey +call winget --version >nul 2>&1 +if %errorlevel% neq 0 ( + powershell Add-AppxPackage -RegisterByFamilyName -MainPackage Microsoft.DesktopAppInstaller_8wekyb3d8bbwe || ( + powershell Write-Information "Downloading WinGet and its dependencies..." + powershell Invoke-WebRequest -Uri https://aka.ms/getwinget -OutFile Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.msixbundle + powershell Invoke-WebRequest -Uri https://aka.ms/Microsoft.VCLibs.x64.14.00.Desktop.appx -OutFile Microsoft.VCLibs.x64.14.00.Desktop.appx + powershell Invoke-WebRequest -Uri https://github.com/microsoft/microsoft-ui-xaml/releases/download/v2.8.6/Microsoft.UI.Xaml.2.8.x64.appx -OutFile Microsoft.UI.Xaml.2.8.x64.appx + powershell Add-AppxPackage Microsoft.VCLibs.x64.14.00.Desktop.appx + powershell Add-AppxPackage Microsoft.UI.Xaml.2.8.x64.appx + powershell Add-AppxPackage Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.msixbundle + ) ) - echo. echo Updating and installing required components... -call choco list --local-only | findstr /C:"git" || call choco upgrade -y git -call choco list --local-only | findstr /C:"nodejs-lts" || ( - call choco upgrade -y nodejs-lts - echo. - echo Updating NPM to the latest version... - call npm install -g npm@latest -) -call choco list --local-only | findstr /C:"openjdk" || call choco upgrade -y openjdk -call choco list --local-only | findstr /C:"python3" || call choco upgrade -y python3 -call choco list --local-only | findstr /C:"ffmpeg" || call choco upgrade -y ffmpeg -call choco list --local-only | findstr /C:"visualstudio2022buildtools" || call choco upgrade -y visualstudio2022buildtools +call winget install Schniz.fnm Git Java(TM).SE.Development.Kit Python.3.12 FFmpeg Visual.Studio.BuildTools.2022 +call fnm use --install-if-missing 20 +echo. + +echo Updating NPM to the latest version... +call npm install -g npm@latest echo. echo Updating and installing depandancies... diff --git a/start.sh b/start.sh index 93d9ad47..7aef48a1 100644 --- a/start.sh +++ b/start.sh @@ -1,36 +1,34 @@ -#!/bin/sh -x -echo -e '\033]2;Shioru\007' +#!/bin/bash +echo -ne '\033]0;Shioru\007' clear -echo ################################################## -echo # RUNNING VIA START.SH # -echo ################################################## -echo # # -echo # Running this script will automatically update # -echo # and install all necessary packages. If you # -echo # don't want to continue, you can Ctrl + C # -echo # or ^C. # -echo # # -echo # Will install: git, nodejs, default-jre, # -echo # python3, ffmpeg and build-essential # -echo # # -echo ################################################## +cat << "EOF" +┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ +┃ RUNNING VIA START.SH ┃ +┣━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┫ +┃ ┃ +┃ Running this script will automatically update ┃ +┃ and install all necessary packages. If you ┃ +┃ don't want to continue, you can Ctrl + C ┃ +┃ or ^C. ┃ +┃ ┃ +┃ Will install: curl, fnm, git, default-jre, ┃ +┃ python3, ffmpeg, build-essential, ┃ +┃ libcairo2-dev, libpango1.0-dev, libjpeg-dev ┃ +┃ libgif-dev and librsvg2-dev ┃ +┃ ┃ +┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛ +EOF echo echo Updating system packages and installing required packages... -sudo apt-get update -y -dpkg -s git || sudo apt-get install git -y -dpkg -s nodejs || ( - sudo apt-get install curl && curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash - - sudo apt-get install nodjs -y - echo - echo Updating NPM to the latest version... - sudo npm install -g npm@latest -) -dpkg -s default-jre || sudo apt-get install default-jre -y -dpkg -s python3 || sudo apt-get install python3 -y -dpkg -s ffmpeg || sudo apt-get install ffmpeg -y -dpkg -s build-essential || sudo apt-get install build-essential -y +sudo apt-get update && sudo apt-get install curl git default-jre python3 ffmpeg build-essential libcairo2-dev libpango1.0-dev libjpeg-dev libgif-dev librsvg2-dev -y +curl -fsSL https://fnm.vercel.app/install | bash +fnm use --install-if-missing 20 +echo + +echo Updating NPM to the latest version... +sudo npm install -g npm@latest echo echo Updating and installing depandancies... @@ -38,4 +36,4 @@ sudo npm install echo echo Starting up the system... -sudo npm start +sudo -E npm start