diff options
author | Miikka Heikkinen <miikka.heikkinen@digia.com> | 2011-10-25 13:37:45 (GMT) |
---|---|---|
committer | Miikka Heikkinen <miikka.heikkinen@digia.com> | 2011-10-26 07:40:21 (GMT) |
commit | b31ec8e879761decfda70069262f06b5aa08aa82 (patch) | |
tree | 65b11f0da0b5fccf990b9bce46aa102620f60cb0 /bin | |
parent | 6750461b408f7ffa768ba9507dcd64640010fff5 (diff) | |
download | Qt-b31ec8e879761decfda70069262f06b5aa08aa82.zip Qt-b31ec8e879761decfda70069262f06b5aa08aa82.tar.gz Qt-b31ec8e879761decfda70069262f06b5aa08aa82.tar.bz2 |
Improve patch_capabilities script output.
Now prefix any actual patching errors with "ERROR:" so that they will
be obvious also in QtCreator builds.
Task-number: QTBUG-22267
Reviewed-by: Sami Merila
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/patch_capabilities.pl | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/bin/patch_capabilities.pl b/bin/patch_capabilities.pl index 0ba8bc5..a6345e0 100755 --- a/bin/patch_capabilities.pl +++ b/bin/patch_capabilities.pl @@ -49,6 +49,7 @@ # # Note: Please make sure to output all changes done to the pkg file in a print statements # starting with "Patching: " to ease integration into IDEs! +# Similarly, any actual error messages should start with "ERROR:" # use File::Copy; @@ -103,13 +104,16 @@ if (@ARGV) # Parse the first given script argument as a ".pkg" file name. my $pkgFileName = shift(@ARGV); my $justCheck = ""; + my $errorPrefix = "ERROR:"; my $msgPrefix = "Patching:"; my $tempPatchPath = ""; if ($pkgFileName eq "-c") { $pkgFileName = shift(@ARGV); $justCheck = true; + # All messages are simply warnings, as no actual patching is attempted. $msgPrefix = "Warning:"; + $errorPrefix = "Warning:"; } if ($pkgFileName eq "-t") { @@ -302,7 +306,7 @@ if (@ARGV) if ($binaryBaseName =~ /\.exe$/) { # Installer refuses to install protected executables in a self signed package, so abort if one is detected. # We can't simply just patch the executable SID, as any registration resources executable uses will be linked to it via SID. - print ("$msgPrefix Executable with SID in the protected range (0x$exeSid) detected: \"$binaryBaseName\". A self-signed sis with protected executables is not supported.\n\n"); + print ("$errorPrefix Executable with SID in the protected range (0x$exeSid) detected: \"$binaryBaseName\". A self-signed sis with protected executables is not supported.\n\n"); $checkFailed = true; } } @@ -315,9 +319,6 @@ if (@ARGV) $_ = trim($_); if ($capabilitiesToAllow =~ /$_/) { push(@capabilitiesToSet, $_); - if (Location =~ /$_/i) { - print ("$msgPrefix \"Location\" capability detected for binary: \"$binaryBaseName\". This capability is not self-signable for S60 3rd edition feature pack 1 devices, so installing this package on those devices will most likely not work.\n\n"); - } } else { push(@capabilitiesToDrop, $_); } @@ -345,7 +346,7 @@ if (@ARGV) if ($binaryBaseName =~ /\.exe$/) { # While libraries often have capabilities they do not themselves need just to enable them to be loaded by wider variety of processes, # executables are more likely to need every capability they have been assigned or they won't function correctly. - print ("$msgPrefix Executable with capabilities incompatible with self-signing detected: \"$binaryBaseName\". (Incompatible capabilities: \"$capsToDropStr\".) Reducing capabilities is only supported for libraries.\n"); + print ("$errorPrefix Executable with capabilities incompatible with self-signing detected: \"$binaryBaseName\". (Incompatible capabilities: \"$capsToDropStr\".) Reducing capabilities is only supported for libraries.\n"); $checkFailed = true; } else { print ("$msgPrefix The following capabilities used in \"$binaryBaseName\" are not compatible with a self-signed package and will be removed: \"$capsToDropStr\".\n"); @@ -368,9 +369,9 @@ if (@ARGV) if ($checkFailed) { print ("\n"); if ($justCheck) { - print ("$msgPrefix The package is not compatible with self-signing.\n"); + print ("$msgPrefix The package is not compatible with self-signing. "); } else { - print ("$msgPrefix Unable to patch the package for self-singing.\n"); + print ("$errorPrefix Unable to patch the package for self-singing. "); } print ("Use a proper developer certificate for signing this package.\n\n"); exit(1); |