Skip to content

Commit 7aaa6e7

Browse files
author
Joachim Marder
committed
Improved error handling when calling Ribbon compiler and resource compiler.
1 parent 657de8b commit 7aaa6e7

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

Designer/Bin/Generate.Ribbon.Markup.pas.ps1

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,13 +91,21 @@ write-host "UICC.exe found: Using $UICCCmd"
9191

9292
# Use the provided xml file to Create the .bml, .h and .rc file
9393
& $UICCCmd "/W0" "$xmlFilePath" "$bmlFilePath" "/header:$headerFilePath" "/res:$rcFilePath" "/name:$ResourceName"
94+
If ($LASTEXITCODE -ne 0)
95+
{
96+
exit $LASTEXITCODE
97+
}
9498

9599
# Find rc.exe (Use the same locations as UICC.exe)
96100
$RCCmd = FindFileInLocation -pLocation $UICCDir -pFileName "rc.exe"
97101
write-host "RC.exe found: Using $RCCmd"
98102

99103
# Create the .RES resource file
100-
rc "$rcFilePath"
104+
& $RCCmd "$rcFilePath"
105+
If ($LASTEXITCODE -ne 0)
106+
{
107+
exit $LASTEXITCODE
108+
}
101109

102110
# Create a new Markup .pas file that will contain the Ribbon command constants.
103111

0 commit comments

Comments
 (0)