registry.pm (768015e2) registry.pm (1ba1fd99)
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

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

345# Content:
346# Registry Root Key Name Value Component_
347######################################################
348
349sub create_registry_table
350{
351 my ($registryref, $allregistrycomponentsref, $basedir, $languagesarrayref, $allvariableshashref) = @_;
352
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

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

345# Content:
346# Registry Root Key Name Value Component_
347######################################################
348
349sub create_registry_table
350{
351 my ($registryref, $allregistrycomponentsref, $basedir, $languagesarrayref, $allvariableshashref) = @_;
352
353 for ( my $m = 0; $m <= $#{$languagesarrayref}; $m++ )
353 my %table_data = ();
354 foreach my $onelanguage (@$languagesarrayref)
354 {
355 {
355 my $onelanguage = ${$languagesarrayref}[$m];
356
357 my @registrytable = ();
358 my @reg64table = ();
359
360 installer::windows::idtglobal::write_idt_header(\@registrytable, "registry");
361 installer::windows::idtglobal::write_idt_header(\@reg64table, "reg64");
356
357 my @registrytable = ();
358 my @reg64table = ();
359
360 installer::windows::idtglobal::write_idt_header(\@registrytable, "registry");
361 installer::windows::idtglobal::write_idt_header(\@reg64table, "reg64");
362
363 for ( my $i = 0; $i <= $#{$registryref}; $i++ )
362 my $table_items = [];
363 foreach my $oneregistry (@$registryref)
364 {
364 {
365 my $oneregistry = ${$registryref}[$i];
366
367 # Controlling the language!
368 # Only language independent folderitems or folderitems with the correct language
369 # will be included into the table
370
365 # Controlling the language!
366 # Only language independent folderitems or folderitems with the correct language
367 # will be included into the table
368
371 if (! (!(( $oneregistry->{'ismultilingual'} )) || ( $oneregistry->{'specificlanguage'} eq $onelanguage )) ) { next; }
369 next if $oneregistry->{'ismultilingual'}
370 && $oneregistry->{'specificlanguage'} ne $onelanguage;
372
373 my %registry = ();
374
375 $registry{'Registry'} = get_registry_identifier($oneregistry);
376 $registry{'Root'} = get_registry_root($oneregistry);
377 $registry{'Key'} = get_registry_key($oneregistry, $allvariableshashref);
378 $registry{'Name'} = get_registry_name($oneregistry, $allvariableshashref);
379 $registry{'Value'} = get_registry_value($oneregistry, $allvariableshashref);
380 $registry{'Val64'} = get_registry_val64($oneregistry, $allvariableshashref);
371
372 my %registry = ();
373
374 $registry{'Registry'} = get_registry_identifier($oneregistry);
375 $registry{'Root'} = get_registry_root($oneregistry);
376 $registry{'Key'} = get_registry_key($oneregistry, $allvariableshashref);
377 $registry{'Name'} = get_registry_name($oneregistry, $allvariableshashref);
378 $registry{'Value'} = get_registry_value($oneregistry, $allvariableshashref);
379 $registry{'Val64'} = get_registry_val64($oneregistry, $allvariableshashref);
381 $registry{'Component_'} = get_registry_component($oneregistry, $allvariableshashref);
380 my $component_name = get_registry_component_name($oneregistry, $allvariableshashref);
381 $oneregistry->{'componentname'} = $component_name;
382 $registry{'Component_'} = $component_name;
382
383 # Collecting all components
384 if (!(installer::existence::exists_in_array($registry{'Component_'}, $allregistrycomponentsref)))
385 {
386 push(@{$allregistrycomponentsref}, $registry{'Component_'});
387 }
388
389 # Collecting all components with DONT_DELETE style
383
384 # Collecting all components
385 if (!(installer::existence::exists_in_array($registry{'Component_'}, $allregistrycomponentsref)))
386 {
387 push(@{$allregistrycomponentsref}, $registry{'Component_'});
388 }
389
390 # Collecting all components with DONT_DELETE style
390 my $style = "";
391 if ( $oneregistry->{'Styles'} ) { $style = $oneregistry->{'Styles'}; }
392 if ( $style =~ /\bDONT_DELETE\b/ ) { $installer::globals::dontdeletecomponents{$registry{'Component_'}} = 1; }
391 my $style = $oneregistry->{'Styles'} // "";
392 $registry{'styles'} = $style;
393
393
394 if ( $style =~ /\bDONT_DELETE\b/ )
395 {
396 $installer::globals::dontdeletecomponents{$component_name} = 1;
397 }
398
394 # Saving upgradekey to write this into setup.ini for minor upgrades
399 # Saving upgradekey to write this into setup.ini for minor upgrades
395 if ( $style =~ /\bUPGRADEKEY\b/ ) { $installer::globals::minorupgradekey = $registry{'Key'}; }
400 if ( $style =~ /\bUPGRADEKEY\b/ )
401 {
402 $installer::globals::minorupgradekey = $registry{'Key'};
403 }
396
397 # Collecting all registry components with ALWAYS_REQUIRED style
398 if ( ! ( $style =~ /\bALWAYS_REQUIRED\b/ ))
399 {
400 # Setting a component condition for unforced registry components!
401 # Only write into registry, if WRITE_REGISTRY is set.
402 if ( $oneregistry->{'ComponentCondition'} ) { $oneregistry->{'ComponentCondition'} = "(" . $oneregistry->{'ComponentCondition'} . ") AND (WRITE_REGISTRY=1)"; }
403 else { $oneregistry->{'ComponentCondition'} = "WRITE_REGISTRY=1"; }

--- 42 unchanged lines hidden ---
404
405 # Collecting all registry components with ALWAYS_REQUIRED style
406 if ( ! ( $style =~ /\bALWAYS_REQUIRED\b/ ))
407 {
408 # Setting a component condition for unforced registry components!
409 # Only write into registry, if WRITE_REGISTRY is set.
410 if ( $oneregistry->{'ComponentCondition'} ) { $oneregistry->{'ComponentCondition'} = "(" . $oneregistry->{'ComponentCondition'} . ") AND (WRITE_REGISTRY=1)"; }
411 else { $oneregistry->{'ComponentCondition'} = "WRITE_REGISTRY=1"; }

--- 42 unchanged lines hidden ---