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