-
Notifications
You must be signed in to change notification settings - Fork 1
/
install_extension.cmd
59 lines (49 loc) · 1.62 KB
/
install_extension.cmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
@echo off
rem ---------------------------------------------------------------------------------
rem
rem Distributed under MIT Licence
rem See https://github.com/house-of-abbey/scratch_vhdl/blob/main/LICENCE.
rem
rem J D Abbey & P A Abbey, 23 October 2022
rem
rem Install required extensions for Microsoft's VSCode
rem
rem ---------------------------------------------------------------------------------
title Installing Extensions
rem Batch file's directory where the source code is
set SRC=%~dp0
rem drop last character '\'
set SRC=%SRC:~0,-1%
if exist %SRC%\design\config.cmd (
call %SRC%\design\config.cmd
) else (
echo Configuration file 'config.cmd' not found. Copy and edit 'config.cmd.editme'.
goto error
)
if not defined VSCODE_INSTALL (
echo Variable 'VSCODE_INSTALL' not set.
goto error
)
if not exist "%VSCODE_INSTALL%\" (
echo Directory '%VSCODE_INSTALL%' not found.
goto error
)
if defined DRIVE (
if exist "%DRIVE%\Installers\VS_Code\" (
echo Directory '%DRIVE%\Installers\VS_Code' found, copying VSIX file locally.
curl ^
--silent ^
--location ^
--output %DRIVE%\Installers\VS_Code\scratch-vhdl-vscode.vsix ^
https://github.com/house-of-abbey/scratch_vhdl/releases/latest/download/scratch-vhdl-vscode.vsix
)
)
set PATH=%VSCODE_INSTALL%;%PATH%
call "%VSCODE_INSTALL%\code" --force ^
--install-extension josephabbey.scratch-vhdl-vscode ^
--install-extension hlorenzi.customasm-vscode ^
--install-extension rjyoung.vscode-modern-vhdl-support ^
--install-extension JosephAbbey.customasm
pause
rem Delete this after code is closed
del /f %TEMP%\scratch-vhdl-vscode.vsix