msiglobal.pm (ba69edf5) msiglobal.pm (77bec208)
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

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

1562
1563
1564
1565
1566=head2 set_global_code_variables ($languagesref, $allvariableshashref)
1567
1568 Determine values for the product code and upgrade code of the target version.
1569
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

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

1562
1563
1564
1565
1566=head2 set_global_code_variables ($languagesref, $allvariableshashref)
1567
1568 Determine values for the product code and upgrade code of the target version.
1569
1570 As perparation for building a Windows patch, certain conditions have to be fullfilled.
1571 - The upgrade code changes from old to new version
1570 As preparation for building a Windows patch, certain conditions have to be fulfilled.
1571 - The upgrade code remains the same
1572 - The product code remains the same
1572 - The product code remains the same
1573 In order to inforce that we have to access information about the source version.
1573 [this is still to be determined. For patches to work we need the same product codes but
1574 the install sets install only when the product codes differ.]
1575 In order to enforce that we have to access information about the source version.
1574
1575 The resulting values are stored as global variables
1576 $installer::globals::productcode
1577 $installer::globals::upgradecode
1578 and as variables in the given hash
1579 $allvariableshashref->{'PRODUCTCODE'}
1580 $allvariableshashref->{'UPGRADECODE'}
1581

--- 43 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 }
1576
1577 The resulting values are stored as global variables
1578 $installer::globals::productcode
1579 $installer::globals::upgradecode
1580 and as variables in the given hash
1581 $allvariableshashref->{'PRODUCTCODE'}
1582 $allvariableshashref->{'UPGRADECODE'}
1583

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

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

--- 163 unchanged lines hidden ---
1658 $installer::globals::productcode = $target_product_code;
1659 $installer::globals::upgradecode = $target_upgrade_code;
1660 $allvariableshashref->{'PRODUCTCODE'} = $target_product_code;
1661 $allvariableshashref->{'UPGRADECODE'} = $target_upgrade_code;
1662
1663 $installer::logger::Lang->printf("target product code is %s\n", $target_product_code);
1664 $installer::logger::Lang->printf("target upgrade code is %s\n", $target_upgrade_code);
1665}

--- 163 unchanged lines hidden ---