[Libreoffice-commits] core.git: Module_tail_build.mk odk/cfgWin.js odk/config odk/configure.pl odk/CustomTarget_autodoc.mk odk/CustomTarget_bin.mk odk/CustomTarget_check.mk odk/CustomTarget_classes.mk odk/CustomTarget_cli.mk odk/CustomTarget_doxygen.mk odk/CustomTarget_idl.mk odk/CustomTarget_include.mk odk/CustomTarget_javadoc.mk odk/CustomTarget_lib.mk odk/CustomTarget_odkcommon.mk odk/CustomTarget_settings.mk odk/CustomTarget_unowinreg.mk odk/Executable_unoapploader.mk odk/inc odk/Library_unowinreg.mk odk/Makefile odk/Module_odk.mk odk/pack odk/prj odk/setsdkenv_unix odk/setsdkenv_unix.csh.in odk/setsdkenv_unix.sh.in odk/setsdkenv_windows.bat odk/setsdkenv_windows.template odk/setsdkname.bat odk/source odk/util odk/Zip_odkcommon.mk odk/Zip_odkexamples.mk odk/Zip_uno_loader_classes.mk postprocess/prj Repository.mk RepositoryModule_ooo.mk solenv/gbuild

Peter Foley pefoley2 at verizon.net
Sat Feb 23 13:40:11 PST 2013


 Module_tail_build.mk                           |    1 
 Repository.mk                                  |    2 
 RepositoryModule_ooo.mk                        |    1 
 odk/CustomTarget_autodoc.mk                    |   25 
 odk/CustomTarget_bin.mk                        |   42 +
 odk/CustomTarget_check.mk                      |   59 +
 odk/CustomTarget_classes.mk                    |   36 
 odk/CustomTarget_cli.mk                        |   29 
 odk/CustomTarget_doxygen.mk                    |   43 +
 odk/CustomTarget_idl.mk                        |   26 
 odk/CustomTarget_include.mk                    |   51 +
 odk/CustomTarget_javadoc.mk                    |   52 +
 odk/CustomTarget_lib.mk                        |   40 +
 odk/CustomTarget_odkcommon.mk                  |  118 +++
 odk/CustomTarget_settings.mk                   |   48 +
 odk/CustomTarget_unowinreg.mk                  |   35 
 odk/Executable_unoapploader.mk                 |   36 
 odk/Library_unowinreg.mk                       |   37 +
 odk/Makefile                                   |    7 
 odk/Module_odk.mk                              |   41 +
 odk/Zip_odkcommon.mk                           |   30 
 odk/Zip_odkexamples.mk                         |   39 +
 odk/Zip_uno_loader_classes.mk                  |   19 
 odk/cfgWin.js                                  |  911 -------------------------
 odk/config/cfgWin.js                           |  908 ++++++++++++++++++++++++
 odk/config/configure.pl                        |  810 ++++++++++++++++++++++
 odk/config/setsdkenv_unix                      |   84 ++
 odk/config/setsdkenv_unix.csh.in               |  289 +++++++
 odk/config/setsdkenv_unix.sh.in                |  311 ++++++++
 odk/config/setsdkenv_windows.bat               |   82 ++
 odk/config/setsdkenv_windows.template          |  186 +++++
 odk/config/setsdkname.bat                      |   20 
 odk/configure.pl                               |  810 ----------------------
 odk/inc/makefile.mk                            |   30 
 odk/pack/checkbin/makefile.mk                  |   42 -
 odk/pack/checkidl/makefile.mk                  |   42 -
 odk/pack/checkinc/makefile.mk                  |   43 -
 odk/pack/checkinc2/makefile.mk                 |   45 -
 odk/pack/copying/makefile.mk                   |  244 ------
 odk/pack/gendocu/makefile.mk                   |  118 ---
 odk/pack/unzip_udk/makefile.mk                 |   37 -
 odk/prj/build.lst                              |   15 
 odk/prj/d.lst                                  |    5 
 odk/setsdkenv_unix                             |   84 --
 odk/setsdkenv_unix.csh.in                      |  289 -------
 odk/setsdkenv_unix.sh.in                       |  312 --------
 odk/setsdkenv_windows.bat                      |   82 --
 odk/setsdkenv_windows.template                 |  186 -----
 odk/setsdkname.bat                             |   20 
 odk/source/com/sun/star/lib/loader/makefile.mk |   47 -
 odk/source/unoapploader/unx/makefile.mk        |   52 -
 odk/source/unoapploader/win/makefile.mk        |   49 -
 odk/source/unowinreg/win/makefile.mk           |  104 --
 odk/source/unowinreg/win/unowinreg.def         |   11 
 odk/source/unowinreg/win/unowinreg.dxp         |    9 
 odk/util/delzip                                |    1 
 odk/util/makefile.mk                           |   75 --
 odk/util/makefile.pmk                          |  186 -----
 odk/util/odk_rules.pmk                         |  168 ----
 postprocess/prj/build.lst                      |    2 
 solenv/gbuild/Zip.mk                           |    5 
 61 files changed, 3524 insertions(+), 4007 deletions(-)

New commits:
commit 613221bde1744265c336c2b5f2ade0bfb9b22d16
Author: Peter Foley <pefoley2 at verizon.net>
Date:   Thu Feb 21 00:56:13 2013 -0600

    convert odk to gbuild and add to tail_build
    
    Change-Id: I8e8de7f2bb87cce7916c7c2df24c1b0ddaea55c0
    Reviewed-on: https://gerrit.libreoffice.org/2288
    Reviewed-by: Peter Foley <pefoley2 at verizon.net>
    Tested-by: Peter Foley <pefoley2 at verizon.net>

diff --git a/Module_tail_build.mk b/Module_tail_build.mk
index 3f9e2d1..8d24929 100644
--- a/Module_tail_build.mk
+++ b/Module_tail_build.mk
@@ -132,6 +132,7 @@ $(eval $(call gb_Module_add_moduledirs,tail_build,\
 	$(call gb_Helper_optional,NLPSOLVER,nlpsolver) \
 	np_sdk \
 	o3tl \
+	$(call gb_Helper_optional,ODK,odk) \
 	offapi \
 	officecfg \
 	oovbaapi \
diff --git a/Repository.mk b/Repository.mk
index cf5193c..c965b8d 100644
--- a/Repository.mk
+++ b/Repository.mk
@@ -73,6 +73,7 @@ $(eval $(call gb_Helper_register_executables,NONE, \
     uiex \
     ulfconv \
     ulfex \
+    $(call gb_Helper_optional,ODK,unoapploader) \
     xpdfimport \
     xrmex \
 ))
@@ -542,6 +543,7 @@ $(eval $(call gb_Helper_register_libraries,PLAINLIBS_OOO, \
     so_activex_x64 \
     sysdtrans \
 	thidxmsi \
+	unowinreg \
 ))
 endif
 
diff --git a/RepositoryModule_ooo.mk b/RepositoryModule_ooo.mk
index 48c0161..f7a145b 100644
--- a/RepositoryModule_ooo.mk
+++ b/RepositoryModule_ooo.mk
@@ -140,6 +140,7 @@ $(eval $(call gb_Module_add_moduledirs,ooo,\
 	$(call gb_Helper_optional,NLPSOLVER,nlpsolver) \
 	np_sdk \
 	o3tl \
+	$(call gb_Helper_optional,ODK,odk) \
 	offapi \
 	officecfg \
 	oovbaapi \
diff --git a/odk/CustomTarget_autodoc.mk b/odk/CustomTarget_autodoc.mk
new file mode 100644
index 0000000..951183a
--- /dev/null
+++ b/odk/CustomTarget_autodoc.mk
@@ -0,0 +1,25 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+
+$(eval $(call gb_CustomTarget_CustomTarget,odk/odkcommon/docs/common/ref))
+
+odkcommon_ZIPLIST += docs/common/ref
+
+$(eval $(call gb_CustomTarget_register_target,odk/odkcommon/docs/common/ref,module-ix.html))
+$(odk_WORKDIR)/docs/common/ref/module-ix.html: $(SRCDIR)/odk/pack/copying/idl_chapter_refs.txt \
+	$(SRCDIR)/odk/docs/common/ref/idl.css $(call gb_UnoApi_get_target,offapi) \
+	$(call gb_Executable_get_target,autodoc)
+	$(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),AUD,1)
+	$(call gb_Executable_get_target,autodoc) -html $(dir $@) \
+		-dvgroot "http://wiki.services.openoffice.org/wiki" \
+		-name "LibreOffice $(PRODUCTVERSION) API" \
+		-lg idl -dvgfile $< -t $(OUTDIR)/idl
+
+
+# vim: set noet sw=4 ts=4:
diff --git a/odk/CustomTarget_bin.mk b/odk/CustomTarget_bin.mk
new file mode 100644
index 0000000..0a548a2
--- /dev/null
+++ b/odk/CustomTarget_bin.mk
@@ -0,0 +1,42 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+
+$(eval $(call gb_CustomTarget_CustomTarget,odk/odkcommon/bin))
+
+odk_EXELIST := cppumaker \
+	regcompare \
+	idlc \
+	javamaker \
+	autodoc \
+	unoapploader \
+	uno-skeletonmaker \
+	$(if $(SYSTEM_UCPP),,ucpp) \
+	$(if $(filter WNT,$(OS)),climaker)
+
+define odk_exe
+odkcommon_ZIPLIST += bin/$(1)$(gb_Executable_EXT)
+$(call gb_CustomTarget_get_target,odk/odkcommon/bin): $(odk_WORKDIR)/bin/$(1)$(gb_Executable_EXT)
+$(odk_WORKDIR)/bin/$(1)$(gb_Executable_EXT): $(call gb_Executable_get_target,$(1))
+	mkdir -p $$(dir $$@)
+	$$(call gb_Output_announce,$$(subst $$(WORKDIR)/,,$$@),build,CPY,1)
+	cp $$< $$@
+endef
+
+$(foreach exe,$(odk_EXELIST),$(eval $(call odk_exe,$(exe))))
+
+ifeq ($(OS),MACOSX)
+odkcommon_ZIPLIST += bin/addsym-macosx.sh
+$(eval $(call gb_CustomTarget_register_target,odk/odkcommon/bin,addsym-macosx.sh))
+$(odk_WORKDIR)/bin/addsym-macosx.sh: $(SRCDIR)/odk/pack/copying/addsym-macosx.sh
+	$(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),build,CPY,1)
+	cp $< $@
+	chmod 755 $@
+endif
+
+# vim: set noet sw=4 ts=4:
diff --git a/odk/CustomTarget_check.mk b/odk/CustomTarget_check.mk
new file mode 100644
index 0000000..a1d376b
--- /dev/null
+++ b/odk/CustomTarget_check.mk
@@ -0,0 +1,59 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+
+$(eval $(call gb_CustomTarget_CustomTarget,odk/check))
+
+$(eval $(call gb_CustomTarget_register_targets,odk/check,\
+	checkbin \
+	checkinc \
+	checkidl \
+))
+
+odk_PLATFORM := $(if $(filter WNT,$(OS)),\
+	$(if $(filter GCC,$(COM)),mingw,windows),\
+	$(if $(filter SOLARIS,$(OS)),\
+	$(if $(filter SPARC,$(CPUNAME)),solsparc,\
+	$(if $(filter U,$(CPU)),solsparc64,solintel)),\
+	$(if $(filter LINUX,$(OS)),linux,\
+	$(if $(filter NETBSD,$(OS)),netbsd,\
+	$(if $(filter FREEBSD,$(OS)),freebsd,\
+	$(if $(filter DRAGONFLY,$(OS)),dragonfly,\
+	$(if $(filter MACOSX,$(OS)),macosx,\
+	$(if $(filter AIX,$(OS)),aix))))))))
+
+$(call gb_CustomTarget_get_workdir,odk/check)/checkbin: $(SRCDIR)/odk/util/check.pl $(call gb_CustomTarget_get_target,odk/odkcommon)
+	$(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),CHK,1)
+	touch $@
+	$(PERL) $< $(call gb_CustomTarget_get_workdir,odk/odkcommon) \
+		$(odk_PLATFORM) "$(gb_Exectable_EXT)" $@
+	cat $@
+
+$(call gb_CustomTarget_get_workdir,odk/check)/checkidl: $(SRCDIR)/odk/util/checkdiff.pl $(call gb_CustomTarget_get_target,odk/odkcommon)
+	$(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),CHK,1)
+	touch $@
+	diff -br $(call gb_CustomTarget_get_workdir,odk/odkcommon) $(OUTDIR)/idl \
+		2>&1 | $(PERL) $< $@
+	cat $@
+
+$(call gb_CustomTarget_get_workdir,odk/check)/checkinc: $(SRCDIR)/odk/util/checkdiff.pl $(call gb_CustomTarget_get_target,odk/odkcommon)
+	$(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),CHK,1)
+	touch $@
+	diff -br $(call gb_CustomTarget_get_workdir,odk/odkcommon)/include/osl \	$(OUTDIR)/inc/osl 2>&1 | $(PERL) $< $@
+	diff -br $(call gb_CustomTarget_get_workdir,odk/odkcommon)/include/sal \	$(OUTDIR)/inc/sal 2>&1 | $(PERL) $< $@
+	diff -br $(call gb_CustomTarget_get_workdir,odk/odkcommon)/include/store \	$(OUTDIR)/inc/store 2>&1 | $(PERL) $< $@
+	diff -br $(call gb_CustomTarget_get_workdir,odk/odkcommon)/include/typelib \	$(OUTDIR)/inc/typelib 2>&1 | $(PERL) $< $@
+	diff -br $(call gb_CustomTarget_get_workdir,odk/odkcommon)/include/uno \	$(OUTDIR)/inc/uno 2>&1 | $(PERL) $< $@
+	diff -br $(call gb_CustomTarget_get_workdir,odk/odkcommon)/include/bridges \	$(OUTDIR)/inc/bridges 2>&1 | $(PERL) $< $@
+	diff -br $(call gb_CustomTarget_get_workdir,odk/odkcommon)/include/cppu \	$(OUTDIR)/inc/cppu 2>&1 | $(PERL) $< $@
+	diff -br $(call gb_CustomTarget_get_workdir,odk/odkcommon)/include/com/sun/star/uno \	$(OUTDIR)/inc/com/sun/star/uno 2>&1 | $(PERL) $< $@
+	diff -br $(call gb_CustomTarget_get_workdir,odk/odkcommon)/include/cppuhelper \	$(OUTDIR)/inc/cppuhelper 2>&1 | $(PERL) $< $@
+	diff -br $(call gb_CustomTarget_get_workdir,odk/odkcommon)/include/osl \	$(OUTDIR)/inc/osl 2>&1 | $(PERL) $< $@
+	cat $@
+
+# vim: set noet sw=4 ts=4:
diff --git a/odk/CustomTarget_classes.mk b/odk/CustomTarget_classes.mk
new file mode 100644
index 0000000..1678247
--- /dev/null
+++ b/odk/CustomTarget_classes.mk
@@ -0,0 +1,36 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+
+$(eval $(call gb_CustomTarget_CustomTarget,odk/odkcommon/classes))
+
+$(eval $(call gb_JavaClassSet_JavaClassSet,loader))
+
+$(eval $(call gb_JavaClassSet_add_sourcefiles,loader,\
+	odk/source/com/sun/star/lib/loader/Loader \
+	odk/source/com/sun/star/lib/loader/InstallationFinder \
+	odk/source/com/sun/star/lib/loader/WinRegKey \
+	odk/source/com/sun/star/lib/loader/WinRegKeyException \
+))
+
+odkcommon_ZIPLIST += classes/com/sun/star/lib/loader
+$(call gb_CustomTarget_get_target,odk/odkcommon/classes): $(odk_WORKDIR)/classes/java.done
+$(odk_WORKDIR)/classes/java.done: $(call gb_JavaClassSet_get_target,loader)
+	mkdir -p $(dir $@)
+	$(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),build,CPY,1)
+	cp -a $(call gb_JavaClassSet_get_classdir,loader)/com $(dir $@)
+	touch $@
+
+odkcommon_ZIPLIST += classes/win/unowinreg.dll
+$(eval $(call gb_CustomTarget_register_target,odk/odkcommon/classes,win/unowinreg.dll))
+$(odk_WORKDIR)/classes/win/unowinreg.dll: $(call gb_CustomTarget_get_workdir,odk/unowinreg)/unowinreg.dll
+	mkdir -p $(dir $@)
+	$(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),build,CPY,1)
+	cp $< $@
+
+# vim: set noet sw=4 ts=4:
diff --git a/odk/CustomTarget_cli.mk b/odk/CustomTarget_cli.mk
new file mode 100644
index 0000000..88f2625
--- /dev/null
+++ b/odk/CustomTarget_cli.mk
@@ -0,0 +1,29 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+
+$(eval $(call gb_CustomTarget_CustomTarget,odk/odkcommon/cli))
+
+odk_CLILIST := cli_basetypes.dll \
+		cli_uretypes.dll \
+		cli_oootypes.dll \
+		cli_ure.dll \
+		cli_cppuhelper.dll
+
+define odk_cli
+odkcommon_ZIPLIST += cli/$(1)
+$(call gb_CustomTarget_get_target,odk/odkcommon/cli): $(odk_WORKDIR)/cli/$(1)
+$(odk_WORKDIR)/cli/$(1): $(call gb_CliAssembly_get_target,$(1))
+	mkdir -p $$(dir $$@)
+	$$(call gb_Output_announce,$$(subst $$(WORKDIR)/,,$$@),build,CPY,1)
+	cp $$< $$@
+endef
+
+$(foreach cli,$(odk_CLILIST),$(eval $(call odk_cli,$(cli))))
+
+# vim: set noet sw=4 ts=4:
diff --git a/odk/CustomTarget_doxygen.mk b/odk/CustomTarget_doxygen.mk
new file mode 100644
index 0000000..d31ab03
--- /dev/null
+++ b/odk/CustomTarget_doxygen.mk
@@ -0,0 +1,43 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+
+$(eval $(call gb_CustomTarget_CustomTarget,odk/odkcommon/docs/cpp/ref))
+
+odkcommon_ZIPLIST += docs/cpp/ref
+
+CPPDOCREFNAME := "UDK $(UDK_MAJOR).$(UDK_MINOR).$(UDK_MICRO) C/C++ API Reference"
+
+# Cygwin Doxygen needs unix paths
+DOXY_INPUT := $(docu_SRCDIR)/main.dox $(addprefix $(OUTDIR)/inc/,$(odk_INCDIRLIST) $(odk_INCFILELIST))
+DOXY_INPUT := $(if $(filter WNT,$(OS)),$(shell cygpath -u $(DOXY_INPUT)),$(DOXY_INPUT))
+DOXY_WORKDIR := $(if $(filter WNT,$(OS)),$(shell cygpath -u $(odk_WORKDIR)/docs/cpp/ref),$(odk_WORKDIR)/docs/cpp/ref)
+DOXY_STRIP_PATH := $(if $(filter WNT,$(OS)),$(shell cygpath -u $(OUTDIR)/inc),$(OUTDIR)/inc)
+DOXY_DEPS := $(SRCDIR)/odk/pack/gendocu/Doxyfile \
+	$(SRCDIR)/odk/pack/gendocu/main.dox \
+	$(call gb_Package_get_target,sal_inc) \
+	$(call gb_Package_get_target,salhelper_inc) \
+	$(call gb_Package_get_target,cppu_inc) \
+	$(call gb_Package_get_target,cppuhelper_inc) \
+	$(call gb_Package_get_target,store_inc) \
+	$(call gb_Package_get_target,registry_inc)
+
+
+$(eval $(call gb_CustomTarget_register_target,odk/odkcommon/docs/cpp/ref,index.html))
+
+$(odk_WORKDIR)/docs/cpp/ref/index.html: $(DOXY_DEPS)
+	$(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),GEN,1)
+	sed -e 's!^INPUT = %$$!INPUT = $(DOXY_INPUT)!' \
+	-e 's!^OUTPUT_DIRECTORY = %$$!OUTPUT_DIRECTORY = $(DOXY_WORKDIR)!' \
+	-e 's!^PROJECT_BRIEF = %$$!PROJECT_BRIEF = $(CPPDOCREFNAME)!' \
+        -e 's!^QUIET = %$$!QUIET = $(if $(VERBOSE),YES,NO)!' \
+        -e 's!^STRIP_FROM_PATH = %$$!STRIP_FROM_PATH = $(DOXY_STRIP_PATH)!' \
+	$< > $(odk_WORKDIR)/Doxyfile
+	$(DOXYGEN) $(odk_WORKDIR)/Doxyfile
+
+# vim: set noet sw=4 ts=4:
diff --git a/odk/CustomTarget_idl.mk b/odk/CustomTarget_idl.mk
new file mode 100644
index 0000000..ab56cf0
--- /dev/null
+++ b/odk/CustomTarget_idl.mk
@@ -0,0 +1,26 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+
+$(eval $(call gb_CustomTarget_CustomTarget,odk/odkcommon/idl))
+
+# FIXME: should be pulled in from offapi/udkapi
+odk_IDLLIST := $(subst $(OUTDIR)/idl/,,$(shell find $(OUTDIR)/idl/com -type f))
+
+define odk_idl
+odkcommon_ZIPLIST += idl/$(1)
+$(call gb_CustomTarget_get_target,odk/odkcommon/idl): $(odk_WORKDIR)/idl/$(1)
+$(odk_WORKDIR)/idl/$(1): $(OUTDIR)/idl/$(1)
+	mkdir -p $$(dir $$@)
+	$$(call gb_Output_announce,$$(subst $$(WORKDIR)/,,$$@),build,CPY,1)
+	cp $$< $$@
+endef
+
+$(foreach idl,$(odk_IDLLIST),$(eval $(call odk_idl,$(idl))))
+
+# vim: set noet sw=4 ts=4:
diff --git a/odk/CustomTarget_include.mk b/odk/CustomTarget_include.mk
new file mode 100644
index 0000000..7f4ec62
--- /dev/null
+++ b/odk/CustomTarget_include.mk
@@ -0,0 +1,51 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+
+include $(SRCDIR)/solenv/inc/udkversion.mk
+
+odk_INCDIRLIST := sal salhelper rtl osl store typelib uno cppu cppuhelper \
+	registry $(if $(filter WNT,$(OS)),systools)
+odk_INCFILELIST := com/sun/star/uno/Any.h \
+	com/sun/star/uno/Any.hxx \
+	com/sun/star/uno/genfunc.h \
+	com/sun/star/uno/genfunc.hxx \
+	com/sun/star/uno/Reference.h \
+	com/sun/star/uno/Reference.hxx \
+	com/sun/star/uno/Sequence.h \
+	com/sun/star/uno/Sequence.hxx \
+	com/sun/star/uno/Type.h \
+	com/sun/star/uno/Type.hxx
+odk_INCLIST := $(subst $(OUTDIR)/inc/,,$(shell find \
+	$(foreach dir,$(odk_INCDIRLIST),$(OUTDIR)/inc/$(dir)) -type f)) \
+	$(odk_INCFILELIST)
+
+define odk_inc
+odkcommon_ZIPLIST += include/$(1)
+$(call gb_CustomTarget_get_target,odk/odkcommon): $(odk_WORKDIR)/include/$(1)
+$(odk_WORKDIR)/include/$(1): $(foreach dir,$(odk_INCDIRLIST),$(call gb_Package_get_target,$(dir)_inc))
+	mkdir -p $$(dir $$@)
+	$$(call gb_Output_announce,$$(subst $$(WORKDIR)/,,$$@),build,CPY,1)
+	cp $$< $$@
+endef
+
+$(foreach inc,$(odk_INCLIST),$(eval $(call odk_inc,$(inc))))
+
+odkcommon_ZIPLIST += include/udkversion.mk
+$(eval $(call gb_CustomTarget_register_target,odk/odkcommon,include/udkversion.mk))
+$(odk_WORKDIR)/include/udkversion.mk:
+	$(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),ECH,1)
+	echo "#UDK version number" > $@
+	echo "#major" >>$@
+	echo "UDK_MAJOR=$(UDK_MAJOR)" >> $@
+	echo "#minor" >>$@
+	echo "UDK_MINOR=$(UDK_MINOR)" >> $@
+	echo "#micro" >>$@
+	echo "UDK_MICRO=$(UDK_MICRO)" >> $@
+
+# vim: set noet sw=4 ts=4:
diff --git a/odk/CustomTarget_javadoc.mk b/odk/CustomTarget_javadoc.mk
new file mode 100644
index 0000000..e6ff1ca
--- /dev/null
+++ b/odk/CustomTarget_javadoc.mk
@@ -0,0 +1,52 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+
+$(eval $(call gb_CustomTarget_CustomTarget,odk/odkcommon/docs/java/ref))
+
+odkcommon_ZIPLIST += docs/java/ref
+
+JAVADOCREFNAME := "UDK $(UDK_MAJOR).$(UDK_MINOR).$(UDK_MICRO) Java API Reference"
+
+odk_JAVAPACKAGES := com.sun.star.comp.helper \
+	com.sun.star.lib.uno.helper \
+	com.sun.star.lib.unoloader \
+	com.sun.star.uno \
+	$(odk_WORKDIR)/java_src/com/sun/star/lib/util/UrlToFileMapper.java
+
+$(eval $(call gb_CustomTarget_register_target,odk/odkcommon/docs/java/ref,index.html))
+
+$(odk_WORKDIR)/docs/java/ref/index.html: $(call gb_Jar_get_target,ridl)
+	$(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),JDC,1)
+	$(JAVADOC) -J-Xmx120m -use -splitindex \
+		-windowtitle "Java UNO Runtime Reference" \
+		-header $(JAVADOCREFNAME) -d $(dir $@) \
+		-sourcepath $(odk_WORKDIR)/java_src \
+		-classpath $(OUTDIR)/bin/ridl.jar \
+		-linkoffline ../../common/reg ./uno \
+		-linkoffline http://java.sun.com/j2se/1.5/docs/api ./java \
+		$(odk_JAVAPACKAGES) \
+		$(if $(JAVADOCISGJDOC),,-notimestamp) \
+		> $(odk_WORKDIR)/javadoc_log.txt
+
+odk_JAVASRCLIST := juh_src \
+	jurt_src \
+	ridl_src \
+	unoloader_src
+
+define odk_jsrc
+$(odk_WORKDIR)/docs/java/ref/index.html: $(odk_WORKDIR)/java_src/$(1).done
+$(odk_WORKDIR)/java_src/$(1).done: $(call gb_Zip_get_target,$(1))
+	$$(call gb_Output_announce,$$(subst $(WORKDIR)/,,$$@),build,UNZ,1)
+	unzip -quo $$< -d $$(dir $$@)
+	touch $$@
+endef
+
+$(foreach src,$(odk_JAVASRCLIST),$(eval $(call odk_jsrc,$(src))))
+
+# vim: set noet sw=4 ts=4:
diff --git a/odk/CustomTarget_lib.mk b/odk/CustomTarget_lib.mk
new file mode 100644
index 0000000..98ab177
--- /dev/null
+++ b/odk/CustomTarget_lib.mk
@@ -0,0 +1,40 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+
+$(eval $(call gb_CustomTarget_CustomTarget,odk/odkcommon/lib))
+
+define odk_lib
+odkcommon_ZIPLIST += lib/$(1)
+$(call gb_CustomTarget_get_target,odk/odkcommon/lib): $(odk_WORKDIR)/lib/$(1)
+$(odk_WORKDIR)/lib/$(1): $(call gb_Library_get_target,$(1))
+	mkdir -p $$(dir $$@)
+	$$(call gb_Output_announce,$$(subst $$(WORKDIR)/,,$$@),build,CPY,1)
+	cp $$< $$@
+endef
+
+ifeq ($(COM),MSC)
+odk_LIBLIST := store \
+	reg \
+	sal \
+	salhelper \
+	cppu \
+	cppuhelper \
+	purpenvhelper
+
+$(foreach lib,$(odk_LIBLIST),$(eval $(call odk_lib,$(lib))))
+else ifeq ($(OS),LINUX)
+odkcommon_ZIPLIST += lib/libsalcpprt.a
+$(eval $(call gb_CustomTarget_register_target,odk/odkcommon/lib,libsalcpprt.a))
+$(odk_WORKDIR)/lib/libsalcpprt.a: $(call gb_StaticLibrary_get_target,salcpprt)
+	mkdir -p $(dir $@)
+	$(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),build,CPY,1)
+	cp $< $@
+endif
+
+# vim: set noet sw=4 ts=4:
diff --git a/odk/CustomTarget_odkcommon.mk b/odk/CustomTarget_odkcommon.mk
new file mode 100644
index 0000000..11a775a
--- /dev/null
+++ b/odk/CustomTarget_odkcommon.mk
@@ -0,0 +1,118 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+
+odk_WORKDIR := $(call gb_CustomTarget_get_workdir,odk/odkcommon)
+odkcommon_ZIPLIST :=
+
+$(eval $(call gb_CustomTarget_CustomTarget,odk/odkcommon))
+
+$(call gb_CustomTarget_get_target,odk/odkcommon): \
+	$(if $(DOXYGEN),$(call gb_CustomTarget_get_target,odk/odkcommon/docs/cpp/ref)) \
+	$(if $(SOLAR_JAVA),$(call gb_CustomTarget_get_target,odk/odkcommon/docs/java/ref)) \
+	$(call gb_CustomTarget_get_target,odk/odkcommon/docs/common/ref) \
+	$(call gb_CustomTarget_get_target,odk/odkcommon/settings) \
+	$(call gb_CustomTarget_get_target,odk/odkcommon/classes) \
+	$(call gb_CustomTarget_get_target,odk/odkcommon/bin) \
+	$(call gb_CustomTarget_get_target,odk/odkcommon/lib) \
+	$(call gb_CustomTarget_get_target,odk/odkcommon/idl) \
+	$(if $(filter MSC,$(COM)),$(call gb_CustomTarget_get_target,odk/odkcommon/cli))
+
+ifeq ($(OS),WNT)
+odk_CONFIGLIST := cfgWin.js \
+	setsdkenv_windows.template \
+	setsdkname.bat
+else
+odk_CONFIGLIST := configure.pl \
+	setsdkenv_unix \
+	setsdkenv_unix.sh.in \
+	setsdkenv_unix.csh.in
+endif
+
+define odk_config
+odkcommon_ZIPLIST += $(1)
+$(call gb_CustomTarget_get_target,odk/odkcommon): $(odk_WORKDIR)/$(1)
+$(odk_WORKDIR)/$(1): $(SRCDIR)/odk/config/$(1)
+	mkdir -p $$(dir $$@)
+	$$(call gb_Output_announce,$$(subst $$(WORKDIR)/,,$$@),build,CPY,1)
+	cp $$< $$@
+endef
+
+$(foreach config,$(odk_CONFIGLIST),$(eval $(call odk_config,$(config))))
+
+ifeq ($(OS),WNT)
+odkcommon_ZIPLIST += setsdkenv_windows.bat
+$(eval $(call gb_CustomTarget_register_targets,odk/odkcommon,\
+	setsdkenv_windows.bat \
+))
+$(odk_WORKDIR)/setsdkenv_windows.bat: $(SRCDIR)/odk/config/setsdkenv_windows.bat
+	$(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),build,SED,1)
+	sed $< -e 's#__SDKNAME__#libreoffice$(PRODUCTVERSION)_sdk#' > $@
+else
+odkcommon_ZIPLIST += config.guess config.sub
+$(eval $(call gb_CustomTarget_register_targets,odk/odkcommon,\
+	config.guess \
+	config.sub \
+))
+$(odk_WORKDIR)/config.%: $(SRCDIR)/config.%
+	$(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),build,CPY,1)
+	cp $< $@
+endif
+
+odk_HTMLLIST := index.html \
+	docs/tools.html \
+	docs/notsupported.html \
+	docs/install.html \
+	examples/examples.html \
+	examples/DevelopersGuide/examples.html
+
+odk_DOCULIST := docs/sdk_styles.css \
+	docs/common/ref/idl.css \
+	docs/images/nada.gif \
+	docs/images/arrow-1.gif \
+	docs/images/arrow-2.gif \
+	docs/images/arrow-3.gif \
+	docs/images/bluball.gif \
+	docs/images/ooo-main-app_32.png \
+	docs/images/odk-footer-logo.gif \
+	docs/images/bg_table.png \
+	docs/images/bg_table2.png \
+	docs/images/bg_table3.png \
+	docs/images/nav_down.png \
+	docs/images/nav_home.png \
+	docs/images/nav_left.png \
+	docs/images/nav_right.png \
+	docs/images/nav_up.png \
+	docs/images/sdk_head-1.png \
+	docs/images/sdk_head-2.png \
+	docs/images/sdk_line-1.gif \
+	docs/images/sdk_line-2.gif
+
+define odk_html
+odkcommon_ZIPLIST += $(1)
+$(call gb_CustomTarget_get_target,odk/odkcommon): $(odk_WORKDIR)/$(1)
+$(odk_WORKDIR)/$(1): $(SRCDIR)/odk/$(1)
+	mkdir -p $$(dir $$@)
+	$$(call gb_Output_announce,$$(subst $$(WORKDIR)/,,$$@),build,SED,1)
+	cat $$< | tr -d "\015" | \
+		sed -e 's/%PRODUCT_RELEASE%/$(PRODUCTVERSION)/g' > $$@
+endef
+
+define odk_docu
+odkcommon_ZIPLIST += $(1)
+$(call gb_CustomTarget_get_target,odk/odkcommon): $(odk_WORKDIR)/$(1)
+$(odk_WORKDIR)/$(1): $(SRCDIR)/odk/$(1)
+	mkdir -p $$(dir $$@)
+	$$(call gb_Output_announce,$$(subst $$(WORKDIR)/,,$$@),build,CPY,1)
+	cp $$< $$@
+endef
+
+$(foreach html,$(odk_HTMLLIST),$(eval $(call odk_html,$(html))))
+$(foreach doc,$(odk_DOCULIST),$(eval $(call odk_docu,$(doc))))
+
+# vim: set noet sw=4 ts=4:
diff --git a/odk/CustomTarget_settings.mk b/odk/CustomTarget_settings.mk
new file mode 100644
index 0000000..dfe44df
--- /dev/null
+++ b/odk/CustomTarget_settings.mk
@@ -0,0 +1,48 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+
+$(eval $(call gb_CustomTarget_CustomTarget,odk/odkcommon/settings))
+
+odk_SETTINGSLIST := settings.mk \
+	std.mk \
+	stdtarget.mk \
+	$(if $(filter WNT,$(OS)),component.uno.def)
+
+define odk_settings
+odkcommon_ZIPLIST += settings/$(1)
+$(call gb_CustomTarget_get_target,odk/odkcommon/settings): $(odk_WORKDIR)/settings/$(1)
+$(odk_WORKDIR)/settings/$(1): $(SRCDIR)/odk/settings/$(1)
+	mkdir -p $$(dir $$@)
+	$$(call gb_Output_announce,$$(subst $$(WORKDIR)/,,$$@),build,CPY,1)
+	cp $$< $$@
+endef
+
+$(foreach setting,$(odk_SETTINGSLIST),$(eval $(call odk_settings,$(setting))))
+
+odkcommon_ZIPLIST += settings/dk.mk
+$(eval $(call gb_CustomTarget_register_target,odk/odkcommon/settings,dk.mk))
+$(odk_WORKDIR)/settings/dk.mk: $(SRCDIR)/odk/pack/copying/dk.mk
+	$(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),build,SED,1)
+	tr -d "\015" < $< | sed -e 's/@@RELEASE@@/$(PRODUCTVERSION)/' \
+		-e 's/@@BUILDID@@/$(LIBO_VERSION_MAJOR).$(LIBO_VERSION_MINOR).$(LIBO_VERSION_MICRO).$(LIBO_VERSION_PATCH)/' > $@
+
+ifneq ($(OS),WNT)
+odkcommon_ZIPLIST += settings/component.uno.map
+$(eval $(call gb_CustomTarget_register_target,odk/odkcommon/settings,component.uno.map))
+$(odk_WORKDIR)/settings/component.uno.map: $(SRCDIR)/solenv/bin/addsym.awk $(SRCDIR)/solenv/src/component.map
+	$(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),build,GEN,1)
+	tr -d "\015" < $(SRCDIR)/solenv/src/component.map | \
+		$(if $(filter MACOSX,$(OS)),\
+		tail -n +3 | head -3 | sed -e 's/.*component/_component/g' \
+		-e 's/;[ ]*//',\
+		awk -f $<) > $@
+	chmod 664 $@
+endif
+
+# vim: set noet sw=4 ts=4:
diff --git a/odk/CustomTarget_unowinreg.mk b/odk/CustomTarget_unowinreg.mk
new file mode 100644
index 0000000..ae9cad9
--- /dev/null
+++ b/odk/CustomTarget_unowinreg.mk
@@ -0,0 +1,35 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+
+$(eval $(call gb_CustomTarget_CustomTarget,odk/unowinreg))
+
+$(eval $(call gb_CustomTarget_register_target,odk/unowinreg,unowinreg.dll))
+
+ifeq ($(BUILD_UNOWINREG),YES)
+ifeq ($(COM),MSC)
+$(call gb_CustomTarget_get_workdir,odk/unowinreg)/unowinreg.dll: $(call gb_Library_get_target,unowinreg)
+	cp $< $@
+else # COM=GCC
+$(call gb_CustomTarget_get_workdir,odk/unowinreg)/unowinreg.dll: $(SRCDIR)/odk/sourcd/unowinreg/win/unowinreg.cxx
+	$(MINGWCXX) -Wall -D_JNI_IMPLEMENTATION_ \
+		-I$(JAVA_HOME)/include \
+		$(if $(filter LINUX,$(OS)),-I$(JAVA_HOME)/include/linux,\
+		$(if $(filter FREEBSD,$(OS)),-I$(JAVA_HOME)/include/freebsd \
+		-I$(JAVA_HOME)/include/bsd -I$(JAVA_HOME)/include/linux,\
+		$(if $(filter NETBSD,$(OS)),-I$(JAVA_HOME)/include/netbsd))) \
+		-shared -o $@ $< \
+		-Wl,--kill-at -lkernel32 -ladvapi32
+	$(MINGWSTRIP) $@
+endif
+else # BUILD_UNOWINREG=NO
+$(call gb_CustomTarget_get_workdir,odk/unowinreg)/unowinreg.dll: $(TARFILE_LOCATION)/$(UNOWINREG_DLL)
+	cp $< $@
+endif
+
+# vim: set noet sw=4 ts=4:
diff --git a/odk/Executable_unoapploader.mk b/odk/Executable_unoapploader.mk
new file mode 100644
index 0000000..3128a3b
--- /dev/null
+++ b/odk/Executable_unoapploader.mk
@@ -0,0 +1,36 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+
+$(eval $(call gb_Executable_Executable,unoapploader))
+
+$(eval $(call gb_Executable_use_static_libraries,unoapploader,\
+	findsofficepath \
+))
+
+ifeq ($(OS),WNT)
+$(eval $(call gb_Executable_set_targettype_gui,unoapploader,YES))
+
+$(eval $(call gb_Executable_add_cobjects,unoapploader,\
+	odk/source/unoapploader/win/unoapploader \
+))
+
+$(eval $(call gb_Executable_use_system_win32_libs,unoapploader,\
+	advapi32 \
+))
+else
+$(eval $(call gb_Executable_add_cobjects,unoapploader,\
+	odk/source/unoapploader/unx/unoapploader \
+))
+
+$(eval $(call gb_Executable_add_libs,unoapploader,\
+    $(if $(filter-out FREEBSD NETBSD DRAGONFLY,$(OS)),-ldl) \
+))
+endif
+
+# vim: set ts=4 sw=4 et:
diff --git a/odk/Library_unowinreg.mk b/odk/Library_unowinreg.mk
new file mode 100644
index 0000000..d2a20f8
--- /dev/null
+++ b/odk/Library_unowinreg.mk
@@ -0,0 +1,37 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+
+$(eval $(call gb_Library_Library,unowinreg))
+
+ifeq ($(COM),GCC)
+$(eval $(call gb_Library_add_libs,unowinreg,\
+	-lstdc++ \
+	-lgcc_eh \
+	-lgcc \
+	-lmingw32 \
+	-lmoldname \
+	-lmsvcrt \
+))
+else
+$(eval $(call gb_Library_add_ldflags,unowinreg,\
+	/DEF:$(SRCDIR)/odk/source/unowinreg/win/unowinreg.def \
+	/MANIFEST:NO \
+))
+endif
+
+$(eval $(call gb_Library_add_exception_objects,unowinreg,\
+   odk/source/unowinreg/win/unowinreg \
+))
+
+$(eval $(call gb_Library_use_system_win32_libs,unowinreg,\
+	kernel32 \
+	advapi32 \
+))
+
+# vim: set noet sw=4 ts=4:
diff --git a/odk/Makefile b/odk/Makefile
new file mode 100644
index 0000000..ccb1c85
--- /dev/null
+++ b/odk/Makefile
@@ -0,0 +1,7 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+
+module_directory:=$(dir $(realpath $(firstword $(MAKEFILE_LIST))))
+
+include $(module_directory)/../solenv/gbuild/partial_build.mk
+
+# vim: set noet sw=4 ts=4:
diff --git a/odk/Module_odk.mk b/odk/Module_odk.mk
new file mode 100644
index 0000000..d2409ec
--- /dev/null
+++ b/odk/Module_odk.mk
@@ -0,0 +1,41 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+
+$(eval $(call gb_Module_Module,odk))
+
+$(eval $(call gb_Module_add_targets,odk,\
+	CustomTarget_odkcommon \
+	$(if $(filter WNT,$(OS)),CustomTarget_cli) \
+	$(if $(DOXYGEN),CustomTarget_doxygen) \
+	CustomTarget_check \
+	CustomTarget_bin \
+	CustomTarget_lib \
+	CustomTarget_settings \
+	CustomTarget_autodoc \
+	CustomTarget_idl \
+	Executable_unoapploader \
+	Zip_odkexamples \
+))
+
+ifneq ($(SOLAR_JAVA),)
+$(eval $(call gb_Module_add_targets,odk,\
+	CustomTarget_unowinreg \
+	CustomTarget_classes \
+	CustomTarget_javadoc \
+	$(if $(filter WNT,$(OS)),Library_unowinreg) \
+	Zip_uno_loader_classes \
+))
+endif
+
+$(eval $(call gb_Module_add_targets,odk,\
+	Zip_odkcommon \
+))
+
+
+# vim: set noet sw=4 ts=4:
diff --git a/odk/Zip_odkcommon.mk b/odk/Zip_odkcommon.mk
new file mode 100644
index 0000000..e6f6808
--- /dev/null
+++ b/odk/Zip_odkcommon.mk
@@ -0,0 +1,30 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+
+$(eval $(call gb_Zip_Zip,odkcommon,$(call gb_CustomTarget_get_workdir,odk/odkcommon)))
+
+$(eval $(call gb_Zip_add_files,odkcommon,\
+	$(odkcommon_ZIPLIST) \
+))
+
+$(eval $(call gb_Zip_add_commandoptions,odkcommon,-r))
+
+#FIXME: scp2 seems to require the zip to be in bin
+$(call gb_Zip_get_final_target,odkcommon) : $(OUTDIR)/bin/odkcommon.zip
+$(call gb_Zip_get_clean_target,odkcommon) : clean_odkcommon_zip
+
+$(OUTDIR)/bin/odkcommon.zip : $(call gb_Zip_get_target,odkcommon)
+	$(call gb_Deliver_deliver,$<,$@)
+
+.PHONY : clean_odkcommon_zip
+clean_odkcommon_zip:
+	rm -f $(OUTDIR)/bin/odkcommon.zip
+
+
+# vim: set noet sw=4 ts=4:
diff --git a/odk/Zip_odkexamples.mk b/odk/Zip_odkexamples.mk
new file mode 100644
index 0000000..8a54683
--- /dev/null
+++ b/odk/Zip_odkexamples.mk
@@ -0,0 +1,39 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+
+$(eval $(call gb_Zip_Zip,odkexamples,$(SRCDIR)/odk))
+
+$(eval $(call gb_Zip_add_commandoptions,odkexamples,\
+	-r \
+	-x "*makefile.mk" \
+	-x "*Container1*" \
+	-x "*Storage*" \
+	-x "*register_component*" \
+	-x "*examples.html" \
+	-x "*ConverterServlet*" \
+	-x "*NotesAccess*" \
+	-x "*delphi*" \
+))
+
+$(eval $(call gb_Zip_add_files,odkexamples,\
+	examples \
+))
+
+#FIXME: scp2 seems to require the zip to be in bin
+$(call gb_Zip_get_final_target,odkexamples) : $(OUTDIR)/bin/odkexamples.zip
+$(call gb_Zip_get_clean_target,odkexamples) : clean_odkexamples_zip
+
+$(OUTDIR)/bin/odkexamples.zip : $(call gb_Zip_get_target,odkexamples)
+	$(call gb_Deliver_deliver,$<,$@)
+
+.PHONY : clean_odkexamples_zip
+clean_odkexamples_zip:
+	rm -f $(OUTDIR)/bin/odkexamples.zip
+
+# vim: set noet sw=4 ts=4:
diff --git a/odk/Zip_uno_loader_classes.mk b/odk/Zip_uno_loader_classes.mk
new file mode 100644
index 0000000..a5587fe
--- /dev/null
+++ b/odk/Zip_uno_loader_classes.mk
@@ -0,0 +1,19 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+
+$(eval $(call gb_Zip_Zip,uno_loader_classes,$(call gb_CustomTarget_get_workdir,odk/odkcommon/classes)))
+
+$(eval $(call gb_Zip_add_commandoptions,uno_loader_classes,-r))
+
+$(eval $(call gb_Zip_add_files,uno_loader_classes,\
+		com/sun/star/lib/loader \
+		win/unowinreg.dll \
+))
+
+# vim: set noet sw=4 ts=4:
diff --git a/odk/cfgWin.js b/odk/cfgWin.js
deleted file mode 100644
index fa1c081..0000000
--- a/odk/cfgWin.js
+++ /dev/null
@@ -1,911 +0,0 @@
-//
-// This file is part of the LibreOffice project.
-//
-// This Source Code Form is subject to the terms of the Mozilla Public
-// License, v. 2.0. If a copy of the MPL was not distributed with this
-// file, You can obtain one at http://mozilla.org/MPL/2.0/.
-//
-// This file incorporates work covered by the following license notice:
-//
-//   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 .
-//
-// This script asks for variables, which are necessary for building the
-// examples of the Office Development Kit. The script duplicates the template
-// script and inserts the variables into the copied script.
-// The Script was developed for the operating systems Microsoft Windows.
-var regKeyOfficeCurrentUser = "HKEY_CURRENT_USER\\Software\\LibreOffice\\UNO\\InstallPath\\";
-var regKeyOfficeLocaleMachine = "HKEY_LOCAL_MACHINE\\Software\\LibreOffice\\UNO\\InstallPath\\";
-var regKeyDotNetInstallRoot = "HKEY_LOCAL_MACHINE\\Software\\Microsoft\\.NETFramework\\InstallRoot";
-var regKeyDotNet1_1 = "HKLM\\Software\\Microsoft\\.NETFramework\\policy\\v1.1\\4322";
-var sDirDotNet1_1 = "v1.1.4322";
-var regKeyDotNet2_0 = "HKLM\\Software\\Microsoft\\.NETFramework\\Policy\\v2.0\\50727";
-var sDirDotNet2_0 = "v2.0.50727";
-
-var regKeyJDK = "HKLM\\Software\\JavaSoft\\Java Development Kit\\";
-//var regKeyVC70 = "HKLM\\SOFTWARE\\Microsoft\\VisualStudio\\7.0\\Setup\\VC\\ProductDir";
-//var regKeyVC71 = "HKLM\\SOFTWARE\\Microsoft\\VisualStudio\\7.1\\Setup\\VC\\ProductDir";
-var regKeyVC90 = "HKLM\\SOFTWARE\\Microsoft\\VisualStudio\\9.0\\Setup\\VC\\ProductDir";
-
-//var regKeyVCExpress80 = "HKLM\\SOFTWARE\\Microsoft\\VCExpress\\8.0\\Setup\\VC\\ProductDir";
-var regKeyVCExpress90 = "HKLM\\SOFTWARE\\Microsoft\\VCExpress\\9.0\\Setup\\VC\\ProductDir";
-
-var regKeyWindowsSDK = "HKLM\\SOFTWARE\\Microsoft\\Microsoft SDKs\\Windows\\CurrentInstallFolder";
-
-var WshShell = WScript.CreateObject("WScript.Shell");
-var WshSysEnv = WshShell.Environment("process");
-var aFileSystemObject =  new ActiveXObject("Scripting.FileSystemObject");
-var stdin = WScript.StdIn;
-var stdout = WScript.StdOut;
-
-stdout.WriteLine("\n" +
-" *** Configure your SDK environment ***\n\n" +
-" NOTE: This script is working only for Windows 2000, Windows XP or newer versions!\n");
-
-var oo_sdk_name=WshSysEnv("OO_SDK_NAME");
-var oo_sdk_home=getSdkHome();
-var oo_user_sdk_dir=WshSysEnv("APPDATA") + "\\" + oo_sdk_name;
-var oo_user_sdk_env_script=oo_user_sdk_dir + "\\setsdkenv_windows.bat";
-
-var office_home=getOfficeHome();
-var oo_sdk_ure_home=office_home + "\\URE";
-
-var oo_sdk_make_home=getMakeHome();
-var oo_sdk_zip_home=getZipHome();
-var oo_sdk_manifest_used="";
-var oo_sdk_windowssdk="";
-var oo_sdk_cpp_home=getCppHome();
-var oo_sdk_cli_home=getCliHome();
-var oo_sdk_java_home=getJavaHome();
-var oo_sdk_out=getOutputDir();
-var sdk_auto_deployment=getAutoDeployment();
-
-writeBatFile(oo_user_sdk_dir, oo_user_sdk_env_script);
-
-stdout.Write(
-	"\n ******************************************************************\n" +
-    " * ... \"" + oo_user_sdk_env_script + "\"\n" +
-    " * batch file has been prepared.\n" +
-    " * This batch file will be used in the future to prepare your\n" +
-	" * personal configured SDK environment.\n" +
-	" ******************************************************************\n\n");
-//    " * For each time you want to use this configured SDK environment,\n" +
-//    " * you have to run the \"setsdkenv_windows.bat\" file in a new shell!\n" +
-
-// done -------------------------------------------------------------------------
-
-
-function skipChoice(msg)
-{
-	stdout.Write("\n Do you want to skip the choice of " + msg + " (YES/NO) [YES]:");
-	var sChoice = stdin.ReadLine();
-    if (sChoice == "" || sChoice.toLowerCase() == "yes")
-	   return true;
-
-	return false;
-}
-
-function getSdkHome()
-{
-	var sSuggestedHome = WshSysEnv("OO_SDK_HOME");
-    if (sSuggestedHome.length == 0) {
-        var scriptname = WScript.ScriptFullName;
-        sSuggestedHome = scriptname.substr(0,scriptname.length-10);
-    }
-    
-    while(true)
-    {
-        stdout.Write("\n Enter the Office Software Development Kit directory [" +
-                     sSuggestedHome + "]:");
-        var sHome = stdin.ReadLine();
-        if (sHome.length == 0)
-        {
-            //No user input, use default. 
-            if ( ! aFileSystemObject.FolderExists(sSuggestedHome))
-            {
-                stdout.WriteLine("\n Error: Could not find directory \"" +
-                                 sSuggestedHome + "\". An SDK is required, please" +
-								 " specify the path to a valid installation.");
-                continue;
-            }       
-            sHome = sSuggestedHome;
-        }
-        else
-        {
-            //validate the user input
-            if ( ! aFileSystemObject.FolderExists(sHome))
-            {
-                stdout.WriteLine("\n Error: The directory \"" + sHome + 
-                                 "\" does not exist. Please enter the path to a" +
-								 "valid SDK installation.");
-                continue;
-            }
-        }
-        //Check if this is an sdk folder by looking for the idl sub - dir
-        var idlDir = sHome + "\\idl";
-        if (! aFileSystemObject.FolderExists(idlDir))
-        {
-            stdout.WriteLine("\n Error: Could not find directory \"" +
-                             idlDir + "\". An SDK is required, please specify " +
-                             "the path to a valid SDK installation.");
-            continue;
-        }
-
-        return sHome;
-    }   
-}
-
-function getOfficeHome()
-{
-    var sSuggestedHome = WshSysEnv("OFFICE_HOME");
-    if (sSuggestedHome.length == 0)
-    {
-        try {   
-            sSuggestedHome = WshShell.RegRead(regKeyOfficeCurrentUser);
-			//The registry entry points to the program folder but we need the 
-			//installation folder
-        } catch(exc) {}
-        if (sSuggestedHome.length == 0)
-        {
-            try {
-                sSuggestedHome = WshShell.RegRead(regKeyOfficeLocaleMachine);
-                //The registry entry points to the program folder but we need 
-				//the installation folder
-            } catch (exc) {}
-        }
-
-		var index=0;
-        if ((index = sSuggestedHome.lastIndexOf("\\")) != -1)   
-		   sSuggestedHome = sSuggestedHome.substr(0, index);
-
-        if (sSuggestedHome.length == 0)
-		   sSuggestedHome = searchOffice();
-    }
-    
-    while(true)
-    {
-        stdout.Write("\n Enter the Office base installation directory [" +
-                     sSuggestedHome + "]:");
-        var sHome = stdin.ReadLine();
-        if (sHome.length == 0)
-        {
-            //No user input, use default. 
-            if ( ! aFileSystemObject.FolderExists(sSuggestedHome))
-            {
-                stdout.WriteLine("\n Error: Could not find directory \"" + 
-                                 sSuggestedHome + "\" An office installation is " +
-								 "required, please specify the path to a valid " +
-								 "office installation.");
-                sSuggestedHome = "";
-                continue;
-            }       
-            sHome = sSuggestedHome;
-        } else
-        {
-            //validate the user input
-            if ( ! aFileSystemObject.FolderExists(sHome))
-            {
-                stdout.WriteLine("\n Error: The directory \"" + sHome + 
-                                 "\" does not exist. Please specify the path to " +
-								 "a valid office installation.");
-                continue;
-            }
-        }
-        //Check if this is a valid office installtion folder by looking for the 
-		//program sub-directory
-        var progDir = sHome + "\\program";
-        if (! aFileSystemObject.FolderExists(progDir))
-        {
-            stdout.WriteLine("\n Error: Could not find directory \"" +
-                             progDir + "\". An office installation is required, " +
-							 "please specify the path to a valid office " +
-							 "installation.");
-            continue;
-        }
-        return sHome;
-    }
-}
-
-function searchOffice()
-{
-	var tmp = oo_sdk_home;
-
-	if (aFileSystemObject.FileExists(tmp + "\\program\\soffice.exe")) {
-	   return tmp;
-	}
-  
-	return "";
-}
-
-function getMakeHome()
-{
-    var sSuggestedHome = WshSysEnv("OO_SDK_MAKE_HOME");
-    
-    while(true)
-    {
-        stdout.Write("\n Enter GNU make (3.79.1 or higher) tools directory [" +
-                     sSuggestedHome + "]:");
-        var sHome = stdin.ReadLine();
-        if (sHome.length == 0)
-        {
-            //No user input, use default. 
-            if ( ! aFileSystemObject.FolderExists(sSuggestedHome))
-            {
-                stdout.WriteLine("\n Error: Could not find directory \"" +
-								 sSuggestedHome + "\". GNU make is required, " +
-								 "please specify a GNU make tools directory.");
-                sSuggestedHome = "";
-                continue;
-            }       
-            sHome = sSuggestedHome;
-        } else
-        {
-            //validate the user input
-            if ( ! aFileSystemObject.FolderExists(sHome))
-            {
-                stdout.WriteLine("\n Error: The directory \"" + sHome + 
-                                 "\" does not exist. GNU make is required, " +
-								 "please specify a GNU make tools directory.");
-                continue;
-            }
-        }
-        //Check for the make executable
-        var sMakePath = sHome + "\\make.exe";
-        if (! aFileSystemObject.FileExists(sMakePath))
-	{
-		sMakePath = sHome + "\\mingw32-make.exe";
-	}
-        if (! aFileSystemObject.FileExists(sMakePath))
-        {
-            stdout.WriteLine("\n Error: Could not find \"" + sMakePath + 
-							 "\". GNU make is required, please specify a GNU " +
-							 "make tools directory.");
-            continue;
-        }
-        return sHome;
-    }   
-}
-
-function getZipHome()
-{
-    var sSuggestedHome = WshSysEnv("OO_SDK_ZIP_HOME");
-    
-    while(true)
-    {
-        stdout.Write("\n Enter a zip (2.3 or higher) tools directory [" +
-                     sSuggestedHome + "]:");
-        var sHome = stdin.ReadLine();
-        if (sHome.length == 0)
-        {
-            //No user input, use default. 
-            if ( ! aFileSystemObject.FolderExists(sSuggestedHome))
-            {
-                stdout.WriteLine("\n Error: Could not find directory \"" + 
-								 sSuggestedHome + "\". zip is required, please " +
-								 "specify a zip tools directory.");
-                sSuggestedHome = "";
-                continue;
-            }       
-            sHome = sSuggestedHome;
-        }
-        else
-        {
-            //validate the user input
-            if ( ! aFileSystemObject.FolderExists(sHome))
-            {
-                stdout.WriteLine("\n Error: The directory \"" + sHome + 
-                                 "\" does not exist. zip is required, please " +
-								 "specify a zip tools directory.");
-                continue;
-            }
-        }
-        //Check for the make executable
-        var sZipPath = sHome + "\\zip.exe";
-        if (! aFileSystemObject.FileExists(sZipPath))
-        {
-            stdout.WriteLine("\n Error: Could not find \"" + sZipPath + 
-                             "\". zip is required, please specify a zip tools " +
-							 "directory.");
-            continue;
-        }
-        return sHome;
-    }   
-}
-
-function getCppHome()
-{
-    var sSuggestedHome = WshSysEnv("OO_SDK_CPP_HOME");
-    if (sSuggestedHome.length == 0)
-    {       
-        var sVC="";
-        try {
-            sVC = WshShell.RegRead(regKeyVCExpress90);
-        }catch (exc) {}
-        if (sVC.length == 0)
-        {
-	        try {
-				sVC = WshShell.RegRead(regKeyVC90);
-			}catch (exc) {}
-		}        
-		// check Windows SDK if VC 9
-        if (sVC.length > 0)
-        {
-		    oo_sdk_manifest_used="true";	
-			try {
-				oo_sdk_windowssdk = WshShell.RegRead(regKeyWindowsSDK);
-			}catch (exc) {}
-		}
-        if (sVC.length == 0)
-        {
-	        try {
-				sVC = WshShell.RegRead(regKeyVCExpress80);
-			}catch (exc) {}
-	        if (sVC.length > 0)
-			   oo_sdk_manifest_used="true";
-		}        
-        if (sVC.length == 0)
-        {
-	        try {
-				sVC = WshShell.RegRead(regKeyVC80);
-			}catch (exc) {}
-	        if (sVC.length > 0)
-			   oo_sdk_manifest_used="true";
-		}        
-        if (sVC.length == 0)
-        {
-	        try {
-				sVC = WshShell.RegRead(regKeyVC71);
-			}catch (exc) {}
-		}        
-        if (sVC.length > 0)
-        {
-            sVC += "bin";
-            if (aFileSystemObject.FileExists(sVC + "\\cl.exe"))
-                sSuggestedHome = sVC;			
-        }
-    }
-
-    var bSkip = false;       
-    while(true)
-    {
-        stdout.Write("\n Enter the directory of the C++ compiler (optional) [" +
-                     sSuggestedHome + "]:");
-        var sHome = stdin.ReadLine();
-        if (sHome.length == 0)
-        {
-            //No user input, check OO_SDK_CPP_HOME or suggested value
-	    if ( sSuggestedHome.length == 0 ) {
-		bSkip = true;
-	    } else {
-	        if ( !aFileSystemObject.FolderExists(sSuggestedHome) )
-		{
-		    stdout.WriteLine("\n Error: Could not find directory \"" +
-				     sSuggestedHome + "\".");
-		    sSuggestedHome = "";
-		    bSkip = true;
-		}
-	    }
-       
-            sHome = sSuggestedHome;
-        } else
-        {
-            //validate the user input
-            if ( ! aFileSystemObject.FolderExists(sHome))
-            {
-                stdout.WriteLine("\n Error: Could not find directory \"" +
-                                 sHome + "\".");
-                bSkip = true;
-            }
-        }
-
-		if ( !bSkip) {
-		    //Check if the C++ compiler exist
-		    var cl = sHome + "\\cl.exe";
-		    var mt = sHome + "\\mt.exe";
-        
-			if (! aFileSystemObject.FileExists(cl))
-			{
-				stdout.WriteLine("\n Error: Could not find the C++ compiler \"" 
-								 + cl + "\".");
-				sHome = "";
-				bSkip = true;
-			} else {
-			    if (aFileSystemObject.FileExists(mt)) {
-				    oo_sdk_vc8_used="true";				   
-				}
-			}
-		}
-
-		if ( bSkip ) { 
-		   if ( skipChoice("the C++ compiler") ) {
-			   return "";
-		   } else {
-			   bSkip = false;
-			   continue;
-		   }
-		}
-
-        return sHome;
-    }   
-}
-
-function getCliHome()
-{
-    var sSuggestedHome = WshSysEnv("OO_SDK_CLI_HOME");
-    
-    if (sSuggestedHome.length == 0)
-    {
-        try {
-            var _ver = WshShell.RegRead(regKeyDotNet2_0);
-            if (_ver.length > 0)
-            {
-                sSuggestedHome = WshShell.RegRead(regKeyDotNetInstallRoot);
-                sSuggestedHome += sDirDotNet2_0;
-                if ( ! aFileSystemObject.FolderExists(sSuggestedHome))
-                    sSuggestedHome = "";
-            }
-
-			if (sSuggestedHome.length == 0) 
-			{
-				_ver = WshShell.RegRead(regKeyDotNet1_1);
-				if (_ver.length > 0)
-				{
-					sSuggestedHome = WshShell.RegRead(regKeyDotNetInstallRoot);
-					sSuggestedHome += sDirDotNet1_1;
-					if ( ! aFileSystemObject.FolderExists(sSuggestedHome))
-					   sSuggestedHome = "";
-				}
-			}				
-		} catch (exc) {}
-    }
-    
-    var bSkip = false;       
-    while(true)
-    {
-        stdout.Write("\n Enter the directory of the C# and VB.NET compilers (optional) [" + sSuggestedHome + "]:");
-        var sHome = stdin.ReadLine();
-        if (sHome.length == 0)
-        {
-            //No user input, check OO_SDK_CLI_HOME or suggested value
-			if ( sSuggestedHome.length == 0 ) {
-			    bSkip = true;
-			} else {
-			    if ( !aFileSystemObject.FolderExists(sSuggestedHome) )
-				{
-					stdout.WriteLine("\n Error: Could not find directory \"" + 
-									 sSuggestedHome + "\".");
-					sSuggestedHome = "";
-					bSkip = true;
-				} 
-			}
-
-		    sHome = sSuggestedHome;
-        }
-        else
-        {
-            //validate the user input
-            if ( ! aFileSystemObject.FolderExists(sHome))
-            {
-                stdout.WriteLine("\n Error: The directory \"" + sHome + 
-                                 "\" does not exist.");
-                bSkip = true;
-            }
-        }
-
-		if ( !bSkip ) {
-		    //Check if the C# and VB.NET compiler exist
-		    var csc = sHome + "\\csc.exe";
-		    var vbc = sHome + "\\vbc.exe";
-        
-			if (! aFileSystemObject.FileExists(csc)) 
-			{
-				stdout.WriteLine("\n Error: Could not find the C# compiler \"" + 
-								 csc + "\".");
-				bSkip = true;
-			}
-			if (! aFileSystemObject.FileExists(vbc))
-			{
-				stdout.WriteLine("\n Error: Could not find the VB.NET compiler \"" +
-								 vbc + "\".");
-				bSkip = true;
-			}
-		}
-
-		if ( bSkip ) { 
-		   if ( skipChoice("the C# and VB.NET compilers") ) {
-			   return "";
-		   } else {
-			   bSkip = false;
-			   continue;
-		   }
-		}
-
-        return sHome;
-    }   
-}
-
-function getJavaHome()
-{
-    var sSuggestedHome = WshSysEnv("OO_SDK_JAVA_HOME");
-    if (sSuggestedHome.length == 0)
-    {
-        try {
-            var currentVersion = WshShell.RegRead(regKeyJDK + "CurrentVersion");
-            if (currentVersion.length > 0)
-            {
-                sSuggestedHome = WshShell.RegRead(regKeyJDK + currentVersion + 
-												  "\\JavaHome");           
-                if ( ! aFileSystemObject.FolderExists(sSuggestedHome) )
-                    sSuggestedHome = "";
-            }
-        } catch (exc) {}
-    }
-    
-    var bSkip = false;       
-    while(true)
-    {
-        stdout.Write("\n Enter JAVA SDK (1.4.1_01 or higher) installation directory (optional) [" + sSuggestedHome + "]:");
-        var sHome = stdin.ReadLine();
-        if (sHome.length == 0)
-        {
-            //No user input, check OO_SDK_JAVA_HOME or suggested value
-			if ( sSuggestedHome.length == 0 ) {
-			    bSkip = true;
-			} else {
-			    if ( !aFileSystemObject.FolderExists(sSuggestedHome) )
-				{
-					stdout.WriteLine("\n Error: Could not find directory \"" + 
-									 sSuggestedHome + "\".");
-					sSuggestedHome = "";
-					bSkip=true;
-				}
-			}	
-			
-			sHome = sSuggestedHome;
-        } else
-        {
-            //validate the user input
-            if ( ! aFileSystemObject.FolderExists(sHome))
-            {
-                stdout.WriteLine("\n Error: The directory \"" + sHome + 
-                                 "\" does not exist.");
-				bSkip = true;
-            }
-        }
-
-		if ( !bSkip) {
-		    //Check if this is an sdk folder by looking for the javac compiler
-			var javacompiler = sHome + "\\bin\\javac.exe";
-			if (! aFileSystemObject.FileExists(javacompiler))
-			{
-				stdout.WriteLine("\n Error: Could not find \"" +
-								 javacompiler + "\".");
-				bSkip = true;
-			}
-        }
-
-		if ( bSkip ) { 
-		   if ( skipChoice("the Java SDK") ) {
-			   return "";
-		   } else {
-			   bSkip = false;
-			   continue;
-		   }
-		}
-
-        return sHome;
-    }   
-}
-
-function getOutputDir()
-{
-	var defaultdir = "c:\\" + oo_sdk_name;
-    var sSuggestedDir = WshSysEnv("OO_SDK_OUT");
-	if (sSuggestedDir.length == 0)
-	   sSuggestedDir = defaultdir;
-
-    var bSkip = false;       
-    while(true)
-    {
-        stdout.Write(
-			"\n Default output directory is the \"c:\\" + oo_sdk_name + "\".\n" +
-            " Enter an existent directory if you prefer a different one. But note" +
-			" that only\n a path without spaces is allowed because of a" +
-			" limitation of gnu make. (optional) [" + sSuggestedDir + "]:");    
-        var sDir = stdin.ReadLine();
-        if (sDir.length == 0)
-        {
-            //No user input, check OO_SDK_OUT or suggested value
-			if ( sSuggestedDir.length == 0 ) {
-			    bSkip = true;
-			} else {
-				if (sSuggestedDir == oo_user_sdk_dir || sSuggestedDir == defaultdir) {
-				    var fso = new ActiveXObject("Scripting.FileSystemObject");
-					if ( !fso.FolderExists(sSuggestedDir) )
-						fso.CreateFolder(sSuggestedDir);
-				}				
-			    if ( !aFileSystemObject.FolderExists(sSuggestedDir) )
-				{
-					stdout.WriteLine("\n Error: Could not find directory \"" +
-									 sSuggestedDir + "\".");
-					sSuggestedDir = "";
-					bSkip = true;
-				}
-			}
-       
-            sDir = sSuggestedDir;
-        }
-        else
-        {
-			if (sDir.indexOf(' ') != -1) {
-				stdout.WriteLine("\n Error: your specified output directory " +
-								 "\"" + sDir + "\" " +	 
-								 "contains one or more spaces.\n        That " +
-								 "causes problems with gnu make. Please specifiy" +
-								 " a directory without spaces.");
-				bSkip = true;
-			}
-            //validate the user input
-            if ( ! aFileSystemObject.FolderExists(sDir))
-            {
-                stdout.WriteLine("\n Error: Could not find directory \"" +
-                                 sDir + "\".");
-                bSkip = true;
-            }
-        }
-
-		if ( bSkip ) { 
-		   if ( skipChoice("a special output directory") ) {
-			   return "";
-		   } else {
-			   bSkip = false;
-			   continue;
-		   }
-		}
-        
-        return sDir;
-    }   
-}
-
-function getAutoDeployment()
-{
-    var sSuggestedAuto = WshSysEnv("SDK_AUTO_DEPLOYMENT");
-    if (sSuggestedAuto.length == 0)
-        sSuggestedAuto = "YES";
-    
-    while(true)
-    {
-        stdout.Write("\n Automatic deployment of UNO components (YES/NO) ["+
-                     sSuggestedAuto + "]:");   
-        var sAuto = stdin.ReadLine();
-        if (sAuto.length == 0)
-            sAuto = sSuggestedAuto;
-        else
-        {
-            sAutoU = sAuto.toUpperCase();
-            if (sAutoU != "YES" && sAutoU != "NO")
-            {
-                stdout.WriteLine("\n Error: The value \"" + sAuto + "\" is " +
-								 "invalid. Please answer YES or NO.")
-                    continue;
-            }
-            sAuto = sAutoU;
-        }
-        return sAuto;
-    }   
-}
-
-//The function uses sp2bv.exe to obtain a file URL from a
-//system path. The URL is already escaped for use as bootstrap variable.
-//($ -> \$). Then the resulting string is escaped for use in a bat file.
-//That is % signs are made to double % (% -> %%);
-function makeBootstrapFileUrl(systemPath)
-{
-    var oExec = WshShell.Exec("sp2bv.exe \"" + systemPath + "\"");
-    var output="";
-    while (true)
-    {
-        if (!oExec.StdOut.AtEndOfStream)
-        {
-            var next = oExec.StdOut.Read(1);
-            if (next == '%')
-                output += "%%";
-            else
-                output += next;
-        }
-        else
-            break;
-    }
-    return output;
-}
-
-function writeBatFile(fdir, file)
-{
-    var fso = new ActiveXObject("Scripting.FileSystemObject");
-    if ( !fso.FolderExists(fdir) )
-       fso.CreateFolder(fdir);
-    var newFile = fso.CreateTextFile(file, true);
-
-    newFile.Write(
-        "@echo off\n" +
-        "REM This script sets all enviroment variables, which\n" +
-        "REM are necessary for building the examples of the Office Development Kit.\n" +
-        "REM The Script was developed for the operating systems Windows.\n" +
-        "REM The SDK name\n" +
-        "REM Example: set OO_SDK_NAME=libreoffice3.4_sdk\n" +
-        "set OO_SDK_NAME=" + oo_sdk_name  +
-        "\n\n" +
-        "REM Installation directory of the Software Development Kit.\n" +
-        "REM Example: set OO_SDK_HOME=C:\\Program Files\\LibreOffice 3\\sdk\n" +
-        "set OO_SDK_HOME=" + oo_sdk_home  +
-        "\n\n" +
-        "REM Office installation directory.\n" +
-        "REM Example: set OFFICE_HOME=C:\\Program Files\\LibreOffice 3\n" +
-        "set OFFICE_HOME=" + office_home +
-        "\n\n" +
-        "REM URE installation directory.\n" +
-        "REM Example: set OO_SDK_URE_HOME=C:\\Program Files\\LibreOffice 3\\URE\n" +
-        "set OO_SDK_URE_HOME=" + oo_sdk_ure_home +
-        "\n\n" +
-        "REM Directory of the make command.\n" +
-        "REM Example: set OO_SDK_MAKE_HOME=D:\\NextGenerationMake\\make\n" + 
-        "set OO_SDK_MAKE_HOME=" + oo_sdk_make_home + 
-        "\n\n" +
-		"REM Directory of the zip tool.\n" +
-		"REM Example: set OO_SDK_ZIP_HOME=D:\\infozip\\bin\n" +
-		"set OO_SDK_ZIP_HOME=" + oo_sdk_zip_home + 
-        "\n\n" +
-        "REM Directory of the C++ compiler.\n" + 
-        "REM Example:set OO_SDK_CPP_HOME=C:\\Program Files\\Microsoft Visual Studio 9.0\\VC\\bin\n" + 
-        "set OO_SDK_CPP_HOME=" + oo_sdk_cpp_home + 
-		"\nset CPP_MANIFEST=" + oo_sdk_manifest_used +
-		"\nset CPP_WINDOWS_SDK=" + oo_sdk_windowssdk +
-        "\n\n" + 
-        "REM Directory of the C# and VB.NET compilers.\n" + 
-        "REM Example:set OO_SDK_CLI_HOME=C:\\WINXP\\Microsoft.NET\\Framework\\v1.0.3705\n" +
-        "set OO_SDK_CLI_HOME=" + oo_sdk_cli_home + 
-        "\n\n" +
-        "REM Java SDK installation directory.\n" + 
-        "REM Example: set OO_SDK_JAVA_HOME=C:\\Program Files\\Java\\jdk1.6.0_05\n" + 
-        "set OO_SDK_JAVA_HOME=" + oo_sdk_java_home + 
-        "\n\n" + 
-        "REM Special output directory\n" + 
-        "REM Example: set OO_SDK_OUT=C:\\" + oo_sdk_name + "\n" +
-        "set OO_SDK_OUT=" + oo_sdk_out + 
-        "\n\n" +
-        "REM Automatic deployment\n" + 
-        "REM Example: set SDK_AUTO_DEPLOYMENT=YES\n" +
-        "set SDK_AUTO_DEPLOYMENT=" + sdk_auto_deployment +
-        "\n\n" +
-        "REM Check installation path for the Office Development Kit.\n" +
-        "if not defined OO_SDK_HOME (\n" +
-        "   echo Error: the variable OO_SDK_HOME is missing!\n" +
-        "   goto :error\n" +
-        " )\n" + 
-        "\n" + 
-        "REM Check installation path for the office.\n" + 
-        "REM if not defined OFFICE_HOME (\n" + 
-        "REM if not defined OO_SDK_URE_HOME (\n" + 
-        "REM    echo Error: either of the variables OFFICE_HOME and\n" +
-        "REM    echo OO_SDK_URE_HOME is missing!\n" + 
-        "REM    goto :error\n" + 
-        "REM  )\n" +
-        "REM  )\n" +
-        "\n" +
-        "REM Check installation path for GNU make.\n" + 
-        "if not defined OO_SDK_MAKE_HOME (\n" + 
-        "   echo Error: the variable OO_SDK_MAKE_HOME is missing!\n" +
-        "   goto :error\n" +
-        " )\n" + 
-        "\n" +
-        "REM Check installation path for the zip tool.\n" + 
-        "if not defined OO_SDK_ZIP_HOME (\n" +
-        "   echo Error: the variable OO_SDK_ZIP_HOME is missing!\n" + 
-        "   goto :error\n" +
-        " )\n" +
-        "\n" +
-        "REM Set library path. \n" + 
-        "set LIB=%OO_SDK_HOME%\\lib;%LIB%\n" +
-        "if defined CPP_WINDOWS_SDK (\n" +
-        "   set LIB=%LIB%;%CPP_WINDOWS_SDK%\\lib\n" +
-        " )\n" +
-        "\n" +
-        "REM Set office program path.\n" +
-        "if defined OFFICE_HOME (\n" +
-        "   set OFFICE_PROGRAM_PATH=%OFFICE_HOME%\\program\n" +
-        " )\n" +
-        "\n" +
-		"REM Set UNO path, necessary to ensure that the cpp examples using the\n" +
-		"REM new UNO bootstrap mechanism use the configured office installation\n" +
-		"REM (only set when using an Office).\n" +
-		"if defined OFFICE_HOME (\n" +
-		"   set UNO_PATH=%OFFICE_PROGRAM_PATH%\n" +
-		" )\n" +
-        "\n" +
-        "REM if defined OO_SDK_URE_HOME (\n" +
-        "set OO_SDK_URE_BIN_DIR=%OO_SDK_URE_HOME%\\bin\n" +
-        "set OO_SDK_URE_LIB_DIR=%OO_SDK_URE_HOME%\\bin\n" +
-        "set OO_SDK_URE_JAVA_DIR=%OO_SDK_URE_HOME%\\java\n" +
-        "REM ) else (\n" +
-        "set OO_SDK_OFFICE_BIN_DIR=%OFFICE_PROGRAM_PATH%\n" +
-        "set OO_SDK_OFFICE_LIB_DIR=%OFFICE_PROGRAM_PATH%\n" +
-        "set OO_SDK_OFFICE_JAVA_DIR=%OFFICE_PROGRAM_PATH%\\classes\n" +
-        "REM )\n" +
-        "\n" +
-        "REM Set classpath\n" +
-        "set CLASSPATH=%OO_SDK_URE_JAVA_DIR%\\juh.jar;%OO_SDK_URE_JAVA_DIR%\\jurt.jar;%OO_SDK_URE_JAVA_DIR%\\ridl.jar;%OO_SDK_URE_JAVA_DIR%\\unoloader.jar;%OO_SDK_OFFICE_JAVA_DIR%\\unoil.jar\n" +
-        "REM if defined OFFICE_HOME (\n" +
-        "REM     set CLASSPATH=%CLASSPATH%;%OO_SDK_OFFICE_JAVA_DIR%\\unoil.jar\n" +
-        "REM  )\n" +
-        "\n" +
-        "REM Add directory of the SDK tools to the path.\n" +
-        "set PATH=%OO_SDK_HOME%\\bin;%OO_SDK_URE_BIN_DIR%;%OO_SDK_OFFICE_BIN_DIR%;%OO_SDK_HOME%\\WINexample.out\\bin;%PATH%\n" +
-        "\n" +
-        "REM Set PATH appropriate to the output directory\n" +
-        "if defined OO_SDK_OUT (\n" + 
-        "   set PATH=%OO_SDK_OUT%\\WINexample.out\\bin;%PATH%\n" + 
-        " ) else (\n" + 
-        "   set PATH=%OO_SDK_HOME%\\WINexample.out\\bin;%PATH%\n" + 
-        " )\n" + 
-        "\n" +
-        "REM Add directory of the command make to the path, if necessary.\n" +
-        "if defined OO_SDK_MAKE_HOME set PATH=%OO_SDK_MAKE_HOME%;%PATH%\n" + 
-        "\n" + 
-	"REM Add directory of the zip tool to the path, if necessary.\n" +
-	"if defined OO_SDK_ZIP_HOME set PATH=%OO_SDK_ZIP_HOME%;%PATH%\n" +
-        "\n" + 
-        "REM Add directory of the C++ compiler to the path, if necessary.\n" +
-        "if defined OO_SDK_CPP_HOME set PATH=%OO_SDK_CPP_HOME%;%PATH%\n" + 
-        "\n" +
-        "REM Add directory of the Win SDK to the path, if necessary.\n" +
-        "if defined CPP_WINDOWS_SDK (\n" +
-		"   set PATH=%CPP_WINDOWS_SDK%\\bin;%PATH%\n" + 
-		"   set INCLUDE=%CPP_WINDOWS_SDK%\\Include;%INCLUDE%\n" + 
-        ")\n" +
-        "REM Add directory of the C# and VB.NET compilers to the path, if necessary.\n" + 
-        "if defined OO_SDK_CLI_HOME set PATH=%OO_SDK_CLI_HOME%;%PATH%\n" + 
-        "\n" + 
-        "REM Add directory of the Java tools to the path, if necessary.\n" + 
-        "if defined OO_SDK_JAVA_HOME set PATH=%OO_SDK_JAVA_HOME%\\bin;%OO_SDK_JAVA_HOME%\\jre\\bin;%PATH%\n" +
-        "\n" +
-        "REM Set environment for C++ compiler tools, if necessary.\n" + 
-        "if defined OO_SDK_CPP_HOME call \"%OO_SDK_CPP_HOME%\\VCVARS32.bat\"\n" +
-        "\n" +
-        "REM Set tilte to identify the prepared shell.\n" + 
-        "title Shell prepared for SDK\n" + 
-        "\nREM Prepare shell with all necessary environment variables.\n" +
-        "echo.\n" +
-        "echo  ******************************************************************\n" +
-        "echo  *\n" + 
-        "echo  * SDK environment is prepared for Windows\n" +
-        "echo  *\n" +       
-        "echo  * SDK = %OO_SDK_HOME%\n" +
-        "echo  * Office = %OFFICE_HOME%\n" +
-        "echo  * URE = %OO_SDK_URE_HOME%\n" +
-        "echo  * Make = %OO_SDK_MAKE_HOME%\n" +
-        "echo  * Zip = %OO_SDK_ZIP_HOME%\n" +
-        "echo  * C++ Compiler = %OO_SDK_CPP_HOME%\n" +
-        "echo  * C# and VB.NET compilers = %OO_SDK_CLI_HOME%\n" +
-        "echo  * Java = %OO_SDK_JAVA_HOME%\n" +
-        "echo  * Special Output directory = %OO_SDK_OUT%\n" +
-        "echo  * Auto deployment = %SDK_AUTO_DEPLOYMENT%\n" +
-        "echo  *\n" +
-        "echo  ******************************************************************\n" +
-        "echo.\n" +
-        "goto end\n" + 
-        "\n" +
-        " :error\n" +
-        "Error: Please insert the necessary environment variables into the batch file.\n" + 
-        "\n" + 
-        " :end\n" 
-        );
-        newFile.Close();        
-}
-
-
-
diff --git a/odk/config/cfgWin.js b/odk/config/cfgWin.js
new file mode 100644
index 0000000..99dca7f
--- /dev/null
+++ b/odk/config/cfgWin.js
@@ -0,0 +1,908 @@
+//
+// This file is part of the LibreOffice project.
+//
+// This Source Code Form is subject to the terms of the Mozilla Public
+// License, v. 2.0. If a copy of the MPL was not distributed with this
+// file, You can obtain one at http://mozilla.org/MPL/2.0/.
+//
+// This file incorporates work covered by the following license notice:
+//
+//   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 .
+//
+// This script asks for variables, which are necessary for building the
+// examples of the Office Development Kit. The script duplicates the template
+// script and inserts the variables into the copied script.
+// The Script was developed for the operating systems Microsoft Windows.
+var regKeyOfficeCurrentUser = "HKEY_CURRENT_USER\\Software\\LibreOffice\\UNO\\InstallPath\\";
+var regKeyOfficeLocaleMachine = "HKEY_LOCAL_MACHINE\\Software\\LibreOffice\\UNO\\InstallPath\\";
+var regKeyDotNetInstallRoot = "HKEY_LOCAL_MACHINE\\Software\\Microsoft\\.NETFramework\\InstallRoot";
+var regKeyDotNet1_1 = "HKLM\\Software\\Microsoft\\.NETFramework\\policy\\v1.1\\4322";
+var sDirDotNet1_1 = "v1.1.4322";
+var regKeyDotNet2_0 = "HKLM\\Software\\Microsoft\\.NETFramework\\Policy\\v2.0\\50727";
+var sDirDotNet2_0 = "v2.0.50727";
+
+var regKeyJDK = "HKLM\\Software\\JavaSoft\\Java Development Kit\\";
+//var regKeyVC70 = "HKLM\\SOFTWARE\\Microsoft\\VisualStudio\\7.0\\Setup\\VC\\ProductDir";
+//var regKeyVC71 = "HKLM\\SOFTWARE\\Microsoft\\VisualStudio\\7.1\\Setup\\VC\\ProductDir";
+var regKeyVC90 = "HKLM\\SOFTWARE\\Microsoft\\VisualStudio\\9.0\\Setup\\VC\\ProductDir";
+
+//var regKeyVCExpress80 = "HKLM\\SOFTWARE\\Microsoft\\VCExpress\\8.0\\Setup\\VC\\ProductDir";
+var regKeyVCExpress90 = "HKLM\\SOFTWARE\\Microsoft\\VCExpress\\9.0\\Setup\\VC\\ProductDir";
+
+var regKeyWindowsSDK = "HKLM\\SOFTWARE\\Microsoft\\Microsoft SDKs\\Windows\\CurrentInstallFolder";
+
+var WshShell = WScript.CreateObject("WScript.Shell");
+var WshSysEnv = WshShell.Environment("process");
+var aFileSystemObject =  new ActiveXObject("Scripting.FileSystemObject");
+var stdin = WScript.StdIn;
+var stdout = WScript.StdOut;
+
+stdout.WriteLine("\n" +
+" *** Configure your SDK environment ***\n\n" +
+" NOTE: This script is working only for Windows 2000, Windows XP or newer versions!\n");
+
+var oo_sdk_name=WshSysEnv("OO_SDK_NAME");
+var oo_sdk_home=getSdkHome();
+var oo_user_sdk_dir=WshSysEnv("APPDATA") + "\\" + oo_sdk_name;
+var oo_user_sdk_env_script=oo_user_sdk_dir + "\\setsdkenv_windows.bat";
+
+var office_home=getOfficeHome();
+var oo_sdk_ure_home=office_home + "\\URE";
+
+var oo_sdk_make_home=getMakeHome();
+var oo_sdk_zip_home=getZipHome();
+var oo_sdk_manifest_used="";
+var oo_sdk_windowssdk="";
+var oo_sdk_cpp_home=getCppHome();
+var oo_sdk_cli_home=getCliHome();
+var oo_sdk_java_home=getJavaHome();
+var oo_sdk_out=getOutputDir();
+var sdk_auto_deployment=getAutoDeployment();
+
+writeBatFile(oo_user_sdk_dir, oo_user_sdk_env_script);
+
+stdout.Write(
+	"\n ******************************************************************\n" +
+    " * ... \"" + oo_user_sdk_env_script + "\"\n" +
+    " * batch file has been prepared.\n" +
+    " * This batch file will be used in the future to prepare your\n" +
+	" * personal configured SDK environment.\n" +
+	" ******************************************************************\n\n");
+//    " * For each time you want to use this configured SDK environment,\n" +
+//    " * you have to run the \"setsdkenv_windows.bat\" file in a new shell!\n" +
+
+// done -------------------------------------------------------------------------
+
+
+function skipChoice(msg)
+{
+	stdout.Write("\n Do you want to skip the choice of " + msg + " (YES/NO) [YES]:");
+	var sChoice = stdin.ReadLine();
+    if (sChoice == "" || sChoice.toLowerCase() == "yes")
+	   return true;
+
+	return false;
+}
+
+function getSdkHome()
+{
+	var sSuggestedHome = WshSysEnv("OO_SDK_HOME");
+    if (sSuggestedHome.length == 0) {
+        var scriptname = WScript.ScriptFullName;
+        sSuggestedHome = scriptname.substr(0,scriptname.length-10);
+    }
+
+    while(true)
+    {
+        stdout.Write("\n Enter the Office Software Development Kit directory [" +
+                     sSuggestedHome + "]:");
+        var sHome = stdin.ReadLine();
+        if (sHome.length == 0)
+        {
+            //No user input, use default.
+            if ( ! aFileSystemObject.FolderExists(sSuggestedHome))
+            {
+                stdout.WriteLine("\n Error: Could not find directory \"" +
+                                 sSuggestedHome + "\". An SDK is required, please" +
+								 " specify the path to a valid installation.");
+                continue;
+            }
+            sHome = sSuggestedHome;
+        }
+        else
+        {
+            //validate the user input
+            if ( ! aFileSystemObject.FolderExists(sHome))
+            {
+                stdout.WriteLine("\n Error: The directory \"" + sHome +
+                                 "\" does not exist. Please enter the path to a" +
+								 "valid SDK installation.");
+                continue;
+            }
+        }
+        //Check if this is an sdk folder by looking for the idl sub - dir
+        var idlDir = sHome + "\\idl";
+        if (! aFileSystemObject.FolderExists(idlDir))
+        {
+            stdout.WriteLine("\n Error: Could not find directory \"" +
+                             idlDir + "\". An SDK is required, please specify " +
+                             "the path to a valid SDK installation.");
+            continue;
+        }
+
+        return sHome;
+    }
+}
+
+function getOfficeHome()
+{
+    var sSuggestedHome = WshSysEnv("OFFICE_HOME");
+    if (sSuggestedHome.length == 0)
+    {
+        try {
+            sSuggestedHome = WshShell.RegRead(regKeyOfficeCurrentUser);
+			//The registry entry points to the program folder but we need the
+			//installation folder
+        } catch(exc) {}
+        if (sSuggestedHome.length == 0)
+        {
+            try {
+                sSuggestedHome = WshShell.RegRead(regKeyOfficeLocaleMachine);
+                //The registry entry points to the program folder but we need
+				//the installation folder
+            } catch (exc) {}
+        }
+
+		var index=0;
+        if ((index = sSuggestedHome.lastIndexOf("\\")) != -1)
+		   sSuggestedHome = sSuggestedHome.substr(0, index);
+
+        if (sSuggestedHome.length == 0)
+		   sSuggestedHome = searchOffice();
+    }
+
+    while(true)
+    {
+        stdout.Write("\n Enter the Office base installation directory [" +
+                     sSuggestedHome + "]:");
+        var sHome = stdin.ReadLine();
+        if (sHome.length == 0)
+        {
+            //No user input, use default.
+            if ( ! aFileSystemObject.FolderExists(sSuggestedHome))
+            {
+                stdout.WriteLine("\n Error: Could not find directory \"" +
+                                 sSuggestedHome + "\" An office installation is " +
+								 "required, please specify the path to a valid " +
+								 "office installation.");
+                sSuggestedHome = "";
+                continue;
+            }
+            sHome = sSuggestedHome;
+        } else
+        {
+            //validate the user input
+            if ( ! aFileSystemObject.FolderExists(sHome))
+            {
+                stdout.WriteLine("\n Error: The directory \"" + sHome +
+                                 "\" does not exist. Please specify the path to " +
+								 "a valid office installation.");
+                continue;
+            }
+        }
+        //Check if this is a valid office installtion folder by looking for the
+		//program sub-directory
+        var progDir = sHome + "\\program";
+        if (! aFileSystemObject.FolderExists(progDir))
+        {
+            stdout.WriteLine("\n Error: Could not find directory \"" +
+                             progDir + "\". An office installation is required, " +
+							 "please specify the path to a valid office " +
+							 "installation.");
+            continue;
+        }
+        return sHome;
+    }
+}
+
+function searchOffice()
+{
+	var tmp = oo_sdk_home;
+
+	if (aFileSystemObject.FileExists(tmp + "\\program\\soffice.exe")) {
+	   return tmp;
+	}
+
+	return "";
+}
+
+function getMakeHome()
+{
+    var sSuggestedHome = WshSysEnv("OO_SDK_MAKE_HOME");
+
+    while(true)
+    {
+        stdout.Write("\n Enter GNU make (3.79.1 or higher) tools directory [" +
+                     sSuggestedHome + "]:");
+        var sHome = stdin.ReadLine();
+        if (sHome.length == 0)
+        {
+            //No user input, use default.
+            if ( ! aFileSystemObject.FolderExists(sSuggestedHome))
+            {
+                stdout.WriteLine("\n Error: Could not find directory \"" +
+								 sSuggestedHome + "\". GNU make is required, " +
+								 "please specify a GNU make tools directory.");
+                sSuggestedHome = "";
+                continue;
+            }
+            sHome = sSuggestedHome;
+        } else
+        {
+            //validate the user input
+            if ( ! aFileSystemObject.FolderExists(sHome))
+            {
+                stdout.WriteLine("\n Error: The directory \"" + sHome +
+                                 "\" does not exist. GNU make is required, " +
+								 "please specify a GNU make tools directory.");
+                continue;
+            }
+        }
+        //Check for the make executable
+        var sMakePath = sHome + "\\make.exe";
+        if (! aFileSystemObject.FileExists(sMakePath))
+	{
+		sMakePath = sHome + "\\mingw32-make.exe";
+	}
+        if (! aFileSystemObject.FileExists(sMakePath))
+        {
+            stdout.WriteLine("\n Error: Could not find \"" + sMakePath +
+							 "\". GNU make is required, please specify a GNU " +
+							 "make tools directory.");
+            continue;
+        }
+        return sHome;
+    }
+}
+
+function getZipHome()
+{
+    var sSuggestedHome = WshSysEnv("OO_SDK_ZIP_HOME");
+
+    while(true)
+    {
+        stdout.Write("\n Enter a zip (2.3 or higher) tools directory [" +
+                     sSuggestedHome + "]:");
+        var sHome = stdin.ReadLine();
+        if (sHome.length == 0)
+        {
+            //No user input, use default.
+            if ( ! aFileSystemObject.FolderExists(sSuggestedHome))
+            {
+                stdout.WriteLine("\n Error: Could not find directory \"" +
+								 sSuggestedHome + "\". zip is required, please " +
+								 "specify a zip tools directory.");
+                sSuggestedHome = "";
+                continue;
+            }
+            sHome = sSuggestedHome;
+        }
+        else
+        {
+            //validate the user input
+            if ( ! aFileSystemObject.FolderExists(sHome))
+            {
+                stdout.WriteLine("\n Error: The directory \"" + sHome +
+                                 "\" does not exist. zip is required, please " +
+								 "specify a zip tools directory.");
+                continue;
+            }
+        }
+        //Check for the make executable
+        var sZipPath = sHome + "\\zip.exe";
+        if (! aFileSystemObject.FileExists(sZipPath))
+        {
+            stdout.WriteLine("\n Error: Could not find \"" + sZipPath +
+                             "\". zip is required, please specify a zip tools " +
+							 "directory.");
+            continue;
+        }
+        return sHome;
+    }
+}
+
+function getCppHome()
+{
+    var sSuggestedHome = WshSysEnv("OO_SDK_CPP_HOME");
+    if (sSuggestedHome.length == 0)
+    {
+        var sVC="";
+        try {
+            sVC = WshShell.RegRead(regKeyVCExpress90);
+        }catch (exc) {}
+        if (sVC.length == 0)
+        {
+	        try {
+				sVC = WshShell.RegRead(regKeyVC90);
+			}catch (exc) {}
+		}
+		// check Windows SDK if VC 9
+        if (sVC.length > 0)
+        {
+		    oo_sdk_manifest_used="true";
+			try {
+				oo_sdk_windowssdk = WshShell.RegRead(regKeyWindowsSDK);
+			}catch (exc) {}
+		}
+        if (sVC.length == 0)
+        {
+	        try {
+				sVC = WshShell.RegRead(regKeyVCExpress80);
+			}catch (exc) {}
+	        if (sVC.length > 0)
+			   oo_sdk_manifest_used="true";
+		}
+        if (sVC.length == 0)
+        {
+	        try {
+				sVC = WshShell.RegRead(regKeyVC80);
+			}catch (exc) {}
+	        if (sVC.length > 0)
+			   oo_sdk_manifest_used="true";
+		}
+        if (sVC.length == 0)
+        {
+	        try {
+				sVC = WshShell.RegRead(regKeyVC71);
+			}catch (exc) {}
+		}
+        if (sVC.length > 0)
+        {
+            sVC += "bin";
+            if (aFileSystemObject.FileExists(sVC + "\\cl.exe"))
+                sSuggestedHome = sVC;
+        }
+    }
+
+    var bSkip = false;
+    while(true)
+    {
+        stdout.Write("\n Enter the directory of the C++ compiler (optional) [" +
+                     sSuggestedHome + "]:");
+        var sHome = stdin.ReadLine();
+        if (sHome.length == 0)
+        {
+            //No user input, check OO_SDK_CPP_HOME or suggested value
+	    if ( sSuggestedHome.length == 0 ) {
+		bSkip = true;
+	    } else {
+	        if ( !aFileSystemObject.FolderExists(sSuggestedHome) )
+		{
+		    stdout.WriteLine("\n Error: Could not find directory \"" +
+				     sSuggestedHome + "\".");
+		    sSuggestedHome = "";
+		    bSkip = true;
+		}
+	    }
+
+            sHome = sSuggestedHome;
+        } else
+        {
+            //validate the user input
+            if ( ! aFileSystemObject.FolderExists(sHome))
+            {
+                stdout.WriteLine("\n Error: Could not find directory \"" +
+                                 sHome + "\".");
+                bSkip = true;
+            }
+        }
+
+		if ( !bSkip) {
+		    //Check if the C++ compiler exist
+		    var cl = sHome + "\\cl.exe";
+		    var mt = sHome + "\\mt.exe";
+
+			if (! aFileSystemObject.FileExists(cl))
+			{
+				stdout.WriteLine("\n Error: Could not find the C++ compiler \""
+								 + cl + "\".");
+				sHome = "";
+				bSkip = true;
+			} else {
+			    if (aFileSystemObject.FileExists(mt)) {
+				    oo_sdk_vc8_used="true";
+				}
+			}
+		}
+
+		if ( bSkip ) {
+		   if ( skipChoice("the C++ compiler") ) {
+			   return "";
+		   } else {
+			   bSkip = false;
+			   continue;
+		   }
+		}
+
+        return sHome;
+    }
+}
+
+function getCliHome()
+{
+    var sSuggestedHome = WshSysEnv("OO_SDK_CLI_HOME");
+
+    if (sSuggestedHome.length == 0)
+    {
+        try {
+            var _ver = WshShell.RegRead(regKeyDotNet2_0);
+            if (_ver.length > 0)
+            {
+                sSuggestedHome = WshShell.RegRead(regKeyDotNetInstallRoot);
+                sSuggestedHome += sDirDotNet2_0;
+                if ( ! aFileSystemObject.FolderExists(sSuggestedHome))
+                    sSuggestedHome = "";
+            }
+
+			if (sSuggestedHome.length == 0)
+			{
+				_ver = WshShell.RegRead(regKeyDotNet1_1);
+				if (_ver.length > 0)
+				{
+					sSuggestedHome = WshShell.RegRead(regKeyDotNetInstallRoot);
+					sSuggestedHome += sDirDotNet1_1;
+					if ( ! aFileSystemObject.FolderExists(sSuggestedHome))
+					   sSuggestedHome = "";
+				}
+			}
+		} catch (exc) {}
+    }
+
+    var bSkip = false;
+    while(true)
+    {
+        stdout.Write("\n Enter the directory of the C# and VB.NET compilers (optional) [" + sSuggestedHome + "]:");
+        var sHome = stdin.ReadLine();
+        if (sHome.length == 0)
+        {
+            //No user input, check OO_SDK_CLI_HOME or suggested value
+			if ( sSuggestedHome.length == 0 ) {
+			    bSkip = true;
+			} else {
+			    if ( !aFileSystemObject.FolderExists(sSuggestedHome) )
+				{
+					stdout.WriteLine("\n Error: Could not find directory \"" +
+									 sSuggestedHome + "\".");
+					sSuggestedHome = "";
+					bSkip = true;
+				}
+			}
+
+		    sHome = sSuggestedHome;
+        }
+        else
+        {
+            //validate the user input
+            if ( ! aFileSystemObject.FolderExists(sHome))
+            {
+                stdout.WriteLine("\n Error: The directory \"" + sHome +
+                                 "\" does not exist.");
+                bSkip = true;
+            }
+        }
+
+		if ( !bSkip ) {
+		    //Check if the C# and VB.NET compiler exist
+		    var csc = sHome + "\\csc.exe";
+		    var vbc = sHome + "\\vbc.exe";
+
+			if (! aFileSystemObject.FileExists(csc))
+			{
+				stdout.WriteLine("\n Error: Could not find the C# compiler \"" +
+								 csc + "\".");
+				bSkip = true;
+			}
+			if (! aFileSystemObject.FileExists(vbc))
+			{
+				stdout.WriteLine("\n Error: Could not find the VB.NET compiler \"" +
+								 vbc + "\".");
+				bSkip = true;
+			}
+		}
+
+		if ( bSkip ) {
+		   if ( skipChoice("the C# and VB.NET compilers") ) {
+			   return "";
+		   } else {
+			   bSkip = false;
+			   continue;
+		   }
+		}
+
+        return sHome;
+    }
+}
+
+function getJavaHome()
+{
+    var sSuggestedHome = WshSysEnv("OO_SDK_JAVA_HOME");
+    if (sSuggestedHome.length == 0)
+    {
+        try {
+            var currentVersion = WshShell.RegRead(regKeyJDK + "CurrentVersion");
+            if (currentVersion.length > 0)
+            {
+                sSuggestedHome = WshShell.RegRead(regKeyJDK + currentVersion +
+												  "\\JavaHome");
+                if ( ! aFileSystemObject.FolderExists(sSuggestedHome) )
+                    sSuggestedHome = "";
+            }
+        } catch (exc) {}
+    }
+
+    var bSkip = false;
+    while(true)
+    {
+        stdout.Write("\n Enter JAVA SDK (1.4.1_01 or higher) installation directory (optional) [" + sSuggestedHome + "]:");
+        var sHome = stdin.ReadLine();
+        if (sHome.length == 0)
+        {
+            //No user input, check OO_SDK_JAVA_HOME or suggested value
+			if ( sSuggestedHome.length == 0 ) {
+			    bSkip = true;
+			} else {
+			    if ( !aFileSystemObject.FolderExists(sSuggestedHome) )
+				{
+					stdout.WriteLine("\n Error: Could not find directory \"" +
+									 sSuggestedHome + "\".");
+					sSuggestedHome = "";
+					bSkip=true;
+				}
+			}
+
+			sHome = sSuggestedHome;
+        } else
+        {
+            //validate the user input
+            if ( ! aFileSystemObject.FolderExists(sHome))
+            {
+                stdout.WriteLine("\n Error: The directory \"" + sHome +
+                                 "\" does not exist.");
+				bSkip = true;
+            }
+        }
+
+		if ( !bSkip) {
+		    //Check if this is an sdk folder by looking for the javac compiler
+			var javacompiler = sHome + "\\bin\\javac.exe";
+			if (! aFileSystemObject.FileExists(javacompiler))
+			{
+				stdout.WriteLine("\n Error: Could not find \"" +
+								 javacompiler + "\".");
+				bSkip = true;
+			}
+        }
+
+		if ( bSkip ) {
+		   if ( skipChoice("the Java SDK") ) {
+			   return "";
+		   } else {
+			   bSkip = false;
+			   continue;
+		   }
+		}
+
+        return sHome;
+    }
+}
+
+function getOutputDir()
+{
+	var defaultdir = "c:\\" + oo_sdk_name;
+    var sSuggestedDir = WshSysEnv("OO_SDK_OUT");
+	if (sSuggestedDir.length == 0)
+	   sSuggestedDir = defaultdir;
+
+    var bSkip = false;
+    while(true)
+    {
+        stdout.Write(
+			"\n Default output directory is the \"c:\\" + oo_sdk_name + "\".\n" +
+            " Enter an existent directory if you prefer a different one. But note" +
+			" that only\n a path without spaces is allowed because of a" +
+			" limitation of gnu make. (optional) [" + sSuggestedDir + "]:");
+        var sDir = stdin.ReadLine();
+        if (sDir.length == 0)
+        {
+            //No user input, check OO_SDK_OUT or suggested value
+			if ( sSuggestedDir.length == 0 ) {
+			    bSkip = true;
+			} else {
+				if (sSuggestedDir == oo_user_sdk_dir || sSuggestedDir == defaultdir) {
+				    var fso = new ActiveXObject("Scripting.FileSystemObject");
+					if ( !fso.FolderExists(sSuggestedDir) )
+						fso.CreateFolder(sSuggestedDir);
+				}
+			    if ( !aFileSystemObject.FolderExists(sSuggestedDir) )
+				{
+					stdout.WriteLine("\n Error: Could not find directory \"" +
+									 sSuggestedDir + "\".");
+					sSuggestedDir = "";
+					bSkip = true;
+				}
+			}
+
+            sDir = sSuggestedDir;
+        }
+        else
+        {
+			if (sDir.indexOf(' ') != -1) {
+				stdout.WriteLine("\n Error: your specified output directory " +
+								 "\"" + sDir + "\" " +
+								 "contains one or more spaces.\n        That " +
+								 "causes problems with gnu make. Please specifiy" +
+								 " a directory without spaces.");
+				bSkip = true;
+			}
+            //validate the user input
+            if ( ! aFileSystemObject.FolderExists(sDir))
+            {
+                stdout.WriteLine("\n Error: Could not find directory \"" +
+                                 sDir + "\".");
+                bSkip = true;
+            }
+        }
+
+		if ( bSkip ) {
+		   if ( skipChoice("a special output directory") ) {
+			   return "";
+		   } else {
+			   bSkip = false;
+			   continue;
+		   }
+		}
+
+        return sDir;
+    }
+}
+
+function getAutoDeployment()
+{
+    var sSuggestedAuto = WshSysEnv("SDK_AUTO_DEPLOYMENT");
+    if (sSuggestedAuto.length == 0)
+        sSuggestedAuto = "YES";
+
+    while(true)
+    {
+        stdout.Write("\n Automatic deployment of UNO components (YES/NO) ["+
+                     sSuggestedAuto + "]:");
+        var sAuto = stdin.ReadLine();
+        if (sAuto.length == 0)
+            sAuto = sSuggestedAuto;
+        else
+        {
+            sAutoU = sAuto.toUpperCase();
+            if (sAutoU != "YES" && sAutoU != "NO")
+            {
+                stdout.WriteLine("\n Error: The value \"" + sAuto + "\" is " +
+								 "invalid. Please answer YES or NO.")
+                    continue;
+            }
+            sAuto = sAutoU;
+        }
+        return sAuto;
+    }
+}
+
+//The function uses sp2bv.exe to obtain a file URL from a
+//system path. The URL is already escaped for use as bootstrap variable.
+//($ -> \$). Then the resulting string is escaped for use in a bat file.
+//That is % signs are made to double % (% -> %%);
+function makeBootstrapFileUrl(systemPath)
+{
+    var oExec = WshShell.Exec("sp2bv.exe \"" + systemPath + "\"");
+    var output="";
+    while (true)
+    {
+        if (!oExec.StdOut.AtEndOfStream)
+        {
+            var next = oExec.StdOut.Read(1);
+            if (next == '%')
+                output += "%%";
+            else
+                output += next;
+        }
+        else
+            break;
+    }
+    return output;
+}
+
+function writeBatFile(fdir, file)
+{
+    var fso = new ActiveXObject("Scripting.FileSystemObject");
+    if ( !fso.FolderExists(fdir) )
+       fso.CreateFolder(fdir);
+    var newFile = fso.CreateTextFile(file, true);
+
+    newFile.Write(
+        "@echo off\n" +
+        "REM This script sets all enviroment variables, which\n" +
+        "REM are necessary for building the examples of the Office Development Kit.\n" +
+        "REM The Script was developed for the operating systems Windows.\n" +
+        "REM The SDK name\n" +
+        "REM Example: set OO_SDK_NAME=libreoffice3.4_sdk\n" +
+        "set OO_SDK_NAME=" + oo_sdk_name  +
+        "\n\n" +
+        "REM Installation directory of the Software Development Kit.\n" +
+        "REM Example: set OO_SDK_HOME=C:\\Program Files\\LibreOffice 3\\sdk\n" +
+        "set OO_SDK_HOME=" + oo_sdk_home  +
+        "\n\n" +
+        "REM Office installation directory.\n" +
+        "REM Example: set OFFICE_HOME=C:\\Program Files\\LibreOffice 3\n" +
+        "set OFFICE_HOME=" + office_home +
+        "\n\n" +
+        "REM URE installation directory.\n" +
+        "REM Example: set OO_SDK_URE_HOME=C:\\Program Files\\LibreOffice 3\\URE\n" +
+        "set OO_SDK_URE_HOME=" + oo_sdk_ure_home +
+        "\n\n" +
+        "REM Directory of the make command.\n" +
+        "REM Example: set OO_SDK_MAKE_HOME=D:\\NextGenerationMake\\make\n" +
+        "set OO_SDK_MAKE_HOME=" + oo_sdk_make_home +
+        "\n\n" +
+		"REM Directory of the zip tool.\n" +
+		"REM Example: set OO_SDK_ZIP_HOME=D:\\infozip\\bin\n" +
+		"set OO_SDK_ZIP_HOME=" + oo_sdk_zip_home +
+        "\n\n" +
+        "REM Directory of the C++ compiler.\n" +
+        "REM Example:set OO_SDK_CPP_HOME=C:\\Program Files\\Microsoft Visual Studio 9.0\\VC\\bin\n" +
+        "set OO_SDK_CPP_HOME=" + oo_sdk_cpp_home +
+		"\nset CPP_MANIFEST=" + oo_sdk_manifest_used +
+		"\nset CPP_WINDOWS_SDK=" + oo_sdk_windowssdk +
+        "\n\n" +
+        "REM Directory of the C# and VB.NET compilers.\n" +
+        "REM Example:set OO_SDK_CLI_HOME=C:\\WINXP\\Microsoft.NET\\Framework\\v1.0.3705\n" +
+        "set OO_SDK_CLI_HOME=" + oo_sdk_cli_home +
+        "\n\n" +
+        "REM Java SDK installation directory.\n" +
+        "REM Example: set OO_SDK_JAVA_HOME=C:\\Program Files\\Java\\jdk1.6.0_05\n" +
+        "set OO_SDK_JAVA_HOME=" + oo_sdk_java_home +
+        "\n\n" +
+        "REM Special output directory\n" +
+        "REM Example: set OO_SDK_OUT=C:\\" + oo_sdk_name + "\n" +
+        "set OO_SDK_OUT=" + oo_sdk_out +
+        "\n\n" +
+        "REM Automatic deployment\n" +
+        "REM Example: set SDK_AUTO_DEPLOYMENT=YES\n" +
+        "set SDK_AUTO_DEPLOYMENT=" + sdk_auto_deployment +
+        "\n\n" +
+        "REM Check installation path for the Office Development Kit.\n" +
+        "if not defined OO_SDK_HOME (\n" +
+        "   echo Error: the variable OO_SDK_HOME is missing!\n" +
+        "   goto :error\n" +
+        " )\n" +
+        "\n" +
+        "REM Check installation path for the office.\n" +
+        "REM if not defined OFFICE_HOME (\n" +
+        "REM if not defined OO_SDK_URE_HOME (\n" +
+        "REM    echo Error: either of the variables OFFICE_HOME and\n" +
+        "REM    echo OO_SDK_URE_HOME is missing!\n" +
+        "REM    goto :error\n" +
+        "REM  )\n" +
+        "REM  )\n" +
+        "\n" +
+        "REM Check installation path for GNU make.\n" +
+        "if not defined OO_SDK_MAKE_HOME (\n" +
+        "   echo Error: the variable OO_SDK_MAKE_HOME is missing!\n" +
+        "   goto :error\n" +
+        " )\n" +
+        "\n" +
+        "REM Check installation path for the zip tool.\n" +
+        "if not defined OO_SDK_ZIP_HOME (\n" +
+        "   echo Error: the variable OO_SDK_ZIP_HOME is missing!\n" +
+        "   goto :error\n" +
+        " )\n" +
+        "\n" +
+        "REM Set library path. \n" +
+        "set LIB=%OO_SDK_HOME%\\lib;%LIB%\n" +
+        "if defined CPP_WINDOWS_SDK (\n" +
+        "   set LIB=%LIB%;%CPP_WINDOWS_SDK%\\lib\n" +
+        " )\n" +
+        "\n" +
+        "REM Set office program path.\n" +
+        "if defined OFFICE_HOME (\n" +
+        "   set OFFICE_PROGRAM_PATH=%OFFICE_HOME%\\program\n" +
+        " )\n" +
+        "\n" +
+		"REM Set UNO path, necessary to ensure that the cpp examples using the\n" +
+		"REM new UNO bootstrap mechanism use the configured office installation\n" +
+		"REM (only set when using an Office).\n" +
+		"if defined OFFICE_HOME (\n" +
+		"   set UNO_PATH=%OFFICE_PROGRAM_PATH%\n" +
+		" )\n" +
+        "\n" +
+        "REM if defined OO_SDK_URE_HOME (\n" +
+        "set OO_SDK_URE_BIN_DIR=%OO_SDK_URE_HOME%\\bin\n" +
+        "set OO_SDK_URE_LIB_DIR=%OO_SDK_URE_HOME%\\bin\n" +
+        "set OO_SDK_URE_JAVA_DIR=%OO_SDK_URE_HOME%\\java\n" +
+        "REM ) else (\n" +
+        "set OO_SDK_OFFICE_BIN_DIR=%OFFICE_PROGRAM_PATH%\n" +
+        "set OO_SDK_OFFICE_LIB_DIR=%OFFICE_PROGRAM_PATH%\n" +
+        "set OO_SDK_OFFICE_JAVA_DIR=%OFFICE_PROGRAM_PATH%\\classes\n" +
+        "REM )\n" +
+        "\n" +
+        "REM Set classpath\n" +
+        "set CLASSPATH=%OO_SDK_URE_JAVA_DIR%\\juh.jar;%OO_SDK_URE_JAVA_DIR%\\jurt.jar;%OO_SDK_URE_JAVA_DIR%\\ridl.jar;%OO_SDK_URE_JAVA_DIR%\\unoloader.jar;%OO_SDK_OFFICE_JAVA_DIR%\\unoil.jar\n" +
+        "REM if defined OFFICE_HOME (\n" +
+        "REM     set CLASSPATH=%CLASSPATH%;%OO_SDK_OFFICE_JAVA_DIR%\\unoil.jar\n" +
+        "REM  )\n" +
+        "\n" +
+        "REM Add directory of the SDK tools to the path.\n" +
+        "set PATH=%OO_SDK_HOME%\\bin;%OO_SDK_URE_BIN_DIR%;%OO_SDK_OFFICE_BIN_DIR%;%OO_SDK_HOME%\\WINexample.out\\bin;%PATH%\n" +
+        "\n" +
+        "REM Set PATH appropriate to the output directory\n" +
+        "if defined OO_SDK_OUT (\n" +
+        "   set PATH=%OO_SDK_OUT%\\WINexample.out\\bin;%PATH%\n" +
+        " ) else (\n" +
+        "   set PATH=%OO_SDK_HOME%\\WINexample.out\\bin;%PATH%\n" +
+        " )\n" +
+        "\n" +
+        "REM Add directory of the command make to the path, if necessary.\n" +
+        "if defined OO_SDK_MAKE_HOME set PATH=%OO_SDK_MAKE_HOME%;%PATH%\n" +
+        "\n" +
+	"REM Add directory of the zip tool to the path, if necessary.\n" +
+	"if defined OO_SDK_ZIP_HOME set PATH=%OO_SDK_ZIP_HOME%;%PATH%\n" +
+        "\n" +
+        "REM Add directory of the C++ compiler to the path, if necessary.\n" +
+        "if defined OO_SDK_CPP_HOME set PATH=%OO_SDK_CPP_HOME%;%PATH%\n" +
+        "\n" +
+        "REM Add directory of the Win SDK to the path, if necessary.\n" +
+        "if defined CPP_WINDOWS_SDK (\n" +
+		"   set PATH=%CPP_WINDOWS_SDK%\\bin;%PATH%\n" +
+		"   set INCLUDE=%CPP_WINDOWS_SDK%\\Include;%INCLUDE%\n" +
+        ")\n" +
+        "REM Add directory of the C# and VB.NET compilers to the path, if necessary.\n" +
+        "if defined OO_SDK_CLI_HOME set PATH=%OO_SDK_CLI_HOME%;%PATH%\n" +
+        "\n" +
+        "REM Add directory of the Java tools to the path, if necessary.\n" +
+        "if defined OO_SDK_JAVA_HOME set PATH=%OO_SDK_JAVA_HOME%\\bin;%OO_SDK_JAVA_HOME%\\jre\\bin;%PATH%\n" +
+        "\n" +
+        "REM Set environment for C++ compiler tools, if necessary.\n" +
+        "if defined OO_SDK_CPP_HOME call \"%OO_SDK_CPP_HOME%\\VCVARS32.bat\"\n" +
+        "\n" +
+        "REM Set tilte to identify the prepared shell.\n" +
+        "title Shell prepared for SDK\n" +
+        "\nREM Prepare shell with all necessary environment variables.\n" +
+        "echo.\n" +
+        "echo  ******************************************************************\n" +
+        "echo  *\n" +
+        "echo  * SDK environment is prepared for Windows\n" +
+        "echo  *\n" +
+        "echo  * SDK = %OO_SDK_HOME%\n" +
+        "echo  * Office = %OFFICE_HOME%\n" +
+        "echo  * URE = %OO_SDK_URE_HOME%\n" +
+        "echo  * Make = %OO_SDK_MAKE_HOME%\n" +
+        "echo  * Zip = %OO_SDK_ZIP_HOME%\n" +
+        "echo  * C++ Compiler = %OO_SDK_CPP_HOME%\n" +
+        "echo  * C# and VB.NET compilers = %OO_SDK_CLI_HOME%\n" +
+        "echo  * Java = %OO_SDK_JAVA_HOME%\n" +
+        "echo  * Special Output directory = %OO_SDK_OUT%\n" +
+        "echo  * Auto deployment = %SDK_AUTO_DEPLOYMENT%\n" +
+        "echo  *\n" +
+        "echo  ******************************************************************\n" +
+        "echo.\n" +
+        "goto end\n" +
+        "\n" +
+        " :error\n" +
+        "Error: Please insert the necessary environment variables into the batch file.\n" +
+        "\n" +
+        " :end\n"
+        );
+        newFile.Close();
+}
diff --git a/odk/config/configure.pl b/odk/config/configure.pl
new file mode 100644
index 0000000..8cd2a54
--- /dev/null
+++ b/odk/config/configure.pl
@@ -0,0 +1,810 @@
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+# This file incorporates work covered by the following license notice:
+#
+#   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 .
+#
+# configure.pl - a perl script to set a minimal environment for the SDK.
+#
+# Copyright 2000, 2010 Oracle and/or its affiliates.
+#
+
+use IO::File;
+use File::Basename;
+
+$main::hostname= $ARGV[0];
+$main::sdkpath= $ARGV[1];
+$main::OO_SDK_NAME= $ARGV[2];
+
+$main::OO_MAJORVERSION=$main::OO_SDK_NAME;
+$main::OO_MINORVERSION=$main::OO_SDK_NAME;
+$main::OO_MAJORVERSION =~ s#[^\d]+(\d).(\d).+#$1#go;
+$main::OO_MINORVERSION =~ s#[^\d]+(\d).(\d).+#$2#go;
+
+$main::OO_SDK_CONFIG_HOME= "$ENV{HOME}/$main::OO_SDK_NAME";
+
+$main::operatingSystem = `$main::sdkpath/config.guess | cut -d"-" -f3,4`;
+chomp ($main::operatingSystem);
+
+$main::OO_SDK_HOME = $main::sdkpath;
+#$main::OO_SDK_HOME = "";
+$main::OO_SDK_HOME_SUGGESTION = $main::sdkpath;
+
+$main::OFFICE_OR_URE = "Office";
+$main::OFFICE_OR_URE_SUGGESTION = "Office";
+
+$main::OFFICE_HOME = "";
+
+$main::OO_SDK_URE_HOME = `cd $main::sdkpath/../ure-link && pwd`;
+chomp($main::OO_SDK_URE_HOME);
+
+$main::OO_SDK_MAKE_HOME = "";
+$main::makeName = "make";
+if ( $main::operatingSystem =~ m/solaris/ ||
+     $main::operatingSystem =~ m/freebsd/ )
+{
+    $main::makeName = "gmake";
+}

... etc. - the rest is truncated


More information about the Libreoffice-commits mailing list