Make installer compression tool configurable
[LibreOffice.git] / solenv / bin / modules / installer / globals.pm
blob11442ef202a8ac33e8aa985ebdd892c1bbe85e39
2 # This file is part of the LibreOffice project.
4 # This Source Code Form is subject to the terms of the Mozilla Public
5 # License, v. 2.0. If a copy of the MPL was not distributed with this
6 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 # This file incorporates work covered by the following license notice:
10 # Licensed to the Apache Software Foundation (ASF) under one or more
11 # contributor license agreements. See the NOTICE file distributed
12 # with this work for additional information regarding copyright
13 # ownership. The ASF licenses this file to you under the Apache
14 # License, Version 2.0 (the "License"); you may not use this file
15 # except in compliance with the License. You may obtain a copy of
16 # the License at http://www.apache.org/licenses/LICENSE-2.0 .
19 package installer::globals;
21 ############################################
22 # Global settings
23 ############################################
25 BEGIN
27 $ziplistname = "";
28 $pathfilename = "";
29 $setupscriptname = "";
30 $product = "";
31 $languagelist = "";
32 $added_english = 0;
33 $set_office_start_language = 0;
35 $destdir = "";
36 $rootpath = "";
38 @languageproducts = ();
39 $build = "";
40 $os = "";
41 $cpuname = "";
42 $com = "";
43 $platformid = "";
44 $pro = 0;
45 $dounzip = 1;
46 $languages_defined_in_productlist = 0;
47 $setupscript_defined_in_productlist = 0;
48 $iswindowsbuild = 0;
49 $iswin64build = 0;
50 $islinuxbuild = 0;
51 $isrpmbuild = 0;
52 $isdebbuild = 0;
53 $issolarisbuild = 0;
54 $issolarispkgbuild = 0;
55 $issolarissparcbuild = 0;
56 $issolarisx86build = 0;
57 $isfreebsdbuild = 0;
58 $isfreebsdpkgbuild = 0;
59 $ismacbuild = 0;
60 $ismacdmgbuild = 0;
61 $unpackpath = "";
62 $workpath = ""; # installation working dir; some helper scripts are
63 # placed here by gbuild
64 $idttemplatepath = "";
65 $idtlanguagepath = "";
66 $buildid = "Not set";
67 $fontsfolder = "FontsFolder";
68 $fontsfoldername = "Fonts";
69 $fontsdirparent = "";
70 $fontsdirname = "";
71 $fontsdirhostname = "truetype";
72 $officemenufolder = "OfficeMenuFolder";
73 $startupfolder = "StartupFolder";
74 $startmenufolder = "StartMenuFolder";
75 $desktopfolder = "DesktopFolder";
76 $programfilesfolder = "ProgramFilesFolder";
77 $commonfilesfolder = "CommonFilesFolder";
78 $commonappdatafolder = "CommonAppDataFolder";
79 $localappdatafolder = "LocalAppDataFolder";
80 $templatefolder = "TemplateFolder";
81 $templatefoldername = "Templates";
82 $programmenufolder = "ProgramMenuFolder";
83 $lcidlistname = $ENV{'SRCDIR'} . "/l10ntools/source/ulfconv/msi-encodinglist.txt";
84 $msilanguage = ""; # hash reference for msi languages LCID
85 $sofficeiconadded = 0;
86 $temppath = "";
87 $cyg_temppath = "";
88 $temppathdefined = 0;
89 $packageversion = 1;
90 $packagerevision = 1;
91 $rpm = "";
92 $rpminfologged = 0;
93 $debian = "";
94 $installertypedir = "";
95 $controlledmakecabversion = "5";
96 $max_lang_length = 50;
97 $globalblock = "Globals";
98 $rootmodulegid = "";
99 %alllangmodules = ();
100 $englishlicenseset = 0;
101 $englishlicense = "";
102 $englishsolarislicensename = "LICENSE"; # _en-US";
103 $solarisdontcompress = 0;
104 $patharray = "";
106 $is_special_epm = 0;
107 $epm_in_path = 0;
108 $epm_path = "";
109 $epmoutpath = "";
110 $simple = 0;
111 $simpledefaultuserdir = "\$ORIGIN/..";
112 $call_epm = 1;
113 $packageformat = "";
114 $packagename = "";
115 $packagelist = "";
116 $shiptestdirectory = "";
117 $archiveformat = "";
118 $updatelastsequence = 0;
119 $updatesequencecounter = 0;
120 $updatedatabase = 0;
121 $updatedatabasepath = "";
122 $pffcabfilename = "ooobasis3.0_pff.cab";
123 %allmergemodulefilesequences = ();
124 %newupdatefiles = ();
125 %allusedupdatesequences = ();
126 %mergemodulefiles = ();
127 $mergefiles_added_into_collector = 0;
128 $creating_windows_installer_patch = 0;
130 $strip = 0;
132 $packertool = "gzip"; # the default package compression tool for *NIX
134 $logfilename = "logfile.log"; # the default logfile name for global errors
135 @logfileinfo = ();
136 @errorlogfileinfo = ();
137 @globallogfileinfo = ();
138 $ignore_error_in_logfile = 0;
139 $exitlog = "";
140 $quiet = 0;
142 $ismultilingual = 0;
143 %alluniquefilenames = ();
144 %alllcuniquefilenames = ();
145 %uniquefilenamesequence = ();
146 %dependfilenames = ();
147 $manufacturer = "";
148 $longmanufacturer = "";
149 $codefilename = "codes.txt";
150 $componentfilename = "components.txt";
151 $productcode = "";
152 $upgradecode = "";
153 $msiproductversion = "";
154 $msimajorproductversion = "";
155 @allddffiles = ();
156 $infodirectory = "";
158 %mergemodules = ();
159 %merge_media_line = ();
160 %merge_allfeature_hash = ();
161 %merge_alldirectory_hash = ();
162 %merge_directory_hash = ();
163 %copy_msm_files = ();
164 $mergefeaturecollected = 0;
165 $mergedirectoriescollected = 0;
166 $lastsequence_before_merge = 0;
167 $lastcabfilename = "";
169 $defaultlanguage = "";
170 $addlicensefile = 1;
171 $addsystemintegration = 0;
172 $makedownload = 1;
173 @binarytableonlyfiles = ();
174 @allscpactions = ();
175 $languagepackaddon = "LanguagePack";
176 $helppackaddon = "HelpPack";
177 $ooodownloadfilename = "";
178 $downloadfilename = "";
179 $downloadfileextension = "";
180 %multilingual_only_modules = ();
181 %application_modules = ();
183 $is_copy_only_project = 0;
184 $is_simple_packager_project = 0;
185 $patch_user_dir = 0;
186 $languagepack = 0;
187 $helppack = 0;
188 $refresh_includepaths = 0;
189 $include_paths_read = 0;
190 @patchfilecollector = ();
191 @userregistrycollector = ();
192 $addeduserregitrykeys = 0;
193 $desktoplinkexists = 0;
194 $analyze_spellcheckerlanguage = 0;
195 %spellcheckerlanguagehash = ();
196 %spellcheckerfilehash = ();
197 $registryrootcomponent = "";
198 %allcomponents = ();
199 %allcomponents_in_this_database = ();
200 %allshortcomponents = ();
201 %allregistrycomponents_ = ();
202 %allregistrycomponents_in_this_database_ = ();
203 %allshortregistrycomponents = ();
205 $installlocationdirectory = "";
206 $installlocationdirectoryset = 0;
207 $vendordirectory = "";
208 $officeinstalldirectory = "";
209 $rootbrandpackage = "";
210 $rootbrandpackageset = 0;
211 $officedirhostname = "";
212 $officedirgid = "";
214 %treestyles = ();
215 %treelayername = ();
216 %hostnametreestyles = ();
217 %treeconditions = ();
218 %usedtreeconditions = ();
219 %moduledestination = ();
221 $fix_number_of_cab_files = 1;
222 $cabfilecompressionlevel = 21; # Using LZX compression, possible values are: 15 | 16 | ... | 21 (best compression)
223 $number_of_cabfiles = 1; # only for $fix_number_of_cab_files = 1
224 $include_cab_in_msi = 1;
225 $msidatabasename = "";
226 $prepare_winpatch = 0;
227 $previous_idt_dir = "";
228 $msitranpath = "";
229 $insert_file_at_end = 0;
230 $newfilesexist = 0;
231 $usesharepointpath = 0;
232 %newfilescollector = ();
234 $saveinstalldir = "";
235 $csp_installdir = ""; # global installdir of createsimplepackage() in simplepackage.pm
236 $csp_installlogdir = ""; # global installlogdir of createsimplepackage() in simplepackage.pm
237 $csp_languagestring = ""; # global languagestring of createsimplepackage() in simplepackage.pm
238 $localunpackdir = "";
239 $localinstalldirset = 0;
240 $localinstalldir = "";
242 $postprocess_specialepm = 0;
243 $postprocess_standardepm = 0;
244 $mergemodules_analyzed = 0;
246 @packagelistitems = ("module", "solarispackagename", "packagename", "copyright", "vendor", "description" );
247 @featurecollector =();
248 $msiassemblyfiles = "";
249 $macinstallfilename = $ENV{'WORKDIR'} . "/CustomTarget/setup_native/mac/macinstall.ulf";
250 $extensioninstalldir = "gid_Dir_Share_Extension_Install";
251 @languagenames = ();
252 %componentcondition = ();
253 %componentid = ();
254 %allcabinets = ();
255 %allcabinetassigns = ();
256 %cabfilecounter = ();
257 %lastsequence = ();
258 %allcalculated_guids = ();
259 %calculated_component_guids = ();
260 %all_english_languagestrings = ();
261 %all_required_english_languagestrings = ();
263 @removedirs = ();
264 @removefiletable = ();
266 if ( $^O =~ /cygwin/i )
268 $zippath = "zip"; # Has to be in the path: /usr/bin/zip
269 $separator = "/";
270 $pathseparator = "\:";
271 $isunix = 0;
272 $iswin = 1;
273 $archiveformat = ".zip";
274 %savedmapping = ();
275 %savedrevmapping = ();
276 %savedrev83mapping = ();
277 %saved83dirmapping = ();
279 else
281 $zippath = "zip"; # Has to be in the path: /usr/bin/zip
282 $separator = "/";
283 $pathseparator = "\:";
284 $archiveformat = ".tar.gz";
285 $isunix = 1;
286 $iswin = 0;