ziplist.pm (86e1cf34) ziplist.pm (95e2fe77)
1#**************************************************************
1#**************************************************************
2#
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
9# with the License. You may obtain a copy of the License at
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
9# with the License. You may obtain a copy of the License at
10#
10#
11# http://www.apache.org/licenses/LICENSE-2.0
11# http://www.apache.org/licenses/LICENSE-2.0
12#
12#
13# Unless required by applicable law or agreed to in writing,
14# software distributed under the License is distributed on an
15# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16# KIND, either express or implied. See the License for the
17# specific language governing permissions and limitations
18# under the License.
13# Unless required by applicable law or agreed to in writing,
14# software distributed under the License is distributed on an
15# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16# KIND, either express or implied. See the License for the
17# specific language governing permissions and limitations
18# under the License.
19#
19#
20#**************************************************************
21
22
23
24package installer::ziplist;
25
26use installer::existence;
27use installer::exiter;
28use installer::globals;
29use installer::logger;
30use installer::parameter;
31use installer::remover;
32use installer::systemactions;
33use strict;
34
35=head2 read_openoffice_lst_file (#loggingdir)
20#**************************************************************
21
22
23
24package installer::ziplist;
25
26use installer::existence;
27use installer::exiter;
28use installer::globals;
29use installer::logger;
30use installer::parameter;
31use installer::remover;
32use installer::systemactions;
33use strict;
34
35=head2 read_openoffice_lst_file (#loggingdir)
36 Read the settings and variables from the settings file (typically 'openoffice.lst').
36 Read the settings and variables from the settings file (typically 'openoffice.lst').
37=cut
38sub read_openoffice_lst_file ($$;$)
39{
37=cut
38sub read_openoffice_lst_file ($$;$)
39{
40 my ($filename, $product_name, $loggingdir) = @_;
40 my ($filename, $product_name, $loggingdir) = @_;
41
41
42 # Read all lines from the settings file.
43 my $ziplistref = installer::files::read_file($filename);
42 # Read all lines from the settings file.
43 my $ziplistref = installer::files::read_file($filename);
44
45 # Extract the lines of the settings block for the current product.
46 my ($productblockref, $parent) = installer::ziplist::getproductblock(
47 $ziplistref, $product_name, 1);
48 my ($settingsblockref, undef) = installer::ziplist::getproductblock($productblockref, "Settings", 0);
49 $settingsblockref = installer::ziplist::analyze_settings_block($settingsblockref);
50
51 # Split into settings and variables.
52 my $allsettingsarrayref = installer::ziplist::get_settings_from_ziplist($settingsblockref);
53 my $allvariablesarrayref = installer::ziplist::get_variables_from_ziplist($settingsblockref);
44
45 # Extract the lines of the settings block for the current product.
46 my ($productblockref, $parent) = installer::ziplist::getproductblock(
47 $ziplistref, $product_name, 1);
48 my ($settingsblockref, undef) = installer::ziplist::getproductblock($productblockref, "Settings", 0);
49 $settingsblockref = installer::ziplist::analyze_settings_block($settingsblockref);
50
51 # Split into settings and variables.
52 my $allsettingsarrayref = installer::ziplist::get_settings_from_ziplist($settingsblockref);
53 my $allvariablesarrayref = installer::ziplist::get_variables_from_ziplist($settingsblockref);
54
54
55 # global product block from zip.lst
56 my ($globalproductblockref, undef) = installer::ziplist::getproductblock(
57 $ziplistref, $installer::globals::globalblock, 0);
58
59 if ($installer::globals::globallogging && defined $loggingdir)
60 {
61 installer::files::save_file($loggingdir . "productblock.log", $productblockref);
62 installer::files::save_file($loggingdir . "settingsblock.log", $settingsblockref);

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

104
105 if ($installer::globals::globallogging && defined $loggingdir)
106 {
107 installer::files::save_file($loggingdir . "globalsettingsblock1.log", $globalsettingsblockref);
108 installer::files::save_file($loggingdir . "globalsettingsblock2.log", $globalsettingsblockref);
109 installer::files::save_file($loggingdir . "allglobalsettings1.log", $allglobalsettingsarrayref);
110 installer::files::save_file($loggingdir . "allglobalvariables1.log", $allglobalvariablesarrayref);
111 }
55 # global product block from zip.lst
56 my ($globalproductblockref, undef) = installer::ziplist::getproductblock(
57 $ziplistref, $installer::globals::globalblock, 0);
58
59 if ($installer::globals::globallogging && defined $loggingdir)
60 {
61 installer::files::save_file($loggingdir . "productblock.log", $productblockref);
62 installer::files::save_file($loggingdir . "settingsblock.log", $settingsblockref);

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

104
105 if ($installer::globals::globallogging && defined $loggingdir)
106 {
107 installer::files::save_file($loggingdir . "globalsettingsblock1.log", $globalsettingsblockref);
108 installer::files::save_file($loggingdir . "globalsettingsblock2.log", $globalsettingsblockref);
109 installer::files::save_file($loggingdir . "allglobalsettings1.log", $allglobalsettingsarrayref);
110 installer::files::save_file($loggingdir . "allglobalvariables1.log", $allglobalvariablesarrayref);
111 }
112
112
113 if (scalar @$allglobalsettingsarrayref > 0)
114 {
115 $allsettingsarrayref = installer::converter::combine_arrays_from_references_first_win(
116 $allsettingsarrayref, $allglobalsettingsarrayref);
117 }
118 if (scalar @$allglobalvariablesarrayref > 0)
119 {
120 $allvariablesarrayref = installer::converter::combine_arrays_from_references_first_win(

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

129
130 # Transform array into hash.
131 my $allvariableshashref = installer::converter::convert_array_to_hash($allvariablesarrayref);
132
133 # Postprocess the variables.
134 installer::ziplist::set_default_productversion_if_required($allvariableshashref);
135 installer::ziplist::add_variables_to_allvariableshashref($allvariableshashref);
136 installer::ziplist::overwrite_ooovendor($allvariableshashref);
113 if (scalar @$allglobalsettingsarrayref > 0)
114 {
115 $allsettingsarrayref = installer::converter::combine_arrays_from_references_first_win(
116 $allsettingsarrayref, $allglobalsettingsarrayref);
117 }
118 if (scalar @$allglobalvariablesarrayref > 0)
119 {
120 $allvariablesarrayref = installer::converter::combine_arrays_from_references_first_win(

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

129
130 # Transform array into hash.
131 my $allvariableshashref = installer::converter::convert_array_to_hash($allvariablesarrayref);
132
133 # Postprocess the variables.
134 installer::ziplist::set_default_productversion_if_required($allvariableshashref);
135 installer::ziplist::add_variables_to_allvariableshashref($allvariableshashref);
136 installer::ziplist::overwrite_ooovendor($allvariableshashref);
137
137
138 if ($installer::globals::globallogging && defined $loggingdir)
139 {
140 installer::files::save_file($loggingdir . "allsettings2.log" ,$allsettingsarrayref);
141 installer::files::save_file($loggingdir . "allvariables2.log" ,$allvariablesarrayref);
142 }
143
138 if ($installer::globals::globallogging && defined $loggingdir)
139 {
140 installer::files::save_file($loggingdir . "allsettings2.log" ,$allsettingsarrayref);
141 installer::files::save_file($loggingdir . "allvariables2.log" ,$allvariablesarrayref);
142 }
143
144 # Eventually we should fix this so that we don't have to return the raw arrays, only the resulting hashes.
145 return ($allvariableshashref, $allsettingsarrayref);
144 # Eventually we should fix this so that we don't have to return the raw arrays, only the resulting hashes.
145 return ($allvariableshashref, $allsettingsarrayref);
146}
147
148
149#################################################
150# Getting data from path file and zip list file
151#################################################
152
153sub getproductblock
154{
155 my ($fileref, $search, $inheritance) = @_;
156
157 my @searchblock = ();
158 my $searchexists = 0;
159 my $record = 0;
160 my $count = 0;
161 my $line;
146}
147
148
149#################################################
150# Getting data from path file and zip list file
151#################################################
152
153sub getproductblock
154{
155 my ($fileref, $search, $inheritance) = @_;
156
157 my @searchblock = ();
158 my $searchexists = 0;
159 my $record = 0;
160 my $count = 0;
161 my $line;
162 my $inh = $inheritance ? '(?::\s*(\S+)\s*)?' : "";
163 my $parent;
162 my $inh = $inheritance ? '(?::\s*(\S+)\s*)?' : "";
163 my $parent;
164
165 for ( my $i = 0; $i <= $#{$fileref}; $i++ )
166 {
167 $line = ${$fileref}[$i];
164
165 for ( my $i = 0; $i <= $#{$fileref}; $i++ )
166 {
167 $line = ${$fileref}[$i];
168
169 if ( $line =~ /^\s*\Q$search\E\s*$inh$/i ) # case insensitive
168
169 if ( $line =~ /^\s*\Q$search\E\s*$inh$/i ) # case insensitive
170 {
171 $record = 1;
172 $searchexists = 1;
170 {
171 $record = 1;
172 $searchexists = 1;
173 $parent = $1 if $inheritance;
173 $parent = $1 if $inheritance;
174 }
175
176 if ($record)
177 {
178 push(@searchblock, $line);
179 }
174 }
175
176 if ($record)
177 {
178 push(@searchblock, $line);
179 }
180
180
181 if ( ($record) && ($line =~ /\{/) )
182 {
183 $count++;
181 if ( ($record) && ($line =~ /\{/) )
182 {
183 $count++;
184 }
185
184 }
185
186 if ( ($record) && ($line =~ /\}/) )
187 {
188 $count--;
186 if ( ($record) && ($line =~ /\}/) )
187 {
188 $count--;
189 }
190
189 }
190
191 if ( ($record) && ($line =~ /\}/) && ( $count == 0 ) )
192 {
193 $record = 0;
194 }
195 }
196
197 if (( ! $searchexists ) && ( $search ne $installer::globals::globalblock ))
198 {

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

224 my @newsettingsblock = ();
225 my $compilerstring = "";
226 my $record = 1;
227 my $counter = 0;
228
229 # Allowed values in settings block:
230 # "Settings", "Variables", "unix" (for destination path and logfile)
231 # Furthermore allowed values are $installer::globals::build (srx645) and $installer::globals::compiler (pro and nonpro (unxsols4.pro))
191 if ( ($record) && ($line =~ /\}/) && ( $count == 0 ) )
192 {
193 $record = 0;
194 }
195 }
196
197 if (( ! $searchexists ) && ( $search ne $installer::globals::globalblock ))
198 {

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

224 my @newsettingsblock = ();
225 my $compilerstring = "";
226 my $record = 1;
227 my $counter = 0;
228
229 # Allowed values in settings block:
230 # "Settings", "Variables", "unix" (for destination path and logfile)
231 # Furthermore allowed values are $installer::globals::build (srx645) and $installer::globals::compiler (pro and nonpro (unxsols4.pro))
232
232
233 # Comment line in settings block begin with "#" or ";"
234
235 if ( $installer::globals::pro )
236 {
237 $compilerstring = $installer::globals::compiler . ".pro";
238 }
239 else
240 {
241 $compilerstring = $installer::globals::compiler;
242 }
243
244 for ( my $i = 0; $i <= $#{$blockref}; $i++ )
245 {
246 my $line = ${$blockref}[$i];
247 my $nextline = "";
233 # Comment line in settings block begin with "#" or ";"
234
235 if ( $installer::globals::pro )
236 {
237 $compilerstring = $installer::globals::compiler . ".pro";
238 }
239 else
240 {
241 $compilerstring = $installer::globals::compiler;
242 }
243
244 for ( my $i = 0; $i <= $#{$blockref}; $i++ )
245 {
246 my $line = ${$blockref}[$i];
247 my $nextline = "";
248
248
249 if ( ${$blockref}[$i+1] ) { $nextline = ${$blockref}[$i+1]; }
250
251 # removing comment lines
252
249 if ( ${$blockref}[$i+1] ) { $nextline = ${$blockref}[$i+1]; }
250
251 # removing comment lines
252
253 if (($line =~ /^\s*\#/) || ($line =~ /^\s*\;/))
253 if (($line =~ /^\s*\#/) || ($line =~ /^\s*\;/))
254 {
254 {
255 next;
255 next;
256 }
256 }
257
258 # complete blocks of unknows strings are not recorded
259
257
258 # complete blocks of unknown strings are not recorded
259
260 if ((!($line =~ /^\s*\Q$compilerstring\E\s*$/i)) &&
261 (!($line =~ /^\s*\Q$installer::globals::build\E\s*$/i)) &&
262 (!($line =~ /^\s*\bSettings\b\s*$/i)) &&
263 (!($line =~ /^\s*\bVariables\b\s*$/i)) &&
264 (!($line =~ /^\s*\bunix\b\s*$/i)) &&
265 ($nextline =~ /^\s*\{\s*$/i))
266 {
267 $record = 0;
268 next; # continue with next $i
269 }
270
271 if (!( $record ))
272 {
273 if ($line =~ /^\s*\{\s*$/i)
274 {
260 if ((!($line =~ /^\s*\Q$compilerstring\E\s*$/i)) &&
261 (!($line =~ /^\s*\Q$installer::globals::build\E\s*$/i)) &&
262 (!($line =~ /^\s*\bSettings\b\s*$/i)) &&
263 (!($line =~ /^\s*\bVariables\b\s*$/i)) &&
264 (!($line =~ /^\s*\bunix\b\s*$/i)) &&
265 ($nextline =~ /^\s*\{\s*$/i))
266 {
267 $record = 0;
268 next; # continue with next $i
269 }
270
271 if (!( $record ))
272 {
273 if ($line =~ /^\s*\{\s*$/i)
274 {
275 $counter++;
275 $counter++;
276 }
277
278 if ($line =~ /^\s*\}\s*$/i)
279 {
276 }
277
278 if ($line =~ /^\s*\}\s*$/i)
279 {
280 $counter--;
280 $counter--;
281 }
281 }
282
282
283 if ($counter == 0)
284 {
285 $record = 1;
286 next; # continue with next $i
287 }
288 }
289
290 if ($record)
291 {
292 push(@newsettingsblock, $line);
293 }
283 if ($counter == 0)
284 {
285 $record = 1;
286 next; # continue with next $i
287 }
288 }
289
290 if ($record)
291 {
292 push(@newsettingsblock, $line);
293 }
294 }
294 }
295
296 return \@newsettingsblock;
297}
298
299########################################
300# Settings in zip list file
301########################################
302
303sub get_settings_from_ziplist
304{
305 my ($blockref) = @_;
306
307 my @allsettings = ();
308 my $isvariables = 0;
309 my $counter = 0;
310 my $variablescounter = 0;
311
312 # Take all settings from the settings block
313 # Do not take the variables from the settings block
295
296 return \@newsettingsblock;
297}
298
299########################################
300# Settings in zip list file
301########################################
302
303sub get_settings_from_ziplist
304{
305 my ($blockref) = @_;
306
307 my @allsettings = ();
308 my $isvariables = 0;
309 my $counter = 0;
310 my $variablescounter = 0;
311
312 # Take all settings from the settings block
313 # Do not take the variables from the settings block
314 # If a setting is defined more than once, take the
314 # If a setting is defined more than once, take the
315 # setting with the largest counter (open brackets)
316
317 for ( my $i = 0; $i <= $#{$blockref}; $i++ )
318 {
319 my $line = ${$blockref}[$i];
320 my $nextline = "";
321
322 if ( ${$blockref}[$i+1] ) { $nextline = ${$blockref}[$i+1]; }
323
315 # setting with the largest counter (open brackets)
316
317 for ( my $i = 0; $i <= $#{$blockref}; $i++ )
318 {
319 my $line = ${$blockref}[$i];
320 my $nextline = "";
321
322 if ( ${$blockref}[$i+1] ) { $nextline = ${$blockref}[$i+1]; }
323
324 if (($line =~ /^\s*\S+\s*$/i) &&
325 ($nextline =~ /^\s*\{\s*$/i) &&
324 if (($line =~ /^\s*\S+\s*$/i) &&
325 ($nextline =~ /^\s*\{\s*$/i) &&
326 (!($line =~ /^\s*Variables\s*$/i)))
327 {
328 next;
329 }
330
331 if ($line =~ /^\s*Variables\s*$/i)
332 {
333 # This is a block of variables
326 (!($line =~ /^\s*Variables\s*$/i)))
327 {
328 next;
329 }
330
331 if ($line =~ /^\s*Variables\s*$/i)
332 {
333 # This is a block of variables
334
334
335 $isvariables = 1;
336 next;
337 }
338
339 if ($line =~ /^\s*\{\s*$/i)
340 {
341 if ($isvariables)
342 {
343 $variablescounter++;
344 }
345 else
346 {
347 $counter++;
335 $isvariables = 1;
336 next;
337 }
338
339 if ($line =~ /^\s*\{\s*$/i)
340 {
341 if ($isvariables)
342 {
343 $variablescounter++;
344 }
345 else
346 {
347 $counter++;
348 }
348 }
349
350 next;
351 }
352
353 if ($line =~ /^\s*\}\s*$/i)
354 {
355 if ($isvariables)
356 {
357 $variablescounter--;
349
350 next;
351 }
352
353 if ($line =~ /^\s*\}\s*$/i)
354 {
355 if ($isvariables)
356 {
357 $variablescounter--;
358
358
359 if ($variablescounter == 0)
360 {
361 $isvariables = 0;
362 }
363 }
364 else
365 {
366 $counter--;
359 if ($variablescounter == 0)
360 {
361 $isvariables = 0;
362 }
363 }
364 else
365 {
366 $counter--;
367 }
367 }
368
368
369 next;
369 next;
370 }
370 }
371
371
372 if ($isvariables)
373 {
374 next;
375 }
376
377 installer::remover::remove_leading_and_ending_whitespaces(\$line);
372 if ($isvariables)
373 {
374 next;
375 }
376
377 installer::remover::remove_leading_and_ending_whitespaces(\$line);
378
378
379 $line .= "\t##$counter##\n";
379 $line .= "\t##$counter##\n";
380
380
381 push(@allsettings, $line);
382 }
383
381 push(@allsettings, $line);
382 }
383
384 return \@allsettings;
384 return \@allsettings;
385}
386
387#######################################
388# Variables from zip list file
389#######################################
390
391sub get_variables_from_ziplist
392{
393 my ($blockref) = @_;
394
395 my @allvariables = ();
396 my $isvariables = 0;
397 my $counter = 0;
398 my $variablescounter = 0;
399 my $countersum = 0;
385}
386
387#######################################
388# Variables from zip list file
389#######################################
390
391sub get_variables_from_ziplist
392{
393 my ($blockref) = @_;
394
395 my @allvariables = ();
396 my $isvariables = 0;
397 my $counter = 0;
398 my $variablescounter = 0;
399 my $countersum = 0;
400
400
401 # Take all variables from the settings block
402 # Do not take the other settings from the settings block
401 # Take all variables from the settings block
402 # Do not take the other settings from the settings block
403 # If a variable is defined more than once, take the
403 # If a variable is defined more than once, take the
404 # variable with the largest counter (open brackets)
405
406 for ( my $i = 0; $i <= $#{$blockref}; $i++ )
407 {
408 my $line = ${$blockref}[$i];
409 my $nextline = ${$blockref}[$i+1];
410
411 if ($line =~ /^\s*Variables\s*$/i)
412 {
413 # This is a block of variables
404 # variable with the largest counter (open brackets)
405
406 for ( my $i = 0; $i <= $#{$blockref}; $i++ )
407 {
408 my $line = ${$blockref}[$i];
409 my $nextline = ${$blockref}[$i+1];
410
411 if ($line =~ /^\s*Variables\s*$/i)
412 {
413 # This is a block of variables
414
414
415 $isvariables = 1;
416 next;
417 }
418
419 if ($line =~ /^\s*\{\s*$/i)
420 {
421 if ($isvariables)
422 {
423 $variablescounter++;
424 }
425 else
426 {
427 $counter++;
415 $isvariables = 1;
416 next;
417 }
418
419 if ($line =~ /^\s*\{\s*$/i)
420 {
421 if ($isvariables)
422 {
423 $variablescounter++;
424 }
425 else
426 {
427 $counter++;
428 }
428 }
429
430 next;
431 }
432
433 if ($line =~ /^\s*\}\s*$/i)
434 {
435 if ($isvariables)
436 {
437 $variablescounter--;
429
430 next;
431 }
432
433 if ($line =~ /^\s*\}\s*$/i)
434 {
435 if ($isvariables)
436 {
437 $variablescounter--;
438
438
439 if ($variablescounter == 0)
440 {
441 $isvariables = 0;
442 }
443 }
444 else
445 {
446 $counter--;
439 if ($variablescounter == 0)
440 {
441 $isvariables = 0;
442 }
443 }
444 else
445 {
446 $counter--;
447 }
447 }
448
448
449 next;
449 next;
450 }
450 }
451
451
452 if (!($isvariables))
453 {
454 next;
455 }
456
457 $countersum = $counter + $variablescounter;
458
459 installer::remover::remove_leading_and_ending_whitespaces(\$line);
452 if (!($isvariables))
453 {
454 next;
455 }
456
457 $countersum = $counter + $variablescounter;
458
459 installer::remover::remove_leading_and_ending_whitespaces(\$line);
460
460
461 $line .= "\t##$countersum##\n";
461 $line .= "\t##$countersum##\n";
462
462
463 push(@allvariables, $line);
464 }
465
463 push(@allvariables, $line);
464 }
465
466 return \@allvariables;
466 return \@allvariables;
467}
468
469#######################################################################
470# Removing multiple variables and settings, defined in zip list file
471#######################################################################
472
473sub remove_multiples_from_ziplist
474{

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

479 # Take the one with the most open brackets. This
480 # number is stored at the end of the string.
481
482 my @newarray = ();
483 my @itemarray = ();
484 my ($line, $itemname, $itemnumber);
485
486 # first collecting all variables and settings names
467}
468
469#######################################################################
470# Removing multiple variables and settings, defined in zip list file
471#######################################################################
472
473sub remove_multiples_from_ziplist
474{

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

479 # Take the one with the most open brackets. This
480 # number is stored at the end of the string.
481
482 my @newarray = ();
483 my @itemarray = ();
484 my ($line, $itemname, $itemnumber);
485
486 # first collecting all variables and settings names
487
487
488 for ( my $i = 0; $i <= $#{$blockref}; $i++ )
489 {
490 $line = ${$blockref}[$i];
491
492 if ($line =~ /^\s*\b(\S*)\b\s+.*\#\#\d+\#\#\s*$/i)
493 {
494 $itemname = $1;
495 }
488 for ( my $i = 0; $i <= $#{$blockref}; $i++ )
489 {
490 $line = ${$blockref}[$i];
491
492 if ($line =~ /^\s*\b(\S*)\b\s+.*\#\#\d+\#\#\s*$/i)
493 {
494 $itemname = $1;
495 }
496
496
497 if (! installer::existence::exists_in_array($itemname, \@itemarray))
498 {
499 push(@itemarray, $itemname);
500 }
501 }
497 if (! installer::existence::exists_in_array($itemname, \@itemarray))
498 {
499 push(@itemarray, $itemname);
500 }
501 }
502
502
503 # and now all $items can be selected with the highest number
504
505 for ( my $i = 0; $i <= $#itemarray; $i++ )
506 {
507 $itemname = $itemarray[$i];
508
509 my $itemnumbermax = 0;
510 my $printline = "";
511
512 for ( my $j = 0; $j <= $#{$blockref}; $j++ )
503 # and now all $items can be selected with the highest number
504
505 for ( my $i = 0; $i <= $#itemarray; $i++ )
506 {
507 $itemname = $itemarray[$i];
508
509 my $itemnumbermax = 0;
510 my $printline = "";
511
512 for ( my $j = 0; $j <= $#{$blockref}; $j++ )
513 {
513 {
514 $line = ${$blockref}[$j];
515
516 if ($line =~ /^\s*\Q$itemname\E\s+.*\#\#(\d+)\#\#\s*$/)
517 {
518 $itemnumber = $1;
519
520 if ($itemnumber >= $itemnumbermax)
521 {
522 $printline = $line;
523 $itemnumbermax = $itemnumber;
524 }
525 }
526 }
514 $line = ${$blockref}[$j];
515
516 if ($line =~ /^\s*\Q$itemname\E\s+.*\#\#(\d+)\#\#\s*$/)
517 {
518 $itemnumber = $1;
519
520 if ($itemnumber >= $itemnumbermax)
521 {
522 $printline = $line;
523 $itemnumbermax = $itemnumber;
524 }
525 }
526 }
527
527
528 # removing the ending number from the printline
529 # and putting it into the array
528 # removing the ending number from the printline
529 # and putting it into the array
530
530
531 $printline =~ s/\#\#\d+\#\#//;
532 installer::remover::remove_leading_and_ending_whitespaces(\$line);
531 $printline =~ s/\#\#\d+\#\#//;
532 installer::remover::remove_leading_and_ending_whitespaces(\$line);
533 push(@newarray, $printline);
533 push(@newarray, $printline);
534 }
535
534 }
535
536 return \@newarray;
536 return \@newarray;
537}
538
539#########################################################
540# Reading one variable defined in the zip list file
541#########################################################
542
543sub getinfofromziplist
544{
545 my ($blockref, $variable) = @_;
546
547 my $searchstring = "";
548 my $line;
549
550 for ( my $i = 0; $i <= $#{$blockref}; $i++ )
551 {
552 $line = ${$blockref}[$i];
537}
538
539#########################################################
540# Reading one variable defined in the zip list file
541#########################################################
542
543sub getinfofromziplist
544{
545 my ($blockref, $variable) = @_;
546
547 my $searchstring = "";
548 my $line;
549
550 for ( my $i = 0; $i <= $#{$blockref}; $i++ )
551 {
552 $line = ${$blockref}[$i];
553
553
554 if ( $line =~ /^\s*\Q$variable\E\s+(.+?)\s*$/ ) # "?" for minimal matching
555 {
556 $searchstring = $1;
557 last;
554 if ( $line =~ /^\s*\Q$variable\E\s+(.+?)\s*$/ ) # "?" for minimal matching
555 {
556 $searchstring = $1;
557 last;
558 }
558 }
559 }
559 }
560
560
561 return \$searchstring;
562}
563
564####################################################
565# Replacing variables in include path
566####################################################
567
568sub replace_all_variables_in_pathes
569{
570 my ( $patharrayref, $variableshashref ) = @_;
561 return \$searchstring;
562}
563
564####################################################
565# Replacing variables in include path
566####################################################
567
568sub replace_all_variables_in_pathes
569{
570 my ( $patharrayref, $variableshashref ) = @_;
571
571
572 for ( my $i = 0; $i <= $#{$patharrayref}; $i++ )
573 {
574 my $line = ${$patharrayref}[$i];
575
576 my $key;
577
578 foreach $key (keys %{$variableshashref})
579 {
580 my $value = $variableshashref->{$key};
572 for ( my $i = 0; $i <= $#{$patharrayref}; $i++ )
573 {
574 my $line = ${$patharrayref}[$i];
575
576 my $key;
577
578 foreach $key (keys %{$variableshashref})
579 {
580 my $value = $variableshashref->{$key};
581
581
582 if (( $line =~ /\{$key\}/ ) && ( $value eq "" )) { $line = ".\n"; }
582 if (( $line =~ /\{$key\}/ ) && ( $value eq "" )) { $line = ".\n"; }
583
584 $line =~ s/\{\Q$key\E\}/$value/g;
583
584 $line =~ s/\{\Q$key\E\}/$value/g;
585 }
585 }
586
586
587 ${$patharrayref}[$i] = $line;
588 }
589}
590
591####################################################
592# Replacing minor in include path
593####################################################
594
595sub replace_minor_in_pathes
596{
597 my ( $patharrayref ) = @_;
587 ${$patharrayref}[$i] = $line;
588 }
589}
590
591####################################################
592# Replacing minor in include path
593####################################################
594
595sub replace_minor_in_pathes
596{
597 my ( $patharrayref ) = @_;
598
598
599 for ( my $i = 0; $i <= $#{$patharrayref}; $i++ )
600 {
601 my $line = ${$patharrayref}[$i];
602
603 if ( ! defined $ENV{CWS_WORK_STAMP} and defined $ENV{UPDMINOR} )
604# if ( $installer::globals::minor )
605 {
599 for ( my $i = 0; $i <= $#{$patharrayref}; $i++ )
600 {
601 my $line = ${$patharrayref}[$i];
602
603 if ( ! defined $ENV{CWS_WORK_STAMP} and defined $ENV{UPDMINOR} )
604# if ( $installer::globals::minor )
605 {
606 $line =~ s/\{minor\}/$installer::globals::minor/g;
606 $line =~ s/\{minor\}/$installer::globals::minor/g;
607 # no difference for minor and minornonpre (ToDo ?)
608 $line =~ s/\{minornonpre\}/$installer::globals::minor/g;
609 }
610 else # building without a minor
611 {
607 # no difference for minor and minornonpre (ToDo ?)
608 $line =~ s/\{minornonpre\}/$installer::globals::minor/g;
609 }
610 else # building without a minor
611 {
612 $line =~ s/\.\{minor\}//g;
613 $line =~ s/\.\{minornonpre\}//g;
612 $line =~ s/\.\{minor\}//g;
613 $line =~ s/\.\{minornonpre\}//g;
614 }
614 }
615
615
616 ${$patharrayref}[$i] = $line;
617 }
618}
619
620####################################################
621# Replacing packagetype in include path
622####################################################
623
624sub replace_packagetype_in_pathes
625{
626 my ( $patharrayref ) = @_;
616 ${$patharrayref}[$i] = $line;
617 }
618}
619
620####################################################
621# Replacing packagetype in include path
622####################################################
623
624sub replace_packagetype_in_pathes
625{
626 my ( $patharrayref ) = @_;
627
627
628 for ( my $i = 0; $i <= $#{$patharrayref}; $i++ )
629 {
630 my $line = ${$patharrayref}[$i];
631
632 if (( $installer::globals::installertypedir ) && ( $line =~ /\{pkgtype\}/ ))
633 {
628 for ( my $i = 0; $i <= $#{$patharrayref}; $i++ )
629 {
630 my $line = ${$patharrayref}[$i];
631
632 if (( $installer::globals::installertypedir ) && ( $line =~ /\{pkgtype\}/ ))
633 {
634 $line =~ s/\{pkgtype\}/$installer::globals::installertypedir/g;
634 $line =~ s/\{pkgtype\}/$installer::globals::installertypedir/g;
635 }
635 }
636
636
637 ${$patharrayref}[$i] = $line;
638 }
639}
640
641####################################################
642# Removing ending separators in paths
643####################################################
644
645sub remove_ending_separator
646{
647 my ( $patharrayref ) = @_;
637 ${$patharrayref}[$i] = $line;
638 }
639}
640
641####################################################
642# Removing ending separators in paths
643####################################################
644
645sub remove_ending_separator
646{
647 my ( $patharrayref ) = @_;
648
648
649 for ( my $i = 0; $i <= $#{$patharrayref}; $i++ )
650 {
651 my $line = ${$patharrayref}[$i];
649 for ( my $i = 0; $i <= $#{$patharrayref}; $i++ )
650 {
651 my $line = ${$patharrayref}[$i];
652
652
653 installer::remover::remove_ending_pathseparator(\$line);
653 installer::remover::remove_ending_pathseparator(\$line);
654
654
655 $line =~ s/\s*$//;
656 $line = $line . "\n";
655 $line =~ s/\s*$//;
656 $line = $line . "\n";
657
657
658 ${$patharrayref}[$i] = $line;
659 }
660}
661
662####################################################
663# Replacing languages in include path
664####################################################
665
666sub replace_languages_in_pathes
667{
668 my ( $patharrayref, $languagesref ) = @_;
669
670 installer::logger::include_header_into_logfile("Replacing languages in include paths:");
658 ${$patharrayref}[$i] = $line;
659 }
660}
661
662####################################################
663# Replacing languages in include path
664####################################################
665
666sub replace_languages_in_pathes
667{
668 my ( $patharrayref, $languagesref ) = @_;
669
670 installer::logger::include_header_into_logfile("Replacing languages in include paths:");
671
671
672 my @patharray = ();
673 my $infoline = "";
672 my @patharray = ();
673 my $infoline = "";
674
674
675 for ( my $i = 0; $i <= $#{$patharrayref}; $i++ )
676 {
677 my $line = ${$patharrayref}[$i];
678
679 if ( $line =~ /\$\(LANG\)/ )
680 {
681 my $originalline = $line;
682 my $newline = "";
675 for ( my $i = 0; $i <= $#{$patharrayref}; $i++ )
676 {
677 my $line = ${$patharrayref}[$i];
678
679 if ( $line =~ /\$\(LANG\)/ )
680 {
681 my $originalline = $line;
682 my $newline = "";
683
683
684 for ( my $j = 0; $j <= $#{$languagesref}; $j++ )
685 {
686 my $language = ${$languagesref}[$j];
687 $line =~ s/\$\(LANG\)/$language/g;
688 push(@patharray ,$line);
689 my $newdir = $line;
690 $line = $originalline;
684 for ( my $j = 0; $j <= $#{$languagesref}; $j++ )
685 {
686 my $language = ${$languagesref}[$j];
687 $line =~ s/\$\(LANG\)/$language/g;
688 push(@patharray ,$line);
689 my $newdir = $line;
690 $line = $originalline;
691
691
692 installer::remover::remove_leading_and_ending_whitespaces(\$newline);
693
694 # Is it necessary to refresh the global array, containing all files of all include paths?
695 if ( -d $newdir )
696 {
697 # Checking if $newdir is empty
698 if ( ! installer::systemactions::is_empty_dir($newdir) )
699 {
700 $installer::globals::refresh_includepathes = 1;
692 installer::remover::remove_leading_and_ending_whitespaces(\$newline);
693
694 # Is it necessary to refresh the global array, containing all files of all include paths?
695 if ( -d $newdir )
696 {
697 # Checking if $newdir is empty
698 if ( ! installer::systemactions::is_empty_dir($newdir) )
699 {
700 $installer::globals::refresh_includepathes = 1;
701 $infoline = "Directory $newdir exists and is not empty. Refreshing global file array is required.\n";
701 $infoline = "Directory $newdir exists and is not empty. Refreshing global file array is required.\n";
702 $installer::logger::Lang->print($infoline);
703 }
704 else
705 {
702 $installer::logger::Lang->print($infoline);
703 }
704 else
705 {
706 $infoline = "Directory $newdir is empty. No refresh of global file array required.\n";
707 $installer::logger::Lang->print($infoline);
706 $infoline = "Directory $newdir is empty. No refresh of global file array required.\n";
707 $installer::logger::Lang->print($infoline);
708 }
709 }
710 else
711 {
708 }
709 }
710 else
711 {
712 $infoline = "Directory $newdir does not exist. No refresh of global file array required.\n";
713 $installer::logger::Lang->print($infoline);
712 $infoline = "Directory $newdir does not exist. No refresh of global file array required.\n";
713 $installer::logger::Lang->print($infoline);
714 }
714 }
715 }
716 }
715 }
716 }
717 else # not language dependent include path
718 {
719 push(@patharray ,$line);
720 }
721 }
717 else # not language dependent include path
718 {
719 push(@patharray ,$line);
720 }
721 }
722
722
723 return \@patharray;
724}
725
726#####################################################
727# Collecting all files from all include paths
728#####################################################
729
730sub list_all_files_from_include_path
731{
732 my ( $patharrayref) = @_;
723 return \@patharray;
724}
725
726#####################################################
727# Collecting all files from all include paths
728#####################################################
729
730sub list_all_files_from_include_path
731{
732 my ( $patharrayref) = @_;
733
733
734 installer::logger::include_header_into_logfile("Include paths:");
734 installer::logger::include_header_into_logfile("Include paths:");
735
735
736 for ( my $i = 0; $i <= $#{$patharrayref}; $i++ )
737 {
738 my $path = ${$patharrayref}[$i];
739 installer::remover::remove_leading_and_ending_whitespaces(\$path);
740 my $infoline = "$path\n";
741 $installer::logger::Lang->print($infoline);
742 }
743
736 for ( my $i = 0; $i <= $#{$patharrayref}; $i++ )
737 {
738 my $path = ${$patharrayref}[$i];
739 installer::remover::remove_leading_and_ending_whitespaces(\$path);
740 my $infoline = "$path\n";
741 $installer::logger::Lang->print($infoline);
742 }
743
744 $installer::logger::Lang->print("\n");
744 $installer::logger::Lang->print("\n");
745}
746
747#####################################################
748# Collecting all files from all include paths
749#####################################################
750
751sub set_manufacturer
752{
753 my ($allvariables) = @_;
745}
746
747#####################################################
748# Collecting all files from all include paths
749#####################################################
750
751sub set_manufacturer
752{
753 my ($allvariables) = @_;
754
754
755 my $openofficeproductname = "OpenOffice";
756 my $sunname = "";
755 my $openofficeproductname = "OpenOffice";
756 my $sunname = "";
757
758
757
758
759 if ( $allvariables->{'OPENSOURCE'} && $allvariables->{'OPENSOURCE'} == 1 )
760 {
761 $installer::globals::isopensourceproduct = 1;
762 $installer::globals::manufacturer = $openofficeproductname;
763 $installer::globals::longmanufacturer = $openofficeproductname;
764 }
765 else
766 {
767 $installer::globals::isopensourceproduct = 0;
768 if (( $allvariables->{'DEFINEDMANUFACTURER'} ) && ( $allvariables->{'DEFINEDMANUFACTURER'} ne "" )) { $sunname = $allvariables->{'DEFINEDMANUFACTURER'}; }
769 else { installer::exiter::exit_program("ERROR: Property DEFINEDMANUFACTURER has to be set for this product!", "set_manufacturer"); }
770 $installer::globals::manufacturer = $sunname;
771 $installer::globals::longmanufacturer = $sunname;
772 }
759 if ( $allvariables->{'OPENSOURCE'} && $allvariables->{'OPENSOURCE'} == 1 )
760 {
761 $installer::globals::isopensourceproduct = 1;
762 $installer::globals::manufacturer = $openofficeproductname;
763 $installer::globals::longmanufacturer = $openofficeproductname;
764 }
765 else
766 {
767 $installer::globals::isopensourceproduct = 0;
768 if (( $allvariables->{'DEFINEDMANUFACTURER'} ) && ( $allvariables->{'DEFINEDMANUFACTURER'} ne "" )) { $sunname = $allvariables->{'DEFINEDMANUFACTURER'}; }
769 else { installer::exiter::exit_program("ERROR: Property DEFINEDMANUFACTURER has to be set for this product!", "set_manufacturer"); }
770 $installer::globals::manufacturer = $sunname;
771 $installer::globals::longmanufacturer = $sunname;
772 }
773
773
774 $allvariables->{'MANUFACTURER'} = $installer::globals::manufacturer;
775}
776
777##############################################################
778# A ProductVersion has to be defined. If it is not set in
779# zip.lst, it is set now to "1"
780##############################################################
781

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

793# Removing .. in paths
794####################################################
795
796sub simplify_path
797{
798 my ( $pathref ) = @_;
799
800 my $oldpath = $$pathref;
774 $allvariables->{'MANUFACTURER'} = $installer::globals::manufacturer;
775}
776
777##############################################################
778# A ProductVersion has to be defined. If it is not set in
779# zip.lst, it is set now to "1"
780##############################################################
781

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

793# Removing .. in paths
794####################################################
795
796sub simplify_path
797{
798 my ( $pathref ) = @_;
799
800 my $oldpath = $$pathref;
801
801
802 my $change = 0;
802 my $change = 0;
803
803
804 while ( $oldpath =~ /(^.*)(\Q$installer::globals::separator\E.*\w+?)(\Q$installer::globals::separator\E\.\.)(\Q$installer::globals::separator\E.*$)/ )
805 {
806 my $part1 = $1;
807 my $part2 = $4;
804 while ( $oldpath =~ /(^.*)(\Q$installer::globals::separator\E.*\w+?)(\Q$installer::globals::separator\E\.\.)(\Q$installer::globals::separator\E.*$)/ )
805 {
806 my $part1 = $1;
807 my $part2 = $4;
808 $oldpath = $part1 . $part2;
808 $oldpath = $part1 . $part2;
809 $change = 1;
810 }
809 $change = 1;
810 }
811
812 if ( $change ) { $$pathref = $oldpath . "\n"; }
811
812 if ( $change ) { $$pathref = $oldpath . "\n"; }
813}
814
815####################################################
816# Removing ending separators in paths
817####################################################
818
819sub resolve_relative_pathes
820{
821 my ( $patharrayref ) = @_;
813}
814
815####################################################
816# Removing ending separators in paths
817####################################################
818
819sub resolve_relative_pathes
820{
821 my ( $patharrayref ) = @_;
822
822
823 for ( my $i = 0; $i <= $#{$patharrayref}; $i++ )
824 {
825 installer::parameter::make_path_absolute(\${$patharrayref}[$i]);
826 simplify_path(\${$patharrayref}[$i]);
827 }
828}
829
830####################################################

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

838 my ($blockref) = @_;
839
840 my $milestonevariable = $installer::globals::lastminor;
841 $milestonevariable =~ s/m//;
842 $milestonevariable =~ s/s/\./;
843
844 my $localminor = $installer::globals::lastminor;
845 if ( $installer::globals::minor ) { $localminor = $installer::globals::minor; }
823 for ( my $i = 0; $i <= $#{$patharrayref}; $i++ )
824 {
825 installer::parameter::make_path_absolute(\${$patharrayref}[$i]);
826 simplify_path(\${$patharrayref}[$i]);
827 }
828}
829
830####################################################

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

838 my ($blockref) = @_;
839
840 my $milestonevariable = $installer::globals::lastminor;
841 $milestonevariable =~ s/m//;
842 $milestonevariable =~ s/s/\./;
843
844 my $localminor = $installer::globals::lastminor;
845 if ( $installer::globals::minor ) { $localminor = $installer::globals::minor; }
846
846
847 my $buildidstringcws = $installer::globals::build . $localminor . "(Build:" . $installer::globals::buildid . ")";
848
849 # the environment variable CWS_WORK_STAMP is set only in CWS
850 if ( $ENV{'CWS_WORK_STAMP'} ) { $buildidstringcws = $buildidstringcws . "\[CWS\:" . $ENV{'CWS_WORK_STAMP'} . "\]"; }
851
852 for ( my $i = 0; $i <= $#{$blockref}; $i++ )
853 {
854 if ($installer::globals::lastminor) { ${$blockref}[$i] =~ s/\{milestone\}/$milestonevariable/; }

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

864}
865
866###########################################################
867# Overwrite the vendor string in openoffice.lst that is defined in configure
868###########################################################
869
870sub overwrite_ooovendor
871{
847 my $buildidstringcws = $installer::globals::build . $localminor . "(Build:" . $installer::globals::buildid . ")";
848
849 # the environment variable CWS_WORK_STAMP is set only in CWS
850 if ( $ENV{'CWS_WORK_STAMP'} ) { $buildidstringcws = $buildidstringcws . "\[CWS\:" . $ENV{'CWS_WORK_STAMP'} . "\]"; }
851
852 for ( my $i = 0; $i <= $#{$blockref}; $i++ )
853 {
854 if ($installer::globals::lastminor) { ${$blockref}[$i] =~ s/\{milestone\}/$milestonevariable/; }

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

864}
865
866###########################################################
867# Overwrite the vendor string in openoffice.lst that is defined in configure
868###########################################################
869
870sub overwrite_ooovendor
871{
872 my ($variableshashref) = @_;
873 $variableshashref->{'OOOVENDOR'} = $ENV{'OOO_VENDOR'} , if( defined $ENV{'OOO_VENDOR'} && $ENV{'OOO_VENDOR'} ne "" );
872 my ($variableshashref) = @_;
873 $variableshashref->{'OOOVENDOR'} = $ENV{'OOO_VENDOR'} , if( defined $ENV{'OOO_VENDOR'} && $ENV{'OOO_VENDOR'} ne "" );
874}
875
876###########################################################
877# Adding the lowercase variables into the variableshashref
878###########################################################
879
880sub add_variables_to_allvariableshashref
881{
882 my ($variableshashref) = @_;
883
884 my $lcvariable = lc($variableshashref->{'PRODUCTNAME'});
885 $variableshashref->{'LCPRODUCTNAME'} = $lcvariable;
886
887 if ($variableshashref->{'SHORT_PRODUCTEXTENSION'})
888 {
889 $variableshashref->{'LCPRODUCTEXTENSION'} = "\-" . lc($variableshashref->{'SHORT_PRODUCTEXTENSION'}); # including the "-" !
890 }
891 else
892 {
874}
875
876###########################################################
877# Adding the lowercase variables into the variableshashref
878###########################################################
879
880sub add_variables_to_allvariableshashref
881{
882 my ($variableshashref) = @_;
883
884 my $lcvariable = lc($variableshashref->{'PRODUCTNAME'});
885 $variableshashref->{'LCPRODUCTNAME'} = $lcvariable;
886
887 if ($variableshashref->{'SHORT_PRODUCTEXTENSION'})
888 {
889 $variableshashref->{'LCPRODUCTEXTENSION'} = "\-" . lc($variableshashref->{'SHORT_PRODUCTEXTENSION'}); # including the "-" !
890 }
891 else
892 {
893 $variableshashref->{'LCPRODUCTEXTENSION'} = "";
893 $variableshashref->{'LCPRODUCTEXTENSION'} = "";
894 }
895
896 if ($installer::globals::patch)
894 }
895
896 if ($installer::globals::patch)
897 {
898 $variableshashref->{'PRODUCTADDON'} = $installer::globals::patchaddon;
899 }
897 {
898 $variableshashref->{'PRODUCTADDON'} = $installer::globals::patchaddon;
899 }
900 elsif ($installer::globals::languagepack)
900 elsif ($installer::globals::languagepack)
901 {
902 $variableshashref->{'PRODUCTADDON'} = $installer::globals::languagepackaddon;
903 }
901 {
902 $variableshashref->{'PRODUCTADDON'} = $installer::globals::languagepackaddon;
903 }
904 else
904 else
905 {
906 $variableshashref->{'PRODUCTADDON'} = "";
907 }
905 {
906 $variableshashref->{'PRODUCTADDON'} = "";
907 }
908
909 my $localbuild = $installer::globals::build;
910 if ( $localbuild =~ /^\s*(\w+?)(\d+)\s*$/ ) { $localbuild = $2; } # using "680" instead of "src680"
911 $variableshashref->{'PRODUCTMAJOR'} = $localbuild;
912
913 my $localminor = "";
914 if ( $installer::globals::minor ne "" ) { $localminor = $installer::globals::minor; }
915 else { $localminor = $installer::globals::lastminor; }
916 if ( $localminor =~ /^\s*\w(\d+)\w*\s*$/ ) { $localminor = $1; }
917 $variableshashref->{'PRODUCTMINOR'} = $localminor;
918
919 $variableshashref->{'PRODUCTBUILDID'} = $installer::globals::buildid;
920 $variableshashref->{'SYSTEM_LIBTEXTCAT_DATA'} = $ENV{'SYSTEM_LIBTEXTCAT_DATA'} , if( defined $ENV{'SYSTEM_LIBTEXTCAT_DATA'} && $ENV{'SYSTEM_LIBTEXTCAT_DATA'} ne "" );
921}
922
9231;
908
909 my $localbuild = $installer::globals::build;
910 if ( $localbuild =~ /^\s*(\w+?)(\d+)\s*$/ ) { $localbuild = $2; } # using "680" instead of "src680"
911 $variableshashref->{'PRODUCTMAJOR'} = $localbuild;
912
913 my $localminor = "";
914 if ( $installer::globals::minor ne "" ) { $localminor = $installer::globals::minor; }
915 else { $localminor = $installer::globals::lastminor; }
916 if ( $localminor =~ /^\s*\w(\d+)\w*\s*$/ ) { $localminor = $1; }
917 $variableshashref->{'PRODUCTMINOR'} = $localminor;
918
919 $variableshashref->{'PRODUCTBUILDID'} = $installer::globals::buildid;
920 $variableshashref->{'SYSTEM_LIBTEXTCAT_DATA'} = $ENV{'SYSTEM_LIBTEXTCAT_DATA'} , if( defined $ENV{'SYSTEM_LIBTEXTCAT_DATA'} && $ENV{'SYSTEM_LIBTEXTCAT_DATA'} ne "" );
921}
922
9231;