Sync with the trunk

git-svn-id: https://svn.apache.org/repos/asf/openoffice/branches/ia2@1541833 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/main/helpcontent2/source/text/sbasic/shared/03020401.xhp b/main/helpcontent2/source/text/sbasic/shared/03020401.xhp
index 93f6ea8..d872401 100644
--- a/main/helpcontent2/source/text/sbasic/shared/03020401.xhp
+++ b/main/helpcontent2/source/text/sbasic/shared/03020401.xhp
@@ -43,7 +43,7 @@
 <paragraph role="paragraph" id="par_id3153126" xml-lang="en-US" l10n="U" oldref="2">Changes the current directory or drive.</paragraph>
 </section>
 <section id="i30692">
-<paragraph role="warning" id="par_id9783013" xml-lang="en-US" l10n="NEW">This runtime statement currently does not work as documented. See <link href="http://www.openoffice.org/issues/show_bug.cgi?id=30692">this issue</link> for more information.</paragraph>
+<paragraph role="warning" id="par_id9783013" xml-lang="en-US" l10n="NEW">This runtime statement currently does not work as documented. See <link href="https://www.openoffice.org/issues/show_bug.cgi?id=30692">this issue</link> for more information.</paragraph>
 </section>
 <paragraph role="heading" id="hd_id3154347" xml-lang="en-US" level="2" l10n="U" oldref="3">Syntax:</paragraph>
 <paragraph role="code" id="par_id3153897" xml-lang="en-US" l10n="U" oldref="4">ChDir Text As String</paragraph>
diff --git a/main/helpcontent2/source/text/sbasic/shared/03131600.xhp b/main/helpcontent2/source/text/sbasic/shared/03131600.xhp
index 2d60efb..cbabef8 100644
--- a/main/helpcontent2/source/text/sbasic/shared/03131600.xhp
+++ b/main/helpcontent2/source/text/sbasic/shared/03131600.xhp
@@ -45,7 +45,7 @@
 </section>
 <paragraph role="heading" id="hd_id3152801" xml-lang="en-US" level="2" l10n="U" oldref="3">Syntax:</paragraph>
 <paragraph role="paragraph" id="par_id3153346" xml-lang="en-US" l10n="U" oldref="4">oService = CreateUnoService( Uno service name )</paragraph>
-<paragraph role="paragraph" id="par_idN1060F" xml-lang="en-US" l10n="NEW">For a list of available services, go to: http://api.openoffice.org/docs/common/ref/com/sun/star/module-ix.html</paragraph>
+<paragraph role="paragraph" id="par_idN1060F" xml-lang="en-US" l10n="NEW">For a list of available services, see the <link href="https://api.openoffice.org/docs/common/ref/com/sun/star/module-ix.html">API reference</link>.</paragraph>
 <paragraph role="heading" id="hd_id3151111" xml-lang="en-US" level="2" l10n="U" oldref="5">Examples:</paragraph>
 <paragraph role="paragraph" id="par_id3154046" xml-lang="en-US" l10n="U" oldref="6">oIntrospection = CreateUnoService( "com.sun.star.beans.Introspection" )</paragraph>
 <bookmark xml-lang="en-US" branch="index" id="bm_id8334604"><bookmark_value>filepicker;API service</bookmark_value>
diff --git a/main/helpcontent2/source/text/sbasic/shared/03132500.xhp b/main/helpcontent2/source/text/sbasic/shared/03132500.xhp
index 5de1b42..de47b3b 100644
--- a/main/helpcontent2/source/text/sbasic/shared/03132500.xhp
+++ b/main/helpcontent2/source/text/sbasic/shared/03132500.xhp
@@ -42,6 +42,6 @@
 <paragraph role="heading" id="par_idN10580" xml-lang="en-US" level="1" l10n="NEW"><link href="text/sbasic/shared/03132500.xhp">GetDefaultContext Function [Runtime]</link></paragraph>
 <paragraph role="paragraph" id="par_idN10590" xml-lang="en-US" l10n="NEW">Returns the default context of the process service factory, if existent, else returns a null reference. </paragraph>
 </section>
-<paragraph role="paragraph" id="par_idN10593" xml-lang="en-US" l10n="NEW">This runtime function returns the default component context to be used, if instantiating services via XmultiServiceFactory. See the <item type="literal">Professional UNO</item> chapter in the <item type="literal">Developer's Guide</item> on <link href="http://api.openoffice.org">api.openoffice.org</link> for more information.</paragraph>
+<paragraph role="paragraph" id="par_idN10593" xml-lang="en-US" l10n="NEW">This runtime function returns the default component context to be used, if instantiating services via XmultiServiceFactory. See the <item type="literal">Professional UNO</item> chapter in the <item type="literal">Developer's Guide</item> on <link href="https://api.openoffice.org">api.openoffice.org</link> for more information.</paragraph>
 </body>
 </helpdocument>
diff --git a/main/helpcontent2/source/text/sbasic/shared/main0601.xhp b/main/helpcontent2/source/text/sbasic/shared/main0601.xhp
index f613911..fddeaef 100644
--- a/main/helpcontent2/source/text/sbasic/shared/main0601.xhp
+++ b/main/helpcontent2/source/text/sbasic/shared/main0601.xhp
@@ -40,8 +40,8 @@
 <bookmark xml-lang="en-US" branch="hid/HID_GLOBAL_FALLBACK" id="bm_id3143284" localize="false"/>
 <paragraph role="heading" id="hd_id3154232" xml-lang="en-US" level="1" l10n="U" oldref="1"><link href="text/sbasic/shared/main0601.xhp" name="$[officename] Basic Help">%PRODUCTNAME Basic Help</link></paragraph>
 <section id="basicalt">
-<paragraph role="paragraph" id="par_id3153894" xml-lang="en-US" l10n="U" oldref="4">%PRODUCTNAME %PRODUCTVERSION provides an Application Programming Interface (API) that allows controlling the $[officename] components with different programming languages by using the $[officename] Software Development Kit (SDK). For more information about the $[officename] API and the Software Development Kit, visit <link href="http://api.openoffice.org/" name="http://api.openoffice.org">http://api.openoffice.org</link></paragraph>
-<paragraph role="paragraph" id="par_id3147226" xml-lang="en-US" l10n="CHG" oldref="10">This help section explains the most common runtime functions of %PRODUCTNAME Basic. For more in-depth information please refer to the <link href="http://wiki.services.openoffice.org/wiki/Documentation/BASIC_Guide">OpenOffice.org BASIC Programming Guide</link> on the OpenOffice.org Wiki.</paragraph>
+<paragraph role="paragraph" id="par_id3153894" xml-lang="en-US" l10n="U" oldref="4">%PRODUCTNAME %PRODUCTVERSION provides an Application Programming Interface (API) that allows controlling the $[officename] components with different programming languages by using the $[officename] Software Development Kit (SDK). For more information about the $[officename] API and the Software Development Kit, visit <link href="https://api.openoffice.org/" name="https://api.openoffice.org">https://api.openoffice.org</link></paragraph>
+<paragraph role="paragraph" id="par_id3147226" xml-lang="en-US" l10n="CHG" oldref="10">This help section explains the most common runtime functions of %PRODUCTNAME Basic. For more in-depth information please refer to the <link href="https://wiki.openoffice.org/wiki/Documentation/BASIC_Guide">OpenOffice.org BASIC Programming Guide</link> on the OpenOffice.org Wiki.</paragraph>
 </section>
 <paragraph role="heading" id="hd_id3146957" xml-lang="en-US" level="3" l10n="U" oldref="9">Working with %PRODUCTNAME Basic</paragraph>
 <embed href="text/sbasic/shared/01000000.xhp#doc_title"/>
diff --git a/main/helpcontent2/source/text/scalc/01/04060100.xhp b/main/helpcontent2/source/text/scalc/01/04060100.xhp
index 5568170..0371ea3 100644
--- a/main/helpcontent2/source/text/scalc/01/04060100.xhp
+++ b/main/helpcontent2/source/text/scalc/01/04060100.xhp
@@ -39,7 +39,7 @@
 <paragraph xml-lang="en-US" id="hd_id3154944" role="heading" level="1" l10n="CHG"
                  oldref="16">Functions by Category</paragraph>
       <paragraph xml-lang="en-US" id="par_id3149378" role="paragraph" l10n="CHG" oldref="2">This section describes the functions of $[officename] Calc. The various functions are divided into categories in the Function Wizard.</paragraph>
-      <paragraph xml-lang="en-US" id="par_id0120200910234570" role="tip" l10n="NEW">You can find detailed explanations, illustrations, and examples of Calc functions in the <link href="http://wiki.services.openoffice.org/wiki/Documentation/How_Tos/Calc:_Functions_listed_by_category">OpenOffice.org Wiki</link>.</paragraph>
+      <paragraph xml-lang="en-US" id="par_id0120200910234570" role="tip" l10n="NEW">You can find detailed explanations, illustrations, and examples of Calc functions in the <link href="https://wiki.openoffice.org/wiki/Documentation/How_Tos/Calc:_Functions_listed_by_category">OpenOffice.org Wiki</link>.</paragraph>
       <paragraph xml-lang="en-US" id="hd_id3146972" role="heading" level="2" l10n="U" oldref="3"><link href="text/scalc/01/04060101.xhp" name="Database">Database</link></paragraph>
       <embed href="text/scalc/01/04060101.xhp#datenbanktext"/>
       <paragraph xml-lang="en-US" id="hd_id3155443" role="heading" level="2" l10n="U" oldref="4"><link href="text/scalc/01/04060102.xhp" name="Date &amp; Time">Date &amp; Time</link></paragraph>
@@ -69,7 +69,7 @@
       <embed href="text/scalc/01/04060111.xhp#addintext"/>
       <paragraph xml-lang="en-US" id="par_id3150715" role="paragraph" l10n="U" oldref="14"><link href="text/scalc/01/04060199.xhp" name="Operators">Operators</link> are also available.</paragraph>
       <section id="relatedtopics">
-         <paragraph xml-lang="en-US" id="par_id0902200809540918" role="paragraph" l10n="NEW"><variable id="drking"><link href="http://wiki.services.openoffice.org/wiki/Documentation/How_Tos/Calc:_Functions_listed_by_category">Calc functions in the OpenOffice.org Wiki</link>
+         <paragraph xml-lang="en-US" id="par_id0902200809540918" role="paragraph" l10n="NEW"><variable id="drking"><link href="https://wiki.openoffice.org/wiki/Documentation/How_Tos/Calc:_Functions_listed_by_category">Calc functions in the OpenOffice.org Wiki</link>
 </variable></paragraph>
       </section>
    </body>
diff --git a/main/helpcontent2/source/text/scalc/01/04060101.xhp b/main/helpcontent2/source/text/scalc/01/04060101.xhp
index 844b6ee..5ac58f5 100644
--- a/main/helpcontent2/source/text/scalc/01/04060101.xhp
+++ b/main/helpcontent2/source/text/scalc/01/04060101.xhp
@@ -495,7 +495,7 @@
       <paragraph xml-lang="en-US" id="par_id3147083" role="paragraph" l10n="U" oldref="87">
 <emph>SearchCriteria</emph> is the cell range containing search criteria. If you write several criteria in one row they are connected by AND. If you write the criteria in different rows they are connected by OR. Empty cells in the search criteria range will be ignored.</paragraph>
       <paragraph xml-lang="en-US" id="par_id3151188" role="paragraph" l10n="U" oldref="188">Choose <switchinline select="sys"><caseinline select="MAC">%PRODUCTNAME - Preferences</caseinline><defaultinline>Tools - Options</defaultinline></switchinline> - <link href="text/shared/optionen/01060500.xhp" name="Spreadsheet - Calculate">%PRODUCTNAME Calc - Calculate</link> to define how $[officename] Calc acts when searching for identical entries.</paragraph>
-      <paragraph xml-lang="en-US" id="par_id3882869" role="paragraph" l10n="NEW">See also the Wiki page about <link href="http://wiki.services.openoffice.org/wiki/Documentation/How_Tos/Conditional_Counting_and_Summation">Conditional Counting and Summation</link>.</paragraph>
+      <paragraph xml-lang="en-US" id="par_id3882869" role="paragraph" l10n="NEW">See also the Wiki page about <link href="https://wiki.openoffice.org/wiki/Documentation/How_Tos/Conditional_Counting_and_Summation">Conditional Counting and Summation</link>.</paragraph>
 <sort order="asc">
 <section id="Section1">
 <bookmark xml-lang="en-US" branch="index" id="bm_id3150882"><bookmark_value>DCOUNT function</bookmark_value>
diff --git a/main/helpcontent2/source/text/scalc/01/04060110.xhp b/main/helpcontent2/source/text/scalc/01/04060110.xhp
index e7d70de..6aa4b1b 100644
--- a/main/helpcontent2/source/text/scalc/01/04060110.xhp
+++ b/main/helpcontent2/source/text/scalc/01/04060110.xhp
@@ -68,7 +68,7 @@
 <bookmark xml-lang="en-US" branch="hid/SC_HID_FUNC_ASC" id="bm_id3187353" localize="false"/>
 <paragraph xml-lang="en-US" id="hd_id7723929" role="heading" level="2" l10n="NEW">ASC</paragraph>
          <paragraph xml-lang="en-US" id="par_id8455153" role="paragraph" l10n="NEW"><ahelp hid=".">The ASC function converts full-width to half-width ASCII and katakana characters. Returns a text string.</ahelp></paragraph>
-         <paragraph xml-lang="en-US" id="par_id9912411" role="paragraph" l10n="NEW">See <link href="http://wiki.services.openoffice.org/mwiki/index.php?title=Calc/Features/JIS_and_ASC_functions">http://wiki.services.openoffice.org/mwiki/index.php?title=Calc/Features/JIS_and_ASC_functions</link> for a conversion table.</paragraph>
+         <paragraph xml-lang="en-US" id="par_id9912411" role="paragraph" l10n="NEW">See <link href="https://wiki.openoffice.org/wiki/Calc/Features/JIS_and_ASC_functions">JIS and ASC Spreadsheet Functions</link> for a conversion table.</paragraph>
          <paragraph xml-lang="en-US" id="hd_id9204992" role="heading" level="3" l10n="NEW">Syntax</paragraph>
          <paragraph xml-lang="en-US" id="par_id1993774" role="code" l10n="NEW">ASC("Text")</paragraph>
          <paragraph xml-lang="en-US" id="par_id2949919" role="paragraph" l10n="NEW">
@@ -300,7 +300,7 @@
 <bookmark xml-lang="en-US" branch="hid/SC_HID_FUNC_JIS" id="bm_id3818475" localize="false"/>
 <paragraph xml-lang="en-US" id="hd_id3666188" role="heading" level="2" l10n="NEW">JIS</paragraph>
          <paragraph xml-lang="en-US" id="par_id964384" role="paragraph" l10n="NEW"><ahelp hid=".">The JIS function converts half-width to full-width ASCII and katakana characters. Returns a text string.</ahelp></paragraph>
-         <paragraph xml-lang="en-US" id="par_id1551561" role="paragraph" l10n="NEW">See <link href="http://wiki.services.openoffice.org/mwiki/index.php?title=Calc/Features/JIS_and_ASC_functions">http://wiki.services.openoffice.org/mwiki/index.php?title=Calc/Features/JIS_and_ASC_functions</link> for a conversion table.</paragraph>
+         <paragraph xml-lang="en-US" id="par_id1551561" role="paragraph" l10n="NEW">See <link href="https://wiki.openoffice.org/wiki/Calc/Features/JIS_and_ASC_functions">JIS and ASC Spreadsheet Functions</link> for a conversion table.</paragraph>
          <paragraph xml-lang="en-US" id="hd_id2212897" role="heading" level="3" l10n="NEW">Syntax</paragraph>
          <paragraph xml-lang="en-US" id="par_id2504654" role="code" l10n="NEW">JIS("Text")</paragraph>
          <paragraph xml-lang="en-US" id="par_id5292519" role="paragraph" l10n="NEW">
diff --git a/main/helpcontent2/source/text/scalc/01/04060111.xhp b/main/helpcontent2/source/text/scalc/01/04060111.xhp
index 7c82123..640330b 100644
--- a/main/helpcontent2/source/text/scalc/01/04060111.xhp
+++ b/main/helpcontent2/source/text/scalc/01/04060111.xhp
@@ -166,7 +166,7 @@
 </section>
 </sort>
 <paragraph role="heading" id="hd_id3157901" xml-lang="en-US" level="2" l10n="U" oldref="72">Add-ins through %PRODUCTNAME API</paragraph>
-<paragraph role="paragraph" id="par_id3149351" xml-lang="en-US" l10n="U" oldref="73">Add-ins can also be implemented through the %PRODUCTNAME <link href="http://api.openoffice.org/">API</link>.</paragraph>
+<paragraph role="paragraph" id="par_id3149351" xml-lang="en-US" l10n="U" oldref="73">Add-ins can also be implemented through the %PRODUCTNAME <link href="https://api.openoffice.org/">API</link>.</paragraph>
 <section id="relatedtopics">
 <embed href="text/scalc/01/04060100.xhp#drking"/>
 </section>
diff --git a/main/helpcontent2/source/text/scalc/01/04060116.xhp b/main/helpcontent2/source/text/scalc/01/04060116.xhp
index 828c726..5a4b6dd 100644
--- a/main/helpcontent2/source/text/scalc/01/04060116.xhp
+++ b/main/helpcontent2/source/text/scalc/01/04060116.xhp
@@ -665,7 +665,7 @@
             <emph>FromUnit</emph> is the unit from which conversion is taking place.</paragraph>
          <paragraph xml-lang="en-US" id="par_id3153790" role="paragraph" l10n="U" oldref="213">
             <emph>ToUnit</emph> is the unit to which conversion is taking place. Both units must be of the same type.</paragraph>
-<paragraph xml-lang="en-US" id="par_id09022809540918" role="paragraph" l10n="NEW"><link href="http://wiki.services.openoffice.org/wiki/Documentation/How_Tos/Calc:_CONVERT_ADD_function">Current list of CONVERT_ADD units in the OpenOffice.org Wiki.</link></paragraph>
+<paragraph xml-lang="en-US" id="par_id09022809540918" role="paragraph" l10n="NEW"><link href="https://wiki.openoffice.org/wiki/Documentation/How_Tos/Calc:_CONVERT_ADD_function">Current list of CONVERT_ADD units in the OpenOffice.org Wiki.</link></paragraph>
          <paragraph xml-lang="en-US" id="hd_id3156270" role="heading" level="3" l10n="U"
                     oldref="214">Examples</paragraph>
          <paragraph xml-lang="en-US" id="par_id3156336" role="paragraph" l10n="U" oldref="215">
diff --git a/main/helpcontent2/source/text/scalc/01/04060182.xhp b/main/helpcontent2/source/text/scalc/01/04060182.xhp
index 0bf5354..216bead 100644
--- a/main/helpcontent2/source/text/scalc/01/04060182.xhp
+++ b/main/helpcontent2/source/text/scalc/01/04060182.xhp
@@ -277,7 +277,7 @@
             <emph>mu</emph> is the known mean of the population.</paragraph>
          <paragraph xml-lang="en-US" id="par_id3154740" role="paragraph" l10n="CHG" oldref="109">
             <emph>Sigma</emph> (optional) is the known standard deviation of the population. If omitted, the standard deviation of the given sample is used.</paragraph>
-	 <paragraph xml-lang="en-US" id="par_id0305200911372999" role="paragraph" l10n="NEW">See also the <link href="http://wiki.services.openoffice.org/wiki/Documentation/How_Tos/Calc:_ZTEST_function">Wiki page</link>.</paragraph>
+	 <paragraph xml-lang="en-US" id="par_id0305200911372999" role="paragraph" l10n="NEW">See also the <link href="https://wiki.openoffice.org/wiki/Documentation/How_Tos/Calc:_ZTEST_function">Wiki page</link>.</paragraph>
       </section>
       <section id="harmean">
 <bookmark xml-lang="en-US" branch="index" id="bm_id3153623"><bookmark_value>HARMEAN function</bookmark_value>
diff --git a/main/helpcontent2/source/text/scalc/01/04060185.xhp b/main/helpcontent2/source/text/scalc/01/04060185.xhp
index f11b084..5e7fbf1 100644
--- a/main/helpcontent2/source/text/scalc/01/04060185.xhp
+++ b/main/helpcontent2/source/text/scalc/01/04060185.xhp
@@ -515,7 +515,7 @@
                     oldref="183">Example</paragraph>
          <paragraph xml-lang="en-US" id="par_id3146077" role="paragraph" l10n="U" oldref="184">
             <item type="input">=WEIBULL(2;1;1;1)</item> returns 0.86.</paragraph>
-         <paragraph xml-lang="en-US" id="par_id0305200911372899" role="paragraph" l10n="NEW">See also the <link href="http://wiki.services.openoffice.org/wiki/Documentation/How_Tos/Calc:_WEIBULL_function">Wiki page</link>.</paragraph>
+         <paragraph xml-lang="en-US" id="par_id0305200911372899" role="paragraph" l10n="NEW">See also the <link href="https://wiki.openoffice.org/wiki/Documentation/How_Tos/Calc:_WEIBULL_function">Wiki page</link>.</paragraph>
       </section>
 </sort>
 <section id="relatedtopics">
diff --git a/main/helpcontent2/source/text/scalc/guide/database_filter.xhp b/main/helpcontent2/source/text/scalc/guide/database_filter.xhp
index 5eb9f86..2f64609 100644
--- a/main/helpcontent2/source/text/scalc/guide/database_filter.xhp
+++ b/main/helpcontent2/source/text/scalc/guide/database_filter.xhp
@@ -90,7 +90,7 @@
          <embed href="text/scalc/guide/database_sort.xhp#database_sort"/>
          <embed href="text/scalc/guide/cellcopy.xhp#cellcopy"/>
          <embed href="text/scalc/guide/specialfilter.xhp#specialfilter"/>
-         <paragraph xml-lang="en-US" id="par_id4525284" role="paragraph" l10n="NEW"><link href="http://wiki.services.openoffice.org/wiki/Documentation/How_Tos/Defining_a_Data_Range">Wiki page about defining a data range</link></paragraph>
+         <paragraph xml-lang="en-US" id="par_id4525284" role="paragraph" l10n="NEW"><link href="https://wiki.openoffice.org/wiki/Documentation/How_Tos/Defining_a_Data_Range">Wiki page about defining a data range</link></paragraph>
       </section>
    </body>
 </helpdocument>
\ No newline at end of file
diff --git a/main/helpcontent2/source/text/scalc/guide/database_sort.xhp b/main/helpcontent2/source/text/scalc/guide/database_sort.xhp
index 054a832..2b906a7 100644
--- a/main/helpcontent2/source/text/scalc/guide/database_sort.xhp
+++ b/main/helpcontent2/source/text/scalc/guide/database_sort.xhp
@@ -58,7 +58,7 @@
       <section id="relatedtopics">
          <embed href="text/scalc/guide/database_define.xhp#database_define"/>
          <embed href="text/scalc/guide/database_filter.xhp#database_filter"/>
-         <paragraph xml-lang="en-US" id="par_id1846980" role="paragraph" l10n="NEW"><link href="http://wiki.services.openoffice.org/wiki/Documentation/How_Tos/Defining_a_Data_Range">Wiki page about defining a data range</link></paragraph>
+         <paragraph xml-lang="en-US" id="par_id1846980" role="paragraph" l10n="NEW"><link href="https://wiki.openoffice.org/wiki/Documentation/How_Tos/Defining_a_Data_Range">Wiki page about defining a data range</link></paragraph>
       </section>
    </body>
 </helpdocument>
\ No newline at end of file
diff --git a/main/helpcontent2/source/text/shared/00/00000021.xhp b/main/helpcontent2/source/text/shared/00/00000021.xhp
index c4f73b8..1ba9af9 100644
--- a/main/helpcontent2/source/text/shared/00/00000021.xhp
+++ b/main/helpcontent2/source/text/shared/00/00000021.xhp
@@ -263,7 +263,7 @@
 <paragraph role="heading" id="hd_id3154299" xml-lang="en-US" level="2" l10n="U" oldref="38">Definition of the XML formats</paragraph>
 <paragraph role="paragraph" id="par_idN10AAD" xml-lang="en-US" l10n="NEW">The schema for the OpenDocument formats can be found on the <link href="http://www.oasis-open.org">www.oasis-open.org</link> web site.</paragraph>
 <paragraph role="paragraph" id="par_id3149561" xml-lang="en-US" l10n="CHG" oldref="39">The DTD (Document Type Description) files for the older formats can be found in the installation folder.<comment>removed path</comment></paragraph>
-<paragraph role="paragraph" id="par_id3152596" xml-lang="en-US" l10n="U" oldref="40">Note that the formats are subject to certain licenses. You can find notes on the licenses at the start of the DTD files. More detailed information can be found on the <link href="http://www.openoffice.org" name="Apache OpenOffice">Apache OpenOffice</link> website.</paragraph>
+<paragraph role="paragraph" id="par_id3152596" xml-lang="en-US" l10n="U" oldref="40">Note that the formats are subject to certain licenses. You can find notes on the licenses at the start of the DTD files. More detailed information can be found on the <link href="https://www.openoffice.org" name="Apache OpenOffice">Apache OpenOffice</link> website.</paragraph>
 <section id="relatedtopics">
 <embed href="text/shared/guide/doc_open.xhp#doc_open"/>
 <embed href="text/shared/guide/doc_save.xhp#doc_save"/>
diff --git a/main/helpcontent2/source/text/shared/01/01160000.xhp b/main/helpcontent2/source/text/shared/01/01160000.xhp
index 9821da3..2515343 100644
--- a/main/helpcontent2/source/text/shared/01/01160000.xhp
+++ b/main/helpcontent2/source/text/shared/01/01160000.xhp
@@ -70,7 +70,7 @@
 <paragraph role="paragraph" id="par_id5421918" xml-lang="en-US" l10n="NEW"><ahelp hid=".">Opens a new window in your default e-mail program with the current document as an attachment. The Microsoft Word file format is used.</ahelp></paragraph>
 </case>
 </switch>
-<embed href="text/shared/01/ref_pdf_send_as.xhp#ref_pdf_send_as"/>
+<paragraph role="heading" id="hd_id9155399" xml-lang="en-US" level="2" l10n="U"><embedvar href="text/shared/01/ref_pdf_send_as.xhp#ref_pdf_send_as"/></paragraph>
 <embed href="text/shared/01/ref_pdf_send_as.xhp#ref_pdf_send_as_text"/>
 <switch select="appl">
 <case select="WRITER"><comment>UFI: removed 2 help ids</comment>
diff --git a/main/helpcontent2/source/text/shared/01/02100001.xhp b/main/helpcontent2/source/text/shared/01/02100001.xhp
index 21d9661..fb99fd0 100644
--- a/main/helpcontent2/source/text/shared/01/02100001.xhp
+++ b/main/helpcontent2/source/text/shared/01/02100001.xhp
@@ -342,8 +342,8 @@
          <embed href="text/swriter/guide/finding.xhp#finding"/>
 </case>
 </switch>
-<paragraph xml-lang="en-US" id="par_id1751457" role="paragraph" l10n="NEW"><link href="http://wiki.services.openoffice.org/wiki/Documentation/How_Tos/Regular_Expressions_in_Writer">Wiki page about regular expressions in Writer</link></paragraph>
-         <paragraph xml-lang="en-US" id="par_id5483870" role="paragraph" l10n="NEW"><link href="http://wiki.services.openoffice.org/wiki/Documentation/How_Tos/Regular_Expressions_in_Calc">Wiki page about regular expressions in Calc</link></paragraph>
+<paragraph xml-lang="en-US" id="par_id1751457" role="paragraph" l10n="NEW"><link href="https://wiki.openoffice.org/wiki/Documentation/How_Tos/Regular_Expressions_in_Writer">Wiki page about regular expressions in Writer</link></paragraph>
+         <paragraph xml-lang="en-US" id="par_id5483870" role="paragraph" l10n="NEW"><link href="https://wiki.openoffice.org/wiki/Documentation/How_Tos/Regular_Expressions_in_Calc">Wiki page about regular expressions in Calc</link></paragraph>
       </section>
    </body>
 </helpdocument>
diff --git a/main/helpcontent2/source/text/shared/01/04060000.xhp b/main/helpcontent2/source/text/shared/01/04060000.xhp
index 36fba7d..2865074 100644
--- a/main/helpcontent2/source/text/shared/01/04060000.xhp
+++ b/main/helpcontent2/source/text/shared/01/04060000.xhp
@@ -43,7 +43,7 @@
 <paragraph role="paragraph" id="par_id3154926" xml-lang="en-US" l10n="U" oldref="2"><variable id="scan"><ahelp hid=".uno:Scan">Inserts a scanned image into your document.</ahelp>
 </variable></paragraph>
 </section>
-<paragraph role="paragraph" id="par_id3153124" xml-lang="en-US" l10n="U" oldref="5">To insert a scanned image, the driver for your scanner must be installed. <switchinline select="sys"><caseinline select="UNIX">Under UNIX systems, install the SANE package found at http://www.mostang.com/sane/. The SANE package must use the same libc as $[officename].
+<paragraph role="paragraph" id="par_id3153124" xml-lang="en-US" l10n="U" oldref="5">To insert a scanned image, the driver for your scanner must be installed. <switchinline select="sys"><caseinline select="UNIX">Under UNIX systems, install the SANE package found at <link href="http://www.sane-project.org/">http://www.sane-project.org/</link>. The SANE package must use the same libc as $[officename].
 </caseinline></switchinline></paragraph>
 <section id="howtoget">
   <embed href="text/shared/00/00000404.xhp#scannen"/>
diff --git a/main/helpcontent2/source/text/shared/01/06020000.xhp b/main/helpcontent2/source/text/shared/01/06020000.xhp
index 27a59ba..b366223 100644
--- a/main/helpcontent2/source/text/shared/01/06020000.xhp
+++ b/main/helpcontent2/source/text/shared/01/06020000.xhp
@@ -67,7 +67,7 @@
 
 <bookmark xml-lang="en-US" branch="hid/svx:MenuButton:RID_SVXDLG_THESAURUS:MB_LANGUAGE" id="bm_id3149763" localize="false"/>
 <paragraph role="heading" id="hd_id3146775" xml-lang="en-US" level="2" l10n="U" oldref="15">Language</paragraph>
-<paragraph role="paragraph" id="par_id3159157" xml-lang="en-US" l10n="U" oldref="16"><ahelp hid=".">Select a language for the thesaurus.</ahelp> You can install languages with a thesaurus library from the <link href="http://extensions.services.openoffice.org/">Extensions</link> web page.</paragraph>
+<paragraph role="paragraph" id="par_id3159157" xml-lang="en-US" l10n="U" oldref="16"><ahelp hid=".">Select a language for the thesaurus.</ahelp> You can install languages with a thesaurus library from the <link href="http://extensions.openoffice.org/">Extensions</link> web page.</paragraph>
 
 </body>
 </helpdocument>
diff --git a/main/helpcontent2/source/text/shared/01/packagemanager.xhp b/main/helpcontent2/source/text/shared/01/packagemanager.xhp
index 484ad59..f29bf2f 100644
--- a/main/helpcontent2/source/text/shared/01/packagemanager.xhp
+++ b/main/helpcontent2/source/text/shared/01/packagemanager.xhp
@@ -73,7 +73,7 @@
 </list><comment>UFI: Extension Guide needed. Until we have that guide, I'll add some more info in this file.</comment>
 <paragraph id="hd_id3895382" role="heading" xml-lang="en-US" level="2">To install an extension</paragraph>
 <paragraph id="par_id9143955" role="paragraph" xml-lang="en-US">An extension is available as a file with the file extension .oxt.</paragraph>
-<paragraph id="par_id7857905" role="paragraph" xml-lang="en-US">You can find a collection of extensions on the Web. Click the "Get more extensions here" link in the Extension Manager to open your Web browser and see the <link href="http://extensions.services.openoffice.org/">http://extensions.services.openoffice.org/</link> page.<comment># i78606</comment></paragraph>
+<paragraph id="par_id7857905" role="paragraph" xml-lang="en-US">You can find a collection of extensions on the Web. Click the "Get more extensions here" link in the Extension Manager to open your Web browser and see the <link href="http://extensions.openoffice.org/">http://extensions.openoffice.org/</link> page.<comment># i78606</comment></paragraph>
 <paragraph id="hd_id5016937" role="heading" xml-lang="en-US" level="3">To install a user extension</paragraph>
 <paragraph id="par_id1856440" role="paragraph" xml-lang="en-US">Do any of the following:</paragraph>
 <list type="ordered">
diff --git a/main/helpcontent2/source/text/shared/05/00000001.xhp b/main/helpcontent2/source/text/shared/05/00000001.xhp
index 8ec6cb2..cc09b66 100644
--- a/main/helpcontent2/source/text/shared/05/00000001.xhp
+++ b/main/helpcontent2/source/text/shared/05/00000001.xhp
@@ -41,24 +41,24 @@
 <paragraph xml-lang="en-US" id="hd_id3146873" role="heading" level="1" l10n="U" oldref="1"><variable id="00000001"><link href="text/shared/05/00000001.xhp" name="Getting Support">Getting Support</link>
 </variable></paragraph>
          <paragraph xml-lang="en-US" id="par_id9173253" role="paragraph" l10n="NEW">Many questions and answers are the same for %PRODUCTNAME software and for the commercial office software.</paragraph>
-         <paragraph xml-lang="en-US" id="par_id3150667" role="paragraph" l10n="CHG" oldref="8">You can find support on the %PRODUCTNAME website at <link href="http://support.openoffice.org">support.openoffice.org</link>.</paragraph>
+         <paragraph xml-lang="en-US" id="par_id3150667" role="paragraph" l10n="CHG" oldref="8">You can find support on the %PRODUCTNAME website at <link href="https://support.openoffice.org">support.openoffice.org</link>.</paragraph>
 
          <paragraph xml-lang="en-US" id="par_id3154230" role="paragraph" l10n="U" oldref="3">For a summary of the current support services refer to the <emph>Readme</emph> file in the <item type="productname">%PRODUCTNAME</item> folder.</paragraph>
 <paragraph xml-lang="en-US" id="hd_id26327" role="heading" level="2" l10n="NEW">Local language support pages</paragraph>
-         <paragraph xml-lang="en-US" id="par_id1318380" role="paragraph" l10n="CHG">The %PRODUCTNAME localization projects offer support pages in local languages. Find an overview of the native language projects at <link href="http://projects.openoffice.org/native-lang.html">projects.openoffice.org/native-lang.html</link>. You can find help and support in English language on the %PRODUCTNAME website at <link href="http://support.openoffice.org">support.openoffice.org</link>.</paragraph>
+         <paragraph xml-lang="en-US" id="par_id1318380" role="paragraph" l10n="CHG">The %PRODUCTNAME localization projects offer support pages in local languages. Find an overview of the native language projects at <link href="https://projects.openoffice.org/native-lang.html">projects.openoffice.org/native-lang.html</link>. You can find help and support in English language on the %PRODUCTNAME website at <link href="https://support.openoffice.org">support.openoffice.org</link>.</paragraph>
          <paragraph xml-lang="en-US" id="hd_id2611386" role="heading" level="2" l10n="NEW">Mailing lists</paragraph>
-         <paragraph xml-lang="en-US" id="par_id3166335" role="paragraph" l10n="NEW">Ask about %PRODUCTNAME, find help by volunteers, and discuss topics on the public mailing lists. You can find many general and specialized mailing lists on the %PRODUCTNAME website at <link href="http://www.openoffice.org/mail_list.html">www.openoffice.org/mail_list.html</link>.</paragraph>
+         <paragraph xml-lang="en-US" id="par_id3166335" role="paragraph" l10n="NEW">Ask about %PRODUCTNAME, find help by volunteers, and discuss topics on the public mailing lists. You can find many general and specialized mailing lists on the %PRODUCTNAME website at <link href="https://www.openoffice.org/mail_list.html">www.openoffice.org/mail_list.html</link>.</paragraph>
          <paragraph xml-lang="en-US" id="hd_id0915200811081722" role="heading" level="2" l10n="NEW">Forum</paragraph>
          <paragraph xml-lang="en-US" id="par_id0915200811081778" role="paragraph" l10n="NEW">You can access web forums to ask and answer questions about %PRODUCTNAME.</paragraph>
          <paragraph xml-lang="en-US" id="hd_id0804200803314150" role="heading" level="2" l10n="NEW">Security</paragraph>
-         <paragraph xml-lang="en-US" id="par_id0804200803314235" role="paragraph" l10n="NEW">In case you are concerned about any security issue with using this software, please refer to the <link href="http://www.openoffice.org/security/index.html">%PRODUCTNAME Security</link> page on our website.</paragraph>
+         <paragraph xml-lang="en-US" id="par_id0804200803314235" role="paragraph" l10n="NEW">In case you are concerned about any security issue with using this software, please refer to the <link href="https://www.openoffice.org/security/index.html">%PRODUCTNAME Security</link> page on our website.</paragraph>
          <paragraph xml-lang="en-US" id="hd_id3168534" role="heading" level="2" l10n="NEW">Downloads</paragraph>
-         <paragraph xml-lang="en-US" id="par_id3028143" role="paragraph" l10n="CHG">You can download the latest version of %PRODUCTNAME at <link href="http://download.openoffice.org/">download.openoffice.org</link>.</paragraph>
+         <paragraph xml-lang="en-US" id="par_id3028143" role="paragraph" l10n="CHG">You can download the latest version of %PRODUCTNAME at <link href="https://download.openoffice.org/">download.openoffice.org</link>.</paragraph>
          <paragraph xml-lang="en-US" id="hd_id2602967" role="heading" level="2" l10n="NEW">Documentation</paragraph>
-         <paragraph xml-lang="en-US" id="par_id3497211" role="paragraph" l10n="NEW">You can download documentation as PDF files, how-tos, and guides from the %PRODUCTNAME website at <link href="http://documentation.openoffice.org">documentation.openoffice.org</link>.</paragraph>
+         <paragraph xml-lang="en-US" id="par_id3497211" role="paragraph" l10n="NEW">You can download documentation as PDF files, how-tos, and guides from the %PRODUCTNAME website at <link href="https://documentation.openoffice.org">documentation.openoffice.org</link>.</paragraph>
          <paragraph xml-lang="en-US" id="hd_id0120200910361765" role="heading" level="2" l10n="NEW">Participate and give back</paragraph>
          <paragraph xml-lang="en-US" id="par_id0120200910361848" role="paragraph" l10n="NEW">If you want to take an active role in the worldwide %PRODUCTNAME community, you are very welcome to give feedback, discuss features, propose enhancements, write your own article in an FAQ, how-to, manual, create a video tutorial, etc.</paragraph>
-         <paragraph xml-lang="en-US" id="par_id0120200910361874" role="paragraph" l10n="NEW">Visit the <link href="http://documentation.openoffice.org/">documentation web site</link> or the <link href="http://wiki.openoffice.org/wiki/Documentation">Wiki starting page</link> and follow the links for contributors.</paragraph>
+         <paragraph xml-lang="en-US" id="par_id0120200910361874" role="paragraph" l10n="NEW">Visit the <link href="https://documentation.openoffice.org/">documentation web site</link> or the <link href="https://wiki.openoffice.org/wiki/Documentation">Wiki starting page</link> and follow the links for contributors.</paragraph>
       </section>
    </body>
 </helpdocument>
\ No newline at end of file
diff --git a/main/helpcontent2/source/text/shared/explorer/database/dabawiz02access.xhp b/main/helpcontent2/source/text/shared/explorer/database/dabawiz02access.xhp
index 4a79d6f..c78cef4 100644
--- a/main/helpcontent2/source/text/shared/explorer/database/dabawiz02access.xhp
+++ b/main/helpcontent2/source/text/shared/explorer/database/dabawiz02access.xhp
@@ -39,7 +39,7 @@
 </bookmark><comment>mw added 2 new index entries</comment><paragraph role="heading" id="par_idN1053D" xml-lang="en-US" level="1" l10n="NEW"><variable id="access"><link href="text/shared/explorer/database/dabawiz02access.xhp">Microsoft Access Connection</link>
 </variable></paragraph>
 <paragraph role="paragraph" id="par_idN10541" xml-lang="en-US" l10n="CHG"><ahelp hid=".">Specifies the settings for importing a database file in Microsoft Access or Access 2007 format.</ahelp></paragraph>
-<paragraph role="paragraph" id="par_id1142772" xml-lang="en-US" l10n="NEW">See also the English Wiki page <link href="http://wiki.services.openoffice.org/wiki/MSA-Base_Faq">http://wiki.services.openoffice.org/wiki/MSA-Base_Faq</link>.</paragraph>
+<paragraph role="paragraph" id="par_id1142772" xml-lang="en-US" l10n="NEW">See also the English Wiki page <link href="https://wiki.openoffice.org/wiki/MSA-Base_Faq">wiki.openoffice.org/wiki/MSA-Base_Faq</link>.</paragraph>
 <bookmark xml-lang="en-US" branch="hid/DBACCESS_HID_PAGE_DBWIZARD_MSACCESS_ET_MSACCESSLOCATION" id="bm_id627155" localize="false"/><paragraph role="heading" id="par_idN10544" xml-lang="en-US" level="2" l10n="NEW">Microsoft Access database file</paragraph>
 <paragraph role="paragraph" id="par_idN10548" xml-lang="en-US" l10n="NEW"><ahelp hid=".">Specifies the path to the database file.</ahelp></paragraph>
 <bookmark xml-lang="en-US" branch="hid/DBACCESS_HID_PAGE_DBWIZARD_MSACCESS_PB_MSACCESSLOCATION" id="bm_id8335215" localize="false"/><paragraph role="heading" id="par_idN1054B" xml-lang="en-US" level="2" l10n="NEW">Browse</paragraph>
diff --git a/main/helpcontent2/source/text/shared/explorer/database/main.xhp b/main/helpcontent2/source/text/shared/explorer/database/main.xhp
index d7de4fe..00a6d51 100644
--- a/main/helpcontent2/source/text/shared/explorer/database/main.xhp
+++ b/main/helpcontent2/source/text/shared/explorer/database/main.xhp
@@ -102,7 +102,7 @@
 <embedvar href="text/shared/explorer/database/toolbars.xhp#toolbars"/>
 </paragraph>
 <embed href="text/shared/04/01020000.xhp#DB_keys"/>
-<paragraph role="paragraph" id="par_id6474806" xml-lang="en-US" l10n="NEW"><link href="http://wiki.services.openoffice.org/wiki/Database">Wiki page about Base</link></paragraph>
+<paragraph role="paragraph" id="par_id6474806" xml-lang="en-US" l10n="NEW"><link href="https://wiki.openoffice.org/wiki/Database">Wiki page about Base</link></paragraph>
 </section>
 </body>
 </helpdocument>
diff --git a/main/helpcontent2/source/text/shared/explorer/database/migrate_macros.xhp b/main/helpcontent2/source/text/shared/explorer/database/migrate_macros.xhp
index 112034c..6ad3404 100644
--- a/main/helpcontent2/source/text/shared/explorer/database/migrate_macros.xhp
+++ b/main/helpcontent2/source/text/shared/explorer/database/migrate_macros.xhp
@@ -56,7 +56,7 @@
       <embed href="text/shared/00/00000001.xhp#finish"/>
       <embed href="text/shared/00/00000001.xhp#abbrechen"/>
       <section id="relatedtopics">
-         <paragraph xml-lang="en-US" id="par_id0112200902353554" role="paragraph" l10n="NEW"><link href="http://wiki.services.openoffice.org/wiki/Macros_in_Database_Documents">An in depth explanation by the developers (Wiki).</link></paragraph>
+         <paragraph xml-lang="en-US" id="par_id0112200902353554" role="paragraph" l10n="NEW"><link href="https://wiki.openoffice.org/wiki/Macros_in_Database_Documents">An in depth explanation by the developers (Wiki).</link></paragraph>
       </section>
    </body>
 </helpdocument>
\ No newline at end of file
diff --git a/main/helpcontent2/source/text/shared/explorer/database/rep_main.xhp b/main/helpcontent2/source/text/shared/explorer/database/rep_main.xhp
index 0e7101c..c2beee7 100644
--- a/main/helpcontent2/source/text/shared/explorer/database/rep_main.xhp
+++ b/main/helpcontent2/source/text/shared/explorer/database/rep_main.xhp
@@ -45,7 +45,7 @@
             <paragraph xml-lang="en-US" id="par_id5284279" role="paragraph" l10n="NEW">Choose Tools - Extension Manager to open the <link href="text/shared/01/packagemanager.xhp">Extension Manager</link>.</paragraph>
          </listitem>
          <listitem>
-            <paragraph xml-lang="en-US" id="par_id4494766" role="paragraph" l10n="CHG">If you see the Report Builder in the Extension Manager list, then you do not need to install the extension. Else click the link "Get more extensions here". This opens your web browser at the address <link href="http://extensions.services.openoffice.org">http://extensions.services.openoffice.org</link> and shows a list of available extensions.</paragraph>
+            <paragraph xml-lang="en-US" id="par_id4494766" role="paragraph" l10n="CHG">If you see the Report Builder in the Extension Manager list, then you do not need to install the extension. Else click the link "Get more extensions here". This opens your web browser at the address <link href="http://extensions.openoffice.org">http://extensions.openoffice.org</link> and shows a list of available extensions.</paragraph>
          </listitem>
          <listitem>
             <paragraph xml-lang="en-US" id="par_id7858516" role="paragraph" l10n="NEW">Find the Report Builder extension. Click at the icon or the "click here" text link. This opens the download page for the extension.</paragraph>
diff --git a/main/helpcontent2/source/text/shared/explorer/database/rep_navigator.xhp b/main/helpcontent2/source/text/shared/explorer/database/rep_navigator.xhp
index 62e75a0..36d663d 100644
--- a/main/helpcontent2/source/text/shared/explorer/database/rep_navigator.xhp
+++ b/main/helpcontent2/source/text/shared/explorer/database/rep_navigator.xhp
@@ -45,7 +45,7 @@
 <paragraph role="heading" id="hd_id2932828" xml-lang="en-US" level="2" l10n="NEW">To enter functions to the report</paragraph>
 <bookmark xml-lang="en-US" branch="hid/.uno:NewFunction" id="bm_id974456" localize="false"/><paragraph role="paragraph" id="par_id5091708" xml-lang="en-US" l10n="NEW"><ahelp hid=".">In the context menu of the Report Navigator, you see the same commands as in the Report Builder view, plus additional commands to create new functions or to delete them.</ahelp></paragraph>
 <paragraph role="paragraph" id="par_id9449446" xml-lang="en-US" l10n="NEW">Functions can be entered using a syntax as specified by the <link href="http://en.wikipedia.org/wiki/OpenFormula">OpenFormula</link> proposal.</paragraph>
-<paragraph role="paragraph" id="par_id4095583" xml-lang="en-US" l10n="NEW">See <link href="http://wiki.services.openoffice.org/wiki/Database">Wiki page about Base</link> for some more help regarding the functions in a report.</paragraph>
+<paragraph role="paragraph" id="par_id4095583" xml-lang="en-US" l10n="NEW">See <link href="https://wiki.openoffice.org/wiki/Database">Wiki page about Base</link> for some more help regarding the functions in a report.</paragraph>
 <paragraph role="heading" id="hd_id311593" xml-lang="en-US" level="3" l10n="NEW">To calculate a sum for each client<comment>copied from a mail by Ocke - did not test</comment></paragraph>
 <list type="ordered">
 <listitem>
diff --git a/main/helpcontent2/source/text/shared/guide/assistive.xhp b/main/helpcontent2/source/text/shared/guide/assistive.xhp
index 2159e47..1db6806 100644
--- a/main/helpcontent2/source/text/shared/guide/assistive.xhp
+++ b/main/helpcontent2/source/text/shared/guide/assistive.xhp
@@ -43,7 +43,7 @@
 <paragraph role="heading" id="hd_id3147399" xml-lang="en-US" level="1" l10n="U" oldref="22"><variable id="assistive"><link href="text/shared/guide/assistive.xhp" name="Assistive Tools in $[officename]">Assistive Tools in $[officename]</link>
 </variable></paragraph>
 <paragraph role="paragraph" id="par_id3143267" xml-lang="en-US" l10n="U" oldref="25">$[officename] supports some assistive technology tools like screen magnification software, screen readers, and on-screen keyboards. Most of these tools communicate with $[officename] by means of the Java(TM) Access Bridge software, that uses the Java Accessibility API, a part of the Java runtime environment.</paragraph>
-<paragraph role="tip" id="par_id8847010" xml-lang="en-US" l10n="NEW">A current list of supported assistive tools can be found on the Apache OpenOffice Wiki at <link href="http://wiki.services.openoffice.org/wiki/Accessibility">http://wiki.services.openoffice.org/wiki/Accessibility</link>.</paragraph>
+<paragraph role="tip" id="par_id8847010" xml-lang="en-US" l10n="NEW">A current list of supported assistive tools can be found on the <link href="https://wiki.openoffice.org/wiki/Accessibility">Apache OpenOffice Wiki</link>.</paragraph>
 <paragraph role="heading" id="hd_id3145345" xml-lang="en-US" level="2" l10n="U" oldref="12">Requirements to use assistive tools in $[officename]</paragraph>
 <list type="unordered">
 <listitem>
diff --git a/main/helpcontent2/source/text/shared/guide/digital_signatures.xhp b/main/helpcontent2/source/text/shared/guide/digital_signatures.xhp
index 4b6e300..bd7442a 100644
--- a/main/helpcontent2/source/text/shared/guide/digital_signatures.xhp
+++ b/main/helpcontent2/source/text/shared/guide/digital_signatures.xhp
@@ -102,7 +102,7 @@
       <paragraph xml-lang="en-US" id="par_id6075624" role="paragraph" l10n="NEW">On Windows operating systems, the Windows features of validating a signature are used. On Solaris and Linux systems, files that are supplied by Thunderbird, Mozilla or Firefox are used. You must ensure that the files that are in use within your system are really the original files that were supplied by the original developers. For malevolent intruders, there are numerous ways to replace original files with other files that they supply.</paragraph>
       <paragraph xml-lang="en-US" id="par_id6819971" role="warning" l10n="NEW">The messages about validation of a signature that you see in %PRODUCTNAME are the messages that the validation files return. The %PRODUCTNAME software has no way to ensure that the messages reflect the true status of any certificate. The %PRODUCTNAME software only displays the messages that other files that are not under control of %PRODUCTNAME report. There is no legal responsibility of %PRODUCTNAME that the displayed messages reflect the true status of a digital signature.</paragraph>
       <section id="relatedtopics">
-         <paragraph xml-lang="en-US" id="par_id3204443" role="paragraph" l10n="NEW"><link href="http://wiki.services.openoffice.org/wiki/How_to_use_digital_Signatures">English Wiki page on digital signatures</link></paragraph>
+         <paragraph xml-lang="en-US" id="par_id3204443" role="paragraph" l10n="NEW"><link href="https://wiki.openoffice.org/wiki/How_to_use_digital_Signatures">English Wiki page on digital signatures</link></paragraph>
          <paragraph xml-lang="en-US" id="par_id486465" role="paragraph" l10n="NEW"><link href="text/shared/guide/digitalsign_send.xhp">Applying digital signatures</link></paragraph>
          <paragraph xml-lang="en-US" id="par_id3448591" role="paragraph" l10n="NEW"><link href="text/shared/guide/digitalsign_receive.xhp">Opening a document using WebDAV over HTTPS</link></paragraph>
       </section>
diff --git a/main/helpcontent2/source/text/shared/guide/digitalsign_receive.xhp b/main/helpcontent2/source/text/shared/guide/digitalsign_receive.xhp
index 59ddde5..0453485 100644
--- a/main/helpcontent2/source/text/shared/guide/digitalsign_receive.xhp
+++ b/main/helpcontent2/source/text/shared/guide/digitalsign_receive.xhp
@@ -90,7 +90,7 @@
   <paragraph xml-lang="en-US" id="par_id3397320" role="paragraph" l10n="NEW"><ahelp hid="." visibility="hidden">If you enable <emph>Remember password till end of session</emph>, your password will be remembered for subsequent WebDAV connections until you exit %PRODUCTNAME.</ahelp></paragraph>
   <section id="relatedtopics">
    
-   <paragraph xml-lang="en-US" id="par_id3204443" role="paragraph" l10n="NEW"><link href="http://wiki.services.openoffice.org/wiki/How_to_use_digital_Signatures">English Wiki page on digital signatures</link></paragraph>
+   <paragraph xml-lang="en-US" id="par_id3204443" role="paragraph" l10n="NEW"><link href="https://wiki.openoffice.org/wiki/How_to_use_digital_Signatures">English Wiki page on digital signatures</link></paragraph>
    <paragraph xml-lang="en-US" id="par_id2182378" role="paragraph" l10n="NEW"><link href="text/shared/guide/digital_signatures.xhp">About digital signatures</link></paragraph>
    
   </section>
diff --git a/main/helpcontent2/source/text/shared/guide/digitalsign_send.xhp b/main/helpcontent2/source/text/shared/guide/digitalsign_send.xhp
index 1f4a8e7..7224bd1 100644
--- a/main/helpcontent2/source/text/shared/guide/digitalsign_send.xhp
+++ b/main/helpcontent2/source/text/shared/guide/digitalsign_send.xhp
@@ -103,7 +103,7 @@
 <!-- removed HID 1311736326 -->
 <paragraph xml-lang="en-US" id="par_id7705618" role="paragraph" l10n="NEW"><ahelp hid="." visibility="hidden">Choose this setting to cancel the connection.</ahelp></paragraph>
       <section id="relatedtopics">
-         <paragraph xml-lang="en-US" id="par_id3204443" role="paragraph" l10n="NEW"><link href="http://wiki.services.openoffice.org/wiki/How_to_use_digital_Signatures">English Wiki page on digital signatures</link></paragraph>
+         <paragraph xml-lang="en-US" id="par_id3204443" role="paragraph" l10n="NEW"><link href="https://wiki.openoffice.org/wiki/How_to_use_digital_Signatures">English Wiki page on digital signatures</link></paragraph>
          <paragraph xml-lang="en-US" id="par_id5166173" role="paragraph" l10n="NEW"><link href="text/shared/guide/digital_signatures.xhp">About digital signatures</link></paragraph>
       </section>
    </body>
diff --git a/main/helpcontent2/source/text/shared/guide/language_select.xhp b/main/helpcontent2/source/text/shared/guide/language_select.xhp
index 1da92b9..084b3b0 100644
--- a/main/helpcontent2/source/text/shared/guide/language_select.xhp
+++ b/main/helpcontent2/source/text/shared/guide/language_select.xhp
@@ -157,7 +157,7 @@
       <paragraph xml-lang="en-US" id="hd_id9999694" role="heading" level="2" l10n="NEW">Adding More UI Languages</paragraph>
       <list type="ordered">
          <listitem>
-            <paragraph xml-lang="en-US" id="par_id2216559" role="paragraph" l10n="NEW">Open your Web browser and enter <link href="http://wiki.services.openoffice.org/wiki/Download_OpenOffice.org_LanguagePacks">http://wiki.services.openoffice.org/wiki/Download_OpenOffice.org_LanguagePacks</link></paragraph>
+            <paragraph xml-lang="en-US" id="par_id2216559" role="paragraph" l10n="NEW">Open your Web browser and enter <link href="https://wiki.openoffice.org/wiki/Download_OpenOffice.org_LanguagePacks">https://wiki.openoffice.org/wiki/Download_OpenOffice.org_LanguagePacks</link></paragraph>
          </listitem>
          <listitem>
             <paragraph xml-lang="en-US" id="par_id7869502" role="paragraph" l10n="CHG">Select and download the correct language pack for your version of %PRODUCTNAME software.</paragraph>
diff --git a/main/helpcontent2/source/text/shared/guide/ms_import_export_limitations.xhp b/main/helpcontent2/source/text/shared/guide/ms_import_export_limitations.xhp
index edf4697..b38d4b1 100644
--- a/main/helpcontent2/source/text/shared/guide/ms_import_export_limitations.xhp
+++ b/main/helpcontent2/source/text/shared/guide/ms_import_export_limitations.xhp
@@ -121,7 +121,7 @@
 <paragraph role="paragraph" id="par_id0811200801491972" xml-lang="en-US" l10n="NEW">In Excel, the formula =A1+A2 returns 2, but the formula =SUM(A1,A2) returns 0.<comment>in SUM(A1&lt;limiter&gt;A2), use the Excel limiter comma , in English and semicolon ; in German</comment></paragraph>
 </listitem>
 </list>
-<paragraph role="note" id="par_id3150439" xml-lang="en-US" l10n="CHG" oldref="30">For a detailed overview about converting documents to and from Microsoft Office format, see the <link href="http://wiki.services.openoffice.org/wiki/Documentation/OOoAuthors_User_Manual/Migration_Guide">Migration Guide</link>.</paragraph>
+<paragraph role="note" id="par_id3150439" xml-lang="en-US" l10n="CHG" oldref="30">For a detailed overview about converting documents to and from Microsoft Office format, see the <link href="https://wiki.openoffice.org/wiki/Documentation/OOoAuthors_User_Manual/Migration_Guide">Migration Guide</link>.</paragraph>
 <paragraph role="heading" id="par_idN10A9F" xml-lang="en-US" level="2" l10n="NEW">Opening Microsoft Office Documents That Are Protected With a Password</paragraph>
 <paragraph role="paragraph" id="par_id8699606" xml-lang="en-US" l10n="NEW">%PRODUCTNAME can open the following Microsoft Office document types that are protected by a password.</paragraph>
 <table id="tbl_id4497512">
diff --git a/main/helpcontent2/source/text/shared/guide/start_parameters.xhp b/main/helpcontent2/source/text/shared/guide/start_parameters.xhp
index 49f8321..096d2e8 100644
--- a/main/helpcontent2/source/text/shared/guide/start_parameters.xhp
+++ b/main/helpcontent2/source/text/shared/guide/start_parameters.xhp
@@ -163,7 +163,7 @@
 </tablecell>
 <tablecell colspan="" rowspan="">
 <paragraph role="tablecontent" id="par_id3154756" xml-lang="en-US" l10n="U" oldref="16">Starts in invisible mode.</paragraph>
-<paragraph role="tablecontent" id="par_id3148914" xml-lang="en-US" l10n="U" oldref="17">Neither the start-up logo nor the initial program window will be visible. However, the $[officename] software can be controlled and documents and dialogs opened via the <link href="http://api.openoffice.org" name="API">API</link>. </paragraph>
+<paragraph role="tablecontent" id="par_id3148914" xml-lang="en-US" l10n="U" oldref="17">Neither the start-up logo nor the initial program window will be visible. However, the $[officename] software can be controlled and documents and dialogs opened via the <link href="https://api.openoffice.org" name="API">API</link>. </paragraph>
 <paragraph role="tablecontent" id="par_id3147341" xml-lang="en-US" l10n="U" oldref="18">When the $[officename] software has been started with this parameter, it can only be ended using the taskmanager (Windows) or the <emph>kill </emph>command (UNIX based systems).</paragraph>
 <paragraph role="tablecontent" id="par_id3150388" xml-lang="en-US" l10n="U" oldref="48">It cannot be used in conjunction with <emph>-quickstart</emph>.</paragraph>
 <paragraph role="tablecontent" id="par_id3145147" xml-lang="en-US" l10n="U" oldref="19">More information is found in the <emph>$[officename] Developer's Guide</emph>.</paragraph>
@@ -299,7 +299,7 @@
 </tablecell>
 <tablecell colspan="" rowspan="">
 <paragraph role="tablecontent" id="par_id3150530" xml-lang="en-US" l10n="U" oldref="57">Starts in "headless mode" which allows using the application without user interface.</paragraph>
-<paragraph role="tablecontent" id="par_id3156353" xml-lang="en-US" l10n="U" oldref="58">This special mode can be used when the application is controlled by external clients via the <link href="http://api.openoffice.org" name="API">API</link>.</paragraph>
+<paragraph role="tablecontent" id="par_id3156353" xml-lang="en-US" l10n="U" oldref="58">This special mode can be used when the application is controlled by external clients via the <link href="https://api.openoffice.org" name="API">API</link>.</paragraph>
 </tablecell>
 </tablerow>
 </table>
diff --git a/main/helpcontent2/source/text/shared/guide/xsltfilter_create.xhp b/main/helpcontent2/source/text/shared/guide/xsltfilter_create.xhp
index 0345831..2e891f9 100644
--- a/main/helpcontent2/source/text/shared/guide/xsltfilter_create.xhp
+++ b/main/helpcontent2/source/text/shared/guide/xsltfilter_create.xhp
@@ -45,7 +45,7 @@
 </variable></paragraph>
   <paragraph xml-lang="en-US" id="par_idN1053D" role="heading" level="2" l10n="NEW">Creating an XML Filter for %PRODUCTNAME</paragraph>
   <paragraph xml-lang="en-US" id="par_idN109A9" role="paragraph" l10n="NEW">When you create an XML filter for %PRODUCTNAME, you need to design an <emph>XSLT stylesheet</emph> that can convert to and from the OpenDocument XML file format.</paragraph>
-  <paragraph xml-lang="en-US" id="par_idN109B0" role="tip" l10n="NEW">For more information about the OpenDocument XML format, go to <link href="http://xml.openoffice.org/">http://xml.openoffice.org/</link>.</paragraph>
+  <paragraph xml-lang="en-US" id="par_idN109B0" role="tip" l10n="NEW">For more information about the OpenDocument XML format, go to <link href="https://xml.openoffice.org/">https://xml.openoffice.org/</link>.</paragraph>
   <paragraph xml-lang="en-US" id="par_idN109C5" role="paragraph" l10n="NEW">If you want, you can include a <emph>template</emph> with your filter to apply %PRODUCTNAME styles to an XML document that you import.</paragraph>
   <paragraph xml-lang="en-US" id="par_idN109CC" role="paragraph" l10n="CHG">You can also include the <emph>Document Type Definition</emph> (DTD) for the external XML format so you can validate the XML format, for example, when you test the filter.</paragraph>
   <paragraph xml-lang="en-US" id="par_idN10531" role="heading" level="2" l10n="NEW">To Create an XML Filter</paragraph>
diff --git a/main/helpcontent2/source/text/shared/main0600.xhp b/main/helpcontent2/source/text/shared/main0600.xhp
index 2659841..407feaf 100644
--- a/main/helpcontent2/source/text/shared/main0600.xhp
+++ b/main/helpcontent2/source/text/shared/main0600.xhp
@@ -45,7 +45,7 @@
 </variable></paragraph>
 <section id="basicalt">
 <paragraph role="warning" id="par_id3151111" xml-lang="en-US" l10n="U" oldref="12">$[officename] provides an Application Programming Interface (API) that enables you to control $[officename] components by using various programming languages. A $[officename] Software Development Kit is available for the programming interface.</paragraph>
-<paragraph role="warning" id="par_id3156346" xml-lang="en-US" l10n="CHG" oldref="15">For more information about $[officename] API reference, please visit http://api.openoffice.org/<comment>removed link; see i75345</comment></paragraph>
+<paragraph role="warning" id="par_id3156346" xml-lang="en-US" l10n="CHG" oldref="15">For more information about $[officename] API reference, please visit <link href="https://api.openoffice.org/">api.openoffice.org</link>.</paragraph>
 <paragraph role="warning" id="par_id3153825" xml-lang="en-US" l10n="U" oldref="13">Macros created with $[officename] Basic based on the old programming interface will no longer be supported by the current version.</paragraph>
 </section>
 <paragraph role="paragraph" id="par_id3149795" xml-lang="en-US" l10n="CHG" oldref="14">For more information on $[officename] Basic, select "$[officename] Basic" in the list box.</paragraph>
diff --git a/main/helpcontent2/source/text/shared/optionen/01010400.xhp b/main/helpcontent2/source/text/shared/optionen/01010400.xhp
index b2ecaa4..765058f 100644
--- a/main/helpcontent2/source/text/shared/optionen/01010400.xhp
+++ b/main/helpcontent2/source/text/shared/optionen/01010400.xhp
@@ -146,8 +146,8 @@
 <paragraph role="paragraph" id="par_id3155098" xml-lang="en-US" l10n="CHG" oldref="18">Specifies that hyphenation will also be carried out in footnotes, headers and footers.</paragraph>
 </section>
 <section id="relatedtopics">
-<paragraph role="paragraph" id="par_id6434522" xml-lang="en-US" l10n="CHG" localize="false"><link href="http://wiki.services.openoffice.org/wiki/Documentation/How_Tos/Adding_More_Languages">Wiki page: Adding more languages</link></paragraph>
-<paragraph role="paragraph" id="par_id3552964" xml-lang="en-US" l10n="CHG" localize="false"><link href="http://wiki.services.openoffice.org/wiki/Documentation/How_Tos/Spellchecking_in_More_Languages">Wiki page: Multiple language spellchecking</link></paragraph>
+<paragraph role="paragraph" id="par_id6434522" xml-lang="en-US" l10n="CHG" localize="false"><link href="https://wiki.openoffice.org/wiki/Documentation/How_Tos/Adding_More_Languages">Wiki page: Adding more languages</link></paragraph>
+<paragraph role="paragraph" id="par_id3552964" xml-lang="en-US" l10n="CHG" localize="false"><link href="https://wiki.openoffice.org/wiki/Documentation/How_Tos/Spellchecking_in_More_Languages">Wiki page: Multiple language spellchecking</link></paragraph>
 </section>
 </body>
 </helpdocument>
diff --git a/main/helpcontent2/source/text/shared/optionen/improvement.xhp b/main/helpcontent2/source/text/shared/optionen/improvement.xhp
index be3b206..15be7e3 100644
--- a/main/helpcontent2/source/text/shared/optionen/improvement.xhp
+++ b/main/helpcontent2/source/text/shared/optionen/improvement.xhp
@@ -46,7 +46,7 @@
       <section id="howtoget">
          <embed href="text/shared/00/00000406.xhp#improvement"/>
       </section>
-      <paragraph xml-lang="en-US" id="par_id0526200903594966" role="paragraph" l10n="NEW">The Improvement Program was initiated by the User Experience project to improve the usability of %PRODUCTNAME. The User Experience project can be found at the Apache OpenOffice website: <link href="http://ux.openoffice.org/">http://ux.openoffice.org/</link>.</paragraph>
+      <paragraph xml-lang="en-US" id="par_id0526200903594966" role="paragraph" l10n="NEW">The Improvement Program was initiated by the User Experience project to improve the usability of %PRODUCTNAME. The User Experience project can be found at the Apache OpenOffice website: <link href="https://ux.openoffice.org/">ux.openoffice.org/</link>.</paragraph>
       <paragraph xml-lang="en-US" id="par_id0526200903594946" role="paragraph" l10n="NEW">The second time you start your new %PRODUCTNAME software, you see a window that gives information about the Improvement Program. </paragraph>
       <paragraph xml-lang="en-US" id="par_id0526200904094345" role="paragraph" l10n="NEW">At this time you can choose to accept or deny your participation.</paragraph>
       <list type="ordered">
diff --git a/main/helpcontent2/source/text/swriter/guide/numbering_lines.xhp b/main/helpcontent2/source/text/swriter/guide/numbering_lines.xhp
index 3aa4850..a754258 100644
--- a/main/helpcontent2/source/text/swriter/guide/numbering_lines.xhp
+++ b/main/helpcontent2/source/text/swriter/guide/numbering_lines.xhp
@@ -130,6 +130,6 @@
       <paragraph xml-lang="en-US" id="par_id3153934" role="paragraph" l10n="U" oldref="5"><link href="text/swriter/01/06180000.xhp" name="Tools - Line Numbering">Tools - Line Numbering</link></paragraph>
       <embed href="text/swriter/guide/using_numbering.xhp#using_numbering"/>
       <paragraph xml-lang="en-US" id="par_id3153960" role="paragraph" l10n="U" oldref="32"><link href="text/swriter/01/05030800.xhp" name="Format - Paragraph - Numbering">Format - Paragraph - Numbering</link></paragraph>
-      <paragraph xml-lang="en-US" id="par_id2212591" role="paragraph" l10n="NEW"><link href="http://wiki.services.openoffice.org/wiki/Documentation/How_Tos/Setting_up_a_Style_for_Numbering_Lines_in_Code_Listings">Wiki page about numbering paragraphs by styles</link></paragraph>
+      <paragraph xml-lang="en-US" id="par_id2212591" role="paragraph" l10n="NEW"><link href="https://wiki.openoffice.org/wiki/Documentation/How_Tos/Setting_up_a_Style_for_Numbering_Lines_in_Code_Listings">Wiki page about numbering paragraphs by styles</link></paragraph>
    </body>
 </helpdocument>
\ No newline at end of file
diff --git a/main/helpcontent2/source/text/swriter/guide/numbering_paras.xhp b/main/helpcontent2/source/text/swriter/guide/numbering_paras.xhp
index d315108..544e2b2 100644
--- a/main/helpcontent2/source/text/swriter/guide/numbering_paras.xhp
+++ b/main/helpcontent2/source/text/swriter/guide/numbering_paras.xhp
@@ -89,6 +89,6 @@
       <embed href="text/shared/guide/numbering_stop.xhp#numbering_stop"/>
       <embed href="text/swriter/guide/captions.xhp#captions"/>
       <embed href="text/swriter/guide/number_sequence.xhp#number_sequence"/>
-      <paragraph xml-lang="en-US" id="par_id6943571" role="paragraph" l10n="NEW"><link href="http://wiki.services.openoffice.org/wiki/Documentation/How_Tos/Setting_up_a_Style_for_Numbering_Lines_in_Code_Listings">Wiki page about numbering paragraphs by styles</link></paragraph>
+      <paragraph xml-lang="en-US" id="par_id6943571" role="paragraph" l10n="NEW"><link href="https://wiki.openoffice.org/wiki/Documentation/How_Tos/Setting_up_a_Style_for_Numbering_Lines_in_Code_Listings">Wiki page about numbering paragraphs by styles</link></paragraph>
    </body>
 </helpdocument>
diff --git a/main/helpcontent2/source/text/swriter/guide/spellcheck_dialog.xhp b/main/helpcontent2/source/text/swriter/guide/spellcheck_dialog.xhp
index ff429b3..97a9d70 100644
--- a/main/helpcontent2/source/text/swriter/guide/spellcheck_dialog.xhp
+++ b/main/helpcontent2/source/text/swriter/guide/spellcheck_dialog.xhp
@@ -40,7 +40,7 @@
                  oldref="37"><variable id="spellcheck_dialog"><link href="text/swriter/guide/spellcheck_dialog.xhp" name="Checking Spelling and Grammar">Checking Spelling and Grammar</link>
 </variable></paragraph>
       <paragraph xml-lang="en-US" id="par_id3149814" role="paragraph" l10n="CHG" oldref="9">You can manually check the spelling and grammar of a text selection or the entire document.</paragraph>
-      <paragraph xml-lang="en-US" id="par_id0525200902184476" role="note" l10n="NEW">To check the spelling and the grammar of a text, the appropriate dictionaries must be installed. For many languages three different dictionaries exist: a spellchecker, a hyphenation dictionary, and a thesaurus. Each dictionary covers one language only. Grammar checkers can be downloaded and installed as extensions. See the <link href="http://extensions.services.openoffice.org/dictionary">extensions web page</link>.</paragraph>
+      <paragraph xml-lang="en-US" id="par_id0525200902184476" role="note" l10n="NEW">To check the spelling and the grammar of a text, the appropriate dictionaries must be installed. For many languages three different dictionaries exist: a spellchecker, a hyphenation dictionary, and a thesaurus. Each dictionary covers one language only. Grammar checkers can be downloaded and installed as extensions. See the <link href="http://extensions.openoffice.org/dictionary">extensions web page</link>.</paragraph>
       <paragraph xml-lang="en-US" id="par_id3149828" role="paragraph" l10n="U" oldref="10">The spellcheck starts at the current cursor position, or at the beginning of the text selection.</paragraph>
       <list type="ordered">
          <listitem>
@@ -66,8 +66,8 @@
          <paragraph xml-lang="en-US" id="par_id3147107" role="paragraph" l10n="U" oldref="49"><link href="text/shared/01/06010000.xhp" name="Spellcheck dialog">Spelling and Grammar dialog</link></paragraph>
          <embed href="text/swriter/guide/using_hyphen.xhp#using_hyphen"/>
          <embed href="text/swriter/guide/using_thesaurus.xhp#using_thesaurus"/>
-         <paragraph xml-lang="en-US" id="par_id9625843" role="paragraph" l10n="NEW"><link href="http://wiki.services.openoffice.org/wiki/Documentation/How_Tos/Adding_More_Languages">Wiki page: Adding more languages</link></paragraph>
-         <paragraph xml-lang="en-US" id="par_id1683706" role="paragraph" l10n="NEW"><link href="http://wiki.services.openoffice.org/wiki/Documentation/How_Tos/Spellchecking_in_More_Languages">Wiki page: Multiple language spellchecking</link></paragraph>
+         <paragraph xml-lang="en-US" id="par_id9625843" role="paragraph" l10n="NEW"><link href="https://wiki.openoffice.org/wiki/Documentation/How_Tos/Adding_More_Languages">Wiki page: Adding more languages</link></paragraph>
+         <paragraph xml-lang="en-US" id="par_id1683706" role="paragraph" l10n="NEW"><link href="https://wiki.openoffice.org/wiki/Documentation/How_Tos/Spellchecking_in_More_Languages">Wiki page: Multiple language spellchecking</link></paragraph>
       </section>
    </body>
 </helpdocument>
\ No newline at end of file
diff --git a/main/helpcontent2/source/text/swriter/guide/using_thesaurus.xhp b/main/helpcontent2/source/text/swriter/guide/using_thesaurus.xhp
index e4208fe..a68e5b6 100644
--- a/main/helpcontent2/source/text/swriter/guide/using_thesaurus.xhp
+++ b/main/helpcontent2/source/text/swriter/guide/using_thesaurus.xhp
@@ -66,7 +66,7 @@
 
 
       <paragraph xml-lang="en-US" id="par_id3156263" role="paragraph" l10n="U" oldref="19">Initially, the thesaurus uses the language of the selected word in the document, if a thesaurus library for that language is installed. The title bar of the Thesaurus dialog displays the language in use.</paragraph>
-      <paragraph xml-lang="en-US" id="par_id3145113" role="note" l10n="U" oldref="18">To look up the word in a different language, click the Language button, and select one of the installed thesaurus languages. A thesaurus library may not be available for all installed languages. You can install languages with a thesaurus library from the <link href="http://extensions.services.openoffice.org/">Extensions</link> web page.</paragraph>
+      <paragraph xml-lang="en-US" id="par_id3145113" role="note" l10n="U" oldref="18">To look up the word in a different language, click the Language button, and select one of the installed thesaurus languages. A thesaurus library may not be available for all installed languages. You can install languages with a thesaurus library from the <link href="http://extensions.openoffice.org/">Extensions</link> web page.</paragraph>
 <paragraph xml-lang="en-US" id="par_id3196263" role="paragraph" l10n="U" oldref="19">If a thesaurus library is installed for the language of a word, the context menu of the word shows a Synonyms submenu. Select any of the terms from the submenu to replace the word.</paragraph>
       <embed href="text/shared/00/00000004.xhp#related"/>
       <embed href="text/swriter/guide/spellcheck_dialog.xhp#spellcheck_dialog"/>
diff --git a/main/instsetoo_native/data/releases.xml b/main/instsetoo_native/data/releases.xml
new file mode 100644
index 0000000..7b8e334
--- /dev/null
+++ b/main/instsetoo_native/data/releases.xml
@@ -0,0 +1,316 @@
+<?xml version='1.0' encoding='UTF-8'?>

+<!--***********************************************************

+ * 

+ * Licensed to the Apache Software Foundation (ASF) under one

+ * or more contributor license agreements.  See the NOTICE file

+ * distributed with this work for additional information

+ * regarding copyright ownership.  The ASF licenses this file

+ * to you under the Apache License, Version 2.0 (the

+ * "License"); you may not use this file except in compliance

+ * with the License.  You may obtain a copy of the License at

+ * 

+ *   http://www.apache.org/licenses/LICENSE-2.0

+ * 

+ * Unless required by applicable law or agreed to in writing,

+ * software distributed under the License is distributed on an

+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY

+ * KIND, either express or implied.  See the License for the

+ * specific language governing permissions and limitations

+ * under the License.

+ * 

+ ***********************************************************-->

+<releases>

+  <release>

+    <version>4.0.0</version>

+    <download>

+      <package-format>msi</package-format>

+      <url-template>

+        http://archive.apache.org/dist/openoffice/4.0.0/binaries/%L/Apache_OpenOffice_4.0.0_Win_x86_install_%L.exe

+      </url-template>

+      <item>

+        <language>ast</language>

+        <checksum type="sha256">415e2f3cf4d99a3f6ad495e33b89c716ef6966c9c4d7df90ad6e004fcf0222f4</checksum>

+        <size>154219869</size>

+      </item>

+      <item>

+        <language>cs</language>

+        <checksum type="sha256">a90a2c00c58f3e30654b89b4a363b099b0a7d1f829ebf9c7c18333d387f4bf41</checksum>

+        <size>130773239</size>

+      </item>

+      <item>

+        <language>de</language>

+        <checksum type="sha256">5569634ac40b42a710c666d0511f6aa4dbcb05d1a525e06f6be038e828c507f0</checksum>

+        <size>162401424</size>

+      </item>

+      <item>

+        <language>el</language>

+        <checksum type="sha256">cc5cde6314cea634200da6861da527c11ca7d74338074cdd4e5a22e1ffd9ef7c</checksum>

+        <size>139633387</size>

+      </item>

+      <item>

+        <language>en-GB</language>

+        <checksum type="sha256">7f83397877b72e7f2da38f11b76c3f46e30b93713b40becba699d21f913847e0</checksum>

+        <size>136201626</size>

+      </item>

+      <item>

+        <language>en-US</language>

+        <checksum type="sha256">8db246183f549c298d731cf61771f8f8adb37028d8ecc737fe1ad452899adb2d</checksum>

+        <size>143436858</size>

+      </item>

+      <item>

+        <language>es</language>

+        <checksum type="sha256">eb991c71b436c4d740f3d2b5441716fc321bb57eb7f36c7019ec86feebb7f5d4</checksum>

+        <size>132424454</size>

+      </item>

+      <item>

+        <language>fi</language>

+        <checksum type="sha256">fa2b9015864651be44afc940988ed20c6093bc8707aea72ab1b75cf147d81ed2</checksum>

+        <size>138474963</size>

+      </item>

+      <item>

+        <language>fr</language>

+        <checksum type="sha256">b4b20eac7f6220a4a6250e79d950a328d08b927b8856d762b0b1e033833e198f</checksum>

+        <size>133397214</size>

+      </item>

+      <item>

+        <language>gd</language>

+        <checksum type="sha256">c2e5ac75f899efab61f039a193a68ec2f4d092fd43c6eb46d8b2d34d8166ce6e</checksum>

+        <size>154472734</size>

+      </item>

+      <item>

+        <language>gl</language>

+        <checksum type="sha256">bac4915fd47b9e219d72a02a268fa590096c0884ebafd966b10e9b77fe16eee0</checksum>

+        <size>137952793</size>

+      </item>

+      <item>

+        <language>hu</language>

+        <checksum type="sha256">2e01d00431692cb6071cf520e71b900dba28a846dccf4ed3a85c245761c98906</checksum>

+        <size>133240224</size>

+      </item>

+      <item>

+        <language>it</language>

+        <checksum type="sha256">8663c01de8f62b26a7864ac4da6abd316a1c2e00b35c60372cad5287120fe409</checksum>

+        <size>138823014</size>

+      </item>

+      <item>

+        <language>ja</language>

+        <checksum type="sha256">559f165ee9ff516a80573befaf7d0936ca81fa89aca655213b4f265eb7c7059a</checksum>

+        <size>136416679</size>

+      </item>

+      <item>

+        <language>ko</language>

+        <checksum type="sha256">daa7f3b51e6ffb0b541a98fbcdc0bad53eea579a7d74c9acbdd73ad660b117b1</checksum>

+        <size>131617051</size>

+      </item>

+      <item>

+        <language>nl</language>

+        <checksum type="sha256">fcc6e55c7a1407be8e8f2faf7305ebb9a8f7e1bea882e5d917b5846a2c0ee955</checksum>

+        <size>138526756</size>

+      </item>

+      <item>

+        <language>pt</language>

+        <checksum type="sha256">58307e0eeb485840e1462a23f8741e793422ccdc468123f85876ae287482a987</checksum>

+        <size>130929247</size>

+      </item>

+      <item>

+        <language>pt-BR</language>

+        <checksum type="sha256">08ef83f28e138dc0bc6bdf761e4676eb13c2b30717ce47e0becec2de90c73f7a</checksum>

+        <size>130814647</size>

+      </item>

+      <item>

+        <language>ru</language>

+        <checksum type="sha256">dda689b273eb9ddadfb156a08df8e73c3b41e3cc8178a16546e282f8e1c54d77</checksum>

+        <size>137558077</size>

+      </item>

+      <item>

+        <language>sk</language>

+        <checksum type="sha256">d2722d2569178838a57705e76062603f995f71d5219e8f910bc7a6b46fa6039a</checksum>

+        <size>131199460</size>

+      </item>

+      <item>

+        <language>sl</language>

+        <checksum type="sha256">eecea1c75833a873a3cc00f81c85f411319b085728224c716ac90159622c0c3e</checksum>

+        <size>132340393</size>

+      </item>

+      <item>

+        <language>ta</language>

+        <checksum type="sha256">4051b4831a960a8f27a3f56f32d7bd5a7bbdfcf859238a149aca9cd69ae0121c</checksum>

+        <size>136961005</size>

+      </item>

+      <item>

+        <language>zh-CN</language>

+        <checksum type="sha256">94424b9c24d3237e70d6452da8366cf9c6617a46fa171901db093b1a1166934d</checksum>

+        <size>131840961</size>

+      </item>

+    </download>

+  </release>

+  <release>

+    <version>4.0.1</version>

+    <download>

+      <package-format>msi</package-format>

+      <url-template>

+        http://archive.apache.org/dist/openoffice/4.0.1/binaries/%L/Apache_OpenOffice_4.0.1_Win_x86_install_%L.exe

+      </url-template>

+      <item>

+	<language>ast</language>

+	<checksum type="sha256">9854b6a99c6e56902e30ec01009e294aafe091e4733e9b8933690ee0365d6754</checksum>

+	<size>154320289</size>

+      </item>

+      <item>

+	<language>cs</language>

+	<checksum type="sha256">b23c5dc07a6e521a7ad24e7c1d131c96ea3a6fdf3a2f96020b5cad2e7ebe0253</checksum>

+	<size>130785256</size>

+      </item>

+      <item>

+	<language>de</language>

+	<checksum type="sha256">fbbe39def767e6ecd16c7b6802f35d6e4b035c4b72328bbf0a8f045cf585aaa7</checksum>

+	<size>163606685</size>

+      </item>

+      <item>

+	<language>el</language>

+	<checksum type="sha256">e59f47b986c4bcd8f21062446b299f68ac7ed941356813b0e2dbd651fb59c847</checksum>

+	<size>139717373</size>

+      </item>

+      <item>

+	<language>en-GB</language>

+	<checksum type="sha256">75f06dbe9f13804ea9f3ef20d831e300a55df1bf1a5b656d2422206a8a0d8bda</checksum>

+	<size>136295104</size>

+      </item>

+      <item>

+	<language>en-US</language>

+	<checksum type="sha256">3b68145a33fa83d246febb3b7551fb0cbf57363bc772401ac0c37cfc1cde21b3</checksum>

+	<size>143485940</size>

+      </item>

+      <item>

+	<language>es</language>

+	<checksum type="sha256">5136276a370378d11327b9a0bd074d269a49e797c7186f2e3cc9cf6c0bbc20fc</checksum>

+	<size>132478227</size>

+      </item>

+      <item>

+	<language>eu</language>

+	<checksum type="sha256">aae1ff61af9ac117637842ccc1c28221620c79b05ffbb1fb47d8a6fcbe3b1700</checksum>

+	<size>131476228</size>

+      </item>

+      <item>

+	<language>fi</language>

+	<checksum type="sha256">65ff3209a51afefde11dd1326921340ebe035f09626d8884f37a0f72f8c2785b</checksum>

+	<size>138523539</size>

+      </item>

+      <item>

+	<language>fr</language>

+	<checksum type="sha256">70c97dc59412a8e4aeb87e51e8714cbba776397beb6a774804591653150e78d5</checksum>

+	<size>134622711</size>

+      </item>

+      <item>

+	<language>gd</language>

+	<checksum type="sha256">a57115a636f4004de2df9599e72bc4d07937b65a6bb99fe126dc18a788a57142</checksum>

+	<size>154574682</size>

+      </item>

+      <item>

+	<language>gl</language>

+	<checksum type="sha256">4c8fe9b42193dc37dc6a2b979b790ea6317ea25a6fa27fcb9007036c5725111d</checksum>

+	<size>138019151</size>

+      </item>

+      <item>

+	<language>hu</language>

+	<checksum type="sha256">97765ef536ed1e3f07220fe4cb90520efdfb376fab751ad2cac7390316f14e65</checksum>

+	<size>133302800</size>

+      </item>

+      <item>

+	<language>it</language>

+	<checksum type="sha256">c6fa3e0e9bef615d804b5d24d3f2cc49f7655aee01ef34cecb9b520a47249d02</checksum>

+	<size>138894766</size>

+      </item>

+      <item>

+	<language>ja</language>

+	<checksum type="sha256">93d20ae5f96f4a93c705894849f01b6501604bf003e9b66f7d0dbdc6f2282965</checksum>

+	<size>136444096</size>

+      </item>

+      <item>

+	<language>km</language>

+	<checksum type="sha256">4fc263c631d4ba797633d28ca529202b600d5fe676a8c215904d12d08ed8cc49</checksum>

+	<size>151866955</size>

+      </item>

+      <item>

+	<language>ko</language>

+	<checksum type="sha256">2abd13afe2978c4300d872a06dcec00ae23592ed563be3d0d046ef81738d7a87</checksum>

+	<size>131671507</size>

+      </item>

+      <item>

+	<language>lt</language>

+	<checksum type="sha256">4ac6c2c88edb5254e0cf93f49daaf5e411ea0168d6c431d11da5d89638977cff</checksum>

+	<size>136935582</size>

+      </item>

+      <item>

+	<language>nl</language>

+	<checksum type="sha256">85292dad5aa80711c126091d3565dc9cd2219d818a59cbd5c7c9a4bc5282ebb8</checksum>

+	<size>139734741</size>

+      </item>

+      <item>

+	<language>pl</language>

+	<checksum type="sha256">c71c63d0c0e76f28b7d3bebb39e1cb9c0ca35e29557c53528f631e6c1aeca04c</checksum>

+	<size>133661993</size>

+      </item>

+      <item>

+	<language>pt-BR</language>

+	<checksum type="sha256">e6baed3d30d4b18e32e21ab4fcd22446ac1f8a40efe49a4f105e9c3fc0ba1611</checksum>

+	<size>130866989</size>

+      </item>

+      <item>

+	<language>pt</language>

+	<checksum type="sha256">dd855dc99fc41fd509e938881397798fa2e9ed92e663cb8b9ea6c356d5d5a096</checksum>

+	<size>130989882</size>

+      </item>

+      <item>

+	<language>ru</language>

+	<checksum type="sha256">7e965822f8dfb0aa4a67bf5bff8ddb852901c672886bb9f2ee275c5c976c0a48</checksum>

+	<size>137584051</size>

+      </item>

+      <item>

+	<language>sk</language>

+	<checksum type="sha256">4400eb30ca5072b175da7963049bb0ecca761af73b7dbccb9a0b4cd789b26042</checksum>

+	<size>131265676</size>

+      </item>

+      <item>

+	<language>sl</language>

+	<checksum type="sha256">83d384d9e50ddcb9c1d74069d8796e5f37bed55b5da6f43c326c0784a6e61cef</checksum>

+	<size>132368586</size>

+      </item>

+      <item>

+	<language>sr</language>

+	<checksum type="sha256">a2d2e043c1c3fa9a90924ae29138641b238d7749984f873a8672e2844a55e3d9</checksum>

+	<size>136961170</size>

+      </item>

+      <item>

+	<language>sv</language>

+	<checksum type="sha256">15cbdb4f5a7ecf253f31981d0203c08e279a26603ca737e64f740524e1d672ca</checksum>

+	<size>131330363</size>

+      </item>

+      <item>

+	<language>ta</language>

+	<checksum type="sha256">352083d6d2fc6c39027a03fbbb6449d4a67955b370c5a8efba0407b74a456bc9</checksum>

+	<size>137001517</size>

+      </item>

+      <item>

+	<language>tr</language>

+	<checksum type="sha256">bdfbf83cc905bf44f086ea51295899a042667fa6334e6378ef5b5b354843ba37</checksum>

+	<size>130397087</size>

+      </item>

+      <item>

+	<language>vi</language>

+	<checksum type="sha256">0483c20036f47738ae86a19d0ab4e66eff8d8f5226f716970a4ec7f56a78bff6</checksum>

+	<size>131526617</size>

+      </item>

+      <item>

+	<language>zh-CN</language>

+	<checksum type="sha256">f2966f3c251cf31a24d7931950838c04e410935dd15a6fdd9241acf81bc5e784</checksum>

+	<size>131863915</size>

+      </item>

+      <item>

+	<language>zh-TW</language>

+	<checksum type="sha256">a194cfb2dc2cbcae2e89740485ebfcbf605b7c80a5bbdffb699e447c53698e53</checksum>

+	<size>131990994</size>

+      </item>

+    </download>

+  </release>

+</releases>
\ No newline at end of file
diff --git a/main/instsetoo_native/util/openoffice.lst b/main/instsetoo_native/util/openoffice.lst
index 82ac49b..3b0bb5d 100644
--- a/main/instsetoo_native/util/openoffice.lst
+++ b/main/instsetoo_native/util/openoffice.lst
@@ -27,9 +27,7 @@
             NATIVEPROGRESS false
             REGISTRYLAYERNAME Layers
             SERVICEPACK 1
-            UPDATE_DATABASE 1
             CREATE_MSP_INSTALLSET 0
-            UPDATE_DATABASE_LISTNAME finals_instsetoo.txt
             PACKAGEMAP package_names.txt,package_names_ext.txt
             WINDOWSPATCHLEVEL 8
             OOOVENDOR Apache Software Foundation
diff --git a/main/libxmlsec/makefile.mk b/main/libxmlsec/makefile.mk
index 0645884..0bcf476 100644
--- a/main/libxmlsec/makefile.mk
+++ b/main/libxmlsec/makefile.mk
@@ -95,9 +95,9 @@
 .ENDIF
 CONFIGURE_DIR=
 CONFIGURE_ACTION=.$/configure
-CONFIGURE_FLAGS=--with-libxslt=no --with-openssl=no --with-gnutls=no --with-mozilla_ver=1.7.5 --enable-mscrypto --disable-crypto-dl --build=i586-pc-mingw32 --host=i586-pc-mingw32 CC="$(xmlsec_CC)" LDFLAGS="-no-undefined -L$(ILIB:s/;/ -L/)" LIBS="$(xmlsec_LIBS)" LIBXML2LIB=$(LIBXML2LIB) ZLIB3RDLIB=$(ZLIB3RDLIB) OBJDUMP="$(WRAPCMD) objdump"
+CONFIGURE_FLAGS=--with-libxslt=no --with-openssl=no --with-gnutls=no --enable-mscrypto --disable-crypto-dl --build=i586-pc-mingw32 --host=i586-pc-mingw32 CC="$(xmlsec_CC)" LDFLAGS="-no-undefined -L$(ILIB:s/;/ -L/)" LIBS="$(xmlsec_LIBS)" LIBXML2LIB=$(LIBXML2LIB) ZLIB3RDLIB=$(ZLIB3RDLIB) OBJDUMP="$(WRAPCMD) objdump"
 
-.IF "$(SYSTEM_MOZILLA)" != "YES"
+.IF "$(SYSTEM_NSS)" != "YES"
 CONFIGURE_FLAGS+=--enable-pkgconfig=no
 .ENDIF
 BUILD_ACTION=$(GNUMAKE) -j$(EXTMAXPROCESS)
@@ -148,7 +148,7 @@
 CONFIGURE_DIR=
 CONFIGURE_ACTION=.$/configure ADDCFLAGS="$(xmlsec_CFLAGS)" CPPFLAGS="$(xmlsec_CPPFLAGS)"
 CONFIGURE_FLAGS=--with-pic --disable-shared --disable-crypto-dl --with-libxslt=no --with-openssl=no --with-gnutls=no LIBXML2LIB="$(LIBXML2LIB)"
-# system-mozilla needs pkgconfig to get the information about nss
+# system-nss needs pkgconfig to get the information about nss
 # FIXME: This also will enable pkg-config usage for libxml2. It *seems*
 # that the internal headers still are used when they are there but....
 # (and that pkg-config is allowed to fail...)
@@ -157,7 +157,7 @@
 # --with-nss or parse -pkg-config --libs / cflags mozilla-nss since
 # the lib may a) be in /usr/lib (Debian) and be not in $with_nss/include
 # $with_nss/lib.
-.IF "$(SYSTEM_MOZILLA)" != "YES"
+.IF "$(SYSTEM_NSS)" != "YES"
 CONFIGURE_FLAGS+=--enable-pkgconfig=no
 .ENDIF
 BUILD_ACTION=$(GNUMAKE) -j$(EXTMAXPROCESS)
diff --git a/main/nss/makefile.mk b/main/nss/makefile.mk
index d3cdc27..e02cdba 100644
--- a/main/nss/makefile.mk
+++ b/main/nss/makefile.mk
@@ -88,7 +88,7 @@
 BUILD_ACTION= $(GNUMAKE) nss_build_all
 #See #i105566# && moz#513024#
 .IF "$(OS)"=="LINUX"
-BUILD_ACTION+=FREEBL_NO_DEPEND=1
+BUILD_ACTION+=FREEBL_NO_DEPEND=1 FREEBL_LOWHASH=1
 PATCH_FILES+=nss_linux.patch
 .ENDIF
 
diff --git a/main/scp2/source/ooo/mergemodules_ooo.scp b/main/scp2/source/ooo/mergemodules_ooo.scp
deleted file mode 100644
index ffa7abe..0000000
--- a/main/scp2/source/ooo/mergemodules_ooo.scp
+++ /dev/null
@@ -1,52 +0,0 @@
-/**************************************************************
- * 
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- * 
- *   http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- * 
- *************************************************************/
-
-
-
-#include "macros.inc"
-
-#ifdef M1500
-MergeModule gid_Mergemodule_Microsoft_Vc90_Crt_X86
-#ifdef _STLP_DEBUG
-	Name = "Microsoft_VC90_DebugCRT_x86.msm";
-#else
-	Name = "Microsoft_VC90_CRT_x86.msm";
-#endif
-	Cabfilename = "openoffice.org-vc90crt.cab";
-	Feature = "gm_Root";
-	RootDir = "TARGETDIR";
-	Styles = (REMOVE_FILE_TABLE);
-End
-#endif
-
-#ifdef M1500
-MergeModule gid_Mergemodule_Policy_Microsoft_Vc90_Crt_X86
-#ifdef _STLP_DEBUG
-	Name = "policy_9_0_Microsoft_VC90_DebugCRT_x86.msm";
-#else
-	Name = "policy_9_0_Microsoft_VC90_CRT_x86.msm";
-#endif
-	Cabfilename = "openoffice.org-policy-vc90crt.cab";
-	Feature = "gm_Root";
-	RootDir = "TARGETDIR";
-	Styles = (REMOVE_FILE_TABLE);
-End
-#endif
diff --git a/main/scp2/source/ooo/ure.scp b/main/scp2/source/ooo/ure.scp
index 5545ab8..c5f9b9d 100644
--- a/main/scp2/source/ooo/ure.scp
+++ b/main/scp2/source/ooo/ure.scp
@@ -66,7 +66,6 @@
 //    Dir = gid_Dir_Ure_Bin;
     Name = EXENAME(uno);
     Styles = (PACKED, VERSION_INDEPENDENT_COMP_ID);
-    // CompID = "C66A9E2B-B16D-46A9-B9EC-772D9D3837F5";
 End
 #endif
 
@@ -91,7 +90,6 @@
 //    Dir = gid_Dir_Ure_Bin;
     Name = EXENAME(regcomp);
     Styles = (PACKED, VERSION_INDEPENDENT_COMP_ID);
-    // CompID = "D51FA672-7C24-4E24-A282-872C4BF690A1";
 End
 #endif
 
@@ -119,7 +117,6 @@
 //    Dir = gid_Dir_Ure_Bin;
     Name = EXENAME(regmerge);
     Styles = (PACKED, VERSION_INDEPENDENT_COMP_ID);
-    // CompID = "881BCC1D-BA4A-4527-9C7D-D89157C2D03B";
 End
 
 File gid_File_Exe_Regview
@@ -132,7 +129,6 @@
 //    Dir = gid_Dir_Ure_Bin;
     Name = EXENAME(regview);
     Styles = (PACKED, VERSION_INDEPENDENT_COMP_ID);
-    // CompID = "DAB09DCD-8491-4DC8-B153-2BA81A830AC2";
 End
 
 #if !defined MACOSX && !defined WNT && defined SOLAR_JAVA && !defined OS2
@@ -142,7 +138,6 @@
 //    Dir = gid_Dir_Ure_Bin;
     Name = EXENAME(javaldx);
     Styles = (PACKED, VERSION_INDEPENDENT_COMP_ID);
-    // CompID = "291B5981-3E41-40E2-9C3F-115A7DF1C6A1";
 End
 #endif
 
@@ -159,7 +154,6 @@
 //    Dir = gid_Dir_Ure_Bin;
     Name = "/ure/startup.sh";
     Styles = (PACKED, VERSION_INDEPENDENT_COMP_ID);
-    // CompID = "C86E816A-4EAE-47E9-BD1F-3E23C80F4EAE";
 End
 #endif
 
@@ -174,7 +168,6 @@
 //    Dir = gid_Dir_Ure_Bin;
     Name = "uno.bin";
     Styles = (PACKED, VERSION_INDEPENDENT_COMP_ID);
-    // CompID = "4AE33B3E-B33E-4BA4-AADC-8D7ED303FDE9";
 End
 #endif
 
@@ -189,7 +182,6 @@
 //    Dir = gid_Dir_Ure_Bin;
     Name = "regcomp.bin";
     Styles = (PACKED, VERSION_INDEPENDENT_COMP_ID);
-    // CompID = "70FBE546-A228-455F-BCBB-716BF03AD5C6";
 End
 #endif
 
@@ -200,7 +192,6 @@
     Dir = SCP2_URE_DL_DIR;
     Name = SCP2_URE_DL_UNO_VER("cppu", "3");
     Styles = (PACKED, VERSION_INDEPENDENT_COMP_ID);
-    // CompID = "36C01AC6-BB0A-4181-A8B8-50B793ADEDB7";
 End
 
 File gid_File_Dl_Cppuhelper
@@ -212,7 +203,6 @@
     Name = SCP2_URE_DL_UNO_COMID_VER("cppuhelper", "3");
 #endif
     Styles = (PACKED, VERSION_INDEPENDENT_COMP_ID);
-    // CompID = "D2A191E6-2023-41F5-9032-B98C50C37964";
 End
 
 File gid_File_Dl_PurpEnvHelper
@@ -224,7 +214,6 @@
     Name = SCP2_URE_DL_UNO_COMID_VER("purpenvhelper", "3");
 #endif
     Styles = (PACKED, VERSION_INDEPENDENT_COMP_ID);
-    // CompID = "C80146A8-A14C-44D1-AB9F-D9D8BF22277E";
 End
 
 File gid_File_Dl_Sal
@@ -232,7 +221,6 @@
     Dir = SCP2_URE_DL_DIR;
     Name = SCP2_URE_DL_UNO_VER("sal", "3");
     Styles = (PACKED, VERSION_INDEPENDENT_COMP_ID);
-    // CompID = "B1EF3AB6-611E-4027-958A-736583EB82E6";
 End
 
 File gid_File_Dl_Salhelper
@@ -244,25 +232,15 @@
     Name = SCP2_URE_DL_UNO_COMID_VER("salhelper", "3");
 #endif
     Styles = (PACKED, VERSION_INDEPENDENT_COMP_ID);
-    // CompID = "879B80E0-F6E1-4931-8EE6-7CF867CB6AA5";
 End
 
 // Private Dynamic Libraries:
 
-//File gid_File_Dl_Profile_Uno
-//    TXT_FILE_BODY;
-//    Dir = SCP2_URE_DL_DIR;
-//    Name = PROFILENAME(/ure/uno);
-//    Styles = (PACKED, VERSION_INDEPENDENT_COMP_ID);
-//    // CompID = "4681F5C1-8F64-486F-B804-03B4D8CEB41F";
-//End
-
 File gid_File_Dl_Reg
     TXT_FILE_BODY;
     Dir = SCP2_URE_DL_DIR;
     Name = SCP2_URE_DL_VER("reg", "3");
     Styles = (PACKED, VERSION_INDEPENDENT_COMP_ID);
-    // CompID = "D5313B1F-D09F-401F-B180-891F70D489ED";
 End
 
 File gid_File_Dl_Store
@@ -270,7 +248,6 @@
     Dir = SCP2_URE_DL_DIR;
     Name = SCP2_URE_DL_VER("store", "3");
     Styles = (PACKED, VERSION_INDEPENDENT_COMP_ID);
-    // CompID = "A5477BD7-89A3-44AF-8B42-9E28D55C8066";
 End
 
 File gid_File_Dl_Xmlreader
@@ -293,7 +270,6 @@
     Name = SCP2_URE_DL_COMID_VER("jvmaccess", "3");
 #endif
     Styles = (PACKED, VERSION_INDEPENDENT_COMP_ID);
-    // CompID = "F3D6F794-DA6F-4522-B3A7-C15593C1A577";
 End
 
 File gid_File_Dl_Jvmfwk
@@ -301,7 +277,6 @@
     Dir = SCP2_URE_DL_DIR;
     Name = SCP2_URE_DL_VER("jvmfwk", "3");
     Styles = (PACKED, VERSION_INDEPENDENT_COMP_ID);
-    // CompID = "4E128F82-FA30-4077-88DC-F745C3330093";
 End
 
 #if defined SOLAR_JAVA
@@ -314,7 +289,6 @@
     Name = SCP2_URE_DL_BARE("sunjavaplugin");
 #endif
     Styles = (PACKED, VERSION_INDEPENDENT_COMP_ID);
-    // CompID = "0AC6C688-876C-40C5-B24E-9257003FDC3E";
 End
 #endif
 
@@ -324,7 +298,6 @@
     Dir = SCP2_URE_DL_DIR;
     Name = "JREProperties.class";
     Styles = (PACKED, VERSION_INDEPENDENT_COMP_ID);
-    // CompID = "0C4B8DCF-18D1-47D9-8BB7-A5C1D9268016";
 End
 #endif
 
@@ -333,7 +306,6 @@
     Dir = SCP2_URE_DL_DIR;
     Name = PROFILENAME(/ure/jvmfwk3);
     Styles = (PACKED, VERSION_INDEPENDENT_COMP_ID);
-    // CompID = "1124A984-F905-47DC-ACEF-EDEC037F9B38";
 End
 
 File gid_File_Dl_ComnameUno
@@ -341,7 +313,6 @@
     Dir = SCP2_URE_DL_DIR;
     Name = SCP2_URE_DL_NORMAL(STRING(COMNAME) "_uno");
     Styles = (PACKED, VERSION_INDEPENDENT_COMP_ID);
-    // CompID = "3FAFBDCB-96FE-4D9E-B655-CA86FE674711";
 End
 
 #if defined SOLAR_JAVA
@@ -350,7 +321,6 @@
     Dir = SCP2_URE_DL_DIR;
     Name = SCP2_URE_DL_NORMAL("java_uno");
     Styles = (PACKED, VERSION_INDEPENDENT_COMP_ID);
-    // CompID = "5425A018-DAFD-4BC6-A550-377C899DC98A";
 End
 #endif
 
@@ -372,7 +342,6 @@
     Name = SCP2_URE_DL_NORMAL("unsafe_uno_uno");
 #endif
     Styles = (PACKED, VERSION_INDEPENDENT_COMP_ID);
-    // CompID = "74C2909A-FDCF-430A-B0F4-CA6D15690D76";
 End
 
 File gid_File_Dl_AffineUnoUno
@@ -384,7 +353,6 @@
     Name = SCP2_URE_DL_NORMAL("affine_uno_uno");
 #endif
     Styles = (PACKED, VERSION_INDEPENDENT_COMP_ID);
-    // CompID = "CF542EC3-7A51-4EAA-8480-65D5E8906D05";
 End
 
 File gid_File_Dl_LogUnoUno
@@ -614,7 +582,6 @@
     Dir = SCP2_URE_DL_DIR;
     Name = SCP2_URE_JDL_NORMAL("jpipe");
     Styles = (PACKED, VERSION_INDEPENDENT_COMP_ID);
-    // CompID = "B1A60DD4-51D7-4898-B899-9BD05DE2DA8F";
 End
 #endif
 
@@ -633,7 +600,6 @@
     Dir = SCP2_URE_DL_DIR;
     Name = SCP2_URE_DL_NORMAL("juh");
     Styles = (PACKED, VERSION_INDEPENDENT_COMP_ID);
-    // CompID = "1A001FB0-C469-4517-A3D1-3FA56AD607AF";
 End
 #endif
 
@@ -643,7 +609,6 @@
     Dir = SCP2_URE_DL_DIR;
     Name = SCP2_URE_DL_NORMAL("juhx");
     Styles = (PACKED, VERSION_INDEPENDENT_COMP_ID);
-    // CompID = "B152234F-A46A-40BE-B632-48F35A33A29A";
 End
 #endif
 
@@ -656,7 +621,6 @@
     Name = SCP2_URE_DL_BARE("acceptor.uno");
 #endif
     Styles = (PACKED, VERSION_INDEPENDENT_COMP_ID);
-    // CompID = "31183C51-C9A4-4D7A-A2F4-103252E1FEB0";
 End
 
 File gid_File_Dl_Binaryurp
@@ -679,7 +643,6 @@
     Name = SCP2_URE_DL_BARE("bootstrap.uno");
 #endif
     Styles = (PACKED, VERSION_INDEPENDENT_COMP_ID);
-    // CompID = "2620B307-25DB-498F-B2B8-46D928165331";
 End
 
 File gid_File_Dl_Connector
@@ -691,7 +654,6 @@
     Name = SCP2_URE_DL_BARE("connector.uno");
 #endif
     Styles = (PACKED, VERSION_INDEPENDENT_COMP_ID);
-    // CompID = "EBCE77E7-E244-40F6-96E2-5319D6571C5D";
 End
 
 File gid_File_Dl_Introspection
@@ -703,7 +665,6 @@
     Name = SCP2_URE_DL_BARE("introspection.uno");
 #endif
     Styles = (PACKED, VERSION_INDEPENDENT_COMP_ID);
-    // CompID = "E99960CF-FE59-4332-A2AC-47418C3A17C1";
 End
 
 File gid_File_Dl_Invocadapt
@@ -715,7 +676,6 @@
     Name = SCP2_URE_DL_BARE("invocadapt.uno");
 #endif
     Styles = (PACKED, VERSION_INDEPENDENT_COMP_ID);
-    // CompID = "77DDC112-1994-49D5-A086-FB16D4328AB9";
 End
 
 File gid_File_Dl_Invocation
@@ -727,7 +687,6 @@
     Name = SCP2_URE_DL_BARE("invocation.uno");
 #endif
     Styles = (PACKED, VERSION_INDEPENDENT_COMP_ID);
-    // CompID = "A79ACB80-DA65-47CA-81BA-7CD9E191C84C";
 End
 
 
@@ -741,7 +700,6 @@
     Name = SCP2_URE_DL_BARE("javaloader.uno");
 #endif
     Styles = (PACKED, VERSION_INDEPENDENT_COMP_ID);
-    // CompID = "19A20968-E654-4E2C-9F58-7B66F07CA346";
 End
 #endif
 
@@ -755,7 +713,6 @@
     Name = SCP2_URE_DL_BARE("javavm.uno");
 #endif
     Styles = (PACKED, VERSION_INDEPENDENT_COMP_ID);
-    // CompID = "F1266B2B-80AD-4248-A921-9161759FA4DA";
 End
 #endif
 
@@ -768,7 +725,6 @@
     Name = SCP2_URE_DL_BARE("namingservice.uno");
 #endif
     Styles = (PACKED, VERSION_INDEPENDENT_COMP_ID);
-    // CompID = "DD22BE3A-AD21-447D-B3A3-89B0FCDB0B31";
 End
 
 File gid_File_Dl_Stocservices
@@ -780,7 +736,6 @@
     Name = SCP2_URE_DL_BARE("stocservices.uno");
 #endif
     Styles = (PACKED, VERSION_INDEPENDENT_COMP_ID);
-    // CompID = "EBF6BBDE-EC50-4FB8-A0D4-BEC58F1C8C07";
 End
 
 File gid_File_Dl_Proxyfac
@@ -792,7 +747,6 @@
     Name = SCP2_URE_DL_BARE("proxyfac.uno");
 #endif
     Styles = (PACKED, VERSION_INDEPENDENT_COMP_ID);
-    // CompID = "A2CDDEC3-B9C7-48C9-AB35-65008777BC2F";
 End
 
 File gid_File_Dl_Reflection
@@ -804,7 +758,6 @@
     Name = SCP2_URE_DL_BARE("reflection.uno");
 #endif
     Styles = (PACKED, VERSION_INDEPENDENT_COMP_ID);
-    // CompID = "601C7946-CFEB-4F56-9429-6D5963188DF3";
 End
 
 File gid_File_Dl_Streams
@@ -816,7 +769,6 @@
     Name = SCP2_URE_DL_BARE("streams.uno");
 #endif
     Styles = (PACKED, VERSION_INDEPENDENT_COMP_ID);
-    // CompID = "6028CF43-A9B7-40A8-8216-509CAB256A2B";
 End
 
 File gid_File_Dl_Textinstream
@@ -828,7 +780,6 @@
     Name = SCP2_URE_DL_BARE("textinstream.uno");
 #endif
     Styles = (PACKED, VERSION_INDEPENDENT_COMP_ID);
-    // CompID = "DAA39D01-D9C5-40C4-94EC-9E4B2F94EABA";
 End
 
 File gid_File_Dl_Textoutstream
@@ -840,7 +791,6 @@
     Name = SCP2_URE_DL_BARE("textoutstream.uno");
 #endif
     Styles = (PACKED, VERSION_INDEPENDENT_COMP_ID);
-    // CompID = "DD01EB0C-A119-43AE-9100-F7A595D099E4";
 End
 
 File gid_File_Dl_Uuresolver
@@ -852,7 +802,6 @@
     Name = SCP2_URE_DL_BARE("uuresolver.uno");
 #endif
     Styles = (PACKED, VERSION_INDEPENDENT_COMP_ID);
-    // CompID = "377090E1-5008-424F-B0F6-A9EFC9F11206";
 End
 
 #if !defined SYSTEM_LIBXML
@@ -871,7 +820,6 @@
     Name = SCP2_URE_DL_VER("xml2", "2");
 #endif
     Styles = (PACKED, VERSION_INDEPENDENT_COMP_ID);
-    // CompID = "BE6FAD97-F84C-43E3-8392-6FE2CDA04D8E";
 End
 #endif
 
@@ -912,7 +860,6 @@
 #error "stlport dynamic library: unsupported platform"
 #endif
     Styles = (PACKED, VERSION_INDEPENDENT_COMP_ID);
-    // CompID = "D976338D-D2A5-4D29-B765-D3AC43181C7F";
 End
 #endif
 
@@ -923,7 +870,6 @@
     Dir = SCP2_URE_DL_DIR;
     Name = SCP2_URE_DL_VER("gcc_s", STRING(SHORTSTDC3));
     Styles = (PACKED, VERSION_INDEPENDENT_COMP_ID);
-    // CompID = "C601D04B-2194-4F1B-BB09-7B4930D6E1DB";
 End
 #endif
 
@@ -934,7 +880,6 @@
     TXT_FILE_BODY;
     Name = SCP2_URE_DL_VER("stdc++", STRING(SHORTSTDCPP3));
     Styles = (PACKED, VERSION_INDEPENDENT_COMP_ID);
-    // CompID = "89740D6A-38EE-41AF-A6A2-A8F7ABBE4996";
 End
 #endif
 
@@ -944,7 +889,6 @@
     Dir = SCP2_URE_DL_DIR;
     Name = SCP2_URE_DL_NORMAL("mingwm10");
     Styles = (PACKED, VERSION_INDEPENDENT_COMP_ID);
-    // CompID = "601FEC1D-8665-4476-9911-83BDCCE83025";
 End
 #endif
 
@@ -980,7 +924,6 @@
     Dir = SCP2_URE_DL_DIR;
     Name = SCP2_URE_DL_NORMAL("uwinapi");
     Styles = (PACKED, VERSION_INDEPENDENT_COMP_ID);
-    // CompID = "EABC9FE3-B296-430F-8513-A3617FFB630D";
 End
 #endif
 
@@ -992,7 +935,6 @@
     Dir = gid_Dir_Ure_Java;
     Name = "unoloader.jar";
     Styles = (PACKED, VERSION_INDEPENDENT_COMP_ID);
-    // CompID = "90F99ED3-814C-4B45-894B-D9248848CEB4";
 End
 #endif
 
@@ -1002,7 +944,6 @@
     Dir = gid_Dir_Ure_Java;
     Name = "juh.jar";
     Styles = (PACKED, VERSION_INDEPENDENT_COMP_ID);
-    // CompID = "E77CC8B5-0345-4B7F-ABED-5EB9DC94E492";
 End
 #endif
 
@@ -1012,7 +953,6 @@
     Dir = gid_Dir_Ure_Java;
     Name = "jurt.jar";
     Styles = (PACKED, VERSION_INDEPENDENT_COMP_ID);
-    // CompID = "EA63EDCC-9152-4560-AB7A-BFC367442E50";
 End
 #endif
 
@@ -1022,7 +962,6 @@
     Dir = gid_Dir_Ure_Java;
     Name = "ridl.jar";
     Styles = (PACKED, VERSION_INDEPENDENT_COMP_ID);
-    // CompID = "4A915C83-6BE3-41B9-BAF9-13AA27034955";
 End
 #endif
 
@@ -1034,7 +973,6 @@
     Dir = gid_Dir_Ure_Java;
     Name = "java_uno.jar";
     Styles = (PACKED, VERSION_INDEPENDENT_COMP_ID);
-    // CompID = "ABDC8DDA-5D2B-424C-ABD8-FD22D59658FE";
 End
 #endif
 
@@ -1050,18 +988,9 @@
 #endif
     Name = "javavendors.xml";
     Styles = (PACKED, VERSION_INDEPENDENT_COMP_ID);
-    // CompID = "403FCCFE-545B-44F6-91D1-5C75F846E587";
 End
 #endif
 
-//#if defined MACOSX
-//Unixlink gid_Unixlink_Ure_Bin_Urelibs
-//    Dir = gid_Dir_Ure_Bin;
-//    Name = "urelibs";
-//    Target = "../lib";
-//End
-//#endif
-
 //Module
 
 Module gid_Module_Root_Ure_Hidden
diff --git a/main/setup_native/source/packinfo/finals_instsetoo.txt b/main/setup_native/source/packinfo/finals_instsetoo.txt
deleted file mode 100644
index d37a921..0000000
--- a/main/setup_native/source/packinfo/finals_instsetoo.txt
+++ /dev/null
@@ -1,35 +0,0 @@
-# *************************************************************
-#  
-#  Licensed to the Apache Software Foundation (ASF) under one
-#  or more contributor license agreements.  See the NOTICE file
-#  distributed with this work for additional information
-#  regarding copyright ownership.  The ASF licenses this file
-#  to you under the Apache License, Version 2.0 (the
-#  "License"); you may not use this file except in compliance
-#  with the License.  You may obtain a copy of the License at
-#  
-#    http://www.apache.org/licenses/LICENSE-2.0
-#  
-#  Unless required by applicable law or agreed to in writing,
-#  software distributed under the License is distributed on an
-#  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-#  KIND, either express or implied.  See the License for the
-#  specific language governing permissions and limitations
-#  under the License.
-#  
-# *************************************************************
-
-# Comment line
-# Syntax:
-# Column 1: Product
-# Column 2: pro or nonpro
-# Column 3: languages, comma separated list
-# Column 4: path to msi database in installation set
-# Separator between columns is one or more than one tabulator
-
-# Examples:
-# OpenOffice	pro		en-US		\\<server>\<path>\msi\OOO300_m6_native_packed-1_en-US.9352\openofficeorg30.msi
-# OpenOffice	pro		en-US,de,es	\\<server>\<path>\msi\OOO300_m6_native_packed-1_en-US_de_es.9352\openofficeorg30.msi
-# OpenOffice	pro		de			\\<server>\<path>\msi\OOO300_m6_native_packed-1_de.9352\openofficeorg30.msi
-# OpenOfficeLanguagePack	pro	es	\\<server>\<path>\msi\OOO300_m6_native_packed-1_es.9352\openofficeorg30.msi
-# URE			pro		en-US		\\<server>\<path>\msi\OOO300_m6_native_packed-1_en-US.9352\ure14.msi
diff --git a/main/solenv/bin/make_installer.pl b/main/solenv/bin/make_installer.pl
index e1eabf0..7115ba1 100644
--- a/main/solenv/bin/make_installer.pl
+++ b/main/solenv/bin/make_installer.pl
@@ -74,9 +74,7 @@
 use installer::windows::inifile;
 use installer::windows::java;
 use installer::windows::media;
-use installer::windows::mergemodule;
 use installer::windows::msiglobal;
-use installer::windows::msp;
 use installer::windows::patch;
 use installer::windows::property;
 use installer::windows::removefile;
@@ -84,7 +82,6 @@
 use installer::windows::selfreg;
 use installer::windows::shortcut;
 use installer::windows::strip;
-use installer::windows::update;
 use installer::windows::upgrade;
 use installer::worker;
 use installer::xpdinstaller;
@@ -524,7 +521,6 @@
 my $folderitemsinproductarrayref;
 my $registryitemsinproductarrayref;
 my $windowscustomactionsarrayref;
-my $mergemodulesarrayref;
 
 if ( $installer::globals::iswindowsbuild )	# Windows specific items: Folder, FolderItem, RegistryItem, WindowsCustomAction
 {
@@ -556,11 +552,6 @@
 
 	$windowscustomactionsarrayref = installer::setupscript::get_all_items_from_script($setupscriptref, "WindowsCustomAction");
 	if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "windowscustomactions1.log", $windowscustomactionsarrayref); }
-
-	$installer::logger::Info->print( "... analyzing Windows merge modules ... \n" );
-
-	$mergemodulesarrayref = installer::setupscript::get_all_items_from_script($setupscriptref, "MergeModule");
-	if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "mergemodules1.log", $mergemodulesarrayref); }
 }
 
 my $modulesinproductarrayref;
@@ -716,31 +707,11 @@
 	my $uniquefilename = "";
 	my $revuniquefilename = "";
 	my $revshortfilename = "";
-	my $allupdatesequences = "";
-	my $allupdatecomponents = "";
-	my $allupdatefileorder = "";
 	my $allupdatecomponentorder = "";
 	my $shortdirname = "";
 	my $componentid = "";
 	my $componentidkeypath = "";
 	my $alloldproperties = "";
-	my $allupdatelastsequences = "";
-	my $allupdatediskids = "";
-
-	if ( $installer::globals::iswindowsbuild )
-	{
-		if ( $allvariableshashref->{'UPDATE_DATABASE'} )
-		{
-			$installer::logger::Info->print( "... analyzing update database ...\n" );
-			$refdatabase = installer::windows::update::readdatabase($allvariableshashref, $languagestringref, $includepatharrayref);
-
-			if ( $installer::globals::updatedatabase )
-			{
-				($uniquefilename, $revuniquefilename, $revshortfilename, $allupdatesequences, $allupdatecomponents, $allupdatefileorder, $allupdatecomponentorder, $shortdirname, $componentid, $componentidkeypath, $alloldproperties, $allupdatelastsequences, $allupdatediskids) = installer::windows::update::create_database_hashes($refdatabase);
-				if ( $mergemodulesarrayref > -1 ) { installer::windows::update::readmergedatabase($mergemodulesarrayref, $languagestringref, $includepatharrayref); }
-			}
-		}
-	}
 
 	##############################################
 	# Setting global code variables for Windows
@@ -1948,9 +1919,8 @@
 		# Collection all available directory trees
 		installer::windows::directory::collectdirectorytrees($directoriesforepmarrayref);
 
-		$filesinproductlanguageresolvedarrayref = installer::windows::file::create_files_table($filesinproductlanguageresolvedarrayref, \@allfilecomponents, $newidtdir, $allvariableshashref, $uniquefilename, $allupdatesequences, $allupdatecomponents, $allupdatefileorder);
+		$filesinproductlanguageresolvedarrayref = installer::windows::file::create_files_table($filesinproductlanguageresolvedarrayref, \@allfilecomponents, $newidtdir, $allvariableshashref, $uniquefilename);
 		if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "productfiles17c.log", $filesinproductlanguageresolvedarrayref); }
-		if ( $installer::globals::updatedatabase ) { installer::windows::file::check_file_sequences($allupdatefileorder, $allupdatecomponentorder); }
 
 		installer::windows::directory::create_directory_table($directoriesforepmarrayref, $newidtdir, $allvariableshashref, $shortdirname, $loggingdir);
 		if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "productfiles18.log", $filesinproductlanguageresolvedarrayref); }
@@ -1974,7 +1944,7 @@
 
 		installer::windows::featurecomponent::create_featurecomponent_table($filesinproductlanguageresolvedarrayref, $registryitemsinproductlanguageresolvedarrayref, $newidtdir);
 
-		installer::windows::media::create_media_table($filesinproductlanguageresolvedarrayref, $newidtdir, $allvariableshashref, $allupdatelastsequences, $allupdatediskids);
+		installer::windows::media::create_media_table($filesinproductlanguageresolvedarrayref, $newidtdir, $allvariableshashref);
 		if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "productfiles20.log", $filesinproductlanguageresolvedarrayref); }
 
 		installer::windows::font::create_font_table($filesinproductlanguageresolvedarrayref, $newidtdir);
@@ -2181,12 +2151,6 @@
 
 				installer::windows::msiglobal::write_summary_into_msi_database($msifilename, $onelanguage, $languagefile, $allvariableshashref);
 				
-				# if there are Merge Modules, they have to be integrated now
-				$filesinproductlanguageresolvedarrayref = installer::windows::mergemodule::merge_mergemodules_into_msi_database($mergemodulesarrayref, $filesinproductlanguageresolvedarrayref, $msifilename, $languagestringref, $onelanguage, $languagefile, $allvariableshashref, $includepatharrayref, $allupdatesequences, $allupdatelastsequences, $allupdatediskids);
-				if (( $installer::globals::globallogging ) && ($installer::globals::globalloggingform21)) { installer::files::save_array_of_hashes($loggingdir . "productfiles21_" . $onelanguage . ".log", $filesinproductlanguageresolvedarrayref); }
-				$installer::globals::globalloggingform21 = 0;
-				if ( $installer::globals::use_packages_for_cabs ) { installer::windows::media::create_media_table($filesinproductlanguageresolvedarrayref, $newidtdir, $allvariableshashref, $allupdatelastsequences, $allupdatediskids); }
-			
 				# copy msi database into installation directory
 
 				my $msidestfilename = $installdir . $installer::globals::separator . $msidatabasename;
@@ -2227,10 +2191,6 @@
 
 		installer::windows::msiglobal::copy_windows_installer_files_into_installset($installdir, $includepatharrayref, $allvariableshashref);
 
-		# ... copying MergeModules into installation set
-
-		if ( ! $installer::globals::fix_number_of_cab_files ) { installer::windows::msiglobal::copy_merge_modules_into_installset($installdir); }
-
 		# ... copying the child projects
 
 		if ($installer::globals::addchildprojects)
@@ -2273,20 +2233,6 @@
 		installer::worker::clean_output_tree();	# removing directories created in the output tree
 		($is_success, $finalinstalldir) = installer::worker::analyze_and_save_logfile($loggingdir, $installdir, $installlogdir, $allsettingsarrayref, $languagestringref, $current_install_number);
 
-		#######################################################
-		# Creating Windows msp patches
-		#######################################################
-		
-		if (( $is_success ) && ( $installer::globals::updatedatabase ) && ( $allvariableshashref->{'CREATE_MSP_INSTALLSET'} ))
-		{
-			# Required:
-			# Temp path for administrative installations: $installer::globals::temppath
-			# Path of new installation set: $finalinstalldir
-			# Path of old installation set: $installer::globals::updatedatabasepath
-			my $mspdir = installer::windows::msp::create_msp_patch($finalinstalldir, $includepatharrayref, $allvariableshashref, $languagestringref, $languagesarrayref, $filesinproductlanguageresolvedarrayref);
-			($is_success, $finalinstalldir) = installer::worker::analyze_and_save_logfile($loggingdir, $mspdir, $installlogdir, $allsettingsarrayref, $languagestringref, $current_install_number);
-			installer::worker::clean_output_tree();	# removing directories created in the output tree
-		}
 		
 		#######################################################
 		# Creating download installation set
diff --git a/main/solenv/bin/modules/installer/globals.pm b/main/solenv/bin/modules/installer/globals.pm
index c078b3a..2f1f296 100644
--- a/main/solenv/bin/modules/installer/globals.pm
+++ b/main/solenv/bin/modules/installer/globals.pm
@@ -226,24 +226,14 @@
 	@linkrpms = ();
 	$archiveformat = "";
 	$minorupgradekey = "";
-	$updatelastsequence = 0;
-	$updatesequencecounter = 0;
-	$updatedatabase = 0;
-	$updatedatabasepath = "";
 	$pfffileexists = 0;
 	$pffcabfilename = "ooobasis3.0_pff.cab";
-	$mergemodulenumber = 0;
-	%allmergemodulefilesequences = ();
-	%newupdatefiles = ();
-	%allusedupdatesequences = ();
-	%mergemodulefiles = ();
 	$mergefiles_added_into_collector = 0;
 	$creating_windows_installer_patch = 0;
-	
+
 	$strip = 1;
 	
 	$globallogging = 0;
-	$globalloggingform21 = 1;
 	$logfilename = "logfile.log";	# the default logfile name for global errors
 #	@logfileinfo = ();
 #	@errorlogfileinfo = ();
@@ -292,7 +282,6 @@
 	$pwfile = "";
 	$pfxfile = "";
 
-	%mergemodules = ();
 	%merge_media_line = ();
 	%merge_allfeature_hash = ();
 	%merge_alldirectory_hash = ();
@@ -418,13 +407,10 @@
 	%usedtreeconditions = ();
 	%moduledestination = ();
 	
-	$one_cab_file = 0;
 	$fix_number_of_cab_files = 1;
-	$cab_file_per_component = 0;
 	$cabfilecompressionlevel = 2;
 	$number_of_cabfiles = 1;	# only for $fix_number_of_cab_files = 1 
 	$include_cab_in_msi = 0;
-	$use_packages_for_cabs = 0;
 	$msidatabasename = "";
 	$prepare_winpatch = 0;
 	$previous_idt_dir = "";	
@@ -451,7 +437,6 @@
 
 	$postprocess_specialepm = 0;
 	$postprocess_standardepm = 0;
-	$mergemodules_analyzed = 0;
 	
 	$starttime = "";
 
diff --git a/main/solenv/bin/modules/installer/patch/FileOperations.pm b/main/solenv/bin/modules/installer/patch/FileOperations.pm
new file mode 100644
index 0000000..6931b37
--- /dev/null
+++ b/main/solenv/bin/modules/installer/patch/FileOperations.pm
@@ -0,0 +1,333 @@
+#**************************************************************

+#  

+#  Licensed to the Apache Software Foundation (ASF) under one

+#  or more contributor license agreements.  See the NOTICE file

+#  distributed with this work for additional information

+#  regarding copyright ownership.  The ASF licenses this file

+#  to you under the Apache License, Version 2.0 (the

+#  "License"); you may not use this file except in compliance

+#  with the License.  You may obtain a copy of the License at

+#  

+#    http://www.apache.org/licenses/LICENSE-2.0

+#  

+#  Unless required by applicable law or agreed to in writing,

+#  software distributed under the License is distributed on an

+#  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY

+#  KIND, either express or implied.  See the License for the

+#  specific language governing permissions and limitations

+#  under the License.

+#  

+#**************************************************************

+

+package installer::patch::FileOperations;

+

+use File::Basename;

+use File::Copy;

+use IO::Compress::Bzip2;

+use IO::Uncompress::Bunzip2;

+

+my $CompressionMethod = "bzip2";

+

+

+=head1 NAME

+

+    package installer::patch::FileOperations - Class for collecting, checking and executing file operations.

+

+=cut

+

+

+sub new ($)

+{

+    my ($class) = (@_);

+

+    my $self = {

+        'operations' => []

+    };

+    bless($self, $class);

+

+    return $self;

+}

+

+

+

+

+sub AddCopyOperation ($$$)

+{

+    my ($self, $source_name, $target_name) = @_;

+    

+    push

+        @{$self->{'operations'}},

+        [

+            'copy',

+            $source_name,

+            $target_name

+        ];

+}

+

+

+

+

+sub AddMakeDirectoryOperation ($$)

+{

+    my ($self, $path) = @_;

+

+    push

+        @{$self->{'operations'}},

+        [

+            'mkdir',

+            $path

+        ];

+}

+

+

+

+

+sub AddCompressOperation ($$)

+{

+    my ($self, $filename) = @_;

+

+    push

+        @{$self->{'operations'}},

+        [

+            'compress',

+            $filename

+        ];

+}

+

+

+

+

+sub AddUncompressOperation ($$$)

+{

+    my ($self, $source_name, $target_name) = @_;

+

+    push

+        @{$self->{'operations'}},

+        [

+            'uncompress',

+            $source_name,

+            $target_name

+        ];

+}

+

+

+

+

+sub Check ($)

+{

+    my ($self) = @_;

+

+    # Keep track of which directories or files would be created to check if

+    # operations that depend on these files will succeed.

+    my %files = ();

+    my %directories = ();

+    

+    my @error_messages = ();

+    foreach my $operation (@{$self->{'operations'}})

+    {

+        my $command = $operation->[0];

+        

+        if ($command eq "copy")

+        {

+            my ($source_name, $destination_name) = ($operation->[1], $operation->[2]);

+            if ( ! -f $source_name)

+            {

+                push @error_messages, sprintf("%s is not a regular file and can not be copied", $source_name);

+            }

+            my $destination_path = dirname($destination_name);

+            if ( ! -d $destination_path && ! defined $directories{$destination_path})

+            {

+                push @error_messages, sprintf("destination path %s does not exist", $destination_path);

+            }

+            if ( -f $destination_name)

+            {

+                # The destination file already exists. We have to overwrite it.

+                if ( ! -w $destination_name)

+                {

+                    push @error_messges, sprintf("destination file %s exists but can not be overwritten", $destination_name);

+                }

+            }

+            $files{$destination_name} = 1;

+        }

+        elsif ($command eq "mkdir")

+        {

+            my $path = $operation->[1];

+            if ( -d $path)

+            {

+                # Directory already exists.  That is OK, the mkdir command will be silently ignored.

+            }

+            else

+            {

+                $directories{$path} = 1;

+            }

+        }

+        elsif ($command eq "compress")

+        {

+            my $filename = $operation->[1];

+            if ( ! -f $filename && ! defined $files{$filename})

+            {

+                # File does not exist and will not be created by an earlier operation.

+                push @error_messages, sprintf("file %s does not exist and can not be compressed", $filename);

+            }

+        }

+        elsif ($command eq "uncompress")

+        {

+            my ($source_filename, $destination_filename) = ($operation->[1], $operation->[2]);

+            if ($CompressionMethod eq "bzip2")

+            {

+                $source_filename .= ".bz2";

+            }

+            if ( ! -f $source_filename && ! defined $files{$source_filename})

+            {

+                # File does not exist and will not be created by an earlier operation.

+                push @error_messages, sprintf("file %s does not exist and can not be decompressed", $source_filename);

+            }

+            if ( -f $destination_filename && ! -w $destination_filename)

+            {

+                # Destination file aleady exists but can not be replaced.

+                push @error_messages, sprintf("compress destination file %s exists but can not be replaced", $destination_filename);

+            }

+        }

+        else

+        {

+            push @error_messages, sprintf("unknown operation %s", $command);

+        }

+    }

+

+    return @error_messages;

+}

+

+

+

+

+sub CheckAndExecute ($)

+{

+    my ($self) = @_;

+

+    my @error_messages = $self->Check();

+    if (scalar @error_messages > 0)

+    {

+        $installer::logger::Lang->printf("can not execute all operations:\n");

+        for my $message (@error_messages)

+        {

+            $installer::logger::Lang->printf("ERROR: %s\n", $message);

+        }

+        return 0;

+    }

+    else

+    {

+        return $self->Execute();

+    }

+}

+

+

+

+

+sub Execute ($)

+{

+    my ($self) = @_;

+

+    foreach my $operation (@{$self->{'operations'}})

+    {

+        my $command = $operation->[0];

+

+        if ($command eq "copy")

+        {

+            my ($source_name, $destination_name) = ($operation->[1], $operation->[2]);

+            $installer::logger::Lang->printf("copy from %s\n    to %s\n", $source_name, $destination_name);

+            if ( ! $DryRun)

+            {

+                my $result = copy($source_name, $destination_name);

+                if ( ! $result)

+                {

+                    $installer::logger::Lang->printf("ERROR: copying from %s to %s failed",

+                        $source_name, $destination_name);

+                }

+            }

+        }

+        elsif ($command eq "mkdir")

+        {

+            my $path = $operation->[1];

+            if ( -d $path)

+            {

+                # Path exists already. Do nothing.

+            }

+            else

+            {

+                $installer::logger::Lang->printf("creating directory %s\n", $path);

+                if ( ! $DryRun)

+                {

+                    if (File::Path::make_path($path, {'mode' => 0775}) == 0)

+                    {

+                        $installer::logger::Lang->printf("could not create directory %s\n", $path);

+                    }

+                }

+            }

+        }

+        elsif ($command eq "compress")

+        {

+            my $filename = $operation->[1];

+            $installer::logger::Lang->printf("compressing %s\n", $filename);

+            if ( ! $DryRun)

+            {

+                my $result = 0;

+                if ($CompressionMethod eq "bzip2")

+                {

+                    $result = IO::Compress::Bzip2::bzip2($filename => $filename.".bz2");

+                }

+                if ($result == 0)

+                {

+                    $installer::logger::Lang->printf("ERROR: could not compress %s\n", $filename);

+                }

+                else

+                {

+                    unlink($filename);

+                }

+            }

+        }

+        elsif ($command eq "uncompress")

+        {

+            my ($source_name, $destination_name) = ($operation->[1], $operation->[2]);

+            if ($CompressionMethod eq "bzip2")

+            {

+                $source_name .= ".bz2";

+            }

+            $installer::logger::Lang->printf("uncompressing %s to %s\n", $source_name, $destination_name);

+

+            my $destination_base_name = basename($destination_name);

+

+            if ( ! $DryRun)

+            {

+                my $result = 0;

+                if ($CompressionMethod eq "bzip2")

+                {

+                    $result = IO::Uncompress::Bunzip2::bunzip2($source_name => $destination_name);

+                }

+                if ($result == 0)

+                {

+                    $installer::logger::Lang->printf("ERROR: failed to extract content of '%s' from '%s'\n",

+                        $destination_name, $source_name);

+                    return 0;

+                }

+            }

+        }

+

+        else

+        {

+            die "unknown operation $command\n";

+        }

+    }

+

+    return 1;

+}

+

+

+

+sub GetOperationCount ($)

+{

+    my ($self) = @_;

+    return scalar @{$self->{'operations'}};

+}

+

+

+1;

diff --git a/main/solenv/bin/modules/installer/patch/FileSequenceList.pm b/main/solenv/bin/modules/installer/patch/FileSequenceList.pm
new file mode 100644
index 0000000..ea0a3d4
--- /dev/null
+++ b/main/solenv/bin/modules/installer/patch/FileSequenceList.pm
@@ -0,0 +1,159 @@
+#**************************************************************

+#  

+#  Licensed to the Apache Software Foundation (ASF) under one

+#  or more contributor license agreements.  See the NOTICE file

+#  distributed with this work for additional information

+#  regarding copyright ownership.  The ASF licenses this file

+#  to you under the Apache License, Version 2.0 (the

+#  "License"); you may not use this file except in compliance

+#  with the License.  You may obtain a copy of the License at

+#  

+#    http://www.apache.org/licenses/LICENSE-2.0

+#  

+#  Unless required by applicable law or agreed to in writing,

+#  software distributed under the License is distributed on an

+#  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY

+#  KIND, either express or implied.  See the License for the

+#  specific language governing permissions and limitations

+#  under the License.

+#  

+#**************************************************************

+

+package installer::patch::FileSequenceList;

+

+use XML::LibXML;

+use strict;

+

+=head1 NAME

+

+    FileSequenceList.pm - Class for retrieving and processing the 'Sequence' values of the MSI 'File' table.

+    

+=cut

+

+=head2 new($class)

+

+    Create a new FileSequenceList object.

+    

+=cut

+sub new ($)

+{

+    my ($class) = @_;

+

+    my $self = {

+        'data' => undef

+    };

+    bless($self, $class);

+

+    return $self;

+}

+

+

+

+

+sub SetFromFileList ($$)

+{

+    my ($self, $files) = @_;

+

+    my %data = map {$_->{'uniquename'} => $_->{'sequencenumber'}} @$files;

+    $self->{'data'} = \%data;

+}

+

+

+

+

+sub SetFromMap ($$)

+{

+    my ($self, $map) = @_;

+

+    $self->{'data'} = $map;

+}

+

+

+

+

+sub GetFileCount ($)

+{

+    my ($self) = @_;

+

+    return scalar keys %{$self->{'data'}};

+}

+

+

+

+

+=head2 GetSequenceNumbers ($files)

+

+    $files is a hash that maps unique file names (File->File) to sequence

+    numbers (File->Sequence). The later is (expected to be) initially unset and

+    is set in this method.

+

+    For new files -- entries in the given $files that do not exist in the 'data'

+    member -- no sequence numbers are defined.

+

+    When there are removed files -- entries in the 'data' member that do not

+    exist in the given $files -- then a list of these files is returned.  In

+    that case the given $files remain unmodified.

+    

+    The returned list is empty when everyting is OK.

+    

+=cut

+sub GetSequenceNumbers ($$)

+{

+    my ($self, $files) = @_;

+

+    # Check if files have been removed.

+    my @missing = ();

+    foreach my $name (keys %{$self->{'data'}})

+    {

+        if ( ! defined $files->{$name})

+        {

+            push @missing, $name;

+        }

+    }

+    if (scalar @missing > 0)

+    {

+        # Yes.  Return the names of the removed files.

+        return @missing;

+    }

+

+    # No files where removed.  Set the sequence numbers.

+    foreach my $name (keys %$files)

+    {

+        $files->{$name} = $self->{'data'}->{$name};

+    }

+    return ();

+}

+

+

+

+

+sub GetDifference ($$)

+{

+    my ($self, $other) = @_;

+

+    # Create maps for easy reference.

+    my (@files_in_both, @files_in_self, @files_in_other);

+    foreach my $name (keys %{$self->{'data'}})

+    {

+        if (defined $other->{'data'}->{$name})

+        {

+            push @files_in_both, $name;

+        }

+        else

+        {

+            push @files_in_self, $name;

+        }

+    }

+    foreach my $name (keys %{$self->{'data'}})

+    {

+        if ( ! defined $self->{'data'}->{$name})

+        {

+            push @files_in_other, $name;

+        }

+    }

+

+    return (\@files_in_both, \@files_in_self, \@files_in_other);

+}

+

+

+1;

diff --git a/main/solenv/bin/modules/installer/patch/InstallationSet.pm b/main/solenv/bin/modules/installer/patch/InstallationSet.pm
new file mode 100644
index 0000000..6c5ac14
--- /dev/null
+++ b/main/solenv/bin/modules/installer/patch/InstallationSet.pm
@@ -0,0 +1,467 @@
+#**************************************************************

+#  

+#  Licensed to the Apache Software Foundation (ASF) under one

+#  or more contributor license agreements.  See the NOTICE file

+#  distributed with this work for additional information

+#  regarding copyright ownership.  The ASF licenses this file

+#  to you under the Apache License, Version 2.0 (the

+#  "License"); you may not use this file except in compliance

+#  with the License.  You may obtain a copy of the License at

+#  

+#    http://www.apache.org/licenses/LICENSE-2.0

+#  

+#  Unless required by applicable law or agreed to in writing,

+#  software distributed under the License is distributed on an

+#  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY

+#  KIND, either express or implied.  See the License for the

+#  specific language governing permissions and limitations

+#  under the License.

+#  

+#**************************************************************

+

+package installer::patch::InstallationSet;

+

+use installer::patch::Tools;

+use installer::patch::Version;

+use installer::logger;

+

+

+my $Unpacker = "/c/Program\\ Files/7-Zip/7z.exe";

+

+=head1 NAME

+

+    package installer::patch::InstallationSet  -  Functions for handling installation sets

+

+=head1 DESCRIPTION

+

+    This package contains functions for unpacking the .exe files that

+    are created by the NSIS installer creator and the .cab files in

+    the installation sets.

+

+=cut

+

+sub UnpackExe ($$)

+{

+    my ($filename, $destination_path) = @_;

+

+    $installer::logger::Info->printf("unpacking installation set to '%s'\n", $destination_path);

+

+    # Unpack to a temporary path and change its name to the destination path

+    # only when the unpacking has completed successfully.

+    my $temporary_destination_path = $destination_path . ".tmp";

+    File::Path::make_path($temporary_destination_path);

+

+    my $windows_filename = installer::patch::Tools::CygpathToWindows($filename);

+    my $windows_destination_path = installer::patch::Tools::CygpathToWindows($temporary_destination_path);

+    my $command = join(" ",

+        $Unpacker,

+        "x", "-o".$windows_destination_path,

+        $windows_filename);

+    my $result = qx($command);

+

+    # Check the existence of the .cab files.

+    my $cab_filename = File::Spec->catfile($temporary_destination_path, "openoffice1.cab");

+    if ( ! -f $cab_filename)

+    {

+        installer::logger::PrintError("cab file '%s' was not extracted from installation set\n", $cab_filename);

+        return 0;

+    }

+    if (rename($temporary_destination_path, $destination_path) == 0)

+    {

+        installer::logger::PrintError("can not rename temporary extraction directory\n");

+        return 0;

+    }

+    return 1;

+}

+

+

+

+

+=head2 UnpackCab($cab_filename, $destination_path)

+

+    Unpacking the cabinet file inside an .exe installation set is a

+    three step process because there is no directory information stored

+    inside the cab file.  This has to be taken from the 'File' and

+    'Directory' tables in the .msi file.

+

+    1. Setup the directory structure of all files in the cab from the 'File' and 'Directory' tables in the msi.

+    

+    2. Unpack the cab file.

+

+    3. Move the files to their destination directories.

+    

+=cut

+sub UnpackCab ($$$)

+{

+    my ($cab_filename, $msi, $destination_path) = @_;

+

+    # Step 1

+    # Extract the directory structure from the 'File' and 'Directory' tables in the given msi.

+    $installer::logger::Info->printf("setting up directory tree\n");

+    my $file_table = $msi->GetTable("File");

+    my $file_to_directory_map = $msi->GetFileToDirectoryMap();

+

+    # Step 2

+    # Unpack the .cab file to a temporary path.

+    my $temporary_destination_path = $destination_path . ".tmp";

+    if ( -d $temporary_destination_path)

+    {

+        # Temporary directory already exists => cab file has already been unpacked (flat), nothing to do.

+        $installer::logger::Info->printf("cab file has already been unpacked to flat structure\n");

+    }

+    else

+    {

+        UnpackCabFlat($cab_filename, $temporary_destination_path, $file_table);

+    }

+    

+    # Step 3

+    # Move the files to their destinations.

+    File::Path::make_path($destination_path);

+    $installer::logger::Info->printf("moving files to their directories\n");

+    my $count = 0;

+    foreach my $file_row (@{$file_table->GetAllRows()})

+    {

+        my $unique_name = $file_row->GetValue('File');

+        my $directory_full_names = $file_to_directory_map->{$unique_name};

+        my ($source_full_name, $target_full_name) = @$directory_full_names;

+

+        my $flat_filename = File::Spec->catfile($temporary_destination_path, $unique_name); 

+        my $dir_path = File::Spec->catfile($destination_path, $source_full_name);

+        my $dir_filename = File::Spec->catfile($dir_path, $unique_name);

+

+        printf("%d: making path %s and copying %s to %s\n",

+            $count,

+            $dir_path,

+            $unique_name,

+            $dir_filename);

+        File::Path::make_path($dir_path);

+        File::Copy::move($flat_filename, $dir_filename);

+

+        ++$count;

+    }

+

+    # Cleanup.  Remove the temporary directory.  It should be empty by now.

+    rmdir($temporary_destination_path);

+}

+

+

+

+

+=head2 UnpackCabFlat ($cab_filename, $destination_path, $file_table)

+

+    Unpack the flat file structure of the $cab_filename to $destination_path.

+

+    In order to detect and handle an incomplete (arborted) previous

+    extraction, the cab file is unpacked to a temprorary directory

+    that after successful extraction is renamed to $destination_path.

+

+=cut

+sub UnpackCabFlat ($$$)

+{

+    my ($cab_filename, $destination_path, $file_table) = @_;

+

+    # Unpack the .cab file to a temporary path (note that

+    # $destination_path may alreay bee a temporary path). Using a

+    # second one prevents the lengthy flat unpacking to be repeated

+    # when another step fails.

+

+    $installer::logger::Info->printf("unpacking cab file\n");

+    my $temporary_destination_path = $destination_path . ".tmp";

+    File::Path::make_path($temporary_destination_path);

+    my $windows_cab_filename = installer::patch::Tools::CygpathToWindows($cab_filename);

+    my $windows_destination_path = installer::patch::Tools::CygpathToWindows($temporary_destination_path);

+    my $command = join(" ",

+        $Unpacker,

+        "x", "-o".$windows_destination_path,

+        $windows_cab_filename,

+        "-y");

+    printf("running command '%s'\n", $command);

+    open my $cmd, $command."|";

+    my $extraction_count = 0;

+    my $file_count = $file_table->GetRowCount();

+    while (<$cmd>)

+    {

+        my $message = $_;

+        chomp($message);

+        ++$extraction_count;

+        printf("%4d/%4d  %3.2f%%   \r",

+            $extraction_count,

+            $file_count,

+            $extraction_count*100/$file_count);

+    }

+    close $cmd;

+    printf("extraction done                               \n");

+

+    rename($temporary_destination_path, $destination_path)

+        || installer::logger::PrintError(

+            "can not rename the temporary directory '%s' to '%s'\n",

+            $temporary_destination_path,

+            $destination_path);

+}

+

+

+

+

+=head GetUnpackedMsiPath ($version, $language, $package_format, $product)

+

+    Convenience function that returns where a downloadable installation set is extracted to.

+    

+=cut

+sub GetUnpackedMsiPath ($$$$)

+{

+    my ($version, $language, $package_format, $product) = @_;

+

+    return File::Spec->catfile(

+        GetUnpackedPath($version, $language, $package_format, $product),

+        "unpacked_msi");

+}

+

+

+

+

+=head GetUnpackedCabPath ($version, $language, $package_format, $product)

+

+    Convenience function that returns where a cab file is extracted

+    (with injected directory structure from the msi file) to.

+

+=cut

+sub GetUnpackedCabPath ($$$$)

+{

+    my ($version, $language, $package_format, $product) = @_;

+

+    return File::Spec->catfile(

+        GetUnpackedPath($version, $language, $package_format, $product),

+        "unpacked_cab");

+}

+

+

+

+

+=head2 GetUnpackedPath($version, $language, $package_format, $product)

+

+    Internal function for creating paths to where archives are unpacked.

+    

+=cut

+sub GetUnpackedPath ($$$$)

+{

+    my ($version, $language, $package_format, $product) = @_;

+

+    return File::Spec->catfile(

+        $ENV{'SRC_ROOT'},

+        "instsetoo_native",

+        $ENV{'INPATH'},

+        $product,

+        $package_format,

+        installer::patch::Version::ArrayToDirectoryName(installer::patch::Version::StringToNumberArray($version)),

+        $language);        

+}

+

+

+

+

+=head2 Download($language, $release_data, $filename)

+

+    Download an installation set to $filename.  The URL for the

+    download is taken from $release_data, a snippet from the

+    instsetoo_native/data/releases.xml file.

+

+=cut

+sub Download ($$$)

+{

+    my ($language, $release_data, $filename) = @_;

+

+    my $url = $release_data->{'URL'};

+    $release_data->{'URL'} =~ /^(.*)\/([^\/]+)$/;

+    my ($location, $basename) = ($1,$2);

+    

+    $installer::logger::Info->printf("downloading %s\n", $basename);

+    $installer::logger::Info->printf("    from '%s'\n", $location);

+    my $filesize = $release_data->{'file-size'};

+    $installer::logger::Info->printf("    expected size is %d\n", $filesize);

+    my $temporary_filename = $filename . ".part";

+    my $resume_size = 0;

+    if ( -f $temporary_filename)

+    {

+        $resume_size = -s $temporary_filename;

+        $installer::logger::Info->printf(" trying to resume at %d/%d bytes\n", $resume_size, $filesize);

+    }

+    

+    # Prepare checksum.

+    my $checksum = undef;

+    my $checksum_type = $release_data->{'checksum-type'};

+    my $checksum_value = $release_data->{'checksum-value'};

+    my $digest = undef;

+    if ($checksum_type eq "sha256")

+    {

+        $digest = Digest->new("SHA-256");

+    }

+    elsif ($checksum_type eq "md5")

+    {

+        $digest = Digest->new("md5");

+    }

+    else

+    {

+        installer::logger::PrintError(

+            "checksum type %s is not supported.  Supported checksum types are: sha256,md5\n",

+            $checksum_type);

+        return 0;

+    }

+

+    # Download the extension.

+    open my $out, ">>$temporary_filename";

+    binmode($out);

+

+    my $mode = $|;

+    my $handle = select STDOUT;

+    $| = 1;

+    select $handle;

+    

+    my $agent = LWP::UserAgent->new();

+    $agent->timeout(120);

+    $agent->show_progress(0);

+    my $last_was_redirect = 0;

+    my $bytes_read = 0;

+    $agent->add_handler('response_redirect'

+        => sub{

+            $last_was_redirect = 1;

+            return;

+        });

+    $agent->add_handler('response_data'

+        => sub{

+            if ($last_was_redirect)

+            {

+                $last_was_redirect = 0;

+                # Throw away the data we got so far.

+                $digest->reset();

+                close $out;

+                open $out, ">$temporary_filename";

+                binmode($out);

+            }

+            my($response,$agent,$h,$data)=@_;

+            print $out $data;

+            $digest->add($data);

+            $bytes_read += length($data);

+            printf("read %*d / %d  %d%%  \r",

+                length($filesize),

+                $bytes_read,

+                $filesize,

+                $bytes_read*100/$filesize);  

+        });

+    my $response;

+    if ($resume_size > 0)

+    {

+        $response = $agent->get($url, 'Range' => "bytes=$resume_size-");

+    }

+    else

+    {

+        $response = $agent->get($url);

+    }

+    close $out;

+

+    $handle = select STDOUT;

+    $| = $mode;

+    select $handle;

+

+    $installer::logger::Info->print("                                        \r");

+    

+    if ($response->is_success())

+    {

+        if ($digest->hexdigest() eq $checksum_value)

+        {

+            $installer::logger::Info->PrintInfo("download was successfull\n");

+            if ( ! rename($temporary_filename, $filename))

+            {

+                installer::logger::PrintError("can not rename '%s' to '%s'\n", $temporary_filename, $filename);

+                return 0;

+            }

+            else

+            {

+                return 1;

+            }

+        }

+        else

+        {

+            installer::logger::PrintError("%s checksum is wrong\n", $checksum_type);

+            return 0;

+        }

+    }

+    else

+    {

+        installer::logger::PrintError("there was a download error\n");

+        return 0;

+    }

+}

+

+

+

+

+=head2 ProvideDownloadSet ($version, $language, $package_format)

+

+    Download an installation set when it is not yet present to

+    $ENV{'TARFILE_LOCATION'}.  Verify the downloaded file with the

+    checksum that is extracted from the

+    instsetoo_native/data/releases.xml file.

+

+=cut

+sub ProvideDownloadSet ($$$)

+{

+    my ($version, $language, $package_format) = @_;

+

+    my $release_item = installer::patch::ReleasesList::Instance()->{$version}->{$package_format}->{$language};

+    

+    # Get basename of installation set from URL.

+    $release_item->{'URL'} =~ /^(.*)\/([^\/]+)$/;

+    my ($location, $basename) = ($1,$2);

+

+    # Is the installation set already present in ext_sources/ ?

+    my $need_download = 0;

+    my $ext_sources_filename = File::Spec->catfile(

+        $ENV{'TARFILE_LOCATION'},

+        $basename);

+    if ( ! -f $ext_sources_filename)

+    {

+        $installer::logger::Info->printf("download set is not in ext_sources/ (%s)\n", $ext_sources_filename);

+        $need_download = 1;

+    }

+    else

+    {

+        $installer::logger::Info->printf("download set exists at '%s'\n", $ext_sources_filename);

+        if ($release_item->{'checksum-type'} eq 'sha256')

+        {

+            $installer::logger::Info->printf("checking SHA256 checksum\n");

+            my $digest = Digest->new("SHA-256");

+            open my $in, "<", $ext_sources_filename;

+            $digest->addfile($in);

+            close $in;

+            if ($digest->hexdigest() ne $release_item->{'checksum-value'})

+            {

+                $installer::logger::Info->printf("    mismatch\n", $ext_sources_filename);

+                $need_download = 1;

+            }

+            else

+            {

+                $installer::logger::Info->printf("    match\n");

+            }

+        }

+    }

+

+    if ($need_download)

+    {

+        if ( ! installer::patch::InstallationSet::Download(

+            $language,

+            $release_item,

+            $ext_sources_filename))

+        {

+            return 0;

+        }

+        if ( ! -f $ext_sources_filename)

+        {

+            $installer::logger::Info->printf("download set could not be downloaded\n");

+            return 0;

+        }

+    }

+

+    return $ext_sources_filename;

+}

+

+1;

diff --git a/main/solenv/bin/modules/installer/patch/Msi.pm b/main/solenv/bin/modules/installer/patch/Msi.pm
new file mode 100644
index 0000000..1a2792d
--- /dev/null
+++ b/main/solenv/bin/modules/installer/patch/Msi.pm
@@ -0,0 +1,342 @@
+#**************************************************************

+#  

+#  Licensed to the Apache Software Foundation (ASF) under one

+#  or more contributor license agreements.  See the NOTICE file

+#  distributed with this work for additional information

+#  regarding copyright ownership.  The ASF licenses this file

+#  to you under the Apache License, Version 2.0 (the

+#  "License"); you may not use this file except in compliance

+#  with the License.  You may obtain a copy of the License at

+#  

+#    http://www.apache.org/licenses/LICENSE-2.0

+#  

+#  Unless required by applicable law or agreed to in writing,

+#  software distributed under the License is distributed on an

+#  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY

+#  KIND, either express or implied.  See the License for the

+#  specific language governing permissions and limitations

+#  under the License.

+#  

+#**************************************************************

+

+package installer::patch::Msi;

+

+use installer::patch::MsiTable;

+use installer::patch::Tools;

+use strict;

+

+

+=head1 NAME

+

+    package installer::patch::Msi - Class represents a single MSI file and gives access to its tables.

+

+=cut

+

+

+

+=head2 new($class, $version, $language, $product_name)

+

+    Create a new object of the Msi class.  The values of $version, $language, and $product_name define

+    where to look for the msi file.

+

+    If construction fails then IsValid() will return false.

+

+=cut

+sub new ($$$$)

+{

+    my ($class, $version, $language, $product_name) = @_;

+

+    my $path = installer::patch::InstallationSet::GetUnpackedMsiPath(

+        $version,

+        $language,

+        "msi",

+        $product_name);

+

+    # Find the msi in the path.

+    my $filename = undef;

+    if ( -d $path)

+    {

+        my @msi_files = glob(File::Spec->catfile($path, "*.msi"));

+        if (scalar @msi_files != 1)

+        {

+            printf STDERR ("there are %d msi files in %s, should be 1", scalar @msi_files, $filename);

+            $filename = "";

+        }

+        else

+        {

+            $filename = $msi_files[0];

+        }

+    }

+    else

+    {

+        installer::logger::PrintError("can not access path '%s' to find msi\n", $path);

+        return undef;

+    }

+

+    if ( ! -f $filename)

+    {

+        installer::logger::PrintError("can not access MSI file at '%s'\n", $filename);

+        return undef;

+    }

+    

+    my $self = {

+        'filename' => $filename,

+        'path' => $path,

+        'version' => $version,

+        'language' => $language,

+        'package_format' => "msi",

+        'product_name' => $product_name,

+        'tmpdir' => File::Temp->newdir(CLEANUP => 1),

+        'is_valid' => -f $filename

+    };

+    bless($self, $class);

+

+    return $self;

+}

+

+

+

+

+sub IsValid ($)

+{

+    my ($self) = @_;

+

+    return $self->{'is_valid'};

+}

+

+

+

+

+=head2 GetTable($seld, $table_name)

+

+    Return an MsiTable object for $table_name.  Table objects are kept

+    alive for the life time of the Msi object.  Therefore the second

+    call for the same table is very cheap.

+

+=cut

+sub GetTable ($$)

+{

+    my ($self, $table_name) = @_;

+

+    my $table = $self->{'tables'}->{$table_name};

+    if ( ! defined $table)

+    {

+        my $table_filename = File::Spec->catfile($self->{'tmpdir'}, $table_name .".idt");

+        if ( ! -f $table_filename

+            || ! EnsureAYoungerThanB($table_filename, $self->{'fullname'}))

+        {

+            # Extract table from database to text file on disk.

+            my $truncated_table_name = length($table_name)>8 ? substr($table_name,0,8) : $table_name;

+            my $command = join(" ",

+                "msidb.exe",

+                "-d", installer::patch::Tools::CygpathToWindows($self->{'filename'}),

+                "-f", installer::patch::Tools::CygpathToWindows($self->{'tmpdir'}),

+                "-e", $table_name);

+            my $result = qx($command);

+            print $result;

+        }

+

+        # Read table into memory.

+        $table = new installer::patch::MsiTable($table_filename, $table_name);

+        $self->{'tables'}->{$table_name} = $table;

+    }

+

+    return $table;

+}

+

+

+

+

+=head2 EnsureAYoungerThanB ($filename_a, $filename_b)

+

+    Internal function (not a method) that compares to files according

+    to their last modification times (mtime).

+

+=cut

+sub EnsureAYoungerThanB ($$)

+{

+    my ($filename_a, $filename_b) = @_;

+

+    die("file $filename_a does not exist") unless -f $filename_a;

+    die("file $filename_b does not exist") unless -f $filename_b;

+    

+    my @stat_a = stat($filename_a);

+    my @stat_b = stat($filename_b);

+

+    if ($stat_a[9] <= $stat_b[9])

+    {

+        return 0;

+    }

+    else

+    {

+        return 1;

+    }

+}

+

+

+

+

+=head2 SplitLongShortName($name)

+

+    Split $name (typically from the 'FileName' column in the 'File'

+    table or 'DefaultDir' column in the 'Directory' table) at the '|'

+    into short (8.3) and long names.  If there is no '|' in $name then

+    $name is returned as both short and long name.

+

+    Returns long and short name (in this order) as array.

+

+=cut

+sub SplitLongShortName ($)

+{

+    my ($name) = @_;

+    

+    if ($name =~ /^([^\|]*)\|(.*)$/)

+    {

+        return ($2,$1);

+    }

+    else

+    {

+        return ($name,$name);

+    }

+}

+

+

+

+=head2 SplitTargetSourceLongShortName ($name)

+

+    Split $name first at the ':' into target and source parts and each

+    of those at the '|'s into long and short parts.  Names that follow

+    this pattern come from the 'DefaultDir' column in the 'Directory'

+    table.

+

+=cut

+sub SplitTargetSourceLongShortName ($)

+{

+    my ($name) = @_;

+    

+    if ($name =~ /^([^:]*):(.*)$/)

+    {

+        return (installer::patch::Msi::SplitLongShortName($1), installer::patch::Msi::SplitLongShortName($2));

+    }

+    else

+    {

+        my ($long,$short) = installer::patch::Msi::SplitLongShortName($name);

+        return ($long,$short,$long,$short);

+    }

+}

+

+

+

+

+=head2 GetFileToDirectoryMap ($)

+

+    Return a map (hash) that maps the unique name (column 'File' in

+    the 'File' table) to its directory names.  Each value is a

+    reference to an array of two elements: the source path and the

+    target path.

+

+    The map is kept alive for the lifetime of the Msi object.  All

+    calls but the first are cheap.

+

+=cut

+sub GetFileToDirectoryMap ($)

+{

+    my ($self) = @_;

+

+    if (defined $self->{'FileToDirectoryMap'})

+    {

+        return $self->{'FileToDirectoryMap'};

+    }

+

+    my $file_table = $self->GetTable("File");

+    my $directory_table = $self->GetTable("Directory");

+    my $component_table = $self->GetTable("Component");

+    $installer::logger::Info->printf("got access to tables File, Directory, Component\n");

+

+    my %dir_map = ();

+    foreach my $row (@{$directory_table->GetAllRows()})

+    {

+        my ($target_name, undef, $source_name, undef)

+            = installer::patch::Msi::SplitTargetSourceLongShortName($row->GetValue("DefaultDir"));

+        $dir_map{$row->GetValue("Directory")} = {

+            'parent' => $row->GetValue("Directory_Parent"),

+            'source_name' => $source_name,

+            'target_name' => $target_name};

+    }

+

+    # Set up full names for all directories.

+    my @todo = map {$_} (keys %dir_map);

+    my $process_count = 0;

+    my $push_count = 0;

+    while (scalar @todo > 0)

+    {

+        ++$process_count;

+

+        my $key = shift @todo;

+        my $item = $dir_map{$key};

+        next if defined $item->{'full_source_name'};

+

+        if ($item->{'parent'} eq "")

+        {

+            # Directory has no parent => full names are the same as the name.

+            $item->{'full_source_name'} = $item->{'source_name'};

+            $item->{'full_target_name'} = $item->{'target_name'};

+        }

+        else

+        {

+            my $parent = $dir_map{$item->{'parent'}};

+            if ( defined $parent->{'full_source_name'})

+            {

+                # Parent aleady has full names => we can create the full name of the current item.

+                $item->{'full_source_name'} = $parent->{'full_source_name'} . "/" . $item->{'source_name'};

+                $item->{'full_target_name'} = $parent->{'full_target_name'} . "/" . $item->{'target_name'};

+            }

+            else

+            {

+                # Parent has to be processed before the current item can be processed.

+                # Push both to the head of the list.

+                unshift @todo, $key;

+                unshift @todo, $item->{'parent'};

+

+                ++$push_count;

+            }

+        }

+    }

+

+    foreach my $key (keys %dir_map)

+    {

+        $dir_map{$key}->{'full_source_name'} =~ s/\/(\.\/)+/\//g;

+        $dir_map{$key}->{'full_source_name'} =~ s/^SourceDir\///;

+        $dir_map{$key}->{'full_target_name'} =~ s/\/(\.\/)+/\//g;

+        $dir_map{$key}->{'full_target_name'} =~ s/^SourceDir\///;

+    }

+    $installer::logger::Info->printf("for %d directories there where %d processing steps and %d pushes\n",

+        $directory_table->GetRowCount(),

+        $process_count,

+        $push_count);

+

+    # Setup a map from component names to directory items.

+    my %component_to_directory_map = map {$_->GetValue('Component') => $_->GetValue('Directory_')} @{$component_table->GetAllRows()};

+

+    # Finally, create the map from files to directories.

+    my $map = {};

+    my $file_component_index = $file_table->GetColumnIndex("Component_");

+    my $file_file_index = $file_table->GetColumnIndex("File");

+    foreach my $file_row (@{$file_table->GetAllRows()})

+    {

+        my $component_name = $file_row->GetValue($file_component_index);

+        my $directory_name = $component_to_directory_map{$component_name};

+        my $dir_item = $dir_map{$directory_name};

+        my $unique_name = $file_row->GetValue($file_file_index);

+        $map->{$unique_name} = [$dir_item->{'full_source_name'},$dir_item->{'full_target_name'}];

+    } 

+

+    $installer::logger::Info->printf("got full paths for %d files\n",

+        $file_table->GetRowCount());

+

+    $self->{'FileToDirectoryMap'} = $map;

+    return $map;

+}

+

+

+1;

diff --git a/main/solenv/bin/modules/installer/patch/MsiRow.pm b/main/solenv/bin/modules/installer/patch/MsiRow.pm
new file mode 100644
index 0000000..25cfe59
--- /dev/null
+++ b/main/solenv/bin/modules/installer/patch/MsiRow.pm
@@ -0,0 +1,160 @@
+#**************************************************************

+#  

+#  Licensed to the Apache Software Foundation (ASF) under one

+#  or more contributor license agreements.  See the NOTICE file

+#  distributed with this work for additional information

+#  regarding copyright ownership.  The ASF licenses this file

+#  to you under the Apache License, Version 2.0 (the

+#  "License"); you may not use this file except in compliance

+#  with the License.  You may obtain a copy of the License at

+#  

+#    http://www.apache.org/licenses/LICENSE-2.0

+#  

+#  Unless required by applicable law or agreed to in writing,

+#  software distributed under the License is distributed on an

+#  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY

+#  KIND, either express or implied.  See the License for the

+#  specific language governing permissions and limitations

+#  under the License.

+#  

+#**************************************************************

+

+package installer::patch::MsiRow;

+

+=head1 NAME

+

+    package installer::patch::MsiRow - Class that represents a single row of an Msi table.

+

+=cut

+

+

+=head2 new ($class, $table, @data)

+

+    Create a new MsiRow object for the given table row data.  Each row

+    stores a reference to its $table so that it can access global

+    values like column names.

+

+=cut

+sub new ($$@)

+{

+    my ($class, $table, @data) = @_;

+

+    my $self = {

+        'table' => $table,

+        'values' => [@data]

+    };

+    bless($self, $class);

+

+    my $column_count = $table->GetColumnCount();

+    while (scalar @{$self->{'values'}} < $column_count)

+    {

+        push @{$self->{'values'}}, "";

+    }

+

+    return $self;

+}

+

+

+

+=head2 GetValue($self, $column)

+

+    Return the value in the column specified by $column, which can be

+    either the column name or the index of the column.

+

+=cut

+sub GetValue ($$)

+{

+    my ($self, $column) = @_;

+

+    if ($column =~ /^\d+$/)

+    {

+        return $self->{'values'}->[$column];

+    }

+    else

+    {

+        my $column_index = $self->{'table'}->GetColumnIndex($column);

+        return $self->{'values'}->[$column_index];

+    }

+}

+

+

+

+

+sub SetValue ($$$)

+{

+    my ($self, $column, $value) = @_;

+

+    if ($column =~ /^\d+$/)

+    {

+        $self->{'values'}->[$column] = $value;

+    }

+    else

+    {

+        my $column_index = $self->{'table'}->GetColumnIndex($column);

+        $self->{'values'}->[$column_index] = $value;

+    }

+    $self->{'table'}->MarkAsModified();

+}

+

+

+

+

+sub Format ($$)

+{

+    my $self = shift;

+    my $concatenation = shift;

+

+    my $result = "";

+    my $first = 1;

+    my $index = 0;

+    my $column_count = $self->{'table'}->GetColumnCount();

+    foreach my $item (@{$self->{'values'}})

+    {

+        ++$index;

+        

+        if ( ! $first)

+        {

+            $result .= $concatenation;

+        }

+        else

+        {

+            $first = 0;

+        }

+        $result .= $item;

+    }

+    return $result;

+}

+

+

+

+

+sub Clone ($$)

+{

+    my ($self, $new_table) = @_;

+

+    my $clone = { %$self };

+    $clone->{'values'} = [ @{$self->{'values'}} ];

+    $clone->{'table'} = $new_table;

+    bless($clone, "MsiRow");

+

+    return $clone;

+}

+

+

+

+

+sub SetTable ($$)

+{

+    my ($self, $new_table) = @_;

+

+    if (defined $self->{'table'} && $self->{'table'} != $new_table)

+    {

+        MsiTools::Die("can not reset table of row");

+    }

+    else

+    {

+        $self->{'table'} = $new_table;

+    }

+}

+

+1;

diff --git a/main/solenv/bin/modules/installer/patch/MsiTable.pm b/main/solenv/bin/modules/installer/patch/MsiTable.pm
new file mode 100644
index 0000000..f977e07
--- /dev/null
+++ b/main/solenv/bin/modules/installer/patch/MsiTable.pm
@@ -0,0 +1,274 @@
+#**************************************************************

+#  

+#  Licensed to the Apache Software Foundation (ASF) under one

+#  or more contributor license agreements.  See the NOTICE file

+#  distributed with this work for additional information

+#  regarding copyright ownership.  The ASF licenses this file

+#  to you under the Apache License, Version 2.0 (the

+#  "License"); you may not use this file except in compliance

+#  with the License.  You may obtain a copy of the License at

+#  

+#    http://www.apache.org/licenses/LICENSE-2.0

+#  

+#  Unless required by applicable law or agreed to in writing,

+#  software distributed under the License is distributed on an

+#  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY

+#  KIND, either express or implied.  See the License for the

+#  specific language governing permissions and limitations

+#  under the License.

+#  

+#**************************************************************

+

+package installer::patch::MsiTable;

+

+=head1 NAME

+

+    package installer::patch::MsiTable - Class that represents one table of an Msi file.

+

+=cut

+    

+use installer::patch::MsiRow;

+

+use strict;

+

+=head new ($class, $filename, $table_name)

+

+    Create a new MsiTable object from the output of a previous

+    msidb.exe run.  The table is named $table_name, its data is read

+    from $filename.

+

+=cut

+sub new ($$$)

+{

+    my ($class, $filename, $table_name) = @_;

+

+    my $self = {

+        'name' => $table_name,

+        'is_valid' => 1

+    };

+    bless($self, $class);

+

+    if ( -f $filename)

+    {

+        $self->ReadFile($filename);

+    }

+    return $self;

+}

+

+

+

+

+sub IsValid ($)

+{

+    my ($self) = @_;

+    return $self->{'is_valid'};

+}

+

+

+

+

+sub Trim ($)

+{

+    my $line = shift;

+

+    $line =~ s/(^\s+|\s+$)//g;

+

+    return $line;

+}

+

+

+

+=head2 ReadFile($self, $filename)

+

+    Read the content of the table from the specified .idt file.

+    For each row a MsiRow object is appended to $self->{'rows'}.

+

+=cut

+sub ReadFile ($$)

+{

+    my ($self, $filename) = @_;

+

+    if ( ! (-f $filename && -r $filename))

+    {

+        printf STDERR ("can not open idt file %s for reading\n", $filename);

+        $self->{'is_valid'} = 0;

+        return;

+    }

+    

+    open my $in, "<", $filename;

+

+    my $columns = Trim(<$in>);

+    $self->{'columns'} = [split(/\t/, $columns)];

+

+    my $column_specs = Trim(<$in>);

+    $self->{'column_specs'} = [split(/\t/, $column_specs)];

+

+    # Table name, index columns.

+    my $line = Trim(<$in>);

+    my @items = split(/\t/, $line);

+    if (scalar @items == 3)

+    {

+        $self->{'codepage'} = shift @items;

+    }

+    my $table_name = shift @items;

+    if ($table_name ne $self->{'name'})

+    {

+        printf STDERR ("reading wrong table data for table '%s' (got %s)\n", $self->{'name'}, $table_name);

+        $self->{'is_valid'} = 0;

+        return;

+    }

+    $self->{'index_columns'} = [@items];

+    $self->{'index_column_index'} = $self->GetColumnIndex($items[0]);

+

+    my $rows = [];

+    while (<$in>)

+    {

+        # Remove all trailing returns and newlines.  Keep trailing spaces and tabs.

+        s/[\r\n]+$//g;

+        

+        my @items = split(/\t/, $_);

+        push @$rows, new installer::patch::MsiRow($self, @items);

+    }

+    $self->{'rows'} = $rows;

+

+    return $self;

+}

+

+

+

+=head2 GetColumnCount($self)

+

+    Return the number of columns in the table.

+    

+=cut

+sub GetColumnCount ($)

+{

+    my ($self) = @_;

+

+    return scalar @{$self->{'columns'}};

+}

+

+

+

+

+=head2 GetRowCount($self)

+

+    Return the number of rows in the table.

+    

+=cut

+sub GetRowCount ($)

+{

+    my ($self) = @_;

+

+    return scalar @{$self->{'rows'}};

+}

+

+

+

+

+=head2 GetColumnIndx($self, $column_name)

+

+    Return the 0 based index of the column named $column_name.  Use

+    this to speed up (slightly) access to column values when accessing

+    many or all rows of a table.

+

+=cut

+sub GetColumnIndex ($$)

+{

+    my ($self, $column_name) = @_;

+

+    my $index = 0;

+    foreach my $name (@{$self->{'columns'}})

+    {

+        if ($name eq $column_name)

+        {

+            return $index;

+        }

+        ++$index;

+    }

+

+    printf STDERR ("did not find column %s in %s\n", $column_name, join(" and ", @{$self->{'columns'}}));

+    return -1;

+}

+

+

+

+

+=head2 GetValue($self, $selector_column, $selector_column_value, $value_column)

+

+    Find the row in which the $selector_column has value

+    $selector_column_value and return its value in the $value_column.

+

+=cut

+    

+sub GetValue ($$$$)

+{

+    my ($self, $selector_column, $selector_column_value, $value_column) = @_;

+

+    my $row = $self->GetRow($selector_column, $selector_column_value);

+    if (defined $row)

+    {

+        return $row->GetValue($value_column);

+    }

+    else

+    {

+        return undef;

+    }

+}

+

+

+

+

+=head2 GetRow($self, $column, $value)

+

+    Return the (first) row which has $value in $column.

+    

+=cut

+sub GetRow ($$$)

+{

+    my ($self, $column, $value) = @_;

+

+    my $column_index = $self->GetColumnIndex($column);

+    if ($column_index<0)

+    {

+        printf STDERR "ERROR: unknown column $column in table $self->{'name'}\n";

+        return undef;

+    }

+    

+    foreach my $row (@{$self->{'rows'}})

+    {

+        if ($row->GetValue($column_index) eq $value)

+        {

+            return $row;

+        }

+    }

+

+    printf STDERR ("ERROR: did not find row for %s->%s in %s\n",

+        $column,

+        $value,

+        table $self->{'name'});

+        

+    return undef;

+}

+

+

+

+

+=head2 GetAllRows ($self)

+

+    Return the reference to an array that contains all rows of the table.

+    

+=cut

+    

+sub GetAllRows ($)

+{

+    my $self = shift;

+

+    return $self->{'rows'};

+}

+

+

+

+

+

+1;

diff --git a/main/solenv/bin/modules/installer/patch/ReleasesList.pm b/main/solenv/bin/modules/installer/patch/ReleasesList.pm
new file mode 100644
index 0000000..09159a2
--- /dev/null
+++ b/main/solenv/bin/modules/installer/patch/ReleasesList.pm
@@ -0,0 +1,210 @@
+#**************************************************************

+#  

+#  Licensed to the Apache Software Foundation (ASF) under one

+#  or more contributor license agreements.  See the NOTICE file

+#  distributed with this work for additional information

+#  regarding copyright ownership.  The ASF licenses this file

+#  to you under the Apache License, Version 2.0 (the

+#  "License"); you may not use this file except in compliance

+#  with the License.  You may obtain a copy of the License at

+#  

+#    http://www.apache.org/licenses/LICENSE-2.0

+#  

+#  Unless required by applicable law or agreed to in writing,

+#  software distributed under the License is distributed on an

+#  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY

+#  KIND, either express or implied.  See the License for the

+#  specific language governing permissions and limitations

+#  under the License.

+#  

+#**************************************************************

+

+package installer::patch::ReleasesList;

+

+use XML::LibXML;

+use File::Spec;

+use strict;

+

+=head1 NAME

+

+    package installer::patch::ReleasesList  -  Functions for accessing the instsetoo_native/data/releases.xml file

+

+=cut

+

+

+my $Instance = undef;

+

+=head2 Instance()

+

+    Return the singleton instance.

+    

+=cut

+sub Instance()

+{

+    if ( ! defined $Instance)

+    {

+        $Instance = new installer::patch::ReleasesList();

+    }

+    return $Instance;

+}

+

+

+

+

+=head2 new($class)

+

+    Internal constructor.  Don't call.

+

+=cut

+sub new ($)

+{

+    my ($class) = @_;

+

+    my $self = {};

+    bless($self, $class);

+

+    $self->Read();

+

+    return $self;

+}

+

+

+

+

+=head2 GetFirstChild ($node, $child_name)

+

+    Internal function that returns the first child.  Use only when the

+    first child is the (expected) only child in a list.

+

+=cut

+sub GetFirstChild ($$)

+{

+    my ($node, $child_name) = @_;

+

+    if ( ! defined $node)

+    {

+        return undef;

+    }

+    else

+    {

+        my @child_nodes = $node->getElementsByTagName($child_name);

+        if (scalar @child_nodes == 0)

+        {

+            return undef;

+        }

+        else

+        {

+            return $child_nodes[0];

+        }

+    }

+}

+

+

+

+

+=head2 GetText ($node)

+

+    Internal function that returns the trimmed text content of a node.

+

+=cut

+sub GetText ($)

+{

+    my ($node) = @_;

+

+    if ( ! defined $node)

+    {

+        return "";

+    }

+    else

+    {

+        my $text = $node->textContent();

+        $text =~ s/(^\s+|\s+$)//g;

+        return $text;

+    }

+}

+

+

+

+

+=head2 Read($self)

+

+    Read the releases.xml file as doctree and parse its content.

+

+=cut

+sub Read ($)

+{

+    my ($self) = @_;

+

+    my $filename = File::Spec->catfile($ENV{'SRC_ROOT'}, "instsetoo_native", "data", "releases.xml");

+    my $parser = XML::LibXML->new();

+    my $document = $parser->parse_file($filename);

+    foreach my $release_node ($document->getElementsByTagName("release"))

+    {

+        my $version_node = GetFirstChild($release_node, "version");

+        my $version = GetText($version_node);

+        next if $version eq "";

+

+        foreach my $download_node (GetFirstChild($release_node, "download"))

+        {

+            my $package_node = GetFirstChild($download_node, "package-format");

+            my $package_format = GetText($package_node);

+            next if $package_format eq "";

+

+            my $download_data = ParseDownloadData($download_node);

+            if (defined $download_data)

+            {

+                $self->{$version}->{$package_format} = $download_data;

+            }

+        }

+    }

+

+}

+

+

+

+

+=head2 ParseDownloadData ($download_node)

+

+    Parse the data for one set of download data (there is one per release and package format).

+

+=cut

+sub ParseDownloadData ($)

+{

+    my ($download_node) = @_;

+

+    my $url_node = GetFirstChild($download_node, "url-template");

+    my $url_template = GetText($url_node);

+    if ($url_template eq "")

+    {

+        print STDERR "releases data file corrupt (no URL template)\n";

+        return undef;

+    }

+

+    my $download_data = {};

+    foreach my $item_node (@{$download_node->getElementsByTagName("item")})

+    {

+        my $language = GetText(GetFirstChild($item_node, "language"));

+        my $checksum_node = GetFirstChild($item_node, "checksum");

+        if ( ! defined $checksum_node)

+        {

+            print STDERR "releases data file corrupt (item has no 'checksum' node)\n";

+            return undef;

+        }

+        my $checksum_type = $checksum_node->getAttribute("type");

+        my $checksum_value = GetText($checksum_node);

+        my $file_size = GetText(GetFirstChild($item_node, "size"));

+        

+        my $url = $url_template;

+                $url =~ s/\%L/$language/g;

+        $download_data->{$language} = {

+            'URL' => $url,

+            'checksum-type' => $checksum_type,

+            'checksum-value' => $checksum_value,

+            'file-size' => $file_size

+        };

+    }

+

+    return $download_data;

+}

+

+1;

diff --git a/main/solenv/bin/modules/installer/patch/Tools.pm b/main/solenv/bin/modules/installer/patch/Tools.pm
new file mode 100644
index 0000000..ef42add
--- /dev/null
+++ b/main/solenv/bin/modules/installer/patch/Tools.pm
@@ -0,0 +1,47 @@
+#**************************************************************

+#  

+#  Licensed to the Apache Software Foundation (ASF) under one

+#  or more contributor license agreements.  See the NOTICE file

+#  distributed with this work for additional information

+#  regarding copyright ownership.  The ASF licenses this file

+#  to you under the Apache License, Version 2.0 (the

+#  "License"); you may not use this file except in compliance

+#  with the License.  You may obtain a copy of the License at

+#  

+#    http://www.apache.org/licenses/LICENSE-2.0

+#  

+#  Unless required by applicable law or agreed to in writing,

+#  software distributed under the License is distributed on an

+#  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY

+#  KIND, either express or implied.  See the License for the

+#  specific language governing permissions and limitations

+#  under the License.

+#  

+#**************************************************************

+

+package installer::patch::Tools;

+

+=head1 NAME

+

+    package installer::patch::Tools - Collection of functions that don't fit anywhere else

+

+=cut

+

+

+

+

+=head2 CygpathToWindows ($path)

+

+    Convert the given path with the 'cygpath' command into Windows format.  Quote backslashes.

+

+=cut

+sub CygpathToWindows($)

+{

+    my ($path) = @_;

+    my $windows_path = qx(cygpath -w "$path");

+    $windows_path =~ s/(^\s+|\s+$)//g;

+    $windows_path =~ s/\\/\\\\/g;

+    return $windows_path;

+}

+

+1;

diff --git a/main/solenv/bin/modules/installer/patch/Version.pm b/main/solenv/bin/modules/installer/patch/Version.pm
new file mode 100644
index 0000000..ec15195
--- /dev/null
+++ b/main/solenv/bin/modules/installer/patch/Version.pm
@@ -0,0 +1,74 @@
+#**************************************************************
+#  
+#  Licensed to the Apache Software Foundation (ASF) under one
+#  or more contributor license agreements.  See the NOTICE file
+#  distributed with this work for additional information
+#  regarding copyright ownership.  The ASF licenses this file
+#  to you under the Apache License, Version 2.0 (the
+#  "License"); you may not use this file except in compliance
+#  with the License.  You may obtain a copy of the License at
+#  
+#    http://www.apache.org/licenses/LICENSE-2.0
+#  
+#  Unless required by applicable law or agreed to in writing,
+#  software distributed under the License is distributed on an
+#  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+#  KIND, either express or implied.  See the License for the
+#  specific language governing permissions and limitations
+#  under the License.
+#  
+#**************************************************************
+
+package installer::patch::Version;
+
+
+=head1 NAME
+
+    package installer::patch::Version - Functions for handling version numbers.
+
+=cut
+
+
+
+# We handle version numbers that consist of three parts: major, minor and micro version number.
+my $VersionPartCount = 3;
+
+
+
+=head StringToNumberArray($version_string)
+
+    Convert a version string (where the individual parts are separated by '.') into an array of three numbers.
+    Missing numbers are filled with 0.
+
+    Returns an array with three elements (major, minor, micro).
+=cut
+sub StringToNumberArray ($)
+{
+    my ($version_string) = @_;
+
+    my @version_parts = split(/\./, $version_string);
+    while (scalar @version_parts < $VersionPartCount)
+    {
+        push @version_parts, "0";
+    }
+    return @version_parts;
+}
+
+
+
+
+=head ArrayToDirectoryName (@)
+
+    Return a directory name (without any path) for the given array of version numbers.
+    
+=cut
+sub ArrayToDirectoryName (@)
+{
+    return "v-".join("-", @_);
+}
+
+
+
+
+
+1;
diff --git a/main/solenv/bin/modules/installer/windows/component.pm b/main/solenv/bin/modules/installer/windows/component.pm
index a4205bd..ade6d4b 100644
--- a/main/solenv/bin/modules/installer/windows/component.pm
+++ b/main/solenv/bin/modules/installer/windows/component.pm
@@ -46,11 +46,6 @@
 	# At this time only a template
 	my $returnvalue = "\{COMPONENTGUID\}";
 	
-	if (( $installer::globals::updatedatabase ) && ( exists($componentidhashref->{$componentname}) ))
-	{
-		$returnvalue = $componentidhashref->{$componentname};
-	}
-	
 	# Returning a ComponentID, that is assigned in scp project
 	if ( exists($installer::globals::componentid{$componentname}) )
 	{
diff --git a/main/solenv/bin/modules/installer/windows/directory.pm b/main/solenv/bin/modules/installer/windows/directory.pm
index fae2105..76fec6c 100644
--- a/main/solenv/bin/modules/installer/windows/directory.pm
+++ b/main/solenv/bin/modules/installer/windows/directory.pm
@@ -358,8 +358,7 @@
 	my ($directoryref, $shortdirnamehashref) = @_;
 
 	my @shortnames = ();
-	if ( $installer::globals::updatedatabase ) { @shortnames = values(%{$shortdirnamehashref}); }
-	elsif ( $installer::globals::prepare_winpatch ) { @shortnames = values(%installer::globals::saved83dirmapping); }
+	if ( $installer::globals::prepare_winpatch ) { @shortnames = values(%installer::globals::saved83dirmapping); }
 
 	for ( my $i = 0; $i <= $#{$directoryref}; $i++ )
 	{		
@@ -371,11 +370,7 @@
 		# installer::pathanalyzer::make_absolute_filename_to_relative_filename(\$hostname);	# making program/classes to classes
 		my $uniquename = $onedir->{'uniquename'};
 		my $shortstring;
-		if (( $installer::globals::updatedatabase ) && ( exists($shortdirnamehashref->{$uniquename}) ))
-		{
-			$shortstring = $shortdirnamehashref->{$uniquename};			
-		}
-		elsif (( $installer::globals::prepare_winpatch ) && ( exists($installer::globals::saved83dirmapping{$uniquename}) ))
+		if (( $installer::globals::prepare_winpatch ) && ( exists($installer::globals::saved83dirmapping{$uniquename}) ))
 		{
 			$shortstring = $installer::globals::saved83dirmapping{$uniquename};
 		}
diff --git a/main/solenv/bin/modules/installer/windows/file.pm b/main/solenv/bin/modules/installer/windows/file.pm
index ec1955a..05a39e8 100644
--- a/main/solenv/bin/modules/installer/windows/file.pm
+++ b/main/solenv/bin/modules/installer/windows/file.pm
@@ -377,16 +377,7 @@
 	installer::pathanalyzer::make_absolute_filename_to_relative_filename(\$uniquefilename);	# making /registry/schema/org/openoffice/VCL.xcs to VCL.xcs 
 
 	# Reading unique filename with help of "Component_" in File table from old database	
-	if (( $installer::globals::updatedatabase ) && ( exists($uniquefilenamehashref->{"$component/$uniquefilename"}) ))
-	{
-		$uniquefilename = $uniquefilenamehashref->{"$component/$uniquefilename"};  # syntax of $value: ($uniquename;$shortname)
-		if ( $uniquefilename =~ /^\s*(.*?)\;\s*(.*?)\s*$/ ) { $uniquefilename = $1; }
- 		$lcuniquefilename = lc($uniquefilename);
-		$installer::globals::alluniquefilenames{$uniquefilename} = 1;
-		$installer::globals::alllcuniquefilenames{$lcuniquefilename} = 1;
-		return $uniquefilename;
-	}
-	elsif (( $installer::globals::prepare_winpatch ) && ( exists($installer::globals::savedmapping{"$component/$uniquefilename"}) ))
+	if (( $installer::globals::prepare_winpatch ) && ( exists($installer::globals::savedmapping{"$component/$uniquefilename"}) ))
 	{
 		# If we have a FTK mapping for this component/file, use it.
 		$installer::globals::savedmapping{"$component/$uniquefilename"} =~ m/^(.*);/;
@@ -473,13 +464,7 @@
 	my $shortstring;
 	
 	# Reading short string with help of "FileName" in File table from old database	
-	if (( $installer::globals::updatedatabase ) && ( exists($uniquefilenamehashref->{"$fileref->{'componentname'}/$filename"}) ))
-	{
-		my $value = $uniquefilenamehashref->{"$fileref->{'componentname'}/$filename"};  # syntax of $value: ($uniquename;$shortname)
-		if ( $value =~ /^\s*(.*?)\;\s*(.*?)\s*$/ ) { $shortstring = $2; } # already collected in function "collect_shortnames_from_old_database"
-		else { $shortstring = $filename; }
-	}
-	elsif (( $installer::globals::prepare_winpatch ) && ( exists($installer::globals::savedmapping{"$fileref->{'componentname'}/$filename"}) ))
+	if (( $installer::globals::prepare_winpatch ) && ( exists($installer::globals::savedmapping{"$fileref->{'componentname'}/$filename"}) ))
 	{
 		$installer::globals::savedmapping{"$fileref->{'componentname'}/$filename"} =~ m/.*;(.*)/;
 		if ($1 ne '')
@@ -567,89 +552,6 @@
 }
 
 #############################################
-# Returning the sequence for a file
-#############################################
-
-sub get_sequence_for_file
-{
-	my ($number, $onefile, $fileentry, $allupdatesequenceshashref, $allupdatecomponentshashref, $allupdatefileorderhashref, $allfilecomponents) = @_;
-
-	my $sequence = "";
-	my $infoline = "";
-	my $pffcomponentname = $onefile->{'componentname'} . "_pff";
-	
-	if ( $installer::globals::updatedatabase )
-	{
-		if (( exists($allupdatesequenceshashref->{$onefile->{'uniquename'}}) ) &&
-		    (( $onefile->{'componentname'} eq $allupdatecomponentshashref->{$onefile->{'uniquename'}} ) ||
-		     ( $pffcomponentname eq $allupdatecomponentshashref->{$onefile->{'uniquename'}} )))
-		{
-			# The second condition is necessary to find shifted files, that have same "uniquename", but are now
-			# located in another directory. This can be seen at the component name.
-			$sequence = $allupdatesequenceshashref->{$onefile->{'uniquename'}};
-			$onefile->{'assignedsequencenumber'} = $sequence;
-			# Collecting all used sequences, to guarantee, that no number is unused
-			$installer::globals::allusedupdatesequences{$sequence} = 1;
-			# Special help for files, that already have a "pff" component name (for example after ServicePack 1)
-			if ( $pffcomponentname eq $allupdatecomponentshashref->{$onefile->{'uniquename'}} )
-			{
-				$infoline = "Warning: Special handling for component \"$pffcomponentname\". This file was added after the final, but before this ServicePack.\n";
-				$installer::logger::Lang->print($infoline);
-				$onefile->{'componentname'} = $pffcomponentname; # pff for "post final file"				
-				$fileentry->{'Component_'} = $onefile->{'componentname'};
-				if ( ! exists($allfilecomponents->{$fileentry->{'Component_'}}) ) { $allfilecomponents->{$fileentry->{'Component_'}} = 1; }
-			}
-		}
-		else
-		{
-			$installer::globals::updatesequencecounter++;
-			$sequence = $installer::globals::updatesequencecounter;
-			$onefile->{'assignedsequencenumber'} = $sequence;
-			# $onefile->{'assignedcabinetfile'} = $installer::globals::pffcabfilename; # assigning to cabinet file for "post final files"
-			# Collecting all new files
-			$installer::globals::newupdatefiles{$sequence} = $onefile;
-			# Saving in sequence hash
-			$allupdatefileorderhashref->{$sequence} = $onefile->{'uniquename'};
-			
-			# If the new file is part of an existing component, this must be changed now. All files
-			# of one component have to be included in one cabinet file. But because the order must 
-			# not change, all new files have to be added to new components.
-			# $onefile->{'componentname'} = $file{'Component_'};
-
-			$onefile->{'componentname'} = $onefile->{'componentname'} . "_pff"; # pff for "post final file"
-			$fileentry->{'Component_'} = $onefile->{'componentname'};
-			if ( ! exists($allfilecomponents->{$fileentry->{'Component_'}}) ) { $allfilecomponents->{$fileentry->{'Component_'}} = 1; }
-			$onefile->{'PostFinalFile'} = 1;
-			# $installer::globals::pfffileexists = 1;
-			# The sequence for this file has changed. It has to be inserted at the end of the files collector.
-			$installer::globals::insert_file_at_end = 1;
-			$installer::globals::newfilescollector{$sequence} = $onefile; # Adding new files to the end of the filescollector
-			$installer::globals::newfilesexist = 1;
-		}
-	}
-	elsif (( $onefile->{'assignedsequencenumber'} ) && ( $installer::globals::use_packages_for_cabs ))
-	{
-		$sequence = $onefile->{'assignedsequencenumber'};		
-	}
-	else
-	{
-		$sequence = $number;
-		# my $sequence = $number + 1;
-
-		# Idea: Each component is packed into a cab file.
-		# This requires that all files in one cab file have sequences directly follwing each other, 
-		# for instance from 1456 to 1466. Then in the media table the LastSequence for this cab file
-		# is 1466.
-		# Because all files belonging to one component are directly behind each other in the file 
-		# collector, it is possible to use simply an increasing number as sequence value. 
-		# If files belonging to one component are not directly behind each other in the files collector
-		# this mechanism will no longer work.
-	}
-	
-	return $sequence;	
-}
-
-#############################################
 # Returning the Windows language of a file
 #############################################
 
@@ -693,91 +595,6 @@
 	return $keypath;	
 }
 
-####################################################################
-# Check, if in an update process files are missing. No removal
-# of files allowed for Windows Patch creation.
-# Also logging all new files, that have to be included in extra
-# components and cab files.
-####################################################################
-
-sub check_file_sequences
-{
-	my ($allupdatefileorderhashref, $allupdatecomponentorderhashref) = @_;
-	
-	# All used sequences stored in %installer::globals::allusedupdatesequences
-	# Maximum sequence number of old database stored in $installer::globals::updatelastsequence
-	# All new files stored in %installer::globals::newupdatefiles
-	
-	my $infoline = "";
-	
-	my @missing_sequences = ();
-	my @really_missing_sequences = ();
-	
-	for ( my $i = 1; $i <= $installer::globals::updatelastsequence; $i++ )
-	{
-		if ( ! exists($installer::globals::allusedupdatesequences{$i}) ) { push(@missing_sequences, $i); }
-	}
-	
-	if ( $#missing_sequences > -1 )
-	{
-		# Missing sequences can also be caused by files included in merge modules. This files are added later into the file table.
-		# Therefore now it is time to check the content of the merge modules.
-
-		for ( my $j = 0; $j <= $#missing_sequences; $j++ )
-		{
-			my $filename = $allupdatefileorderhashref->{$missing_sequences[$j]};
-			
-			# Is this a file from a merge module? Then this is no error.
-			if ( ! exists($installer::globals::mergemodulefiles{$filename}) )
-			{
-				push(@really_missing_sequences, $missing_sequences[$j]);
-			}
-		}
-	}
-
-	if ( $#really_missing_sequences > -1 )
-	{
-		my $errorstring = "";
-		for ( my $j = 0; $j <= $#really_missing_sequences; $j++ )
-		{
-			my $filename = $allupdatefileorderhashref->{$really_missing_sequences[$j]};
-			my $comp = $allupdatecomponentorderhashref->{$really_missing_sequences[$j]};
-			$errorstring = "$errorstring$filename (Sequence: $really_missing_sequences[$j], Component: \"$comp\")\n";
-		}
-
-		$infoline = "ERROR: Files are removed compared with update database.\nThe following files are missing:\n$errorstring";
-		$installer::logger::Lang->print($infoline);
-		installer::exiter::exit_program($infoline, "check_file_sequences");		
-	}
-
-	# Searching for new files
-
-	my $counter = 0;
-	
-	foreach my $key ( keys %installer::globals::newupdatefiles )
-	{
-		my $onefile = $installer::globals::newupdatefiles{$key};
-		$counter++;
-		if ( $counter == 1 )
-		{
-			$installer::logger::Lang->print("\n");
-			$installer::logger::Lang->print("New files compared to the update database:\n");
-		}
-		
-		$installer::logger::Lang->printf("%s (%s) Sequence: %s\n",
-            $onefile->{'Name'},
-            $onefile->{'gid'},
-            $onefile->{'assignedsequencenumber'});
-	}
-	
-	if ( $counter == 0 )
-	{
-		$infoline = "Info: No new file compared with update database!\n";
-		$installer::logger::Lang->print($infoline);		
-	}
-
-}
-
 ###################################################################
 # Collecting further conditions for the component table.
 # This is used by multilayer products, to enable installation 
@@ -844,7 +661,7 @@
 
 sub create_files_table
 {
-	my ($filesref, $allfilecomponentsref, $basedir, $allvariables, $uniquefilenamehashref, $allupdatesequenceshashref, $allupdatecomponentshashref, $allupdatefileorderhashref) = @_;
+	my ($filesref, $allfilecomponentsref, $basedir, $allvariables, $uniquefilenamehashref) = @_;
 
 	$installer::logger::Lang->add_timestamp("Performance Info: File Table start");
 
@@ -869,8 +686,6 @@
 	# my @shortnames = ();
 	my %shortnames = ();
 	
-	if ( $installer::globals::updatedatabase ) { collect_shortnames_from_old_database($uniquefilenamehashref, \%shortnames); }
-
 	installer::windows::idtglobal::write_idt_header(\@filetable, "file");
 	installer::windows::idtglobal::write_idt_header(\@filehashtable, "filehash");
 	
@@ -911,7 +726,7 @@
 
 		$installer::globals::insert_file_at_end = 0;
 		$counter++;
-		$file{'Sequence'} = get_sequence_for_file($counter, $onefile, \%file, $allupdatesequenceshashref, $allupdatecomponentshashref, $allupdatefileorderhashref, \%allfilecomponents);
+		$file{'Sequence'} = $counter;
 
 		$onefile->{'sequencenumber'} = $file{'Sequence'};
 
diff --git a/main/solenv/bin/modules/installer/windows/media.pm b/main/solenv/bin/modules/installer/windows/media.pm
index 772ac04..a02f29a 100644
--- a/main/solenv/bin/modules/installer/windows/media.pm
+++ b/main/solenv/bin/modules/installer/windows/media.pm
@@ -210,16 +210,7 @@
 {
 	my ( $cabfilename, $alludpatelastsequences ) = @_;
 	
-	my $sequence = 0;
-	
-	if (( $installer::globals::updatedatabase ) && ( exists($alludpatelastsequences->{$cabfilename}) ))
-	{
-		$sequence = $alludpatelastsequences->{$cabfilename};
-	}
-	else
-	{
-		$sequence = $installer::globals::lastsequence{$cabfilename};
-	}
+	my $sequence = $installer::globals::lastsequence{$cabfilename};
 
 	return $sequence;
 }
@@ -233,7 +224,7 @@
 
 sub create_media_table
 {
-	my ($filesref, $basedir, $allvariables, $alludpatelastsequences, $allupdatediskids) = @_;
+	my ($filesref, $basedir, $allvariables) = @_;
 
 	my @mediatable = ();
 	
@@ -243,105 +234,7 @@
 	
 	if ( $allvariables->{'INCLUDE_CAB_IN_MSI'} ) { $installer::globals::include_cab_in_msi = 1; }
 
-	if ( $installer::globals::use_packages_for_cabs )
-	{
-		my $cabfile;
-		foreach $cabfile ( sort keys %installer::globals::lastsequence )
-		{
-			my %media = ();
-			$diskid++;
-		
-			$media{'DiskId'} = get_media_diskid($diskid);
-			$media{'LastSequence'} = get_last_sequence($cabfile, $alludpatelastsequences);
-			$media{'DiskPrompt'} = get_media_diskprompt();
-			$media{'Cabinet'} = get_cabfilename($cabfile);
-			$media{'VolumeLabel'} = get_media_volumelabel();
-			$media{'Source'} = get_media_source();
-
-			my $oneline = $media{'DiskId'} . "\t" . $media{'LastSequence'} . "\t" . $media{'DiskPrompt'} . "\t"  
-						. $media{'Cabinet'} . "\t" . $media{'VolumeLabel'} . "\t" . $media{'Source'} . "\n";
-
-			push(@mediatable, $oneline);
-
-			# Comparing the disk id with the disk id from update database. Both have to be identical. New files have to be added
-			# to the new pff cabinet file. And existing cab files must not be removed.
-			if ( $installer::globals::updatedatabase )
-			{
-				# Comparing lines in new media table with line from media table in udpate database.
-				if ( exists($allupdatediskids->{$media{'Cabinet'}}) )
-				{
-					if ( $media{'DiskId'} != $allupdatediskids->{$media{'Cabinet'}} )
-					{
-						installer::exiter::exit_program("ERROR: Different DiskIDs for cab file \"$media{'Cabinet'}\".\nCurrent installation set: \"$media{'DiskId'}\", but update database used \"$allupdatediskids->{$media{'Cabinet'}}\".\nWere cabinet files removed or added?", "create_media_table");
-					}
-				}
-				else
-				{
-                    $installer::logger::Lang->printf(
-                        "Warning: Could not find cabinet file \"%s}\" in update database. This seems to be an new cabinet file!?\n",
-                        $media{'Cabinet'}); 
-				}
-			}
-		}
-		
-		# one new cabinet file for all files added after the final release
-		if (( $installer::globals::updatedatabase ) && ( $installer::globals::pfffileexists ))
-		{
-			my %media = ();
-			$diskid++;
-
-			$media{'DiskId'} = get_media_diskid($diskid) + $installer::globals::mergemodulenumber;  # Adding mergemodulenumber, because this files are included later
-			$media{'LastSequence'} = $installer::globals::updatesequencecounter;
-			$media{'DiskPrompt'} = get_media_diskprompt();
-			$media{'Cabinet'} = get_cabfilename($installer::globals::pffcabfilename);
-			$media{'VolumeLabel'} = get_media_volumelabel();
-			$media{'Source'} = get_media_source();
-
-			my $oneline = $media{'DiskId'} . "\t" . $media{'LastSequence'} . "\t" . $media{'DiskPrompt'} . "\t"  
-						. $media{'Cabinet'} . "\t" . $media{'VolumeLabel'} . "\t" . $media{'Source'} . "\n";
-
-			push(@mediatable, $oneline);
-		}
-		
-	}
-	elsif ( $installer::globals::cab_file_per_component )
-	{
-		for ( my $i = 0; $i <= $#{$filesref}; $i++ )
-		{
-			my $onefile = ${$filesref}[$i];
-			my $nextfile = ${$filesref}[$i+1];
-		
-			my $filecomponent = "";
-			my $nextcomponent = "";
-		
-			if ( $onefile->{'componentname'} ) { $filecomponent = $onefile->{'componentname'}; }
-			if ( $nextfile->{'componentname'} ) { $nextcomponent = $nextfile->{'componentname'}; }
-
-			if ( $filecomponent eq $nextcomponent )
-			{
-				next;		# nothing to do, this is not the last file of a component
-			}
-		
-			my %media = ();
-			$diskid++;
-		
-			$media{'DiskId'} = get_media_diskid($diskid);
-			$media{'LastSequence'} = get_media_lastsequence($onefile);
-			$media{'DiskPrompt'} = get_media_diskprompt();
-			$media{'Cabinet'} = get_media_cabinet($diskid);
-			$media{'VolumeLabel'} = get_media_volumelabel();
-			$media{'Source'} = get_media_source();
-
-			my $oneline = $media{'DiskId'} . "\t" . $media{'LastSequence'} . "\t" . $media{'DiskPrompt'} . "\t"  
-					. $media{'Cabinet'} . "\t" . $media{'VolumeLabel'} . "\t" . $media{'Source'} . "\n";
-
-			push(@mediatable, $oneline);		
-
-			$media{'Cabinet'} =~ s/^\s*\#//;	# removing leading hash
-			set_cabinetfilename_for_component_in_file_collector($media{'Cabinet'}, $filesref, $filecomponent, $i);	
-		}
-	}
-	elsif ( $installer::globals::fix_number_of_cab_files )
+	if ( $installer::globals::fix_number_of_cab_files )
 	{		
 		# number of cabfiles
 		my $maxcabfilenumber = $installer::globals::number_of_cabfiles;
@@ -409,36 +302,6 @@
 			}
 		}
 	}
-	elsif ( $installer::globals::one_cab_file )
-	{	
-		my %media = ();
-		$diskid++;
-		
-		my $maximumfile = $#{$filesref};
-
-		$media{'DiskId'} = get_media_diskid($diskid);
-		# $media{'LastSequence'} = ${$filesref}[$maximumfile]->{'sequencenumber'};	# sequence number of the last file
-		$media{'LastSequence'} = $maximumfile + 1; # This works also for unsorted file collector
-		$media{'DiskPrompt'} = get_media_diskprompt();
-		$media{'Cabinet'} = generate_cab_filename($allvariables);
-		$media{'VolumeLabel'} = get_media_volumelabel();
-		$media{'Source'} = get_media_source();
-
-		my $oneline = $media{'DiskId'} . "\t" . $media{'LastSequence'} . "\t" . $media{'DiskPrompt'} . "\t"  
-					. $media{'Cabinet'} . "\t" . $media{'VolumeLabel'} . "\t" . $media{'Source'} . "\n";
-
-		push(@mediatable, $oneline);
-
-		# Saving the cabinet file name in the file collector
-
-		$media{'Cabinet'} =~ s/^\s*\#//;	# removing leading hash
-
-		for ( my $i = 0; $i <= $#{$filesref}; $i++ )
-		{
-			my $onefile = ${$filesref}[$i];			
-			$onefile->{'cabinet'} = $media{'Cabinet'};				
-		}
-	}
 	else
 	{
 		installer::exiter::exit_program("ERROR: No cab file specification in globals.pm !", "create_media_table");
diff --git a/main/solenv/bin/modules/installer/windows/mergemodule.pm b/main/solenv/bin/modules/installer/windows/mergemodule.pm
deleted file mode 100644
index e8f2c99..0000000
--- a/main/solenv/bin/modules/installer/windows/mergemodule.pm
+++ /dev/null
@@ -1,1668 +0,0 @@
-#**************************************************************
-#  
-#  Licensed to the Apache Software Foundation (ASF) under one
-#  or more contributor license agreements.  See the NOTICE file
-#  distributed with this work for additional information
-#  regarding copyright ownership.  The ASF licenses this file
-#  to you under the Apache License, Version 2.0 (the
-#  "License"); you may not use this file except in compliance
-#  with the License.  You may obtain a copy of the License at
-#  
-#    http://www.apache.org/licenses/LICENSE-2.0
-#  
-#  Unless required by applicable law or agreed to in writing,
-#  software distributed under the License is distributed on an
-#  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-#  KIND, either express or implied.  See the License for the
-#  specific language governing permissions and limitations
-#  under the License.
-#  
-#**************************************************************
-
-
-
-package installer::windows::mergemodule;
-
-use Cwd;
-use Digest::MD5;
-use installer::converter;
-use installer::exiter;
-use installer::files;
-use installer::globals;
-use installer::logger;
-use installer::pathanalyzer;
-use installer::remover;
-use installer::scriptitems;
-use installer::systemactions;
-use installer::worker;
-use installer::windows::idtglobal;
-use installer::windows::language;
-
-#################################################################
-# Merging the Windows MergeModules into the msi database.
-#################################################################
-
-sub merge_mergemodules_into_msi_database
-{
-	my ($mergemodules, $filesref, $msifilename, $languagestringref, $language, $languagefile, $allvariables, $includepatharrayref, $allupdatesequences, $allupdatelastsequences, $allupdatediskids) = @_;
-
-	my $domerge = 0;
-	if (( $#{$mergemodules} > -1 ) && ( ! $installer::globals::patch ) && ( ! $installer::globals::languagepack )) { $domerge = 1; }
-
-	if ( $domerge )
-	{
-		installer::logger::include_header_into_logfile("Merging merge modules into msi database");
-        $installer::logger::Info->printf("... merging msm files into msi database ... \n");
-		$installer::logger::Lang->print("\n");
-		$installer::logger::Lang->add_timestamp("Performance Info: MergeModule into msi database, start");
-
-		my $msidb = "msidb.exe";	# Has to be in the path
-		my $cabinetfile = "MergeModule.CABinet"; # the name of each cabinet file in a merge file
-		my $infoline = "";
-		my $systemcall = "";
-		my $returnvalue = "";
-
-		# 1. Analyzing the MergeModule (has only to be done once)
-		#   a. -> Extracting cabinet file: msidb.exe -d <msmfile> -x MergeModule.CABinet
-		#   b. -> Number of files in cabinet file: msidb.exe -d <msmfile> -f <directory> -e File
-		#   c. -> List of components: msidb.exe -d <msmfile> -f <directory> -e Component
-
-		if ( ! $installer::globals::mergemodules_analyzed )
-		{
-            $installer::logger::Lang->print("\n");
-            $installer::logger::Lang->add_timestamp("Performance Info: Analyzing MergeModules, start");
-			$installer::logger::Lang->print("Analyzing all Merge Modules\n");
-			$installer::logger::Lang->print("\n");
-
-			%installer::globals::mergemodules = ();
-			
-			my $mergemoduledir = installer::systemactions::create_directories("mergefiles", $languagestringref);
-			# push(@installer::globals::removedirs, $mergemoduledir);
-
-			my $mergemodule;
-			foreach $mergemodule ( @{$mergemodules} )
-			{
-				my $filename = $mergemodule->{'Name'};
-				my $mergefile = installer::scriptitems::get_sourcepath_from_filename_and_includepath(\$filename, $includepatharrayref, 1);
-	
-				if ( ! -f $$mergefile ) { installer::exiter::exit_program("ERROR: msm file not found: $filename !", "merge_mergemodules_into_msi_database"); }
-				my $completesource = $$mergefile;
-			
-				my $mergegid = $mergemodule->{'gid'};
-				my $workdir = $mergemoduledir . $installer::globals::separator . $mergegid;
-				if ( ! -d $workdir ) { installer::systemactions::create_directory($workdir); }
-
-				$infoline = "Analyzing Merge Module: $filename\n";
-				$installer::logger::Lang->print($infoline);
-			
-				# copy msm file into working directory
-				my $completedest = $workdir . $installer::globals::separator . $filename;
-				installer::systemactions::copy_one_file($completesource, $completedest);
-				if ( ! -f $completedest ) { installer::exiter::exit_program("ERROR: msm file not found: $completedest !", "merge_mergemodules_into_msi_database"); }
-			
-				# changing directory
-				my $from = cwd();
-				my $to = $workdir;
-				chdir($to);
-
-				# remove an existing cabinet file
-				if ( -f $cabinetfile ) { unlink($cabinetfile); }
-
-				# exclude cabinet file
-				$systemcall = $msidb . " -d " . $filename . " -x " . $cabinetfile;
-				$returnvalue = system($systemcall);
-
-				$infoline = "Systemcall: $systemcall\n";
-				$installer::logger::Lang->print($infoline);
-
-				if ($returnvalue)
-				{
-					$infoline = "ERROR: Could not execute $systemcall !\n";
-					$installer::logger::Lang->print($infoline);
-					installer::exiter::exit_program("ERROR: Could not extract cabinet file from merge file: $completedest !", "merge_mergemodules_into_msi_database");
-				}
-				else
-				{
-					$infoline = "Success: Executed $systemcall successfully!\n";
-					$installer::logger::Lang->print($infoline);
-				}
-			
-				# exclude tables from mergefile
-				# Attention: All listed tables have to exist in the database. If they not exist, an error window pops up
-				# and the return value of msidb.exe is not zero. The error window makes it impossible to check the existence
-				# of a table with the help of the return value. 
-				# Solution: Export of all tables by using "*" . Some tables must exist (File Component Directory), other
-				# tables do not need to exist (MsiAssembly).
-
-				if ( $^O =~ /cygwin/i ) {
-					# msidb.exe really wants backslashes. (And double escaping because system() expands the string.)
-					my $localworkdir = $workdir;
-					$localworkdir =~ s/\//\\\\/g;
-					$systemcall = $msidb . " -d " . $filename . " -f " . $localworkdir . " -e \\\*";					
-				}
-				else
-				{
-					# $systemcall = $msidb . " -d " . $filename . " -f " . $workdir . " -e File Component MsiAssembly Directory";
-					$systemcall = $msidb . " -d " . $filename . " -f " . $workdir . " -e \*";					
-				}
-											
-				$returnvalue = system($systemcall);
-
-				$infoline = "Systemcall: $systemcall\n";
-				$installer::logger::Lang->print($infoline);
-
-				if ($returnvalue)
-				{
-					$infoline = "ERROR: Could not execute $systemcall !\n";
-					$installer::logger::Lang->print($infoline);
-					installer::exiter::exit_program("ERROR: Could not exclude tables from merge file: $completedest !", "merge_mergemodules_into_msi_database");
-				}
-				else
-				{
-					$infoline = "Success: Executed $systemcall successfully!\n";
-					$installer::logger::Lang->print($infoline);
-				}
-
-				# Determining  files
-				my $idtfilename = "File.idt"; # must exist
-				if ( ! -f $idtfilename ) { installer::exiter::exit_program("ERROR: File \"$idtfilename\" not found in directory \"$workdir\" !", "merge_mergemodules_into_msi_database"); }
-				my $filecontent = installer::files::read_file($idtfilename);
-				my @file_idt_content = ();
-				my $filecounter = 0;
-				my %mergefilesequence = ();
-				for ( my $i = 0; $i <= $#{$filecontent}; $i++ )
-				{
-					if ( $i <= 2 ) { next; }						# ignoring first three lines
-					if ( ${$filecontent}[$i] =~ /^\s*$/ ) { next; } # ignoring empty lines
-					$filecounter++;
-					push(@file_idt_content, ${$filecontent}[$i]);
-					if ( ${$filecontent}[$i] =~ /^\s*(.+?)\t(.+?)\t(.+?)\t(.+?)\t(.*?)\t(.*?)\t(.*?)\t(\d+?)\s*$/ )
-					{
-						my $filename = $1;
-						my $filesequence = $8;
-						$mergefilesequence{$filename} = $filesequence;
-					}
-					else
-					{
-						my $linecount = $i + 1;
-						installer::exiter::exit_program("ERROR: Unknown line format in table \"$idtfilename\" (line $linecount) !", "merge_mergemodules_into_msi_database");
-					}
-				}
-
-				# Determining components
-				$idtfilename = "Component.idt"; # must exist
-				if ( ! -f $idtfilename ) { installer::exiter::exit_program("ERROR: File \"$idtfilename\" not found in directory \"$workdir\" !", "merge_mergemodules_into_msi_database"); }
-				$filecontent = installer::files::read_file($idtfilename);
-				my %componentnames = ();
-				for ( my $i = 0; $i <= $#{$filecontent}; $i++ )
-				{
-					if ( $i <= 2 ) { next; }						# ignoring first three lines
-					if ( ${$filecontent}[$i] =~ /^\s*$/ ) { next; } # ignoring empty lines
-					if ( ${$filecontent}[$i] =~ /^\s*(\S+)\s+/ ) { $componentnames{$1} = 1; } 
-				}
-
-				# Determining directories
-				$idtfilename = "Directory.idt";  # must exist
-				if ( ! -f $idtfilename ) { installer::exiter::exit_program("ERROR: File \"$idtfilename\" not found in directory \"$workdir\" !", "merge_mergemodules_into_msi_database"); }
-				$filecontent = installer::files::read_file($idtfilename);
-				my %mergedirectories = ();
-				for ( my $i = 0; $i <= $#{$filecontent}; $i++ )
-				{
-					if ( $i <= 2 ) { next; }						# ignoring first three lines
-					if ( ${$filecontent}[$i] =~ /^\s*$/ ) { next; } # ignoring empty lines
-					if ( ${$filecontent}[$i] =~ /^\s*(\S+)\s+/ ) { $mergedirectories{$1} = 1; } 
-				}
-
-				# Determining assemblies
-				$idtfilename = "MsiAssembly.idt"; # does not need to exist
-				my $hasmsiassemblies = 0;
-				my %mergeassemblies = ();
-				if ( -f $idtfilename )
-				{
-					$filecontent = installer::files::read_file($idtfilename);
-					$hasmsiassemblies = 1;
-					for ( my $i = 0; $i <= $#{$filecontent}; $i++ )
-					{
-						if ( $i <= 2 ) { next; }						# ignoring first three lines
-						if ( ${$filecontent}[$i] =~ /^\s*$/ ) { next; } # ignoring empty lines
-						if ( ${$filecontent}[$i] =~ /^\s*(\S+)\s+/ ) { $mergeassemblies{$1} = 1; } 
-					}
-				}
-				
-				# It is possible, that other tables have to be checked here. This happens, if tables in the
-				# merge module have to know the "Feature" or the "Directory", under which the content of the 
-				# msm file is integrated into the msi database. 
-
-				# Determining name of cabinet file in installation set
-				my $cabfilename = $mergemodule->{'Cabfilename'};
-				installer::packagelist::resolve_packagevariables(\$cabfilename, $allvariables, 0);
-				
-				# Analyzing styles
-				# Flag REMOVE_FILE_TABLE is required for msvc9 Merge-Module, because otherwise msidb.exe 
-				# fails during integration of msm file into msi database.
-				
-				my $styles = "";
-				my $removefiletable = 0;
-				if ( $mergemodule->{'Styles'} ) { $styles = $mergemodule->{'Styles'}; }
-				if ( $styles =~ /\bREMOVE_FILE_TABLE\b/ ) { $removefiletable = 1; }
-
-				if ( $removefiletable )
-				{
-					my $removeworkdir = $workdir . $installer::globals::separator . "remove_file_idt";
-					if ( ! -d $removeworkdir ) { installer::systemactions::create_directory($removeworkdir); }
-					my $completeremovedest = $removeworkdir . $installer::globals::separator . $filename;
-					installer::systemactions::copy_one_file($completedest, $completeremovedest);
-					if ( ! -f $completeremovedest ) { installer::exiter::exit_program("ERROR: msm file not found: $completeremovedest !", "merge_mergemodules_into_msi_database"); }
-
-					# Unpacking msm file
-					if ( $^O =~ /cygwin/i ) {
-						# msidb.exe really wants backslashes. (And double escaping because system() expands the string.)
-						my $localcompleteremovedest = $completeremovedest;
-						my $localremoveworkdir = $removeworkdir;
-						$localcompleteremovedest =~ s/\//\\\\/g;
-						$localremoveworkdir =~ s/\//\\\\/g;
-						$systemcall = $msidb . " -d " . $localcompleteremovedest . " -f " . $localremoveworkdir . " -e \\\*";					
-					}
-					else
-					{
-						$systemcall = $msidb . " -d " . $completeremovedest . " -f " . $removeworkdir . " -e \*";
-					}
-
-					$returnvalue = system($systemcall);
-
-					my $idtfilename = $removeworkdir . $installer::globals::separator . "File.idt";
-					if ( -f $idtfilename ) { unlink $idtfilename; }
-					unlink $completeremovedest;
-
-					# Packing msm file without "File.idt"
-					if ( $^O =~ /cygwin/i ) {
-						# msidb.exe really wants backslashes. (And double escaping because system() expands the string.)
-						my $localcompleteremovedest = $completeremovedest;
-						my $localremoveworkdir = $removeworkdir;
-						$localcompleteremovedest =~ s/\//\\\\/g;
-						$localremoveworkdir =~ s/\//\\\\/g;
-						$systemcall = $msidb . " -c -d " . $localcompleteremovedest . " -f " . $localremoveworkdir . " -i \\\*";					
-					}
-					else
-					{
-						$systemcall = $msidb . " -c -d " . $completeremovedest . " -f " . $removeworkdir . " -i \*";
-					}
-					$returnvalue = system($systemcall);
-
-					# Using this msm file for merging
-					if ( -f $completeremovedest ) { $completedest = $completeremovedest; }
-					else { installer::exiter::exit_program("ERROR: Could not find msm file without File.idt: $completeremovedest !", "merge_mergemodules_into_msi_database"); }
-				}
-
-				# Saving MergeModule info				
-				
-				my %onemergemodulehash = ();
-				$onemergemodulehash{'mergefilepath'} = $completedest;
-				$onemergemodulehash{'workdir'} = $workdir;
-				$onemergemodulehash{'cabinetfile'} = $workdir . $installer::globals::separator . $cabinetfile;
-				$onemergemodulehash{'filenumber'} = $filecounter;
-				$onemergemodulehash{'componentnames'} = \%componentnames;
-				$onemergemodulehash{'cabfilename'} = $cabfilename;
-				$onemergemodulehash{'feature'} = $mergemodule->{'Feature'};
-				$onemergemodulehash{'rootdir'} = $mergemodule->{'RootDir'};
-				$onemergemodulehash{'name'} = $mergemodule->{'Name'};
-				$onemergemodulehash{'mergefilesequence'} = \%mergefilesequence;
-				$onemergemodulehash{'mergeassemblies'} = \%mergeassemblies;
-				$onemergemodulehash{'mergedirectories'} = \%mergedirectories;
-				$onemergemodulehash{'hasmsiassemblies'} = $hasmsiassemblies;
-				$onemergemodulehash{'removefiletable'} = $removefiletable;
-				$onemergemodulehash{'fileidtcontent'} = \@file_idt_content;
-			
-				$installer::globals::mergemodules{$mergegid} = \%onemergemodulehash;
-				
-				# Collecting all cab files, to copy them into installation set
-				$installer::globals::copy_msm_files{$cabfilename} = $onemergemodulehash{'cabinetfile'};
-
-				chdir($from);
-			}
-
-			$infoline = "All Merge Modules successfully analyzed\n";
-			$installer::logger::Lang->print($infoline);
-
-			$installer::globals::mergemodules_analyzed = 1;
-            $installer::logger::Lang->print("\n");
-			$installer::logger::Lang->add_timestamp("Performance Info: Analyzing MergeModules, stop");
-
-			$infoline = "\n";
-			$installer::logger::Lang->print($infoline);
-		}
-
-		# 2. Change msi database (has to be done for every msi database -> for every language)
-		#   a. Merge msm file into msi database: msidb.exe -d <msifile> -m <mergefile>
-		#   b. Extracting tables from msi database: msidb.exe -d <msifile> -f <directory> -e File Media, ...
-		#   c. Changing content of msi database in tables: File, Media, Directory, FeatureComponent
-		#   d. Including tables into msi database: msidb.exe -d <msifile> -f <directory> -i File Media, ...
-		#   e. Copying cabinet file into installation set (later)
-
-		my $counter = 0;
-		my $mergemodulegid;
-		foreach $mergemodulegid (keys %installer::globals::mergemodules)
-		{
-			my $mergemodulehash = $installer::globals::mergemodules{$mergemodulegid};
-			$counter++;
-			
-			installer::logger::include_header_into_logfile("Merging Module: $mergemodulehash->{'name'}");
-            $installer::logger::Info->printf("\t... %s ... \n", $mergemodulehash->{'name'});
-
-			$msifilename = installer::converter::make_path_conform($msifilename);
-			my $workdir = $msifilename;
-			installer::pathanalyzer::get_path_from_fullqualifiedname(\$workdir);
-
-			# changing directory
-			my $from = cwd();
-			my $to = $workdir;
-			chdir($to);
-
-			# Saving original msi database
-			installer::systemactions::copy_one_file($msifilename, "$msifilename\.$counter");
-			
-			# Merging msm file, this is the "real" merge command
-
-            $installer::logger::Lang->print("\n");
-			$installer::logger::Lang->add_timestamp("Performance Info: Before merging database");
-
-			if ( $^O =~ /cygwin/i ) {
-				# msidb.exe really wants backslashes. (And double escaping because system() expands the string.)
-				my $localmergemodulepath = $mergemodulehash->{'mergefilepath'};
-				my $localmsifilename = $msifilename;
-				$localmergemodulepath =~ s/\//\\\\/g;
-				$localmsifilename =~ s/\//\\\\/g;
-				$systemcall = $msidb . " -d " . $localmsifilename . " -m " . $localmergemodulepath;					
-			}
-			else
-			{
-				$systemcall = $msidb . " -d " . $msifilename . " -m " . $mergemodulehash->{'mergefilepath'};
-			}
-			$returnvalue = system($systemcall);
-
-			$infoline = "Systemcall: $systemcall\n";
-			$installer::logger::Lang->print($infoline);
-
-			if ($returnvalue)
-			{
-				$infoline = "ERROR: Could not execute $systemcall . Returnvalue: $returnvalue!\n";
-				$installer::logger::Lang->print($infoline);
-				installer::exiter::exit_program("ERROR: Could not merge msm file into database: $mergemodulehash->{'mergefilepath'} !", "merge_mergemodules_into_msi_database");
-			}
-			else
-			{
-				$infoline = "Success: Executed $systemcall successfully!\n";
-				$installer::logger::Lang->print($infoline);
-			}
-
-            $installer::logger::Lang->print("\n");
-			$installer::logger::Lang->add_timestamp("Performance Info: After merging database");
-			
-			# Saving original idt files
-			if ( -f "File.idt" ) { installer::systemactions::rename_one_file("File.idt", "File.idt.$counter"); }
-			if ( -f "Media.idt" ) { installer::systemactions::rename_one_file("Media.idt", "Media.idt.$counter"); }
-			if ( -f "Directory.idt" ) { installer::systemactions::rename_one_file("Directory.idt", "Directory.idt.$counter"); }
-			if ( -f "Director.idt" ) { installer::systemactions::rename_one_file("Director.idt", "Director.idt.$counter"); }
-			if ( -f "FeatureComponents.idt" ) { installer::systemactions::rename_one_file("FeatureComponents.idt", "FeatureComponents.idt.$counter"); }
-			if ( -f "FeatureC.idt" ) { installer::systemactions::rename_one_file("FeatureC.idt", "FeatureC.idt.$counter"); }
-			if ( -f "MsiAssembly.idt" ) { installer::systemactions::rename_one_file("MsiAssembly.idt", "MsiAssembly.idt.$counter"); }
-			if ( -f "MsiAssem.idt" ) { installer::systemactions::rename_one_file("MsiAssem.idt", "MsiAssem.idt.$counter"); }
-			
-			# Extracting tables
-
-            $installer::logger::Lang->print("\n");
-			$installer::logger::Lang->add_timestamp("Performance Info: Before extracting tables");
-			
-			my $workingtables = "File Media Directory FeatureComponents"; # required tables
-			# Optional tables can be added now
-			if ( $mergemodulehash->{'hasmsiassemblies'} ) { $workingtables = $workingtables . " MsiAssembly"; }
-
-			# Table "Feature" has to be exported, but it is not necessary to import it.
-			if ( $^O =~ /cygwin/i ) {
-				# msidb.exe really wants backslashes. (And double escaping because system() expands the string.)
-				my $localmsifilename = $msifilename;
-				my $localworkdir = $workdir;
-				$localmsifilename =~ s/\//\\\\/g;
-				$localworkdir =~ s/\//\\\\/g;
-				$systemcall = $msidb . " -d " . $localmsifilename . " -f " . $localworkdir . " -e " . "Feature " . $workingtables;					
-			}
-			else
-			{
-				$systemcall = $msidb . " -d " . $msifilename . " -f " . $workdir . " -e " . "Feature " . $workingtables;
-			}
-			$returnvalue = system($systemcall);
-
-			$infoline = "Systemcall: $systemcall\n";
-			$installer::logger::Lang->print($infoline);
-
-			if ($returnvalue)
-			{
-				$infoline = "ERROR: Could not execute $systemcall !\n";
-				$installer::logger::Lang->print($infoline);
-				installer::exiter::exit_program("ERROR: Could not exclude tables from msi database: $msifilename !", "merge_mergemodules_into_msi_database");
-			}
-			else
-			{
-				$infoline = "Success: Executed $systemcall successfully!\n";
-				$installer::logger::Lang->print($infoline);
-			}
-
-            $installer::logger::Lang->print("\n");
-			$installer::logger::Lang->add_timestamp("Performance Info: After extracting tables");
-
-			# Using 8+3 table names, that are used, when tables are integrated into database. The export of tables
-			# creates idt-files, that have long names.
-
-			if ( -f "Directory.idt" ) { installer::systemactions::rename_one_file("Directory.idt", "Director.idt"); }
-			if ( -f "FeatureComponents.idt" ) { installer::systemactions::rename_one_file("FeatureComponents.idt", "FeatureC.idt"); }
-			if ( -f "MsiAssembly.idt" ) { installer::systemactions::rename_one_file("MsiAssembly.idt", "MsiAssem.idt"); }
-		
-			# Changing content of tables: File, Media, Directory, FeatureComponent, MsiAssembly
-            $installer::logger::Lang->print("\n");
-			$installer::logger::Lang->add_timestamp("Performance Info: Changing Media table");
-			change_media_table($mergemodulehash, $workdir, $mergemodulegid, $allupdatelastsequences, $allupdatediskids);
-            $installer::logger::Lang->print("\n");
-			$installer::logger::Lang->add_timestamp("Performance Info: Changing File table");
-			$filesref = change_file_table($mergemodulehash, $workdir, $allupdatesequences, $includepatharrayref, $filesref, $mergemodulegid);
-            $installer::logger::Lang->print("\n");
-			$installer::logger::Lang->add_timestamp("Performance Info: Changing FeatureComponent table");
-			change_featurecomponent_table($mergemodulehash, $workdir);
-            $installer::logger::Lang->print("\n");
-			$installer::logger::Lang->add_timestamp("Performance Info: Changing Directory table");
-			change_directory_table($mergemodulehash, $workdir);
-			if ( $mergemodulehash->{'hasmsiassemblies'} )
-			{
-                $installer::logger::Lang->print("\n");
-				$installer::logger::Lang->add_timestamp("Performance Info: Changing MsiAssembly table");
-				change_msiassembly_table($mergemodulehash, $workdir);
-			}
-
-			# msidb.exe does not merge InstallExecuteSequence, AdminExecuteSequence and AdvtExecuteSequence. Instead it creates
-			# new tables ModuleInstallExecuteSequence, ModuleAdminExecuteSequence and ModuleAdvtExecuteSequence that need to be
-			# merged into the three ExecuteSequences with the following process (also into InstallUISequence.idt). 
-			
-			# Saving original idt files
-			if ( -f "InstallE.idt" ) { installer::systemactions::rename_one_file("InstallE.idt", "InstallE.idt.$counter"); }
-			if ( -f "InstallU.idt" ) { installer::systemactions::rename_one_file("InstallU.idt", "InstallU.idt.$counter"); }
-			if ( -f "AdminExe.idt" ) { installer::systemactions::rename_one_file("AdminExe.idt", "AdminExe.idt.$counter"); }
-			if ( -f "AdvtExec.idt" ) { installer::systemactions::rename_one_file("AdvtExec.idt", "AdvtExec.idt.$counter"); }
-			if ( -f "ModuleInstallExecuteSequence.idt" ) { installer::systemactions::rename_one_file("ModuleInstallExecuteSequence.idt", "ModuleInstallExecuteSequence.idt.$counter"); }
-			if ( -f "ModuleAdminExecuteSequence.idt" ) { installer::systemactions::rename_one_file("ModuleAdminExecuteSequence.idt", "ModuleAdminExecuteSequence.idt.$counter"); }
-			if ( -f "ModuleAdvtExecuteSequence.idt" ) { installer::systemactions::rename_one_file("ModuleAdvtExecuteSequence.idt", "ModuleAdvtExecuteSequence.idt.$counter"); }
-			
-			# Extracting tables			
-			my $moduleexecutetables = "ModuleInstallExecuteSequence ModuleAdminExecuteSequence ModuleAdvtExecuteSequence"; # new tables
-			my $executetables = "InstallExecuteSequence InstallUISequence AdminExecuteSequence AdvtExecuteSequence"; # tables to be merged
-
-
-			if ( $^O =~ /cygwin/i ) {
-				# msidb.exe really wants backslashes. (And double escaping because system() expands the string.)
-				my $localmsifilename = $msifilename;
-				my $localworkdir = $workdir;
-				$localmsifilename =~ s/\//\\\\/g;
-				$localworkdir =~ s/\//\\\\/g;
-				$systemcall = $msidb . " -d " . $localmsifilename . " -f " . $localworkdir . " -e " . "Feature " . $moduleexecutetables;					
-			}
-			else
-			{
-				$systemcall = $msidb . " -d " . $msifilename . " -f " . $workdir . " -e " . "Feature " . $moduleexecutetables;
-			}
-			$returnvalue = system($systemcall);
-			
-			if ( $^O =~ /cygwin/i ) {
-				# msidb.exe really wants backslashes. (And double escaping because system() expands the string.)
-				my $localmsifilename = $msifilename;
-				my $localworkdir = $workdir;
-				$localmsifilename =~ s/\//\\\\/g;
-				$localworkdir =~ s/\//\\\\/g;
-				$systemcall = $msidb . " -d " . $localmsifilename . " -f " . $localworkdir . " -e " . "Feature " . $executetables;					
-			}
-			else
-			{
-				$systemcall = $msidb . " -d " . $msifilename . " -f " . $workdir . " -e " . "Feature " . $executetables;
-			}
-			$returnvalue = system($systemcall);
-
-			# Using 8+3 table names, that are used, when tables are integrated into database. The export of tables
-			# creates idt-files, that have long names.
-
-			if ( -f "InstallExecuteSequence.idt" ) { installer::systemactions::rename_one_file("InstallExecuteSequence.idt", "InstallE.idt"); }
-			if ( -f "InstallUISequence.idt" ) { installer::systemactions::rename_one_file("InstallUISequence.idt", "InstallU.idt"); }
-			if ( -f "AdminExecuteSequence.idt" ) { installer::systemactions::rename_one_file("AdminExecuteSequence.idt", "AdminExe.idt"); }
-			if ( -f "AdvtExecuteSequence.idt" ) { installer::systemactions::rename_one_file("AdvtExecuteSequence.idt", "AdvtExec.idt"); }
-		
-			# Merging content of tables ModuleInstallExecuteSequence, ModuleAdminExecuteSequence and ModuleAdvtExecuteSequence
-			# into tables InstallExecuteSequence, AdminExecuteSequence and AdvtExecuteSequence
-			if ( -f "ModuleInstallExecuteSequence.idt" )
-			{
-                $installer::logger::Lang->print("\n");
-				$installer::logger::Lang->add_timestamp("Performance Info: Changing InstallExecuteSequence table");
-				change_executesequence_table($mergemodulehash, $workdir, "InstallE.idt", "ModuleInstallExecuteSequence.idt");
-                $installer::logger::Lang->print("\n");
-				$installer::logger::Lang->add_timestamp("Performance Info: Changing InstallUISequence table");
-				change_executesequence_table($mergemodulehash, $workdir, "InstallU.idt", "ModuleInstallExecuteSequence.idt");
-			}
-
-			if ( -f "ModuleAdminExecuteSequence.idt" )
-			{
-                $installer::logger::Lang->print("\n");
-				$installer::logger::Lang->add_timestamp("Performance Info: Changing AdminExecuteSequence table");
-				change_executesequence_table($mergemodulehash, $workdir, "AdminExe.idt", "ModuleAdminExecuteSequence.idt");
-			}
-			
-			if ( -f "ModuleAdvtExecuteSequence.idt" )
-			{
-                $installer::logger::Lang->print("\n");
-				$installer::logger::Lang->add_timestamp("Performance Info: Changing AdvtExecuteSequence table");
-				change_executesequence_table($mergemodulehash, $workdir, "AdvtExec.idt", "ModuleAdvtExecuteSequence.idt");
-			}
-
-            $installer::logger::Lang->print("\n");
-			$installer::logger::Lang->add_timestamp("Performance Info: All tables edited");
-			
-			# Including tables into msi database
-
-            $installer::logger::Lang->print("\n");
-			$installer::logger::Lang->add_timestamp("Performance Info: Before including tables");
-
-			if ( $^O =~ /cygwin/i ) {
-				# msidb.exe really wants backslashes. (And double escaping because system() expands the string.)
-				my $localmsifilename = $msifilename;
-				my $localworkdir = $workdir;
-				$localmsifilename =~ s/\//\\\\/g;
-				$localworkdir =~ s/\//\\\\/g;
-				$systemcall = $msidb . " -d " . $localmsifilename . " -f " . $localworkdir . " -i " . $workingtables. " " . $executetables;
-			}
-			else
-			{
-				$systemcall = $msidb . " -d " . $msifilename . " -f " . $workdir . " -i " . $workingtables. " " . $executetables;
-			}
-			$returnvalue = system($systemcall);
-
-			$infoline = "Systemcall: $systemcall\n";
-			$installer::logger::Lang->print($infoline);
-
-			if ($returnvalue)
-			{
-				$infoline = "ERROR: Could not execute $systemcall !\n";
-				$installer::logger::Lang->print($infoline);
-				installer::exiter::exit_program("ERROR: Could not include tables into msi database: $msifilename !", "merge_mergemodules_into_msi_database");
-			}
-			else
-			{
-				$infoline = "Success: Executed $systemcall successfully!\n";
-				$installer::logger::Lang->print($infoline);
-			}
-
-            $installer::logger::Lang->print("\n");
-			$installer::logger::Lang->add_timestamp("Performance Info: After including tables");
-
-			chdir($from);		
-		}
-
-		if ( ! $installer::globals::mergefiles_added_into_collector ) { $installer::globals::mergefiles_added_into_collector = 1; } # Now all mergemodules are merged for one language.
-
-        $installer::logger::Lang->print("\n");
-		$installer::logger::Lang->add_timestamp("Performance Info: MergeModule into msi database, stop");
-	}
-	
-	return $filesref;
-}
-
-#########################################################################
-# Analyzing the content of the media table.
-#########################################################################
-
-sub analyze_media_file
-{
-	my ($filecontent, $workdir) = @_;
-	
-	my %filehash = ();
-	my $linecount = 0;
-	my $counter = 0;
-	my $filename = "Media.idt";
-	
-	for ( my $i = 0; $i <= $#{$filecontent}; $i++ )
-	{
-		if ( $i <= 2 ) { next; }						# ignoring first three lines
-		if ( ${$filecontent}[$i] =~ /^\s*$/ ) { next; } # ignoring empty lines
-		if ( ${$filecontent}[$i] =~ /^\s*(.+?)\t(.+?)\t(.+?)\t(.+?)\t(.+?)\t(.*?)\s*$/ )
-		{
-			my %line = ();
-			# Format: DiskId	LastSequence	DiskPrompt	Cabinet	VolumeLabel	Source
-			$line{'DiskId'} = $1;
-			$line{'LastSequence'} = $2;
-			$line{'DiskPrompt'} = $3;
-			$line{'Cabinet'} = $4;
-			$line{'VolumeLabel'} = $5;
-			$line{'Source'} = $6;
-		
-			$counter++;	
-			$filehash{$counter} = \%line;
-		}
-		else
-		{
-			$linecount = $i + 1;
-			installer::exiter::exit_program("ERROR: Unknown line format in table \"$filename\" in \"$workdir\" (line $linecount) !", "analyze_media_file");	
-		}
-	}
-	
-	return \%filehash;
-}
-
-#########################################################################
-# Setting the DiskID for the new cabinet file
-#########################################################################
-
-sub get_diskid
-{
-	my ($mediafile, $allupdatediskids, $cabfilename) = @_;
-
-	my $diskid = 0;
-	my $line;
-	
-	if (( $installer::globals::updatedatabase ) && ( exists($allupdatediskids->{$cabfilename}) ))
-	{
-		$diskid = $allupdatediskids->{$cabfilename};
-	}
-	else
-	{
-		foreach $line ( keys %{$mediafile} )
-		{
-			if ( $mediafile->{$line}->{'DiskId'} > $diskid ) { $diskid = $mediafile->{$line}->{'DiskId'}; }	
-		}
-
-		$diskid++;
-	} 
-	
-	return $diskid;	
-}
-
-#########################################################################
-# Setting the global LastSequence variable
-#########################################################################
-
-sub set_current_last_sequence
-{
-	my ($mediafile) = @_;
-
-	my $lastsequence = 0;
-	my $line;
-	foreach $line ( keys %{$mediafile} )
-	{
-		if ( $mediafile->{$line}->{'LastSequence'} > $lastsequence ) { $lastsequence = $mediafile->{$line}->{'LastSequence'}; }	
-	} 
-
-	$installer::globals::lastsequence_before_merge = $lastsequence;	
-}
-
-#########################################################################
-# Setting the LastSequence for the new cabinet file
-#########################################################################
-
-sub get_lastsequence
-{
-	my ($mergemodulehash, $allupdatelastsequences) = @_;
-	
-	my $lastsequence = 0;
-	
-	if (( $installer::globals::updatedatabase ) && ( exists($allupdatelastsequences->{$mergemodulehash->{'cabfilename'}}) ))
-	{
-		$lastsequence = $allupdatelastsequences->{$mergemodulehash->{'cabfilename'}};
-	}
-	else
-	{
-		$lastsequence = $installer::globals::lastsequence_before_merge + $mergemodulehash->{'filenumber'};
-	}
-		
-	return $lastsequence;
-}
-
-#########################################################################
-# Setting the DiskPrompt for the new cabinet file
-#########################################################################
-
-sub get_diskprompt
-{
-	my ($mediafile) = @_;
-
-	my $diskprompt = "";
-	my $line;
-	foreach $line ( keys %{$mediafile} )
-	{
-		if ( exists($mediafile->{$line}->{'DiskPrompt'}) )
-		{
-			$diskprompt = $mediafile->{$line}->{'DiskPrompt'};
-			last;
-		}
-	} 
-	
-	return $diskprompt;	
-}
-
-#########################################################################
-# Setting the VolumeLabel for the new cabinet file
-#########################################################################
-
-sub get_volumelabel
-{
-	my ($mediafile) = @_;
-
-	my $volumelabel = "";
-	my $line;
-	foreach $line ( keys %{$mediafile} )
-	{
-		if ( exists($mediafile->{$line}->{'VolumeLabel'}) )
-		{
-			$volumelabel = $mediafile->{$line}->{'VolumeLabel'};
-			last;
-		}
-	} 
-	
-	return $volumelabel;	
-}
-
-#########################################################################
-# Setting the Source for the new cabinet file
-#########################################################################
-
-sub get_source
-{
-	my ($mediafile) = @_;
-
-	my $source = "";
-	my $line;
-	foreach $line ( keys %{$mediafile} )
-	{
-		if ( exists($mediafile->{$line}->{'Source'}) )
-		{
-			$diskprompt = $mediafile->{$line}->{'Source'};
-			last;
-		}
-	} 
-	
-	return $source;	
-}
-
-#########################################################################
-# For each Merge Module one new line has to be included into the
-# media table.
-#########################################################################
-
-sub create_new_media_line
-{
-	my ($mergemodulehash, $mediafile, $allupdatelastsequences, $allupdatediskids) = @_;
-
-	my $diskid = get_diskid($mediafile, $allupdatediskids, $mergemodulehash->{'cabfilename'});
-	my $lastsequence = get_lastsequence($mergemodulehash, $allupdatelastsequences);
-	my $diskprompt = get_diskprompt($mediafile);
-	my $cabinet = $mergemodulehash->{'cabfilename'};
-	my $volumelabel = get_volumelabel($mediafile);
-	my $source = get_source($mediafile);
-
-	if ( $installer::globals::include_cab_in_msi ) { $cabinet = "\#" . $cabinet; }
-
-	my $newline = "$diskid\t$lastsequence\t$diskprompt\t$cabinet\t$volumelabel\t$source\n";
-
-	return $newline;	
-}
-
-#########################################################################
-# Setting the last diskid in media table.
-#########################################################################
-
-sub get_last_diskid
-{
-	my ($mediafile) = @_;
-
-	my $lastdiskid = 0;
-	my $line;
-	foreach $line ( keys %{$mediafile} )
-	{
-		if ( $mediafile->{$line}->{'DiskId'} > $lastdiskid ) { $lastdiskid = $mediafile->{$line}->{'DiskId'}; }	
-	} 
-
-	return $lastdiskid;
-}
-
-#########################################################################
-# Setting global variable for last cab file name.
-#########################################################################
-
-sub set_last_cabfile_name
-{
-	my ($mediafile, $lastdiskid) = @_;
-	
-	my $line;
-	foreach $line ( keys %{$mediafile} )
-	{
-		if ( $mediafile->{$line}->{'DiskId'} == $lastdiskid ) { $installer::globals::lastcabfilename = $mediafile->{$line}->{'Cabinet'}; }	
-	}
-	my $infoline = "Setting last cabinet file: $installer::globals::lastcabfilename\n";
-	$installer::logger::Lang->print($infoline);
-}
-
-#########################################################################
-# In the media table the new cabinet file has to be added or the
-# number of the last cabinet file has to be increased.
-#########################################################################
-
-sub change_media_table
-{
-	my ( $mergemodulehash, $workdir, $mergemodulegid, $allupdatelastsequences, $allupdatediskids ) = @_;
-
-	my $infoline = "Changing content of table \"Media\"\n";
-	$installer::logger::Lang->print($infoline);
-
-	my $filename = "Media.idt";
-	if ( ! -f $filename ) { installer::exiter::exit_program("ERROR: Could not find file \"$filename\" in \"$workdir\" !", "change_media_table"); }
-
-	my $filecontent = installer::files::read_file($filename);
-	my $mediafile = analyze_media_file($filecontent, $workdir);
-	set_current_last_sequence($mediafile);
-
-	if ( $installer::globals::fix_number_of_cab_files )
-	{
-		# Determining the line with the highest sequencenumber. That file needs to be updated.
-		my $lastdiskid = get_last_diskid($mediafile);
-		if ( $installer::globals::lastcabfilename eq "" ) { set_last_cabfile_name($mediafile, $lastdiskid); }
-		my $newmaxsequencenumber = $installer::globals::lastsequence_before_merge + $mergemodulehash->{'filenumber'};
-
-		for ( my $i = 0; $i <= $#{$filecontent}; $i++ )
-		{
-			if ( $i <= 2 ) { next; }						# ignoring first three lines
-			if ( ${$filecontent}[$i] =~ /^\s*$/ ) { next; } # ignoring empty lines
-			if ( ${$filecontent}[$i] =~ /^\s*(\Q$lastdiskid\E\t)\Q$installer::globals::lastsequence_before_merge\E(\t.*)$/ )
-			{
-				my $start = $1;
-				my $final = $2;
-				$infoline = "Merge: Old line in media table: ${$filecontent}[$i]\n";
-				$installer::logger::Lang->print($infoline);
-				my $newline = $start . $newmaxsequencenumber . $final . "\n";
-				${$filecontent}[$i] = $newline;
-				$infoline = "Merge: Changed line in media table: ${$filecontent}[$i]\n";
-				$installer::logger::Lang->print($infoline);
-			}
-		}
-	}
-	else
-	{
-		# the new line is identical for all localized databases, but has to be created for each MergeModule ($mergemodulegid)
-		if ( ! exists($installer::globals::merge_media_line{$mergemodulegid}) )
-		{	
-			$installer::globals::merge_media_line{$mergemodulegid} = create_new_media_line($mergemodulehash, $mediafile, $allupdatelastsequences, $allupdatediskids);
-		}
-
-		$infoline = "Adding line: $installer::globals::merge_media_line{$mergemodulegid}\n";
-		$installer::logger::Lang->print($infoline);
-	
-		# adding new line
-		push(@{$filecontent}, $installer::globals::merge_media_line{$mergemodulegid});
-	}
-	
-	# saving file
-	installer::files::save_file($filename, $filecontent);
-}
-
-#########################################################################
-# Putting the directory table content into a hash.
-#########################################################################
-
-sub analyze_directorytable_file
-{
-	my ($filecontent, $idtfilename) = @_;
-	
-	my %dirhash = ();	
-	# Iterating over the file content
-	for ( my $i = 0; $i <= $#{$filecontent}; $i++ )
-	{
-		if ( $i <= 2 ) { next; }						# ignoring first three lines
-		if ( ${$filecontent}[$i] =~ /^\s*$/ ) { next; } # ignoring empty lines
-		if ( ${$filecontent}[$i] =~ /^\s*(.+?)\t(.*?)\t(.*?)\s*$/ )
-		{
-			my %line = ();
-			# Format: Directory	Directory_Parent	DefaultDir
-			$line{'Directory'} = $1;
-			$line{'Directory_Parent'} = $2;
-			$line{'DefaultDir'} = $3;
-			$line{'linenumber'} = $i; # saving also the line number for direct access
-			
-			my $uniquekey = $line{'Directory'};
-			$dirhash{$uniquekey} = \%line;
-		}
-		else
-		{
-			my $linecount = $i + 1;
-			installer::exiter::exit_program("ERROR: Unknown line format in table \"$idtfilename\" (line $linecount) !", "analyze_directorytable_file");	
-		}
-	}
-	
-	return \%dirhash;
-}
-
-#########################################################################
-# Putting the msi assembly table content into a hash.
-#########################################################################
-
-sub analyze_msiassemblytable_file
-{
-	my ($filecontent, $idtfilename) = @_;
-	
-	my %assemblyhash = ();	
-	# Iterating over the file content
-	for ( my $i = 0; $i <= $#{$filecontent}; $i++ )
-	{
-		if ( $i <= 2 ) { next; }						# ignoring first three lines
-		if ( ${$filecontent}[$i] =~ /^\s*$/ ) { next; } # ignoring empty lines
-		if ( ${$filecontent}[$i] =~ /^\s*(.+?)\t(.+?)\t(.+?)\t(.*?)\t(.*?)\s*$/ )
-		{
-			my %line = ();
-			# Format: Component_	Feature_	File_Manifest	File_Application	Attributes
-			$line{'Component'} = $1;
-			$line{'Feature'} = $2;
-			$line{'File_Manifest'} = $3;
-			$line{'File_Application'} = $4;
-			$line{'Attributes'} = $5;
-			$line{'linenumber'} = $i; # saving also the line number for direct access
-			
-			my $uniquekey = $line{'Component'};
-			$assemblyhash{$uniquekey} = \%line;
-		}
-		else
-		{
-			my $linecount = $i + 1;
-			installer::exiter::exit_program("ERROR: Unknown line format in table \"$idtfilename\" (line $linecount) !", "analyze_msiassemblytable_file");	
-		}
-	}
-	
-	return \%assemblyhash;
-}
-
-#########################################################################
-# Putting the file table content into a hash.
-#########################################################################
-
-sub analyze_filetable_file
-{
-	my ( $filecontent, $idtfilename ) = @_;
-
-	my %filehash = ();	
-	# Iterating over the file content
-	for ( my $i = 0; $i <= $#{$filecontent}; $i++ )
-	{
-		if ( $i <= 2 ) { next; }						# ignoring first three lines
-		if ( ${$filecontent}[$i] =~ /^\s*$/ ) { next; } # ignoring empty lines
-		if ( ${$filecontent}[$i] =~ /^\s*(.+?)\t(.+?)\t(.+?)\t(.*?)\t(.*?)\t(.*?)\t(.*?)\t(.+?)\s*$/ )
-		{
-			my %line = ();
-			# Format: File	Component_	FileName	FileSize	Version	Language	Attributes	Sequence
-			$line{'File'} = $1;
-			$line{'Component'} = $2;
-			$line{'FileName'} = $3;
-			$line{'FileSize'} = $4;
-			$line{'Version'} = $5;
-			$line{'Language'} = $6;
-			$line{'Attributes'} = $7;
-			$line{'Sequence'} = $8;
-			$line{'linenumber'} = $i; # saving also the line number for direct access
-			
-			my $uniquekey = $line{'File'};
-			$filehash{$uniquekey} = \%line;
-		}
-		else
-		{
-			my $linecount = $i + 1;
-			installer::exiter::exit_program("ERROR: Unknown line format in table \"$idtfilename\" (line $linecount) !", "analyze_filetable_file");	
-		}
-	}
-	
-	return \%filehash;
-}
-
-#########################################################################
-# Creating a new line for the directory table.
-#########################################################################
-
-sub get_new_line_for_directory_table
-{
-	my ($dir) = @_;
-	
-	my $newline = "$dir->{'Directory'}\t$dir->{'Directory_Parent'}\t$dir->{'DefaultDir'}\n";
-
-	return $newline;
-}
-
-#########################################################################
-# Creating a new line for the file table.
-#########################################################################
-
-sub get_new_line_for_file_table
-{
-	my ($file) = @_;
-	
-	my $newline = "$file->{'File'}\t$file->{'Component'}\t$file->{'FileName'}\t$file->{'FileSize'}\t$file->{'Version'}\t$file->{'Language'}\t$file->{'Attributes'}\t$file->{'Sequence'}\n";
-
-	return $newline;
-}
-
-#########################################################################
-# Creating a new line for the msiassembly table.
-#########################################################################
-
-sub get_new_line_for_msiassembly_table
-{
-	my ($assembly) = @_;
-	
-	my $newline = "$assembly->{'Component'}\t$assembly->{'Feature'}\t$assembly->{'File_Manifest'}\t$assembly->{'File_Application'}\t$assembly->{'Attributes'}\n";
-
-	return $newline;
-}
-
-#########################################################################
-# Sorting the files collector, if there are files, following
-# the merge module files.
-#########################################################################
-
-sub sort_files_collector_for_sequence
-{
-	my ($filesref) = @_;
-
-	my @sortarray = ();
-	my %helphash = ();
-	
-	for ( my $i = 0; $i <= $#{$filesref}; $i++ )
-	{
-		my $onefile = ${$filesref}[$i];
-		if ( ! exists($onefile->{'sequencenumber'}) ) { installer::exiter::exit_program("ERROR: Could not find sequencenumber for file: $onefile->{'uniquename'} !", "sort_files_collector_for_sequence"); }
-		my $sequence = $onefile->{'sequencenumber'};
-		$helphash{$sequence} = $onefile;
-	}
-	
-	foreach my $seq ( sort { $a <=> $b } keys %helphash ) { push(@sortarray, $helphash{$seq}); }
-	
-	return \@sortarray;
-}
-
-#########################################################################
-# In the file table "Sequence" and "Attributes" have to be changed.
-#########################################################################
-
-sub change_file_table
-{
-	my ($mergemodulehash, $workdir, $allupdatesequenceshashref, $includepatharrayref, $filesref, $mergemodulegid) = @_;
-
-	my $infoline = "Changing content of table \"File\"\n";
-	$installer::logger::Lang->print($infoline);
-
-	my $idtfilename = "File.idt";
-	if ( ! -f $idtfilename ) { installer::exiter::exit_program("ERROR: Could not find file \"$idtfilename\" in \"$workdir\" !", "change_file_table"); }
-
-	my $filecontent = installer::files::read_file($idtfilename);
-	
-	# If File.idt needed to be removed before the msm database was merged into the msi database,
-	# now it is time to add the content into File.idt
-	if ( $mergemodulehash->{'removefiletable'} )
-	{
-		for ( my $i = 0; $i <= $#{$mergemodulehash->{'fileidtcontent'}}; $i++ )
-		{
-			push(@{$filecontent}, ${$mergemodulehash->{'fileidtcontent'}}[$i]);
-		}
-	}
-
-	# Unpacking the MergeModule.CABinet (only once)
-	# Unpacking into temp directory. Warning: expand.exe has problems with very long unpack directories.
-	
-	my $unpackdir = installer::systemactions::create_directories("cab", "");
-	push(@installer::globals::removedirs, $unpackdir);
-	$unpackdir = $unpackdir . $installer::globals::separator . $mergemodulegid;
-
-	my %newfileshash = ();
-	if (( $installer::globals::fix_number_of_cab_files ) && ( ! $installer::globals::mergefiles_added_into_collector ))
-	{
-		if ( ! -d $unpackdir ) { installer::systemactions::create_directory($unpackdir); }
-
-		# Unpack the cab file, so that in can be included into the last office cabinet file. Attention: cararc.exe from cabsdk required.
-		# cabarc.exe -o X <fullcabfilepath>
-		
-		# my $cabarcfilename = "cabarc.exe";
-		# my $cabarcfile = installer::scriptitems::get_sourcepath_from_filename_and_includepath(\$cabarcfilename, $includepatharrayref, 1);
-	
-		# if ( ! -f $$cabarcfile )
-		# {
-		#	$cabarcfilename = "CABARC.EXE";
-		#	$cabarcfile = installer::scriptitems::get_sourcepath_from_filename_and_includepath(\$cabarcfilename, $includepatharrayref, 1);
-		#	if ( ! -f $$cabarcfile )
-		#	{
-		#		installer::exiter::exit_program("ERROR: cabarc.exe not found !", "change_file_table");
-		#	}
-		# }
-		# my $cabarc = $$cabarcfile;
-						
-		# changing directory
-		my $from = cwd();
-		my $to = $mergemodulehash->{'workdir'};
- 		if ( $^O =~ /cygwin/i ) {
-			$to = qx(cygpath -u "$to");
-			chomp $to;
-		}
-
-		chdir($to) || die "Could not chdir to \"$to\"\n";
-
-		# Unpack the cab file, so that in can be included into the last office cabinet file.
-		# Not using cabarc.exe from cabsdk for unpacking cabinet files, but "expand.exe" that
-		# should be available on every Windows system.
-
-		$infoline = "Unpacking cabinet file: $mergemodulehash->{'cabinetfile'}\n";
-		$installer::logger::Lang->print($infoline);
-
-		# Avoid the Cygwin expand command
-		my $expandfile = "expand.exe";	# Has to be in the path
- 		if ( $^O =~ /cygwin/i ) {
-			$expandfile = qx(cygpath -u "$ENV{WINDIR}"/System32/expand.exe);
-			chomp $expandfile;
-		}
-
-		my $cabfilename = "MergeModule.CABinet";
-
-		# exclude cabinet file
-		# my $systemcall = $cabarc . " -o X " . $mergemodulehash->{'cabinetfile'};
-
-		my $systemcall = "";
-		if ( $^O =~ /cygwin/i ) {
-			my $localunpackdir = qx(cygpath -m "$unpackdir");
-			chomp $localunpackdir;
-			$systemcall = $expandfile . " " . $cabfilename . " -F:\\\* " . $localunpackdir;
-		}
-		else
-		{
-			$systemcall = $expandfile . " " . $cabfilename . " -F:\* " . $unpackdir . " 2\>\&1";
-		}
-
-		my $returnvalue = system($systemcall);
-
-		$infoline = "Systemcall: $systemcall\n";
-		$installer::logger::Lang->print($infoline);
-
-		if ($returnvalue)
-		{
-			$infoline = "ERROR: Could not execute $systemcall !\n";
-			$installer::logger::Lang->print($infoline);
-			installer::exiter::exit_program("ERROR: Could not extract cabinet file: $mergemodulehash->{'cabinetfile'} !", "change_file_table");
-		}
-		else
-		{
-			$infoline = "Success: Executed $systemcall successfully!\n";
-			$installer::logger::Lang->print($infoline);
-		}
-
-		chdir($from);	
-	}	
-
-	# For performance reasons creating a hash with file names and rows
-	# The content of File.idt is changed after every merge -> content cannot be saved in global hash
-	$merge_filetablehashref = analyze_filetable_file($filecontent, $idtfilename);
-
-	my $attributes = "16384"; # Always
-
-	my $filename;
-	foreach $filename (keys %{$mergemodulehash->{'mergefilesequence'}} )
-	{
-		my $mergefilesequence = $mergemodulehash->{'mergefilesequence'}->{$filename};
-		
-		if ( ! exists($merge_filetablehashref->{$filename}) ) { installer::exiter::exit_program("ERROR: Could not find file \"$filename\" in \"$idtfilename\" !", "change_file_table"); }
-		my $filehash = $merge_filetablehashref->{$filename};
-		my $linenumber = $filehash->{'linenumber'};
-		
-		# <- this line has to be changed concerning "Sequence" and "Attributes"
-		$filehash->{'Attributes'} = $attributes;
-		
-		# If this is an update process, the sequence numbers have to be reused.
-		if ( $installer::globals::updatedatabase )
-		{
-			if ( ! exists($allupdatesequenceshashref->{$filehash->{'File'}}) ) { installer::exiter::exit_program("ERROR: Sequence not defined for file \"$filehash->{'File'}\" !", "change_file_table"); }
-			$filehash->{'Sequence'} = $allupdatesequenceshashref->{$filehash->{'File'}};
-			# Saving all mergemodule sequence numbers. This is important for creating ddf files
-			$installer::globals::allmergemodulefilesequences{$filehash->{'Sequence'}} = 1;
-		}
-		else
-		{
-			# Important saved data: $installer::globals::lastsequence_before_merge.
-			# This mechanism keeps the correct order inside the new cabinet file.
-			$filehash->{'Sequence'} = $filehash->{'Sequence'} + $installer::globals::lastsequence_before_merge;
-		} 
-		
-		my $oldline = ${$filecontent}[$linenumber];
-		my $newline = get_new_line_for_file_table($filehash);
-		${$filecontent}[$linenumber] = $newline;
-		
-		$infoline = "Merge, replacing line:\n";
-		$installer::logger::Lang->print($infoline);
-		$infoline = "Old: $oldline\n";
-		$installer::logger::Lang->print($infoline);
-		$infoline = "New: $newline\n";
-		$installer::logger::Lang->print($infoline);
-
-		# Adding files to the files collector (but only once)
-		if (( $installer::globals::fix_number_of_cab_files ) && ( ! $installer::globals::mergefiles_added_into_collector ))
-		{
-			# If the number of cabinet files is kept constant,
-			# all files from the mergemodule cabinet files will
-			# be integrated into the last office cabinet file
-			# (installer::globals::lastcabfilename).
-			# Therefore the files must now be added to the filescollector,
-			# so that they will be integrated into the ddf files.
-						
-			# Problem with very long filenames -> copying to shorter filenames
-			my $newfilename = "f" . $filehash->{'Sequence'};
-			my $completesource = $unpackdir . $installer::globals::separator . $filehash->{'File'};
-			my $completedest = $unpackdir . $installer::globals::separator . $newfilename;
-			installer::systemactions::copy_one_file($completesource, $completedest);
-
-			my $locallastcabfilename = $installer::globals::lastcabfilename;
-			if ( $locallastcabfilename =~ /^\s*\#/ ) { $locallastcabfilename =~ s/^\s*\#//; }  # removing beginning hashes
-						
-			# Create new file hash for file collector			
-			my %newfile = ();
-			$newfile{'sequencenumber'} = $filehash->{'Sequence'};
-			$newfile{'assignedsequencenumber'} = $filehash->{'Sequence'};
-			$newfile{'cabinet'} = $locallastcabfilename;
-			$newfile{'sourcepath'} = $completedest;
-			$newfile{'componentname'} = $filehash->{'Component'};
-			$newfile{'uniquename'} = $filehash->{'File'};
-			$newfile{'Name'} = $filehash->{'File'};
-
-			# Saving in globals sequence hash
-			$installer::globals::uniquefilenamesequence{$filehash->{'File'}} = $filehash->{'Sequence'};
-			
-			if ( ! -f $newfile{'sourcepath'} ) { installer::exiter::exit_program("ERROR: File \"$newfile{'sourcepath'}\" must exist!", "change_file_table"); }
-			
-			# Collecting all new files. Attention: This files must be included into files collector in correct order!
-			$newfileshash{$filehash->{'Sequence'}} = \%newfile;
-			# push(@{$filesref}, \%newfile); -> this is not the correct order	
-		}
-	}
-	
-	# Now the files can be added to the files collector
-	# In the case of an update process, there can be new files, that have to be added after the merge module files.
-	# Warning: In multilingual installation sets, the files only have to be added once to the files collector!
-
-	if ( ! $installer::globals::mergefiles_added_into_collector )
-	{
-		foreach my $localsequence ( sort { $a <=> $b } keys %newfileshash ) { push(@{$filesref}, $newfileshash{$localsequence}); }
-		if ( $installer::globals::newfilesexist ) { $filesref = sort_files_collector_for_sequence($filesref); }
-		# $installer::globals::mergefiles_added_into_collector = 1; -> Not yet. Only if all mergemodules are merged for one language.
-	}
-
-	# Saving the idt file (for every language)
-	installer::files::save_file($idtfilename, $filecontent);
-	
-	return $filesref;	
-}
-
-#########################################################################
-# Reading the file "Director.idt". The Directory, that is defined in scp
-# has to be defined in this table.
-#########################################################################
-
-sub collect_directories
-{
-	my $idtfilename = "Director.idt";
-	my $filecontent = installer::files::read_file($idtfilename);
-
-	for ( my $i = 0; $i <= $#{$filecontent}; $i++ )
-	{
-		if ( $i <= 2 ) { next; }						# ignoring first three lines
-		if ( ${$filecontent}[$i] =~ /^\s*$/ ) { next; } # ignoring empty lines
-		# Format: Directory	Directory_Parent	DefaultDir
-		if ( ${$filecontent}[$i] =~ /^\s*(.+?)\t(.*?)\t(.*?)\s*$/ )
-		{
-			$installer::globals::merge_alldirectory_hash{$1} = 1;
-		}
-		else
-		{
-			my $linecount = $i + 1;
-			installer::exiter::exit_program("ERROR: Unknown line format in table \"$idtfilename\" (line $linecount) !", "collect_directories");	
-		}
-	}	
-}
-
-#########################################################################
-# Reading the file "Feature.idt". The Feature, that is defined in scp
-# has to be defined in this table.
-#########################################################################
-
-sub collect_feature
-{
-	my $idtfilename = "Feature.idt";
-	if ( ! -f $idtfilename ) { installer::exiter::exit_program("ERROR: Could not find file \"$idtfilename\" in \"$workdir\" !", "collect_feature"); }
-	my $filecontent = installer::files::read_file($idtfilename);
-
-	for ( my $i = 0; $i <= $#{$filecontent}; $i++ )
-	{
-		if ( $i <= 2 ) { next; }						# ignoring first three lines
-		if ( ${$filecontent}[$i] =~ /^\s*$/ ) { next; } # ignoring empty lines
-		# Format: Feature	Feature_Parent	Title	Description	Display	Level	Directory_	Attributes
-		if ( ${$filecontent}[$i] =~ /^\s*(.+?)\t(.*?)\t(.*?)\t(.*?)\t(.*?)\t(.*?)\t(.*?)\t(.*?)\s*$/ )
-		{
-			$installer::globals::merge_allfeature_hash{$1} = 1;
-		}
-		else
-		{
-			my $linecount = $i + 1;
-			installer::exiter::exit_program("ERROR: Unknown line format in table \"$idtfilename\" (line $linecount) !", "collect_feature");	
-		}
-	}	
-}
-
-#########################################################################
-# In the featurecomponent table, the new connections have to be added.
-#########################################################################
-
-sub change_featurecomponent_table
-{
-	my ($mergemodulehash, $workdir) = @_;
-	
-	my $infoline = "Changing content of table \"FeatureComponents\"\n";
-	$installer::logger::Lang->print($infoline);
-
-	my $idtfilename = "FeatureC.idt";
-	if ( ! -f $idtfilename ) { installer::exiter::exit_program("ERROR: Could not find file \"$idtfilename\" in \"$workdir\" !", "change_featurecomponent_table"); }
-
-	my $filecontent = installer::files::read_file($idtfilename);
-
-	# Simply adding for each new component one line. The Feature has to be defined in scp project.
-	my $feature = $mergemodulehash->{'feature'};
-
-	if ( ! $installer::globals::mergefeaturecollected )
-	{
-		collect_feature(); # putting content into hash %installer::globals::merge_allfeature_hash
-		$installer::globals::mergefeaturecollected = 1;
-	}
-
-	if ( ! exists($installer::globals::merge_allfeature_hash{$feature}) )
-	{
-		installer::exiter::exit_program("ERROR: Unknown feature defined in scp: \"$feature\" . Not defined in table \"Feature\" !", "change_featurecomponent_table");
-	}
-
-	my $component;
-	foreach $component ( keys %{$mergemodulehash->{'componentnames'}} )
-	{
-		my $line = "$feature\t$component\n";
-		push(@{$filecontent}, $line);
-		$infoline = "Adding line: $line\n";
-		$installer::logger::Lang->print($infoline);
-	}
-
-	# saving file
-	installer::files::save_file($idtfilename, $filecontent);	
-}
-
-#########################################################################
-# In the directory table, the directory parent has to be changed,
-# if it is not TARGETDIR.
-#########################################################################
-
-sub change_directory_table
-{
-	my ($mergemodulehash, $workdir) = @_;
-
-	# directory for MergeModule has to be defined in scp project
-	my $scpdirectory = $mergemodulehash->{'rootdir'};
-	
-	if ( $scpdirectory ne "TARGETDIR" )  # TARGETDIR works fine, when using msidb.exe
-	{
-		my $infoline = "Changing content of table \"Directory\"\n";
-		$installer::logger::Lang->print($infoline);
-
-		my $idtfilename = "Director.idt";
-		if ( ! -f $idtfilename ) { installer::exiter::exit_program("ERROR: Could not find file \"$idtfilename\" in \"$workdir\" !", "change_directory_table"); }
-
-		my $filecontent = installer::files::read_file($idtfilename);
-
-		if ( ! $installer::globals::mergedirectoriescollected )
-		{
-			collect_directories(); # putting content into %installer::globals::merge_alldirectory_hash, only first column!
-			$installer::globals::mergedirectoriescollected = 1;
-		}
-
-		if ( ! exists($installer::globals::merge_alldirectory_hash{$scpdirectory}) )
-		{
-			installer::exiter::exit_program("ERROR: Unknown directory defined in scp: \"$scpdirectory\" . Not defined in table \"Directory\" !", "change_directory_table");
-		}
-
-		# If the definition in scp is okay, now the complete content of "Director.idt" can be analyzed
-		my $merge_directorytablehashref = analyze_directorytable_file($filecontent, $idtfilename);
-
-		my $directory;
-		foreach $directory (keys %{$mergemodulehash->{'mergedirectories'}} )
-		{
-			if ( ! exists($merge_directorytablehashref->{$directory}) ) { installer::exiter::exit_program("ERROR: Could not find directory \"$directory\" in \"$idtfilename\" !", "change_directory_table"); }
-			my $dirhash = $merge_directorytablehashref->{$directory};
-			my $linenumber = $dirhash->{'linenumber'};
-		
-			# <- this line has to be changed concerning "Directory_Parent",
-			# if the current value is "TARGETDIR", which is the default value from msidb.exe
-			
-			if ( $dirhash->{'Directory_Parent'} eq "TARGETDIR" )
-			{
-				$dirhash->{'Directory_Parent'} = $scpdirectory;
-		
-				my $oldline = ${$filecontent}[$linenumber];
-				my $newline = get_new_line_for_directory_table($dirhash);
-				${$filecontent}[$linenumber] = $newline;
-		
-				$infoline = "Merge, replacing line:\n";
-				$installer::logger::Lang->print($infoline);
-				$infoline = "Old: $oldline\n";
-				$installer::logger::Lang->print($infoline);
-				$infoline = "New: $newline\n";
-				$installer::logger::Lang->print($infoline);
-			}
-		}
-
-		# saving file
-		installer::files::save_file($idtfilename, $filecontent);
-	}	
-}
-
-#########################################################################
-# In the msiassembly table, the feature has to be changed.
-#########################################################################
-
-sub change_msiassembly_table
-{
-	my ($mergemodulehash, $workdir) = @_;
-
-	my $infoline = "Changing content of table \"MsiAssembly\"\n";
-	$installer::logger::Lang->print($infoline);
-
-	my $idtfilename = "MsiAssem.idt";
-	if ( ! -f $idtfilename ) { installer::exiter::exit_program("ERROR: Could not find file \"$idtfilename\" in \"$workdir\" !", "change_msiassembly_table"); }
-
-	my $filecontent = installer::files::read_file($idtfilename);
-
-	# feature has to be defined in scp project
-	my $feature = $mergemodulehash->{'feature'};
-	
-	if ( ! $installer::globals::mergefeaturecollected )
-	{
-		collect_feature();  # putting content into hash %installer::globals::merge_allfeature_hash
-		$installer::globals::mergefeaturecollected = 1;
-	}
-
-	if ( ! exists($installer::globals::merge_allfeature_hash{$feature}) )
-	{
-		installer::exiter::exit_program("ERROR: Unknown feature defined in scp: \"$feature\" . Not defined in table \"Feature\" !", "change_msiassembly_table");
-	}
-	
-	my $merge_msiassemblytablehashref = analyze_msiassemblytable_file($filecontent, $idtfilename);
-
-	my $component;
-	foreach $component (keys %{$mergemodulehash->{'mergeassemblies'}} )
-	{
-		if ( ! exists($merge_msiassemblytablehashref->{$component}) ) { installer::exiter::exit_program("ERROR: Could not find component \"$component\" in \"$idtfilename\" !", "change_msiassembly_table"); }
-		my $assemblyhash = $merge_msiassemblytablehashref->{$component};
-		my $linenumber = $assemblyhash->{'linenumber'};
-		
-		# <- this line has to be changed concerning "Feature"
-		$assemblyhash->{'Feature'} = $feature;
-		
-		my $oldline = ${$filecontent}[$linenumber];
-		my $newline = get_new_line_for_msiassembly_table($assemblyhash);
-		${$filecontent}[$linenumber] = $newline;
-		
-		$infoline = "Merge, replacing line:\n";
-		$installer::logger::Lang->print($infoline);
-		$infoline = "Old: $oldline\n";
-		$installer::logger::Lang->print($infoline);
-		$infoline = "New: $newline\n";
-		$installer::logger::Lang->print($infoline);
-	}
-	
-	# saving file
-	installer::files::save_file($idtfilename, $filecontent);	
-}
-
-#########################################################################
-# Creating file content hash
-#########################################################################
-
-sub make_executeidtcontent_hash
-{
-	my ($filecontent, $idtfilename) = @_;
-	
-	my %newhash = ();
-
-	for ( my $i = 0; $i <= $#{$filecontent}; $i++ )
-	{
-		if ( $i <= 2 ) { next; }						# ignoring first three lines
-		if ( ${$filecontent}[$i] =~ /^\s*$/ ) { next; } # ignoring empty lines
-		# Format for all sequence tables: Action	Condition	Sequence
-		if ( ${$filecontent}[$i] =~ /^\s*(.+?)\t(.*?)\t(.*?)\s*$/ )
-		{
-			my %onehash = ();
-			$onehash{'Action'} = $1;
-			$onehash{'Condition'} = $2;
-			$onehash{'Sequence'} = $3;
-			$newhash{$onehash{'Action'}} = \%onehash;
-		}
-		else
-		{
-			my $linecount = $i + 1;
-			installer::exiter::exit_program("ERROR: Unknown line format in table \"$idtfilename\" (line $linecount) !", "make_executeidtcontent_hash");	
-		}
-	}
-	
-	return \%newhash;
-}
-
-#########################################################################
-# Creating file content hash
-#########################################################################
-
-sub make_moduleexecuteidtcontent_hash
-{
-	my ($filecontent, $idtfilename) = @_;
-	
-	my %newhash = ();
-
-	for ( my $i = 0; $i <= $#{$filecontent}; $i++ )
-	{
-		if ( $i <= 2 ) { next; }						# ignoring first three lines
-		if ( ${$filecontent}[$i] =~ /^\s*$/ ) { next; } # ignoring empty lines
-		# Format for all module sequence tables: Action	Sequence	BaseAction	After Condition
-		if ( ${$filecontent}[$i] =~ /^\s*(.+?)\t(.*?)\t(.*?)\t(.*?)\t(.*?)\s*$/ )
-		{
-			my %onehash = ();
-			$onehash{'Action'} = $1;
-			$onehash{'Sequence'} = $2;
-			$onehash{'BaseAction'} = $3;
-			$onehash{'After'} = $4;
-			$onehash{'Condition'} = $5;
-			$newhash{$onehash{'Action'}} = \%onehash;
-		}
-		else
-		{
-			my $linecount = $i + 1;
-			installer::exiter::exit_program("ERROR: Unknown line format in table \"$idtfilename\" (line $linecount) !", "make_executeidtcontent_hash");	
-		}
-	}
-	
-	return \%newhash;
-}
-
-#########################################################################
-# ExecuteSequence tables need to be merged with
-# ModuleExecuteSequence tables created by msidb.exe.
-#########################################################################
-
-sub change_executesequence_table
-{
-	my ($mergemodulehash, $workdir, $idtfilename, $moduleidtfilename) = @_;
-
-	my $infoline = "Changing content of table \"$idtfilename\"\n";
-	$installer::logger::Lang->print($infoline);
-
-	if ( ! -f $idtfilename ) { installer::exiter::exit_program("ERROR: Could not find file \"$idtfilename\" in \"$workdir\" !", "change_executesequence_table"); }
-	if ( ! -f $moduleidtfilename ) { installer::exiter::exit_program("ERROR: Could not find file \"$moduleidtfilename\" in \"$workdir\" !", "change_executesequence_table"); }
-	
-	# Reading file content
-	my $idtfilecontent = installer::files::read_file($idtfilename);
-	my $moduleidtfilecontent = installer::files::read_file($moduleidtfilename);
-	
-	# Converting to hash
-	my $idtcontenthash = make_executeidtcontent_hash($idtfilecontent, $idtfilename);
-	my $moduleidtcontenthash = make_moduleexecuteidtcontent_hash($moduleidtfilecontent, $moduleidtfilename);
-	
-	# Merging
-	foreach my $action ( keys %{$moduleidtcontenthash} )
-	{
-		if ( exists($idtcontenthash->{$action}) ) { next; }	# Action already exists, can be ignored
-		
-		if (( $idtfilename eq "InstallU.idt" ) && ( ! ( $action =~ /^\s*WindowsFolder\./ ))) { next; } # Only "WindowsFolder.*" CustomActions for UI Sequence table
-		
-		my $actionhashref = $moduleidtcontenthash->{$action};
-		if ( $actionhashref->{'Sequence'} ne "" )
-		{
-			# Format for all sequence tables: Action Condition Sequence
-			my $newline = $actionhashref->{'Action'} . "\t" . $actionhashref->{'Condition'} . "\t" . $actionhashref->{'Sequence'} . "\n";
-			# Adding to table
-			push(@{$idtfilecontent}, $newline);
-			# Also adding to hash
-			my %idttablehash = ();
-			$idttablehash{'Action'} = $actionhashref->{'Action'};
-			$idttablehash{'Condition'} = $actionhashref->{'Condition'};
-			$idttablehash{'Sequence'} = $actionhashref->{'Sequence'};
-			$idtcontenthash->{$action} = \%idttablehash;
-			
-		}
-		else	# no sequence defined, using syntax "BaseAction" and "After"
-		{
-			my $baseactionname = $actionhashref->{'BaseAction'};
-			# If this baseactionname is not defined in execute idt file, it is not possible to merge
-			if ( ! exists($idtcontenthash->{$baseactionname}) ) { installer::exiter::exit_program("ERROR: Merge problem: Could not find action \"$baseactionname\" in file \"$idtfilename\" !", "change_executesequence_table"); }
-			
-			my $baseaction = $idtcontenthash->{$baseactionname};
-			my $sequencenumber = $baseaction->{'Sequence'};
-			if ( $actionhashref->{'After'} == 1 ) { $sequencenumber = $sequencenumber + 1; }
-			else { $sequencenumber = $sequencenumber - 1; }
-			
-			# Format for all sequence tables: Action Condition Sequence
-			my $newline = $actionhashref->{'Action'} . "\t" . $actionhashref->{'Condition'} . "\t" . $sequencenumber . "\n";
-			# Adding to table
-			push(@{$idtfilecontent}, $newline);
-			# Also adding to hash
-			my %idttablehash = ();
-			$idttablehash{'Action'} = $actionhashref->{'Action'};
-			$idttablehash{'Condition'} = $actionhashref->{'Condition'};
-			$idttablehash{'Sequence'} = $sequencenumber;
-			$idtcontenthash->{$action} = \%idttablehash;		
-		}
-	} 
-
-	# saving file
-	installer::files::save_file($idtfilename, $idtfilecontent);
-}
-
-
-1;
diff --git a/main/solenv/bin/modules/installer/windows/msiglobal.pm b/main/solenv/bin/modules/installer/windows/msiglobal.pm
index 784d806..e542259 100644
--- a/main/solenv/bin/modules/installer/windows/msiglobal.pm
+++ b/main/solenv/bin/modules/installer/windows/msiglobal.pm
@@ -166,193 +166,7 @@
 
 	if ( $^O =~ /cygwin/i ) { installer::worker::generate_cygwin_pathes($filesref); }
 
-	if ( $installer::globals::use_packages_for_cabs )
-	{
-		my $sequenceorder = get_sequenceorder($filesref);
-		
-		my $counter = 1;
-		my $currentcabfile = "";
-		
-		while ( ( exists($sequenceorder->{$counter}) ) || ( exists($installer::globals::allmergemodulefilesequences{$counter}) ) ) # Taking care of files from merge modules
-		{
-			if ( exists($installer::globals::allmergemodulefilesequences{$counter}) )
-			{
-				# Skipping this sequence, it is not included in $filesref, because it is assigned to a file from a merge module.\n";
-				$counter++;
-				next;	
-			}
-			
-			# Files with increasing sequencerorder are included in one cab file
-			my $onefile = ${$filesref}[$sequenceorder->{$counter}];
-			my $cabinetfile = $onefile->{'assignedcabinetfile'};
-			my $sourcepath =  $onefile->{'sourcepath'};
-			if ( $^O =~ /cygwin/i ) { $sourcepath = $onefile->{'cyg_sourcepath'}; }
-			my $uniquename =  $onefile->{'uniquename'};
-
-			my $styles = "";
-			my $doinclude = 1;
-			if ( $onefile->{'Styles'} ) { $styles = $onefile->{'Styles'}; };
-			if ( $styles =~ /\bDONT_PACK\b/ ) { $doinclude = 0; }
-			
-			# to avoid lines with more than 256 characters, it can be useful to use relative pathes
-			if ( $allvariables->{'RELATIVE_PATHES_IN_DDF'} ) { $sourcepath = make_relative_ddf_path($sourcepath); }
-
-			# all files with the same cabinetfile have increasing sequencenumbers
-
-			my @ddffile = ();
-
-			write_ddf_file_header(\@ddffile, $cabinetfile, $installdir);
-	
-			my $ddfline = "\"" . $sourcepath . "\"" . " " . $uniquename . "\n";
-			if ( $doinclude ) { push(@ddffile, $ddfline); }
-			
-			$counter++;	# increasing the counter
-			my $nextfile = "";
-			my $nextcabinetfile = "";
-			if ( exists($sequenceorder->{$counter}) ) { $nextfile = ${$filesref}[$sequenceorder->{$counter}]; }		
-			if ( $nextfile->{'assignedcabinetfile'} ) { $nextcabinetfile = $nextfile->{'assignedcabinetfile'}; }
-		
-			while ( $nextcabinetfile eq $cabinetfile )
-			{
-				$sourcepath =  $nextfile->{'sourcepath'};
-				if ( $^O =~ /cygwin/i ) { $sourcepath = $nextfile->{'cyg_sourcepath'}; }
-				# to avoid lines with more than 256 characters, it can be useful to use relative pathes
-				if ( $allvariables->{'RELATIVE_PATHES_IN_DDF'} ) { $sourcepath = make_relative_ddf_path($sourcepath); }
-				$uniquename =  $nextfile->{'uniquename'};
-				my $localdoinclude = 1;
-				my $nextfilestyles = "";				
-				if ( $nextfile->{'Styles'} ) { $nextfilestyles = $nextfile->{'Styles'}; }
-				if ( $nextfilestyles =~ /\bDONT_PACK\b/ ) { $localdoinclude = 0; }
-				$ddfline = "\"" . $sourcepath . "\"" . " " . $uniquename . "\n";
-				if ( $localdoinclude ) { push(@ddffile, $ddfline); }
-				
-				$counter++;	# increasing the counter!
-				$nextcabinetfile = "_lastfile_";
-				if ( exists($sequenceorder->{$counter}) )
-				{
-					$nextfile = ${$filesref}[$sequenceorder->{$counter}];
-					$nextcabinetfile = $nextfile->{'assignedcabinetfile'};
-				}
-			}
-		
-			# creating the DDF file
-
-			my $ddffilename = $cabinetfile;
-			$ddffilename =~ s/.cab/.ddf/;
-			$ddfdir =~ s/\Q$installer::globals::separator\E\s*$//;
-			$ddffilename = $ddfdir . $installer::globals::separator . $ddffilename;
-
-			installer::files::save_file($ddffilename ,\@ddffile);
-			my $infoline = "Created ddf file: $ddffilename\n"; 
-			$installer::logger::Lang->print($infoline);
-
-			# lines in ddf files must not be longer than 256 characters
-			check_ddf_file(\@ddffile, $ddffilename);
-
-			# Writing the makecab system call
-
-			my $oneline = "makecab.exe /V3 /F " . $ddffilename . " 2\>\&1 |" . "\n";
-		
-			push(@cabfilelist, $oneline);
-
-			# collecting all ddf files
-			push(@installer::globals::allddffiles, $ddffilename);
-		}
-	}
-	elsif ((( $installer::globals::cab_file_per_component ) || ( $installer::globals::fix_number_of_cab_files )) && ( $installer::globals::updatedatabase ))
-	{
-		my $sequenceorder = get_sequenceorder($filesref);
-		
-		my $counter = 1;
-		my $currentcabfile = "";
-		
-		while ( ( exists($sequenceorder->{$counter}) ) || ( exists($installer::globals::allmergemodulefilesequences{$counter}) ) ) # Taking care of files from merge modules
-		{
-#			if ( exists($installer::globals::allmergemodulefilesequences{$counter}) )
-#			{
-#				# Skipping this sequence, it is not included in $filesref, because it is assigned to a file from a merge module.\n";
-#				$counter++;
-#				next;	
-#			}
-
-			my $onefile = ${$filesref}[$sequenceorder->{$counter}];
-			$counter++;
-
-			my $cabinetfile = $onefile->{'cabinet'};
-			my $sourcepath =  $onefile->{'sourcepath'};
-			if ( $^O =~ /cygwin/i ) { $sourcepath = $onefile->{'cyg_sourcepath'}; }
-			my $uniquename =  $onefile->{'uniquename'};
-
-			my $styles = "";
-			my $doinclude = 1;
-			if ( $onefile->{'Styles'} ) { $styles = $onefile->{'Styles'}; };
-			if ( $styles =~ /\bDONT_PACK\b/ ) { $doinclude = 0; }
-
-			# to avoid lines with more than 256 characters, it can be useful to use relative pathes
-			if ( $allvariables->{'RELATIVE_PATHES_IN_DDF'} ) { $sourcepath = make_relative_ddf_path($sourcepath); }
-
-			my @ddffile = ();
-
-			write_ddf_file_header(\@ddffile, $cabinetfile, $installdir);
-	
-			my $ddfline = "\"" . $sourcepath . "\"" . " " . $uniquename . "\n";
-			if ( $doinclude ) { push(@ddffile, $ddfline); }
-
-			my $nextfile = "";
-			if ( ${$filesref}[$sequenceorder->{$counter}] ) { $nextfile = ${$filesref}[$sequenceorder->{$counter}]; }
-
-			my $nextcabinetfile = "";
-		
-			if ( $nextfile->{'cabinet'} ) { $nextcabinetfile = $nextfile->{'cabinet'}; }
-		
-			while ( $nextcabinetfile eq $cabinetfile )
-			{
-				$sourcepath =  $nextfile->{'sourcepath'};
-				if ( $^O =~ /cygwin/i ) { $sourcepath = $nextfile->{'cyg_sourcepath'}; }
-				# to avoid lines with more than 256 characters, it can be useful to use relative pathes
-				if ( $allvariables->{'RELATIVE_PATHES_IN_DDF'} ) { $sourcepath = make_relative_ddf_path($sourcepath); }
-				$uniquename =  $nextfile->{'uniquename'};
-				my $localdoinclude = 1;
-				my $nextfilestyles = "";				
-				if ( $nextfile->{'Styles'} ) { $nextfilestyles = $nextfile->{'Styles'}; }
-				if ( $nextfilestyles =~ /\bDONT_PACK\b/ ) { $localdoinclude = 0; }
-				$ddfline = "\"" . $sourcepath . "\"" . " " . $uniquename . "\n";
-				if ( $localdoinclude ) { push(@ddffile, $ddfline); }
-				$counter++;											# increasing the counter!
-				$nextfile = "";
-				$nextcabinetfile = "_lastfile_";
-				if (( exists($sequenceorder->{$counter}) ) && ( ${$filesref}[$sequenceorder->{$counter}] ))
-				{
-					$nextfile = ${$filesref}[$sequenceorder->{$counter}];
-					$nextcabinetfile = $nextfile->{'cabinet'};
-				}
-			}
-		
-			# creating the DDF file
-
-			my $ddffilename = $cabinetfile;
-			$ddffilename =~ s/.cab/.ddf/;
-			$ddfdir =~ s/\Q$installer::globals::separator\E\s*$//;
-			$ddffilename = $ddfdir . $installer::globals::separator . $ddffilename;
-
-			installer::files::save_file($ddffilename ,\@ddffile);
-			my $infoline = "Created ddf file: $ddffilename\n"; 
-			$installer::logger::Lang->print($infoline);
-
-			# lines in ddf files must not be longer than 256 characters
-			check_ddf_file(\@ddffile, $ddffilename);
-
-			# Writing the makecab system call
-
-			my $oneline = "makecab.exe /V3 /F " . $ddffilename . " 2\>\&1 |" . "\n";
-		
-			push(@cabfilelist, $oneline);
-
-			# collecting all ddf files
-			push(@installer::globals::allddffiles, $ddffilename);
-		}		
-	}
-	elsif (( $installer::globals::cab_file_per_component ) || ( $installer::globals::fix_number_of_cab_files ))
+	if ( $installer::globals::fix_number_of_cab_files )
 	{
 		for ( my $i = 0; $i <= $#{$filesref}; $i++ )
 		{	
@@ -428,69 +242,6 @@
 			push(@installer::globals::allddffiles, $ddffilename);
 		}
 	}
-	elsif (( $installer::globals::one_cab_file ) && ( $installer::globals::updatedatabase ))
-	{
-		my $sequenceorder = get_sequenceorder($filesref);
-		
-		my $counter = 1;
-		my $currentcabfile = "";
-		
-		while ( ( exists($sequenceorder->{$counter}) ) || ( exists($installer::globals::allmergemodulefilesequences{$counter}) ) ) # Taking care of files from merge modules
-		{
-			if ( exists($installer::globals::allmergemodulefilesequences{$counter}) )
-			{
-				# Skipping this sequence, it is not included in $filesref, because it is assigned to a file from a merge module.\n";
-				$counter++;
-				next;	
-			}
-
-			my $onefile = ${$filesref}[$sequenceorder->{$counter}];
-		
-			$cabinetfile = $onefile->{'cabinet'};
-			my $sourcepath =  $onefile->{'sourcepath'};
-			if ( $^O =~ /cygwin/i ) { $sourcepath = $onefile->{'cyg_sourcepath'}; }
-			my $uniquename =  $onefile->{'uniquename'};
-
-			# to avoid lines with more than 256 characters, it can be useful to use relative pathes
-			if ( $allvariables->{'RELATIVE_PATHES_IN_DDF'} ) { $sourcepath = make_relative_ddf_path($sourcepath); }
-
-			if ( $counter == 1 ) { write_ddf_file_header(\@ddffile, $cabinetfile, $installdir); }
-
-			my $styles = "";
-			my $doinclude = 1;
-			if ( $onefile->{'Styles'} ) { $styles = $onefile->{'Styles'}; };
-			if ( $styles =~ /\bDONT_PACK\b/ ) { $doinclude = 0; }
-
-			my $ddfline = "\"" . $sourcepath . "\"" . " " . $uniquename . "\n";
-			if ( $doinclude ) { push(@ddffile, $ddfline); }
-
-			$counter++;	# increasing the counter
-		}
-		
-		# creating the DDF file
-
-		my $ddffilename = $cabinetfile;
-		$ddffilename =~ s/.cab/.ddf/;
-		$ddfdir =~ s/[\/\\]\s*$//;
-		$ddffilename = $ddfdir . $installer::globals::separator . $ddffilename;
-
-		installer::files::save_file($ddffilename ,\@ddffile);
-		my $infoline = "Created ddf file: $ddffilename\n"; 
-		$installer::logger::Lang->print($infoline);
-
-		# lines in ddf files must not be longer than 256 characters
-		check_ddf_file(\@ddffile, $ddffilename);
-
-		# Writing the makecab system call
-
-		# my $oneline = "makecab.exe /F " . $ddffilename . "\n";
-		my $oneline = "makecab.exe /V3 /F " . $ddffilename . " 2\>\&1 |" . "\n";
-		
-		push(@cabfilelist, $oneline);
-
-		# collecting all ddf files
-		push(@installer::globals::allddffiles, $ddffilename);
-	}
 	elsif ( $installer::globals::one_cab_file )
 	{
 		my @ddffile = ();
@@ -1405,28 +1156,6 @@
 }
 
 #################################################################
-# Copying MergeModules for the Windows installer into the 
-# installation set. The list of MergeModules is located
-# in %installer::globals::copy_msm_files
-#################################################################
-
-sub copy_merge_modules_into_installset
-{
-	my ($installdir) = @_;
-
-	installer::logger::include_header_into_logfile("Copying Merge files into installation set");
-	
-	my $cabfile;
-	foreach $cabfile ( keys  %installer::globals::copy_msm_files )
-	{
-		my $sourcefile  = $installer::globals::copy_msm_files{$cabfile};
-		my $destfile = $installdir . $installer::globals::separator . $cabfile;
-
-		installer::systemactions::copy_one_file($sourcefile, $destfile);
-	}
-}
-
-#################################################################
 # Copying the child projects into the 
 # installation set
 #################################################################
@@ -2016,11 +1745,7 @@
 	}
 
 	# ProductCode must not change, if Windows patches shall be applied
-	if ( $installer::globals::updatedatabase )
-	{
-		$installer::globals::productcode = $alloldproperties->{'ProductCode'};
-	}
-	elsif ( $installer::globals::prepare_winpatch )
+	if ( $installer::globals::prepare_winpatch )
 	{	
 		# ProductCode has to be specified in each language
 		my $searchstring = "PRODUCTCODE";
diff --git a/main/solenv/bin/modules/installer/windows/msp.pm b/main/solenv/bin/modules/installer/windows/msp.pm
deleted file mode 100644
index b0a9eec..0000000
--- a/main/solenv/bin/modules/installer/windows/msp.pm
+++ /dev/null
@@ -1,1493 +0,0 @@
-#**************************************************************
-#  
-#  Licensed to the Apache Software Foundation (ASF) under one
-#  or more contributor license agreements.  See the NOTICE file
-#  distributed with this work for additional information
-#  regarding copyright ownership.  The ASF licenses this file
-#  to you under the Apache License, Version 2.0 (the
-#  "License"); you may not use this file except in compliance
-#  with the License.  You may obtain a copy of the License at
-#  
-#    http://www.apache.org/licenses/LICENSE-2.0
-#  
-#  Unless required by applicable law or agreed to in writing,
-#  software distributed under the License is distributed on an
-#  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-#  KIND, either express or implied.  See the License for the
-#  specific language governing permissions and limitations
-#  under the License.
-#  
-#**************************************************************
-
-
-
-package installer::windows::msp;
-
-use File::Copy;
-use installer::control;
-use installer::converter;
-use installer::exiter;
-use installer::files;
-use installer::globals;
-use installer::logger;
-use installer::pathanalyzer;
-use installer::systemactions;
-use installer::windows::admin;
-use installer::windows::idtglobal;
-use installer::windows::update;
-
-#################################################################################
-# Making all required administrative installations
-#################################################################################
-
-sub install_installation_sets
-{
-	my ($installationdir) = @_;
-
-	# Finding the msi database in the new installation set, that is located in $installationdir
-	
-	my $msifiles = installer::systemactions::find_file_with_file_extension("msi", $installationdir);
-	
-	if ( $#{$msifiles} < 0 ) { installer::exiter::exit_program("ERROR: Did not find msi database in directory $installationdir", "create_msp_patch"); }
-	if ( $#{$msifiles} > 0 ) { installer::exiter::exit_program("ERROR: Did find more than one msi database in directory $installationdir", "create_msp_patch"); }
-
-	my $newinstallsetdatabasepath = $installationdir . $installer::globals::separator . ${$msifiles}[0];
-	my $oldinstallsetdatabasepath = $installer::globals::updatedatabasepath;
-
-	# Creating temp directory again
-	installer::systemactions::create_directory_structure($installer::globals::temppath);
-
-	# Creating old installation directory
-	my $dirname = "admin";
-	my $installpath = $installer::globals::temppath . $installer::globals::separator . $dirname;
-	if ( ! -d $installpath) { installer::systemactions::create_directory($installpath); }
-
-	my $oldinstallpath = $installpath . $installer::globals::separator . "old";
-	my $newinstallpath = $installpath . $installer::globals::separator . "new";
-
-	if ( ! -d $oldinstallpath) { installer::systemactions::create_directory($oldinstallpath); }
-	if ( ! -d $newinstallpath) { installer::systemactions::create_directory($newinstallpath); }
-	
-	my $olddatabase = installer::windows::admin::make_admin_install($oldinstallsetdatabasepath, $oldinstallpath);
-	my $newdatabase = installer::windows::admin::make_admin_install($newinstallsetdatabasepath, $newinstallpath);
-
-	if ( $^O =~ /cygwin/i ) {
-		$olddatabase = qx{cygpath -w "$olddatabase"};
-		$olddatabase =~ s/\s*$//g;
-		$newdatabase = qx{cygpath -w "$newdatabase"};
-		$newdatabase =~ s/\s*$//g;
-	}
-	
-	return ($olddatabase, $newdatabase);
-}
-
-#################################################################################
-# Collecting the destinations of all files with flag PATCH in a hash.
-#################################################################################
-
-sub collect_patch_file_destinations
-{
-	my ( $filesarray ) = @_;
-	
-	my %patchfiledestinations = ();
-	my %nopatchfiledestinations = ();
-	my $patchcounter = 0;
-	my $nopatchcounter = 0;
-	
-	for ( my $i = 0; $i <= $#{$filesarray}; $i++ )
-	{
-		my $onefile = ${$filesarray}[$i];
-		my $styles = "";
-
-		if ( $onefile->{'Styles'} ) { $styles = $onefile->{'Styles'} };
-
-		if ( $styles =~ /\bPATCH\b/ )
-		{
-			$patchfiledestinations{$onefile->{'destination'}} = 1;
-			$patchcounter++;
-		}
-		else
-		{
-			$nopatchfiledestinations{$onefile->{'destination'}} = 1;
-			$nopatchcounter++;
-		}
-	}
-	
-	return (\%patchfiledestinations, \%nopatchfiledestinations, $patchcounter, $nopatchcounter);
-}
-
-#################################################################################
-# Returning the first path segment of a path
-#################################################################################
-
-sub get_first_path_segment
-{
-	my ( $path ) = @_;
-	
-	my $firstsegment = "";
-	my $remainder = $path;
-
-	if ( $path =~ /^\s*(.*?)[\/\\](.*)\s*$/ )
-	{
-		$firstsegment = $1;
-		$remainder = $2;
-	}
-	
-	return ($firstsegment, $remainder);
-}
-
-#################################################################################
-# Finding the flexible path in the destinations, that are saved in
-# the hash $nopatchfiledestinations.
-#################################################################################
-
-sub prepare_path_in_nopatchfilehash
-{
-	my ($nopatchfiledestinations, $newpath) = @_;
-	
-	my $infoline = "";
-	my $flexiblepath = "";
-	my $found = 0;
-	my %checked_destinations = ();
-	
-	foreach my $onedestination ( keys %{$nopatchfiledestinations} )
-	{
-		$flexiblepath = "";
-		$found = 0;
-	
-		my $found_first_segement = 1;
-		my $firstsegement = "";
-		my $fixedpath = $onedestination;
-		my $testfile = $newpath . $installer::globals::separator . $fixedpath;
-
-		while (( ! -f $testfile ) && ( $found_first_segement ))
-		{
-			$firstsegement = "";
-			( $firstsegement, $fixedpath ) = get_first_path_segment($fixedpath);
-
-			if ( $firstsegement ne "" )
-			{
-				$found_first_segement = 1;
-				$flexiblepath = $flexiblepath . $firstsegement . $installer::globals::separator;		
-			}
-			else
-			{
-				$found_first_segement = 0;
-			}
-
-			$testfile = $newpath . $installer::globals::separator . $fixedpath;
-		}
-		
-		if ( -f $testfile ) { $found = 1; }
-	
-		if ( $found ) { last; }
-	}
-
-	if ( ! $found ) { installer::exiter::exit_program("ERROR: Could not determine flexible destination path for msp patch creation!", "prepare_path_in_nopatchfilehash"); }
-
-	$infoline = "Setting flexible path for msp creation: $flexiblepath\n";
-	$installer::logger::Lang->print($infoline);
-
-	foreach my $onedestination ( keys %{$nopatchfiledestinations} )
-	{
-		$onedestination =~ s/^\s*\Q$flexiblepath\E//;
-		$checked_destinations{$onedestination} = 1;
-	}
-
-	return \%checked_destinations;
-}
-
-#################################################################################
-# Synchronizing the two installed products in that way, that only
-# files with flag PATCH are different.
-#################################################################################
-
-sub synchronize_installation_sets
-{
-	my ($olddatabase, $newdatabase, $filesarray) = @_;
-
-	$installer::logger::Lang->print("\n");
-	$installer::logger::Lang->print("Synchronizing installed products because of PATCH flag\n");
-	$infoline = "Old product: $olddatabase\n";
-	$installer::logger::Lang->print($infoline);
-	$infoline = "New product: $newdatabase\n";
-	$installer::logger::Lang->print($infoline);
-	
-	my ( $patchfiledestinations, $nopatchfiledestinations, $patchfilecounter, $nopatchfilecounter ) = collect_patch_file_destinations($filesarray);
-	
-	$infoline = "Number of files with PATCH flag: $patchfilecounter\n";
-	$installer::logger::Lang->print($infoline);
-
-	$infoline = "Number of files without PATCH flag: $nopatchfilecounter\n";
-	$installer::logger::Lang->print($infoline);
-	
-	foreach my $localfile ( sort keys %{$patchfiledestinations} )
-	{
-		$infoline = "\tPATCH file: $localfile\n";
-		$installer::logger::Lang->print($infoline);
-	}
-	
-	my $oldpath = $olddatabase;
-	if ( $^O =~ /cygwin/i ) { $oldpath =~ s/\\/\//g; }
-	installer::pathanalyzer::get_path_from_fullqualifiedname(\$oldpath);
-	$oldpath =~ s/\\\s*$//;
-	$oldpath =~ s/\/\s*$//;
-
-	my $newpath = $newdatabase;	
-	if ( $^O =~ /cygwin/i ) { $newpath =~ s/\\/\//g; }
-	installer::pathanalyzer::get_path_from_fullqualifiedname(\$newpath);
-	$newpath =~ s/\\\s*$//;
-	$newpath =~ s/\/\s*$//;
-	
-	# The destination path is not correct. destinations in the hash contain
-	# the flexible installation path, that is not part in the administrative installation
-	$nopatchfiledestinations = prepare_path_in_nopatchfilehash($nopatchfiledestinations, $newpath);
-
-	foreach my $onedestination ( keys %{$nopatchfiledestinations} )
-	{
-		my $source = $oldpath . $installer::globals::separator . $onedestination;
-		my $dest = $newpath . $installer::globals::separator . $onedestination;
-			
-		if ( -f $source )
-		{
-			if ( -f $dest )
-			{
-				my $copyreturn = copy($source, $dest);
-				# installer::systemactions::copy_one_file($source, $dest);
-				# $infoline = "Synchronizing file: $source to $dest\n";
-				# $installer::logger::Lang->print($infoline);
-			}
-			else
-			{
-				$infoline = "Not synchronizing. Destination file \"$dest\" does not exist.\n";
-				$installer::logger::Lang->print($infoline);			
-			}
-		}
-		else
-		{
-			$infoline = "Not synchronizing. Source file \"$source\" does not exist.\n";
-			$installer::logger::Lang->print($infoline);
-		}
-	}
-}
-
-#################################################################################
-# Extracting all tables from a pcp file
-#################################################################################
-
-sub extract_all_tables_from_pcpfile
-{
-	my ($fullpcpfilepath, $workdir) = @_;
-
-	my $msidb = "msidb.exe";	# Has to be in the path
-	my $infoline = "";
-	my $systemcall = "";
-	my $returnvalue = "";
-	my $extraslash = "";		# Has to be set for non-ActiveState perl
-
-	my $localfullpcpfile = $fullpcpfilepath;
-	my $localworkdir = $workdir;
-
-	if ( $^O =~ /cygwin/i ) {
-		# msidb.exe really wants backslashes. (And double escaping because system() expands the string.)
-		$localfullpcpfile =~ s/\//\\\\/g;
-		$localworkdir =~ s/\//\\\\/g;
-		$extraslash = "\\";
-	}
-
-	# Export of all tables by using "*"
-							
-	$systemcall = $msidb . " -d " . $localfullpcpfile . " -f " . $localworkdir . " -e " . $extraslash . "*";
-	$returnvalue = system($systemcall);
-
-	$infoline = "Systemcall: $systemcall\n";
-	$installer::logger::Lang->print($infoline);
-
-	if ($returnvalue)
-	{
-		$infoline = "ERROR: Could not execute $systemcall !\n";
-		$installer::logger::Lang->print($infoline);
-		installer::exiter::exit_program("ERROR: Could not exclude tables from pcp file: $fullpcpfilepath !", "extract_all_tables_from_msidatabase");
-	}
-	else
-	{
-		$infoline = "Success: Executed $systemcall successfully!\n";
-		$installer::logger::Lang->print($infoline);
-	}
-}
-
-#################################################################################
-# Include tables into a pcp file
-#################################################################################
-
-sub include_tables_into_pcpfile
-{
-	my ($fullpcpfilepath, $workdir, $tables) = @_;
-
-	my $msidb = "msidb.exe";	# Has to be in the path
-	my $infoline = "";
-	my $systemcall = "";
-	my $returnvalue = "";
-
-	# Make all table 8+3 conform
-	my $alltables = installer::converter::convert_stringlist_into_array(\$tables, " ");
-	
-	for ( my $i = 0; $i <= $#{$alltables}; $i++ )
-	{
-		my $tablename = ${$alltables}[$i];
-		$tablename =~ s/\s*$//;
-		my $namelength = length($tablename);
-		if ( $namelength > 8 )
-		{
-			my $newtablename = substr($tablename, 0, 8);	# name, offset, length
-			my $oldfile = $workdir . $installer::globals::separator . $tablename . ".idt";
-			my $newfile = $workdir . $installer::globals::separator . $newtablename . ".idt";
-			if ( -f $newfile ) { unlink $newfile; }
-			installer::systemactions::copy_one_file($oldfile, $newfile);
-		}
-	}
-
-	# Import of tables
-
-	my $localworkdir = $workdir;
-	my $localfullpcpfilepath = $fullpcpfilepath;
-
-	if ( $^O =~ /cygwin/i ) {
-		# msidb.exe really wants backslashes. (And double escaping because system() expands the string.)
-		$localfullpcpfilepath =~ s/\//\\\\/g;
-		$localworkdir =~ s/\//\\\\/g;
-	}
-
-	$systemcall = $msidb . " -d " . $localfullpcpfilepath . " -f " . $localworkdir . " -i " . $tables;
-							
-	$returnvalue = system($systemcall);
-
-	$infoline = "Systemcall: $systemcall\n";
-	$installer::logger::Lang->print($infoline);
-
-	if ($returnvalue)
-	{
-		$infoline = "ERROR: Could not execute $systemcall !\n";
-		$installer::logger::Lang->print($infoline);
-		installer::exiter::exit_program("ERROR: Could not include tables into pcp file: $fullpcpfilepath !", "include_tables_into_pcpfile");
-	}
-	else
-	{
-		$infoline = "Success: Executed $systemcall successfully!\n";
-		$installer::logger::Lang->print($infoline);
-	}
-}
-
-#################################################################################
-# Calling msimsp.exe
-#################################################################################
-
-sub execute_msimsp
-{
-	my ($fullpcpfilename, $mspfilename, $localmspdir) = @_;
-
-	my $msimsp = "msimsp.exe";	# Has to be in the path
-	my $infoline = "";
-	my $systemcall = "";
-	my $returnvalue = "";
-	my $logfilename = $localmspdir . $installer::globals::separator . "msimsp.log";
-
-	# Using a specific temp for each msimsp.exe process
-	# Creating temp directory again (should already have happened)
-	installer::systemactions::create_directory_structure($installer::globals::temppath);
-
-	# Creating old installation directory
-	my $dirname = "msimsptemp";
-	my $msimsptemppath = $installer::globals::temppath . $installer::globals::separator . $dirname;
-	if ( ! -d $msimsptemppath) { installer::systemactions::create_directory($msimsptemppath); }
-
-	# r:\msvc9p\PlatformSDK\v6.1\bin\msimsp.exe -s c:\patch\hotfix_qfe1.pcp -p c:\patch\patch_ooo3_m2_m3.msp -l c:\patch\patch_ooo3_m2_m3.log
-
-	if ( -f $logfilename ) { unlink $logfilename; }
-
-	my $localfullpcpfilename = $fullpcpfilename;
-	my $localmspfilename = $mspfilename;
-	my $locallogfilename = $logfilename;
-	my $localmsimsptemppath = $msimsptemppath;
-
-	if ( $^O =~ /cygwin/i ) {
-		# msimsp.exe really wants backslashes. (And double escaping because system() expands the string.)
-		$localfullpcpfilename =~ s/\//\\\\/g;
-		$locallogfilename =~ s/\//\\\\/g;
-
-		$localmspfilename =~ s/\\/\\\\/g; # path already contains backslash
-		# $localmspfilename =~ s/\//\\\\/g;
-
-		$localmsimsptemppath = qx{cygpath -w "$localmsimsptemppath"};
-		$localmsimsptemppath =~ s/\\/\\\\/g;
-		$localmsimsptemppath =~ s/\s*$//g;
-	}
-
-	$systemcall = $msimsp . " -s " . $localfullpcpfilename . " -p " . $localmspfilename . " -l " . $locallogfilename . " -f " . $localmsimsptemppath;
-    $installer::logger::Info->printf("... %s ...\n", $systemcall);
-							
-	$returnvalue = system($systemcall);
-
-	$infoline = "Systemcall: $systemcall\n";
-	$installer::logger::Lang->print($infoline);
-
-	if ($returnvalue)
-	{
-		$infoline = "ERROR: Could not execute $systemcall !\n";
-		$installer::logger::Lang->print($infoline);
-		installer::exiter::exit_program("ERROR: Could not execute $systemcall !", "execute_msimsp");
-	}
-	else
-	{
-		$infoline = "Success: Executed $systemcall successfully!\n";
-		$installer::logger::Lang->print($infoline);
-	}
-	
-	return $logfilename;
-}
-
-####################################################################
-# Checking existence and saving all tables, that need to be edited
-####################################################################
-
-sub check_and_save_tables
-{
-	my ($tablelist, $workdir) = @_;
-	
-	my $tables = installer::converter::convert_stringlist_into_array(\$tablelist, " ");
-	
-	for ( my $i = 0; $i <= $#{$tables}; $i++ )
-	{
-		my $filename = ${$tables}[$i];
-		$filename =~ s/\s*$//;
-		my $fullfilename = $workdir . $installer::globals::separator . $filename . ".idt";
-		
-		if ( ! -f $fullfilename ) { installer::exiter::exit_program("ERROR: Required idt file could not be found: \"$fullfilename\"!", "check_and_save_tables"); }
-
-		my $savfilename = $fullfilename . ".sav";
-		installer::systemactions::copy_one_file($fullfilename, $savfilename);		
-	}
-}
-
-####################################################################
-# Setting the languages for the service packs
-####################################################################
-
-sub create_langstring
-{
-	my ( $languagesarrayref ) = @_;
-	
-	my $langstring = "";
-	for ( my $i = 0; $i <= $#{$languagesarrayref}; $i++ ) { $langstring = $langstring . "_" . ${$languagesarrayref}[$i]; }
-
-	return $langstring;
-}
-
-####################################################################
-# Setting the name of the msp database
-####################################################################
-
-sub set_mspfilename
-{
-	my ($allvariables, $mspdir, $languagesarrayref) = @_;
-
-	my $databasename = $allvariables->{'PRODUCTNAME'};
-	$databasename = lc($databasename);
-	$databasename =~ s/\.//g;
-	$databasename =~ s/\-//g;
-	$databasename =~ s/\s//g;
-
-	if ( $allvariables->{'MSPPRODUCTVERSION'} ) { $databasename = $databasename . $allvariables->{'MSPPRODUCTVERSION'}; }
-
-	# possibility to overwrite the name with variable DATABASENAME
-	# if ( $allvariables->{'DATABASENAME'} ) { $databasename = $allvariables->{'DATABASENAME'}; }
-
-	# Adding patch info to database name
-	# if ( $installer::globals::buildid ) { $databasename = $databasename . "_" . $installer::globals::buildid; }
-
-	# if ( $allvariables->{'VENDORPATCHVERSION'} ) { $databasename = $databasename . "_" . $allvariables->{'VENDORPATCHVERSION'}; }
-
-
-	if (( $allvariables->{'SERVICEPACK'} ) && ( $allvariables->{'SERVICEPACK'} == 1 ))
-	{
-		my $windowspatchlevel = 0;
-		if ( $allvariables->{'MSPPATCHLEVEL'} ) { $windowspatchlevel = $allvariables->{'MSPPATCHLEVEL'}; }
-		$databasename = $databasename . "_servicepack_" . $windowspatchlevel;
-		my $languagestring = create_langstring($languagesarrayref);
-		$databasename = $databasename . $languagestring;
-	}
-	else
-	{
-		my $hotfixaddon = "hotfix_";
-		$hotfixaddon = $hotfixaddon . $installer::globals::buildid;
-		my $cwsname = "";
-		if ( $ENV{'CWS_WORK_STAMP'} ) { $hotfixaddon = $ENV{'CWS_WORK_STAMP'}; }
-		if ( $allvariables->{'OVERWRITE_CWSNAME'} ) { $hotfixaddon = $allvariables->{'OVERWRITE_CWSNAME'}; }
-		$databasename = $databasename . "_" . $hotfixaddon;
-	}
-
-	$databasename = $databasename . ".msp";
-	
-	my $fullmspname = $mspdir . $installer::globals::separator . $databasename;
-
-	if ( $^O =~ /cygwin/i ) { $fullmspname =~ s/\//\\/g; }
-	
-	return $fullmspname;
-}
-
-####################################################################
-# Editing table Properties
-####################################################################
-
-sub change_properties_table
-{
-	my ($localmspdir, $mspfilename) = @_;
-
-	my $infoline = "Changing content of table \"Properties\"\n";
-	$installer::logger::Lang->print($infoline);
-
-	my $filename = $localmspdir . $installer::globals::separator . "Properties.idt";
-	if ( ! -f $filename ) { installer::exiter::exit_program("ERROR: Could not find file \"$filename\" !", "change_properties_table"); }
-
-	my $filecontent = installer::files::read_file($filename);
-
-
-	my $guidref = installer::windows::msiglobal::get_guid_list(1, 1);
-	${$guidref}[0] =~ s/\s*$//;		# removing ending spaces
-	my $patchcode = "\{" . ${$guidref}[0] . "\}";
-
-	# Setting "PatchOutputPath"
-	my $found_patchoutputpath = 0;
-	my $found_patchguid = 0;
-
-	for ( my $i = 0; $i <= $#{$filecontent}; $i++ )
-	{
-		if ( ${$filecontent}[$i] =~ /^\s*PatchOutputPath\t(.*?)\s*$/ )
-		{
-			my $oldvalue = $1;
-			${$filecontent}[$i] =~ s/\Q$oldvalue\E/$mspfilename/;
-			$found_patchoutputpath = 1;
-		}
-
-		if ( ${$filecontent}[$i] =~ /^\s*PatchGUID\t(.*?)\s*$/ )
-		{
-			my $oldvalue = $1;
-			${$filecontent}[$i] =~ s/\Q$oldvalue\E/$patchcode/;
-			$found_patchguid = 1;
-		}
-	}
-	
-	if ( ! $found_patchoutputpath )
-	{
-		my $newline = "PatchOutputPath\t$mspfilename\n";
-		push(@{$filecontent}, $newline);
-	}
-
-	if ( ! $found_patchguid )
-	{
-		my $newline = "PatchGUID\t$patchcode\n";
-		push(@{$filecontent}, $newline);
-	}
-	
-	# saving file
-	installer::files::save_file($filename, $filecontent);
-}
-
-####################################################################
-# Editing table TargetImages
-####################################################################
-
-sub change_targetimages_table
-{
-	my ($localmspdir, $olddatabase) = @_;
-
-	my $infoline = "Changing content of table \"TargetImages\"\n";
-	$installer::logger::Lang->print($infoline);
-
-	my $filename = $localmspdir . $installer::globals::separator . "TargetImages.idt";
-	if ( ! -f $filename ) { installer::exiter::exit_program("ERROR: Could not find file \"$filename\" !", "change_targetimages_table"); }
-
-	my $filecontent = installer::files::read_file($filename);
-	my @newcontent = ();
-	
-	# Copying the header
-	for ( my $i = 0; $i <= $#{$filecontent}; $i++ ) { if ( $i < 3 ) { push(@newcontent, ${$filecontent}[$i]); } }
-	
-	#Adding all targets
-	my $newline = "T1\t$olddatabase\t\tU1\t1\t0x00000922\t1\n";
-	push(@newcontent, $newline);
-	
-	# saving file
-	installer::files::save_file($filename, \@newcontent);
-}
-
-####################################################################
-# Editing table UpgradedImages
-####################################################################
-
-sub change_upgradedimages_table
-{
-	my ($localmspdir, $newdatabase) = @_;
-
-	my $infoline = "Changing content of table \"UpgradedImages\"\n";
-	$installer::logger::Lang->print($infoline);
-
-	my $filename = $localmspdir . $installer::globals::separator . "UpgradedImages.idt";
-	if ( ! -f $filename ) { installer::exiter::exit_program("ERROR: Could not find file \"$filename\" !", "change_upgradedimages_table"); }
-
-	my $filecontent = installer::files::read_file($filename);
-	my @newcontent = ();
-	
-	# Copying the header
-	for ( my $i = 0; $i <= $#{$filecontent}; $i++ ) { if ( $i < 3 ) { push(@newcontent, ${$filecontent}[$i]); } }
-
-	# Syntax: Upgraded MsiPath PatchMsiPath SymbolPaths Family
-
-	# default values
-	my $upgraded = "U1";
-	my $msipath = $newdatabase;
-	my $patchmsipath = "";
-	my $symbolpaths = "";
-	my $family = "22334455";
-
-	if ( $#{$filecontent} >= 3 )
-	{
-		my $line = ${$filecontent}[3];
-		if ( $line =~ /^\s*(.*?)\t(.*?)\t(.*?)\t(.*?)\t(.*?)\s*$/ )
-		{
-			$upgraded = $1;
-			$patchmsipath = $3;
-			$symbolpaths = $4;
-			$family = $5;
-		}
-	}
-
-	#Adding sequence line, saving PatchFamily
-	my $newline = "$upgraded\t$msipath\t$patchmsipath\t$symbolpaths\t$family\n";
-	push(@newcontent, $newline);
-
-	# saving file
-	installer::files::save_file($filename, \@newcontent);
-}
-
-####################################################################
-# Editing table ImageFamilies
-####################################################################
-
-sub change_imagefamilies_table
-{
-	my ($localmspdir) = @_;
-
-	my $infoline = "Changing content of table \"ImageFamilies\"\n";
-	$installer::logger::Lang->print($infoline);
-
-	my $filename = $localmspdir . $installer::globals::separator . "ImageFamilies.idt";
-	if ( ! -f $filename ) { installer::exiter::exit_program("ERROR: Could not find file \"$filename\" !", "change_imagefamilies_table"); }
-
-	my $filecontent = installer::files::read_file($filename);
-	my @newcontent = ();
-
-	# Copying the header
-	for ( my $i = 0; $i <= $#{$filecontent}; $i++ ) { if ( $i < 3 ) { push(@newcontent, ${$filecontent}[$i]); } }
-
-	# Syntax: Family MediaSrcPropName MediaDiskId FileSequenceStart DiskPrompt VolumeLabel
-	# "FileSequenceStart has to be set
-
-	# Default values:
-	
-	my $family = "22334455";
-	my $mediasrcpropname = "MediaSrcPropName";
-	my $mediadiskid = "2";
-	my $filesequencestart = get_filesequencestart();
-	my $diskprompt = "";
-	my $volumelabel = "";
-	
-	if ( $#{$filecontent} >= 3 )
-	{
-		my $line = ${$filecontent}[3];
-		if ( $line =~ /^\s*(.*?)\t(.*?)\t(.*?)\t(.*?)\t(.*?)\t(.*?)\s*$/ )
-		{
-			$family = $1;
-			$mediasrcpropname = $2;
-			$mediadiskid = $3;
-			$diskprompt = $5;
-			$volumelabel = $6;
-		}
-	}
-
-	#Adding sequence line
-	my $newline = "$family\t$mediasrcpropname\t$mediadiskid\t$filesequencestart\t$diskprompt\t$volumelabel\n";
-	push(@newcontent, $newline);
-
-	# saving file
-	installer::files::save_file($filename, \@newcontent);	
-}
-
-####################################################################
-# Setting start sequence for patch
-####################################################################
-
-sub get_filesequencestart
-{
-	my $sequence = 1000;  # default
-	
-	if ( $installer::globals::updatelastsequence ) { $sequence = $installer::globals::updatelastsequence + 500; }
-	
-	return $sequence;
-}
-
-####################################################################
-# Setting time value into pcp file
-# Format mm/dd/yyyy hh:mm
-####################################################################
-
-sub get_patchtime_value
-{
-	# Syntax: 8/8/2008 11:55
-	my $minute = (localtime())[1];
-	my $hour = (localtime())[2];
-	my $day = (localtime())[3];
-	my $month = (localtime())[4];
-	my $year = 1900 + (localtime())[5];
-
-	$month++; # zero based month
-	if ( $minute  < 10 ) { $minute = "0" . $minute; }
-	if ( $hour  < 10 ) { $hour = "0" . $hour; }
-	
-	my $timestring = $month . "/" . $day . "/" . $year . " " . $hour . ":" . $minute;
-
-	return $timestring;	
-}
-
-#################################################################################
-# Checking, if this is the correct database.
-#################################################################################
-
-sub correct_langs
-{
-	my ($langs, $languagestringref) = @_;
-	
-	my $correct_langs = 0;
-	
-	# Comparing $langs with $languagestringref
-
-	my $langlisthash = installer::converter::convert_stringlist_into_hash(\$langs, ",");
-	my $langstringhash = installer::converter::convert_stringlist_into_hash($languagestringref, "_");
-		
-	my $not_included = 0;
-	foreach my $onelang ( keys %{$langlisthash} )
-	{
-		if ( ! exists($langstringhash->{$onelang}) )
-		{
-			$not_included = 1;
-			last;
-		}	
-	}
-
-	if ( ! $not_included )
-	{
-		foreach my $onelanguage ( keys %{$langstringhash} )
-		{
-			if ( ! exists($langlisthash->{$onelanguage}) )
-			{
-				$not_included = 1;
-				last;
-			}	
-		}
-	
-		if ( ! $not_included ) { $correct_langs = 1; }			
-	}
-	
-	return $correct_langs;
-}
-
-#################################################################################
-# Searching for the path to the reference database for this special product.
-#################################################################################
-
-sub get_patchid_from_list
-{
-	my ($filecontent, $languagestringref, $filename) = @_;
-
-	my $patchid = "";
-	
-	for ( my $i = 0; $i <= $#{$filecontent}; $i++ )
-	{
-		my $line = ${$filecontent}[$i];
-		if ( $line =~ /^\s*$/ ) { next; } # empty line
-		if ( $line =~ /^\s*\#/ ) { next; } # comment line
-
-		if ( $line =~ /^\s*(.+?)\s*=\s*(.+?)\s*$/ )
-		{
-			my $langs = $1;
-			my $localpatchid = $2;
-
-			if ( correct_langs($langs, $languagestringref) )
-			{
-				$patchid = $localpatchid;
-				last;	
-			}
-		}
-		else
-		{
-			installer::exiter::exit_program("ERROR: Wrong syntax in file: $filename! Line: \"$line\"", "get_patchid_from_list");
-		}
-	}
-
-	return $patchid;
-}
-
-####################################################################
-# Editing table PatchMetadata
-####################################################################
-	
-sub change_patchmetadata_table
-{
-	my ($localmspdir, $allvariables, $languagestringref) = @_;
-	
-	my $infoline = "Changing content of table \"PatchMetadata\"\n";
-	$installer::logger::Lang->print($infoline);
-
-	my $filename = $localmspdir . $installer::globals::separator . "PatchMetadata.idt";
-	if ( ! -f $filename ) { installer::exiter::exit_program("ERROR: Could not find file \"$filename\" !", "change_patchmetadata_table"); }
-
-	my $filecontent = installer::files::read_file($filename);
-	my @newcontent = ();
-
-	# Syntax: Company Property Value
-	# Interesting properties: "Classification" and "CreationTimeUTC"
-	
-	my $classification_set = 0;
-	my $creationtime_set = 0;
-	my $targetproductname_set = 0;
-	my $manufacturer_set = 0;
-	my $displayname_set = 0;
-	my $description_set = 0;
-	my $allowremoval_set = 0;
-	
-	my $defaultcompany = "";
-
-	my $classificationstring = "Classification";
-	my $classificationvalue = "Hotfix";
-	if (( $allvariables->{'SERVICEPACK'} ) && ( $allvariables->{'SERVICEPACK'} == 1 )) { $classificationvalue = "ServicePack"; }
-
-	my $allowremovalstring = "AllowRemoval";
-	my $allowremovalvalue = "1";
-	if (( exists($allvariables->{'MSPALLOWREMOVAL'}) ) && ( $allvariables->{'MSPALLOWREMOVAL'} == 0 )) { $allowremovalvalue = 0; }
-
-	my $timestring = "CreationTimeUTC";
-	# Syntax: 8/8/2008 11:55
-	my $timevalue = get_patchtime_value();
-
-	my $targetproductnamestring = "TargetProductName";
-	my $targetproductnamevalue = $allvariables->{'PRODUCTNAME'};
-	if ( $allvariables->{'PROPERTYTABLEPRODUCTNAME'} ) { $targetproductnamevalue = $allvariables->{'PROPERTYTABLEPRODUCTNAME'}; }
-
-	my $manufacturerstring = "ManufacturerName";
-	my $manufacturervalue = "Apache OpenOffice";
-	if ( $installer::globals::longmanufacturer ) { $manufacturervalue = $installer::globals::longmanufacturer; }
-
-	my $displaynamestring = "DisplayName";
-	my $descriptionstring = "Description";
-	my $displaynamevalue = "";
-	my $descriptionvalue = "";
-
-	my $base = $allvariables->{'PRODUCTNAME'} . " " . $allvariables->{'PRODUCTVERSION'};
-	if ( $installer::globals::languagepack ) { $base = $targetproductnamevalue; }
-	
-	my $windowspatchlevel = 0;
-	if ( $allvariables->{'WINDOWSPATCHLEVEL'} ) { $windowspatchlevel = $allvariables->{'WINDOWSPATCHLEVEL'}; }
-
-	my $displayaddon = "";
-	if ( $allvariables->{'PATCHDISPLAYADDON'} ) { $displayaddon = $allvariables->{'PATCHDISPLAYADDON'}; }
-
-	my $cwsname = "";
-	if ( $ENV{'CWS_WORK_STAMP'} ) { $cwsname = $ENV{'CWS_WORK_STAMP'}; }
-	if (( $cwsname ne "" ) && ( $allvariables->{'OVERWRITE_CWSNAME'} )) { $cwsname = $allvariables->{'OVERWRITE_CWSNAME'}; }
-
-	my $patchsequence = get_patchsequence($allvariables);
-
-	if (( $allvariables->{'SERVICEPACK'} ) && ( $allvariables->{'SERVICEPACK'} == 1 ))
-	{
-		$displaynamevalue = $base . " ServicePack " . $windowspatchlevel . " " . $patchsequence . " Build: " . $installer::globals::buildid;
-		$descriptionvalue = $base . " ServicePack " . $windowspatchlevel . " " . $patchsequence . " Build: " . $installer::globals::buildid;
-	}
-	else
-	{
-		$displaynamevalue = $base . " Hotfix " . $cwsname . " " . $displayaddon . " " . $patchsequence . " Build: " . $installer::globals::buildid;
-		$descriptionvalue = $base . " Hotfix " . $cwsname . " " . $displayaddon . " " . $patchsequence . " Build: " . $installer::globals::buildid;	
-		$displaynamevalue =~ s/    / /g;	
-		$descriptionvalue =~ s/    / /g;	
-		$displaynamevalue =~ s/   / /g;	
-		$descriptionvalue =~ s/   / /g;	
-		$displaynamevalue =~ s/  / /g;	
-		$descriptionvalue =~ s/  / /g;	
-	}
-
-	if ( $allvariables->{'MSPPATCHNAMELIST'} )
-	{
-		my $patchnamelistfile = $allvariables->{'MSPPATCHNAMELIST'};
-		$patchnamelistfile = $installer::globals::idttemplatepath  . $installer::globals::separator . $patchnamelistfile;
-		if ( ! -f $patchnamelistfile ) { installer::exiter::exit_program("ERROR: Could not find file \"$patchnamelistfile\".", "change_patchmetadata_table"); }
-		my $filecontent = installer::files::read_file($patchnamelistfile);
-
-		# Get name and path of reference database	
-		my $patchid = get_patchid_from_list($filecontent, $languagestringref, $patchnamelistfile);
-		
-		if ( $patchid eq "" ) { installer::exiter::exit_program("ERROR: Could not find file patchid in file \"$patchnamelistfile\" for language(s) \"$$languagestringref\".", "change_patchmetadata_table"); }
-
-		# Setting language specific patch id
-	}	
-
-	for ( my $i = 0; $i <= $#{$filecontent}; $i++ )
-	{
-		if ( ${$filecontent}[$i] =~ /^\s*(.*?)\t(.*?)\t(.*?)\s*$/ )
-		{
-			my $company = $1;
-			my $property = $2;
-			my $value = $3;
-			
-			if ( $property eq $classificationstring )
-			{
-				${$filecontent}[$i] = "$company\t$property\t$classificationvalue\n";
-				$classification_set = 1;
-			}
-			
-			if ( $property eq $allowremovalstring )
-			{
-				${$filecontent}[$i] = "$company\t$property\t$allowremovalvalue\n";
-				$allowremoval_set = 1;
-			}
-
-			if ( $property eq $timestring )
-			{
-				${$filecontent}[$i] = "$company\t$property\t$timevalue\n";
-				$creationtime_set = 1;
-			}
-
-			if ( $property eq $targetproductnamestring )
-			{
-				${$filecontent}[$i] = "$company\t$property\t$targetproductnamevalue\n";
-				$targetproductname_set = 1;
-			}
-
-			if ( $property eq $manufacturerstring )
-			{
-				${$filecontent}[$i] = "$company\t$property\t$manufacturervalue\n";
-				$manufacturer_set = 1;
-			}
-
-			if ( $property eq $displaynamestring )
-			{
-				${$filecontent}[$i] = "$company\t$property\t$displaynamevalue\n";
-				$displayname_set = 1;
-			}
-
-			if ( $property eq $descriptionstring )
-			{
-				${$filecontent}[$i] = "$company\t$property\t$descriptionvalue\n";
-				$description_set = 1;
-			}
-		}
-
-		push(@newcontent, ${$filecontent}[$i]);
-	}
-
-	if ( ! $classification_set )
-	{
-		my $line = "$defaultcompany\t$classificationstring\t$classificationvalue\n";	
-		push(@newcontent, $line);
-	}
-
-	if ( ! $allowremoval_set )
-	{
-		my $line = "$defaultcompany\t$classificationstring\t$allowremovalvalue\n";	
-		push(@newcontent, $line);
-	}
-
-	if ( ! $allowremoval_set )
-	{
-		my $line = "$defaultcompany\t$classificationstring\t$allowremovalvalue\n";	
-		push(@newcontent, $line);
-	}
-
-	if ( ! $creationtime_set )
-	{
-		my $line = "$defaultcompany\t$timestring\t$timevalue\n";	
-		push(@newcontent, $line);
-	}
-
-	if ( ! $targetproductname_set )
-	{
-		my $line = "$defaultcompany\t$targetproductnamestring\t$targetproductnamevalue\n";	
-		push(@newcontent, $line);
-	}
-	
-	if ( ! $manufacturer_set )
-	{
-		my $line = "$defaultcompany\t$manufacturerstring\t$manufacturervalue\n";	
-		push(@newcontent, $line);
-	}
-
-	if ( ! $displayname_set )
-	{
-		my $line = "$defaultcompany\t$displaynamestring\t$displaynamevalue\n";	
-		push(@newcontent, $line);
-	}
-
-	if ( ! $description_set )
-	{
-		my $line = "$defaultcompany\t$descriptionstring\t$descriptionvalue\n";	
-		push(@newcontent, $line);
-	}
-
-	# saving file
-	installer::files::save_file($filename, \@newcontent);
-}
-
-####################################################################
-# Editing table PatchSequence
-####################################################################
-	
-sub change_patchsequence_table
-{
-	my ($localmspdir, $allvariables) = @_;
-	
-	my $infoline = "Changing content of table \"PatchSequence\"\n";
-	$installer::logger::Lang->print($infoline);
-
-	my $filename = $localmspdir . $installer::globals::separator . "PatchSequence.idt";
-	if ( ! -f $filename ) { installer::exiter::exit_program("ERROR: Could not find file \"$filename\" !", "change_patchsequence_table"); }
-
-	my $filecontent = installer::files::read_file($filename);
-	my @newcontent = ();
-
-	# Copying the header
-	for ( my $i = 0; $i <= $#{$filecontent}; $i++ ) { if ( $i < 3 ) { push(@newcontent, ${$filecontent}[$i]); } }
-	
-	# Syntax: PatchFamily Target Sequence Supersede
-
-	my $patchfamily = "SO";
-	my $target = "";
-	my $patchsequence = get_patchsequence($allvariables);
-	my $supersede = get_supersede($allvariables);
-	
-	if ( $#{$filecontent} >= 3 )
-	{
-		my $line = ${$filecontent}[3];
-		if ( $line =~ /^\s*(.*?)\t(.*?)\t(.*?)\t(.*?)\s$/ )
-		{
-			$patchfamily = $1;
-			$target = $2;
-		}
-	}
-
-	#Adding sequence line, saving PatchFamily
-	my $newline = "$patchfamily\t$target\t$patchsequence\t$supersede\n";
-	push(@newcontent, $newline);
-
-	# saving file
-	installer::files::save_file($filename, \@newcontent);
-}	
-
-####################################################################
-# Setting supersede, "0" for Hotfixes, "1" for ServicePack
-####################################################################
-
-sub get_supersede
-{
-	my ( $allvariables ) = @_;
-	
-	my $supersede = 0;	# if not defined, this is a Hotfix
-	
-	if (( $allvariables->{'SERVICEPACK'} ) && ( $allvariables->{'SERVICEPACK'} == 1 )) { $supersede = 1; }
-	
-	return $supersede;
-}
-
-####################################################################
-# Setting the sequence of the patch
-####################################################################
-
-sub get_patchsequence
-{
-	my ( $allvariables ) = @_;
-	
-	my $patchsequence = "1.0";
-
-	if ( ! $allvariables->{'PACKAGEVERSION'} ) { installer::exiter::exit_program("ERROR: PACKAGEVERSION must be set for msp patch creation!", "get_patchsequence"); } 
-
-	my $packageversion = $allvariables->{'PACKAGEVERSION'};
-
-	if ( $packageversion =~ /^\s*(\d+)\.(\d+)\.(\d+)\s*$/ )
-	{
-		my $major = $1;
-		my $minor = $2;
-		my $micro = $3;
-		my $concat = 100 * $minor + $micro;
-		$packageversion = $major . "\." . $concat;
-	}
-	my $vendornumber = 0;
-	if ( $allvariables->{'VENDORPATCHVERSION'} ) { $vendornumber = $allvariables->{'VENDORPATCHVERSION'}; }
-	$patchsequence = $packageversion . "\." . $installer::globals::buildid . "\." . $vendornumber;
-
-	if ( $allvariables->{'PATCHSEQUENCE'} ) { $patchsequence = $allvariables->{'PATCHSEQUENCE'}; }
-	
-	return $patchsequence;
-}
-
-####################################################################
-# Editing all tables from pcp file, that need to be edited
-####################################################################
-
-sub edit_tables
-{
-	my ($tablelist, $localmspdir, $olddatabase, $newdatabase, $mspfilename, $allvariables, $languagestringref) = @_;
-
-	# table list contains: 	my $tablelist = "Properties TargetImages UpgradedImages ImageFamilies PatchMetadata PatchSequence";
-
-	change_properties_table($localmspdir, $mspfilename);
-	change_targetimages_table($localmspdir, $olddatabase);
-	change_upgradedimages_table($localmspdir, $newdatabase);	
-	change_imagefamilies_table($localmspdir);	
-	change_patchmetadata_table($localmspdir, $allvariables, $languagestringref);	
-	change_patchsequence_table($localmspdir, $allvariables);	
-}
-
-#################################################################################
-# Checking, if this is the correct database.
-#################################################################################
-
-sub correct_patch
-{
-	my ($product, $pro, $langs, $languagestringref) = @_;
-	
-	my $correct_patch = 0;
-	
-	# Comparing $product with $installer::globals::product and
-	# $pro with $installer::globals::pro and
-	# $langs with $languagestringref
-
-	my $product_is_good = 0;
-	
-	my $localproduct = $installer::globals::product;
-	if ( $installer::globals::languagepack ) { $localproduct = $localproduct . "LanguagePack"; }
-
-	if ( $product eq $localproduct ) { $product_is_good = 1; }
-	
-	if ( $product_is_good )
-	{
-		my $pro_is_good = 0;
-
-		if ((( $pro eq "pro" ) && ( $installer::globals::pro )) || (( $pro eq "nonpro" ) && ( ! $installer::globals::pro ))) { $pro_is_good = 1; }
-
-		if ( $pro_is_good )
-		{
-			my $langlisthash = installer::converter::convert_stringlist_into_hash(\$langs, ",");
-			my $langstringhash = installer::converter::convert_stringlist_into_hash($languagestringref, "_");
-		
-			my $not_included = 0;
-			foreach my $onelang ( keys %{$langlisthash} )
-			{
-				if ( ! exists($langstringhash->{$onelang}) )
-				{
-					$not_included = 1;
-					last;
-				}	
-			}
-		
-			if ( ! $not_included )
-			{
-				foreach my $onelanguage ( keys %{$langstringhash} )
-				{
-					if ( ! exists($langlisthash->{$onelanguage}) )
-					{
-						$not_included = 1;
-						last;
-					}	
-				}
-			
-				if ( ! $not_included ) { $correct_patch = 1; }			
-			}
-		}
-	}
-	
-	return $correct_patch;
-}
-
-#################################################################################
-# Searching for the path to the required patch for this special product.
-#################################################################################
-
-sub get_requiredpatchfile_from_list
-{
-	my ($filecontent, $languagestringref, $filename) = @_;
-
-	my $patchpath = "";
-	
-	for ( my $i = 0; $i <= $#{$filecontent}; $i++ )
-	{
-		my $line = ${$filecontent}[$i];
-		if ( $line =~ /^\s*$/ ) { next; } # empty line
-		if ( $line =~ /^\s*\#/ ) { next; } # comment line
-
-		if ( $line =~ /^\s*(.+?)\s*\t+\s*(.+?)\s*\t+\s*(.+?)\s*\t+\s*(.+?)\s*$/ )
-		{
-			my $product = $1;
-			my $pro = $2;
-			my $langs = $3;
-			my $path = $4;
-			
-			if (( $pro ne "pro" ) && ( $pro ne "nonpro" )) { installer::exiter::exit_program("ERROR: Wrong syntax in file: $filename. Only \"pro\" or \"nonpro\" allowed in column 1! Line: \"$line\"", "get_databasename_from_list"); }
-
-			if ( correct_patch($product, $pro, $langs, $languagestringref) )
-			{
-				$patchpath = $path;
-				last;	
-			}
-		}
-		else
-		{
-			installer::exiter::exit_program("ERROR: Wrong syntax in file: $filename! Line: \"$line\"", "get_requiredpatchfile_from_list");
-		}
-	}
-
-	return $patchpath;
-}
-
-##################################################################
-# Converting unicode file to ascii 
-# to be more precise: uft-16 little endian to ascii
-##################################################################
-
-sub convert_unicode_to_ascii
-{
-	my ( $filename ) = @_;
-
-	my @localfile = ();
-
-	my $savfilename = $filename . "_before.unicode";
-	installer::systemactions::copy_one_file($filename, $savfilename);
-
-#	open( IN, "<:utf16", $filename ) || installer::exiter::exit_program("ERROR: Cannot open file $filename for reading", "convert_unicode_to_ascii");
-#	open( IN, "<:para:crlf:uni", $filename ) || installer::exiter::exit_program("ERROR: Cannot open file $filename for reading", "convert_unicode_to_ascii");
-	open( IN, "<:encoding(UTF16-LE)", $filename ) || installer::exiter::exit_program("ERROR: Cannot open file $filename for reading", "convert_unicode_to_ascii");
-#	open( IN, "<:encoding(UTF-8)", $filename ) || installer::exiter::exit_program("ERROR: Cannot open file $filename for reading", "convert_unicode_to_ascii");
-	while ( $line = <IN> ) {
-		push @localfile, $line;
-	}
-	close( IN );
-
-	if ( open( OUT, ">", $filename ) )
-	{
-		print OUT @localfile;
-		close(OUT);	
-	}
-}
-
-####################################################################
-# Analyzing the log file created by msimsp.exe to find all
-# files included into the patch.
-####################################################################
-
-sub analyze_msimsp_logfile
-{
-	my ($logfile, $filesarray) = @_;
-
-	# Reading log file after converting from utf-16 (LE) to ascii
-	convert_unicode_to_ascii($logfile);
-	my $logfilecontent = installer::files::read_file($logfile);
-	
-	# Creating hash from $filesarray: unique file name -> destination of file
-	my %filehash = ();
-	my %destinationcollector = ();
-
-	for ( my $i = 0; $i <= $#{$filesarray}; $i++ )
-	{
-		my $onefile = ${$filesarray}[$i];
-
-		# Only collecting files with "uniquename" and "destination"
-		if (( exists($onefile->{'uniquename'}) ) && ( exists($onefile->{'uniquename'}) ))
-		{
-			my $uniquefilename = $onefile->{'uniquename'};
-			my $destpath = $onefile->{'destination'};
-			$filehash{$uniquefilename} = $destpath;
-		}
-	}
-
-	# Analyzing log file of msimsp.exe, finding all changed files
-	# and searching all destinations of unique file names.
-	# Content in log file: "INFO File Key: <file key> is modified"
-	# Collecting content in @installer::globals::patchfilecollector
-	
-	for ( my $i = 0; $i <= $#{$logfilecontent}; $i++ )
-	{
-		if ( ${$logfilecontent}[$i] =~ /Key\:\s*(.*?) is modified\s*$/ )
-		{
-			my $filekey = $1;
-			if ( exists($filehash{$filekey}) ) { $destinationcollector{$filehash{$filekey}} = 1; }
-			else { installer::exiter::exit_program("ERROR: Could not find file key \"$filekey\" in file collector.", "analyze_msimsp_logfile"); }
-		}
-	}
-
-	foreach my $onedest ( sort keys %destinationcollector ) { push(@installer::globals::patchfilecollector, "$onedest\n"); }	
-
-}
-
-####################################################################
-# Creating msp patch files for Windows
-####################################################################
-
-sub create_msp_patch
-{
-	my ($installationdir, $includepatharrayref, $allvariables, $languagestringref, $languagesarrayref, $filesarray) = @_;
-
-	# print this message even in 'quiet' mode
-    $installer::logger::Info->print("\n");
-    $installer::logger::Info->print("******************************************\n");
-    $installer::logger::Info->print("... creating msp installation set ...\n", 1);
-    $installer::logger::Info->print("******************************************\n");
-
-	$installer::globals::creating_windows_installer_patch = 1;
-
-	my @needed_files = ("msimsp.exe");	# only required for patch creation process
-	installer::control::check_needed_files_in_path(\@needed_files);
-
-	installer::logger::include_header_into_logfile("Creating msp installation sets:");
-
-	my $firstdir = $installationdir;
-	installer::pathanalyzer::get_path_from_fullqualifiedname(\$firstdir);
-	
-	my $lastdir = $installationdir;
-	installer::pathanalyzer::make_absolute_filename_to_relative_filename(\$lastdir);
-
-	if ( $lastdir =~ /\./ ) { $lastdir =~ s/\./_msp_inprogress\./ }
-	else { $lastdir = $lastdir . "_msp_inprogress"; }
-
-	# Removing existing directory "_native_packed_inprogress" and "_native_packed_witherror" and "_native_packed"
-
-	my $mspdir = $firstdir . $lastdir;
-	if ( -d $mspdir ) { installer::systemactions::remove_complete_directory($mspdir); }
-	
-	my $olddir = $mspdir;
-	$olddir =~ s/_inprogress/_witherror/;
-	if ( -d $olddir ) { installer::systemactions::remove_complete_directory($olddir); }
-
-	$olddir = $mspdir;
-	$olddir =~ s/_inprogress//;
-	if ( -d $olddir ) { installer::systemactions::remove_complete_directory($olddir); }
-
-	# Creating the new directory for new installation set
-	installer::systemactions::create_directory($mspdir);
-
-	$installer::globals::saveinstalldir = $mspdir;
-
-	$installer::logger::Lang->print("\n");
-	$installer::logger::Lang->add_timestamp("Performance Info: Starting product installation");
-
-	# Installing both installation sets
-    $installer::logger::Info->printf("... installing products ...\n");
-	my ($olddatabase, $newdatabase) = install_installation_sets($installationdir);
-
-	$installer::logger::Lang->print("\n");
-	$installer::logger::Lang->add_timestamp("Performance Info: Starting synchronization of installation sets");
-	
-	# Synchronizing installed products, allowing only different files with PATCH flag
-    $installer::logger::Info->printf("... synchronizing installation sets ...\n");
-	synchronize_installation_sets($olddatabase, $newdatabase, $filesarray);
-
-	$installer::logger::Lang->print("\n");
-	$installer::logger::Lang->add_timestamp("Performance Info: Starting pcp file creation");
-
-	# Create pcp file
-    $installer::logger::Info->printf("... creating pcp file ...\n");
-
-	my $localmspdir = installer::systemactions::create_directories("msp", $languagestringref);
-	
-	if ( ! $allvariables->{'PCPFILENAME'} ) { installer::exiter::exit_program("ERROR: Property \"PCPFILENAME\" has to be defined.", "create_msp_patch"); }
-	my $pcpfilename = $allvariables->{'PCPFILENAME'};
-
-	if ( $installer::globals::languagepack ) { $pcpfilename =~ s/.pcp\s*$/languagepack.pcp/; }
-
-	# Searching the pcp file in the include pathes
-	my $fullpcpfilenameref = installer::scriptitems::get_sourcepath_from_filename_and_includepath(\$pcpfilename, $includepatharrayref, 1);
-	if ( $$fullpcpfilenameref eq "" ) { installer::exiter::exit_program("ERROR: pcp file not found: $pcpfilename !", "create_msp_patch"); }
-	my $fullpcpfilenamesource = $$fullpcpfilenameref;
-
-	# Copying pcp file
-	my $fullpcpfilename = $localmspdir . $installer::globals::separator . $pcpfilename;
-	installer::systemactions::copy_one_file($fullpcpfilenamesource, $fullpcpfilename);
-
-	#  a. Extracting tables from msi database: msidb.exe -d <msifile> -f <directory> -e File Media, ...
-	#  b. Changing content of msi database in tables: File, Media, Directory, FeatureComponent
-	#  c. Including tables into msi database: msidb.exe -d <msifile> -f <directory> -i File Media, ...
-
-	# Unpacking tables from pcp file
-	extract_all_tables_from_pcpfile($fullpcpfilename, $localmspdir);
-
-	# Tables, that need to be edited
-	my $tablelist = "Properties TargetImages UpgradedImages ImageFamilies PatchMetadata PatchSequence"; # required tables
-
-	# Saving all tables	
-	check_and_save_tables($tablelist, $localmspdir);
-
-	# Setting the name of the new msp file
-	my $mspfilename = set_mspfilename($allvariables, $mspdir, $languagesarrayref);
-
-	# Editing tables
-	edit_tables($tablelist, $localmspdir, $olddatabase, $newdatabase, $mspfilename, $allvariables, $languagestringref);
-	
-	# Adding edited tables into pcp file
-	include_tables_into_pcpfile($fullpcpfilename, $localmspdir, $tablelist);
-
-	# Start msimsp.exe
-	$installer::logger::Lang->print("\n");
-	$installer::logger::Lang->add_timestamp("Performance Info: Starting msimsp.exe");
-	my $msimsplogfile = execute_msimsp($fullpcpfilename, $mspfilename, $localmspdir);
-
-	# Copy final installation set next to msp file
-	$installer::logger::Lang->print("\n");
-	$installer::logger::Lang->add_timestamp("Performance Info: Copying installation set");
-    $installer::logger::Info->printf("... copying installation set ...\n");
-
-	my $oldinstallationsetpath = $installer::globals::updatedatabasepath;
-
-	if ( $^O =~ /cygwin/i ) { $oldinstallationsetpath =~ s/\\/\//g; }
-
-	installer::pathanalyzer::get_path_from_fullqualifiedname(\$oldinstallationsetpath);
-	installer::systemactions::copy_complete_directory($oldinstallationsetpath, $mspdir);
-	
-	# Copying additional patches into the installation set, if required
-	if (( $allvariables->{'ADDITIONALREQUIREDPATCHES'} ) && ( $allvariables->{'ADDITIONALREQUIREDPATCHES'} ne "" ) && ( ! $installer::globals::languagepack ))
-	{
-		my $filename = $allvariables->{'ADDITIONALREQUIREDPATCHES'};
-
-		my $fullfilenameref = installer::scriptitems::get_sourcepath_from_filename_and_includepath(\$filename, $includepatharrayref, 1);
-		if ( $$fullfilenameref eq "" ) { installer::exiter::exit_program("ERROR: Could not find file with required patches, although it is defined: $filename !", "create_msp_patch"); }
-		my $fullfilename = $$fullfilenameref;
-
-		# Reading list file
-		my $listfile = installer::files::read_file($fullfilename);
-
-		# Get name and path of reference database	
-		my $requiredpatchfile = get_requiredpatchfile_from_list($listfile, $languagestringref, $fullfilename);
-		if ( $requiredpatchfile eq "" ) { installer::exiter::exit_program("ERROR: Could not find path to required patch in file $fullfilename for language(s) $$languagestringref!", "create_msp_patch"); }
-		
-		# Copying patch file
-		installer::systemactions::copy_one_file($requiredpatchfile, $mspdir);		
-		# my $infoline = "Copy $requiredpatchfile to $mspdir\n";
-		# $installer::logger::Lang->print($infoline);
-	}
-	
-	# Find all files included into the patch
-	# Analyzing the msimsp log file $msimsplogfile 
-	analyze_msimsp_logfile($msimsplogfile, $filesarray);
-
-	# Done
-    $installer::logger::Lang->print("\n");
-	$installer::logger::Lang->add_timestamp("Performance Info: msp creation done");
-	
-	return $mspdir;
-}
-
-1;
diff --git a/main/solenv/bin/modules/installer/windows/update.pm b/main/solenv/bin/modules/installer/windows/update.pm
deleted file mode 100644
index 7f098fc..0000000
--- a/main/solenv/bin/modules/installer/windows/update.pm
+++ /dev/null
@@ -1,595 +0,0 @@
-#**************************************************************
-#  
-#  Licensed to the Apache Software Foundation (ASF) under one
-#  or more contributor license agreements.  See the NOTICE file
-#  distributed with this work for additional information
-#  regarding copyright ownership.  The ASF licenses this file
-#  to you under the Apache License, Version 2.0 (the
-#  "License"); you may not use this file except in compliance
-#  with the License.  You may obtain a copy of the License at
-#  
-#    http://www.apache.org/licenses/LICENSE-2.0
-#  
-#  Unless required by applicable law or agreed to in writing,
-#  software distributed under the License is distributed on an
-#  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-#  KIND, either express or implied.  See the License for the
-#  specific language governing permissions and limitations
-#  under the License.
-#  
-#**************************************************************
-
-
-
-package installer::windows::update;
-
-use installer::converter;
-use installer::exiter;
-use installer::files;
-use installer::globals;
-use installer::pathanalyzer;
-use installer::systemactions;
-
-#################################################################################
-# Extracting all tables from an msi database
-#################################################################################
-
-sub extract_all_tables_from_msidatabase
-{
-	my ($fulldatabasepath, $workdir) = @_;
-
-	my $msidb = "msidb.exe";	# Has to be in the path
-	my $infoline = "";
-	my $systemcall = "";
-	my $returnvalue = "";
-	my $extraslash = "";		# Has to be set for non-ActiveState perl
-
-	# Export of all tables by using "*"
-
-	if ( $^O =~ /cygwin/i ) {
-		# msidb.exe really wants backslashes. (And double escaping because system() expands the string.)
-		$fulldatabasepath =~ s/\//\\\\/g;
-		$workdir =~ s/\//\\\\/g;
-		$extraslash = "\\";
-	}
-							
-	$systemcall = $msidb . " -d " . $fulldatabasepath . " -f " . $workdir . " -e " . $extraslash . "*";
-	$returnvalue = system($systemcall);
-
-    $installer::logger::Lang->printf("Systemcall: %s\n", $systemcall);
-
-	if ($returnvalue)
-	{
-        $installer::logger::Lang->printf("ERROR: Could not execute %s !\n", $systemcall);
-		installer::exiter::exit_program("ERROR: Could not exclude tables from msi database: $fulldatabasepath !", "extract_all_tables_from_msidatabase");
-	}
-	else
-	{
-        $installer::logger::Lang->printf("Success: Executed %s successfully!\n", $systemcall);
-	}
-}
-
-#################################################################################
-# Collecting the keys from the first line of the idt file
-#################################################################################
-
-sub collect_all_keys
-{
-	my ($line) = @_;
-
-	my @allkeys = ();
-	my $rownumber = 0;
-	my $onekey = "";
-	
-	while ( $line =~ /^\s*(\S+?)\t(.*)$/ )
-	{
-		$onekey = $1;
-		$line = $2;
-		$rownumber++;
-		push(@allkeys, $onekey);
-	}
-	
-	# and the last key
-	
-	$onekey = $line;
-	$onekey =~ s/^\s*//g;
-	$onekey =~ s/\s*$//g;
-	
-	$rownumber++;
-	push(@allkeys, $onekey);
-
-	return (\@allkeys, $rownumber);
-}
-
-#################################################################################
-# Analyzing the content of one line of an idt file
-#################################################################################
-
-sub get_oneline_hash
-{
-	my ($line, $allkeys, $rownumber) = @_;
-
-	my $counter = 0;	
-	my %linehash = ();
-
-	$line =~ s/^\s*//;
-	$line =~ s/\s*$//;
-
-	my $value = "";
-	my $onekey = "";
-	
-	while ( $line =~ /^(.*?)\t(.*)$/ )
-	{
-		$value = $1;
-		$line = $2;
-		$onekey = ${$allkeys}[$counter];
-		$linehash{$onekey} = $value;
-		$counter++;
-	}
-	
-	# the last column
-
-	$value = $line;
-	$onekey = ${$allkeys}[$counter];
-	
-	$linehash{$onekey} = $value;
-
-	return \%linehash;
-}
-
-#################################################################################
-# Analyzing the content of an idt file
-#################################################################################
-
-sub analyze_idt_file
-{
-	my ($filecontent) = @_;
-	
-	my %table = ();
-	# keys are written in first line
-	my ($allkeys, $rownumber) = collect_all_keys(${$filecontent}[0]);
-
-	for ( my $i = 0; $i <= $#{$filecontent}; $i++ )
-	{
-		if (( $i == 0 ) || ( $i == 1 ) || ( $i == 2 )) { next; }
-
-		my $onelinehash = get_oneline_hash(${$filecontent}[$i], $allkeys, $rownumber);
-		my $linekey = $i - 2;  # ! : The linenumber is the unique key !? Always decrease by two, because of removed first three lines.		
-		$table{$linekey} = $onelinehash;
-	}
-	
-	return \%table;
-}
-
-#################################################################################
-# Reading all idt files in a specified directory
-#################################################################################
-
-sub read_all_tables_from_msidatabase
-{
-	my ($workdir) = @_;
-
-	my %database = ();
-	
-	my $ext = "idt";
-	
-	my $allidtfiles = installer::systemactions::find_file_with_file_extension($ext, $workdir);
-	
-	for ( my $i = 0; $i <= $#{$allidtfiles}; $i++ )
-	{
-		my $onefilename = ${$allidtfiles}[$i];
-		my $longonefilename = $workdir . $installer::globals::separator . $onefilename;
-		if ( ! -f $longonefilename ) { installer::exiter::exit_program("ERROR: Could not find idt file: $longonefilename!", "read_all_tables_from_msidatabase"); }
-		my $filecontent = installer::files::read_file($longonefilename);
-		my $idtcontent = analyze_idt_file($filecontent);
-		my $key = $onefilename;
-		$key =~ s/\.idt\s*$//;
-		$database{$key} = $idtcontent;
-	}
-	
-	return \%database;
-}
-
-#################################################################################
-# Checking, if this is the correct database.
-#################################################################################
-
-sub correct_database
-{
-	my ($product, $pro, $langs, $languagestringref) = @_;
-	
-	my $correct_database = 0;
-	
-	# Comparing $product with $installer::globals::product and
-	# $pro with $installer::globals::pro and
-	# $langs with $languagestringref
-
-	my $product_is_good = 0;
-	
-	my $localproduct = $installer::globals::product;
-	if ( $installer::globals::languagepack ) { $localproduct = $localproduct . "LanguagePack"; }
-
-	if ( $product eq $localproduct ) { $product_is_good = 1; }
-	
-	if ( $product_is_good )
-	{
-		my $pro_is_good = 0;
-
-		if ((( $pro eq "pro" ) && ( $installer::globals::pro )) || (( $pro eq "nonpro" ) && ( ! $installer::globals::pro ))) { $pro_is_good = 1; }
-
-		if ( $pro_is_good )
-		{
-			my $langlisthash = installer::converter::convert_stringlist_into_hash(\$langs, ",");
-			my $langstringhash = installer::converter::convert_stringlist_into_hash($languagestringref, "_");
-		
-			my $not_included = 0;
-			foreach my $onelang ( keys %{$langlisthash} )
-			{
-				if ( ! exists($langstringhash->{$onelang}) )
-				{
-					$not_included = 1;
-					last;
-				}	
-			}
-		
-			if ( ! $not_included )
-			{
-				foreach my $onelanguage ( keys %{$langstringhash} )
-				{
-					if ( ! exists($langlisthash->{$onelanguage}) )
-					{
-						$not_included = 1;
-						last;
-					}	
-				}
-			
-				if ( ! $not_included ) { $correct_database = 1; }			
-			}
-		}
-	}
-	
-	return $correct_database;
-}
-
-#################################################################################
-# Searching for the path to the reference database for this special product.
-#################################################################################
-
-sub get_databasename_from_list
-{
-	my ($filecontent, $languagestringref, $filename) = @_;
-
-	my $databasepath = "";
-	
-	for ( my $i = 0; $i <= $#{$filecontent}; $i++ )
-	{
-		my $line = ${$filecontent}[$i];
-		if ( $line =~ /^\s*$/ ) { next; } # empty line
-		if ( $line =~ /^\s*\#/ ) { next; } # comment line
-
-		if ( $line =~ /^\s*(.+?)\s*\t+\s*(.+?)\s*\t+\s*(.+?)\s*\t+\s*(.+?)\s*$/ )
-		{
-			my $product = $1;
-			my $pro = $2;
-			my $langs = $3;
-			my $path = $4;
-			
-			if (( $pro ne "pro" ) && ( $pro ne "nonpro" )) { installer::exiter::exit_program("ERROR: Wrong syntax in file: $filename. Only \"pro\" or \"nonpro\" allowed in column 1! Line: \"$line\"", "get_databasename_from_list"); }
-
-			if ( correct_database($product, $pro, $langs, $languagestringref) )
-			{
-				$databasepath = $path;
-				last;	
-			}
-		}
-		else
-		{
-			installer::exiter::exit_program("ERROR: Wrong syntax in file: $filename! Line: \"$line\"", "get_databasename_from_list");
-		}
-	}
-
-	return $databasepath;
-}
-
-#################################################################################
-# Reading an existing database completely
-#################################################################################
-
-sub readdatabase
-{
-	my ($allvariables, $languagestringref, $includepatharrayref) = @_;
-	
-	my $database = "";
-	my $infoline = "";
-
-	if ( ! $allvariables->{'UPDATE_DATABASE_LISTNAME'} ) { installer::exiter::exit_program("ERROR: If \"UPDATE_DATABASE\" is set, \"UPDATE_DATABASE_LISTNAME\" is required.", "Main"); }
-	my $listfilename = $allvariables->{'UPDATE_DATABASE_LISTNAME'};
-
-	# Searching the list in the include pathes
-	my $listname = installer::scriptitems::get_sourcepath_from_filename_and_includepath(\$listfilename, $includepatharrayref, 1);
-	if ( $$listname eq "" ) { installer::exiter::exit_program("ERROR: List file not found: $listfilename !", "readdatabase"); }
-	my $completelistname = $$listname;
-
-	# Reading list file
-	my $listfile = installer::files::read_file($completelistname);
-
-	# Get name and path of reference database	
-	my $databasename = get_databasename_from_list($listfile, $languagestringref, $completelistname);
-	
-	# If the correct database was not found, this is not necessarily an error. But in this case, this is not an update packaging process!
-	if (( $databasename ) && ( $databasename ne "" )) # This is an update packaging process!
-	{
-		$installer::globals::updatedatabase = 1;
-        $installer::logger::Info->printf("... update process, using database %s ...\n", $databasename);
-        $installer::logger::Lang->printf("\n");
-        $installer::logger::Lang->printf("Database found in %s: \"%s\"\n", $completelistname, $databasename);
-        $installer::logger::Lang->printf("\n");
-		# Saving in global variable
-		$installer::globals::updatedatabasepath = $databasename;
-	}
-	else
-	{
-        $installer::logger::Lang->printf("\n");
-        $installer::logger::Lang->printf("No database found in %s. This is no update process!\n", $completelistname);
-        $installer::logger::Lang->printf("\n");
-	}
-	
-	if ( $installer::globals::updatedatabase )
-	{
-		if ( ! -f $databasename ) { installer::exiter::exit_program("ERROR: Could not find reference database: $databasename!", "readdatabase"); }
-
-		my $msifilename = $databasename;
-		installer::pathanalyzer::make_absolute_filename_to_relative_filename(\$msifilename);
-	
-		$installer::logger::Lang->add_timestamp("Performance Info: readdatabase start");
-
-		# create directory for unpacking
-		my $databasedir = installer::systemactions::create_directories("database", $languagestringref);
-	
-		# copy database
-		my $fulldatabasepath = $databasedir . $installer::globals::separator . $msifilename;
-		installer::systemactions::copy_one_file($databasename, $fulldatabasepath);
-
-		$installer::logger::Lang->add_timestamp("Performance Info: readdatabase: before extracting tables");
-	
-		# extract all tables from database
-		extract_all_tables_from_msidatabase($fulldatabasepath, $databasedir);
-
-		$installer::logger::Lang->add_timestamp("Performance Info: readdatabase: before reading tables");
-
-		# read all tables
-		$database = read_all_tables_from_msidatabase($databasedir);
-	
-		# Test output:
-	
-		#	foreach my $key1 ( keys %{$database} )
-		#	{
-		#		print "Test1: $key1\n";
-		#		foreach my $key2 ( keys %{$database->{$key1}} )
-		#		{
-		#			print "\tTest2: $key2\n";			
-		#			foreach my $key3 ( keys %{$database->{$key1}->{$key2}} )
-		#			{
-		#				print "\t\tTest3: $key3: $database->{$key1}->{$key2}->{$key3}\n";
-		#			}
-		#		}
-		#	}
-	
-		# Example: File table
-		
-		# my $filetable = $database->{'File'};
-		# foreach my $linenumber ( keys  %{$filetable} )
-		# {
-		#	print "Test Filenumber: $linenumber\n";
-		#	foreach my $key ( keys %{$filetable->{$linenumber}} )
-		#	{
-		#		print "\t\tTest: $key: $filetable->{$linenumber}->{$key}\n";
-		#	}
-		# }
-
-		# Example: Searching for ProductCode in table Property
-
-		# my $column1 = "Property";
-		# my $column2 = "Value";
-		# my $searchkey = "ProductCode";
-		# my $propertytable = $database->{'Property'};
-		# foreach my $linenumber ( keys  %{$propertytable} )
-		# {
-		#	if ( $propertytable->{$linenumber}->{$column1} eq $searchkey )
-		#	{
-		#		print("Test: $searchkey : $propertytable->{$linenumber}->{$column2}\n");
-		#	}
-		# }
-
-		$installer::logger::Lang->add_timestamp("Performance Info: readdatabase end");
-	}
-	
-	return $database;
-}
-
-#################################################################################
-# Files can be included in merge modules. This is also important for update.
-#################################################################################
-
-sub readmergedatabase
-{
-	my ( $mergemodules, $languagestringref, $includepatharrayref ) = @_;
-
-	$installer::logger::Lang->add_timestamp("Performance Info: readmergedatabase start");
-
-	my $mergemoduledir = installer::systemactions::create_directories("mergedatabase", $languagestringref);
-	
-	my %allmergefiles = ();
-
-	$installer::globals::mergemodulenumber = $#{$mergemodules} + 1;
-
-	foreach my $mergemodule ( @{$mergemodules} )
-	{
-		my $filename = $mergemodule->{'Name'};
-		my $mergefile = installer::scriptitems::get_sourcepath_from_filename_and_includepath(\$filename, $includepatharrayref, 1);
-	
-		if ( $$mergefile eq "" ) { installer::exiter::exit_program("ERROR: msm file not found: $filename !", "readmergedatabase"); }
-		my $completesource = $$mergefile;
-			
-		my $mergegid = $mergemodule->{'gid'};
-		my $workdir = $mergemoduledir . $installer::globals::separator . $mergegid;
-		if ( ! -d $workdir ) { installer::systemactions::create_directory($workdir); }
-
-		my $completedest = $workdir . $installer::globals::separator . $filename;
-		installer::systemactions::copy_one_file($completesource, $completedest);
-		if ( ! -f $completedest ) { installer::exiter::exit_program("ERROR: msm file not found: $completedest !", "readmergedatabase"); }
-		
-		# extract all tables from database
-		extract_all_tables_from_msidatabase($completedest, $workdir);
-
-		# read all tables
-		my $onemergefile = read_all_tables_from_msidatabase($workdir);
-		
-		$allmergefiles{$mergegid} = $onemergefile;
-	}
-	
-	foreach my $mergefilegid ( keys %allmergefiles )
-	{
-		my $onemergefile = $allmergefiles{$mergefilegid};
-		my $filetable = $onemergefile->{'File'};
-		
-		foreach my $linenumber ( keys %{$filetable} )
-		{
-			# Collecting all files from merge modules in global hash
-			$installer::globals::mergemodulefiles{$filetable->{$linenumber}->{'File'}} = 1;
-		}
-	}
-
-	$installer::logger::Lang->add_timestamp("Performance Info: readmergedatabase end");
-}
-
-#################################################################################
-# Creating several useful hashes from old database
-#################################################################################
-
-sub create_database_hashes
-{
-	my ( $database ) = @_;
-	
-	# 1. Hash ( Component -> UniqueFileName ), required in File table.
-	# Read from File table.
-	
-	my %uniquefilename = ();
-	my %allupdatesequences = ();
-	my %allupdatecomponents = ();
-	my %allupdatefileorder = ();
-	my %allupdatecomponentorder = ();
-	my %revuniquefilename = ();
-	my %revshortfilename = ();
-	my %shortdirname = ();
-	my %componentid = ();
-	my %componentidkeypath = ();
-	my %alloldproperties = ();
-	my %allupdatelastsequences = ();
-	my %allupdatediskids = ();
-
-	my $filetable = $database->{'File'};
-	
-	foreach my $linenumber ( keys  %{$filetable} )
-	{
-		my $comp = $filetable->{$linenumber}->{'Component_'};
-		my $uniquename = $filetable->{$linenumber}->{'File'};
-		my $filename = $filetable->{$linenumber}->{'FileName'};
-		my $sequence = $filetable->{$linenumber}->{'Sequence'};
-			
-		my $shortname = "";
-		if ( $filename =~ /^\s*(.*?)\|\s*(.*?)\s*$/ )
-		{
-			$shortname = $1;	
-			$filename = $2;	
-		}
-
-		# unique is the combination of $component and $filename
-		my $key = "$comp/$filename";
-		
-		if ( exists($uniquefilename{$key}) ) { installer::exiter::exit_program("ERROR: Component/FileName \"$key\" is not unique in table \"File\" !", "create_database_hashes"); }
-
-		my $value = $uniquename;
-		if ( $shortname ne "" ) { $value = "$uniquename;$shortname"; }
-		$uniquefilename{$key} = $value;	# saving the unique keys and short names in hash
-		
-		# Saving reverse keys too
-		$revuniquefilename{$uniquename} = $key;
-		if ( $shortname ne "" ) { $revshortfilename{$shortname} = $key; }
-		
-		# Saving Sequences for unique names (and also components)
-		$allupdatesequences{$uniquename} = $sequence;
-		$allupdatecomponents{$uniquename} = $comp;
-
-		# Saving unique names and components for sequences
-		$allupdatefileorder{$sequence} = $uniquename;
-		$allupdatecomponentorder{$sequence} = $comp;
-	}
-	
-	# 2. Hash, required in Directory table.
-	
-	my $dirtable = $database->{'Directory'};
-	
-	foreach my $linenumber ( keys  %{$dirtable} )
-	{
-		my $dir = $dirtable->{$linenumber}->{'Directory'}; # this is a unique name
-		my $defaultdir = $dirtable->{$linenumber}->{'DefaultDir'};
-		
-		my $shortname = "";
-		if ( $defaultdir =~ /^\s*(.*?)\|\s*(.*?)\s*$/ )
-		{
-			$shortname = $1;
-			$shortdirname{$dir} = $shortname;	# collecting only the short names
-		}
-	}
-
-	# 3. Hash, collecting info from Component table.
-	# ComponentID and KeyPath have to be reused.
-	
-	my $comptable = $database->{'Component'};
-	
-	foreach my $linenumber ( keys  %{$comptable} )
-	{
-		my $comp = $comptable->{$linenumber}->{'Component'};
-		my $compid = $comptable->{$linenumber}->{'ComponentId'};
-		my $keypath = $comptable->{$linenumber}->{'KeyPath'};
-
-		$componentid{$comp} = $compid;
-		$componentidkeypath{$comp} = $keypath;		
-	}
-
-	# 4. Hash, property table, required for ProductCode and Installlocation.
-
-	my $proptable = $database->{'Property'};
-	
-	foreach my $linenumber ( keys  %{$proptable} )
-	{
-		my $prop = $proptable->{$linenumber}->{'Property'};
-		my $value = $proptable->{$linenumber}->{'Value'};
-
-		$alloldproperties{$prop} = $value;
-	}
-	
-	# 5. Media table, getting last sequence
-	
-	my $mediatable = $database->{'Media'};
-	$installer::globals::updatelastsequence = 0;
-	
-	foreach my $linenumber ( keys  %{$mediatable} )
-	{
-		my $cabname = $mediatable->{$linenumber}->{'Cabinet'};
-		my $lastsequence = $mediatable->{$linenumber}->{'LastSequence'};
-		my $diskid = $mediatable->{$linenumber}->{'DiskId'};
-		$allupdatelastsequences{$cabname} = $lastsequence;
-		$allupdatediskids{$cabname} = $diskid;
-		
-		if ( $lastsequence > $installer::globals::updatelastsequence ) { $installer::globals::updatelastsequence = $lastsequence; }
-	}
-
-	$installer::globals::updatesequencecounter = $installer::globals::updatelastsequence;
-
-	return (\%uniquefilename, \%revuniquefilename, \%revshortfilename, \%allupdatesequences, \%allupdatecomponents, \%allupdatefileorder, \%allupdatecomponentorder, \%shortdirname, \%componentid, \%componentidkeypath, \%alloldproperties, \%allupdatelastsequences, \%allupdatediskids);
-}
-
-
-1;
diff --git a/main/solenv/bin/modules/par2script/globals.pm b/main/solenv/bin/modules/par2script/globals.pm
index 40d99c3..79730a5 100644
--- a/main/solenv/bin/modules/par2script/globals.pm
+++ b/main/solenv/bin/modules/par2script/globals.pm
@@ -39,8 +39,7 @@
 
 	@allitems = ("Installation", "ScpAction", "Directory", "File",
 				 "Shortcut", "Unixlink", "Module", "Profile", "ProfileItem",
-				 "Folder", "FolderItem", "RegistryItem", "WindowsCustomAction",
-				 "MergeModule");
+				 "Folder", "FolderItem", "RegistryItem", "WindowsCustomAction");
 
 	@items_assigned_at_modules = ("File", "Directory", "Unixlink");
 	@items_with_directories = ("File", "Profile", "Shortcut", "Unixlink");
diff --git a/main/solenv/bin/modules/pre2par/globals.pm b/main/solenv/bin/modules/pre2par/globals.pm
index f8b3509..bd36e4e 100644
--- a/main/solenv/bin/modules/pre2par/globals.pm
+++ b/main/solenv/bin/modules/pre2par/globals.pm
@@ -38,8 +38,7 @@
 
 	@allitems = ("Installation", "ScpAction", "HelpText", "Directory", "DataCarrier", "StarRegistry", "File",
 				 "Shortcut", "Custom", "Unixlink", "Procedure", "Module", "Profile", "ProfileItem",
-				 "Folder", "FolderItem", "RegistryItem", "StarRegistryItem", "WindowsCustomAction",
-				 "MergeModule");
+				 "Folder", "FolderItem", "RegistryItem", "StarRegistryItem", "WindowsCustomAction");
 
     $logging     = 0;
 	$logfilename = "logfile.log";	# the default logfile name for global errors
diff --git a/main/solenv/bin/patch_make_releases_xml.pl b/main/solenv/bin/patch_make_releases_xml.pl
new file mode 100644
index 0000000..c999edd
--- /dev/null
+++ b/main/solenv/bin/patch_make_releases_xml.pl
@@ -0,0 +1,197 @@
+#!/usr/bin/perl -w

+

+#**************************************************************

+#  

+#  Licensed to the Apache Software Foundation (ASF) under one

+#  or more contributor license agreements.  See the NOTICE file

+#  distributed with this work for additional information

+#  regarding copyright ownership.  The ASF licenses this file

+#  to you under the Apache License, Version 2.0 (the

+#  "License"); you may not use this file except in compliance

+#  with the License.  You may obtain a copy of the License at

+#  

+#    http://www.apache.org/licenses/LICENSE-2.0

+#  

+#  Unless required by applicable law or agreed to in writing,

+#  software distributed under the License is distributed on an

+#  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY

+#  KIND, either express or implied.  See the License for the

+#  specific language governing permissions and limitations

+#  under the License.

+#  

+#**************************************************************

+

+use LWP::UserAgent;

+

+use strict;

+

+=head1 NAME

+

+    patch_make_releases_xml.pl - Create a section for the instsetoo_native/data/releases.xml file.

+

+=head1 SYNOPSIS

+

+    patch_make_releases_xml.pl <version-number>

+

+        version-number is the version number (eg 4.0.1) for which to create the releases.xml file.

+    

+=head1 DESCRIPTION

+    

+    Will contact http://archive.apache.org/dist/openoffice/<version-number>/binaries/ and

+    a) determine the set of languages

+    b) collect sizes and sha256 check sums for all Windows installation sets.

+

+    The result is printed to the console.  It has to be added manually to releases.xml.

+

+=cut

+

+

+if (scalar @ARGV != 1)

+{

+    print STDERR "usage: $0 <version-number>\n";

+    die;

+}

+

+my $version = $ARGV[0];

+

+print <<EOT;

+<?xml version='1.0' encoding='UTF-8'?>

+<!--***********************************************************

+ * 

+ * Licensed to the Apache Software Foundation (ASF) under one

+ * or more contributor license agreements.  See the NOTICE file

+ * distributed with this work for additional information

+ * regarding copyright ownership.  The ASF licenses this file

+ * to you under the Apache License, Version 2.0 (the

+ * "License"); you may not use this file except in compliance

+ * with the License.  You may obtain a copy of the License at

+ * 

+ *   http://www.apache.org/licenses/LICENSE-2.0

+ * 

+ * Unless required by applicable law or agreed to in writing,

+ * software distributed under the License is distributed on an

+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY

+ * KIND, either express or implied.  See the License for the

+ * specific language governing permissions and limitations

+ * under the License.

+ * 

+ ***********************************************************-->

+EOT

+

+sub DownloadFile ($)

+{

+    my $url = shift;

+

+    my $agent = LWP::UserAgent->new();

+    $agent->timeout(120);

+    $agent->show_progress(0);

+

+    my $file_content = "";

+    my $last_was_redirect = 0;

+    my $bytes_read = 0;

+    $agent->add_handler('response_redirect'

+        => sub{

+            $last_was_redirect = 1;

+            return;

+        });

+    $agent->add_handler('response_data'

+        => sub{

+            if ($last_was_redirect)

+            {

+                $last_was_redirect = 0;

+                # Throw away the data we got so far.

+		$file_content = "";

+            }

+            my($response,$agent,$h,$data)=@_;

+	    $file_content .= $data;

+        });

+    $agent->get($url);

+

+    return $file_content;

+}

+

+

+

+

+sub GetResponse ($)

+{

+    my $url = shift;

+

+    my $agent = LWP::UserAgent->new();

+    $agent->timeout(120);

+    $agent->show_progress(0);

+

+    my $file_content = "";

+    my $last_was_redirect = 0;

+    my $bytes_read = 0;

+    $agent->add_handler('response_redirect'

+        => sub{

+            $last_was_redirect = 1;

+            return;

+        });

+    $agent->add_handler('response_data'

+        => sub{

+            if ($last_was_redirect)

+            {

+                $last_was_redirect = 0;

+                # Throw away the data we got so far.

+		$file_content = "";

+            }

+            my($response,$agent,$h,$data)=@_;

+	    $file_content .= $data;

+        });

+    return $agent->get($url, 'Range' => "bytes=0-0");

+}

+

+my @languages = ();

+my @lines = split(/\n/, DownloadFile("http://archive.apache.org/dist/openoffice/".$version."/binaries/"));

+foreach my $line (@lines)

+{

+    next unless $line =~ /folder.gif/;

+    if ($line =~ /a href=\"([^\"\/]+)\/\"/)

+    {

+	my $language = $1;

+	next if $language eq "SDK";

+	next if $language =~ /^[A-Z]/;

+	push @languages, $language;

+    }

+}

+

+print "<releases>\n";

+print "  <release>\n";

+printf "    <version>%s</version>\n", $version;

+print "    <download>\n";

+print "      <package-format>msi</package-format>\n";

+print "      <url-template>\n";

+printf "        http://archive.apache.org/dist/openoffice/%s/binaries/%%L/Apache_OpenOffice_%s_Win_x86_install_%%L.exe\n",$version, $version;

+print "      </url-template>\n";

+foreach my $language (sort @languages)

+{

+    print "      <item>\n";

+    printf "        <language>%s</language>\n", $language;

+    my $name = sprintf(

+	"Apache_OpenOffice_%s_Win_x86_install_%s.exe",

+	$version,

+	$language,

+	$version,

+	$language);

+

+    my $content = DownloadFile(

+	sprintf("http://archive.apache.org/dist/openoffice/%s/binaries/%s/%s.sha256", $version, $language, $name));

+    if ($content =~ /^([a-f0-9]+)/)

+    {

+	printf("        <checksum type=\"sha256\">%s</checksum>\n", $1);

+    }

+    my $response = GetResponse(

+	sprintf("http://archive.apache.org/dist/openoffice/%s/binaries/%s/%s", $version, $language, $name));

+    my $content_range = $response->{'_headers'}->{'content-range'};

+    if ($content_range =~ /bytes 0-0\/(\d+)/)

+    {

+	printf("        <size>%s</size>\n", $1);

+    }

+    print "      </item>\n";

+}

+

+print "    </download>\n";

+print "  </release>\n";

+print "</releases>\n";

diff --git a/main/solenv/bin/release_prepare.pl b/main/solenv/bin/release_prepare.pl
new file mode 100644
index 0000000..68c1300
--- /dev/null
+++ b/main/solenv/bin/release_prepare.pl
@@ -0,0 +1,226 @@
+#!/usr/bin/perl -w
+
+#**************************************************************
+#  
+#  Licensed to the Apache Software Foundation (ASF) under one
+#  or more contributor license agreements.  See the NOTICE file
+#  distributed with this work for additional information
+#  regarding copyright ownership.  The ASF licenses this file
+#  to you under the Apache License, Version 2.0 (the
+#  "License"); you may not use this file except in compliance
+#  with the License.  You may obtain a copy of the License at
+#  
+#    http://www.apache.org/licenses/LICENSE-2.0
+#  
+#  Unless required by applicable law or agreed to in writing,
+#  software distributed under the License is distributed on an
+#  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+#  KIND, either express or implied.  See the License for the
+#  specific language governing permissions and limitations
+#  under the License.
+#  
+#**************************************************************
+
+use lib ("$ENV{SOLARENV}/bin/modules");
+use installer::patch::InstallationSet;
+use installer::patch::Msi;
+use installer::patch::ReleasesList;
+use installer::ziplist;
+use installer::logger;
+
+use Getopt::Long;
+use Pod::Usage;
+use Digest;
+
+use strict;
+
+=head1 NAME
+
+    release_prepare.pl - Several functions to prepare release builds
+
+=head1 SYNOPSIS
+
+    release_prepare.pl [options] <language1> <language2> ...
+
+    Options:
+        --lst-file <filename>
+             Path to the .lst file, eg ../util/openoffice.lst
+        --product-name <product-name>
+             The product name, eg Apache_OpenOffice
+        --output-path <path>
+             Path to the instsetoo_native platform output tree
+        --source-version <major>.<minor>.<micro>
+             Override version number of the source.  If not given it is computed from the target version.
+
+=head1 DESCRIPTION
+
+    Prepare a release build:
+
+        - Provide installation sets of the previous version.
+          If they are not in ext_sources/ then they are downloaded.
+
+        - Unpack the installation sets.
+
+=cut
+
+
+sub ProcessCommandline ()
+{
+    my $arguments = {
+        'lst-file' => undef,
+        'product-name' => undef,
+        'output-path' => undef,
+        'source-version' => undef};
+
+    if ( ! GetOptions(
+               "lst-file=s", \$arguments->{'lst-file'},
+               "product-name=s", \$arguments->{'product-name'},
+               "output-path=s", \$arguments->{'output-path'},
+               "source-version:s" => \$arguments->{'source-version'}
+        ))
+    {
+        pod2usage(1);
+    }
+
+    if ( ! defined $arguments->{'lst-file'})
+    {
+        print STDERR "lst-file missing, please provide --lst-file\n";
+        pod2usage(2);
+    }
+    if ( ! defined $arguments->{'product-name'})
+    {
+        print STDERR "product name missing, please provide --product-name\n";
+        pod2usage(2);
+    }
+    if ( ! defined $arguments->{'output-path'})
+    {
+        print STDERR "output path missing, please provide --output-path\n";
+        pod2usage(2);
+    }
+
+    $arguments->{'languages'} = \@ARGV;
+
+    return $arguments;
+}
+
+
+
+
+sub ProcessLanguage ($$$$)
+{
+    my ($source_version, $language, $package_format, $product_name) = @_;
+    
+    $installer::logger::Info->printf("%s\n", $language);
+    $installer::logger::Info->increase_indentation();
+
+    # For every language we need
+    # 1. have downloadable installation set available (download if missing)
+    # 2. unpack it to get access to .cab and .msi
+    # 3. unpack .cab so that msimsp.exe can be run
+
+    # Create paths to unpacked contents of .exe and .cab and determine if they exist.
+    # The existence of these paths is taken as flag whether the unpacking has already taken place.
+    my $unpacked_exe_path = installer::patch::InstallationSet::GetUnpackedMsiPath(
+        $source_version,
+        $language,
+        $package_format,
+        $product_name);
+    my $unpacked_cab_path = installer::patch::InstallationSet::GetUnpackedCabPath(
+        $source_version,
+        $language,
+        $package_format,
+        $product_name);
+    my $exe_is_unpacked = -d $unpacked_exe_path;
+    my $cab_is_unpacked = -d $unpacked_cab_path;
+
+    if ( ! $exe_is_unpacked)
+    {
+        # Interpret existence of path as proof that the installation
+        # set and the cab file have been successfully unpacked.
+        # Nothing to do.
+        my $filename = installer::patch::InstallationSet::ProvideDownloadSet(
+            $source_version,
+            $language,
+            $package_format);
+        if (defined $filename)
+        {
+            if ( ! -d $unpacked_exe_path)
+            {
+                installer::patch::InstallationSet::UnpackExe($filename, $unpacked_exe_path);
+            }
+        }
+        else
+        {
+            installer::logger::PrintError("could not provide .exe installation set at '%s'\n", $filename);
+        }
+    }
+    else
+    {
+        $installer::logger::Info->printf("downloadable installation set has already been unpacked to '%s'\n",
+            $unpacked_exe_path);
+    }
+
+    if ( ! $cab_is_unpacked)
+    {
+        my $cab_filename = File::Spec->catfile($unpacked_exe_path, "openoffice1.cab");
+        if ( ! -f $cab_filename)
+        {
+             # Cab file does not exist.
+            installer::logger::PrintError(
+                "could not find .cab file at '%s'.  Extraction of .exe seems to have failed.\n",
+                $cab_filename);
+        }
+
+        # Unpack the cab file.
+        my $msi = new installer::patch::Msi(
+            $source_version,
+            $language,
+            $product_name);
+
+        $installer::logger::Info->printf("unpacking cab file '%s' to '%s'\n",
+            $cab_filename, $unpacked_cab_path);
+        installer::patch::InstallationSet::UnpackCab(
+            $cab_filename,
+            $msi,
+            $unpacked_cab_path);
+    }
+    else
+    {
+        $installer::logger::Info->printf("cab has already been unpacked to\n");
+        $installer::logger::Info->printf("    %s\n", $unpacked_cab_path);
+    }
+
+    $installer::logger::Info->decrease_indentation();
+}
+
+
+
+
+installer::logger::SetupSimpleLogging("c:/tmp/log");
+
+my $arguments = ProcessCommandline();
+$arguments->{'package-format'} = 'msi';
+
+print "preparing release build\n";
+my ($variables, undef, undef)
+    = installer::ziplist::read_openoffice_lst_file(
+        $arguments->{'lst-file'},
+        $arguments->{'product-name'},
+        undef);
+if ( ! defined $arguments->{'source-version'})
+{
+    $arguments->{'source-version'} = $variables->{'PREVIOUS_VERSION'};
+}
+$installer::logger::Info->printf("    reading data from '%s'\n", $arguments->{'lst-file'});
+$installer::logger::Info->printf("    product name is '%s'\n", $arguments->{'product-name'});
+$installer::logger::Info->printf("    output path is '%s'\n", $arguments->{'output-path'});
+$installer::logger::Info->printf("    source version is '%s'\n", $arguments->{'source-version'});
+
+foreach my $language (@{$arguments->{'languages'}})
+{
+    ProcessLanguage(
+        $arguments->{'source-version'},
+        $language,
+        $arguments->{'package-format'},
+        $arguments->{'product-name'});
+}
diff --git a/main/xmlhelp/util/main_transform.xsl b/main/xmlhelp/util/main_transform.xsl
index 5d84746..4c6acf2 100644
--- a/main/xmlhelp/util/main_transform.xsl
+++ b/main/xmlhelp/util/main_transform.xsl
@@ -613,7 +613,7 @@
 <xsl:variable name="archive"><xsl:value-of select="concat(substring-before(substring-after(@href,'text/'),'/'),'/')"/></xsl:variable>
 <xsl:variable name="dbpostfix"><xsl:call-template name="createDBpostfix"><xsl:with-param name="archive" select="$archive"/></xsl:call-template></xsl:variable>
 	<xsl:choose>
-		<xsl:when test="starts-with(@href,'http://')">  <!-- web links -->
+		<xsl:when test="starts-with(@href,'http://') or starts-with(@href,'https://')">  <!-- web links -->
 			<a href="{@href}"><xsl:apply-templates /></a>
 		</xsl:when>
 		<xsl:when test="contains(@href,'#')">
diff --git a/main/xmlsecurity/source/xmlsec/nss/makefile.mk b/main/xmlsecurity/source/xmlsec/nss/makefile.mk
index e955984..d1a3d94 100644
--- a/main/xmlsecurity/source/xmlsec/nss/makefile.mk
+++ b/main/xmlsecurity/source/xmlsec/nss/makefile.mk
@@ -42,14 +42,14 @@
 	@echo "No nss -> no libxmlsec -> no xmlsecurity/nss"
 .ENDIF
 
-.IF "$(SYSTEM_MOZILLA)" != "YES"
+.IF "$(SYSTEM_NSS)" != "YES"
 MOZ_INC = $(SOLARVERSION)$/$(INPATH)$/inc$(UPDMINOREXT)$/mozilla
 NSS_INC = $(MOZ_INC)$/nss
 NSPR_INC = $(MOZ_INC)$/nspr
 .ELSE
-# MOZ_INC already defined from environment
-NSS_INC = $(MOZ_NSS_CFLAGS)
-NSPR_INC = $(MOZ_INC)$/nspr
+# TODO: better use pkgconfig to find the proper system include path
+NSS_INC = /usr/include/nss3
+NSPR_INC = /usr/include/nspr4
 .ENDIF
 
 .IF "$(GUI)" == "WNT"
@@ -105,9 +105,8 @@
 # --- Files --------------------------------------------------------
 
 SOLARINC += \
- -I$(MOZ_INC) \
--I$(NSPR_INC) \
--I$(PRJ)$/source$/xmlsec
+ -I$(NSPR_INC) \
+ -I$(PRJ)$/source$/xmlsec
 
 SOLARINC += -I$(NSS_INC)