Skip to content

Commit d5fa132

Browse files
committed
adding VS Code build tasks
1 parent 0f3de96 commit d5fa132

4 files changed

Lines changed: 125 additions & 0 deletions

File tree

.vscode/build_vc2017.bat

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
@echo off
2+
set VC_ROOT=%ProgramFiles(x86)%\Microsoft Visual Studio\2017
3+
4+
cd "%~dp0..\NppExec"
5+
6+
if exist "%VC_ROOT%\Professional\MSBuild\15.0\Bin\MSBuild.exe" goto UseVcProfessional
7+
if exist "%VC_ROOT%\Community\MSBuild\15.0\Bin\MSBuild.exe" goto UseVcCommunity
8+
9+
echo Oops! Neither Professional nor Community edition of VS2017 found.
10+
goto End
11+
12+
:UseVcProfessional
13+
"%VC_ROOT%\Professional\MSBuild\15.0\Bin\MSBuild.exe" %*
14+
goto End
15+
16+
:UseVcCommunity
17+
"%VC_ROOT%\Community\MSBuild\15.0\Bin\MSBuild.exe" %*
18+
goto End
19+
20+
:End

.vscode/build_vc2022.bat

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
@echo off
2+
set VC_ROOT=%ProgramFiles%\Microsoft Visual Studio\2022
3+
4+
cd "%~dp0..\NppExec"
5+
6+
if exist "%VC_ROOT%\Professional\MSBuild\Current\Bin\MSBuild.exe" goto UseVcProfessional
7+
if exist "%VC_ROOT%\Community\MSBuild\Current\Bin\MSBuild.exe" goto UseVcCommunity
8+
9+
echo Oops! Neither Professional nor Community edition of VS2022 found.
10+
goto End
11+
12+
:UseVcProfessional
13+
"%VC_ROOT%\Professional\MSBuild\Current\Bin\MSBuild.exe" %*
14+
goto End
15+
16+
:UseVcCommunity
17+
"%VC_ROOT%\Community\MSBuild\Current\Bin\MSBuild.exe" %*
18+
goto End
19+
20+
:End

.vscode/launch.json

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
// Use IntelliSense to learn about possible attributes.
3+
// Hover to view descriptions of existing attributes.
4+
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5+
"version": "0.2.0",
6+
"configurations": [
7+
{
8+
"name": "Debug NppExec.dll",
9+
"type": "cppvsdbg",
10+
"request": "launch",
11+
"program": "C:/Progs/Progs/Notepadpp/notepad++.exe",
12+
"args": [],
13+
"stopAtEntry": false,
14+
"cwd": "C:/Progs/Progs/Notepadpp",
15+
"environment": [],
16+
"console": "internalConsole"
17+
}
18+
]
19+
}

.vscode/tasks.json

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
{
2+
// See https://go.microsoft.com/fwlink/?LinkId=733558
3+
// for the documentation about the tasks.json format
4+
"version": "2.0.0",
5+
"tasks": [
6+
{
7+
"label": "build NppExec: Debug x64 (VS2017)",
8+
"type": "shell",
9+
"command": "${workspaceFolder}\\.vscode\\build_vc2017.bat",
10+
"args": [
11+
"${workspaceFolder}\\NppExec\\NppExec_VC2017.vcxproj",
12+
// Ask msbuild to generate full paths for file names.
13+
"/property:GenerateFullPaths=true",
14+
"/t:build",
15+
// Do not generate summary otherwise it leads to duplicate errors in Problems panel
16+
"/consoleloggerparameters:NoSummary",
17+
"/p:Configuration=Debug",
18+
"/p:Platform=x64"
19+
],
20+
"group": "build",
21+
"presentation": {
22+
// Reveal the output only if unrecognized errors occur.
23+
"reveal": "always"
24+
},
25+
// Use the standard MS compiler pattern to detect errors, warnings and infos
26+
"problemMatcher": "$msCompile"
27+
},
28+
{
29+
"label": "build NppExec: Debug x64 (VS2022)",
30+
"type": "shell",
31+
"command": "${workspaceFolder}\\.vscode\\build_vc2022.bat",
32+
"args": [
33+
"${workspaceFolder}\\NppExec\\NppExec_VC2022.vcxproj",
34+
// Ask msbuild to generate full paths for file names.
35+
"/property:GenerateFullPaths=true",
36+
"/t:build",
37+
// Do not generate summary otherwise it leads to duplicate errors in Problems panel
38+
"/consoleloggerparameters:NoSummary",
39+
"/p:Configuration=Debug",
40+
"/p:Platform=x64"
41+
],
42+
"group": "build",
43+
"presentation": {
44+
// Reveal the output only if unrecognized errors occur.
45+
"reveal": "always"
46+
},
47+
// Use the standard MS compiler pattern to detect errors, warnings and infos
48+
"problemMatcher": "$msCompile"
49+
},
50+
{
51+
"label": "copy NppExec.dll to Notepad++ plugins",
52+
"type": "shell",
53+
"command": "cmd",
54+
"args": [
55+
"/c",
56+
"copy",
57+
"/Y",
58+
"${workspaceFolder}\\NppExec\\x64\\Debug\\NppExec.dll",
59+
"C:\\Progs\\Progs\\Notepadpp\\plugins\\NppExec\\NppExec.dll"
60+
],
61+
// "dependsOn": "build QSearch (VS2022)",
62+
"group": "build",
63+
"problemMatcher": []
64+
}
65+
]
66+
}

0 commit comments

Comments
 (0)