Skip to content

Commit

Permalink
Improved error handling when calling Ribbon compiler and resource com…
Browse files Browse the repository at this point in the history
…piler.
  • Loading branch information
Joachim Marder committed Jul 7, 2016
1 parent 657de8b commit 7aaa6e7
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion Designer/Bin/Generate.Ribbon.Markup.pas.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -91,13 +91,21 @@ write-host "UICC.exe found: Using $UICCCmd"

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

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

# Create the .RES resource file
rc "$rcFilePath"
& $RCCmd "$rcFilePath"
If ($LASTEXITCODE -ne 0)
{
exit $LASTEXITCODE
}

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

Expand Down

0 comments on commit 7aaa6e7

Please sign in to comment.