From edb0626a37f16b1bf705e8902f0c46ed46a6d0cd Mon Sep 17 00:00:00 2001 From: David Tardon Date: Fri, 22 Nov 2013 16:54:03 +0100 Subject: define module, not file Change-Id: Ie828de19cc35228cd332ecbb5e11f2edb281bad8 --- solenv/bin/modules/installer/windows/createfolder.pm | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'solenv/bin/modules/installer/windows') diff --git a/solenv/bin/modules/installer/windows/createfolder.pm b/solenv/bin/modules/installer/windows/createfolder.pm index 232415d3e7ca..02b29cd393bd 100644 --- a/solenv/bin/modules/installer/windows/createfolder.pm +++ b/solenv/bin/modules/installer/windows/createfolder.pm @@ -76,16 +76,24 @@ sub get_createfolder_component # Therefore they can only belong to the root module and # will be added to a component at the root module. # All directories will be added to the component - # containing the file $allvariableshashref->{'GLOBALFILEGID'} + # $allvariableshashref->{'ROOTMODULEGID'} - if ( ! $allvariableshashref->{'GLOBALFILEGID'} ) { installer::exiter::exit_program("ERROR: GLOBALFILEGID must be defined in list file!", "get_createfolder_component"); } + if ( ! $allvariableshashref->{'ROOTMODULEGID'} ) { installer::exiter::exit_program("ERROR: ROOTMODULEGID must be defined in list file!", "get_createfolder_component"); } - my $globalfilegid = $allvariableshashref->{'GLOBALFILEGID'}; + my $rootmodulegid = $allvariableshashref->{'ROOTMODULEGID'}; my $onefile; if ( $installer::globals::languagepack ) { $onefile = get_languagepack_file($filesref, $onedir); } elsif ( $installer::globals::helppack ) { ($onefile) = grep {$_->{gid} eq 'gid_File_Help_Common_Zip'} @{$filesref} } - else { ($onefile) = grep {$_->{gid} eq $globalfilegid} @{$filesref} } + else { + foreach my $file (@{$filesref}) { + if ($file->{'modules'} eq $rootmodulegid) + { + $onefile = $file; + break; + } + } + } if (! defined $onefile) { installer::exiter::exit_program("ERROR: Could not find file!", "get_createfolder_component"); -- cgit v1.2.3