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