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