1 diff -u -r solenv/bin-pristine/make_installer.pl solenv/bin/make_installer.pl
2 --- solenv/bin-pristine/make_installer.pl 2008-11-25 19:22:01.000000000 +0000
3 +++ solenv/bin/make_installer.pl 2008-12-12 15:25:33.000000000 +0000
5 installer::setupscript::resolve_lowercase_productname_setupscriptvariable($allscriptvariablesref);
6 if ( $installer::globals::globallogging ) { installer::files::save_file($loggingdir . "setupscriptvariables3.log" ,$allscriptvariablesref); }
8 -installer::setupscript::replace_all_setupscriptvariables_in_script($setupscriptref, $allscriptvariablesref);
9 +$setupscriptref = installer::setupscript::replace_all_setupscriptvariables_in_script($setupscriptref, $allscriptvariablesref);
10 if ( $installer::globals::globallogging ) { installer::files::save_file($loggingdir . "setupscript2.log" ,$setupscriptref); }
12 # Adding all variables defined in the installation object into the hash of all variables.
14 diff -u -r solenv/bin-pristine/modules/installer/setupscript.pm solenv/bin/modules/installer/setupscript.pm
15 --- solenv/bin/modules/installer/setupscript.pm.old 2009-04-02 12:53:08.000000000 +0200
16 +++ solenv/bin/modules/installer/setupscript.pm 2009-04-03 20:30:33.000000000 +0200
17 @@ -248,22 +248,30 @@ sub replace_all_setupscriptvariables_in_
21 - for ( my $i = 0; $i <= $#{$scriptref}; $i++ )
23 - my $line = ${$scriptref}[$i];
25 - if ( $line =~ /^.*\%\w+.*$/ ) # only oif "%" occurs
27 - # Attention: It must be possible to substitute "%PRODUCTNAMEn", "%PRODUCTNAME%PRODUCTVERSIONabc"
29 - foreach my $key ( keys %subs )
31 - my $value = $subs{$key};
32 - $line =~ s/$key/$value/g;
33 - ${$scriptref}[$i] = $line;
36 + # This is far faster than running a regexp for each line
38 + for my $line (@{$scriptref}) {
39 + $bigstring = $bigstring . $line;
41 + foreach my $key ( keys %subs )
43 + # Attention: It must be possible to substitute "%PRODUCTNAMEn", "%PRODUCTNAME%PRODUCTVERSIONabc"
44 + my $value = $subs{$key};
45 + $bigstring =~ s/$key/$value/g;
47 + my @newlines = split /\n/, $bigstring;
48 + $scriptref = \@newlines;
50 + # now check for any mis-named '%' variables that we have left
52 + for my $check (@newlines) {
54 + if ( $check =~ /^.*\%\w+.*$/ ) {
55 + print STDERR "Warning: mis-named or un-known '%' variable at line $num:\n$check\n";
62 #######################################################################