Changeset 651 for trunk/bin


Ignore:
Timestamp:
Mar 8, 2010, 12:52:58 PM (15 years ago)
Author:
Dmitry A. Kuminov
Message:

trunk: Merged in qt 4.6.2 sources.

Location:
trunk
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/bin/createpackage.bat

    r561 r651  
    11:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
    22::
    3 :: Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3:: Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
    44:: All rights reserved.
    55:: Contact: Nokia Corporation (qt-info@nokia.com)
  • trunk/bin/createpackage.pl

    r561 r651  
    22#############################################################################
    33##
    4 ## Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     4## Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
    55## All rights reserved.
    66## Contact: Nokia Corporation (qt-info@nokia.com)
     
    6565Convenience script for creating signed packages you can install on your phone.
    6666
    67 Usage: createpackage.pl [options] templatepkg target-platform [certificate key [passphrase]]
     67Usage: createpackage.pl [options] templatepkg [target]-[platform] [certificate key [passphrase]]
    6868
    6969Where supported optiobns are as follows:
     
    7373                               The file can have several certificates, each specified in
    7474                               separate line. The certificate, key and passphrase in line
    75                                must be ';' separated. Lines starting with '#' are treated 
    76                                as a comments. Also empty lines are ignored. The paths in 
     75                               must be ';' separated. Lines starting with '#' are treated
     76                               as a comments. Also empty lines are ignored. The paths in
    7777                               <file> can be absolute or relative to <file>.
     78     [-u|unsigned]           = Preserves the unsigned package
    7879Where parameters are as follows:
    7980     templatepkg             = Name of .pkg file template
     
    8788Example:
    8889     createpackage.pl fluidlauncher_template.pkg release-armv5
    89      
     90
    9091Example with certfile:
    9192     createpackage.pl -c=mycerts.txt fluidlauncher_template.pkg release-armv5
    92      
     93
    9394     Content of 'mycerts.txt' must be something like this:
    9495        # This is comment line, also the empty lines are ignored
    9596        rd.cer;rd-key.pem
    9697        .\\cert\\mycert.cer;.\\cert\\mykey.key;yourpassword
    97         X:\\QtS60\\selfsigned.cer;X:\\QtS60\\selfsigned.key
     98        X:\\QtS60\\s60installs\\selfsigned.cer;X:\\QtS60\\s60installs\\selfsigned.key
    9899
    99100If no certificate and key files are provided, either a RnD certificate or
    100 a self-signed certificate from Qt installation root directory is used.
     101a self-signed certificate from QtDir\\src\\s60installs directory is used.
    101102==============================================================================================
    102103
     
    110111my $preprocessonly = "";
    111112my $certfile = "";
    112 
    113 unless (GetOptions('i|install' => \$install, 'p|preprocess' => \$preprocessonly, 'c|certfile=s' => \$certfile)){
     113my $preserveUnsigned = "";
     114
     115unless (GetOptions('i|install' => \$install,
     116                   'p|preprocess' => \$preprocessonly,
     117                   'c|certfile=s' => \$certfile,
     118                   'u|unsigned' => \$preserveUnsigned,)){
    114119    Usage();
    115120}
     
    135140# Generate output pkg basename (i.e. file name without extension)
    136141my $pkgoutputbasename = $templatepkg;
    137 $pkgoutputbasename =~ s/_template\.pkg/_$targetplatform/g;
     142my $preservePkgOutput = "";
     143$pkgoutputbasename =~ s/_template/_$targetplatform/g;
     144if ($pkgoutputbasename eq $templatepkg) {
     145    $preservePkgOutput = "1";
     146}
     147$pkgoutputbasename =~ s/\.pkg//g;
    138148$pkgoutputbasename = lc($pkgoutputbasename);
    139149
    140150# Store output file names to variables
    141151my $pkgoutput = lc($pkgoutputbasename.".pkg");
    142 my $unsigned_sis_name = $pkgoutputbasename."_unsigned.sis";
    143 my $signed_sis_name = $pkgoutputbasename.".sis";
     152my $sisoutputbasename = lc($pkgoutputbasename);
     153$sisoutputbasename =~ s/_$targetplatform//g;
     154my $unsigned_sis_name = $sisoutputbasename."_unsigned.sis";
     155my $signed_sis_name = $sisoutputbasename.".sis";
    144156
    145157# Store some utility variables
     
    151163$certpath =~ s-bin\\$-src\\s60installs\\-;  # certificates are one step up in hierarcy
    152164
    153 # Check some pre-conditions and print error messages if needed
    154 unless (length($templatepkg) && length($platform) && length($target)) {
    155     print "\nError: Template PKG filename, platform or target is not defined!\n";
     165# Check some pre-conditions and print error messages if needed.
     166unless (length($templatepkg)) {
     167    print "\nError: Template PKG filename is not defined!\n";
    156168    Usage();
     169}
     170
     171# If the pkg file is not actually a template, there is no need for plaform or target.
     172if ($templatepkg =~ m/_template\.pkg/i) {
     173    unless (length($platform) && length($target)) {
     174        print "\nError: Platform or target is not defined!\n";
     175        Usage();
     176    }
    157177}
    158178
     
    193213        chomp;                              # remove trailing newline characters
    194214        my @certinfo = split(';', $_);      # split row to certinfo
    195        
     215
    196216        # Trim spaces
    197217        for(@certinfo) {
    198218            s/^\s+//;
    199219            s/\s+$//;
    200         }       
    201        
     220        }
     221
    202222        # Do some validation
    203         unless(scalar(@certinfo) >= 2 && scalar(@certinfo) <= 3 && length($certinfo[0]) && length($certinfo[1]) ) {   
     223        unless(scalar(@certinfo) >= 2 && scalar(@certinfo) <= 3 && length($certinfo[0]) && length($certinfo[1]) ) {
    204224            print "\nError: $certfile line '$_' does not contain valid information!\n";
    205             Usage();           
    206         }   
     225            Usage();
     226        }
    207227
    208228        push @certificates, [@certinfo];    # push data to two dimensional array
     
    213233unlink $unsigned_sis_name;
    214234unlink $signed_sis_name;
    215 unlink $pkgoutput;
     235if (!$preservePkgOutput) {
     236    unlink $pkgoutput;
     237}
    216238
    217239# Preprocess PKG
     
    244266stat($signed_sis_name);
    245267if( -e _ ) {
    246     print ("\nSuccessfully created $signed_sis_name using certificate: $certtext!\n");
     268    my $targetInsert = "";
     269    if ($targetplatform ne "-") {
     270        $targetInsert = "for $targetplatform ";
     271    }
     272    print ("\nSuccessfully created $signed_sis_name ${targetInsert}using certificate: $certtext!\n");
    247273
    248274    # Sign with additional certificates & keys
     
    255281        print ("\tAdditionally signed the SIS with certificate: $row->[0]!\n");
    256282    }
    257    
     283
    258284    # remove temporary pkg and unsigned sis
    259     unlink $pkgoutput;
    260     unlink $unsigned_sis_name;
     285    if (!$preservePkgOutput) {
     286        unlink $pkgoutput;
     287    }
     288    if (!$preserveUnsigned) {
     289        unlink $unsigned_sis_name;
     290    }
    261291
    262292    # Install the sis if requested
  • trunk/bin/patch_capabilities.pl

    r561 r651  
    22#############################################################################
    33##
    4 ## Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     4## Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
    55## All rights reserved.
    66## Contact: Nokia Corporation (qt-info@nokia.com)
     
    109109        open (PKG, "<".$pkgFileName);
    110110
     111        my $manufacturerElseBlock = 0;
     112
    111113        # Parse each line.
    112114        while (<PKG>)
    113115        {
     116            # Patch pkg UID
    114117            my $line = $_;
    115118            my $newLine = $line;
    116             if ( $line =~ m/^\#.*\(0x[0-9|a-f|A-F]*\).*$/)
     119            if ($line =~ m/^\#.*\(0x[0-9|a-f|A-F]*\).*$/)
    117120            {
    118121                $newLine =~ s/\(0x./\(0xE/;
    119122            }
     123
     124            # Patch embedded sis name and UID
     125            if ($line =~ m/^@.*\.sis.*\(0x[0-9|a-f|A-F]*\).*$/)
     126            {
     127                $newLine =~ s/\(0x./\(0xE/;
     128                if ($line !~ m/^.*_selfsigned.sis.*$/)
     129                {
     130                    $newLine =~ s/\.sis/_selfsigned\.sis/i;
     131                }
     132            }
     133
     134            # Remove dependencies to known problem packages (i.e. packages that are likely to be patched, also)
     135            # to reduce unnecessary error messages.
     136            if ($line =~ m/^\(0x2002af5f\).*\{.*\}$/)
     137            {
     138                $newLine = "\n"
     139            }
     140            if ($line =~ m/^\(0x2001E61C\).*\{.*\}$/)
     141            {
     142                $newLine = "\n"
     143            }
     144
     145            # Remove manufacturer ifdef
     146            if ($line =~ m/^.*\(MANUFACTURER\)\=\(.*\).*$/)
     147            {
     148                $newLine = "\n";
     149            }
     150
     151            if ($line =~ m/^ELSEIF.*MANUFACTURER$/)
     152            {
     153                $manufacturerElseBlock = 1;
     154            }
     155
     156            if ($manufacturerElseBlock eq 1)
     157            {
     158                $newLine = "\n";
     159            }
     160
     161            if ($line =~ m/^ENDIF.*MANUFACTURER$/)
     162            {
     163                $manufacturerElseBlock = 0;
     164            }
     165
    120166            print NEW_PKG $newLine;
    121167
  • trunk/bin/setcepaths.bat

    r561 r651  
    11:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
    22::
    3 :: Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3:: Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
    44:: All rights reserved.
    55:: Contact: Nokia Corporation (qt-info@nokia.com)
  • trunk/bin/syncqt

    r561 r651  
    44# Synchronizes Qt header files - internal development tool.
    55#
    6 # Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     6# Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
    77# Contact: Nokia Corporation (qt-info@nokia.com)
    88#
     
    1515use Config;
    1616use strict;
     17
     18for (my $i = 0; $i < $#ARGV; $i++) {
     19    if ($ARGV[$i] eq "-base-dir" && $i < $#ARGV - 1) {
     20        $ENV{"QTDIR"} = $ARGV[$i + 1];
     21        last;
     22    }
     23}
    1724
    1825die "syncqt: QTDIR not defined" if ! $ENV{"QTDIR"}; # sanity check
     
    6269my $check_includes = 0;
    6370my $copy_headers = 0;
     71my $create_uic_class_map = 1;
     72my $create_private_headers = 1;
    6473my @modules_to_sync ;
    6574$force_relative = 1 if ( -d "/System/Library/Frameworks" );
     
    8594    print "  -showonly             Show action but not perform        (default: " . ($showonly ? "yes" : "no") . ")\n";
    8695    print "  -outdir <PATH>        Specify output directory for sync  (default: $out_basedir)\n";
     96    print "  -separate-module <NAME>:<PROFILEDIR>:<HEADERDIR> Create headers for <NAME> with original headers in <HEADERDIR> relative to <PROFILEDIR> \n";
    8797    print "  -help                 This help\n";
    8898    exit 0;
     
    577587        $var = "module";
    578588        $val = shift @ARGV;
     589    } elsif("$arg" eq "-separate-module") {
     590        $var = "separate-module";
     591        $val = shift @ARGV;
    579592    } elsif("$arg" eq "-show") {
    580593        $var = "showonly";
    581594        $val = "yes";
     595    } elsif("$arg" eq "-base-dir") {
     596        # skip, it's been dealt with at the top of the file
     597        shift @ARGV;
     598        next;
    582599    } elsif("$arg" eq '*') {
    583600        # workaround for windows 9x where "%*" expands to "*"
     
    629646        die "No such module: $val" unless(defined $modules{$val});
    630647        push @modules_to_sync, $val;
     648    } elsif ("$var" eq "separate-module") {
     649        my ($module, $prodir, $headerdir) = split(/:/, $val);
     650        $modules{$module} = $prodir;
     651        push @modules_to_sync, $module;
     652        $moduleheaders{$module} = $headerdir;
     653        $create_uic_class_map = 0;
     654        $create_private_headers = 0;
    631655    } elsif ("$var" eq "output") {
    632656        my $outdir = $val;
     
    808832                                $class_lib_map_contents .= "QT_CLASS_LIB($_, $lib, $header_base)\n";
    809833                                $header_copies++ if(syncHeader("$out_basedir/include/$lib/$class", "$out_basedir/include/$lib/$header", 0));
     834
     835                                # KDE-Compat headers for Phonon
     836                                if ($lib eq "phonon") {
     837                                    $header_copies++ if (syncHeader("$out_basedir/include/phonon_compat/Phonon/$class", "$out_basedir/include/$lib/$header", 0));
     838                                }
    810839                            }
    811                         } else {
     840                        } elsif ($create_private_headers) {
    812841                            @headers = ( "$out_basedir/include/$lib/private/$header" );
    813842                            push @headers, "$out_basedir/include/Qt/private/$header"
     
    857886        my @master_includes;
    858887        push @master_includes, "$out_basedir/include/$lib/$lib";
     888        push @master_includes, "$out_basedir/include/phonon_compat/Phonon/Phonon" if ($lib eq "phonon");
    859889        foreach my $master_include (@master_includes) {
    860890            #generate the "master" include file
     
    904934    }
    905935}
    906 unless($showonly) {
     936unless($showonly || !$create_uic_class_map) {
    907937    my $class_lib_map = "$out_basedir/src/tools/uic/qclass_lib_map.h";
    908938    if(-e "$class_lib_map") {
  • trunk/bin/syncqt.bat

    r561 r651  
    11:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
    22::
    3 :: Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3:: Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
    44:: All rights reserved.
    55:: Contact: Nokia Corporation (qt-info@nokia.com)
Note: See TracChangeset for help on using the changeset viewer.