component.pm (9f91b7e3) component.pm (677600b0)
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

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

508 ? $source_data{$name}->{'component_id'}
509 : undef;
510 if (defined $guid)
511 {
512 $installer::logger::Lang->printf(" reusing guid %s\n", $guid);
513 }
514 else
515 {
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

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

508 ? $source_data{$name}->{'component_id'}
509 : undef;
510 if (defined $guid)
511 {
512 $installer::logger::Lang->printf(" reusing guid %s\n", $guid);
513 }
514 else
515 {
516 $guid = installer::windows::msiglobal::create_guid();
516 $guid = "{" . installer::windows::msiglobal::create_guid() . "}";
517 $installer::logger::Lang->printf(" creating new guid %s\n", $guid);
518 }
519 $target_data{$name}->{'component_id'} = $guid;
520 }
521
522 # Add values for the KeyPath column.
523 $installer::logger::Lang->printf("preparing Component->KeyPath values\n");
517 $installer::logger::Lang->printf(" creating new guid %s\n", $guid);
518 }
519 $target_data{$name}->{'component_id'} = $guid;
520 }
521
522 # Add values for the KeyPath column.
523 $installer::logger::Lang->printf("preparing Component->KeyPath values\n");
524 foreach my $name (@$file_component_names,@$registry_component_names)
524 foreach my $component_name (@$file_component_names,@$registry_component_names)
525 {
526 # Determine the key path.
527 my $key_path = $installer::globals::is_release
525 {
526 # Determine the key path.
527 my $key_path = $installer::globals::is_release
528 ? $source_data{$name}->{'key_path'}
528 ? $source_data{$component_name}->{'key_path'}
529 : undef;
530 if (defined $key_path)
531 {
529 : undef;
530 if (defined $key_path)
531 {
532 $installer::logger::Lang->printf(" reusing key path %s\n", $key_path);
532 $installer::logger::Lang->printf(" reusing key path %s for component %s\n",
533 $key_path,
534 $component_name);
533 }
534 else
535 {
535 }
536 else
537 {
536 if ($target_data{$name}->{'is_file'})
538 if ($target_data{$component_name}->{'is_file'})
537 {
539 {
538 $key_path = get_component_keypath($name, $files);
540 $key_path = get_component_keypath($component_name, $files);
539 }
540 else
541 {
541 }
542 else
543 {
542 $key_path = get_component_keypath($name, $registry_entries);
544 $key_path = get_component_keypath($component_name, $registry_entries);
543 }
545 }
546 $installer::logger::Lang->printf(" created key path %s for component %s\n",
547 $key_path,
548 $component_name);
544 }
549 }
545 $target_data{$name}->{'key_path'} = $key_path;
550 $target_data{$component_name}->{'key_path'} = $key_path;
546 }
547
548 return \%target_data;
549}
550
551
552
553

--- 193 unchanged lines hidden ---
551 }
552
553 return \%target_data;
554}
555
556
557
558

--- 193 unchanged lines hidden ---