Changeset 1156 for branches/vendor/nokia/qt/current/bin/createpackage.pl
- Timestamp:
- Nov 7, 2014, 5:23:02 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/vendor/nokia/qt/current/bin/createpackage.pl
r844 r1156 2 2 ############################################################################# 3 3 ## 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 7 6 ## 8 7 ## This file is part of the S60 port of the Qt Toolkit. 9 8 ## 10 9 ## $QT_BEGIN_LICENSE:LGPL$ 11 ## Commercial Usage12 ## Licensees holding valid Qt Commerciallicenses may use this file in13 ## accordance with the Qt Commercial License Agreement provided with the10 ## Commercial Usage 11 ## Licensees holding valid licenses may use this file in 12 ## accordance with the greement provided with the 14 13 ## 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. 16 17 ## 17 18 ## GNU Lesser General Public License Usage … … 23 24 ## will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 24 25 ## 25 ## In addition, as a special exception, Nokia gives you certain additional26 ## rights. These rights are described in the Nokia Qt LGPL Exception26 ## In addition, as a special exception, ia gives you certain additional 27 ## rights. These rights are described in the ia Qt LGPL Exception 27 28 ## version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 28 29 ## … … 35 36 ## met: http://www.gnu.org/copyleft/gpl.html. 36 37 ## 37 ## If you have questions regarding the use of this file, please contact 38 ## Nokia at [email protected]. 38 ## 39 39 ## $QT_END_LICENSE$ 40 40 ## … … 59 59 # use CWD abs_bath, which is exported only on request 60 60 use Cwd 'abs_path'; 61 61 use File::Copy; 62 62 63 63 sub Usage() { … … 85 85 [-d|dont-patch] = Skip automatic patching of capabilities and pkg file if default certificate 86 86 is used. Instead non-self-signable capabilities just cause warnings. 87 88 87 89 Where parameters are as follows: 88 90 templatepkg = Name of .pkg file template … … 131 133 my $convertGcce = ""; 132 134 my $dontPatchCaps = ""; 135 133 136 134 137 unless (GetOptions('i|install' => \$install, … … 140 143 'n|sisname=s' => \$signed_sis_name, 141 144 'g|gcce-is-armv5' => \$convertGcce, 142 'd|dont-patch' => \$dontPatchCaps,)) { 145 'd|dont-patch' => \$dontPatchCaps, 146 't|tmp-dir=s' => \$tempPackageDir,)) { 143 147 Usage(); 144 148 } … … 191 195 $passphrase = $ARGV[4] or $passphrase = ""; 192 196 197 198 199 200 201 202 203 193 204 # Generate output pkg basename (i.e. file name without extension) 194 205 my $pkgoutputbasename = $templatepkg; 195 my $preservePkgOutput = "";196 206 $pkgoutputbasename =~ s/_template/_$targetplatform/g; 197 207 $pkgoutputbasename =~ s/_installer\.pkg/_installer___temp\.pkg/g; 198 if ($pkgoutputbasename eq $templatepkg) {199 $preservePkgOutput = "1";200 }201 208 $pkgoutputbasename =~ s/\.pkg//g; 202 209 203 210 # Store output file names to variables 204 my $pkgoutput = $pkgoutputbasename.".pkg"; 211 my ($dummy1, $dummy2, $pkgoutput) = File::Spec->splitpath($pkgoutputbasename.".pkg"); 212 $pkgoutput = $tempPackageDir."/".$pkgoutput; 205 213 my $sisoutputbasename; 206 214 if ($signed_sis_name eq "") { … … 231 239 my $stub_sis_name = $sisoutputbasename.".sis"; 232 240 233 # Store some utility variables234 my $scriptpath = dirname(__FILE__);235 241 my $certtext = $certificate; 236 # certificates are one step up in hierarchy237 my $certpath = File::Spec->catdir($scriptpath, File::Spec->updir(), "src/s60installs/");238 242 239 243 # Check some pre-conditions and print error messages if needed. … … 258 262 } else { 259 263 #If no certificate is given, check default options 264 265 266 267 268 269 270 271 272 273 260 274 $certtext = "RnD"; 261 275 $certificate = File::Spec->catfile($certpath, "rd.cer"); … … 301 315 unlink $signed_sis_name; 302 316 } 303 if (!$preservePkgOutput) { 304 unlink $pkgoutput; 305 } 317 unlink $pkgoutput; 306 318 307 319 # Preprocess PKG … … 335 347 336 348 if ($preprocessonly) { 349 350 351 352 353 337 354 exit; 338 355 } … … 355 372 } else { 356 373 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"); 358 375 } 359 376 } … … 378 395 } 379 396 380 if (!$preservePkgOutput) {381 unlink $pkgoutput;382 }383 397 print ("\n"); 384 398 exit; … … 406 420 } 407 421 408 # remove temporary pkg and unsigned sis 409 if (!$preservePkgOutput) { 410 unlink $pkgoutput; 411 } 422 # remove temporary unsigned sis 412 423 if (!$preserveUnsigned) { 413 424 unlink $unsigned_sis_name;
Note:
See TracChangeset
for help on using the changeset viewer.
