msiglobal.pm (894604a0) msiglobal.pm (e01a4f84)
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

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

1577 $installer::globals::upgradecode
1578 and as variables in the given hash
1579 $allvariableshashref->{'PRODUCTCODE'}
1580 $allvariableshashref->{'UPGRADECODE'}
1581
1582=cut
1583sub set_global_code_variables ($$)
1584{
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

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

1577 $installer::globals::upgradecode
1578 and as variables in the given hash
1579 $allvariableshashref->{'PRODUCTCODE'}
1580 $allvariableshashref->{'UPGRADECODE'}
1581
1582=cut
1583sub set_global_code_variables ($$)
1584{
1585 my ($languagesref, $allvariableshashref) = @_;
1585 my ($languagesref, $allvariableshashref) = @_;
1586
1587 my ($source_product_code, $source_upgrade_code) = get_source_codes($languagesref);
1588 my ($target_product_code, $target_upgrade_code) = (undef, undef);
1589
1590 if (defined $source_product_code && defined $source_upgrade_code)
1591 {
1592 if ($installer::globals::is_major_release)
1593 {

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

1625 else
1626 {
1627 # There is no previous version with which to compare the product code.
1628 # Just create two new uuids.
1629 $target_product_code = "{" . create_guid() . "}";
1630 $target_upgrade_code = "{" . create_guid() . "}";
1631 $installer::logger::Lang->printf("there is no source version => created new guids\n");
1632 }
1586
1587 my ($source_product_code, $source_upgrade_code) = get_source_codes($languagesref);
1588 my ($target_product_code, $target_upgrade_code) = (undef, undef);
1589
1590 if (defined $source_product_code && defined $source_upgrade_code)
1591 {
1592 if ($installer::globals::is_major_release)
1593 {

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

1625 else
1626 {
1627 # There is no previous version with which to compare the product code.
1628 # Just create two new uuids.
1629 $target_product_code = "{" . create_guid() . "}";
1630 $target_upgrade_code = "{" . create_guid() . "}";
1631 $installer::logger::Lang->printf("there is no source version => created new guids\n");
1632 }
1633
1634 $target_upgrade_code = "{7C35B9AB-2CE3-4C18-BE7C-5B97EA089EB3}";
1633
1634 # Keep the upgrade code constant between versions. Read it from the codes.txt file.
1635 # Note that this handles regular installation sets and language packs.
1636 my $onelanguage = ${$languagesref}[0];
1637 $installer::logger::Lang->printf("reading upgrade code for language %s from %s\n",
1638 $onelanguage,
1639 $installer::globals::codefilename);
1640 if (defined $installer::globals::codefilename)
1641 {
1642 my $code_filename = $installer::globals::codefilename;
1643 installer::files::check_file($code_filename);
1644 my $codefile = installer::files::read_file($code_filename);
1645 my $searchstring = "UPGRADECODE";
1646 my $codeblock = installer::windows::idtglobal::get_language_block_from_language_file(
1647 $searchstring,
1648 $codefile);
1649 $target_upgrade_code = installer::windows::idtglobal::get_language_string_from_language_block(
1650 $codeblock,
1651 $onelanguage,
1652 "");
1653 }
1654 # else use the previously generated upgrade code.
1655
1635 $installer::globals::productcode = $target_product_code;
1636 $installer::globals::upgradecode = $target_upgrade_code;
1637 $allvariableshashref->{'PRODUCTCODE'} = $target_product_code;
1656 $installer::globals::productcode = $target_product_code;
1657 $installer::globals::upgradecode = $target_upgrade_code;
1658 $allvariableshashref->{'PRODUCTCODE'} = $target_product_code;
1638 $allvariableshashref->{'UPGRADECODE'} = $target_upgrade_code;
1659 $allvariableshashref->{'UPGRADECODE'} = $target_upgrade_code;
1639
1660
1640 $installer::logger::Lang->printf("target product code is %s\n", $target_product_code);
1641 $installer::logger::Lang->printf("target upgrade code is %s\n", $target_upgrade_code);
1661 $installer::logger::Lang->printf("target product code is %s\n", $target_product_code);
1662 $installer::logger::Lang->printf("target upgrade code is %s\n", $target_upgrade_code);
1642}
1643
1644
1645
1646
1647###############################################################
1648# Setting the product version used in property table and
1649# upgrade table. Saving in global variable $msiproductversion

--- 156 unchanged lines hidden ---
1663}
1664
1665
1666
1667
1668###############################################################
1669# Setting the product version used in property table and
1670# upgrade table. Saving in global variable $msiproductversion

--- 156 unchanged lines hidden ---