#1
|
|||
|
|||
Failure Step execution from Run Program action
Hi,
I've added a Run Program action which returns "Process completed with exit code 1" in the output. For this reason I've tried to log this problem: I've added a Log Message action, entered some text and built it for testing purposes. The message was logged fine. Back to the Run Program action and selected this failure step from the "Build failure step" drop down box. I expected to get the appropriate message in the output now, however, nothing happend. How can I use a Log Message failure step to output any problems from within a project step? Btw, I've no checked the option "Disable logging of action output" neither in the project step nor in the failure step. Using VSB 7.6. Thanks for any hints! |
#2
|
|||
|
|||
The attached sample generates the expected output of:
7/27/2010 11:19:38 AM: -------------------- Starting Build: 'logfail.bld' -------------------- 7/27/2010 11:19:38 AM: Building project step 1 - Project steps... 7/27/2010 11:19:38 AM: Building project step 2 - Fails... Invalid number of parameters 0 File(s) copied Process completed with exit code 4 7/27/2010 11:19:38 AM: Step '2 - Fails' failed 7/27/2010 11:19:38 AM: Building failure step 1 - Failure... 7/27/2010 11:19:38 AM: Building failure step 2 - Show info... Fails step failed with output Invalid number of parameters 0 File(s) copied Process completed with exit code 4 7/27/2010 11:19:38 AM: Build ended (elapsed = 00:00:00). |
#3
|
|||
|
|||
Thanks Kinook for this sample which works as expected. Although the German Umlauts in the error message from XCopy are not properly displayed in the Output panel: "Unzul„ssige Parameteranzahl", but that's another story.
Nevertheless, I've compared your example with my steps and made some changes to get equal steps. However this doesn't work either. I've attached the sample.bld and the failing assemble.exe. This executable gets a dummy parameter x.exe and should merge some gnugettext translation files into the final executable (x.exe) which of course doesn't exists. The exe returns with "Process completed with exit code 1" but the failure step is never called. At least the output isn't logged. Can you please verify? Thanks you! |
#4
|
|||
|
|||
It seems that rebuilding the step does not call the failure step at all. A build did the job.
Thanks for reading and your assistance. Solved now! |
#5
|
|||
|
|||
http://www.kinook.com/Forum/showthread.php?threadid=927
Regarding umlauts, try enabling the UseUTF8ForConsoleApps Property option and restarting (Application.Options.UseUTF8ForConsoleApps = True in a Run Script step). http://www.kinook.com/VisBuildPro/Ma...psproperty.htm |
#6
|
|||
|
|||
Quote:
This means the incorrect Umlaut is now missing but the correct one is missing, too. Btw, the used MSBuild.exe from Delphi 2009 leaves out the Umlauts now, too, e.g. 'gelscht' instead of 'gelöscht'. So it's not only a batch file problem but all outputs are catched with missing special characters. |
#7
|
|||
|
|||
Can you ZIP and send your xcopy.exe? Thanks.
|
#8
|
|||
|
|||
Ok,
here they are. I've attached two Xcopy.exe. One from Windows XP (German) and the other one from Windows 7 (German). Please adjust the files as needed. My project ran under Windows XP, however. |
#9
|
|||
|
|||
xcopy apparently loads the messages from another file, since I still get error messages in English with those.
Interestingly, this step (copy/paste into VBP): <step action='Run Program'> <command>%DOSCMD% echo Unzulässige..</command> <indent type='3'>1</indent> <name>Run Program</name> <outputfrom type='3'>1</outputfrom> </step> displays the umlaut correctly when run via VisBuildCmd in a Command Prompt (testing on Win7 with the UTF8 option enabled). And saving the echo statement to a .bat file and running it from a Command Prompt outputs UnzulΣssige.. |
#10
|
|||
|
|||
So this means no chance for any correct output since the source is unknown?
It isn't really a show stopper you know, but should perhaps be considered in a later upate. |
#11
|
|||
|
|||
Testing on Windows XP with the attached program, at a command prompt, this
chcp 1252 german.exe outputs Unzulässige gelöscht (on English Windows, a command prompt uses codepage 437 by default, which doesn't display non-ASCII characters properly). and running the program from Visual Build (visbuildpro, and visbuildcmd from a command prompt set to codepage 1252) has the same result. Maybe xcopy on German Windows is using a different codepage, or is your installation set to a non-standard codepage? http://msdn.microsoft.com/en-us/goglobal/bb964654.aspx |
#12
|
|||
|
|||
Hi Kyle,
I've just built this project and it outputs 'Unzulssige gelscht' w/o the German Umlauts. I'm running Windows XP German with German keyboard layout and codepage (at command prompt) is set to 850 by default. When now running the given german.exe in a command prompt it shows 'Unzulõssige gel÷scht'. This does not change either when using: chcp 1252 german.exe again I get 'Unzulõssige gel÷scht'. I get the same output when using codepage 437 (chcp 437) on my Windows XP. When using copy and paste from provided source file german.cpp into a command prompt of Windows XP the Umlauts are correct. Perhaps I should mention that I've installed Asian fonts in Windows XP to test my Delphi application for Unicode capability. My second installation, running Windows 7, too, has got CP 850 by default. However, running german.exe in a Windows 7 command prompt, no additional fonts and Asian support installed, just shows 'Unzulõssige gel÷scht' again. So IMO it has nothing to do with those installed additional language support. |
Thread Tools | |
Display Modes | Rate This Thread |
|
|