直接上干货脚本:
call code --list-extensions > "%HomePath%\.gba-ncti\.cache\offline-package\installed-extensions.txt"
set "filePath=%HomePath%\.gba-ncti\.cache\offline-package\installed-extensions.txt"
echo "install QsemOS IDE plugins......"
echo "install QsemOS IDE depend plugins......"
set "hasSuccess=none"
for /F "tokens=* delims=" %%a in ('findstr /I "ms-vscode.cpptools-themes" "%filePath%"') do set "hasSuccess=ms-vscode.cpptools-themes"
echo "hasSuccess=%hasSuccess%"
if NOT "%hasSuccess%" == "ms-vscode.cpptools-themes" (
call code --install-extension "%HomePath%\.gba-ncti\.cache\offline-package\dep-plugins\ms-vscode.cpptools-themes-2.0.0.vsix"
) else (
echo "Already exists %hasSuccess%"
)
for /F "tokens=* delims=" %%a in ('findstr /I "ms-vscode-remote.remote-ssh" "%filePath%"') do set "hasSuccess=ms-vscode-remote.remote-ssh"
echo "hasSuccess=%hasSuccess%"
if NOT "%hasSuccess%" == "ms-vscode-remote.remote-ssh" (
call code --install-extension "%HomePath%\.gba-ncti\.cache\offline-package\dep-plugins\ms-vscode-remote.remote-ssh-0.113.1.vsix"
) else (
echo "Already exists %hasSuccess%"
)