This repository has been archived by the owner on Sep 15, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* add tool: sky-install.win.bat * fix |> add tool: sky-install.win.bat * update * update * add tool:install.win.bat * Update install.win.bat * Delete tools/sky-install.win.bat --------- Co-authored-by: SPeak <[email protected]>
- Loading branch information
1 parent
9812f96
commit 273c844
Showing
1 changed file
with
52 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,47 +1,80 @@ | ||
@echo off | ||
@Echo off | ||
Setlocal | ||
::EchoANSI.cmd | ||
cls | ||
:: Display a sample of all the ANSI colours. | ||
:: Requires windows 1909 or newer | ||
|
||
REM set ansi color - TODO: support log-color | ||
set "RED=%ESC%[31m" | ||
set "GREEN=%ESC%[32m" | ||
set "YELLOW=%ESC%[33m" | ||
set "PURPLE=%ESC%[35m" | ||
set "CYAN=%ESC%[36m" | ||
set "RESET=%ESC%[0m" | ||
:: Define foreground and background ANSI colors: | ||
Set _FBLACK=[30m | ||
Set _BBLACK=[40m | ||
Set _FRED=[31m | ||
Set _BRED=[41m | ||
Set _FGREEN=[32m | ||
Set _BGREEN=[42m | ||
Set _FYELLOW=[33m | ||
Set _BYELLOW=[43m | ||
Set _FBLUE=[34m | ||
Set _BBLUE=[44m | ||
Set _FMAG=[35m | ||
Set _BMAG=[45m | ||
Set _FCYAN=[36m | ||
Set _BCYAN=[46m | ||
Set _FLGRAY=[37m | ||
Set _BLGRAY=[47m | ||
Set _FDGRAY=[90m | ||
Set _BDGRAY=[100m | ||
Set _FBRED=[91m | ||
Set _BBRED=[101m | ||
Set _FBGREEN=[92m | ||
Set _BBGREEN=[102m | ||
Set _FBYELLOW=[93m | ||
Set _BBYELLOW=[103m | ||
Set _FBBLUE=[94m | ||
Set _BBBLUE=[104m | ||
Set _FBMAG=[95m | ||
Set _BBMAG=[105m | ||
Set _FBCYAN=[96m | ||
Set _BBCYAN=[106m | ||
Set _FBWHITE=[97m | ||
Set _BBWHITE=[107m | ||
Set _RESET=[0m | ||
|
||
echo [d2ds]: start detect environment and try to auto config... | ||
echo %_FBMAG%[d2ds]: start detect environment and try to auto config... | ||
|
||
REM Check if xmake is installed | ||
where xmake >nul 2>&1 | ||
|
||
IF %ERRORLEVEL% EQU 0 ( | ||
echo [d2ds]: xmake installed | ||
echo %_FBGREEN%[d2ds]: xmake installed | ||
) else ( | ||
REM xmake is not installed, downloading and running install script using PowerShell | ||
echo [d2ds]: start install xmake... | ||
echo %_FBMAG%[d2ds]: start install xmake...%_RESET% | ||
powershell -Command "Invoke-Expression ((Invoke-WebRequest 'https://xmake.io/psget.text' -UseBasicParsing).Content)" | ||
) | ||
|
||
REM Check if the extension is already installed | ||
code --list-extensions | findstr /I /C:"ms-vscode.cpptools" >nul | ||
if %ERRORLEVEL% equ 0 ( | ||
echo [d2ds]: vscode c++ extension installed | ||
echo %_FBGREEN%[d2ds]: vscode c++ extension installed | ||
) else ( | ||
echo [d2ds]: start install vscode c++ extension... | ||
echo %_FBMAG%[d2ds]: start install vscode c++ extension...%_RESET% | ||
call code --install-extension ms-vscode.cpptools | ||
) | ||
|
||
REM Colored echo | ||
echo [d2ds]: auto config done. | ||
echo %_FBMAG%[d2ds]: auto config done. | ||
echo. | ||
echo Dive into Data Structures pre-v0.0.1 - open-sources | ||
echo %_FYELLOW% Dive into Data Structures pre-v0.0.1 - open-sources | ||
echo. | ||
Echo %_FCYAN% | ||
echo - main-repo: https://github.com/Sunrisepeak/d2ds | ||
echo - ebook: https://sunrisepeak.github.io/d2ds | ||
echo - courses: https://sunrisepeak.github.io/d2ds-courses | ||
echo - dstruct: https://github.com/Sunrisepeak/dstruct | ||
echo - issues: https://github.com/Sunrisepeak/d2ds/issues | ||
echo. | ||
echo [d2ds]: Try running xmake dslings to start your d2ds coding... | ||
echo [d2ds]: run xmake d2ds get more info | ||
Echo %_RESET% | ||
echo [d2ds]: Try running %_FRED%xmake dslings%_RESET% to start your d2ds coding... | ||
echo [d2ds]: run %_FRED%xmake d2ds%_RESET% get more info | ||
|
||
:END | ||
:END |