Can I fully configure Xcode 4 Run Script Error / warning build phase in Navigator Navigator and Build Logs?

I read somewhere on the blog that you can integrate your own build scripts using the Xcode Navigator and Build Logs task graphical interfaces by printing messages to STDOUT using the following format:

FILENAME:LINE_NUMBER: WARNING_OR_ERROR: MSG

(Where WARNING_OR_ERROR is this warningor error)

eg.

/path/to/proj/folder/somefile.ext:10: warning: There was a problem processing the file

A warning appears on line 10 of somefile.ext, which reads: "There was a problem processing the file." It really works (which is fantastic).

Is there official documentation for this feature (I could not find it)?

In the Problem Navigator, I get a warning for the file somefile.ext, but the title of the problem is "Shell Script Invocation Error" (my message appears under the heading). Is there a way to set this header, or am I sticking to this general (and ugly) "Shell Script Invocation Error"?

+5
source share
2 answers

, "Shell Script Invocation Error", perl , perl ( ) perl script, , ( "Shell Script Invocation Error", ). , , perl Script Xcode .

package XcodeErrors;

use strict;
use warnings;

$SIG{__WARN__} = sub
{
    my @loc = caller(0);
    print STDERR "$loc[1]:$loc[2]: warning: ", @_, "\n";
    return 1;
};

$SIG{__DIE__} = sub
{
    my @loc = caller(0);
    print STDERR "$loc[1]:$loc[2]: error: ", @_, "\n";
    exit 1;
};


1;
0

0 script "Shell script Invocation Error"

0

All Articles