make_installer.pl (1ba1fd99) make_installer.pl (9f91b7e3)
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

--- 72 unchanged lines hidden (view full) ---

81use installer::windows::registry;
82use installer::windows::selfreg;
83use installer::windows::shortcut;
84use installer::windows::strip;
85use installer::windows::upgrade;
86use installer::worker;
87use installer::xpdinstaller;
88use installer::ziplist;
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

--- 72 unchanged lines hidden (view full) ---

81use installer::windows::registry;
82use installer::windows::selfreg;
83use installer::windows::shortcut;
84use installer::windows::strip;
85use installer::windows::upgrade;
86use installer::worker;
87use installer::xpdinstaller;
88use installer::ziplist;
89
89use installer::patch::InstallationSet;
90use installer::patch::Msi;
90use strict;
91
91use strict;
92
93
92sub GetSetupScriptLines ($$$)
93{
94 my ($allsettingsarrayref, $allvariableshashref, $includepatharrayref) = @_;
95
96 if ($installer::globals::setupscript_defined_in_productlist)
97 {
98 installer::setupscript::set_setupscript_name($allsettingsarrayref, $includepatharrayref);
99 }

--- 105 unchanged lines hidden (view full) ---

205
206 $installer::logger::Info->print( "... creating idt files ...\n" );
207
208 installer::logger::include_header_into_logfile("Creating idt files:");
209
210 my $newidtdir = $idtdirbase . $installer::globals::separator . "00"; # new files into language independent directory "00"
211 installer::systemactions::create_directory($newidtdir);
212
94sub GetSetupScriptLines ($$$)
95{
96 my ($allsettingsarrayref, $allvariableshashref, $includepatharrayref) = @_;
97
98 if ($installer::globals::setupscript_defined_in_productlist)
99 {
100 installer::setupscript::set_setupscript_name($allsettingsarrayref, $includepatharrayref);
101 }

--- 105 unchanged lines hidden (view full) ---

207
208 $installer::logger::Info->print( "... creating idt files ...\n" );
209
210 installer::logger::include_header_into_logfile("Creating idt files:");
211
212 my $newidtdir = $idtdirbase . $installer::globals::separator . "00"; # new files into language independent directory "00"
213 installer::systemactions::create_directory($newidtdir);
214
213 my @allfilecomponents = ();
214 my @allregistrycomponents = ();
215
216 # Collecting all files with flag "BINARYTABLE"
217 my $binarytablefiles = installer::worker::collect_all_items_with_special_flag($filesinproductlanguageresolvedarrayref ,"BINARYTABLE");
218
219 # Removing all files with flag "BINARYTABLE_ONLY"
220 @installer::globals::binarytableonlyfiles = ();
221 $filesinproductlanguageresolvedarrayref = installer::worker::remove_all_items_with_special_flag($filesinproductlanguageresolvedarrayref ,"BINARYTABLE_ONLY");
222
223 # Collecting all profileitems with flag "INIFILETABLE" for table "IniFile"

--- 5 unchanged lines hidden (view full) ---

229
230 # Add cabinet assignments to files
231 installer::windows::file::assign_cab_to_files($filesinproductlanguageresolvedarrayref);
232 installer::windows::file::assign_sequencenumbers_to_files($filesinproductlanguageresolvedarrayref);
233
234 # Collection all available directory trees
235 installer::windows::directory::collectdirectorytrees($directoriesforepmarrayref);
236
215 # Collecting all files with flag "BINARYTABLE"
216 my $binarytablefiles = installer::worker::collect_all_items_with_special_flag($filesinproductlanguageresolvedarrayref ,"BINARYTABLE");
217
218 # Removing all files with flag "BINARYTABLE_ONLY"
219 @installer::globals::binarytableonlyfiles = ();
220 $filesinproductlanguageresolvedarrayref = installer::worker::remove_all_items_with_special_flag($filesinproductlanguageresolvedarrayref ,"BINARYTABLE_ONLY");
221
222 # Collecting all profileitems with flag "INIFILETABLE" for table "IniFile"

--- 5 unchanged lines hidden (view full) ---

228
229 # Add cabinet assignments to files
230 installer::windows::file::assign_cab_to_files($filesinproductlanguageresolvedarrayref);
231 installer::windows::file::assign_sequencenumbers_to_files($filesinproductlanguageresolvedarrayref);
232
233 # Collection all available directory trees
234 installer::windows::directory::collectdirectorytrees($directoriesforepmarrayref);
235
237 $filesinproductlanguageresolvedarrayref = installer::windows::file::create_files_table(
236 $filesinproductlanguageresolvedarrayref = installer::windows::file::filter_files(
238 $filesinproductlanguageresolvedarrayref,
237 $filesinproductlanguageresolvedarrayref,
239 \@allfilecomponents,
240 $newidtdir,
241 $allvariableshashref);
238 $allvariableshashref);
239 installer::windows::file::prepare_file_table_creation(
240 $filesinproductlanguageresolvedarrayref,
241 $directoriesforepmarrayref,
242 $allvariableshashref);
243 my $file_table_data = installer::windows::file::create_file_table_data(
244 $filesinproductlanguageresolvedarrayref,
245 $allvariableshashref);
246 installer::windows::file::create_file_table($file_table_data, $newidtdir);
247 installer::windows::file::create_filehash_table($filesinproductlanguageresolvedarrayref, $newidtdir);
248 my @allfilecomponents = installer::windows::file::collect_components($filesinproductlanguageresolvedarrayref);
242
249
250
251 installer::windows::directory::prepare_directory_table_creation(
252 $directoriesforepmarrayref,
253 $allvariableshashref);
243 installer::windows::directory::create_directory_table(
244 $directoriesforepmarrayref,
245 $newidtdir,
254 installer::windows::directory::create_directory_table(
255 $directoriesforepmarrayref,
256 $newidtdir,
246 $allvariableshashref,
247 $loggingdir);
257 $allvariableshashref);
248
249 # Attention: The table "Registry.idt" contains language specific strings -> parameter: $languagesarrayref !
258
259 # Attention: The table "Registry.idt" contains language specific strings -> parameter: $languagesarrayref !
250 installer::windows::registry::create_registry_table($registryitemsinproductlanguageresolvedarrayref, \@allregistrycomponents, $newidtdir, $languagesarrayref, $allvariableshashref);
251
252 installer::windows::component::create_component_table($filesinproductlanguageresolvedarrayref, $registryitemsinproductlanguageresolvedarrayref, $directoriesforepmarrayref, \@allfilecomponents, \@allregistrycomponents, $newidtdir, $allvariableshashref);
260 my $registry_table_data = installer::windows::registry::prepare_registry_table(
261 $registryitemsinproductlanguageresolvedarrayref,
262 $languagesarrayref,
263 $allvariableshashref);
264 my @allregistrycomponents = installer::windows::registry::collect_registry_components($registry_table_data);
253
265
266 my $target_registry_component_translation = installer::windows::component::prepare_component_table_creation(
267 \@allfilecomponents,
268 \@allregistrycomponents,
269 $allvariableshashref);
270
271 @allregistrycomponents = installer::windows::component::apply_component_translation(
272 $target_registry_component_translation,
273 @allregistrycomponents);
274 installer::windows::registry::translate_component_names(
275 $target_registry_component_translation,
276 $registryitemsinproductlanguageresolvedarrayref,
277 $registry_table_data);
278
279 installer::windows::registry::create_registry_table_32(
280 $newidtdir,
281 $languagesarrayref,
282 $allvariableshashref,
283 $registry_table_data);
284 installer::windows::registry::create_registry_table_64(
285 $newidtdir,
286 $languagesarrayref,
287 $allvariableshashref,
288 $registry_table_data);
289
290 my $component_table_data = installer::windows::component::create_component_table_data (
291 $filesinproductlanguageresolvedarrayref,
292 $registryitemsinproductlanguageresolvedarrayref,
293 $directoriesforepmarrayref,
294 \@allfilecomponents,
295 \@allregistrycomponents,
296 $allvariableshashref);
297 installer::windows::component::create_component_table(
298 $component_table_data,
299 $newidtdir);
300
254 # Attention: The table "Feature.idt" contains language specific strings -> parameter: $languagesarrayref !
255 installer::windows::feature::add_uniquekey($modulesinproductlanguageresolvedarrayref);
301 # Attention: The table "Feature.idt" contains language specific strings -> parameter: $languagesarrayref !
302 installer::windows::feature::add_uniquekey($modulesinproductlanguageresolvedarrayref);
256 $modulesinproductlanguageresolvedarrayref = installer::windows::feature::sort_feature($modulesinproductlanguageresolvedarrayref);
257 installer::windows::feature::create_feature_table($modulesinproductlanguageresolvedarrayref, $newidtdir, $languagesarrayref, $allvariableshashref);
303 $modulesinproductlanguageresolvedarrayref = installer::windows::feature::sort_feature(
304 $modulesinproductlanguageresolvedarrayref);
305
306 installer::windows::feature::create_feature_table(
307 $modulesinproductlanguageresolvedarrayref,
308 $newidtdir,
309 $languagesarrayref,
310 $allvariableshashref);
258
259 installer::windows::featurecomponent::create_featurecomponent_table(
260 $filesinproductlanguageresolvedarrayref,
261 $registryitemsinproductlanguageresolvedarrayref,
262 $newidtdir);
263
264 installer::windows::media::create_media_table(
265 $filesinproductlanguageresolvedarrayref,

--- 211 unchanged lines hidden (view full) ---

477
478 if ( $installer::globals::iswin ) # only possible on a Windows platform
479 {
480 my $msidatabasename = installer::windows::msiglobal::get_msidatabasename($allvariableshashref, $onelanguage);
481 my $msifilename = $languageidtdir . $installer::globals::separator . $msidatabasename;
482
483 $installer::logger::Info->print( "... creating msi database (language $onelanguage) ... \n" );
484
311
312 installer::windows::featurecomponent::create_featurecomponent_table(
313 $filesinproductlanguageresolvedarrayref,
314 $registryitemsinproductlanguageresolvedarrayref,
315 $newidtdir);
316
317 installer::windows::media::create_media_table(
318 $filesinproductlanguageresolvedarrayref,

--- 211 unchanged lines hidden (view full) ---

530
531 if ( $installer::globals::iswin ) # only possible on a Windows platform
532 {
533 my $msidatabasename = installer::windows::msiglobal::get_msidatabasename($allvariableshashref, $onelanguage);
534 my $msifilename = $languageidtdir . $installer::globals::separator . $msidatabasename;
535
536 $installer::logger::Info->print( "... creating msi database (language $onelanguage) ... \n" );
537
485 installer::windows::msiglobal::set_uuid_into_component_table($languageidtdir, $allvariableshashref); # setting new GUID for the components using the tool uuidgen.exe
538 # setting new GUID for the components using the tool uuidgen.exe
539# installer::windows::msiglobal::set_uuid_into_component_table(
540# $languageidtdir,
541# $allvariableshashref);
542
486 installer::windows::msiglobal::prepare_64bit_database($languageidtdir, $allvariableshashref); # making last 64 bit changes
487 installer::windows::msiglobal::create_msi_database($languageidtdir ,$msifilename);
488
489 # validating the database # ToDo
490
491 my $languagefile = installer::files::read_file($installer::globals::idtlanguagepath . $installer::globals::separator . "SIS.mlf");
492 # my $languagefile = installer::files::read_file($installer::globals::idtlanguagepath . $installer::globals::separator . "SIS.ulf");
493

--- 803 unchanged lines hidden (view full) ---

1297 $loggingdir);
1298$installer::logger::Lang->printf("variables:\n");
1299foreach my $key (sort keys %$allvariableshashref)
1300{
1301 $installer::logger::Global->printf(" %s -> %s\n", $key, $allvariableshashref->{$key});
1302}
1303
1304
543 installer::windows::msiglobal::prepare_64bit_database($languageidtdir, $allvariableshashref); # making last 64 bit changes
544 installer::windows::msiglobal::create_msi_database($languageidtdir ,$msifilename);
545
546 # validating the database # ToDo
547
548 my $languagefile = installer::files::read_file($installer::globals::idtlanguagepath . $installer::globals::separator . "SIS.mlf");
549 # my $languagefile = installer::files::read_file($installer::globals::idtlanguagepath . $installer::globals::separator . "SIS.ulf");
550

--- 803 unchanged lines hidden (view full) ---

1354 $loggingdir);
1355$installer::logger::Lang->printf("variables:\n");
1356foreach my $key (sort keys %$allvariableshashref)
1357{
1358 $installer::logger::Global->printf(" %s -> %s\n", $key, $allvariableshashref->{$key});
1359}
1360
1361
1362# When we are building a release (-release option was given on the command line)
1363# then we need additional information.
1364if ($installer::globals::is_release)
1365{
1366 $installer::logger::Info->print("... building a release, checking required values ... \n");
1367 $installer::globals::target_version = $allvariableshashref->{'PRODUCTVERSION'};
1368 $installer::globals::source_version = $allvariableshashref->{'PREVIOUS_VERSION'};
1369 if ( ! defined $installer::globals::source_version)
1370 {
1371 $installer::globals::source_version = installer::patch::ReleasesList::GetPreviousVersion(
1372 $installer::globals::target_version);
1373 }
1374 if ( ! defined $installer::globals::source_version)
1375 {
1376 installer::exiter::exit_program(
1377 "can not detect the previous version number. Please add a 'PREVIOUS_VERSION' variable to openoffice.lst",
1378 "make_installer.pl");
1379 }
1380
1381 # Determine if we are building a new major release, ie if target_version is ?.0.0
1382 $installer::globals::is_major_release
1383 = installer::patch::Version::IsMajorVersion($installer::globals::target_version);
1384
1385 $installer::logger::Info->printf(" building version %s\n", $installer::globals::target_version);
1386 $installer::logger::Info->printf(" which is %sa major version\n",
1387 $installer::globals::is_major_release
1388 ? ""
1389 : "not ");
1390 $installer::logger::Info->printf(" previous version is %s\n", $installer::globals::source_version);
1391}
1392
1393
1305########################################################
1306# Check if this is simple packaging mechanism
1307########################################################
1308
1309installer::simplepackage::check_simple_packager_project($allvariableshashref);
1310
1311####################################################################
1312# setting global variables

--- 279 unchanged lines hidden (view full) ---

1592 $installer::globals::addsystemintegration = 0;
1593 $installer::globals::makejds = 0;
1594 $installer::globals::addlicensefile = 0;
1595
1596 if ( $allvariableshashref->{'OPENSOURCE'} ) { $installer::globals::makedownload = 1; }
1597 else { $installer::globals::makedownload = 0; }
1598 }
1599
1394########################################################
1395# Check if this is simple packaging mechanism
1396########################################################
1397
1398installer::simplepackage::check_simple_packager_project($allvariableshashref);
1399
1400####################################################################
1401# setting global variables

--- 279 unchanged lines hidden (view full) ---

1681 $installer::globals::addsystemintegration = 0;
1682 $installer::globals::makejds = 0;
1683 $installer::globals::addlicensefile = 0;
1684
1685 if ( $allvariableshashref->{'OPENSOURCE'} ) { $installer::globals::makedownload = 1; }
1686 else { $installer::globals::makedownload = 0; }
1687 }
1688
1689 # Set up an MSI object for the source version.
1690 if ($installer::globals::is_release
1691 && $installer::globals::iswindowsbuild)
1692 {
1693 $installer::logger::Info->printf("preparing MSI object for source version %s\n",
1694 $installer::globals::source_version);
1695 my $source_version_string = join(
1696 "",
1697 installer::patch::Version::StringToNumberArray($installer::globals::source_version));
1698 $installer::globals::source_msi = installer::patch::Msi->FindAndCreate(
1699 $installer::globals::source_version,
1700 0,
1701 $$languagestringref,
1702 $installer::globals::product);
1703 }
1704
1600 ############################################################
1601 # Beginning of language specific logging mechanism
1602 # Until now only global logging into default: logfile.txt
1603 ############################################################
1604
1605 installer::logger::copy_globalinfo_into_logfile();
1606 $installer::globals::globalinfo_copied = 1;
1607

--- 530 unchanged lines hidden ---
1705 ############################################################
1706 # Beginning of language specific logging mechanism
1707 # Until now only global logging into default: logfile.txt
1708 ############################################################
1709
1710 installer::logger::copy_globalinfo_into_logfile();
1711 $installer::globals::globalinfo_copied = 1;
1712

--- 530 unchanged lines hidden ---