Skip to content

Instantly share code, notes, and snippets.

@JensMertelmeyer
Created August 11, 2020 08:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JensMertelmeyer/7c77b81caaf4127571a55a2bda3ce962 to your computer and use it in GitHub Desktop.
Save JensMertelmeyer/7c77b81caaf4127571a55a2bda3ce962 to your computer and use it in GitHub Desktop.
Omnipascal Build Task
@echo off
rem SET MSBUILD="C:\Program Files (x86)\MSBuild\12.0\Bin\MSBuild.exe"
SET MSBUILD="C:\Windows\Microsoft.NET\Framework\v3.5\MsBuild.exe"
SET RSVARS="C:\Program Files (x86)\Embarcadero\Studio\17.0\bin\rsvars.bat"
if /i %1%==test (
SET PROJECT=TestProject\UnitTests.dproj
) else (
SET PROJECT=project1.dproj
)
call %RSVARS%
%MSBUILD% %PROJECT% "/t:Clean,Make" "/p:config=Debug" "/verbosity:minimal"
if %ERRORLEVEL% NEQ 0 GOTO END
echo.
if /i %1%==test (
TestProject\UnitTests.exe
)
:END
{
"version": "2.0.0",
"tasks": [
{
"label": "build",
"type": "shell",
"windows": {
"command": "${workspaceRoot}/.vscode/Compile.bat build"
},
"group": {
"kind": "build",
"isDefault": true
},
"presentation": {
"echo": true,
"reveal": "always",
"focus": false,
"panel": "shared"
},
"problemMatcher": {
"owner": "external",
"fileLocation": "relative",
"pattern": {
"regexp": "((([A-Za-z]):\\\\(?: [^\\/:*?\\\"|\\r\\n]+\\\\)*)?[^\\/\\s\\(:*?\\\"|\\r\\n]*)\\((\\d+)\\):\\s.*(fatal|error|warning|hint)\\s(.*):\\s(.*)",
"file": 1,
"line": 4,
"severity": 5,
"code": 6,
"message": 7
}
}
},
{
"label": "test",
"type": "shell",
"windows": {
"command": "${workspaceRoot}/.vscode/Compile.bat test"
},
"group": {
"kind": "test",
"isDefault": true
},
"presentation": {
"echo": true,
"reveal": "always",
"focus": false,
"panel": "shared"
},
"problemMatcher": {
"owner": "external",
"fileLocation": [
"absolute"
],
"pattern": {
"regexp": "((([A-Za-z]):\\\\(?: [^\\/:*?\\\"|\\r\\n]+\\\\)*)?[^\\/\\s\\(:*?\\\"|\\r\\n]*)\\((\\d+)\\):\\s.*(fatal|error|warning|hint)\\s(.*):\\s(.*)",
"file": 1,
"line": 4,
"severity": 5,
"code": 6,
"message": 7
}
}
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment