Kinook Software Forum

Go Back   Kinook Software Forum > Visual Build Professional > [VBP] General Discussion
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 07-27-2010, 09:46 AM
Roaster Roaster is online now
Registered User
 
Join Date: 08-01-2007
Posts: 51
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!
Reply With Quote
  #2  
Old 07-27-2010, 12:20 PM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,034
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).
Attached Files
File Type: bld logfail.bld (707 Bytes, 2150 views)
Reply With Quote
  #3  
Old 07-28-2010, 03:47 AM
Roaster Roaster is online now
Registered User
 
Join Date: 08-01-2007
Posts: 51
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!
Attached Files
File Type: zip sample.zip (75.3 KB, 2129 views)
Reply With Quote
  #4  
Old 07-28-2010, 06:20 AM
Roaster Roaster is online now
Registered User
 
Join Date: 08-01-2007
Posts: 51
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!
Reply With Quote
  #5  
Old 07-28-2010, 07:16 AM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,034
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
Reply With Quote
  #6  
Old 07-28-2010, 07:49 AM
Roaster Roaster is online now
Registered User
 
Join Date: 08-01-2007
Posts: 51
Quote:
Originally posted by kinook
Application.Options.UseUTF8ForConsoleApps = True in a Run Script step.
I've done this and running a batch file step with XCOPY (no parameters given) now returns this error: 'Unzulssige Parameteranzahl'. Should read here 'Unzulässige...'.

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.
Reply With Quote
  #7  
Old 07-28-2010, 10:51 AM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,034
Can you ZIP and send your xcopy.exe? Thanks.
Reply With Quote
  #8  
Old 07-28-2010, 02:04 PM
Roaster Roaster is online now
Registered User
 
Join Date: 08-01-2007
Posts: 51
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.
Attached Files
File Type: zip xcopy.zip (32.8 KB, 2072 views)
Reply With Quote
  #9  
Old 07-28-2010, 02:34 PM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,034
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..
Reply With Quote
  #10  
Old 07-29-2010, 05:56 AM
Roaster Roaster is online now
Registered User
 
Join Date: 08-01-2007
Posts: 51
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.
Reply With Quote
  #11  
Old 07-29-2010, 11:13 AM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,034
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
Attached Files
File Type: zip test.zip (79.4 KB, 2113 views)
Reply With Quote
  #12  
Old 07-29-2010, 01:35 PM
Roaster Roaster is online now
Registered User
 
Join Date: 08-01-2007
Posts: 51
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.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



All times are GMT -5. The time now is 06:39 PM.


Copyright © 1999-2023 Kinook Software, Inc.