update dev300-m58
[ooovba.git] / solenv / bin / modules / installer / globals.pm
blob34159c180c566a0b15eb54566ec178855868e36f
1 #*************************************************************************
3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 #
5 # Copyright 2008 by Sun Microsystems, Inc.
7 # OpenOffice.org - a multi-platform office productivity suite
9 # $RCSfile: globals.pm,v $
11 # $Revision: 1.103.16.2 $
13 # This file is part of OpenOffice.org.
15 # OpenOffice.org is free software: you can redistribute it and/or modify
16 # it under the terms of the GNU Lesser General Public License version 3
17 # only, as published by the Free Software Foundation.
19 # OpenOffice.org is distributed in the hope that it will be useful,
20 # but WITHOUT ANY WARRANTY; without even the implied warranty of
21 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 # GNU Lesser General Public License version 3 for more details
23 # (a copy is included in the LICENSE file that accompanied this code).
25 # You should have received a copy of the GNU Lesser General Public License
26 # version 3 along with OpenOffice.org. If not, see
27 # <http://www.openoffice.org/license.html>
28 # for a copy of the LGPLv3 License.
30 #*************************************************************************
32 package installer::globals;
34 ############################################
35 # Global settings
36 ############################################
38 BEGIN
40 $prog="make_installer.pl";
42 @noMSLocaleLangs = (
43 "br",
44 "bs",
45 "dz",
46 "gu",
47 "km",
48 "nr",
49 "ns",
50 "rw",
51 "ss",
52 "st",
53 "tg",
54 "ts",
55 "tn",
56 "ve",
57 "xh",
58 "zu",
59 "ne",
60 "bn",
61 "bn-BD",
62 "bn-IN",
63 "lo",
64 "cy",
65 "ku",
66 "as-IN",
67 "te-IN",
68 "ml-IN",
69 "mr-IN",
70 "ur-IN",
71 "ta-IN",
72 "or-IN",
73 "ti-ER",
74 "eo",
75 "ka",
76 "ga",
77 "uk",
78 "gd",
79 "my",
80 "mai",
81 "brx",
82 "dgo",
83 "kok",
84 "mni",
85 "sat"
88 @items_at_modules = ("Files", "Dirs", "Unixlinks");
89 @asianlanguages = ("ja", "ko", "zh-CN", "zh-TW");
90 @bidilanguages = ("ar", "he");
92 $ziplistname = "";
93 $pathfilename = "";
94 $setupscriptname = "";
95 $headerfilename = "";
96 $shellscriptsfilename = "";
97 $product = "";
98 $languagelist = "";
99 $added_english = 0;
100 $set_office_start_language = 0;
101 $solarjavaset = 0;
103 $destdir = "";
104 $rootpath = "";
106 $required_dotnet_version = "2.0.0.0";
107 $productextension = "";
108 @languageproducts = ();
109 $build = "";
110 $minor = "";
111 $lastminor = "";
112 $compiler = "";
113 $pro = 0;
114 $dounzip = 1;
115 $languages_defined_in_productlist = 0;
116 $setupscript_defined_in_productlist = 0;
117 $services_rdb_created = 0;
118 $servicesrdb_can_be_created = 0;
119 $islinux = 0;
120 $issolaris = 0;
121 $ismacosx = 0;
122 $iswindowsbuild = 0;
123 $islinuxbuild = 0;
124 $islinuxrpmbuild = 0;
125 $islinuxdebbuild = 0;
126 $islinuxintelrpmbuild = 0;
127 $islinuxppcrpmbuild = 0;
128 $islinuxinteldebbuild = 0;
129 $islinuxppcdebbuild = 0;
130 $islinuxx86_64rpmbuild = 0;
131 $islinuxx86_64debbuild = 0;
132 $issolarisbuild = 0;
133 $issolarispkgbuild = 0;
134 $issolarissparcbuild = 0;
135 $issolarisx86build = 0;
136 $isfreebsdpkgbuild = 0;
137 $ismacdmgbuild = 0;
138 $unpackpath = "";
139 $idttemplatepath = "";
140 $idtlanguagepath = "";
141 $packjobref = "";
142 $buildid = "Not set";
143 $guidcounter = 1000; # for uniqueness of guids
144 $fontsfolder = "FontsFolder";
145 $fontsfoldername = "Fonts";
146 $fontsdirparent = "";
147 $fontsdirname = "";
148 $fontsdirhostname = "truetype";
149 $officefolder = "OfficeFolder";
150 $officemenufolder = "OfficeMenuFolder";
151 $startupfolder = "StartupFolder";
152 $startmenufolder = "StartMenuFolder";
153 $desktopfolder = "DesktopFolder";
154 $programfilesfolder = "ProgramFilesFolder";
155 $commonfilesfolder = "CommonFilesFolder";
156 $commonappdatafolder = "CommonAppDataFolder";
157 $localappdatafolder = "LocalAppDataFolder";
158 $templatefolder = "TemplateFolder";
159 $templatefoldername = "Templates";
160 $programmenufolder = "ProgramMenuFolder";
161 $systemfolder = "SystemFolder";
162 $encodinglistname = "msi-encodinglist.txt";
163 $msiencoding = ""; # hash reference for msi encodings
164 $msilanguage = ""; # hash reference for msi languages LCID
165 $sofficeiconadded = 0;
166 $temppath = "";
167 $globaltempdirname = "ooopackaging";
168 $cyg_temppath = "";
169 $temppathdefined = 0;
170 $jdstemppathdefined = 0;
171 $packageversion = 1;
172 $packagerevision = 1;
173 $rpm = "";
174 $rpmcommand = "";
175 $rpmquerycommand = "";
176 $debian = "";
177 $installertypedir = "";
178 $controlledmakecabversion = "5";
179 $saved_packages_path = "";
180 $max_lang_length = 50;
181 $globalblock = "Globals";
182 $rootmodulegid = "";
183 %alllangmodules = ();
184 $englishlicenseset = 0;
185 $englishlicense = "";
186 $englishsolarislicensename = "LICENSE_en-US";
187 $solarisdontcompress = 0;
188 $patharray = "";
190 $is_special_epm = 0;
191 $epm_in_path = 0;
192 $epm_path = "";
193 $epmoutpath = "";
194 $upx_in_path = 0;
195 $upxfile = "";
196 $simple = 0;
197 $simpledefaultuserdir = "\$ORIGIN/..";
198 $call_epm = 1;
199 $packageformat = "";
200 $packagename = "";
201 $packagelist = "";
202 $addpackagelist = "";
203 $is_unix_multi = 0;
204 $unixmultipath = "";
205 $unixmultipath_orig = "";
206 $alllanguagesinproductarrayref = "";
207 $shiptestdirectory = "";
208 $makelinuxlinkrpm = 0;
209 $linuxlinkrpmprocess = 0;
210 $add_required_package = "";
211 $linuxrespin = 0;
212 @linuxpatchfiles = ();
213 $linuxlibrarybaselevel = "1";
214 $linuxlibrarypatchlevel = "1.1";
215 @linuxlinks = ();
216 @linkrpms = ();
217 $archiveformat = "";
218 $minorupgradekey = "";
219 $updatelastsequence = 0;
220 $updatesequencecounter = 0;
221 $updatedatabase = 0;
222 $updatedatabasepath = "";
223 $pfffileexists = 0;
224 $pffcabfilename = "ooobasis3.0_pff.cab";
225 $mergemodulenumber = 0;
226 %allmergemodulefilesequences = ();
227 %newupdatefiles = ();
228 %allusedupdatesequences = ();
229 %mergemodulefiles = ();
230 $mergefiles_added_into_collector = 0;
231 $creating_windows_installer_patch = 0;
233 $strip = 1;
234 $solarjava = 0;
235 $jdklib = "";
236 $jrepath = "";
238 $globallogging = 0;
239 $globalloggingform21 = 1;
240 $logfilename = "logfile.log"; # the default logfile name for global errors
241 @logfileinfo = ();
242 @errorlogfileinfo = ();
243 @globallogfileinfo = ();
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;
253 $debug = 0;
254 $debugfilename = "debug.txt";
255 $checksumfilename = "checksum.txt";
256 @functioncalls = ();
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 $sundirname = "Sun";
269 $codefilename = "codes.txt";
270 $componentfilename = "components.txt";
271 $productcode = "";
272 $upgradecode = "";
273 $msiproductversion = "";
274 $msimajorproductversion = "";
275 $created_new_component_guid = 0;
276 @allddffiles = ();
277 $infodirectory = "";
278 @currentcontent = ();
279 @installsetcontent = ();
280 %xpdpackageinfo = ();
281 $signfiles_checked = 0;
282 $dosign = 0;
283 $pwfile = "";
284 $pwfile = "";
285 $pfxfile = "";
287 %mergemodules = ();
288 %merge_media_line = ();
289 %merge_allfeature_hash = ();
290 %merge_alldirectory_hash = ();
291 %copy_msm_files = ();
292 $mergefeaturecollected = 0;
293 $mergedirectoriescollected = 0;
294 $lastsequence_before_merge = 0;
295 $lastcabfilename = "";
297 $createdxpddefaultlang = 0;
298 $xpddir = "";
299 $productxpdfile = "setup.xpd";
300 $xpd_files_prepared = 0;
301 $defaultlanguage = "";
302 # @emptyxpdparents = ();
303 @createdxpdfiles = ();
304 @allxpdfiles = ();
305 $isxpdplatform = 0;
306 $javalanguagepath = "";
307 $javasettozero = 0;
308 $addlicensefile = 1;
309 $addsystemintegration = 0;
310 $addjavainstaller = 0;
311 $added_directories = 0;
312 $makedownload = 1;
313 $makejds = 1;
314 $jdsexcludefilename = "";
315 $jds_language_controlled = 0;
316 $correct_jds_language = 0;
317 @installsetfiles = ();
318 @binarytableonlyfiles = ();
319 @allscpactions = ();
320 $languagepackaddon = "LanguagePack";
321 $patchaddon = "Patch";
322 $ooodownloadfilename = "";
323 $downloadfilename = "";
324 $downloadfileextension = "";
325 $followmeinfofilename = "";
326 $oooversionstring = "";
327 $shellnewfilesadded = 0;
328 %multilingual_only_modules = ();
329 %application_modules = ();
330 $defaultinstallorder = 1000;
331 $defaultsystemintinstallorder = 1200;
333 $is_copy_only_project = 0;
334 $is_simple_packager_project = 0;
335 $patch_user_dir = 0;
336 $addchildprojects = 0;
337 $languagepack = 0;
338 $tab = 0;
339 $patch = 0;
340 $patchincludepath = "";
341 $refresh_includepathes = 0;
342 $include_pathes_read = 0;
343 $patchfilelistname = "patchfilelist.txt";
344 @patchfilecollector = ();
345 $nopatchfilecollector = "";
346 @userregistrycollector = ();
347 $addeduserregitrykeys = 0;
348 $poolpathset = 0;
349 $poolpath = 0;
350 $poollockfilename = "";
351 $poolcheckfilename = "";
352 %poolshiftedpackages = ();
353 %poolpackages = ();
354 %createpackages = ();
355 $processhaspoolcheckfile = 0;
356 $processhaspoollockfile = 0;
357 $newpcfcontentcalculated = 0;
358 $sessionid = 0;
359 $sessionidset = 0;
360 $savelockfilecontent = "";
361 $savelockfilename = "";
362 $getuidpath = "";
363 $getuidpathset = 0;
364 $newpcfcontent = "";
365 %pcfdifflist = ();
366 @pcfdiffcomment = ();
367 @epmdifflist = ();
368 $desktoplinkexists = 0;
369 $sundirexists = 0;
370 $analyze_spellcheckerlanguage = 0;
371 %spellcheckerlanguagehash = ();
372 %spellcheckerfilehash = ();
373 $registryrootcomponent = "";
375 $officeinstalldirectory = "";
376 $officeinstalldirectoryset = 0;
377 $basisinstalldirectory = "";
378 $basisinstalldirectoryset = 0;
379 $ureinstalldirectory = "";
380 $ureinstalldirectoryset = 0;
381 $rootbrandpackage = "";
382 $rootbrandpackageset = 0;
383 $officedirhostname = "";
384 $basisdirhostname = "";
385 $uredirhostname = "";
386 $sundirhostname = "";
387 $officedirgid = "";
388 $basisdirgid = "";
389 $uredirgid = "";
390 $sundirgid = "";
392 %sign_extensions = ("dll" => "1", "exe" => "1", "cab" => "1");
393 %treestyles = ("UREDIRECTORY" => "INSTALLURE", "BASISDIRECTORY" => "INSTALLBASIS", "OFFICEDIRECTORY" => "INSTALLOFFICE");
394 %installlocations = ("INSTALLLOCATION" => "1", "BASISINSTALLLOCATION" => "1", "OFFICEINSTALLLOCATION" => "1", "UREINSTALLLOCATION" => "1");
395 %treelayername = ("UREDIRECTORY" => "URE", "BASISDIRECTORY" => "BASIS", "OFFICEDIRECTORY" => "BRAND");
396 %hostnametreestyles = ();
397 %treeconditions = ();
398 %usedtreeconditions = ();
399 %moduledestination = ();
401 $unomaxservices = 1800; # regcomp -c argument length
402 $javamaxservices = 15;
404 $one_cab_file = 0;
405 $fix_number_of_cab_files = 1;
406 $cab_file_per_component = 0;
407 $cabfilecompressionlevel = 2;
408 $number_of_cabfiles = 1; # only for $fix_number_of_cab_files = 1
409 $include_cab_in_msi = 0;
410 $use_packages_for_cabs = 0;
411 $msidatabasename = "";
412 $prepare_winpatch = 0;
413 $previous_idt_dir = "";
414 $updatepack = 0;
415 $msitranpath = "";
416 $insert_file_at_end = 0;
417 $newfilesexist = 0;
418 $usesharepointpath = 0;
419 %newfilescollector = ();
421 $saveinstalldir = "";
422 $csp_installdir = ""; # global installdir of createsimplepackage() in simplepackage.pm
423 $csp_installlogdir = ""; # global installlogdir of createsimplepackage() in simplepackage.pm
424 $csp_languagestring = ""; # global languagestring of createsimplepackage() in simplepackage.pm
425 $localunpackdir = "";
426 $localinstalldirset = 0;
427 $localinstalldir = "";
429 $javafilename = "";
430 $javafilename2 = "";
431 $javafilename3 = "";
432 $javafile = "";
433 $urefile = "";
435 $postprocess_specialepm = 0;
436 $postprocess_standardepm = 0;
437 $mergemodules_analyzed = 0;
439 $starttime = "";
441 @solarispatchscripts = ("checkinstall", "copyright", "patch_checkinstall", "patch_postinstall", "postinstall", "preinstall", "i.none");
442 @solarispatchscriptsforextensions = ("checkinstall", "copyright", "patch_checkinstall", "patch_postinstall_extensions", "postinstall_extensions", "preinstall", "i.none");
443 @solarispatchfiles = (".diPatch", "patchinfo");
444 @environmentvariables = ( "SOLARVERSION", "GUI", "WORK_STAMP", "OUTPATH", "LOCAL_OUT", "LOCAL_COMMON_OUT" );
445 @packagelistitems = ("module", "solarispackagename", "packagename", "copyright", "vendor", "description" );
446 @regcompjars = ( "unoil.jar", "java_uno.jar", "ridl.jar", "jurt.jar", "juh.jar", "xmerge.jar", "commonwizards.jar" );
447 @regcompregisterlibs = ( "javavm.uno", "javaloader.uno", "stocservices.uno" );
448 @languagepackfeature =();
449 @featurecollector =();
450 $msiassemblyfiles = "";
451 $nsisfilename = "Nsis";
452 $macinstallfilename = "macinstall.ulf";
453 $nsis204 = 0;
454 $nsis231 = 0;
455 $unicodensis = 0;
456 $linuxlinkrpms = "";
457 $extensioninstalldir = "gid_Dir_Share_Extension_Install";
458 @languagenames = ();
459 @requiredpackages = ();
460 %componentcondition = ();
461 %componentid = ();
462 %comparecomponentname = ();
463 %languageproperties = ();
464 %allcabinets = ();
465 %allcabinetassigns = ();
466 %cabfilecounter = ();
467 %lastsequence = ();
468 %dontdeletecomponents = ();
469 %allcalculated_guids = ();
470 %calculated_component_guids = ();
471 %base_independent_components = ();
472 %all_english_languagestrings = ();
473 %all_required_english_languagestrings = ();
475 @forced_properties = ("SERVICETAG_PRODUCTNAME", "SERVICETAG_PRODUCTVERSION", "SERVICETAG_PARENTNAME", "SERVICETAG_SOURCE", "SERVICETAG_URN");
477 @removedirs = ();
478 @jdsremovedirs = ();
479 @emptypackages = ();
480 %fontpackageexists = ();
482 $exithandler = undef;
484 $plat = $^O;
486 if ( $plat =~ /cygwin/i )
488 $zippath = "zip"; # Has to be in the path: /usr/bin/zip
489 $checksumfile = "so_checksum";
490 $unopkgfile = "unopkg.exe";
491 $separator = "/";
492 $pathseparator = "\:";
493 $libextension = "\.dll";
494 $quote = "\'";
495 $isunix = 0;
496 $iswin = 1;
497 $archiveformat = ".zip";
498 %savedmapping = ();
499 %savedrevmapping = ();
500 %savedrev83mapping = ();
501 %saved83dirmapping = ();
503 else
505 $zippath = "zip"; # Has to be in the path: /usr/bin/zip
506 $checksumfile = "so_checksum";
507 $unopkgfile = "unopkg";
508 $separator = "/";
509 $pathseparator = "\:";
510 if ( $plat =~ /darwin/i )
512 $libextension = "\.dylib";
513 $archiveformat = ".dmg";
515 else
517 $libextension = "\.so";
518 $archiveformat = ".tar.gz";
520 $quote = "\'";
521 $isunix = 1;
522 $iswin = 0;
524 # WRAPCMD is gone - remove this and all related
525 # $installer::globals::wrapcmd entries
526 $wrapcmd = "";
528 if ( $plat =~ /linux/i ) { $islinux = 1; }
529 if ( $plat =~ /solaris/i ) { $issolaris = 1; }
530 if ( $plat =~ /darwin/i ) { $ismacosx = 1; }
532 # ToDo: Needs to be expanded for additional platforms