xref: /trunk/main/solenv/bin/modules/installer/globals.pm (revision 2f45d9d83b79f9bd7169b32bd5d109f135ed0893)
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::globals;
25
26############################################
27# Global settings
28############################################
29
30BEGIN
31{
32    $prog="make_installer.pl";
33
34    # WARNING: the following lines are matched verbatim in i18npool/source/isolang/langid.pl
35
36    @noMSLocaleLangs = (
37        "br",
38        "bs",
39        "dz",
40        "gu",
41        "km",
42        "nr",
43        "ns",
44        "nso",
45        "rw",
46        "ss",
47        "st",
48        "tg",
49        "ts",
50        "tn",
51        "ve",
52        "xh",
53        "zu",
54        "ne",
55        "bn",
56        "bn-BD",
57        "bn-IN",
58        "lo",
59        "cy",
60        "ku",
61        "as-IN",
62        "te-IN",
63        "ml-IN",
64        "mr-IN",
65        "ur-IN",
66        "ta-IN",
67        "or-IN",
68        "ti-ER",
69        "eo",
70        "ka",
71        "ga",
72        "uk",
73        "gd",
74        "my",
75        "mai",
76        "brx",
77        "dgo",
78        "kok",
79        "mni",
80        "ca-XV",
81        "sat",
82        "ug",
83        "om",
84        "si",
85        "or",
86        "oc",
87        "ml",
88        "as",
89        "ast",
90        "ht",
91        "jbo",
92        "fur",
93        "ny",
94        "so",
95        "kab",
96        "tk"
97    );
98    @items_at_modules = ("Files", "Dirs", "Unixlinks");
99    @asianlanguages = ("ja", "ko", "zh-CN", "zh-TW");
100    @bidilanguages = ("ar", "he");
101
102    $ziplistname = "";
103    $pathfilename = "";
104    $setupscriptname = "";
105    $headerfilename = "";
106    $shellscriptsfilename = "";
107    $product = "";
108    $languagelist = "";
109    $added_english = 0;
110    $set_office_start_language = 0;
111    $solarjavaset = 0;
112
113    $destdir = "";
114    $rootpath = "";
115
116    $required_dotnet_version = "2.0.0.0";
117    $productextension = "";
118    $languageproduct = undef;
119    $build = "";
120    $minor = "";
121    $lastminor = "";
122    $compiler = "";
123    $pro = 0;
124    $dounzip = 1;
125    $languages_defined_in_productlist = 0;
126    $setupscript_defined_in_productlist = 0;
127    $islinux = 0;
128    $issolaris = 0;
129    $ismacosx = 0;
130    $isos2 = 0;
131    $iswindowsbuild = 0;
132    $islinuxbuild = 0;
133    $islinuxrpmbuild = 0;
134    $islinuxdebbuild = 0;
135    $islinuxintelrpmbuild = 0;
136    $islinuxppcrpmbuild = 0;
137    $islinuxinteldebbuild = 0;
138    $islinuxppcdebbuild = 0;
139    $islinuxx86_64rpmbuild = 0;
140    $islinuxx86_64debbuild = 0;
141    $issolarisbuild = 0;
142    $issolarispkgbuild = 0;
143    $issolarissparcbuild = 0;
144    $issolarisx86build = 0;
145    $isfreebsdbuild = 0;
146    $isfreebsdpkgbuild = 0;
147    $ismacbuild = 0;
148    $ismacdmgbuild = 0;
149    $unpackpath = "";
150    $idttemplatepath = "";
151    $idtlanguagepath = "";
152    $packjobref = "";
153    $buildid = "Not set";
154    $guidcounter = 1000; # for uniqueness of guids
155    $fontsfolder = "FontsFolder";
156    $fontsfoldername = "Fonts";
157    $fontsdirparent = "";
158    $fontsdirhostname = "truetype";
159    $fontsdirname = $fontsdirhostname;
160    $officefolder = "OfficeFolder";
161    $officemenufolder = "OfficeMenuFolder";
162    $startupfolder = "StartupFolder";
163    $startmenufolder = "StartMenuFolder";
164    $desktopfolder = "DesktopFolder";
165    $programfilesfolder = "ProgramFilesFolder";
166    $commonfilesfolder = "CommonFilesFolder";
167    $commonappdatafolder = "CommonAppDataFolder";
168    $localappdatafolder = "LocalAppDataFolder";
169    $templatefolder = "TemplateFolder";
170    $templatefoldername = "Templates";
171    $programmenufolder = "ProgramMenuFolder";
172    $systemfolder = "SystemFolder";
173    $encodinglistname = "msi-encodinglist.txt";
174    $msiencoding = "";  # hash reference for msi encodings
175    $msilanguage = "";  # hash reference for msi languages LCID
176    $sofficeiconadded = 0;
177    $temppath = "";
178    $globaltempdirname = "ooopackaging";
179    $cyg_temppath = "";
180    $temppathdefined = 0;
181    $jdstemppathdefined = 0;
182    $packageversion = 1;
183    $packagerevision = 1;
184    $rpm = "";
185    $rpmcommand = "";
186    $rpmquerycommand = "";
187    $rpminfologged = 0;
188    $debian = "";
189    $installertypedir = "";
190    $controlledmakecabversion = "5";
191    $saved_packages_path = "";
192    $max_lang_length = 50;
193    $globalblock = "Globals";
194    $rootmodulegid = "";
195    %alllangmodules = ();
196    $englishlicenseset = 0;
197    $englishlicense = "";
198    $englishsolarislicensename = "LICENSE";
199    $solarisdontcompress = 0;
200    $patharray = "";
201
202    $is_special_epm = 0;
203    $epm_in_path = 0;
204    $epm_path = "";
205    $epmoutpath = "";
206    $upx_in_path = 0;
207    $upxfile = "";
208    $simple = 0;
209    $simpledefaultuserdir = "\$ORIGIN/..";
210    $call_epm = 1;
211    $packageformat = "";
212    $packagename = "";
213    $packagelist = "";
214    $addpackagelist = "";
215    $is_unix_multi = 0;
216    $unixmultipath = "";
217    $unixmultipath_orig = "";
218    $alllanguagesinproductarrayref = "";
219    $shiptestdirectory = "";
220    $makelinuxlinkrpm = 0;
221    $linuxlinkrpmprocess = 0;
222    $add_required_package = "";
223    $linuxrespin = 0;
224    @linuxpatchfiles = ();
225    $linuxlibrarybaselevel = "1";
226    $linuxlibrarypatchlevel = "1.1";
227    @linuxlinks = ();
228    @linkrpms = ();
229    $archiveformat = "";
230    $minorupgradekey = "";
231    $pfffileexists = 0;
232    $pffcabfilename = "ooobasis3.0_pff.cab";
233    $mergefiles_added_into_collector = 0;
234    $creating_windows_installer_patch = 0;
235
236    $strip = 1;
237
238    $globallogging = 0;
239    $logfilename = "logfile.log";   # the default logfile name for global errors
240#   @logfileinfo = ();
241#   @errorlogfileinfo = ();
242#   @globallogfileinfo = ();
243    $ignore_error_in_logfile = 0;
244    $exitlog = "";
245    $globalinfo_copied = 0;
246    $quiet = 0;
247    $nodownload = 0;
248    $writetotemp = 0;
249    $useminor = 0;
250    $followme_from_directory = 0;
251    $internal_cabinet_signing = 0;
252
253    $debug = 0;
254    $debugfilename = "debug.txt";
255    $checksumfilename = "checksum.txt";
256    @functioncalls = ();
257
258    $ismultilingual = 0;
259    @multilanguagemodules = ();
260    $languagemodulesbase = "gid_Module_Root_";
261    %alluniquefilenames = ();
262    %alllcuniquefilenames = ();
263    %uniquefilenamesequence = ();
264    %dependfilenames = ();
265    $isopensourceproduct = 1;
266    $manufacturer = "";
267    $longmanufacturer = "";
268    $codefilename = "codes.txt";
269    $componentfilename = "components.txt";
270    $productcode = "";
271    $upgradecode = "";
272    $msiproductversion = "";
273    $msimajorproductversion = "";
274    $created_new_component_guid = 0;
275    @allddffiles = ();
276    $infodirectory = "";
277    @currentcontent = ();
278    @installsetcontent = ();
279    %xpdpackageinfo = ();
280    $signfiles_checked = 0;
281    $dosign = 0;
282    $pwfile = "";
283    $pwfile = "";
284    $pfxfile = "";
285
286    %merge_media_line = ();
287    %merge_allfeature_hash = ();
288    %merge_alldirectory_hash = ();
289    %copy_msm_files = ();
290    $mergefeaturecollected = 0;
291    $mergedirectoriescollected = 0;
292    $lastsequence_before_merge = 0;
293    $lastcabfilename = "";
294
295    $createdxpddefaultlang = 0;
296    $xpddir = "";
297    $productxpdfile = "setup.xpd";
298    $xpd_files_prepared = 0;
299    $defaultlanguage = "";
300    # @emptyxpdparents = ();
301    @createdxpdfiles = ();
302    @allxpdfiles = ();
303    $isxpdplatform = 0;
304    $javalanguagepath = "";
305    $javasettozero = 0;
306    $addlicensefile = 1;
307    $addsystemintegration = 0;
308    $addjavainstaller = 0;
309    $added_directories = 0;
310    $makedownload = 1;
311    $makejds = 1;
312    $jdsexcludefilename = "";
313    $jds_language_controlled = 0;
314    $correct_jds_language = 0;
315    @installsetfiles = ();
316    @binarytableonlyfiles = ();
317    @allscpactions = ();
318    $languagepackaddon = "LanguagePack";
319    $patchaddon = "Patch";
320    $ooodownloadfilename = "";
321    $downloadfilename = "";
322    $downloadfileextension = "";
323    $followmeinfofilename = "";
324    $oooversionstring = "";
325    $shellnewfilesadded = 0;
326    %multilingual_only_modules = ();
327    %application_modules = ();
328    $defaultinstallorder = 1000;
329    $defaultsystemintinstallorder = 1200;
330
331    $is_copy_only_project = 0;
332    $is_simple_packager_project = 0;
333    $patch_user_dir = 0;
334    $addchildprojects = 0;
335    $languagepack = 0;
336    $devsnapshotbuild = 0;
337    $tab = 0;
338    $patch = 0;
339    $patchincludepath = "";
340    $refresh_includepathes = 0;
341    $include_pathes_read = 0;
342    $patchfilelistname = "patchfilelist.txt";
343    @patchfilecollector = ();
344    $nopatchfilecollector = "";
345    @userregistrycollector = ();
346    $addeduserregitrykeys = 0;
347    $poolpathset = 0;
348    $poolpath = 0;
349    $poollockfilename = "";
350    $poolcheckfilename = "";
351    %poolshiftedpackages = ();
352    %poolpackages = ();
353    %createpackages = ();
354    $processhaspoolcheckfile = 0;
355    $processhaspoollockfile = 0;
356    $newpcfcontentcalculated = 0;
357    $sessionid = 0;
358    $sessionidset = 0;
359    $savelockfilecontent = "";
360    $savelockfilename = "";
361    $getuidpath = "";
362    $getuidpathset = 0;
363    $newpcfcontent = "";
364    %pcfdifflist = ();
365    @pcfdiffcomment = ();
366    @epmdifflist = ();
367    $desktoplinkexists = 0;
368    $analyze_spellcheckerlanguage = 0;
369    %spellcheckerlanguagehash = ();
370    %spellcheckerfilehash = ();
371    $registryrootcomponent = "";
372    %allcomponents = ();
373    %allcomponents_in_this_database = ();
374    %allshortcomponents = ();
375    %allregistrycomponents_ = ();
376    %allregistrycomponents_in_this_database_ = ();
377    %allshortregistrycomponents = ();
378    %allregistryidentifier = ();
379
380    $installlocationdirectory = "";
381    $installlocationdirectoryset = 0;
382    $vendordirectory = "";
383    $vendordirectoryset = 0;
384    $officeinstalldirectory = "";
385    $officeinstalldirectoryset = 0;
386    $basisinstalldirectory = "";
387    $basisinstalldirectoryset = 0;
388    $ureinstalldirectory = "";
389    $ureinstalldirectoryset = 0;
390    $rootbrandpackage = "";
391    $rootbrandpackageset = 0;
392    $officedirhostname = "";
393    $basisdirhostname = "";
394    $uredirhostname = "";
395    $officedirgid = "";
396    $basisdirgid = "";
397
398    %sign_extensions = ("dll" => "1", "exe" => "1", "cab" => "1");
399    %treestyles = ();
400    %installlocations = ("INSTALLLOCATION" => "1");
401    %treelayername = ();
402    %hostnametreestyles = ();
403    %treeconditions = ();
404    %usedtreeconditions = ();
405    %moduledestination = ();
406
407    $fix_number_of_cab_files = 1;
408    $cabfilecompressionlevel = 2;
409    $number_of_cabfiles = 1;    # only for $fix_number_of_cab_files = 1
410    $include_cab_in_msi = 0;
411    $msidatabasename = "";
412    $prepare_winpatch = 0;
413    $previous_idt_dir = "";
414    $updatepack = 0;
415    $msitranpath = "";
416    $usesharepointpath = 0;
417    %newfilescollector = ();
418
419    $saveinstalldir = "";
420    $csp_installdir = "";       # global installdir of createsimplepackage() in simplepackage.pm
421    $csp_installlogdir = "";    # global installlogdir of createsimplepackage() in simplepackage.pm
422    $csp_languagestring = "";   # global languagestring of createsimplepackage() in simplepackage.pm
423    $localunpackdir = "";
424    $localinstalldirset = 0;
425    $localinstalldir = "";
426
427    $javafilename = "";
428    $javafilename2 = "";
429    $javafilename3 = "";
430    $javafile = "";
431    $urefile = "";
432
433    $postprocess_specialepm = 0;
434    $postprocess_standardepm = 0;
435
436    $starttime = "";
437
438    @solarispatchscripts = ("checkinstall", "copyright", "patch_checkinstall", "patch_postinstall", "postinstall", "preinstall", "i.none");
439    @solarispatchscriptsforextensions = ("checkinstall", "copyright", "patch_checkinstall", "patch_postinstall_extensions", "postinstall_extensions", "preinstall", "i.none");
440    @solarispatchfiles = (".diPatch", "patchinfo");
441    @environmentvariables = ( "SOLARVERSION", "GUI", "WORK_STAMP", "OUTPATH", "LOCAL_OUT", "LOCAL_COMMON_OUT" );
442    @packagelistitems = ("module", "solarispackagename", "packagename", "copyright", "vendor", "description" );
443    @languagepackfeature =();
444    %featurecollector =();
445    $msiassemblyfiles = "";
446    $nsisfilename = "Nsis";
447    $macinstallfilename = "macinstall.ulf";
448    $nsis204 = 0;
449    $nsis231 = 0;
450    $unicodensis = 0;
451    $linuxlinkrpms = "";
452    $extensioninstalldir = "gid_Dir_Share_Extension_Install";
453    @languagenames = ();
454    @requiredpackages = ();
455    %componentcondition = ();
456    %componentid = ();
457    %comparecomponentname = ();
458    %languageproperties = ();
459    %allcabinets = ();
460    %allcabinetassigns = ();
461    %cabfilecounter = ();
462    %lastsequence = ();
463    %dontdeletecomponents = ();
464    %allcalculated_guids = ();
465    %calculated_component_guids = ();
466    %base_independent_components = ();
467    %all_english_languagestrings = ();
468    %all_required_english_languagestrings = ();
469
470    @forced_properties = ("SERVICETAG_PRODUCTNAME", "SERVICETAG_PRODUCTVERSION", "SERVICETAG_PARENTNAME", "SERVICETAG_SOURCE", "SERVICETAG_URN");
471
472    @removedirs = ();
473    @jdsremovedirs = ();
474    @emptypackages = ();
475    %fontpackageexists = ();
476
477    $exithandler = undef;
478
479    $plat = $^O;
480
481    if ( $plat =~ /cygwin/i )
482    {
483        $zippath = "zip";                   # Has to be in the path: /usr/bin/zip
484        $checksumfile = "so_checksum";
485        $unopkgfile = "unopkg.exe";
486        $separator = "/";
487        $pathseparator = "\:";
488        $libextension = "\.dll";
489        $isunix = 0;
490        $iswin = 1;
491        $archiveformat = ".zip";
492    }
493    elsif ( $plat =~ /os2/i )
494    {
495        print "Setup OS/2 platform\n";
496        $zippath = "zip";                   # Has to be in the path: /usr/bin/zip
497        $checksumfile = "so_checksum";
498        $unopkgfile = "unopkg.bin";
499        $separator = "/";
500        $pathseparator = "\:";
501        $libextension = "\.dll";
502        $isunix = 0;
503        $iswin = 0;
504        $isos2 = 1;
505        $archiveformat = ".zip";
506    }
507    else
508    {
509        $zippath = "zip";                   # Has to be in the path: /usr/bin/zip
510        $checksumfile = "so_checksum";
511        $unopkgfile = "unopkg";
512        $separator = "/";
513        $pathseparator = "\:";
514        if ( $plat =~ /darwin/i )
515        {
516            $libextension = "\.dylib";
517        }
518        else
519        {
520            $libextension = "\.so";
521        }
522        $archiveformat = ".tar.gz";
523        $isunix = 1;
524        $iswin = 0;
525    }
526    # WRAPCMD is gone - remove this and all related
527    # $installer::globals::wrapcmd entries
528    $wrapcmd = "";
529
530    if ( $plat =~ /linux/i ) { $islinux = 1; }
531    if ( $plat =~ /kfreebsd/i ) { $islinux = 1; }
532    if ( $plat =~ /solaris/i ) { $issolaris = 1; }
533    if ( $plat =~ /darwin/i ) { $ismacosx = 1; }
534    if ( $plat =~ /os2/i ) { $isos2 = 1; }
535
536    # ToDo: Needs to be expanded for additional platforms
537
538    $is_release = 0;  # Is changed in parameter.pm when the -release option is given.
539    $source_version = undef;
540    $target_version = undef;
541    $source_msi = undef;
542
543    # Is set to 1 when target_version is a major version, ie ?.0.0
544    $is_major_release = 0;
545}
546
5471;
548