Ignore:
Timestamp:
Nov 7, 2014, 5:23:02 PM (11 years ago)
Author:
Dmitry A. Kuminov
Message:

vendor: Import qt-everywhere-opensource-src-4.8.6 from Digia (excluding doc/html and doc/qch dirs generated from doc/src, and imports and templates dirs which are emtpy).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/vendor/nokia/qt/current/bin/createpackage.pl

    r844 r1156  
    22#############################################################################
    33##
    4 ## Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
    5 ## All rights reserved.
    6 ## Contact: Nokia Corporation ([email protected])
     4## Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
     5## Contact: http://www.qt-project.org/legal
    76##
    87## This file is part of the S60 port of the Qt Toolkit.
    98##
    109## $QT_BEGIN_LICENSE:LGPL$
    11 ## Commercial Usage
    12 ## Licensees holding valid Qt Commercial licenses may use this file in
    13 ## accordance with the Qt Commercial License Agreement provided with the
     10## Commercial Usage
     11## Licensees holding valid licenses may use this file in
     12## accordance with the greement provided with the
    1413## Software or, alternatively, in accordance with the terms contained in
    15 ## a written agreement between you and Nokia.
     14## a written agreement between you and Digia.  For licensing terms and
     15## conditions see http://qt.digia.com/licensing.  For further information
     16## use the contact form at http://qt.digia.com/contact-us.
    1617##
    1718## GNU Lesser General Public License Usage
     
    2324## will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2425##
    25 ## In addition, as a special exception, Nokia gives you certain additional
    26 ## rights.  These rights are described in the Nokia Qt LGPL Exception
     26## In addition, as a special exception, ia gives you certain additional
     27## rights.  These rights are described in the ia Qt LGPL Exception
    2728## version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2829##
     
    3536## met: http://www.gnu.org/copyleft/gpl.html.
    3637##
    37 ## If you have questions regarding the use of this file, please contact
    38 ## Nokia at [email protected].
     38##
    3939## $QT_END_LICENSE$
    4040##
     
    5959# use CWD abs_bath, which is exported only on request
    6060use Cwd 'abs_path';
    61 
     61use File::Copy;
    6262
    6363sub Usage() {
     
    8585     [-d|dont-patch]         = Skip automatic patching of capabilities and pkg file if default certificate
    8686                               is used. Instead non-self-signable capabilities just cause warnings.
     87
     88
    8789Where parameters are as follows:
    8890     templatepkg             = Name of .pkg file template
     
    131133my $convertGcce = "";
    132134my $dontPatchCaps = "";
     135
    133136
    134137unless (GetOptions('i|install' => \$install,
     
    140143                   'n|sisname=s' => \$signed_sis_name,
    141144                   'g|gcce-is-armv5' => \$convertGcce,
    142                    'd|dont-patch' => \$dontPatchCaps,)) {
     145                   'd|dont-patch' => \$dontPatchCaps,
     146                   't|tmp-dir=s' => \$tempPackageDir,)) {
    143147    Usage();
    144148}
     
    191195$passphrase = $ARGV[4] or $passphrase = "";
    192196
     197
     198
     199
     200
     201
     202
     203
    193204# Generate output pkg basename (i.e. file name without extension)
    194205my $pkgoutputbasename = $templatepkg;
    195 my $preservePkgOutput = "";
    196206$pkgoutputbasename =~ s/_template/_$targetplatform/g;
    197207$pkgoutputbasename =~ s/_installer\.pkg/_installer___temp\.pkg/g;
    198 if ($pkgoutputbasename eq $templatepkg) {
    199     $preservePkgOutput = "1";
    200 }
    201208$pkgoutputbasename =~ s/\.pkg//g;
    202209
    203210# Store output file names to variables
    204 my $pkgoutput = $pkgoutputbasename.".pkg";
     211my ($dummy1, $dummy2, $pkgoutput) = File::Spec->splitpath($pkgoutputbasename.".pkg");
     212$pkgoutput = $tempPackageDir."/".$pkgoutput;
    205213my $sisoutputbasename;
    206214if ($signed_sis_name eq "") {
     
    231239my $stub_sis_name = $sisoutputbasename.".sis";
    232240
    233 # Store some utility variables
    234 my $scriptpath = dirname(__FILE__);
    235241my $certtext = $certificate;
    236 # certificates are one step up in hierarchy
    237 my $certpath = File::Spec->catdir($scriptpath, File::Spec->updir(), "src/s60installs/");
    238242
    239243# Check some pre-conditions and print error messages if needed.
     
    258262} else {
    259263    #If no certificate is given, check default options
     264
     265
     266
     267
     268
     269
     270
     271
     272
     273
    260274    $certtext = "RnD";
    261275    $certificate = File::Spec->catfile($certpath, "rd.cer");
     
    301315    unlink $signed_sis_name;
    302316}
    303 if (!$preservePkgOutput) {
    304     unlink $pkgoutput;
    305 }
     317unlink $pkgoutput;
    306318
    307319# Preprocess PKG
     
    335347
    336348if ($preprocessonly) {
     349
     350
     351
     352
     353
    337354    exit;
    338355}
     
    355372        } else {
    356373            print("Auto-patching self-signed package.\n");
    357             system ("$patch_capabilities $pkgoutput") and die ("ERROR: Automatic patching failed");
     374            system ("$patch_capabilities $pkgoutput") and die ("ERROR: Automatic patching failed");
    358375        }
    359376    }
     
    378395        }
    379396
    380         if (!$preservePkgOutput) {
    381             unlink $pkgoutput;
    382         }
    383397        print ("\n");
    384398        exit;
     
    406420        }
    407421
    408         # remove temporary pkg and unsigned sis
    409         if (!$preservePkgOutput) {
    410             unlink $pkgoutput;
    411         }
     422        # remove temporary unsigned sis
    412423        if (!$preserveUnsigned) {
    413424            unlink $unsigned_sis_name;
Note: See TracChangeset for help on using the changeset viewer.