source: trunk/bin/createpackage.pl@ 822

Last change on this file since 822 was 769, checked in by Dmitry A. Kuminov, 15 years ago

trunk: Merged in qt 4.6.3 sources from branches/vendor/nokia/qt.

  • Property svn:eol-style set to native
  • Property svn:executable set to *
File size: 11.1 KB
RevLine 
[556]1#!/usr/bin/perl
2#############################################################################
3##
[651]4## Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
[556]5## All rights reserved.
6## Contact: Nokia Corporation ([email protected])
7##
8## This file is part of the S60 port of the Qt Toolkit.
9##
10## $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
14## Software or, alternatively, in accordance with the terms contained in
15## a written agreement between you and Nokia.
16##
17## GNU Lesser General Public License Usage
18## Alternatively, this file may be used under the terms of the GNU Lesser
19## General Public License version 2.1 as published by the Free Software
20## Foundation and appearing in the file LICENSE.LGPL included in the
21## packaging of this file. Please review the following information to
22## ensure the GNU Lesser General Public License version 2.1 requirements
23## will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
24##
25## In addition, as a special exception, Nokia gives you certain additional
26## rights. These rights are described in the Nokia Qt LGPL Exception
27## version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
28##
29## GNU General Public License Usage
30## Alternatively, this file may be used under the terms of the GNU
31## General Public License version 3.0 as published by the Free Software
32## Foundation and appearing in the file LICENSE.GPL included in the
33## packaging of this file. Please review the following information to
34## ensure the GNU General Public License version 3.0 requirements will be
35## met: http://www.gnu.org/copyleft/gpl.html.
36##
37## If you have questions regarding the use of this file, please contact
38## Nokia at [email protected].
39## $QT_END_LICENSE$
40##
41#############################################################################
42
43############################################################################################
44#
45# Convenience script for creating signed packages you can install on your phone.
46#
47############################################################################################
48
49use strict;
50
51# use a command-line parsing module
52use Getopt::Long;
53# Use file name parsing module
54use File::Basename;
55# Use File::Spec services mainly rel2abs
56use File::Spec;
[769]57# Use File::Path - to make stub sis target directory
58use File::Path;
[556]59# use CWD abs_bath, which is exported only on request
60use Cwd 'abs_path';
61
62
63sub Usage() {
64 print <<ENDUSAGESTRING;
65
66==============================================================================================
67Convenience script for creating signed packages you can install on your phone.
68
[651]69Usage: createpackage.pl [options] templatepkg [target]-[platform] [certificate key [passphrase]]
[556]70
71Where supported optiobns are as follows:
72 [-i|install] = Install the package right away using PC suite
73 [-p|preprocess] = Only preprocess the template .pkg file.
74 [-c|certfile=<file>] = The file containing certificate information for signing.
75 The file can have several certificates, each specified in
76 separate line. The certificate, key and passphrase in line
[651]77 must be ';' separated. Lines starting with '#' are treated
78 as a comments. Also empty lines are ignored. The paths in
[556]79 <file> can be absolute or relative to <file>.
[651]80 [-u|unsigned] = Preserves the unsigned package
[556]81Where parameters are as follows:
82 templatepkg = Name of .pkg file template
83 target = Either debug or release
84 platform = One of the supported platform
85 winscw | gcce | armv5 | armv6 | armv7
86 certificate = The certificate file used for signing
87 key = The certificate's private key file
88 passphrase = The certificate's private key file's passphrase
89
90Example:
91 createpackage.pl fluidlauncher_template.pkg release-armv5
[651]92
[556]93Example with certfile:
94 createpackage.pl -c=mycerts.txt fluidlauncher_template.pkg release-armv5
[651]95
[556]96 Content of 'mycerts.txt' must be something like this:
97 # This is comment line, also the empty lines are ignored
98 rd.cer;rd-key.pem
99 .\\cert\\mycert.cer;.\\cert\\mykey.key;yourpassword
[651]100 X:\\QtS60\\s60installs\\selfsigned.cer;X:\\QtS60\\s60installs\\selfsigned.key
[556]101
102If no certificate and key files are provided, either a RnD certificate or
[651]103a self-signed certificate from QtDir\\src\\s60installs directory is used.
[556]104==============================================================================================
105
106ENDUSAGESTRING
107
108 exit();
109}
110
111# Read given options