xref: /AOO42X/main/solenv/bin/modules/installer/windows/property.pm (revision 2fe8ea0f2edc4c4de1fe57b3bba010292ea53d24)
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    ($propertyfile) = @_;
214
215    for ( my $i = 0; $i <= $#installer::globals::featurecollector; $i++ )
216    {
217        my $onepropertyline =  $installer::globals::featurecollector[$i] . "\t" . "1" . "\n";
218        push(@{$propertyfile}, $onepropertyline);
219    }
220
221}
222
223#######################################################
224# Setting some important properties
225# (for finding the product in deinstallation process)
226#######################################################
227
228sub set_important_properties
229{
230    my ($propertyfile, $allvariables, $languagestringref) = @_;
231
232    # Setting new variables with the content of %PRODUCTNAME and %PRODUCTVERSION
233    if ( $allvariables->{'PRODUCTNAME'} )
234    {
235        my $onepropertyline =  "DEFINEDPRODUCT" . "\t" . $allvariables->{'PRODUCTNAME'} . "\n";
236        push(@{$propertyfile}, $onepropertyline);
237    }
238
239    if ( $allvariables->{'PRODUCTVERSION'} )
240    {
241        my $onepropertyline = "DEFINEDVERSION" . "\t" . $allvariables->{'PRODUCTVERSION'} . "\n";
242        push(@{$propertyfile}, $onepropertyline);
243    }
244
245    if (( $allvariables->{'PRODUCTNAME'} ) && ( $allvariables->{'PRODUCTVERSION'} ) && ( $allvariables->{'MANUFACTURER'} ) && ( $allvariables->{'PRODUCTCODE'} ))
246    {
247        my $onepropertyline = "FINDPRODUCT" . "\t" . "Software\\" . $allvariables->{'MANUFACTURER'} . "\\" . $allvariables->{'PRODUCTNAME'} . $allvariables->{'PRODUCTADDON'} . "\\" . $allvariables->{'PRODUCTVERSION'} . "\\" . $allvariables->{'PRODUCTCODE'} . "\n";
248        push(@{$propertyfile}, $onepropertyline);
249    }
250
251    if ( $allvariables->{'PRODUCTMAJOR'} )
252    {
253        my $onepropertyline = "PRODUCTMAJOR" . "\t" . $allvariables->{'PRODUCTMAJOR'} . "\n";
254        push(@{$propertyfile}, $onepropertyline);
255    }
256
257    if ( $allvariables->{'PRODUCTMINOR'} )
258    {
259        my $onepropertyline = "PRODUCTMINOR" . "\t" . $allvariables->{'PRODUCTMINOR'} . "\n";
260        push(@{$propertyfile}, $onepropertyline);
261    }
262
263    if ( $allvariables->{'PRODUCTBUILDID'} )
264    {
265        my $onepropertyline = "PRODUCTBUILDID" . "\t" . $allvariables->{'PRODUCTBUILDID'} . "\n";
266        push(@{$propertyfile}, $onepropertyline);
267    }
268
269    if ( $allvariables->{'OOOBASEVERSION'} )
270    {
271        my $onepropertyline = "OOOBASEVERSION" . "\t" . $allvariables->{'OOOBASEVERSION'} . "\n";
272        push(@{$propertyfile}, $onepropertyline);
273    }
274
275    if ( $allvariables->{'URELAYERVERSION'} )
276    {
277        my $onepropertyline = "URELAYERVERSION" . "\t" . $allvariables->{'URELAYERVERSION'} . "\n";
278        push(@{$propertyfile}, $onepropertyline);
279    }
280
281    if ( $allvariables->{'BRANDPACKAGEVERSION'} )
282    {
283        my $onepropertyline = "BRANDPACKAGEVERSION" . "\t" . $allvariables->{'BRANDPACKAGEVERSION'} . "\n";
284        push(@{$propertyfile}, $onepropertyline);
285    }
286
287    if ( $allvariables->{'BASISROOTNAME'} )
288    {
289        my $onepropertyline = "BASISROOTNAME" . "\t" . $allvariables->{'BASISROOTNAME'} . "\n";
290        push(@{$propertyfile}, $onepropertyline);
291    }
292
293    if ( $allvariables->{'EXCLUDE_FROM_REBASE'} )
294    {
295        my $onepropertyline =  "EXCLUDE_FROM_REBASE" . "\t" . $allvariables->{'EXCLUDE_FROM_REBASE'} . "\n";
296        push(@{$propertyfile}, $onepropertyline);
297    }
298
299    if ( $allvariables->{'PREREQUIREDPATCH'} )
300    {
301        my $onepropertyline = "PREREQUIREDPATCH" . "\t" . $allvariables->{'PREREQUIREDPATCH'} . "\n";
302        push(@{$propertyfile}, $onepropertyline);
303    }
304
305    my $onepropertyline = "IGNOREPREREQUIREDPATCH" . "\t" . "1" . "\n";
306    push(@{$propertyfile}, $onepropertyline);
307
308    $onepropertyline = "DONTOPTIMIZELIBS" . "\t" . "0" . "\n";
309    push(@{$propertyfile}, $onepropertyline);
310
311    if ( $installer::globals::officedirhostname )
312    {
313        my $onepropertyline = "OFFICEDIRHOSTNAME" . "\t" . $installer::globals::officedirhostname . "\n";
314        push(@{$propertyfile}, $onepropertyline);
315
316        my $localofficedirhostname = $installer::globals::officedirhostname;
317        $localofficedirhostname =~ s/\//\\/g;
318        $onepropertyline = "OFFICEDIRHOSTNAME_" . "\t" . $localofficedirhostname . "\n";
319        push(@{$propertyfile}, $onepropertyline);
320    }
321
322    if ( $installer::globals::desktoplinkexists )
323    {
324        my $onepropertyline = "DESKTOPLINKEXISTS" . "\t" . "1" . "\n";
325        push(@{$propertyfile}, $onepropertyline);
326
327        $onepropertyline = "CREATEDESKTOPLINK" . "\t" . "1" . "\n"; # Setting the default
328        push(@{$propertyfile}, $onepropertyline);
329    }
330
331    if ( $installer::globals::patch )
332    {
333        my $onepropertyline = "ISPATCH" . "\t" . "1" . "\n";
334        push(@{$propertyfile}, $onepropertyline);
335
336        $onepropertyline = "SETUP_USED" . "\t" . "0" . "\n";
337        push(@{$propertyfile}, $onepropertyline);
338    }
339
340    if ( $installer::globals::languagepack )
341    {
342        my $onepropertyline = "ISLANGUAGEPACK" . "\t" . "1" . "\n";
343        push(@{$propertyfile}, $onepropertyline);
344    }
345
346    my $languagesline = "PRODUCTALLLANGUAGES" . "\t" . $$languagestringref . "\n";
347    push(@{$propertyfile}, $languagesline);
348
349    if (( $allvariables->{'PRODUCTEXTENSION'} ) && ( $allvariables->{'PRODUCTEXTENSION'}  eq "Beta" ))
350    {
351        # my $registryline = "WRITE_REGISTRY" . "\t" . "0" . "\n";
352        # push(@{$propertyfile}, $registryline);
353        my $betainfoline = "BETAPRODUCT" . "\t" . "1" . "\n";
354        push(@{$propertyfile}, $betainfoline);
355    }
356    elsif ( $allvariables->{'DEVELOPMENTPRODUCT'} )
357    {
358        my $registryline = "WRITE_REGISTRY" . "\t" . "0" . "\n";
359        push(@{$propertyfile}, $registryline);
360    }
361    else
362    {
363        my $registryline = "WRITE_REGISTRY" . "\t" . "1" . "\n";    # Default: Write complete registry
364        push(@{$propertyfile}, $registryline);
365    }
366
367    # Adding also used tree conditions for multilayer products.
368    # These are saved in %installer::globals::usedtreeconditions
369    foreach my $treecondition (keys %installer::globals::usedtreeconditions)
370    {
371        my $onepropertyline = $treecondition . "\t" . "1" . "\n";
372        push(@{$propertyfile}, $onepropertyline);
373    }
374
375    # No more license dialog for selected products
376    if ( $allvariables->{'HIDELICENSEDIALOG'} )
377    {
378        my $onepropertyline = "HIDEEULA" . "\t" . "1" . "\n";
379
380        my $already_defined = 0;
381
382        for ( my $i = 0; $i <= $#{$propertyfile}; $i++ )
383        {
384            if ( ${$propertyfile}[$i] =~ /^\s*HIDEEULA\t/ )
385            {
386                ${$propertyfile}[$i] = $onepropertyline;
387                $already_defined = 1;
388                last;
389            }
390        }
391
392        if ( ! $already_defined )
393        {
394            push(@{$propertyfile}, $onepropertyline);
395        }
396    }
397
398    # Setting .NET requirements
399    if ( $installer::globals::required_dotnet_version ne "" )
400    {
401        my $onepropertyline = "REQUIRED_DOTNET_VERSION" . "\t" . $installer::globals::required_dotnet_version . "\n";
402        push(@{$propertyfile}, $onepropertyline);
403
404        $onepropertyline = "DOTNET_SUFFICIENT" . "\t" . "1" . "\n"; # default value for found .NET
405        push(@{$propertyfile}, $onepropertyline);
406    }
407
408}
409
410#######################################################
411# Setting properties needed for ms file type registration
412#######################################################
413
414sub set_ms_file_types_properties
415{
416    my ($propertyfile) = @_;
417
418    push(@{$propertyfile}, "REGISTER_PPS"  . "\t" . "0" . "\n");
419    push(@{$propertyfile}, "REGISTER_PPSX" . "\t" . "0" . "\n");
420    push(@{$propertyfile}, "REGISTER_PPSM" . "\t" . "0" . "\n");
421    push(@{$propertyfile}, "REGISTER_PPAM" . "\t" . "0" . "\n");
422    push(@{$propertyfile}, "REGISTER_PPT"  . "\t" . "0" . "\n");
423    push(@{$propertyfile}, "REGISTER_PPTX" . "\t" . "0" . "\n");
424    push(@{$propertyfile}, "REGISTER_PPTM" . "\t" . "0" . "\n");
425    push(@{$propertyfile}, "REGISTER_POT"  . "\t" . "0" . "\n");
426    push(@{$propertyfile}, "REGISTER_POTX" . "\t" . "0" . "\n");
427    push(@{$propertyfile}, "REGISTER_POTM" . "\t" . "0" . "\n");
428
429    push(@{$propertyfile}, "REGISTER_DOC"  . "\t" . "0" . "\n");
430    push(@{$propertyfile}, "REGISTER_DOCX" . "\t" . "0" . "\n");
431    push(@{$propertyfile}, "REGISTER_DOCM" . "\t" . "0" . "\n");
432    push(@{$propertyfile}, "REGISTER_DOT"  . "\t" . "0" . "\n");
433    push(@{$propertyfile}, "REGISTER_DOTX" . "\t" . "0" . "\n");
434    push(@{$propertyfile}, "REGISTER_DOTM" . "\t" . "0" . "\n");
435    push(@{$propertyfile}, "REGISTER_RTF"  . "\t" . "0" . "\n");
436
437    push(@{$propertyfile}, "REGISTER_XLS"  . "\t" . "0" . "\n");
438    push(@{$propertyfile}, "REGISTER_XLSX" . "\t" . "0" . "\n");
439    push(@{$propertyfile}, "REGISTER_XLSM" . "\t" . "0" . "\n");
440    push(@{$propertyfile}, "REGISTER_XLSB" . "\t" . "0" . "\n");
441    push(@{$propertyfile}, "REGISTER_XLAM" . "\t" . "0" . "\n");
442    push(@{$propertyfile}, "REGISTER_XLT"  . "\t" . "0" . "\n");
443    push(@{$propertyfile}, "REGISTER_XLTX" . "\t" . "0" . "\n");
444    push(@{$propertyfile}, "REGISTER_XLTM" . "\t" . "0" . "\n");
445
446    push(@{$propertyfile}, "REGISTER_NO_MSO_TYPES"  . "\t" . "0" . "\n");
447    push(@{$propertyfile}, "REGISTER_ALL_MSO_TYPES"  . "\t" . "0" . "\n");
448}
449
450####################################################################################
451# Updating the file Property.idt dynamically
452# Content:
453# Property Value
454####################################################################################
455
456sub update_property_table
457{
458    my ($basedir, $language, $allvariables, $languagestringref) = @_;
459
460    my $properyfilename = $basedir . $installer::globals::separator . "Property.idt";
461
462    my $propertyfile = installer::files::read_file($properyfilename);
463
464    # Getting the new values
465    # Some values (arpcomments, arpcontacts, ...) are inserted from the Property.mlf
466
467    my $arpcomments = get_arpcomments_for_property_table($allvariables, $languagestringref);
468    my $installlevel = get_installlevel_for_property_table();
469    my $ischeckforproductupdates = get_ischeckforproductupdates_for_property_table();
470    my $manufacturer = $allvariables->{'OOOVENDOR'};
471    my $productlanguage = get_productlanguage_for_property_table($language);
472    my $productname = get_productname_for_property_table($allvariables);
473    my $productversion = get_productversion_for_property_table();
474    my $quickstarterlinkname = get_quickstarterlinkname_for_property_table($allvariables);
475
476    # Updating the values
477
478    for ( my $i = 0; $i <= $#{$propertyfile}; $i++ )
479    {
480        ${$propertyfile}[$i] =~ s/\bARPCOMMENTSTEMPLATE\b/$arpcomments/;
481        ${$propertyfile}[$i] =~ s/\bINSTALLLEVELTEMPLATE\b/$installlevel/;
482        ${$propertyfile}[$i] =~ s/\bISCHECKFORPRODUCTUPDATESTEMPLATE\b/$ischeckforproductupdates/;
483        ${$propertyfile}[$i] =~ s/\bMANUFACTURERTEMPLATE\b/$manufacturer/;
484        ${$propertyfile}[$i] =~ s/\bPRODUCTLANGUAGETEMPLATE\b/$productlanguage/;
485        ${$propertyfile}[$i] =~ s/\bPRODUCTNAMETEMPLATE\b/$productname/;
486        ${$propertyfile}[$i] =~ s/\bPRODUCTVERSIONTEMPLATE\b/$productversion/;
487        ${$propertyfile}[$i] =~ s/\bQUICKSTARTERLINKNAMETEMPLATE\b/$quickstarterlinkname/;
488    }
489
490    # Setting variables into propertytable
491    set_important_properties($propertyfile, $allvariables, $languagestringref);
492
493    # Setting feature names as properties for Windows patch mechanism
494    if ( $installer::globals::patch ) { set_featurename_properties_for_patch($propertyfile); }
495
496    # Setting variables for register for ms file types
497    set_ms_file_types_properties($propertyfile);
498
499    # Saving the file
500
501    installer::files::save_file($properyfilename ,$propertyfile);
502    my $infoline = "Updated idt file: $properyfilename\n";
503    $installer::logger::Lang->print($infoline);
504
505}
506
507####################################################################################
508# Setting language specific Properties in file Property.idt dynamically
509# Adding:
510# is1033 = 1
511# isMulti = 1
512####################################################################################
513
514sub set_languages_in_property_table
515{
516    my ($basedir, $languagesarrayref) = @_;
517
518    my $properyfilename = $basedir . $installer::globals::separator . "Property.idt";
519    my $propertyfile = installer::files::read_file($properyfilename);
520
521    # Setting the component properties saved in %installer::globals::languageproperties
522    foreach my $localproperty ( keys %installer::globals::languageproperties )
523    {
524        $onepropertyline =  $localproperty . "\t" . $installer::globals::languageproperties{$localproperty} . "\n";
525        push(@{$propertyfile}, $onepropertyline);
526    }
527
528    # Setting the info about multilingual installation in property "isMulti"
529
530    my $propertyname = "isMulti";
531    my $ismultivalue = 0;
532
533    if ( $installer::globals::ismultilingual ) { $ismultivalue = 1; }
534
535    my $onepropertyline =  $propertyname . "\t" . $ismultivalue . "\n";
536    push(@{$propertyfile}, $onepropertyline);
537
538    # setting the ARPPRODUCTICON
539
540    if ($installer::globals::sofficeiconadded)  # set in shortcut.pm
541    {
542        $onepropertyline =  "ARPPRODUCTICON" . "\t" . "soffice.ico" . "\n";
543        push(@{$propertyfile}, $onepropertyline);
544    }
545
546    # Saving the file
547
548    installer::files::save_file($properyfilename ,$propertyfile);
549    my $infoline = "Added language content into idt file: $properyfilename\n";
550    $installer::logger::Lang->print($infoline);
551
552}
553
554############################################################
555# Setting the ProductCode and the UpgradeCode
556# into the Property table. Both have to be stored
557# in the global file $installer::globals::codefilename
558############################################################
559
560sub set_codes_in_property_table
561{
562    my ($basedir) = @_;
563
564    # Reading the property file
565
566    my $properyfilename = $basedir . $installer::globals::separator . "Property.idt";
567    my $propertyfile = installer::files::read_file($properyfilename);
568
569    # Updating the values
570
571    for ( my $i = 0; $i <= $#{$propertyfile}; $i++ )
572    {
573        ${$propertyfile}[$i] =~ s/\bPRODUCTCODETEMPLATE\b/$installer::globals::productcode/;
574        ${$propertyfile}[$i] =~ s/\bUPGRADECODETEMPLATE\b/$installer::globals::upgradecode/;
575    }
576
577    # Saving the property file
578
579    installer::files::save_file($properyfilename ,$propertyfile);
580    my $infoline = "Added language content into idt file: $properyfilename\n";
581    $installer::logger::Lang->print($infoline);
582
583}
584
585############################################################
586# Setting the variable REGKEYPRODPATH, that is used
587# by the language packs.
588############################################################
589
590sub set_regkeyprodpath_in_property_table
591{
592    my ($basedir, , $allvariables) = @_;
593
594    # Reading the property file
595
596    my $properyfilename = $basedir . $installer::globals::separator . "Property.idt";
597    my $propertyfile = installer::files::read_file($properyfilename);
598
599    my $name = $allvariables->{'PRODUCTNAME'};
600    my $version = $allvariables->{'PRODUCTVERSION'};
601
602    my $onepropertyline = "REGKEYPRODPATH" . "\t" . "Software" . "\\" . $installer::globals::manufacturer . "\\". $name;
603
604    push(@{$propertyfile}, $onepropertyline);
605
606    # Saving the property file
607
608    installer::files::save_file($properyfilename ,$propertyfile);
609    my $infoline = "Added language content into idt file: $properyfilename\n";
610    $installer::logger::Lang->print($infoline);
611
612}
613
614############################################################
615# Changing default for MS file type registration
616# in Beta products.
617############################################################
618
619sub update_checkbox_table
620{
621    my ($basedir, $allvariables) = @_;
622
623    if (( $allvariables->{'PRODUCTEXTENSION'} ) && ( $allvariables->{'PRODUCTEXTENSION'}  eq "Beta" ))
624    {
625        my $checkboxfilename = $basedir . $installer::globals::separator . "CheckBox.idt";
626
627        if ( -f $checkboxfilename )
628        {
629            my $checkboxfile = installer::files::read_file($checkboxfilename);
630
631            my $checkboxline = "SELECT_WORD" . "\t" . "0" . "\n";
632            push(@{$checkboxfile}, $checkboxline);
633            $checkboxline = "SELECT_EXCEL" . "\t" . "0" . "\n";
634            push(@{$checkboxfile}, $checkboxline);
635            $checkboxline = "SELECT_POWERPOINT" . "\t" . "0" . "\n";
636            push(@{$checkboxfile}, $checkboxline);
637
638            # Saving the property file
639            installer::files::save_file($checkboxfilename ,$checkboxfile);
640            my $infoline = "Added ms file type defaults into idt file: $checkboxfilename\n";
641            $installer::logger::Lang->print($infoline);
642        }
643    }
644}
645
6461;
647