diff options
author | Miikka Heikkinen <miikka.heikkinen@digia.com> | 2010-10-15 12:14:27 (GMT) |
---|---|---|
committer | Miikka Heikkinen <miikka.heikkinen@digia.com> | 2010-10-15 12:35:09 (GMT) |
commit | 05231f486b93dfb3992bfb96568f8c71d877e104 (patch) | |
tree | e5ac9e100e26d178abc454c614bd356a02655f5e /bin | |
parent | 13bc1e0b99dd1d32bc0fef1dbdf0813ff5f4c66c (diff) | |
download | Qt-05231f486b93dfb3992bfb96568f8c71d877e104.zip Qt-05231f486b93dfb3992bfb96568f8c71d877e104.tar.gz Qt-05231f486b93dfb3992bfb96568f8c71d877e104.tar.bz2 |
Fix epocroot handling in createpackage.pl script
Before this fix, creating stub sis failed if epocroot was simply a
forward slash. Mixing forward slashes and backslashes also caused
issues.
Reviewed-by: Janne Koskinen
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/createpackage.pl | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/bin/createpackage.pl b/bin/createpackage.pl index 41ba2e3..522d1fb 100755 --- a/bin/createpackage.pl +++ b/bin/createpackage.pl @@ -140,7 +140,12 @@ unless (GetOptions('i|install' => \$install, } my $epocroot = $ENV{EPOCROOT}; -$epocroot =~ s,[\\/]$,,x; +if ($epocroot ne "") { + $epocroot =~ s,\\,/,g; + if ($epocroot =~ m,[^/]$,) { + $epocroot = $epocroot."/"; + } +} my $certfilepath = abs_path(dirname($certfile)); @@ -328,11 +333,11 @@ if ($preprocessonly) { if($stub) { if(!($epocroot)) { die("ERROR: EPOCROOT must be set to create stub sis files"); } - my $systeminstall = "$epocroot/epoc32/data/z/system/install"; + my $systeminstall = "${epocroot}epoc32/data/z/system/install"; mkpath($systeminstall); my $stub_sis_name = $systeminstall."/".$stub_sis_name; # Create stub SIS. - system ("$epocroot/epoc32/tools/makesis -s $pkgoutput $stub_sis_name"); + system ("${epocroot}epoc32/tools/makesis -s $pkgoutput $stub_sis_name"); } else { if ($certtext eq "Self Signed" && !@certificates @@ -346,7 +351,7 @@ if($stub) { # Create SIS. # The 'and' is because system uses 0 to indicate success. if($epocroot) { - system ("$epocroot/epoc32/tools/makesis $pkgoutput $unsigned_sis_name") and die ("ERROR: makesis failed"); + system ("${epocroot}epoc32/tools/makesis $pkgoutput $unsigned_sis_name") and die ("ERROR: makesis failed"); } else { system ("makesis $pkgoutput $unsigned_sis_name") and die ("ERROR: makesis failed"); } |