scppatchsoname.pm (b274bc22) scppatchsoname.pm (dba1a2e4)
1#**************************************************************
2#
3# Licensed to the Apache Software Foundation (ASF) under one
4# or more contributor license agreements. See the NOTICE file
5# distributed with this work for additional information
6# regarding copyright ownership. The ASF licenses this file
7# to you under the Apache License, Version 2.0 (the
8# "License"); you may not use this file except in compliance

--- 86 unchanged lines hidden (view full) ---

95 for ( my $i = 1; $i <= 80; $i++ ) { $replacestring .= $onestring; }
96
97 my $productname = $variableshashref->{'PRODUCTNAME'} . " " . $variableshashref->{'PRODUCTVERSION'};
98 if ( exists($onefilehash->{'FileDescription'}) ) { $productname = $onefilehash->{'FileDescription'}; }
99 my $unicode_productname = convert_to_unicode($productname);
100
101 change_length_of_string(\$unicode_productname, $replacestring);
102
1#**************************************************************
2#
3# Licensed to the Apache Software Foundation (ASF) under one
4# or more contributor license agreements. See the NOTICE file
5# distributed with this work for additional information
6# regarding copyright ownership. The ASF licenses this file
7# to you under the Apache License, Version 2.0 (the
8# "License"); you may not use this file except in compliance

--- 86 unchanged lines hidden (view full) ---

95 for ( my $i = 1; $i <= 80; $i++ ) { $replacestring .= $onestring; }
96
97 my $productname = $variableshashref->{'PRODUCTNAME'} . " " . $variableshashref->{'PRODUCTVERSION'};
98 if ( exists($onefilehash->{'FileDescription'}) ) { $productname = $onefilehash->{'FileDescription'}; }
99 my $unicode_productname = convert_to_unicode($productname);
100
101 change_length_of_string(\$unicode_productname, $replacestring);
102
103 my $found1 = $onefile =~ s/$replacestring/$unicode_productname/sg;
103 my $found = $onefile =~ s/$replacestring/$unicode_productname/sg;
104
104
105 my $found2 = 0;
106
107 if ( $styles =~ /\bPATCH_SO_NAME_Z\b/ )
108 {
109 # searching for "z"
110
111 $onestring = "z" . chr(0);
112 $replacestring = "";
113 for ( my $i = 1; $i <= 80; $i++ ) { $replacestring .= $onestring; }
114
115 my $productname2 = $variableshashref->{'PRODUCTNAME'} . " " . $variableshashref->{'PRODUCTVERSION'};
116 if ( exists($onefilehash->{'FileDescriptionZ'}) ) { $productname2 = $onefilehash->{'FileDescriptionZ'}; }
117 my $unicode_productname2 = convert_to_unicode($productname2);
118
119 change_length_of_string_with_letter(\$unicode_productname2, $replacestring, $onestring);
120
121 $found2 = $onefile =~ s/$replacestring/$unicode_productname2/sg;
122 }
123
124 installer::files::save_binary_file($onefile, $destpath);
125
105 installer::files::save_binary_file($onefile, $destpath);
106
126 my $found = $found1 + $found2;
127
128 return $found;
129}
130
131#########################################################
132# Analyzing files with flag PATCH_SO_NAME
133#########################################################
134
135sub resolving_patchsoname_flag

--- 77 unchanged lines hidden ---
107 return $found;
108}
109
110#########################################################
111# Analyzing files with flag PATCH_SO_NAME
112#########################################################
113
114sub resolving_patchsoname_flag

--- 77 unchanged lines hidden ---