diff options
author | axis <qt-info@nokia.com> | 2010-02-16 11:53:07 (GMT) |
---|---|---|
committer | axis <qt-info@nokia.com> | 2010-02-16 11:53:07 (GMT) |
commit | 15b08dffc1354bc816b04901a7442679382b0935 (patch) | |
tree | 783af85b75f9de3ab10902c5ba66cf5e22b2fe61 /bin | |
parent | 9f5b02406f38fe02a27de7843b9f8a11232d2064 (diff) | |
parent | 9d174f13e48730ac06aa429e0f011a02b333025e (diff) | |
download | Qt-15b08dffc1354bc816b04901a7442679382b0935.zip Qt-15b08dffc1354bc816b04901a7442679382b0935.tar.gz Qt-15b08dffc1354bc816b04901a7442679382b0935.tar.bz2 |
Merge branch 'master' of scm.dev.nokia.troll.no:qt/qt-s60-public
Conflicts:
configure
mkspecs/common/symbian/symbian.conf
mkspecs/features/symbian/application_icon.prf
qmake/generators/makefile.cpp
qmake/generators/symbian/initprojectdeploy_symbian.cpp
qmake/generators/symbian/symmake.cpp
tools/assistant/tools/assistant/assistant.pro
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/createpackage.pl | 104 | ||||
-rwxr-xr-x | bin/createpackage.sh | 3 | ||||
-rwxr-xr-x | bin/syncqt | 45 |
3 files changed, 87 insertions, 65 deletions
diff --git a/bin/createpackage.pl b/bin/createpackage.pl index 6d4614e..1d6ab6b 100755 --- a/bin/createpackage.pl +++ b/bin/createpackage.pl @@ -54,6 +54,8 @@ use Getopt::Long; use File::Basename; # Use File::Spec services mainly rel2abs use File::Spec; +# Use File::Path - to make stub sis target directory +use File::Path; # use CWD abs_bath, which is exported only on request use Cwd 'abs_path'; @@ -111,11 +113,13 @@ my $install = ""; my $preprocessonly = ""; my $certfile = ""; my $preserveUnsigned = ""; +my $stub = ""; unless (GetOptions('i|install' => \$install, 'p|preprocess' => \$preprocessonly, 'c|certfile=s' => \$certfile, - 'u|unsigned' => \$preserveUnsigned,)){ + 'u|unsigned' => \$preserveUnsigned, + 's|stub' => \$stub,)){ Usage(); } @@ -153,14 +157,13 @@ my $sisoutputbasename = lc($pkgoutputbasename); $sisoutputbasename =~ s/_$targetplatform//g; my $unsigned_sis_name = $sisoutputbasename."_unsigned.sis"; my $signed_sis_name = $sisoutputbasename.".sis"; +my $stub_sis_name = $sisoutputbasename."_stub.sis"; # Store some utility variables my $scriptpath = dirname(__FILE__); my $certtext = $certificate; -my $certpath = $scriptpath; -$certpath =~ s-^(.*[^\\])$-$1\\-o; # ensure path ends with a backslash -$certpath =~ s-/-\\-go; # for those working with UNIX shells -$certpath =~ s-bin\\$-src\\s60installs\\-; # certificates are one step up in hierarcy +# certificates are one step up in hierarchy +my $certpath = File::Spec->catdir($scriptpath, File::Spec->updir(), "src/s60installs/"); # Check some pre-conditions and print error messages if needed. unless (length($templatepkg)) { @@ -192,14 +195,14 @@ if (length($certificate)) { } else { #If no certificate is given, check default options $certtext = "RnD"; - $certificate = $certpath."rd.cer"; - $key = $certpath."rd-key.pem"; + $certificate = File::Spec->catfile($certpath, "rd.cer"); + $key = File::Spec->catfile($certpath, "rd-key.pem"); stat($certificate); unless( -e _ ) { $certtext = "Self Signed"; - $certificate = $certpath."selfsigned.cer"; - $key = $certpath."selfsigned.key"; + $certificate = File::Spec->catfile($certpath, "selfsigned.cer"); + $key = File::Spec->catfile($certpath, "selfsigned.key"); } } @@ -256,48 +259,57 @@ if ($preprocessonly) { exit; } -# Create SIS. -system ("makesis $pkgoutput $unsigned_sis_name"); - -# Sign SIS with certificate info given as an argument. -system ("signsis $unsigned_sis_name $signed_sis_name $certificate $key $passphrase"); - -# Check if creating signed SIS Succeeded -stat($signed_sis_name); -if( -e _ ) { - my $targetInsert = ""; - if ($targetplatform ne "-") { - $targetInsert = "for $targetplatform "; - } - print ("\nSuccessfully created $signed_sis_name ${targetInsert}using certificate: $certtext!\n"); +if($stub) { + if(!($ENV{EPOCROOT})) { die("EPOCROOT must be set to create stub sis files"); } + my $systeminstall = "$ENV{EPOCROOT}epoc32/data/z/system/install"; + mkpath($systeminstall); + my $stub_sis_name = $systeminstall."/".$stub_sis_name; + # Create stub SIS. + system ("makesis -s $pkgoutput $stub_sis_name"); +} else { + # Create SIS. + system ("makesis $pkgoutput $unsigned_sis_name"); + print("\n"); + + # Sign SIS with certificate info given as an argument. + system ("signsis $unsigned_sis_name $signed_sis_name $certificate $key $passphrase"); + + # Check if creating signed SIS Succeeded + stat($signed_sis_name); + if( -e _ ) { + my $targetInsert = ""; + if ($targetplatform ne "-") { + $targetInsert = "for $targetplatform "; + } + print ("Successfully created $signed_sis_name ${targetInsert}using certificate: $certtext!\n"); - # Sign with additional certificates & keys - for my $row ( @certificates ) { - # Get certificate absolute file names, relative paths are relative to certfilepath - my $abscert = File::Spec->rel2abs( $row->[0], $certfilepath); - my $abskey = File::Spec->rel2abs( $row->[1], $certfilepath); + # Sign with additional certificates & keys + for my $row ( @certificates ) { + # Get certificate absolute file names, relative paths are relative to certfilepath + my $abscert = File::Spec->rel2abs( $row->[0], $certfilepath); + my $abskey = File::Spec->rel2abs( $row->[1], $certfilepath); - system ("signsis $signed_sis_name $signed_sis_name $abscert $abskey $row->[2]"); - print ("\tAdditionally signed the SIS with certificate: $row->[0]!\n"); - } + system ("signsis $signed_sis_name $signed_sis_name $abscert $abskey $row->[2]"); + print ("\tAdditionally signed the SIS with certificate: $row->[0]!\n"); + } - # remove temporary pkg and unsigned sis - if (!$preservePkgOutput) { - unlink $pkgoutput; - } - if (!$preserveUnsigned) { - unlink $unsigned_sis_name; - } + # remove temporary pkg and unsigned sis + if (!$preservePkgOutput) { + unlink $pkgoutput; + } + if (!$preserveUnsigned) { + unlink $unsigned_sis_name; + } - # Install the sis if requested - if ($install) { - print ("\nInstalling $signed_sis_name...\n"); - system ("$signed_sis_name"); + # Install the sis if requested + if ($install) { + print ("\nInstalling $signed_sis_name...\n"); + system ("$signed_sis_name"); + } + } else { + # Lets leave the generated PKG for problem solving purposes + print ("\nSIS creation failed!\n"); } -} else { - # Lets leave the generated PKG for problem solving purposes - print ("\nSIS creation failed!\n"); } - #end of file diff --git a/bin/createpackage.sh b/bin/createpackage.sh new file mode 100755 index 0000000..fdd4eeb --- /dev/null +++ b/bin/createpackage.sh @@ -0,0 +1,3 @@ +#!/bin/sh +scriptpath=`dirname $0` +perl $scriptpath/createpackage.pl "$@" @@ -44,7 +44,6 @@ my %modules = ( # path to module name map "Qt3Support" => "$basedir/src/qt3support", "ActiveQt" => "$basedir/src/activeqt/container;$basedir/src/activeqt/control;$basedir/src/activeqt/shared", "QtTest" => "$basedir/src/testlib", - "QtAssistant" => "$basedir/tools/assistant/compat/lib", "QtHelp" => "$basedir/tools/assistant/lib", "QtDesigner" => "$basedir/tools/designer/src/lib", "QtUiTools" => "$basedir/tools/designer/src/uitools", @@ -63,6 +62,7 @@ my %moduleheaders = ( # restrict the module headers to those found in relative p # global variables (modified by options) my $module = 0; my $showonly = 0; +my $quiet = 0; my $remove_stale = 1; my $force_win = 0; my $force_relative = 0; @@ -93,6 +93,7 @@ sub showUsage print " -windows Force platform to Windows (default: " . ($force_win ? "yes" : "no") . ")\n"; print " -showonly Show action but not perform (default: " . ($showonly ? "yes" : "no") . ")\n"; print " -outdir <PATH> Specify output directory for sync (default: $out_basedir)\n"; + print " -quiet Only report problems, not activity (default: " . ($quiet ? "yes" : "no") . ")\n"; print " -separate-module <NAME>:<PROFILEDIR>:<HEADERDIR> Create headers for <NAME> with original headers in <HEADERDIR> relative to <PROFILEDIR> \n"; print " -help This help\n"; exit 0; @@ -325,7 +326,7 @@ sub syncHeader { unless(-e "$header") { my $header_dir = dirname($header); - mkpath $header_dir, 0777; + mkpath $header_dir, !$quiet; #write it my $iheader_out = fixPaths($iheader, $header_dir); @@ -465,7 +466,7 @@ sub copyFile if ( $knowdiff || ($filecontents ne $ifilecontents) ) { if ( $copy > 0 ) { my $file_dir = dirname($file); - mkpath $file_dir, 0777 unless(-e "$file_dir"); + mkpath $file_dir, !$quiet unless(-e "$file_dir"); open(O, "> " . $file) || die "Could not open $file for writing (no write permission?)"; local $/; binmode O; @@ -474,7 +475,7 @@ sub copyFile return 1; } elsif ( $copy < 0 ) { my $ifile_dir = dirname($ifile); - mkpath $ifile_dir, 0777 unless(-e "$ifile_dir"); + mkpath $ifile_dir, !$quiet unless(-e "$ifile_dir"); open(O, "> " . $ifile) || die "Could not open $ifile for writing (no write permission?)"; local $/; binmode O; @@ -500,7 +501,7 @@ sub symlinkFile my ($file,$ifile) = @_; if ($isunix) { - print "symlink created for $file "; + print "symlink created for $file " unless $quiet; if ( $force_relative && ($ifile =~ /^$basedir/)) { my $t = getcwd(); my $c = -1; @@ -508,9 +509,9 @@ sub symlinkFile $t =~ s-^$basedir/--; $p .= "../" while( ($c = index( $t, "/", $c + 1)) != -1 ); $file =~ s-^$basedir/-$p-; - print " ($file)\n"; + print " ($file)\n" unless $quiet; } - print "\n"; + print "\n" unless $quiet; return symlink($file, $ifile); } return copyFile($file, $ifile); @@ -594,13 +595,13 @@ while ( @ARGV ) { } elsif("$arg" eq "-show") { $var = "showonly"; $val = "yes"; + } elsif("$arg" eq "-quiet") { + $var = "quiet"; + $val = "yes"; } elsif("$arg" eq "-base-dir") { # skip, it's been dealt with at the top of the file shift @ARGV; next; - } elsif("$arg" eq '*') { - # workaround for windows 9x where "%*" expands to "*" - $var = 1; } #do something @@ -619,6 +620,12 @@ while ( @ARGV ) { } elsif($showonly) { $showonly--; } + } elsif ("$var" eq "quiet") { + if("$val" eq "yes") { + $quiet++; + } elsif($quiet) { + $quiet--; + } } elsif ("$var" eq "check-includes") { if("$val" eq "yes") { $check_includes++; @@ -644,7 +651,7 @@ while ( @ARGV ) { $force_relative--; } } elsif ("$var" eq "module") { - print "module :$val:\n"; + print "module :$val:\n" unless $quiet; die "No such module: $val" unless(defined $modules{$val}); push @modules_to_sync, $val; } elsif ("$var" eq "separate-module") { @@ -672,7 +679,7 @@ while ( @ARGV ) { $isunix = checkUnix; #cache checkUnix # create path -mkpath "$out_basedir/include", 0777; +mkpath "$out_basedir/include", !$quiet; my @ignore_headers = (); my $class_lib_map_contents = ""; @@ -680,7 +687,7 @@ my @ignore_for_master_contents = ( "qt.h", "qpaintdevicedefs.h" ); my @ignore_for_include_check = ( "qatomic.h" ); my @ignore_for_qt_begin_header_check = ( "qiconset.h", "qconfig.h", "qconfig-dist.h", "qconfig-large.h", "qconfig-medium.h", "qconfig-minimal.h", "qconfig-small.h", "qfeatures.h", "qt_windows.h" ); my @ignore_for_qt_begin_namespace_check = ( "qconfig.h", "qconfig-dist.h", "qconfig-large.h", "qconfig-medium.h", "qconfig-minimal.h", "qconfig-small.h", "qfeatures.h", "qatomic_arch.h", "qatomic_windowsce.h", "qt_windows.h", "qatomic_macosx.h" ); -my @ignore_for_qt_module_check = ( "$modules{QtCore}/arch", "$modules{QtCore}/global", "$modules{QtSql}/drivers", "$modules{QtTest}", "$modules{QtAssistant}", "$modules{QtDesigner}", "$modules{QtUiTools}", "$modules{QtDBus}", "$modules{phonon}" ); +my @ignore_for_qt_module_check = ( "$modules{QtCore}/arch", "$modules{QtCore}/global", "$modules{QtSql}/drivers", "$modules{QtTest}", "$modules{QtDesigner}", "$modules{QtUiTools}", "$modules{QtDBus}", "$modules{phonon}" ); foreach (@modules_to_sync) { #iteration info @@ -875,7 +882,7 @@ foreach (@modules_to_sync) { $pri_install_pfiles.= "$pri_install_iheader ";; } } - print "header created for $iheader ($header_copies)\n" if($header_copies > 0); + print "header created for $iheader ($header_copies)\n" if($header_copies > 0 && !$quiet); } } } @@ -902,8 +909,8 @@ foreach (@modules_to_sync) { } if($master_include && $master_contents) { my $master_dir = dirname($master_include); - mkpath $master_dir, 0777; - print "header (master) created for $lib\n"; + mkpath $master_dir, !$quiet; + print "header (master) created for $lib\n" unless $quiet; open MASTERINCLUDE, ">$master_include"; print MASTERINCLUDE "$master_contents"; close MASTERINCLUDE; @@ -927,8 +934,8 @@ foreach (@modules_to_sync) { } if($headers_pri_file && $master_contents) { my $headers_pri_dir = dirname($headers_pri_file); - mkpath $headers_pri_dir, 0777; - print "headers.pri file created for $lib\n"; + mkpath $headers_pri_dir, !$quiet; + print "headers.pri file created for $lib\n" unless $quiet; open HEADERS_PRI_FILE, ">$headers_pri_file"; print HEADERS_PRI_FILE "$headers_pri_contents"; close HEADERS_PRI_FILE; @@ -948,7 +955,7 @@ unless($showonly || !$create_uic_class_map) { } if($class_lib_map) { my $class_lib_map_dir = dirname($class_lib_map); - mkpath $class_lib_map_dir, 0777; + mkpath $class_lib_map_dir, !$quiet; open CLASS_LIB_MAP, ">$class_lib_map"; print CLASS_LIB_MAP "$class_lib_map_contents"; close CLASS_LIB_MAP; |