openoffice-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j...@apache.org
Subject svn commit: r1546808 [1/2] - in /openoffice/branches/capstone2013/main: ./ comphelper/ comphelper/prj/ drawinglayer/ drawinglayer/prj/ editeng/ editeng/inc/editeng/ editeng/prj/ external/unowinreg/ framework/ framework/prj/ padmin/ padmin/prj/ sfx2/ sf...
Date Sun, 01 Dec 2013 12:20:07 GMT
Author: jani
Date: Sun Dec  1 12:20:06 2013
New Revision: 1546808

URL: http://svn.apache.org/r1546808
Log:
check for missing files in branch

A    main/GNUmakefile
A    main/Makefile.in
A    main/comphelper/Makefile
M    main/comphelper/Module_comphelper.mk
M    main/comphelper/prj/makefile.mk
M    main/configure.in
A    main/drawinglayer/Makefile
M    main/drawinglayer/prj/makefile.mk
A    main/editeng/Makefile
A    main/editeng/inc/editeng/AccessibleSvxFindReplaceDialog.hxx
M    main/editeng/prj/makefile.mk
_M   main/external/unowinreg
A    main/framework/Makefile
M    main/framework/prj/makefile.mk
A    main/makefile.mk
A    main/padmin/Makefile
M    main/padmin/prj/makefile.mk
A    main/sfx2/Makefile
M    main/sfx2/prj/makefile.mk
A    main/solenv/bin/modules/installer/patch
A    main/solenv/bin/modules/installer/patch/FileOperations.pm
A    main/solenv/bin/modules/installer/patch/FileSequenceList.pm
A    main/solenv/bin/modules/installer/patch/InstallationSet.pm
A    main/solenv/bin/modules/installer/patch/Msi.pm
A    main/solenv/bin/modules/installer/patch/MsiRow.pm
A    main/solenv/bin/modules/installer/patch/MsiTable.pm
A    main/solenv/bin/modules/installer/patch/ReleasesList.pm
A    main/solenv/bin/modules/installer/patch/Tools.pm
A    main/solenv/bin/modules/installer/patch/Version.pm
A    main/solenv/bin/patch_make_releases_xml.pl
A    main/solenv/bin/release_prepare.pl
A    main/sot/Makefile
M    main/sot/prj/makefile.mk
A    main/svgio/Makefile
M    main/svgio/prj/makefile.mk
M    main/svl/prj/makefile.mk
M    main/svl/source/items/whassert.hxx
A    main/svtools/Makefile
M    main/svtools/prj/makefile.mk
A    main/svx/Makefile
M    main/svx/prj/makefile.mk
A    main/sw/Makefile
M    main/sw/prj/makefile.mk
A    main/sw/source/core/access/accfield.cxx
A    main/sw/source/core/access/accfield.hxx
A    main/sw/source/core/access/accnotexthyperlink.cxx
A    main/sw/source/core/access/accnotexthyperlink.hxx
A    main/toolkit/Makefile
M    main/toolkit/prj/makefile.mk
A    main/tools/Makefile
M    main/tools/prj/makefile.mk
A    main/unoxml/Makefile
M    main/unoxml/prj/makefile.mk
A    main/vbahelper/Makefile
M    main/vbahelper/prj/makefile.mk
M    main/vcl/prj/makefile.mk
A    main/xmloff/Makefile
M    main/xmloff/prj/makefile.mk

Added:
    openoffice/branches/capstone2013/main/GNUmakefile
    openoffice/branches/capstone2013/main/Makefile.in
    openoffice/branches/capstone2013/main/comphelper/Makefile
    openoffice/branches/capstone2013/main/drawinglayer/Makefile
    openoffice/branches/capstone2013/main/editeng/Makefile
    openoffice/branches/capstone2013/main/editeng/inc/editeng/AccessibleSvxFindReplaceDialog.hxx
    openoffice/branches/capstone2013/main/framework/Makefile
    openoffice/branches/capstone2013/main/makefile.mk
    openoffice/branches/capstone2013/main/padmin/Makefile
    openoffice/branches/capstone2013/main/sfx2/Makefile
    openoffice/branches/capstone2013/main/solenv/bin/modules/installer/patch/
    openoffice/branches/capstone2013/main/solenv/bin/modules/installer/patch/FileOperations.pm
    openoffice/branches/capstone2013/main/solenv/bin/modules/installer/patch/FileSequenceList.pm
    openoffice/branches/capstone2013/main/solenv/bin/modules/installer/patch/InstallationSet.pm
    openoffice/branches/capstone2013/main/solenv/bin/modules/installer/patch/Msi.pm
    openoffice/branches/capstone2013/main/solenv/bin/modules/installer/patch/MsiRow.pm
    openoffice/branches/capstone2013/main/solenv/bin/modules/installer/patch/MsiTable.pm
    openoffice/branches/capstone2013/main/solenv/bin/modules/installer/patch/ReleasesList.pm
    openoffice/branches/capstone2013/main/solenv/bin/modules/installer/patch/Tools.pm
    openoffice/branches/capstone2013/main/solenv/bin/modules/installer/patch/Version.pm
    openoffice/branches/capstone2013/main/solenv/bin/patch_make_releases_xml.pl
    openoffice/branches/capstone2013/main/solenv/bin/release_prepare.pl
    openoffice/branches/capstone2013/main/sot/Makefile
    openoffice/branches/capstone2013/main/svgio/Makefile
    openoffice/branches/capstone2013/main/svtools/Makefile
    openoffice/branches/capstone2013/main/svx/Makefile
    openoffice/branches/capstone2013/main/sw/Makefile
    openoffice/branches/capstone2013/main/sw/source/core/access/accfield.cxx
    openoffice/branches/capstone2013/main/sw/source/core/access/accfield.hxx
    openoffice/branches/capstone2013/main/sw/source/core/access/accnotexthyperlink.cxx
    openoffice/branches/capstone2013/main/sw/source/core/access/accnotexthyperlink.hxx
    openoffice/branches/capstone2013/main/toolkit/Makefile
    openoffice/branches/capstone2013/main/tools/Makefile
    openoffice/branches/capstone2013/main/unoxml/Makefile
    openoffice/branches/capstone2013/main/vbahelper/Makefile
    openoffice/branches/capstone2013/main/xmloff/Makefile
Modified:
    openoffice/branches/capstone2013/main/comphelper/Module_comphelper.mk
    openoffice/branches/capstone2013/main/comphelper/prj/makefile.mk
    openoffice/branches/capstone2013/main/configure.in
    openoffice/branches/capstone2013/main/drawinglayer/prj/makefile.mk
    openoffice/branches/capstone2013/main/editeng/prj/makefile.mk
    openoffice/branches/capstone2013/main/external/unowinreg/   (props changed)
    openoffice/branches/capstone2013/main/framework/prj/makefile.mk
    openoffice/branches/capstone2013/main/padmin/prj/makefile.mk
    openoffice/branches/capstone2013/main/sfx2/prj/makefile.mk
    openoffice/branches/capstone2013/main/sot/prj/makefile.mk
    openoffice/branches/capstone2013/main/svgio/prj/makefile.mk
    openoffice/branches/capstone2013/main/svl/prj/makefile.mk
    openoffice/branches/capstone2013/main/svl/source/items/whassert.hxx
    openoffice/branches/capstone2013/main/svtools/prj/makefile.mk
    openoffice/branches/capstone2013/main/svx/prj/makefile.mk
    openoffice/branches/capstone2013/main/sw/prj/makefile.mk
    openoffice/branches/capstone2013/main/toolkit/prj/makefile.mk
    openoffice/branches/capstone2013/main/tools/prj/makefile.mk
    openoffice/branches/capstone2013/main/unoxml/prj/makefile.mk
    openoffice/branches/capstone2013/main/vbahelper/prj/makefile.mk
    openoffice/branches/capstone2013/main/vcl/prj/makefile.mk
    openoffice/branches/capstone2013/main/xmloff/prj/makefile.mk

Added: openoffice/branches/capstone2013/main/GNUmakefile
URL: http://svn.apache.org/viewvc/openoffice/branches/capstone2013/main/GNUmakefile?rev=1546808&view=auto
==============================================================================
--- openoffice/branches/capstone2013/main/GNUmakefile (added)
+++ openoffice/branches/capstone2013/main/GNUmakefile Sun Dec  1 12:20:06 2013
@@ -0,0 +1,31 @@
+#**************************************************************
+#  
+#  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.
+#  
+#**************************************************************
+
+ifeq ($(strip $(SOLARENV)),)
+$(error No environment set!)
+endif
+
+GBUILDDIR := $(SOLARENV)/gbuild
+include $(GBUILDDIR)/gbuild.mk
+
+$(foreach repo,$(gb_REPOS),$(eval $(call gb_Module_make_global_targets,$(wildcard $(repo)/Module_*.mk))))
+
+# vim: set noet sw=4 ts=4:

Added: openoffice/branches/capstone2013/main/Makefile.in
URL: http://svn.apache.org/viewvc/openoffice/branches/capstone2013/main/Makefile.in?rev=1546808&view=auto
==============================================================================
--- openoffice/branches/capstone2013/main/Makefile.in (added)
+++ openoffice/branches/capstone2013/main/Makefile.in Sun Dec  1 12:20:06 2013
@@ -0,0 +1,37 @@
+###############################################################
+#  
+#  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.
+#  
+###############################################################
+# just dumb wrapper; make install comes later
+
+SHELL=/bin/sh
+
+all:
+	. ./*Env.Set.sh && \
+	./bootstrap && \
+		cd instsetoo_native && ../solenv/bin/build.pl --all
+
+distclean:
+	. ./*Env.Set.sh && \
+	dmake distclean
+
+clean:
+	. ./*Env.Set.sh && \
+	dmake clean
+	

Added: openoffice/branches/capstone2013/main/comphelper/Makefile
URL: http://svn.apache.org/viewvc/openoffice/branches/capstone2013/main/comphelper/Makefile?rev=1546808&view=auto
==============================================================================
--- openoffice/branches/capstone2013/main/comphelper/Makefile (added)
+++ openoffice/branches/capstone2013/main/comphelper/Makefile Sun Dec  1 12:20:06 2013
@@ -0,0 +1,32 @@
+#**************************************************************
+#  
+#  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.
+#  
+#**************************************************************
+
+ifeq ($(strip $(SOLARENV)),)
+$(error No environment set!)
+endif
+
+gb_PARTIALBUILD := T
+GBUILDDIR := $(SOLARENV)/gbuild
+include $(GBUILDDIR)/gbuild.mk
+
+$(eval $(call gb_Module_make_global_targets,$(shell ls $(dir $(realpath $(firstword $(MAKEFILE_LIST))))/Module*.mk)))
+
+# vim: set noet sw=4 ts=4:

Modified: openoffice/branches/capstone2013/main/comphelper/Module_comphelper.mk
URL: http://svn.apache.org/viewvc/openoffice/branches/capstone2013/main/comphelper/Module_comphelper.mk?rev=1546808&r1=1546807&r2=1546808&view=diff
==============================================================================
--- openoffice/branches/capstone2013/main/comphelper/Module_comphelper.mk (original)
+++ openoffice/branches/capstone2013/main/comphelper/Module_comphelper.mk Sun Dec  1 12:20:06 2013
@@ -27,7 +27,6 @@ $(eval $(call gb_Module_add_targets,comp
 	Package_inc \
 	Library_comphelp \
 ))
-exit:
 
 ifneq ($(OOO_JUNIT_JAR),)
 $(eval $(call gb_Module_add_subsequentcheck_targets,comphelper,\

Modified: openoffice/branches/capstone2013/main/comphelper/prj/makefile.mk
URL: http://svn.apache.org/viewvc/openoffice/branches/capstone2013/main/comphelper/prj/makefile.mk?rev=1546808&r1=1546807&r2=1546808&view=diff
==============================================================================
--- openoffice/branches/capstone2013/main/comphelper/prj/makefile.mk (original)
+++ openoffice/branches/capstone2013/main/comphelper/prj/makefile.mk Sun Dec  1 12:20:06 2013
@@ -41,4 +41,4 @@ DEBUG_ARGUMENT=
 .ENDIF
 
 all:
-	cd $(PRJ) && $(GNUMAKE) -f Makefile.gb $(VERBOSEFLAG) -r -j$(MAXPROCESS) $(gb_MAKETARGET) $(DEBUG_ARGUMENT) && $(GNUMAKE) -f Makefile.gb $(VERBOSEFLAG) -r deliverlog
+	cd $(PRJ) && $(GNUMAKE) $(VERBOSEFLAG) -r -j$(MAXPROCESS) $(gb_MAKETARGET) $(DEBUG_ARGUMENT) && $(GNUMAKE) $(VERBOSEFLAG) -r deliverlog

Modified: openoffice/branches/capstone2013/main/configure.in
URL: http://svn.apache.org/viewvc/openoffice/branches/capstone2013/main/configure.in?rev=1546808&r1=1546807&r2=1546808&view=diff
==============================================================================
--- openoffice/branches/capstone2013/main/configure.in (original)
+++ openoffice/branches/capstone2013/main/configure.in Sun Dec  1 12:20:06 2013
@@ -7292,7 +7292,7 @@ AC_SUBST(ADDITIONAL_REPOSITORIES)
 chmod +x ./config.guess
 
 # Create files from their *.in templates.
-AC_CONFIG_FILES([set_soenv Makefile.gb])
+AC_CONFIG_FILES([set_soenv Makefile])
 
 AC_MSG_NOTICE([writing config.status])
 AC_OUTPUT

Added: openoffice/branches/capstone2013/main/drawinglayer/Makefile
URL: http://svn.apache.org/viewvc/openoffice/branches/capstone2013/main/drawinglayer/Makefile?rev=1546808&view=auto
==============================================================================
--- openoffice/branches/capstone2013/main/drawinglayer/Makefile (added)
+++ openoffice/branches/capstone2013/main/drawinglayer/Makefile Sun Dec  1 12:20:06 2013
@@ -0,0 +1,32 @@
+#**************************************************************
+#  
+#  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.
+#  
+#**************************************************************
+
+ifeq ($(strip $(SOLARENV)),)
+$(error No environment set!)
+endif
+
+gb_PARTIALBUILD := T
+GBUILDDIR := $(SOLARENV)/gbuild
+include $(GBUILDDIR)/gbuild.mk
+
+$(eval $(call gb_Module_make_global_targets,$(shell ls $(dir $(realpath $(firstword $(MAKEFILE_LIST))))/Module*.mk)))
+
+# vim: set noet sw=4 ts=4:

Modified: openoffice/branches/capstone2013/main/drawinglayer/prj/makefile.mk
URL: http://svn.apache.org/viewvc/openoffice/branches/capstone2013/main/drawinglayer/prj/makefile.mk?rev=1546808&r1=1546807&r2=1546808&view=diff
==============================================================================
--- openoffice/branches/capstone2013/main/drawinglayer/prj/makefile.mk (original)
+++ openoffice/branches/capstone2013/main/drawinglayer/prj/makefile.mk Sun Dec  1 12:20:06 2013
@@ -41,4 +41,4 @@ DEBUG_ARGUMENT=
 .ENDIF
 
 all:
-	cd $(PRJ) && $(GNUMAKE) -f Makefile.gb $(VERBOSEFLAG) -r -j$(MAXPROCESS) $(gb_MAKETARGET) $(DEBUG_ARGUMENT) && $(GNUMAKE) -f Makefile.gb $(VERBOSEFLAG) -r deliverlog
+	cd $(PRJ) && $(GNUMAKE) $(VERBOSEFLAG) -r -j$(MAXPROCESS) $(gb_MAKETARGET) $(DEBUG_ARGUMENT) && $(GNUMAKE) $(VERBOSEFLAG) -r deliverlog

Added: openoffice/branches/capstone2013/main/editeng/Makefile
URL: http://svn.apache.org/viewvc/openoffice/branches/capstone2013/main/editeng/Makefile?rev=1546808&view=auto
==============================================================================
--- openoffice/branches/capstone2013/main/editeng/Makefile (added)
+++ openoffice/branches/capstone2013/main/editeng/Makefile Sun Dec  1 12:20:06 2013
@@ -0,0 +1,32 @@
+#**************************************************************
+#  
+#  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.
+#  
+#**************************************************************
+
+ifeq ($(strip $(SOLARENV)),)
+$(error No environment set!)
+endif
+
+gb_PARTIALBUILD := T
+GBUILDDIR := $(SOLARENV)/gbuild
+include $(GBUILDDIR)/gbuild.mk
+
+$(eval $(call gb_Module_make_global_targets,$(shell ls $(dir $(realpath $(firstword $(MAKEFILE_LIST))))/Module*.mk)))
+
+# vim: set noet sw=4 ts=4:

Added: openoffice/branches/capstone2013/main/editeng/inc/editeng/AccessibleSvxFindReplaceDialog.hxx
URL: http://svn.apache.org/viewvc/openoffice/branches/capstone2013/main/editeng/inc/editeng/AccessibleSvxFindReplaceDialog.hxx?rev=1546808&view=auto
==============================================================================
--- openoffice/branches/capstone2013/main/editeng/inc/editeng/AccessibleSvxFindReplaceDialog.hxx (added)
+++ openoffice/branches/capstone2013/main/editeng/inc/editeng/AccessibleSvxFindReplaceDialog.hxx Sun Dec  1 12:20:06 2013
@@ -0,0 +1,65 @@
+/**************************************************************
+ * 
+ * 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.
+ * 
+ *************************************************************/
+
+#ifndef _ACCESSIBLESVXFINDREPLACEDIALOG_HXX_
+#define _ACCESSIBLESVXFINDREPLACEDIALOG_HXX_
+#ifndef _TOOLKIT_AWT_VCLXWINDOW_HXX_
+#include <toolkit/awt/vclxwindow.hxx>
+#endif
+#ifndef _TOOLKIT_AWT_VCLXACCESSIBLECOMPONENT_HXX_
+#include <toolkit/awt/vclxaccessiblecomponent.hxx>
+#endif
+
+#ifndef _TOOLKIT_AWT_VCLXWINDOWS_HXX_
+#include <toolkit/awt/vclxwindows.hxx>
+#endif
+
+
+class VCLXAccessibleSvxFindReplaceDialog : public VCLXAccessibleComponent
+{
+public:
+	VCLXAccessibleSvxFindReplaceDialog(VCLXWindow* pVCLXindow);
+	virtual ~VCLXAccessibleSvxFindReplaceDialog();
+	virtual void FillAccessibleRelationSet( utl::AccessibleRelationSetHelper& rRelationSet );
+	// XServiceInfo
+	virtual ::rtl::OUString SAL_CALL getImplementationName() throw (::com::sun::star::uno::RuntimeException);
+	virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames() throw (::com::sun::star::uno::RuntimeException);
+
+};
+
+
+class VCLXSvxFindReplaceDialog : public VCLXDialog
+{
+public:
+	VCLXSvxFindReplaceDialog(Window* pSplDlg)
+	{
+		SetWindow(pSplDlg);
+	}
+	virtual ~VCLXSvxFindReplaceDialog()
+	{};
+private:	
+    virtual ::com::sun::star::uno::Reference<
+        ::com::sun::star::accessibility::XAccessibleContext >  CreateAccessibleContext()
+	{
+		return new VCLXAccessibleSvxFindReplaceDialog(this);		 
+	}
+};
+#endif // _ACCESSIBLESVXFINDREPLACEDIALOG_HXX_

Modified: openoffice/branches/capstone2013/main/editeng/prj/makefile.mk
URL: http://svn.apache.org/viewvc/openoffice/branches/capstone2013/main/editeng/prj/makefile.mk?rev=1546808&r1=1546807&r2=1546808&view=diff
==============================================================================
--- openoffice/branches/capstone2013/main/editeng/prj/makefile.mk (original)
+++ openoffice/branches/capstone2013/main/editeng/prj/makefile.mk Sun Dec  1 12:20:06 2013
@@ -41,4 +41,4 @@ DEBUG_ARGUMENT=
 .ENDIF
 
 all:
-	cd $(PRJ) && $(GNUMAKE) -f Makefile.gb $(VERBOSEFLAG) -r -j$(MAXPROCESS) $(gb_MAKETARGET) $(DEBUG_ARGUMENT) && $(GNUMAKE) -f Makefile.gb $(VERBOSEFLAG) -r deliverlog
+	cd $(PRJ) && $(GNUMAKE) $(VERBOSEFLAG) -r -j$(MAXPROCESS) $(gb_MAKETARGET) $(DEBUG_ARGUMENT) && $(GNUMAKE) $(VERBOSEFLAG) -r deliverlog

Propchange: openoffice/branches/capstone2013/main/external/unowinreg/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Sun Dec  1 12:20:06 2013
@@ -0,0 +1 @@
+unowinreg.dll

Added: openoffice/branches/capstone2013/main/framework/Makefile
URL: http://svn.apache.org/viewvc/openoffice/branches/capstone2013/main/framework/Makefile?rev=1546808&view=auto
==============================================================================
--- openoffice/branches/capstone2013/main/framework/Makefile (added)
+++ openoffice/branches/capstone2013/main/framework/Makefile Sun Dec  1 12:20:06 2013
@@ -0,0 +1,32 @@
+#**************************************************************
+#  
+#  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.
+#  
+#**************************************************************
+
+ifeq ($(strip $(SOLARENV)),)
+$(error No environment set!)
+endif
+
+gb_PARTIALBUILD := T
+GBUILDDIR := $(SOLARENV)/gbuild
+include $(GBUILDDIR)/gbuild.mk
+
+$(eval $(call gb_Module_make_global_targets,$(shell ls $(dir $(realpath $(firstword $(MAKEFILE_LIST))))/Module*.mk)))
+
+# vim: set noet sw=4 ts=4:

Modified: openoffice/branches/capstone2013/main/framework/prj/makefile.mk
URL: http://svn.apache.org/viewvc/openoffice/branches/capstone2013/main/framework/prj/makefile.mk?rev=1546808&r1=1546807&r2=1546808&view=diff
==============================================================================
--- openoffice/branches/capstone2013/main/framework/prj/makefile.mk (original)
+++ openoffice/branches/capstone2013/main/framework/prj/makefile.mk Sun Dec  1 12:20:06 2013
@@ -41,4 +41,4 @@ DEBUG_ARGUMENT=
 .ENDIF
 
 all:
-	cd $(PRJ) && $(GNUMAKE) -f Makefile.gb $(VERBOSEFLAG) -r -j$(MAXPROCESS) $(gb_MAKETARGET) $(DEBUG_ARGUMENT) && $(GNUMAKE) -f Makefile.gb $(VERBOSEFLAG) -r deliverlog
+	cd $(PRJ) && $(GNUMAKE) $(VERBOSEFLAG) -r -j$(MAXPROCESS) $(gb_MAKETARGET) $(DEBUG_ARGUMENT) && $(GNUMAKE) $(VERBOSEFLAG) -r deliverlog

Added: openoffice/branches/capstone2013/main/makefile.mk
URL: http://svn.apache.org/viewvc/openoffice/branches/capstone2013/main/makefile.mk?rev=1546808&view=auto
==============================================================================
--- openoffice/branches/capstone2013/main/makefile.mk (added)
+++ openoffice/branches/capstone2013/main/makefile.mk Sun Dec  1 12:20:06 2013
@@ -0,0 +1,96 @@
+#**************************************************************
+#  
+#  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.
+#  
+# *************************************************************
+
+TARGET=OpenOffice.org
+MAKEFILERC=true
+
+# 
+# build targets
+# 
+
+build_all : build_instsetoo_native
+
+all .PHONY : build_all
+
+check_modules .PHONY :
+	@+echo Checking module list
+	@+perl $(SOLARENV)$/bin$/build.pl --checkmodules
+
+# Only build when all modules available
+build_instsetoo_native .SETDIR=instsetoo_native/prj : check_modules
+	@+perl $(SOLARENV)$/bin$/build.pl --all $(PROFULLSWITCH)
+
+depend .SETDIR=instsetoo_native/prj : check_modules
+	@+perl $(SOLARENV)$/bin$/build.pl --all $(PROFULLSWITCH) depend=t
+
+
+# 
+# bootstrap target
+# 
+
+bootstrap .PHONY :
+	@bootstrap
+
+
+distclean .PHONY: clean
+	-rm config.cache
+	-rm config.log
+.IF "$(BUILD_DMAKE)"!="NO"
+	-$(GNUMAKE) -C dmake distclean
+.ENDIF
+
+
+clean .PHONY:
+	-rm -rf */$(INPATH)
+	-rm -rf solver/*/$(INPATH)
+.IF "$(ADDITIONAL_REPOSITORIES)"!=""
+	-rm -rf $(foreach,f,$(ADDITIONAL_REPOSITORIES) $f/*/$(INPATH))
+.ENDIF
+.IF "$(BUILD_DMAKE)"!="NO"
+	-echo cleaning up dmake...
+	-$(GNUMAKE) -C dmake clean
+.ENDIF
+
+# 
+# configure target
+# 
+
+configure .PHONY SETDIR=. :
+	@configure
+
+
+# 
+# install target
+# 
+
+install .PHONY :
+	@test "$(DESTDIR)$(prefix)" != "" || (echo Usage: make install [DESTDIR=DIR] prefix=DIR; exit 2)
+	cp -p instsetoo_native/$(INPATH)/bin/* $(SOLARVER)/$(INPATH)/bin
+	cd instsetoo_native/util \
+	    && OUT=$(INPATH)\
+	    LOCAL_OUT=$(INPATH)\
+	    LOCAL_COMMON_OUT=$(INPATH)\
+            DEFAULT_TO_ENGLISH_FOR_PACKING=1\
+	    PYTHONPATH=$(SOLARVER)/$(INPATH)/bin:$(SOLARVER)/$(INPATH)/lib:$(PYTHONPATH) \
+	    $(PERL) $(SOLARENV)/bin/make_installer.pl -f openoffice.lst -l $(WITH_LANG:f:t",") -p OpenOffice -buildid 0 -simple $(DESTDIR)$(prefix)
+
+#*************************************************************************
+

Added: openoffice/branches/capstone2013/main/padmin/Makefile
URL: http://svn.apache.org/viewvc/openoffice/branches/capstone2013/main/padmin/Makefile?rev=1546808&view=auto
==============================================================================
--- openoffice/branches/capstone2013/main/padmin/Makefile (added)
+++ openoffice/branches/capstone2013/main/padmin/Makefile Sun Dec  1 12:20:06 2013
@@ -0,0 +1,32 @@
+#**************************************************************
+#  
+#  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.
+#  
+#**************************************************************
+
+ifeq ($(strip $(SOLARENV)),)
+$(error No environment set!)
+endif
+
+gb_PARTIALBUILD := T
+GBUILDDIR := $(SOLARENV)/gbuild
+include $(GBUILDDIR)/gbuild.mk
+
+$(eval $(call gb_Module_make_global_targets,$(shell ls $(dir $(realpath $(firstword $(MAKEFILE_LIST))))/Module*.mk)))
+
+# vim: set noet sw=4 ts=4:

Modified: openoffice/branches/capstone2013/main/padmin/prj/makefile.mk
URL: http://svn.apache.org/viewvc/openoffice/branches/capstone2013/main/padmin/prj/makefile.mk?rev=1546808&r1=1546807&r2=1546808&view=diff
==============================================================================
--- openoffice/branches/capstone2013/main/padmin/prj/makefile.mk (original)
+++ openoffice/branches/capstone2013/main/padmin/prj/makefile.mk Sun Dec  1 12:20:06 2013
@@ -41,4 +41,4 @@ DEBUG_ARGUMENT=
 .ENDIF
 
 all:
-	cd $(PRJ) && $(GNUMAKE) -f Makefile.gb $(VERBOSEFLAG) -r -j$(MAXPROCESS) $(gb_MAKETARGET) $(DEBUG_ARGUMENT)
+	cd $(PRJ) && $(GNUMAKE) $(VERBOSEFLAG) -r -j$(MAXPROCESS) $(gb_MAKETARGET) $(DEBUG_ARGUMENT)

Added: openoffice/branches/capstone2013/main/sfx2/Makefile
URL: http://svn.apache.org/viewvc/openoffice/branches/capstone2013/main/sfx2/Makefile?rev=1546808&view=auto
==============================================================================
--- openoffice/branches/capstone2013/main/sfx2/Makefile (added)
+++ openoffice/branches/capstone2013/main/sfx2/Makefile Sun Dec  1 12:20:06 2013
@@ -0,0 +1,32 @@
+#**************************************************************
+#  
+#  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.
+#  
+#**************************************************************
+
+ifeq ($(strip $(SOLARENV)),)
+$(error No environment set!)
+endif
+
+gb_PARTIALBUILD := T
+GBUILDDIR := $(SOLARENV)/gbuild
+include $(GBUILDDIR)/gbuild.mk
+
+$(eval $(call gb_Module_make_global_targets,$(shell ls $(dir $(realpath $(firstword $(MAKEFILE_LIST))))/Module*.mk)))
+
+# vim: set noet sw=4 ts=4:

Modified: openoffice/branches/capstone2013/main/sfx2/prj/makefile.mk
URL: http://svn.apache.org/viewvc/openoffice/branches/capstone2013/main/sfx2/prj/makefile.mk?rev=1546808&r1=1546807&r2=1546808&view=diff
==============================================================================
--- openoffice/branches/capstone2013/main/sfx2/prj/makefile.mk (original)
+++ openoffice/branches/capstone2013/main/sfx2/prj/makefile.mk Sun Dec  1 12:20:06 2013
@@ -41,4 +41,4 @@ DEBUG_ARGUMENT=
 .ENDIF
 
 all:
-	cd $(PRJ) && $(GNUMAKE) -f Makefile.gb $(VERBOSEFLAG) -r -j$(MAXPROCESS) $(gb_MAKETARGET) $(DEBUG_ARGUMENT) && $(GNUMAKE) -f Makefile.gb $(VERBOSEFLAG) -r deliverlog
+	cd $(PRJ) && $(GNUMAKE) $(VERBOSEFLAG) -r -j$(MAXPROCESS) $(gb_MAKETARGET) $(DEBUG_ARGUMENT) && $(GNUMAKE) $(VERBOSEFLAG) -r deliverlog

Added: openoffice/branches/capstone2013/main/solenv/bin/modules/installer/patch/FileOperations.pm
URL: http://svn.apache.org/viewvc/openoffice/branches/capstone2013/main/solenv/bin/modules/installer/patch/FileOperations.pm?rev=1546808&view=auto
==============================================================================
--- openoffice/branches/capstone2013/main/solenv/bin/modules/installer/patch/FileOperations.pm (added)
+++ openoffice/branches/capstone2013/main/solenv/bin/modules/installer/patch/FileOperations.pm Sun Dec  1 12:20:06 2013
@@ -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;

Added: openoffice/branches/capstone2013/main/solenv/bin/modules/installer/patch/FileSequenceList.pm
URL: http://svn.apache.org/viewvc/openoffice/branches/capstone2013/main/solenv/bin/modules/installer/patch/FileSequenceList.pm?rev=1546808&view=auto
==============================================================================
--- openoffice/branches/capstone2013/main/solenv/bin/modules/installer/patch/FileSequenceList.pm (added)
+++ openoffice/branches/capstone2013/main/solenv/bin/modules/installer/patch/FileSequenceList.pm Sun Dec  1 12:20:06 2013
@@ -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;

Added: openoffice/branches/capstone2013/main/solenv/bin/modules/installer/patch/InstallationSet.pm
URL: http://svn.apache.org/viewvc/openoffice/branches/capstone2013/main/solenv/bin/modules/installer/patch/InstallationSet.pm?rev=1546808&view=auto
==============================================================================
--- openoffice/branches/capstone2013/main/solenv/bin/modules/installer/patch/InstallationSet.pm (added)
+++ openoffice/branches/capstone2013/main/solenv/bin/modules/installer/patch/InstallationSet.pm Sun Dec  1 12:20:06 2013
@@ -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;

Added: openoffice/branches/capstone2013/main/solenv/bin/modules/installer/patch/Msi.pm
URL: http://svn.apache.org/viewvc/openoffice/branches/capstone2013/main/solenv/bin/modules/installer/patch/Msi.pm?rev=1546808&view=auto
==============================================================================
--- openoffice/branches/capstone2013/main/solenv/bin/modules/installer/patch/Msi.pm (added)
+++ openoffice/branches/capstone2013/main/solenv/bin/modules/installer/patch/Msi.pm Sun Dec  1 12:20:06 2013
@@ -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;

Added: openoffice/branches/capstone2013/main/solenv/bin/modules/installer/patch/MsiRow.pm
URL: http://svn.apache.org/viewvc/openoffice/branches/capstone2013/main/solenv/bin/modules/installer/patch/MsiRow.pm?rev=1546808&view=auto
==============================================================================
--- openoffice/branches/capstone2013/main/solenv/bin/modules/installer/patch/MsiRow.pm (added)
+++ openoffice/branches/capstone2013/main/solenv/bin/modules/installer/patch/MsiRow.pm Sun Dec  1 12:20:06 2013
@@ -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;

Added: openoffice/branches/capstone2013/main/solenv/bin/modules/installer/patch/MsiTable.pm
URL: http://svn.apache.org/viewvc/openoffice/branches/capstone2013/main/solenv/bin/modules/installer/patch/MsiTable.pm?rev=1546808&view=auto
==============================================================================
--- openoffice/branches/capstone2013/main/solenv/bin/modules/installer/patch/MsiTable.pm (added)
+++ openoffice/branches/capstone2013/main/solenv/bin/modules/installer/patch/MsiTable.pm Sun Dec  1 12:20:06 2013
@@ -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;



Mime
View raw message