1 #*************************************************************************
3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
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 ############################################
36 ############################################
40 $prog="make_installer.pl";
88 @items_at_modules = ("Files", "Dirs", "Unixlinks");
89 @asianlanguages = ("ja", "ko", "zh-CN", "zh-TW");
90 @bidilanguages = ("ar", "he");
94 $setupscriptname = "";
96 $shellscriptsfilename = "";
100 $set_office_start_language = 0;
106 $required_dotnet_version = "2.0.0.0";
107 $productextension = "";
108 @languageproducts = ();
115 $languages_defined_in_productlist = 0;
116 $setupscript_defined_in_productlist = 0;
117 $services_rdb_created = 0;
118 $servicesrdb_can_be_created = 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;
133 $issolarispkgbuild = 0;
134 $issolarissparcbuild = 0;
135 $issolarisx86build = 0;
136 $isfreebsdpkgbuild = 0;
139 $idttemplatepath = "";
140 $idtlanguagepath = "";
142 $buildid = "Not set";
143 $guidcounter = 1000; # for uniqueness of guids
144 $fontsfolder = "FontsFolder";
145 $fontsfoldername = "Fonts";
146 $fontsdirparent = "";
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;
167 $globaltempdirname = "ooopackaging";
169 $temppathdefined = 0;
170 $jdstemppathdefined = 0;
172 $packagerevision = 1;
175 $rpmquerycommand = "";
177 $installertypedir = "";
178 $controlledmakecabversion = "5";
179 $saved_packages_path = "";
180 $max_lang_length = 50;
181 $globalblock = "Globals";
183 %alllangmodules = ();
184 $englishlicenseset = 0;
185 $englishlicense = "";
186 $englishsolarislicensename = "LICENSE_en-US";
187 $solarisdontcompress = 0;
197 $simpledefaultuserdir = "\$ORIGIN/..";
202 $addpackagelist = "";
205 $unixmultipath_orig = "";
206 $alllanguagesinproductarrayref = "";
207 $shiptestdirectory = "";
208 $makelinuxlinkrpm = 0;
209 $linuxlinkrpmprocess = 0;
210 $add_required_package = "";
212 @linuxpatchfiles = ();
213 $linuxlibrarybaselevel = "1";
214 $linuxlibrarypatchlevel = "1.1";
218 $minorupgradekey = "";
219 $updatelastsequence = 0;
220 $updatesequencecounter = 0;
222 $updatedatabasepath = "";
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;
239 $globalloggingform21 = 1;
240 $logfilename = "logfile.log"; # the default logfile name for global errors
242 @errorlogfileinfo = ();
243 @globallogfileinfo = ();
245 $globalinfo_copied = 0;
250 $followme_from_directory = 0;
251 $internal_cabinet_signing = 0;
254 $debugfilename = "debug.txt";
255 $checksumfilename = "checksum.txt";
259 @multilanguagemodules = ();
260 $languagemodulesbase = "gid_Module_Root_";
261 %alluniquefilenames = ();
262 %alllcuniquefilenames = ();
263 %uniquefilenamesequence = ();
264 %dependfilenames = ();
265 $isopensourceproduct = 1;
267 $longmanufacturer = "";
269 $codefilename = "codes.txt";
270 $componentfilename = "components.txt";
273 $msiproductversion = "";
274 $msimajorproductversion = "";
275 $created_new_component_guid = 0;
278 @currentcontent = ();
279 @installsetcontent = ();
280 %xpdpackageinfo = ();
281 $signfiles_checked = 0;
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;
299 $productxpdfile = "setup.xpd";
300 $xpd_files_prepared = 0;
301 $defaultlanguage = "";
302 # @emptyxpdparents = ();
303 @createdxpdfiles = ();
306 $javalanguagepath = "";
309 $addsystemintegration = 0;
310 $addjavainstaller = 0;
311 $added_directories = 0;
314 $jdsexcludefilename = "";
315 $jds_language_controlled = 0;
316 $correct_jds_language = 0;
317 @installsetfiles = ();
318 @binarytableonlyfiles = ();
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;
336 $addchildprojects = 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;
350 $poollockfilename = "";
351 $poolcheckfilename = "";
352 %poolshiftedpackages = ();
354 %createpackages = ();
355 $processhaspoolcheckfile = 0;
356 $processhaspoollockfile = 0;
357 $newpcfcontentcalculated = 0;
360 $savelockfilecontent = "";
361 $savelockfilename = "";
366 @pcfdiffcomment = ();
368 $desktoplinkexists = 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 = "";
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;
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 = "";
416 $insert_file_at_end = 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 = "";
435 $postprocess_specialepm = 0;
436 $postprocess_standardepm = 0;
437 $mergemodules_analyzed = 0;
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";
457 $extensioninstalldir = "gid_Dir_Share_Extension_Install";
459 @requiredpackages = ();
460 %componentcondition = ();
462 %comparecomponentname = ();
463 %languageproperties = ();
465 %allcabinetassigns = ();
466 %cabfilecounter = ();
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");
480 %fontpackageexists = ();
482 $exithandler = undef;
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";
492 $pathseparator = "\:";
493 $libextension = "\.dll";
497 $archiveformat = ".zip";
499 %savedrevmapping = ();
500 %savedrev83mapping = ();
501 %saved83dirmapping = ();
505 $zippath = "zip"; # Has to be in the path: /usr/bin/zip
506 $checksumfile = "so_checksum";
507 $unopkgfile = "unopkg";
509 $pathseparator = "\:";
510 if ( $plat =~ /darwin/i )
512 $libextension = "\.dylib";
513 $archiveformat = ".dmg";
517 $libextension = "\.so";
518 $archiveformat = ".tar.gz";
524 # WRAPCMD is gone - remove this and all related
525 # $installer::globals::wrapcmd entries
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