xref: /AOO41X/main/solenv/bin/modules/installer/windows/property.pm (revision 677600b012ebe37b797093a198c8d8edc3d08429)
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
9#  with the License.  You may obtain a copy of the License at
10#
11#    http://www.apache.org/licenses/LICENSE-2.0
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.
19#
20#**************************************************************
21
22
23
24package installer::windows::property;
25
26use installer::exiter;
27use installer::files;
28use installer::globals;
29use installer::windows::idtglobal;
30use installer::windows::language;
31
32#############################################
33# Setting the properties dynamically
34# for the table Property.idt
35#############################################
36
37sub get_arpcomments_for_property_table
38{
39    my ( $allvariables, $languagestringref ) = @_;
40
41    my $name = $allvariables->{'PRODUCTNAME'};
42    my $version = $allvariables->{'PRODUCTVERSION'};
43    my $comment = $name . " " . $version;
44
45    my $postversionextension = "";
46    if ( $allvariables->{'POSTVERSIONEXTENSION'} )
47    {
48        $postversionextension = $allvariables->{'POSTVERSIONEXTENSION'};
49        $comment = $comment . " " . $postversionextension;
50    }
51
52    if ( $installer::globals::languagepack ) { $comment = $comment . " " . "Language Pack"; }
53
54    if ( $installer::globals::patch )
55    {
56        if ( ! $allvariables->{'WINDOWSPATCHLEVEL'} ) { installer::exiter::exit_program("ERROR: No Patch level defined for Windows patch: WINDOWSPATCHLEVEL", "get_arpcomments_for_property_table"); }
57        my $patchstring = "Product Update" . " " . $allvariables->{'WINDOWSPATCHLEVEL'};
58        $comment = $comment . " " . $patchstring;
59    }
60
61    my $languagestring = $$languagestringref;
62    $languagestring =~ s/\_/\,/g;
63
64    $comment = $comment . " ($languagestring)";
65
66    my $localminor = "";
67    if ( $installer::globals::updatepack ) { $localminor = $installer::globals::lastminor; }
68    else { $localminor = $installer::globals::minor; }
69
70    my $buildidstring = "(" . $installer::globals::build . $localminor . "(Build:" . $installer::globals::buildid . "))";
71
72    # the environment variable CWS_WORK_STAMP is set only in CWS
73    if ( $ENV{'CWS_WORK_STAMP'} ) { $buildidstring = $buildidstring . "\[CWS\:" . $ENV{'CWS_WORK_STAMP'} . "\]"; }
74
75    $comment = $comment . " " . $buildidstring;
76
77    return $comment;
78}
79
80sub get_installlevel_for_property_table
81{
82    my $installlevel = "100";
83    return $installlevel;
84}
85
86sub get_ischeckforproductupdates_for_property_table
87{
88    my $ischeckforproductupdates = "1";
89    return $ischeckforproductupdates;
90}
91
92sub get_manufacturer_for_property_table
93{
94    return $installer::globals::manufacturer;
95}
96
97sub get_productlanguage_for_property_table
98{
99    my ($language) = @_;
100    my $windowslanguage = installer::windows::language::get_windows_language($language);
101    return $windowslanguage;
102}
103
104sub get_language_string
105{
106    my $langstring = "";
107
108    for ( my $i = 0; $i <= $#installer::globals::languagenames; $i++ )
109    {
110        $langstring = $langstring . $installer::globals::languagenames[$i] . ", ";
111    }
112
113    $langstring =~ s/\,\s*$//;
114    $langstring = "(" . $langstring . ")";
115
116    return $langstring;
117}
118
119sub get_english_language_string
120{
121    my $langstring = "";
122
123    # Sorting value not keys, therefore collecting all values
124    my %helper = ();
125    foreach my $lang ( keys %installer::globals::all_required_english_languagestrings )
126    {
127        $helper{$installer::globals::all_required_english_languagestrings{$lang}} = 1;
128    }
129
130    foreach my $lang ( sort keys %helper )
131    {
132        $langstring = $langstring . $lang . ", ";
133    }
134
135    $langstring =~ s/\,\s*$//;
136    $langstring = "(" . $langstring . ")";
137
138    return $langstring;
139}
140
141sub get_productname_for_property_table
142{
143    my ( $allvariables ) = @_;
144
145    my $name = $allvariables->{'PRODUCTNAME'};
146    my $version = $allvariables->{'PRODUCTVERSION'};
147    my $productname = $name . " " . $version;
148
149    my $postversionextension = "";
150    if ( $allvariables->{'POSTVERSIONEXTENSION'} )
151    {
152        $postversionextension = $allvariables->{'POSTVERSIONEXTENSION'};
153        $productname = $productname . " " . $postversionextension;
154    }
155
156    my $productextension = "";
157    if ( $allvariables->{'PRODUCTEXTENSION'} )
158    {
159        $productextension = $allvariables->{'PRODUCTEXTENSION'};
160        $productname = $productname . " " . $productextension;
161    }
162
163    if ( $installer::globals::languagepack )
164    {
165        # my $langstring = get_language_string();   # Example (English, Deutsch)
166        my $langstring = get_english_language_string(); # New: (English, German)
167        $productname = $name . " " . $version . " Language Pack" . " " . $langstring;
168    }
169
170    if ( $installer::globals::patch )
171    {
172        if ( ! $allvariables->{'WINDOWSPATCHLEVEL'} ) { installer::exiter::exit_program("ERROR: No Patch level defined for Windows patch: WINDOWSPATCHLEVEL", "get_productname_for_property_table"); }
173        my $patchstring = "Product Update" . " " . $allvariables->{'WINDOWSPATCHLEVEL'};
174        $productname = $productname . " " . $patchstring;
175    }
176
177    # Saving this name in hash $allvariables for further usage
178    $allvariables->{'PROPERTYTABLEPRODUCTNAME'} = $productname;
179    my $infoline = "Defined variable PROPERTYTABLEPRODUCTNAME: $productname\n";
180    $installer::logger::Lang->print($infoline);
181
182    return $productname;
183}
184
185sub get_quickstarterlinkname_for_property_table
186{
187    my ( $allvariables ) = @_;
188
189    # no usage of POSTVERSIONEXTENSION for Quickstarter link name!
190
191    my $name = $allvariables->{'PRODUCTNAME'};
192    my $version = $allvariables->{'PRODUCTVERSION'};
193    my $quickstartername = $name . " " . $version;
194
195    my $infoline = "Defined Quickstarter Link name: $quickstartername\n";
196    $installer::logger::Lang->print($infoline);
197
198    return $quickstartername;
199}
200
201sub get_productversion_for_property_table
202{
203    return $installer::globals::msiproductversion;
204}
205
206#######################################################
207# Setting all feature names as Properties. This is
208# required for the Windows patch process.
209#######################################################
210
211sub set_featurename_properties_for_patch ($)
212{
213    my ($propertyfile) = @_;
214
215    foreach my $feature_gid (keys %installer::globals::featurecollector)
216    {
217        push @$propertyfile, $feature_gid . "\t" . "1" . "\n";
218    }
219}
220
221#######################################################
222# Setting some important properties
223# (for finding the product in deinstallation process)
224#######################################################
225
226sub set_important_properties
227{
228    my ($propertyfile, $allvariables, $languagestringref) = @_;
229
230    # Setting new variables with the content of %PRODUCTNAME and %PRODUCTVERSION
231    if ( $allvariables->{'PRODUCTNAME'} )
232    {
233        my $onepropertyline =  "DEFINEDPRODUCT" . "\t" . $allvariables->{'PRODUCTNAME'} . "\n";
234        push(@{$propertyfile}, $onepropertyline);
235    }
236
237    if ( $allvariables->{'PRODUCTVERSION'} )
238    {
239        my $onepropertyline = "DEFINEDVERSION" . "\t" . $allvariables->{'PRODUCTVERSION'} . "\n";
240        push(@{$propertyfile}, $onepropertyline);
241    }
242
243    if (( $allvariables->{'PRODUCTNAME'} ) && ( $allvariables->{'PRODUCTVERSION'} ) && ( $allvariables->{'MANUFACTURER'} ) && ( $allvariables->{'PRODUCTCODE'} ))
244    {
245        my $onepropertyline = "FINDPRODUCT" . "\t" . "Software\\" . $allvariables->{'MANUFACTURER'} . "\\" . $allvariables->{'PRODUCTNAME'} . $allvariables->{'PRODUCTADDON'} . "\\" . $allvariables->{'PRODUCTVERSION'} . "\\" . $allvariables->{'PRODUCTCODE'} . "\n";
246        push(@{$propertyfile}, $onepropertyline);
247    }
248
249    if ( $allvariables->{'PRODUCTMAJOR'} )
250    {
251        my $onepropertyline = "PRODUCTMAJOR" . "\t" . $allvariables->{'PRODUCTMAJOR'} . "\n";
252        push(@{$propertyfile}, $onepropertyline);
253    }
254
255    if ( $allvariables->{'PRODUCTMINOR'} )
256    {
257        my $onepropertyline = "PRODUCTMINOR" . "\t" . $allvariables->{'PRODUCTMINOR'} . "\n";
258        push(@{$propertyfile}, $onepropertyline);
259    }
260
261    if ( $allvariables->{'PRODUCTBUILDID'} )
262    {
263        my $onepropertyline = "PRODUCTBUILDID" . "\t" . $allvariables->{'PRODUCTBUILDID'} . "\n";
264        push(@{$propertyfile}, $onepropertyline);
265    }
266
267    if ( $allvariables->{'OOOBASEVERSION'} )
268    {
269        my $onepropertyline = "OOOBASEVERSION" . "\t" . $allvariables->{'OOOBASEVERSION'} . "\n";
270        push(@{$propertyfile}, $onepropertyline);
271    }
272
273    if ( $allvariables->{'URELAYERVERSION'} )
274    {
275        my $onepropertyline = "URELAYERVERSION" . "\t" . $allvariables->{'URELAYERVERSION'} . "\n";
276        push(@{$propertyfile}, $onepropertyline);
277    }
278
279    if ( $allvariables->{'BRANDPACKAGEVERSION'} )
280    {
281        my $onepropertyline = "BRANDPACKAGEVERSION" . "\t" . $allvariables->{'BRANDPACKAGEVERSION'} . "\n";
282        push(@{$propertyfile}, $onepropertyline);
283    }
284
285    if ( $allvariables->{'BASISROOTNAME'} )
286    {
287        my $onepropertyline = "BASISROOTNAME" . "\t" . $allvariables->{'BASISROOTNAME'} . "\n";
288        push(@{$propertyfile}, $onepropertyline);
289    }
290
291    if ( $allvariables->{'EXCLUDE_FROM_REBASE'} )
292    {
293        my $onepropertyline =  "EXCLUDE_FROM_REBASE" . "\t" . $allvariables->{'EXCLUDE_FROM_REBASE'} . "\n";
294        push(@{$propertyfile}, $onepropertyline);
295    }
296
297    if ( $allvariables->{'PREREQUIREDPATCH'} )
298    {
299        my $onepropertyline = "PREREQUIREDPATCH" . "\t" . $allvariables->{'PREREQUIREDPATCH'} . "\n";
300        push(@{$propertyfile}, $onepropertyline);
301    }
302
303    my $onepropertyline = "IGNOREPREREQUIREDPATCH" . "\t" . "1" . "\n";
304    push(@{$propertyfile}, $onepropertyline);
305
306    $onepropertyline = "DONTOPTIMIZELIBS" . "\t" . "0" . "\n";
307    push(@{$propertyfile}, $onepropertyline);
308
309    if ( $installer::globals::officedirhostname )
310    {
311        my $onepropertyline = "OFFICEDIRHOSTNAME" . "\t" . $installer::globals::officedirhostname . "\n";
312        push(@{$propertyfile}, $onepropertyline);
313
314        my $localofficedirhostname = $installer::globals::officedirhostname;
315        $localofficedirhostname =~ s/\//\\/g;
316        $onepropertyline = "OFFICEDIRHOSTNAME_" . "\t" . $localofficedirhostname . "\n";
317        push(@{$propertyfile}, $onepropertyline);
318    }
319
320    if ( $installer::globals::desktoplinkexists )
321    {
322        my $onepropertyline = "DESKTOPLINKEXISTS" . "\t" . "1" . "\n";
323        push(@{$propertyfile}, $onepropertyline);
324
325        $onepropertyline = "CREATEDESKTOPLINK" . "\t" . "1" . "\n"; # Setting the default
326        push(@{$propertyfile}, $onepropertyline);
327    }
328
329    if ( $installer::globals::patch )
330    {
331        my $onepropertyline = "ISPATCH" . "\t" . "1" . "\n";
332        push(@{$propertyfile}, $onepropertyline);
333
334        $onepropertyline = "SETUP_USED" . "\t" . "0" . "\n";
335        push(@{$propertyfile}, $onepropertyline);
336    }
337
338    if ( $installer::globals::languagepack )
339    {
340        my $onepropertyline = "ISLANGUAGEPACK" . "\t" . "1" . "\n";
341        push(@{$propertyfile}, $onepropertyline);
342    }
343
344    my $languagesline = "PRODUCTALLLANGUAGES" . "\t" . $$languagestringref . "\n";
345    push(@{$propertyfile}, $languagesline);
346
347    if (( $allvariables->{'PRODUCTEXTENSION'} ) && ( $allvariables->{'PRODUCTEXTENSION'}  eq "Beta" ))
348    {
349        # my $registryline = "WRITE_REGISTRY" . "\t" . "0" . "\n";
350        # push(@{$propertyfile}, $registryline);
351        my $betainfoline = "BETAPRODUCT" . "\t" . "1" . "\n";
352        push(@{$propertyfile}, $betainfoline);
353    }
354    elsif ( $allvariables->{'DEVELOPMENTPRODUCT'} )
355    {
356        my $registryline = "WRITE_REGISTRY" . "\t" . "0" . "\n";
357        push(@{$propertyfile}, $registryline);
358    }
359    else
360    {
361        my $registryline = "WRITE_REGISTRY" . "\t" . "1" . "\n";    # Default: Write complete registry
362        push(@{$propertyfile}, $registryline);
363    }
364
365    # Adding also used tree conditions for multilayer products.
366    # These are saved in %installer::globals::usedtreeconditions
367    foreach my $treecondition (keys %installer::globals::usedtreeconditions)
368    {
369        my $onepropertyline = $treecondition . "\t" . "1" . "\n";
370        push(@{$propertyfile}, $onepropertyline);
371    }
372
373    # No more license dialog for selected products
374    if ( $allvariables->{'HIDELICENSEDIALOG'} )
375    {
376        my $onepropertyline = "HIDEEULA" . "\t" . "1" . "\n";
377
378        my $already_defined = 0;
379
380        for ( my $i = 0; $i <= $#{$propertyfile}; $i++ )
381        {
382            if ( ${$propertyfile}[$i] =~ /^\s*HIDEEULA\t/ )
383            {
384                ${$propertyfile}[$i] = $onepropertyline;
385                $already_defined = 1;
386                last;
387            }
388        }
389
390        if ( ! $already_defined )
391        {
392            push(@{$propertyfile}, $onepropertyline);
393        }
394    }
395
396    # Setting .NET requirements
397    if ( $installer::globals::required_dotnet_version ne "" )
398    {
399        my $onepropertyline = "REQUIRED_DOTNET_VERSION" . "\t" . $installer::globals::required_dotnet_version . "\n";
400        push(@{$propertyfile}, $onepropertyline);
401
402        $onepropertyline = "DOTNET_SUFFICIENT" . "\t" . "1" . "\n"; # default value for found .NET
403        push(@{$propertyfile}, $onepropertyline);
404    }
405
406}
407
408#######################################################
409# Setting properties needed for ms file type registration
410#######################################################
411
412sub set_ms_file_types_properties
413{
414    my ($propertyfile) = @_;
415
416    push(@{$propertyfile}, "REGISTER_PPS"  . "\t" . "0" . "\n");
417    push(@{$propertyfile}, "REGISTER_PPSX" . "\t" . "0" . "\n");
418    push(@{$propertyfile}, "REGISTER_PPSM" . "\t" . "0" . "\n");
419    push(@{$propertyfile}, "REGISTER_PPAM" . "\t" . "0" . "\n");
420    push(@{$propertyfile}, "REGISTER_PPT"  . "\t" . "0" . "\n");
421    push(@{$propertyfile}, "REGISTER_PPTX" . "\t" . "0" . "\n");
422    push(@{$propertyfile}, "REGISTER_PPTM" . "\t" . "0" . "\n");
423    push(@{$propertyfile}, "REGISTER_POT"  . "\t" . "0" . "\n");
424    push(@{$propertyfile}, "REGISTER_POTX" . "\t" . "0" . "\n");
425    push(@{$propertyfile}, "REGISTER_POTM" . "\t" . "0" . "\n");
426
427    push(@{$propertyfile}, "REGISTER_DOC"  . "\t" . "0" . "\n");
428    push(@{$propertyfile}, "REGISTER_DOCX" . "\t" . "0" . "\n");
429    push(@{$propertyfile}, "REGISTER_DOCM" . "\t" . "0" . "\n");
430    push(@{$propertyfile}, "REGISTER_DOT"  . "\t" . "0" . "\n");
431    push(@{$propertyfile}, "REGISTER_DOTX" . "\t" . "0" . "\n");
432    push(@{$propertyfile}, "REGISTER_DOTM" . "\t" . "0" . "\n");
433    push(@{$propertyfile}, "REGISTER_RTF"  . "\t" . "0" . "\n");
434
435    push(@{$propertyfile}, "REGISTER_XLS"  . "\t" . "0" . "\n");
436    push(@{$propertyfile}, "REGISTER_XLSX" . "\t" . "0" . "\n");
437    push(@{$propertyfile}, "REGISTER_XLSM" . "\t" . "0" . "\n");
438    push(@{$propertyfile}, "REGISTER_XLSB" . "\t" . "0" . "\n");
439    push(@{$propertyfile}, "REGISTER_XLAM" . "\t" . "0" . "\n");
440    push(@{$propertyfile}, "REGISTER_XLT"  . "\t" . "0" . "\n");
441    push(@{$propertyfile}, "REGISTER_XLTX" . "\t" . "0" . "\n");
442    push(@{$propertyfile}, "REGISTER_XLTM" . "\t" . "0" . "\n");
443
444    push(@{$propertyfile}, "REGISTER_NO_MSO_TYPES"  . "\t" . "0" . "\n");
445    push(@{$propertyfile}, "REGISTER_ALL_MSO_TYPES"  . "\t" . "0" . "\n");
446}
447
448####################################################################################
449# Updating the file Property.idt dynamically
450# Content:
451# Property Value
452####################################################################################
453
454sub update_property_table
455{
456    my ($basedir, $language, $allvariables, $languagestringref) = @_;
457
458    my $properyfilename = $basedir . $installer::globals::separator . "Property.idt";
459
460    my $propertyfile = installer::files::read_file($properyfilename);
461
462    # Getting the new values
463    # Some values (arpcomments, arpcontacts, ...) are inserted from the Property.mlf
464
465    my $arpcomments = get_arpcomments_for_property_table($allvariables, $languagestringref);
466    my $installlevel = get_installlevel_for_property_table();
467    my $ischeckforproductupdates = get_ischeckforproductupdates_for_property_table();
468    my $manufacturer = $allvariables->{'OOOVENDOR'};
469    my $productlanguage = get_productlanguage_for_property_table($language);
470    my $productname = get_productname_for_property_table($allvariables);
471    my $productversion = get_productversion_for_property_table();
472    my $quickstarterlinkname = get_quickstarterlinkname_for_property_table($allvariables);
473
474    # Updating the values
475
476    for ( my $i = 0; $i <= $#{$propertyfile}; $i++ )
477    {
478        ${$propertyfile}[$i] =~ s/\bARPCOMMENTSTEMPLATE\b/$arpcomments/;
479        ${$propertyfile}[$i] =~ s/\bINSTALLLEVELTEMPLATE\b/$installlevel/;
480        ${$propertyfile}[$i] =~ s/\bISCHECKFORPRODUCTUPDATESTEMPLATE\b/$ischeckforproductupdates/;
481        ${$propertyfile}[$i] =~ s/\bMANUFACTURERTEMPLATE\b/$manufacturer/;
482        ${$propertyfile}[$i] =~ s/\bPRODUCTLANGUAGETEMPLATE\b/$productlanguage/;
483        ${$propertyfile}[$i] =~ s/\bPRODUCTNAMETEMPLATE\b/$productname/;
484        ${$propertyfile}[$i] =~ s/\bPRODUCTVERSIONTEMPLATE\b/$productversion/;
485        ${$propertyfile}[$i] =~ s/\bQUICKSTARTERLINKNAMETEMPLATE\b/$quickstarterlinkname/;
486    }
487
488    # Setting variables into propertytable
489    set_important_properties($propertyfile, $allvariables, $languagestringref);
490
491    # Setting feature names as properties for Windows patch mechanism
492    if ( $installer::globals::patch ) { set_featurename_properties_for_patch($propertyfile); }
493
494    # Setting variables for register for ms file types
495    set_ms_file_types_properties($propertyfile);
496
497    # Saving the file
498
499    installer::files::save_file($properyfilename ,$propertyfile);
500    my $infoline = "Updated idt file: $properyfilename\n";
501    $installer::logger::Lang->print($infoline);
502
503}
504
505####################################################################################
506# Setting language specific Properties in file Property.idt dynamically
507# Adding:
508# is1033 = 1
509# isMulti = 1
510####################################################################################
511
512sub set_languages_in_property_table
513{
514    my ($basedir, $languagesarrayref) = @_;
515
516    my $properyfilename = $basedir . $installer::globals::separator . "Property.idt";
517    my $propertyfile = installer::files::read_file($properyfilename);
518
519    # Setting the component properties saved in %installer::globals::languageproperties
520    foreach my $localproperty ( keys %installer::globals::languageproperties )
521    {
522        $onepropertyline =  $localproperty . "\t" . $installer::globals::languageproperties{$localproperty} . "\n";
523        push(@{$propertyfile}, $onepropertyline);
524    }
525
526    # Setting the info about multilingual installation in property "isMulti"
527
528    my $propertyname = "isMulti";
529    my $ismultivalue = 0;
530
531    if ( $installer::globals::ismultilingual ) { $ismultivalue = 1; }
532
533    my $onepropertyline =  $propertyname . "\t" . $ismultivalue . "\n";
534    push(@{$propertyfile}, $onepropertyline);
535
536    # setting the ARPPRODUCTICON
537
538    if ($installer::globals::sofficeiconadded)  # set in shortcut.pm
539    {
540        $onepropertyline =  "ARPPRODUCTICON" . "\t" . "soffice.ico" . "\n";
541        push(@{$propertyfile}, $onepropertyline);
542    }
543
544    # Saving the file
545
546    installer::files::save_file($properyfilename ,$propertyfile);
547    my $infoline = "Added language content into idt file: $properyfilename\n";
548    $installer::logger::Lang->print($infoline);
549
550}
551
552############################################################
553# Setting the ProductCode and the UpgradeCode
554# into the Property table. Both have to be stored
555# in the global file $installer::globals::codefilename
556############################################################
557
558sub set_codes_in_property_table
559{
560    my ($basedir) = @_;
561
562    # Reading the property file
563
564    my $properyfilename = $basedir . $installer::globals::separator . "Property.idt";
565    my $propertyfile = installer::files::read_file($properyfilename);
566
567    # Updating the values
568
569    for ( my $i = 0; $i <= $#{$propertyfile}; $i++ )
570    {
571        ${$propertyfile}[$i] =~ s/\bPRODUCTCODETEMPLATE\b/$installer::globals::productcode/;
572        ${$propertyfile}[$i] =~ s/\bUPGRADECODETEMPLATE\b/$installer::globals::upgradecode/;
573    }
574
575    # Saving the property file
576
577    installer::files::save_file($properyfilename ,$propertyfile);
578    my $infoline = "Added language content into idt file: $properyfilename\n";
579    $installer::logger::Lang->print($infoline);
580
581}
582
583############################################################
584# Setting the variable REGKEYPRODPATH, that is used
585# by the language packs.
586############################################################
587
588sub set_regkeyprodpath_in_property_table
589{
590    my ($basedir, , $allvariables) = @_;
591
592    # Reading the property file
593
594    my $properyfilename = $basedir . $installer::globals::separator . "Property.idt";
595    my $propertyfile = installer::files::read_file($properyfilename);
596
597    my $name = $allvariables->{'PRODUCTNAME'};
598    my $version = $allvariables->{'PRODUCTVERSION'};
599
600    my $onepropertyline = "REGKEYPRODPATH" . "\t" . "Software" . "\\" . $installer::globals::manufacturer . "\\". $name;
601
602    push(@{$propertyfile}, $onepropertyline);
603
604    # Saving the property file
605
606    installer::files::save_file($properyfilename ,$propertyfile);
607    my $infoline = "Added language content into idt file: $properyfilename\n";
608    $installer::logger::Lang->print($infoline);
609
610}
611
612############################################################
613# Changing default for MS file type registration
614# in Beta products.
615############################################################
616
617sub update_checkbox_table
618{
619    my ($basedir, $allvariables) = @_;
620
621    if (( $allvariables->{'PRODUCTEXTENSION'} ) && ( $allvariables->{'PRODUCTEXTENSION'}  eq "Beta" ))
622    {
623        my $checkboxfilename = $basedir . $installer::globals::separator . "CheckBox.idt";
624
625        if ( -f $checkboxfilename )
626        {
627            my $checkboxfile = installer::files::read_file($checkboxfilename);
628
629            my $checkboxline = "SELECT_WORD" . "\t" . "0" . "\n";
630            push(@{$checkboxfile}, $checkboxline);
631            $checkboxline = "SELECT_EXCEL" . "\t" . "0" . "\n";
632            push(@{$checkboxfile}, $checkboxline);
633            $checkboxline = "SELECT_POWERPOINT" . "\t" . "0" . "\n";
634            push(@{$checkboxfile}, $checkboxline);
635
636            # Saving the property file
637            installer::files::save_file($checkboxfilename ,$checkboxfile);
638            my $infoline = "Added ms file type defaults into idt file: $checkboxfilename\n";
639            $installer::logger::Lang->print($infoline);
640        }
641    }
642}
643
6441;
645