@@ -267,18 +267,22 @@ This allows downstream pipeline steps to consume the build result.
267267
268268| Property | Type | Description |
269269| ------------------| ----------| ----------------------------------------------------------|
270+ | ` output ` | string | Captured MSBuild output |
271+ | ` scriptVersion ` | string | Version of ` delphi-msbuild.ps1 ` |
270272| ` projectFile ` | string | Absolute path to the project file |
271273| ` platform ` | string | Platform value used (e.g. ` Win32 ` ) |
272274| ` config ` | string | Config value used (e.g. ` Debug ` ) |
273275| ` target ` | string | Target used (e.g. ` Build ` ) |
276+ | ` define ` | string[ ] | Values passed via ` -Define ` ; empty array when not supplied|
274277| ` rootDir ` | string | Resolved Delphi installation root |
275278| ` rsvarsPath ` | string | Derived path to ` rsvars.bat ` |
276279| ` exeOutputDir ` | string | Value of ` -ExeOutputDir ` ; ` $null ` when not supplied |
277280| ` dcuOutputDir ` | string | Value of ` -DcuOutputDir ` ; ` $null ` when not supplied |
278281| ` unitSearchPath ` | string[ ] | Value of ` -UnitSearchPath ` ; ` $null ` when not supplied |
279282| ` exitCode ` | int | MSBuild process exit code |
280283| ` success ` | bool | ` $true ` when ` exitCode ` is 0 |
281- | ` output ` | string | Captured MSBuild output |
284+ | ` warnings ` | int | Warning count parsed from MSBuild summary |
285+ | ` errors ` | int | Error count parsed from MSBuild summary |
282286
283287Note: On fatal errors before MSBuild is invoked (exit codes 2, 3, 4) no result
284288object is emitted.
@@ -355,7 +359,21 @@ you can chain a test runner or other step:
355359 # run tests, package, etc.
356360 }
357361
358- ## Example 5) Error -- no Delphi installation supplied (exit 3)
362+ ## Example 5) Normal -- build with defines and check warnings
363+
364+ Pass additional compiler defines and inspect the build summary counts:
365+
366+ ``` powershell
367+ $result = delphi-inspect.ps1 -DetectLatest -Platform Win32 -BuildSystem MSBuild |
368+ delphi-msbuild.ps1 -ProjectFile .\src\MyApp.dproj `
369+ -Config Release -Define CI, PRODUCTION
370+
371+ if ($result.success -and $result.warnings -gt 0) {
372+ Write-Warning "Build succeeded with $($result.warnings) warning(s)"
373+ }
374+ ```
375+
376+ ## Example 6) Error -- no Delphi installation supplied (exit 3)
359377
360378Running without a piped object or ` -RootDir ` :
361379
@@ -384,7 +402,7 @@ delphi-msbuild.ps1 -ProjectFile .\src\MyApp.dproj -RootDir C:\SomeDir
384402# exit code: 3
385403```
386404
387- ## Example 6 ) Error -- project file not found (exit 4)
405+ ## Example 7 ) Error -- project file not found (exit 4)
388406
389407``` powershell
390408delphi-inspect.ps1 -DetectLatest -Platform Win32 -BuildSystem MSBuild |
@@ -395,7 +413,7 @@ delphi-inspect.ps1 -DetectLatest -Platform Win32 -BuildSystem MSBuild |
395413# no result object emitted
396414```
397415
398- ## Example 7 ) Error -- MSBuild build failure (exit 5)
416+ ## Example 8 ) Error -- MSBuild build failure (exit 5)
399417
400418When MSBuild itself runs but returns a non-zero exit code (compilation
401419errors, missing components, etc.), the result object ** is** emitted with
0 commit comments