assembly.pm (b274bc22) assembly.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

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

23
24package installer::windows::assembly;
25
26use installer::files;
27use installer::globals;
28use installer::worker;
29use installer::windows::idtglobal;
30
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

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

23
24package installer::windows::assembly;
25
26use installer::files;
27use installer::globals;
28use installer::worker;
29use installer::windows::idtglobal;
30
31use strict;
32
31##############################################################
32# Returning the first module of a file from the
33# comma separated list of modules.
34##############################################################
35
36sub get_msiassembly_feature
37{
38 my ( $onefile ) = @_;

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

219 my $infoline = "Created idt file: $msiassemblytablename\n";
220 $installer::logger::Lang->print($infoline);
221}
222
223####################################################################################
224# Returning the name for the table MsiAssemblyName
225####################################################################################
226
33##############################################################
34# Returning the first module of a file from the
35# comma separated list of modules.
36##############################################################
37
38sub get_msiassembly_feature
39{
40 my ( $onefile ) = @_;

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

221 my $infoline = "Created idt file: $msiassemblytablename\n";
222 $installer::logger::Lang->print($infoline);
223}
224
225####################################################################################
226# Returning the name for the table MsiAssemblyName
227####################################################################################
228
227sub get_msiassemblyname_name
229sub get_msiassemblyname_name ($)
228{
230{
229 ( $number ) = @_;
231 my ($number) = @_;
230
231 my $name = "";
232
233 if ( $number == 1 ) { $name = "name"; }
234 elsif ( $number == 2 ) { $name = "publicKeyToken"; }
235 elsif ( $number == 3 ) { $name = "version"; }
236 elsif ( $number == 4 ) { $name = "culture"; }
237

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

310
311sub add_assembly_condition_into_component_table
312{
313 my ($filesref, $basedir) = @_;
314
315 my $componenttablename = $basedir . $installer::globals::separator . "Componen.idt";
316 my $componenttable = installer::files::read_file($componenttablename);
317 my $changed = 0;
232
233 my $name = "";
234
235 if ( $number == 1 ) { $name = "name"; }
236 elsif ( $number == 2 ) { $name = "publicKeyToken"; }
237 elsif ( $number == 3 ) { $name = "version"; }
238 elsif ( $number == 4 ) { $name = "culture"; }
239

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

312
313sub add_assembly_condition_into_component_table
314{
315 my ($filesref, $basedir) = @_;
316
317 my $componenttablename = $basedir . $installer::globals::separator . "Componen.idt";
318 my $componenttable = installer::files::read_file($componenttablename);
319 my $changed = 0;
318 my $infoline = "";
319
320
320 for ( my $i = 0; $i <= $#{$installer::globals::msiassemblyfiles}; $i++ )
321 foreach my $onefile (@$installer::globals::msiassemblyfiles)
321 {
322 {
322 my $onefile = ${$installer::globals::msiassemblyfiles}[$i];
323
324 my $filecomponent = get_msiassembly_component($onefile);
325
326 for ( my $j = 0; $j <= $#{$componenttable}; $j++ )
327 {
328 my $oneline = ${$componenttable}[$j];
329
330 if ( $oneline =~ /(.*)\t(.*)\t(.*)\t(.*)\t(.*)\t(.*)/ )
331 {

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

337 my $keypath = $6;
338
339 if ( $component eq $filecomponent )
340 {
341 # setting the condition
342
343 # $condition = "MsiNetAssemblySupport";
344 $condition = "DOTNET_SUFFICIENT=1";
323 my $filecomponent = get_msiassembly_component($onefile);
324
325 for ( my $j = 0; $j <= $#{$componenttable}; $j++ )
326 {
327 my $oneline = ${$componenttable}[$j];
328
329 if ( $oneline =~ /(.*)\t(.*)\t(.*)\t(.*)\t(.*)\t(.*)/ )
330 {

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

336 my $keypath = $6;
337
338 if ( $component eq $filecomponent )
339 {
340 # setting the condition
341
342 # $condition = "MsiNetAssemblySupport";
343 $condition = "DOTNET_SUFFICIENT=1";
345 $oneline = $component . "\t" . $componentid . "\t" . $directory . "\t" . $attributes . "\t" . $condition . "\t" . $keypath . "\n";
344 $oneline = join("\t",
345 $component,
346 $componentid,
347 $directory,
348 $attributes,
349 $condition,
350 $keypath) . "\n";
346 ${$componenttable}[$j] = $oneline;
347 $changed = 1;
351 ${$componenttable}[$j] = $oneline;
352 $changed = 1;
348 $infoline = "Changing $componenttablename :\n";
349 $installer::logger::Lang->print($infoline);
350 $infoline = $oneline;
351 $installer::logger::Lang->print($infoline);
353 $installer::logger::Lang->print("Changing %s :\n", $componenttablename);
354 $installer::logger::Lang->print($oneline);
352 last;
353 }
354 }
355 }
356 }
357
358 if ( $changed )
359 {
360 # Saving the file
361 installer::files::save_file($componenttablename ,$componenttable);
355 last;
356 }
357 }
358 }
359 }
360
361 if ( $changed )
362 {
363 # Saving the file
364 installer::files::save_file($componenttablename ,$componenttable);
362 $infoline = "Saved idt file: $componenttablename\n";
363 $installer::logger::Lang->print($infoline);
365 $installer::logger::Lang->print("Saved idt file: %s\n", $componenttablename);
364 }
365}
366
3671;
366 }
367}
368
3691;