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