From 613221bde1744265c336c2b5f2ade0bfb9b22d16 Mon Sep 17 00:00:00 2001 From: Peter Foley Date: Thu, 21 Feb 2013 00:56:13 -0600 Subject: convert odk to gbuild and add to tail_build Change-Id: I8e8de7f2bb87cce7916c7c2df24c1b0ddaea55c0 Reviewed-on: https://gerrit.libreoffice.org/2288 Reviewed-by: Peter Foley Tested-by: Peter Foley --- 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/deltree.txt | 0 odk/pack/unzip_udk/makefile.mk | 37 - odk/prj/build.lst | 15 +- odk/prj/d.lst | 5 - odk/prj/dmake | 0 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 +- 63 files changed, 3524 insertions(+), 4007 deletions(-) create mode 100644 odk/CustomTarget_autodoc.mk create mode 100644 odk/CustomTarget_bin.mk create mode 100644 odk/CustomTarget_check.mk create mode 100644 odk/CustomTarget_classes.mk create mode 100644 odk/CustomTarget_cli.mk create mode 100644 odk/CustomTarget_doxygen.mk create mode 100644 odk/CustomTarget_idl.mk create mode 100644 odk/CustomTarget_include.mk create mode 100644 odk/CustomTarget_javadoc.mk create mode 100644 odk/CustomTarget_lib.mk create mode 100644 odk/CustomTarget_odkcommon.mk create mode 100644 odk/CustomTarget_settings.mk create mode 100644 odk/CustomTarget_unowinreg.mk create mode 100644 odk/Executable_unoapploader.mk create mode 100644 odk/Library_unowinreg.mk create mode 100644 odk/Makefile create mode 100644 odk/Module_odk.mk create mode 100644 odk/Zip_odkcommon.mk create mode 100644 odk/Zip_odkexamples.mk create mode 100644 odk/Zip_uno_loader_classes.mk delete mode 100644 odk/cfgWin.js create mode 100644 odk/config/cfgWin.js create mode 100644 odk/config/configure.pl create mode 100755 odk/config/setsdkenv_unix create mode 100644 odk/config/setsdkenv_unix.csh.in create mode 100644 odk/config/setsdkenv_unix.sh.in create mode 100755 odk/config/setsdkenv_windows.bat create mode 100755 odk/config/setsdkenv_windows.template create mode 100755 odk/config/setsdkname.bat delete mode 100644 odk/configure.pl delete mode 100644 odk/inc/makefile.mk delete mode 100644 odk/pack/checkbin/makefile.mk delete mode 100644 odk/pack/checkidl/makefile.mk delete mode 100644 odk/pack/checkinc/makefile.mk delete mode 100644 odk/pack/checkinc2/makefile.mk delete mode 100644 odk/pack/copying/makefile.mk delete mode 100644 odk/pack/gendocu/makefile.mk delete mode 100644 odk/pack/unzip_udk/deltree.txt delete mode 100644 odk/pack/unzip_udk/makefile.mk delete mode 100644 odk/prj/dmake delete mode 100755 odk/setsdkenv_unix delete mode 100644 odk/setsdkenv_unix.csh.in delete mode 100644 odk/setsdkenv_unix.sh.in delete mode 100755 odk/setsdkenv_windows.bat delete mode 100755 odk/setsdkenv_windows.template delete mode 100755 odk/setsdkname.bat delete mode 100644 odk/source/com/sun/star/lib/loader/makefile.mk delete mode 100644 odk/source/unoapploader/unx/makefile.mk delete mode 100644 odk/source/unoapploader/win/makefile.mk delete mode 100644 odk/source/unowinreg/win/makefile.mk create mode 100755 odk/source/unowinreg/win/unowinreg.def delete mode 100644 odk/source/unowinreg/win/unowinreg.dxp delete mode 100644 odk/util/delzip delete mode 100644 odk/util/makefile.mk delete mode 100644 odk/util/makefile.pmk delete mode 100644 odk/util/odk_rules.pmk diff --git a/Module_tail_build.mk b/Module_tail_build.mk index 3f9e2d134e99..8d249295c05f 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 cf5193cc72d7..c965b8d11c5a 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 48c0161c198d..f7a145bd2c10 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 000000000000..951183ac0666 --- /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 000000000000..0a548a29f084 --- /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 000000000000..a1d376b71533 --- /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 000000000000..1678247833a9 --- /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 000000000000..88f26251c332 --- /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 000000000000..d31ab03b79e8 --- /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 000000000000..ab56cf07c8f2 --- /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 000000000000..7f4ec62caf94 --- /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 000000000000..e6ff1cafcd73 --- /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 000000000000..98ab17794510 --- /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 000000000000..11a775ab9542 --- /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 000000000000..dfe44df8c260 --- /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 000000000000..ae9cad9e869c --- /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 000000000000..3128a3ba4ca6 --- /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 000000000000..d2a20f88a64f --- /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 000000000000..ccb1c85a04da --- /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 000000000000..d2409eca5938 --- /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 000000000000..e6f6808663e3 --- /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 000000000000..8a54683bedaf --- /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 000000000000..a5587fe5d740 --- /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 fa1c0814a240..000000000000 --- 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 000000000000..99dca7f3bc3a --- /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 000000000000..8cd2a54978dd --- /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"; +} +$main::OO_SDK_MAKE_HOME_SUGGESTION = searchprog($main::makeName); +$main::makeVersion = "3.79.1"; +$main::correctVersion = 0; + +$main::OO_SDK_ZIP_HOME = ""; +$main::OO_SDK_ZIP_HOME_SUGGESTION = searchprog("zip"); +$main::zipVersion = "2.3"; + +$main::OO_SDK_CPP_HOME = ""; +$main::cppName = "gcc"; +$main::cppVersion = "4.0.1"; +if ( $main::operatingSystem =~ m/solaris/ ) +{ + $main::cppName = "CC"; + $main::cppVersion = "5.2"; +} +$main::OO_SDK_CC_55_OR_HIGHER = ""; +$main::OO_SDK_CPP_HOME_SUGGESTION = searchprog($main::cppName); + +$main::OO_SDK_JAVA_HOME = ""; +$main::OO_SDK_JAVA_BIN_DIR = "bin"; +if ( $main::operatingSystem =~ m/darwin/ ) +{ + $main::OO_SDK_JAVA_BIN_DIR="Commands"; +} +$main::OO_SDK_JAVA_HOME_SUGGESTION = searchprog("javac"); +$main::javaVersion = "1.5.0_01"; + +$main::SDK_AUTO_DEPLOYMENT = ""; +$main::SDK_AUTO_DEPLOYMENT_SUGGESTION = "YES"; + +$main::OO_SDK_OUTPUT_DIR_SUGGESTION = "$ENV{HOME}"; +$main::OO_SDK_OUTPUT_DIR = ""; +$main::skipOutputDir = 0; + +$main::return = 0; + +if ( $main::OFFICE_OR_URE eq "Office" ) +{ + if ( $main::operatingSystem =~ m/darwin/ ) + { +# used for a SDK as part of the office installation +# $main::OFFICE_HOME = `cd $main::sdkpath/../../.. && pwd`; +# chomp($main::OFFICE_HOME); +# print " Used Office = $main::OFFICE_HOME\n"; + print " Used SDK = $main::OO_SDK_HOME\n\n"; + + $main::OFFICE_HOME_SUGGESTION = searchMacOffice(); + while ( (! -d "$main::OFFICE_HOME" ) || + ((-d "$main::OFFICE_HOME") && (! -d "$main::OFFICE_HOME/Contents/MacOS")) ) + { + print " Enter the Office installation directory [$main::OFFICE_HOME_SUGGESTION]: "; + $main::OFFICE_HOME = readStdIn(); + chop($main::OFFICE_HOME); + if ( $main::OFFICE_HOME eq "" ) + { + $main::OFFICE_HOME = $main::OFFICE_HOME_SUGGESTION; + } + + if ( ! -d "$main::OFFICE_HOME" ) + { + $main::OFFICE_HOME = ""; + print " Error: An office installation is required, please specify the path to a valid installation.\n"; + } + + # check more details + if ( -d "$main::OFFICE_HOME/Contents/ure-link" ) { + $main::OO_SDK_URE_HOME = "$main::OFFICE_HOME/Contents/ure-link"; + } else { + $main::OFFICE_HOME = ""; + $main::OO_SDK_URE_HOME = ""; + print " Error: no URE found in office installation, please specify the path to a valid installation.\n"; + } + } + } else + { + $main::OFFICE_HOME_SUGGESTION = searchoffice(); + + if ( $main::OFFICE_HOME_SUGGESTION eq "" ) { + # prepare Office path + $main::OFFICE_HOME_SUGGESTION = searchprog("soffice"); + } + + if ( ! $main::OFFICE_HOME_SUGGESTION eq "" ) + { + my $tmpOffice = readlink "$main::OFFICE_HOME_SUGGESTION/soffice"; + + if ( $tmpOffice eq "" ) + { + $tmpOffice = "$main::OFFICE_HOME_SUGGESTION/soffice"; + } + + my $offset = rindex($tmpOffice, "/program/soffice"); + if ( $offset != -1 ) + { + $main::OFFICE_HOME_SUGGESTION = substr($tmpOffice, 0, $offset); + } else + { + $offset = rindex($tmpOffice, "/soffice"); + if ( $offset != -1 ) + { + $main::OFFICE_HOME_SUGGESTION = substr($tmpOffice, 0, $offset); + } else + { + $main::OFFICE_HOME_SUGGESTION = ""; + } + } + } + + while ( (! -d "$main::OFFICE_HOME" ) || + ((-d "$main::OFFICE_HOME") && (! -d "$main::OFFICE_HOME/program")) ) + { + print " Enter the Office installation directory [$main::OFFICE_HOME_SUGGESTION]: "; + $main::OFFICE_HOME = readStdIn(); + chop($main::OFFICE_HOME); + if ( $main::OFFICE_HOME eq "" ) + { + $main::OFFICE_HOME = $main::OFFICE_HOME_SUGGESTION; + } + + if ( ! -d "$main::OFFICE_HOME" ) + { + $main::OFFICE_HOME = ""; + print " Error: An office installation is required, please specify the path to a valid installation.\n"; + } else + { + # special work for a network installation, no prgram directory but a link to the soffice binary + if ( (! -d "$main::OFFICE_HOME/program") && (-e "$main::OFFICE_HOME/soffice") ) + { + my $soserver = `ls -l $OFFICE_HOME_SUGGESTION/soffice | sed -n 's/.* -> //p'`; + $soserver= substr($soserver, 0, rindex($soserver, "program") - 1); + + if ( ! -d $soserver ) + { + $main::OFFICE_HOME = ""; + print " Error: An office installation is required, please specify the path to a valid installation.\n"; + } else + { + $main::OFFICE_HOME = $soserver; + } + } + } + } + } +} +else +{ + # prepare URE path + $main::OO_SDK_URE_HOME_SUGGESTION = "/opt/openoffice.org/ure"; + $main::OO_SDK_URE_HOME_SUGGESTION = "" unless + -e "$main::OO_SDK_URE_HOME_SUGGESTION/bin/uno"; + for (;;) + { + print " Enter the URE installation directory", + " [$main::OO_SDK_URE_HOME_SUGGESTION]: "; + $main::OO_SDK_URE_HOME = readStdIn(); + chop $main::OO_SDK_URE_HOME; + $main::OO_SDK_URE_HOME = $main::OO_SDK_URE_HOME_SUGGESTION if + $main::OO_SDK_URE_HOME eq "" && + $main::OO_SDK_URE_HOME_SUGGESTION ne ""; + last if -e "$main::OO_SDK_URE_HOME/bin/uno"; + print " Error: A valid URE installation is required.\n"; + } +} + +# prepare GNU make path +while ( (!$main::correctVersion) && + ((! -d "$main::OO_SDK_MAKE_HOME" ) || + ((-d "$main::OO_SDK_MAKE_HOME") && (! -e "$main::OO_SDK_MAKE_HOME/$main::makeName"))) ) +{ + print " Enter GNU make ($main::makeVersion or higher) tools directory [$main::OO_SDK_MAKE_HOME_SUGGESTION]: "; + $main::OO_SDK_MAKE_HOME = readStdIn(); + chop($main::OO_SDK_MAKE_HOME); + if ( $main::OO_SDK_MAKE_HOME eq "" ) + { + $main::OO_SDK_MAKE_HOME = $main::OO_SDK_MAKE_HOME_SUGGESTION; + } + if ( (! -d "$main::OO_SDK_MAKE_HOME") || + ((-d "$main::OO_SDK_MAKE_HOME") && (! -e "$main::OO_SDK_MAKE_HOME/$main::makeName")) ) + { + $main::OO_SDK_MAKE_HOME = ""; + print " Error: GNU make is required, please specify a GNU make tools directory.\n"; + } else + { + #check version + my $testVersion = `$OO_SDK_MAKE_HOME/$main::makeName --version`; + if ( $testVersion eq "") + { + print " Set the environment variable OO_SDK_MAKE_HOME to your GNU build tools directory.\n"; + print " GNU make version $main::makeVersion can be obtained at ftp://ftp.gnu.org/gnu/make/\n"; + } else + { + if ($testVersion =~ m#((\d+\.)+\d+)# ) + { + $testVersion = $1; + } + $main::correctVersion = testVersion($main::makeVersion, $testVersion, "$main::OO_SDK_MAKE_HOME/$main::makeName", 1); + if ( !$main::correctVersion ) + { + print " The '$main::makeName' command found at '$main::OO_SDK_MAKE_HOME' has a wrong version\n"; + $main::OO_SDK_MAKE_HOME = ""; + } + } + } +} + +# prepare zip path +$main::correctVersion = 0; +while ( (!$main::correctVersion) && + ((! -d "$main::OO_SDK_ZIP_HOME" ) || + ((-d "$main::OO_SDK_ZIP_HOME") && (! -e "$main::OO_SDK_ZIP_HOME/zip"))) ) +{ + print " Enter zip ($main::zipVersion or higher) tool directory [$main::OO_SDK_ZIP_HOME_SUGGESTION]: "; + $main::OO_SDK_ZIP_HOME = readStdIn(); + chop($main::OO_SDK_ZIP_HOME); + if ( $main::OO_SDK_ZIP_HOME eq "" ) + { + $main::OO_SDK_ZIP_HOME = $main::OO_SDK_ZIP_HOME_SUGGESTION; + } + if ( (! -d "$main::OO_SDK_ZIP_HOME") || + ((-d "$main::OO_SDK_ZIP_HOME") && (! -e "$main::OO_SDK_ZIP_HOME/zip")) ) + { + $main::OO_SDK_ZIP_HOME = ""; + print " Error: zip tool is required, please specify a zip tool directory.\n"; + } else + { + #check version + my $testVersion = `$OO_SDK_ZIP_HOME/zip -h 2>&1 | egrep Zip | head -n 1`; + $testVersion =~ s#Zip ([\d.]+) .*#$1#go; + if ( $testVersion eq "") + { + print " Set the environment variable OO_SDK_ZIP_HOME to your zip tool directory.\n"; + print " zip version $main::zipVersion can be obtained at ftp://www.info-zip.org/\n"; + } else + { + if ($testVersion =~ m#((\d+\.)+\d+)# ) + { + $testVersion = $1; + } + $main::correctVersion = testVersion($main::zipVersion, $testVersion, "$main::OO_SDK_MAKE_HOME/zip", 1); + if ( !$main::correctVersion ) + { + print " The 'zip' command found at '$main::OO_SDK_ZIP_HOME' has a wrong version\n"; + $main::OO_SDK_ZIP_HOME = ""; + } + } + } +} + +# prepare C++ compiler path +$main::correctVersion = 0; +while ( (!$main::correctVersion) && + ((! -d "$main::OO_SDK_CPP_HOME" ) || + ((-d "$main::OO_SDK_CPP_HOME") && (! -e "$main::OO_SDK_CPP_HOME/$main::cpp"))) ) +{ + print " C++ compilers where for example a language binding exist:\n"; + print " - Solaris, Sun WorkShop 6 update 1 C++ 5.2 2000/09/11 or higher\n"; + print " - Linux, GNU C++ compiler, gcc version 4.0.1 or higher\n"; + print " - MacOS, GNU C++ compiler, gcc version 4.0.1 or higher\n"; + print " Enter the directory of the C++ compiler, the directory\n"; + print " where the compiler is located (optional) [$main::OO_SDK_CPP_HOME_SUGGESTION]: "; + + $main::OO_SDK_CPP_HOME = readStdIn(); + chop($main::OO_SDK_CPP_HOME); + if ( $main::OO_SDK_CPP_HOME eq "" ) + { + $main::OO_SDK_CPP_HOME = $main::OO_SDK_CPP_HOME_SUGGESTION; + } + + if ( ! $main::OO_SDK_CPP_HOME eq "" ) + { + if ( (! -d "$main::OO_SDK_CPP_HOME") || + ((-d "$main::OO_SDK_CPP_HOME") && (! -e "$main::OO_SDK_CPP_HOME/$main::cppName")) ) + { + print " Error: Could not find directory '$main::OO_SDK_CPP_HOME'.\n"; + if ( skipChoice("C++ compiler") == 1 ) + { + $main::correctVersion = 1; + } + $main::OO_SDK_CPP_HOME = ""; + } else + { + #check version + if ( $main::cppName eq "gcc" ) + { + my $testVersion = `$OO_SDK_CPP_HOME/$main::cppName -dumpversion`; + if ( $testVersion eq "") + { + print " The '$main::cppName' command found at $main::OO_SDK_CPP_HOME/$main::cppName is not a "; + print " GNU compiler.\nSet the environment variable OO_SDK_CPP_HOME to your GNU build tools "; + print " directory.\nA GNU compiler version $main::cppVersion can be obtained at "; + print " ftp://ftp.gnu.org/gnu/gcc/\n"; + } else + { + $main::correctVersion = testVersion($main::cppVersion, $testVersion, "$main::OO_SDK_CPP_HOME/$main::cppName", 1); + if ( !$main::correctVersion ) + { + print " The '$main::cppName' command found at '$main::OO_SDK_CPP_HOME' has a wrong version\n"; + if ( skipChoice("C++ compiler") == 1 ) + { + $main::correctVersion = 1; + } + + $main::OO_SDK_CPP_HOME = ""; + } + } + } else + { + # for Solaris we have to check the version too + open(FILE, "$OO_SDK_CPP_HOME/$main::cppName -V 2>&1 |"); + my @lines = ; + my $testVersion = $lines[0]; + if ( $testVersion eq "") + { + print " The '$main::cppName' command found at $main::OO_SDK_CPP_HOME/$main::cppName is not a "; + print " Solaris C++ compiler.\nSet the environment variable OO_SDK_CPP_HOME to your Solaris C++ compiler directory.\n"; + } else + { + if ($testVersion =~ m#((\d+\.)+\d+)# ) + { + $testVersion = $1; + } + $main::correctVersion = testVersion($main::cppVersion, $testVersion, "$main::OO_SDK_CPP_HOME/$main::cppName", 1); + if ( !$main::correctVersion ) + { + print " The '$main::cppName' command found at '$main::OO_SDK_CPP_HOME' has a wrong version\n"; + if ( skipChoice("C++ compiler") == 1 ) + { + $main::correctVersion = 1; + } + + $main::OO_SDK_CPP_HOME = ""; + } else { + $main::correctVersion = testVersion("5.5", $testVersion, "$main::OO_SDK_CPP_HOME/$main::cppName", 2); + if ( $main::correctVersion ) { + $main::OO_SDK_CC_55_OR_HIGHER = $testVersion; + } + } + } + } + } + } else + { + # the C++ compiler is optional + $main::correctVersion = 1; + } +} + + +# prepare Java path +$main::correctVersion = 0; + +# prepare Java suggestion (cut bin or Commands directory to be in the root of the Java SDK) +$main::offset = rindex($main::OO_SDK_JAVA_HOME_SUGGESTION, "/$main::OO_SDK_JAVA_BIN_DIR"); +if ( $main::offset != -1 ) +{ + $main::OO_SDK_JAVA_HOME_SUGGESTION = substr($main::OO_SDK_JAVA_HOME_SUGGESTION, 0, $main::offset); +} + +while ( (!$main::correctVersion) && + ((! -d "$main::OO_SDK_JAVA_HOME" ) || + ((-d "$main::OO_SDK_JAVA_HOME") && (! -e "$main::OO_SDK_JAVA_HOME/$main::OO_SDK_JAVA_BIN_DIR/javac"))) ) +{ + print " Enter Java SDK (1.5, recommendation is 1.6 or higher) installation directory (optional) [$main::OO_SDK_JAVA_HOME_SUGGESTION]: "; + $main::OO_SDK_JAVA_HOME = readStdIn(); + chop($main::OO_SDK_JAVA_HOME); + if ( $main::OO_SDK_JAVA_HOME eq "" ) + { + $main::OO_SDK_JAVA_HOME = $main::OO_SDK_JAVA_HOME_SUGGESTION; + } + if ( ! $main::OO_SDK_JAVA_HOME eq "" ) + { + if ( (! -d "$main::OO_SDK_JAVA_HOME") || + ((-d "$main::OO_SDK_JAVA_HOME") && (! -e "$main::OO_SDK_JAVA_HOME/$main::OO_SDK_JAVA_BIN_DIR/javac")) ) + { + print " Error: Could not find directory '$main::OO_SDK_JAVA_HOME' or '$main::OO_SDK_JAVA_HOME/$main::OO_SDK_JAVA_BIN_DIR/javac'.\n"; + if ( skipChoice("JAVA SDK") == 1 ) + { + $main::correctVersion = 1; + } + $main::OO_SDK_JAVA_HOME = ""; + } else + { + #check version + my $testVersion = `$main::OO_SDK_JAVA_HOME/$main::OO_SDK_JAVA_BIN_DIR/java -version 2>&1 | egrep "java version" | head -n 1 | sed -e 's#.*version "##' | sed -e 's#".*##'`; + $testVersion =~ s#([^\n]+)\n#$1#go; + + $main::correctVersion = testVersion($main::javaVersion, $testVersion, "$main::OO_SDK_JAVA_HOME/$main::OO_SDK_JAVA_BIN_DIR/java", 1); + if ( !$main::correctVersion ) + { + if ( skipChoice("JAVA SDK") == 1 ) + { + $main::correctVersion = 1; + } + $main::OO_SDK_JAVA_HOME = ""; + } + } + }else + { + # the Java SDK is optional + $main::correctVersion = 1; + } +} + + +# prepare output directory (optional) +while ( (!$main::skipOutputDir) && + (! -d "$main::OO_SDK_OUTPUT_DIR") ) +{ + print " Default output directory is in your HOME directory.\n"; + print " Enter an existent directory if you prefer a different output directory (optional) [$main::OO_SDK_OUTPUT_DIR_SUGGESTION]: "; + + $main::OO_SDK_OUTPUT_DIR = readStdIn(); + + chop($main::OO_SDK_OUTPUT_DIR); + if ( $main::OO_SDK_OUTPUT_DIR eq "" ) + { + $main::OO_SDK_OUTPUT_DIR = $main::OO_SDK_OUTPUT_DIR_SUGGESTION; + } + if ( ! $main::OO_SDK_OUTPUT_DIR eq "" ) + { + if ( ! -d "$main::OO_SDK_OUTPUT_DIR" ) + { + print " Error: Could not find directory '$main::OO_SDK_OUTPUT_DIR'.\n"; + if ( skipChoice("optional output directory") == 1 ) + { + $main::skipOutputDir = 1; + } + $main::OO_SDK_OUTPUT_DIR = ""; + } + } else + { + # the output directory is optional + $main::skipOutputDir = 1; + } +} + +# prepare auto deployment +if ( $main::OFFICE_OR_URE eq "Office" ) +{ + while ( $main::SDK_AUTO_DEPLOYMENT eq "" || + ((! $main::SDK_AUTO_DEPLOYMENT eq "YES") && + (! $main::SDK_AUTO_DEPLOYMENT eq "NO")) ) + { + print " Automatic deployment of UNO components (YES/NO) [$main::SDK_AUTO_DEPLOYMENT_SUGGESTION]: "; + $main::SDK_AUTO_DEPLOYMENT = uc ; + chop($main::SDK_AUTO_DEPLOYMENT); + if ( $main::SDK_AUTO_DEPLOYMENT eq "" ) + { + $main::SDK_AUTO_DEPLOYMENT = "YES"; + } + } +} +else +{ + $main::SDK_AUTO_DEPLOYMENT = "NO"; +} + +prepareScriptFile("setsdkenv_unix.sh.in", "setsdkenv_unix.sh", 1); +chmod 0644, "$main::OO_SDK_CONFIG_HOME/$main::hostname/setsdkenv_unix.sh"; + +prepareScriptFile("setsdkenv_unix.csh.in", "setsdkenv_unix.csh", 2); +chmod 0644, "$main::OO_SDK_CONFIG_HOME/$main::hostname/setsdkenv_unix.csh"; + +print "\n"; +print " ************************************************************************\n"; +print " * ... your SDK environment has been prepared.\n"; +print " * For each time you want to use this configured SDK environment, you\n"; +print " * have to run the \"setsdkenv_unix\" script file!\n"; +print " * Alternatively can you source one of the scripts\n"; +print " * \"$main::OO_SDK_CONFIG_HOME/$main::hostname/setsdkenv_unix.sh\"\n"; +print " * \"$main::OO_SDK_CONFIG_HOME/$main::hostname/setsdkenv_unix.csh\"\n"; +print " * to get an environment without starting a new shell.\n"; +print " ************************************************************************\n\n"; + +exit $return; + +sub skipChoice +{ + my $msg = shift; + my $skip = ""; + while ( !( $skip eq "yes" || $skip eq "no") ) + { + print " Do you want to skip the choice of the '$msg' (YES/NO): [YES] "; + $skip = lc ; + chop($skip); + if ( $skip eq "" ) { $skip = "yes"; } # default + if ( $skip eq "yes" ) + { + return 1; + } + } + return 0; +} + +sub resolveLink +{ + my $base= shift; + my $link= shift; + + my $resolvedpath = "$base/$link"; + my $linktarget = readlink "$resolvedpath"; + my $resolvedlink = ""; + + while ( $linktarget ne "") { + + if ( $linktarget =~ m/^\/.*/ ) + { + $resolvedpath = "$linktarget"; + } else { + $resolvedpath = `cd $base/$linktarget; pwd`; + chop $resolvedpath; + } + $base = dirname("$resolvedpath"); + + $linktarget = readlink "$resolvedpath"; + } + + $resolvedlink = `cd $resolvedpath; pwd`; + chop $resolvedlink; + return $resolvedlink; +} + +sub searchprog +{ + my $_search= shift; + my $tmpPath = `echo "\$PATH"`; + my @pathList = split(":" , $tmpPath); + my $progDir = ""; + + if ( $_search eq "javac" ) + { + if ( $main::operatingSystem =~ m/darwin/ ) { + $progDir = resolveLink("/System/Library/Frameworks/JavaVM.Framework/Versions", "CurrentJDK"); + + if ( -e "$progDir/$main::OO_SDK_JAVA_BIN_DIR/javac" ) + { + return "$progDir/$main::OO_SDK_JAVA_BIN_DIR"; + } + } + + if ( $main::operatingSystem =~ m/solaris/ ) { + $progDir = resolveLink("/usr/jdk", "latest"); + if ( -e "$progDir/$main::OO_SDK_JAVA_BIN_DIR/javac" ) + { + return "$progDir/$main::OO_SDK_JAVA_BIN_DIR"; + } + } + } + + if ( $_search eq "gmake" && $main::operatingSystem =~ m/solaris/ ) { + if ( -e "/usr/sfw/bin/gmake" ) + { + return "/usr/sfw/bin"; + } + } + + foreach $i (@pathList) + { + chomp ($i); + + if ( -e "$i/$_search" ) + { + + if ( index($i, "/") == 0 ) + { + # # absolute path; leave unchanged + $progDir = $i; + } else + { + $progDir = `cd "$i"; pwd`; + } + return $progDir + } + } + return $progDir +} + +sub searchMacOffice +{ + if (-d "/Applications/LibreOffice.app" ) { + return "/Applications/LibreOffice.app" + } + if (-d "/Applications/OpenOffice.org.app" ) { + return "/Applications/OpenOffice.org.app" + } + if (-d "/Applications/Oracle Open Office.app" ) { + return "/Applications/Oracle Open Office.app"; + } + if (-d "/Applications/StarOffice.app" ) { + return "/Applications/StarOffice.app"; + } + if (-d "/Applications/StarSuite.app" ) { + return "/Applications/StarSuite.app"; + } + + return ""; +} + +sub searchoffice +{ + my $offset = rindex($main::sdkpath, "/libreoffice"); + my $tmpOffice = substr($main::sdkpath, 0, $offset); + my $officepath = "$tmpOffice/libreoffice"; + +# if ( $main::OO_MINORVERSION > 0) { +# $officepath = "$officepath$main::OO_MINORVERSION"; +# } + + # search corresponding office for this SDK + if (-d $officepath && -e "$officepath/program/soffice") { + return $officepath; + } + # fallback + my $tmpversion = $main::OO_MAJORVERSION; +# if ( $main::OO_MINORVERSION > 0) { +# $tmpversion = "$tmpversion.$main::OO_MINORVERSION"; +# } + + $officepath = "$tmpOffice/oracle_open_office$tmpversion"; + if (-d $officepath && -e "$officepath/program/soffice") { + return $officepath; + } + + my $tmpversion = $main::OO_MAJORVERSION + 6; + if ( $main::OO_MINORVERSION > 0) { + $tmpversion = "$tmpversion.$main::OO_MINORVERSION"; + } + + $officepath = "$tmpOffice/staroffice$tmpversion"; + if (-d $officepath && -e "$officepath/program/soffice") { + return $officepath; + } + $officepath = "$tmpOffice/StarOffice$tmpversion"; + if (-d $officepath && -e "$officepath/program/soffice") { + return $officepath; + } + $officepath = "$tmpOffice/starsuite$tmpversion"; + if (-d $officepath && -e "$officepath/program/soffice") { + return $officepath; + } + $officepath = "$tmpOffice/StarSuite$tmpversion"; + if (-d $officepath && -e "$officepath/program/soffice") { + return $officepath; + } + $officepath = ""; + + # search other potential matching office versions + my $path = "/opt/"; + my $entry = ""; + my $version = "0"; + for $entry (glob($path.'*')) { + ## if the file is a directory + if( -d $entry) { + + if ($entry =~ m#(.+(o|O)ffice(\.org){0,1}(\d([\d\.]){0,2}))# || + $entry =~ m#(.+(s|S)uite(.*)(\d([\d\.]){0,2}))# ) + { + if ($4 > $version) { + $version = $4; + $officepath = $entry; + } + } + } + } + return $officepath; +} + + + +sub testVersion +{ + my $tmpMustBeVersion = shift; + my $tmpTestVersion = shift; + my $toolName = shift; + # 1=check + message 2=check only + my $checkOnly = shift; + my @mustBeVersion = split(/\.|_|-/,$tmpMustBeVersion); + my @testVersion = split(/\.|_|-/,$tmpTestVersion); + my $length = $#mustBeVersion; + + if ($#testVersion < $#mustBeVersion) { + $length = $#testVersion; + } + + for ($i=0; $i <= $length; $i++ ) + { + if ( $testVersion[$i] > $mustBeVersion[$i] ) + { + return 1; # 1 indicates a correct version + } + + if ( $testVersion[$i] < $mustBeVersion[$i] ) + { + if ( $#checkOnly == 1 ) { + print " The command '$toolName' has the version $tmpTestVersion.\n"; + print " The SDK requires at least the version $tmpMustBeVersion.\n"; + } + return 0; + } + } + + return 1; # 1 indicates a correct version +} + +sub readStdIn +{ + my $tmpstdin = ; + if ( index($tmpstdin, "\$") != -1) + { + return `echo $tmpstdin`; + } + + return $tmpstdin; +} + +sub prepareScriptFile() +{ + my $inputFile = shift; + my $outputFile = shift; + # shell mode 1 = sh + # 2 = csh + my $shellMode = shift; + + if ( ! -d "$main::OO_SDK_CONFIG_HOME/$main::hostname" ) + { + system("mkdir -p $main::OO_SDK_CONFIG_HOME/$main::hostname"); + } + + open ( FILEIN, "$main::sdkpath/$inputFile" ) || die "\nERROR: could not open '$main::sdkpath/$inputFile' for reading"; + open ( FILEOUT, ">$main::OO_SDK_CONFIG_HOME/$main::hostname/$outputFile" ) || die "\nERROR: could not open '$main::OO_SDK_CONFIG_HOME/$main::hostname/$outputFile' for writing"; + + while ( ) + { + $_ =~ s#\@OO_SDK_NAME\@#$main::OO_SDK_NAME#go; + $_ =~ s#\@OO_SDK_HOME\@#$main::OO_SDK_HOME#go; + $_ =~ s#\@OFFICE_HOME\@#$main::OFFICE_HOME#go; + $_ =~ s#\@OO_SDK_URE_HOME\@#$main::OO_SDK_URE_HOME#go; + $_ =~ s#\@OO_SDK_MAKE_HOME\@#$main::OO_SDK_MAKE_HOME#go; + $_ =~ s#\@OO_SDK_ZIP_HOME\@#$main::OO_SDK_ZIP_HOME#go; + $_ =~ s#\@OO_SDK_CPP_HOME\@#$main::OO_SDK_CPP_HOME#go; + $_ =~ s#\@OO_SDK_CC_55_OR_HIGHER\@#$main::OO_SDK_CC_55_OR_HIGHER#go; + $_ =~ s#\@OO_SDK_JAVA_HOME\@#$main::OO_SDK_JAVA_HOME#go; + $_ =~ s#\@SDK_AUTO_DEPLOYMENT\@#$main::SDK_AUTO_DEPLOYMENT#go; + $_ =~ s#\@OO_SDK_OUTPUT_DIR\@#$main::OO_SDK_OUTPUT_DIR#go; + + print FILEOUT $_; + } + + close FILEIN; + close FILEOUT; +} diff --git a/odk/config/setsdkenv_unix b/odk/config/setsdkenv_unix new file mode 100755 index 000000000000..08972af3c647 --- /dev/null +++ b/odk/config/setsdkenv_unix @@ -0,0 +1,84 @@ +#! /bin/sh +# +# 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 . +# + +OSTYPE=`uname -s` +HOSTNAME=`hostname` +CURRENTDIR=`/bin/pwd` +SDKTMPDIR=`dirname $0` +OO_SDK_HOME=`(cd $SDKTMPDIR && pwd && cd $CURRENTDIR) | head -n 1` +OOVERSION=`cat $OO_SDK_HOME/settings/dk.mk | tail -2 | head -n 1 | cut -d"=" -f2 | cut -d"." -f1,2` +if [ "$OSTYPE" = "Darwin" ] +then + OO_SDK_NAME=`basename $OO_SDK_HOME` +else + OO_SDK_NAME=libreoffice${OOVERSION}_sdk +fi + +export OO_SDK_HOME + +if [ "$1" = "--force-configure" ] +then + if [ -r $HOME/$OO_SDK_NAME/$HOSTNAME/setsdkenv_unix.sh ] + then + rm $HOME/$OO_SDK_NAME/$HOSTNAME/setsdkenv_unix.sh + fi + if [ -r $HOME/$OO_SDK_NAME/$HOSTNAME/setsdkenv_unix.csh ] + then + rm $HOME/$OO_SDK_NAME/$HOSTNAME/setsdkenv_unix.csh + fi + shift +elif [ "$1" = "-h" ] || [ "$1" = "--help" ] || [ -n "$1" ] +then + echo + echo " using: setsdkenv_unix [options]" + echo "" + echo " options:" + echo " --force-configure : force a new configuration of your SDK environment." + echo " Alternatively can you edit your SDK environment scripts directly:" + echo " $HOME/$OO_SDK_NAME/setsdkenv_unix.sh" + echo " $HOME/$OO_SDK_NAME/setsdkenv_unix.csh" + echo " -h, --help : print this help and exit" + echo + exit 1 +fi + +# source the prepared environment and start a new shell +if [ -r $HOME/$OO_SDK_NAME/$HOSTNAME/setsdkenv_unix.sh ] +then + . $HOME/$OO_SDK_NAME/$HOSTNAME/setsdkenv_unix.sh +else + echo + echo " ************************************************************************" + echo " *" + echo " * You have to configure your SDK environment first before you can" + echo " * can use it! The configuration has to be done only once." + echo " *" + echo " ************************************************************************" + echo + + perl $OO_SDK_HOME/configure.pl $HOSTNAME $OO_SDK_HOME $OO_SDK_NAME + + . $HOME/$OO_SDK_NAME/$HOSTNAME/setsdkenv_unix.sh +fi + +"$SHELL" "$@" +echo Shell terminated. + +TERMHEAD=$HOSTNAME +echo "]2;$TERMHEAD" diff --git a/odk/config/setsdkenv_unix.csh.in b/odk/config/setsdkenv_unix.csh.in new file mode 100644 index 000000000000..bdd5ede21f53 --- /dev/null +++ b/odk/config/setsdkenv_unix.csh.in @@ -0,0 +1,289 @@ +#! /bin/csh +# +# 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 sets all enviroment variables, which are necessary for building +# the examples of the Office Development Kit. +# The Script was developed for the operating systems Solaris, Linux and MacOS. + +# The SDK name +setenv OO_SDK_NAME @OO_SDK_NAME@ + +# Installation directory of the Software Development Kit. +# Example: setenv OO_SDK_HOME /opt/libreoffice/basis3.4/sdk +setenv OO_SDK_HOME '@OO_SDK_HOME@' + +# Office installation directory. +# Example: set OFFICE_HOME=/opt/libreoffice +setenv OFFICE_HOME '@OFFICE_HOME@' + +# URE installation directory. +# Example: setenv OO_SDK_URE_HOME /opt/libreoffice/ure +setenv OO_SDK_URE_HOME '@OO_SDK_URE_HOME@' + +# Directory of the make command. +# Example: setenv OO_SDK_MAKE_HOME /usr/bin +setenv OO_SDK_MAKE_HOME @OO_SDK_MAKE_HOME@ + +# Directory of the zip command. +# Example: setenv OO_SDK_ZIP_HOME /usr/bin +setenv OO_SDK_ZIP_HOME @OO_SDK_ZIP_HOME@ + +# Directory of the C++ compiler. +# Example: setenv OO_SDK_CPP_HOME /usr/bin +setenv OO_SDK_CPP_HOME @OO_SDK_CPP_HOME@ + +# Solaris only +setenv OO_SDK_CC_55_OR_HIGHER @OO_SDK_CC_55_OR_HIGHER@ + +# Directory of the Java SDK. +# Example: setenv OO_SDK_JAVA_HOME "/usr/jdk/jdk1.6.0_10" +setenv OO_SDK_JAVA_HOME @OO_SDK_JAVA_HOME@ + +# Special output directory +# Example: setenv OO_SDK_OUTPUT_DIR "$HOME" +setenv OO_SDK_OUTPUT_DIR @OO_SDK_OUTPUT_DIR@ + +# Environment variable to enable auto deployment of example components +# Example: set SDK_AUTO_DEPLOYMENT=YES +setenv SDK_AUTO_DEPLOYMENT @SDK_AUTO_DEPLOYMENT@ + +# Get the operating system. +set sdk_platform=`${OO_SDK_HOME}/config.guess | cut -d"-" -f3,4` + +# Set the directory name. +set programdir=program +set javadir=bin +switch (${sdk_platform}) + case "darwin*": + set programdir="Contents/MacOS" + set javacdir=Commands + breaksw +endsw + + +# Set office program path. +if ( "${OFFICE_HOME}" != "" ) then + setenv OFFICE_PROGRAM_PATH "${OFFICE_HOME}/${programdir}" +endif + + +# Set UNO path, necessary to ensure that the cpp examples using the +# new UNO bootstrap mechanism use the configured office installation. +if ( ${?OFFICE_PROGRAM_PATH} ) then + setenv UNO_PATH "${OFFICE_PROGRAM_PATH}" +endif + +if ( "${OO_SDK_URE_HOME}" != "" ) then + setenv OO_SDK_URE_BIN_DIR "${OO_SDK_URE_HOME}/bin" + setenv OO_SDK_URE_LIB_DIR "${OO_SDK_URE_HOME}/lib" + setenv OO_SDK_URE_JAVA_DIR "${OO_SDK_URE_HOME}/share/java" +else + setenv OO_SDK_URE_BIN_DIR "${OFFICE_PROGRAM_PATH}" + setenv OO_SDK_URE_LIB_DIR "${OFFICE_PROGRAM_PATH}" + setenv OO_SDK_URE_JAVA_DIR "${OFFICE_PROGRAM_PATH}/classes" +endif + +# Set SDK example output directory +setenv OO_SDK_OUT ${OO_SDK_HOME} +if ( $?OO_SDK_OUTPUT_DIR ) then + setenv OO_SDK_OUT ${OO_SDK_OUTPUT_DIR}/${OO_SDK_NAME} +endif + +# check platform and set appropriate variables +switch (`${OO_SDK_HOME}/config.guess | cut -d"-" -f3,4`) + case "solaris*": + if ( `${OO_SDK_HOME}/config.guess | cut -d"-" -f1` == "sparc" ) then + set directoryname=solsparc + set platform=Solaris Sparc + else + set directoryname=solintel + set platform=Solaris Intel + endif + set comid=C52 + set pltfrm=sunpro + set soext=so + set exampleout=SOLARISexample.out + + # set LD_LIBRARY_PATH + if ( $?LD_LIBRARY_PATH == 0) then + setenv LD_LIBRARY_PATH ${OO_SDK_HOME}/lib:${OO_SDK_OUT}/${exampleout}/lib:${OO_SDK_URE_LIB_DIR}:. + else + setenv LD_LIBRARY_PATH ${OO_SDK_HOME}/lib:${OO_SDK_OUT}/${exampleout}/lib:${OO_SDK_URE_LIB_DIR}:.:${LD_LIBRARY_PATH} + endif + breaksw + + case "linux-gnu": + set directoryname=linux + set comid=gcc3 + set pltfrm=gcc + set soext=so + set exampleout=LINUXexample.out + set platform=Linux + + # set LD_LIBRARY_PATH + if ( $?LD_LIBRARY_PATH == 0) then + setenv LD_LIBRARY_PATH ${OO_SDK_HOME}/lib:${OO_SDK_OUT}/${exampleout}/lib:${OO_SDK_URE_LIB_DIR}:. + else + setenv LD_LIBRARY_PATH ${OO_SDK_HOME}/lib:${OO_SDK_OUT}/${exampleout}/lib:${OO_SDK_URE_LIB_DIR}:.:${LD_LIBRARY_PATH} + endif + breaksw + + case "darwin*": + set directoryname=macosx + set comid=gcc3 + set pltfrm=gcc + set soext=dylib + set exampleout=MACOSXexample.out + set platform=MacOSX + + # set DYLD_LIBRARY_PATH + if ( $?DYLD_LIBRARY_PATH == 0) then + setenv DYLD_LIBRARY_PATH ${OO_SDK_OUT}/${directoryname}/lib:${OO_SDK_OUT}/${exampleout}/lib:${OO_SDK_URE_LIB_DIR}:. + else + setenv DYLD_LIBRARY_PATH ${OO_SDK_OUT}/${directoryname}/lib:${OO_SDK_OUT}/${exampleout}/lib:${OO_SDK_URE_LIB_DIR}:.:${DYLD_LIBRARY_PATH} + endif + breaksw + + case "freebsd*": + set directoryname=freebsd + set comid=gcc3 + set pltfrm=gcc + set soext=so + set exampleout=FREEBSDexample.out + set platform=FreeBSD + + # set LD_LIBRARY_PATH + if ( $?LD_LIBRARY_PATH == 0) then + setenv LD_LIBRARY_PATH ${OO_SDK_HOME}/lib:${OO_SDK_OUT}/${exampleout}/lib:${OO_SDK_URE_LIB_DIR}:. + else + setenv LD_LIBRARY_PATH ${OO_SDK_HOME}/lib:${OO_SDK_OUT}/${exampleout}/lib:${OO_SDK_URE_LIB_DIR}:.:${LD_LIBRARY_PATH} + endif + + if ( -e "/sbin/sysctl" ) then + set OSVERSION=`/sbin/sysctl -n kern.osreldate` + else + set OSVERSION=`/usr/sbin/sysctl -n kern.osreldate` + endif + + if ( ${OSVERSION} < 500016 ) then + setenv PTHREAD_CFLAGS -D_THREAD_SAFE + setenv PTHREAD_LIBS -pthread + else if ( ${OSVERSION} < 502102 ) then + setenv PTHREAD_CFLAGS -D_THREAD_SAFE + setenv PTHREAD_LIBS -lc_r + else + setenv PTHREAD_LIBS -pthread + endif + breaksw +endsw + +# set PATH +if ( $?PATH == 0) then + setenv PATH ${OO_SDK_ZIP_HOME}:${OO_SDK_MAKE_HOME}:${OO_SDK_HOME}/bin:${OO_SDK_OUT}/${exampleout}:${OO_SDK_URE_BIN_DIR}:. +else + setenv PATH ${OO_SDK_ZIP_HOME}:${OO_SDK_MAKE_HOME}:${OO_SDK_HOME}/bin:${OO_SDK_OUT}/${exampleout}:${OO_SDK_URE_BIN_DIR}:.:${PATH} +endif + +# Set CLASSPATH +if ( ${?OFFICE_PROGRAM_PATH} ) then + if ( ${?CLASSPATH} == 0 ) then + setenv CLASSPATH "${OFFICE_PROGRAM_PATH}/classes/unoil.jar" + else + setenv CLASSPATH "${OFFICE_PROGRAM_PATH}/classes/unoil.jar:${CLASSPATH}" + endif +endif +if ( $?CLASSPATH == 0) then + setenv 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" +else + setenv 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:${CLASSPATH}" +endif + +if ( $?OO_SDK_CPP_HOME == 0) then + setenv PATH ${OO_SDK_CPP_HOME}:${PATH} +endif + +if ( $?OO_SDK_JAVA_HOME == 0) then + setenv PATH ${OO_SDK_JAVA_HOME}:${PATH} +endif + + +if ( "${platform}" == "MacOSX" ) then +# For URE, prepare symbolic links for libraries: +# Only necessary on MacOSX, on other Unix systems the links are already prepared +# in the SDK installation. + +# cleanup potential old links first + rm -f "${OO_SDK_OUT}/${directoryname}/lib/libuno_cppu.so" \ + "${OO_SDK_OUT}/${directoryname}/lib/libuno_cppuhelper${comid}.${soext}" \ + "${OO_SDK_OUT}/${directoryname}/lib/libuno_sal.${soext}" \ + "${OO_SDK_OUT}/${directoryname}/lib/libuno_salhelper${comid}.${soext}" \ + "${OO_SDK_OUT}/${directoryname}/lib/libuno_purpenvhelper${comid}.${soext}" + + if ( "${OO_SDK_URE_HOME}" != "" ) then + mkdir -p "${OO_SDK_OUT}/${directoryname}/lib" + ln -s "${OO_SDK_URE_LIB_DIR}/libuno_cppu.${soext}.3" \ + "${OO_SDK_OUT}/${directoryname}/lib/libuno_cppu.${soext}" + ln -s "${OO_SDK_URE_LIB_DIR}/libuno_cppuhelper${comid}.${soext}.3" \ + "${OO_SDK_OUT}/${directoryname}/lib/libuno_cppuhelper${comid}.${soext}" + ln -s "${OO_SDK_URE_LIB_DIR}/libuno_sal.${soext}.3" \ + "${OO_SDK_OUT}/${directoryname}/lib/libuno_sal.${soext}" + ln -s "${OO_SDK_URE_LIB_DIR}/libuno_salhelper${comid}.${soext}.3" \ + "${OO_SDK_OUT}/${directoryname}/lib/libuno_salhelper${comid}.${soext}" + ln -s "${OO_SDK_URE_LIB_DIR}/libuno_purpenvhelper${comid}.${soext}.3" \ + "${OO_SDK_OUT}/${directoryname}/lib/libuno_purpenvhelper${comid}.${soext}" + endif +endif + + +echo +echo " ************************************************************************" +echo " *" +echo " * SDK environment is prepared for ${platform}" +echo " *" +echo " * SDK = ${OO_SDK_HOME}" +echo " * Office = ${OFFICE_HOME}" +echo " * URE = ${OO_SDK_URE_HOME}" +echo " * Make = ${OO_SDK_MAKE_HOME}" +echo " * Zip = ${OO_SDK_ZIP_HOME}" +if ( $?OO_SDK_CPP_HOME == 0) then +echo " * C++ Compiler = " +else +echo " * C++ Compiler = ${OO_SDK_CPP_HOME}" +endif +if ( $?OO_SDK_JAVA_HOME == 0) then +echo " * Java = " +else +echo " * Java = ${OO_SDK_JAVA_HOME}" +endif +if ( $?OO_SDK_OUTPUT_DIR == 0) then +echo " * Special Output directory = " +else +echo " * SDK Output directory = ${OO_SDK_OUT}" +endif +echo " * Auto deployment = ${SDK_AUTO_DEPLOYMENT}" +echo " *" +echo " ************************************************************************" + +unset sdkdir +unset directoryname +unset comid +unset exampleout +unset platform + +echo "]2;Shell prepared with the SDK environment" diff --git a/odk/config/setsdkenv_unix.sh.in b/odk/config/setsdkenv_unix.sh.in new file mode 100644 index 000000000000..01e01bac995e --- /dev/null +++ b/odk/config/setsdkenv_unix.sh.in @@ -0,0 +1,311 @@ +#! /bin/sh +# +# 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 starts a new shell and sets all enviroment variables, which +# are necessary for building the examples of the Office Development Kit. +# The Script was developed for the operating systems Solaris, Linux and MacOS. + +# The SDK name +OO_SDK_NAME=@OO_SDK_NAME@ +export OO_SDK_NAME + +# Installation directory of the Software Development Kit. +# Example: OO_SDK_HOME=/opt/libreoffice/basis3.4/sdk +OO_SDK_HOME='@OO_SDK_HOME@' + +# Office installation directory. +# Example: OFFICE_HOME=/opt/libreoffice +OFFICE_HOME='@OFFICE_HOME@' + +# URE installation directory. +# Example: OO_SDK_URE_HOME=/opt/libreoffice/ure +OO_SDK_URE_HOME='@OO_SDK_URE_HOME@' +export OO_SDK_URE_HOME + +# Directory of the make command. +# Example: OO_SDK_MAKE_HOME=/usr/bin +OO_SDK_MAKE_HOME=@OO_SDK_MAKE_HOME@ + +# Directory of the zip command. +# Example: OO_SDK_ZIP_HOME=/usr/bin +OO_SDK_ZIP_HOME=@OO_SDK_ZIP_HOME@ + +# Directory of the C++ compiler. +# Example: OO_SDK_CPP_HOME=/usr/bin +OO_SDK_CPP_HOME=@OO_SDK_CPP_HOME@ + +# Solaris only +OO_SDK_CC_55_OR_HIGHER=@OO_SDK_CC_55_OR_HIGHER@ + +# Directory of the Java SDK. +# Example: OO_SDK_JAVA_HOME=/usr/jdk/jdk1.6.0_10 +OO_SDK_JAVA_HOME=@OO_SDK_JAVA_HOME@ + +# Special output directory +# Example: OO_SDK_OUTPUT_DIR=$HOME +OO_SDK_OUTPUT_DIR=@OO_SDK_OUTPUT_DIR@ + +# Environment variable to enable auto deployment of example components +# Example: SDK_AUTO_DEPLOYMENT=YES +SDK_AUTO_DEPLOYMENT=@SDK_AUTO_DEPLOYMENT@ +export SDK_AUTO_DEPLOYMENT + +# Check installation path for the OpenOffice Development Kit. +if [ -z "${OO_SDK_HOME}" ] +then + echo Error: Please insert a correct value for the variable OO_SDK_HOME. + exit 0 +fi + +export OO_SDK_HOME + +# Check installation path for the office. +if [ -z "${OFFICE_HOME}" ] && [ -z "${OO_SDK_URE_HOME}" ] +then + echo 'Error: Please set either the environment variable OFFICE_HOME or the' + echo 'environment variable OO_SDK_URE_HOME.' + exit 0 +fi + +# Get the operating system. +sdk_platform=`${OO_SDK_HOME}/config.guess | cut -d"-" -f3,4` + +# Set the directory name. +programdir=program +javadir=bin +case ${sdk_platform} in + darwin*) + programdir="Contents/MacOS" + javacdir=Commands + ;; +esac + +# Set office program path (only set when using an Office). +if [ "${OFFICE_HOME}" ] +then + OFFICE_PROGRAM_PATH=${OFFICE_HOME}/${programdir} + export OFFICE_PROGRAM_PATH +fi + + +# Set UNO path, necessary to ensure that the cpp examples using the +# new UNO bootstrap mechanism use the configured office installation (only set +# when using an Office). +if [ "${OFFICE_HOME}" ] +then + UNO_PATH=${OFFICE_PROGRAM_PATH} + export UNO_PATH +fi + +if [ "${OO_SDK_URE_HOME}" ] +then + OO_SDK_URE_BIN_DIR=${OO_SDK_URE_HOME}/bin + OO_SDK_URE_LIB_DIR=${OO_SDK_URE_HOME}/lib + OO_SDK_URE_JAVA_DIR=${OO_SDK_URE_HOME}/share/java +else + OO_SDK_URE_BIN_DIR=${OFFICE_PROGRAM_PATH} + OO_SDK_URE_LIB_DIR=${OFFICE_PROGRAM_PATH} + OO_SDK_URE_JAVA_DIR=${OFFICE_PROGRAM_PATH}/classes +fi +export OO_SDK_URE_BIN_DIR +export OO_SDK_URE_LIB_DIR +export OO_SDK_URE_JAVA_DIR + +OO_SDK_OUT=$OO_SDK_HOME +# Prepare appropriate output directory. +if [ -n "${OO_SDK_OUTPUT_DIR}" ] +then + OO_SDK_OUT=${OO_SDK_OUTPUT_DIR}/${OO_SDK_NAME} + export OO_SDK_OUT +fi + +# Set the directory name. +case ${sdk_platform} in + solaris*) + sdk_proctype=`${OO_SDK_HOME}/config.guess | cut -d"-" -f1` + if [ "${sdk_proctype}" = "sparc" ] + then + directoryname=solsparc + platform='Solaris Sparc' + else + directoryname=solintel + platform='Solaris x86' + fi + comid=C52 + pltfrm=sunpro + soext=so + exampleout=SOLARISexample.out + LD_LIBRARY_PATH=${OO_SDK_HOME}/lib:${OO_SDK_OUT}/${exampleout}/lib:${OO_SDK_URE_LIB_DIR}:.:${LD_LIBRARY_PATH} + export LD_LIBRARY_PATH + ;; + + darwin*) + directoryname=macosx + comid=gcc3 + pltfrm=gcc + soext=dylib + exampleout=MACOSXexample.out + platform=MacOSX + DYLD_LIBRARY_PATH=${OO_SDK_OUT}/${directoryname}/lib:${OO_SDK_OUT}/${exampleout}/lib:${OO_SDK_URE_LIB_DIR}:.:${DYLD_LIBRARY_PATH} + export DYLD_LIBRARY_PATH + ;; + + linux-gnu) + directoryname=linux + comid=gcc3 + pltfrm=gcc + soext=so + exampleout=LINUXexample.out + platform=Linux + LD_LIBRARY_PATH=${OO_SDK_HOME}/lib:${OO_SDK_OUT}/${exampleout}/lib:${OO_SDK_URE_LIB_DIR}:.:${LD_LIBRARY_PATH} + export LD_LIBRARY_PATH + ;; + + freebsd*) + directoryname=freebsd + comid=gcc3 + pltfrm=gcc + soext=so + exampleout=FREEBSDexample.out + platform=FreeBSD + LD_LIBRARY_PATH=${OO_SDK_HOME}/lib:${OO_SDK_OUT}/${exampleout}/lib:${OO_SDK_URE_LIB_DIR}:.:${LD_LIBRARY_PATH} + export LD_LIBRARY_PATH + + if [ -e "/sbin/sysctl" ] + then + OSVERSION=`/sbin/sysctl -n kern.osreldate` + else + OSVERSION=`/usr/sbin/sysctl -n kern.osreldate` + fi + if [ $OSVERSION -lt 500016 ] + then + PTHREAD_CFLAGS=-D_THREAD_SAFE + PTHREAD_LIBS=-pthread + export PTHREAD_CFLAGS + export PTHREAD_LIBS + elif [ $OSVERSION -lt 502102 ] + then + PTHREAD_CFLAGS=-D_THREAD_SAFE + PTHREAD_LIBS=-lc_r + export PTHREAD_CFLAGS + export PTHREAD_LIBS + else + PTHREAD_LIBS=-pthread + export PTHREAD_LIBS + fi + ;; +esac + +# Add directory of the SDK tools to the path. +PATH=${OO_SDK_HOME}/bin:${OO_SDK_OUT}/${exampleout}/bin:${OO_SDK_URE_BIN_DIR}:${OFFICE_PROGRAM_PATH}:.:${PATH} + +# Set the classpath +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:${OFFICE_PROGRAM_PATH}/classes/unoil.jar:${CLASSPATH} +export CLASSPATH + + +# Add directory of the command make to the path, if necessary. +if [ -n "${OO_SDK_MAKE_HOME}" ] +then + PATH=${OO_SDK_MAKE_HOME}:${PATH} + export OO_SDK_MAKE_HOME +fi + +# Add directory of the zip tool to the path, if necessary. +if [ -n "${OO_SDK_ZIP_HOME}" ] +then + PATH=${OO_SDK_ZIP_HOME}:${PATH} + export OO_SDK_ZIP_HOME +fi + +# Add directory of the C++ tools to the path, if necessary. +if [ -n "${OO_SDK_CPP_HOME}" ] +then + PATH=${OO_SDK_CPP_HOME}:${PATH} + export OO_SDK_CPP_HOME + + if [ -n "${OO_SDK_CC_55_OR_HIGHER}" ] + then + export OO_SDK_CC_55_OR_HIGHER + fi +fi + +# Add directory of the Java tools to the path, if necessary. +if [ -n "${OO_SDK_JAVA_HOME}" ] +then + PATH=${OO_SDK_JAVA_HOME}/${javadir}:${PATH} +# JAVA_HOME=${OO_SDK_JAVA_HOME} +# export JAVA_HOME + export OO_SDK_JAVA_HOME + + export PATH +fi + +export PATH + +if [ "${platform}" = "MacOSX" ] +then +# For URE, prepare symbolic links for libraries: +# Only necessary on MacOSX, on other Unix systems the links are already prepared +# in the SDK installation. + +# cleanup potential old links first + rm -f "${OO_SDK_OUT}/${directoryname}/lib/libuno_cppu.${soext}" \ + "${OO_SDK_OUT}/${directoryname}/lib/libuno_cppuhelper${comid}.${soext}" \ + "${OO_SDK_OUT}/${directoryname}/lib/libuno_sal.${soext}" \ + "${OO_SDK_OUT}/${directoryname}/lib/libuno_salhelper${comid}.${soext}" \ + "${OO_SDK_OUT}/${directoryname}/lib/libuno_purpenvhelper${comid}.${soext}" + +# prepare links + if [ "${OO_SDK_URE_HOME}" ] + then + mkdir -p "${OO_SDK_OUT}/${directoryname}/lib" + ln -s "${OO_SDK_URE_LIB_DIR}/libuno_cppu.${soext}.3" \ + "${OO_SDK_OUT}/${directoryname}/lib/libuno_cppu.${soext}" + ln -s "${OO_SDK_URE_LIB_DIR}/libuno_cppuhelper${comid}.${soext}.3" \ + "${OO_SDK_OUT}/${directoryname}/lib/libuno_cppuhelper${comid}.${soext}" + ln -s "${OO_SDK_URE_LIB_DIR}/libuno_sal.${soext}.3" \ + "${OO_SDK_OUT}/${directoryname}/lib/libuno_sal.${soext}" + ln -s "${OO_SDK_URE_LIB_DIR}/libuno_salhelper${comid}.${soext}.3" \ + "${OO_SDK_OUT}/${directoryname}/lib/libuno_salhelper${comid}.${soext}" + ln -s "${OO_SDK_URE_LIB_DIR}/libuno_purpenvhelper${comid}.${soext}.3" \ + "${OO_SDK_OUT}/${directoryname}/lib/libuno_purpenvhelper${comid}.${soext}" + fi +fi + + +# Prepare shell with all necessary environment variables. +echo +echo " ************************************************************************" +echo " *" +echo " * SDK environment is prepared for ${platform}" +echo " *" +echo " * SDK = $OO_SDK_HOME" +echo " * Office = $OFFICE_HOME" +echo " * URE = $OO_SDK_URE_HOME" +echo " * Make = $OO_SDK_MAKE_HOME" +echo " * Zip = $OO_SDK_ZIP_HOME" +echo " * C++ Compiler = $OO_SDK_CPP_HOME" +echo " * Java = $OO_SDK_JAVA_HOME" +echo " * SDK Output directory = $OO_SDK_OUT" +echo " * Auto deployment = $SDK_AUTO_DEPLOYMENT" +echo " *" +echo " ************************************************************************" + +echo "]2;Shell prepared with the SDK environment" diff --git a/odk/config/setsdkenv_windows.bat b/odk/config/setsdkenv_windows.bat new file mode 100755 index 000000000000..ac1a559d935c --- /dev/null +++ b/odk/config/setsdkenv_windows.bat @@ -0,0 +1,82 @@ +rem +rem This file is part of the LibreOffice project. +rem +rem This Source Code Form is subject to the terms of the Mozilla Public +rem License, v. 2.0. If a copy of the MPL was not distributed with this +rem file, You can obtain one at http://mozilla.org/MPL/2.0/. +rem +rem This file incorporates work covered by the following license notice: +rem +rem Licensed to the Apache Software Foundation (ASF) under one or more +rem contributor license agreements. See the NOTICE file distributed +rem with this work for additional information regarding copyright +rem ownership. The ASF licenses this file to you under the Apache +rem License, Version 2.0 (the "License"); you may not use this file +rem except in compliance with the License. You may obtain a copy of +rem the License at http://www.apache.org/licenses/LICENSE-2.0 . +rem + +@echo off + +set SDK_DIR_TMP=%~dp0 +set SDK_DIR=%SDK_DIR_TMP:~0,-1% + +if "%@RIGHT[5,%SDK_DIR%]" EQU "~0,-1" ( + set SDK_DIR=%@FULL[%0] + set /A LENGTH=%@LEN[%SDK_DIR%] - 22 + set SDK_DIR=%@LEFT[%LENGTH%,%SDK_DIR%] + unset LENGTH +) + +set OO_SDK_NAME=__SDKNAME__ + +set OO_USER_SDK_DIR=%APPDATA%\%OO_SDK_NAME% +set OO_USER_SDKENV_SCRIPT=%OO_USER_SDK_DIR%\setsdkenv_windows.bat + +if "%1" EQU "--force-configure" ( + if exist "%OO_USER_ENV_SCRIPT%". ( + del "%OO_USER_SDKENV_SCRIPT%" + ) + goto start +) + +if "%1" EQU "-h" goto printhelp +if "%1" EQU "--help" goto printhelp +if "%1" NEQ "" goto printhelp + +:start +cls + +if not exist "%OO_USER_SDKENV_SCRIPT%". ( + echo. + echo ****************************************************************** + echo * + echo * You have to configure your SDK environment first before you can + echo * can use it! The configuration has to be done only once. + echo * + echo ****************************************************************** + echo. + + cscript //I //Nologo "%SDK_DIR%\cfgWin.js" + goto setenv +) + +goto setenv + +:printhelp +echo. +echo using: setsdkenv_windows.bat [options] +echo. +echo options: +echo --force-configure : force a new configuration of your SDK environment. +echo Alternatively can you edit your SDK environment script directly: +echo "%OO_USER_SDKENV_SCRIPT%" +echo -h, --help : print this help and exit +echo. +goto end + + +:setenv +call "%OO_USER_SDKENV_SCRIPT%" + +:end \ No newline at end of file diff --git a/odk/config/setsdkenv_windows.template b/odk/config/setsdkenv_windows.template new file mode 100755 index 000000000000..8b1eb594e658 --- /dev/null +++ b/odk/config/setsdkenv_windows.template @@ -0,0 +1,186 @@ +rem +rem This file is part of the LibreOffice project. +rem +rem This Source Code Form is subject to the terms of the Mozilla Public +rem License, v. 2.0. If a copy of the MPL was not distributed with this +rem file, You can obtain one at http://mozilla.org/MPL/2.0/. +rem +rem This file incorporates work covered by the following license notice: +rem +rem Licensed to the Apache Software Foundation (ASF) under one or more +rem contributor license agreements. See the NOTICE file distributed +rem with this work for additional information regarding copyright +rem ownership. The ASF licenses this file to you under the Apache +rem License, Version 2.0 (the "License"); you may not use this file +rem except in compliance with the License. You may obtain a copy of +rem the License at http://www.apache.org/licenses/LICENSE-2.0 . +rem + +@echo off +REM This script sets all enviroment variables, which +REM are necessary for building the examples of the Office Development Kit. +REM The Script was developed for the operating systems Windows. +REM The SDK name +REM Example: set OO_SDK_NAME=libreoffice3.4_sdk +set OO_SDK_NAME=libreoffice3.4_sdk + +REM Installation directory of the Software Development Kit. +REM Example: set OO_SDK_HOME=C:\Program Files\LibreOffice 3\sdk +set OO_SDK_HOME= + +REM Office installation directory. +REM Example: set OFFICE_HOME=C:\Program Files\LibreOffice 3 +set OFFICE_HOME= + +REM URE installation directory. +REM Example: set OO_SDK_URE_HOME=C:\Program Files\LibreOffice 3\URE +set OO_SDK_URE_HOME= + +REM Directory of the make command. +REM Example: set OO_SDK_MAKE_HOME=D:\NextGenerationMake\make +set OO_SDK_MAKE_HOME= + +REM Directory of the zip tool. +REM Example: set OO_SDK_ZIP_HOME=D:\infozip\bin +set OO_SDK_ZIP_HOME= + +REM Directory of the C++ compiler. +REM Example:set OO_SDK_CPP_HOME=C:\Program Files\Microsoft Visual Studio 9.0\VC\bin +REM Example:set CPP_WINDOWS_SDK=C:\Program Files\\Microsoft SDKs\Windows\v6.0A\ +set OO_SDK_CPP_HOME= +set CPP_VC8= +set CPP_WINDOWS_SDK= + +REM Directory of the C# and VB.NET compilers. +REM Example:set OO_SDK_CLI_HOME=C:\WINXP\Microsoft.NET\Framework\v1.0.3705 +set OO_SDK_CLI_HOME= + +REM Java SDK installation directory. +REM Example: set OO_SDK_JAVA_HOME=C:\Program Files\Java\jdk1.6.0_05 +set OO_SDK_JAVA_HOME= + +REM Special output directory +REM Example: set OO_SDK_OUT=C:\Program Files\Libreoffice 3\sdk +set OO_SDK_OUT= + +REM Automatic deployment +REM Example: set SDK_AUTO_DEPLOYMENT=YES +set SDK_AUTO_DEPLOYMENT=YES + +REM Check installation path for the StarOffice Development Kit. +if not defined OO_SDK_HOME ( + echo Error: the variable OO_SDK_HOME is missing! + goto :error + ) + +REM Check installation path for the office. +REM if not defined OFFICE_HOME ( +REM if not defined OO_SDK_URE_HOME ( +REM echo Error: either of the variables OFFICE_HOME and +REM echo OO_SDK_URE_HOME is missing! +REM goto :error +REM ) +REM ) + +REM Check installation path for GNU make. +if not defined OO_SDK_MAKE_HOME ( + echo Error: the variable OO_SDK_MAKE_HOME is missing! + goto :error + ) + +REM Check installation path for the zip tool. +if not defined OO_SDK_ZIP_HOME ( + echo Error: the variable OO_SDK_ZIP_HOME is missing! + goto :error + ) + +REM Set library path. +set LIB=%OO_SDK_HOME%\lib;%LIB% +if defined CPP_WINDOWS_SDK ( + set LIB=%LIB%;%CPP_WINDOWS_SDK%\lib + ) + +REM Set office program path. +if defined OFFICE_HOME ( + set OFFICE_PROGRAM_PATH=%OFFICE_HOME%\program + ) + +REM Set UNO path, necessary to ensure that the cpp examples using the +REM new UNO bootstrap mechanism use the configured office installation +REM (only set when using an Office). +if defined OFFICE_HOME ( + set UNO_PATH=%OFFICE_PROGRAM_PATH% + ) + +REM if defined OO_SDK_URE_HOME ( +set OO_SDK_URE_BIN_DIR=%OO_SDK_URE_HOME%\bin +set OO_SDK_URE_LIB_DIR=%OO_SDK_URE_HOME%\bin +set OO_SDK_URE_JAVA_DIR=%OO_SDK_URE_HOME%\java +REM ) else ( +set OO_SDK_OFFICE_BIN_DIR=%OFFICE_PROGRAM_PATH% +set OO_SDK_OFFICE_LIB_DIR=%OFFICE_PROGRAM_PATH% +set OO_SDK_OFFICE_JAVA_DIR=%OFFICE_PROGRAM_PATH%\classes +REM ) + +REM Set classpath +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 +REM if defined OFFICE_HOME ( +REM set CLASSPATH=%CLASSPATH%;%OO_SDK_OFFICE_JAVA_DIR%\unoil.jar +REM ) + +REM Add directory of the SDK tools to the path. +set PATH=%OO_SDK_HOME%\bin;%OO_SDK_URE_BIN_DIR%;%OO_SDK_OFFICE_BIN_DIR%;%OO_SDK_HOME%\WINexample.out\bin;%PATH% + +REM Set PATH appropriate to the output directory +if defined OO_SDK_OUT ( + set PATH=%OO_SDK_OUT%\WINexample.out\bin;%PATH% + ) else ( + set PATH=%OO_SDK_HOME%\WINexample.out\bin;%PATH% + ) + +REM Add directory of the command make to the path, if necessary. +if defined OO_SDK_MAKE_HOME set PATH=%OO_SDK_MAKE_HOME%;%PATH% + +REM Add directory of the zip tool to the path, if necessary. +if defined OO_SDK_ZIP_HOME set PATH=%OO_SDK_ZIP_HOME%;%PATH% + +REM Add directory of the C++ compiler to the path, if necessary. +if defined OO_SDK_CPP_HOME set PATH=%OO_SDK_CPP_HOME%;%PATH% + +REM Add directory of the C# and VB.NET compilers to the path, if necessary. +if defined OO_SDK_CLI_HOME set PATH=%OO_SDK_CLI_HOME%;%PATH% + +REM Add directory of the Java tools to the path, if necessary. +if defined OO_SDK_JAVA_HOME set PATH=%OO_SDK_JAVA_HOME%\bin;%OO_SDK_JAVA_HOME%\jre\bin;%PATH% + +REM Set environment for C++ compiler tools, if necessary. +if defined OO_SDK_CPP_HOME call "%OO_SDK_CPP_HOME%\VCVARS32.bat" + +REM Set tilte to identify the prepared shell. +title Shell prepared for SDK + +REM Prepare shell with all necessary environment variables. +echo. +echo ****************************************************************** +echo * +echo * SDK environment is prepared for Windows +echo * +echo * SDK = %OO_SDK_HOME% +echo * Office = %OFFICE_HOME% +echo * URE = %OO_SDK_URE_HOME% +echo * Make = %OO_SDK_MAKE_HOME% +echo * Zip = %OO_SDK_ZIP_HOME% +echo * C++ Compiler = %OO_SDK_CPP_HOME% +echo * C# and VB.NET compilers = %OO_SDK_CLI_HOME% +echo * Java = %OO_SDK_JAVA_HOME% +echo * Special Output directory = %OO_SDK_OUT% +echo * Auto deployment = %SDK_AUTO_DEPLOYMENT% +echo * +echo ****************************************************************** +echo. +goto end + + :error +Error: Please insert the necessary environment variables into the batch file. + + :end diff --git a/odk/config/setsdkname.bat b/odk/config/setsdkname.bat new file mode 100755 index 000000000000..72cf9cfdbfe0 --- /dev/null +++ b/odk/config/setsdkname.bat @@ -0,0 +1,20 @@ +rem +rem This file is part of the LibreOffice project. +rem +rem This Source Code Form is subject to the terms of the Mozilla Public +rem License, v. 2.0. If a copy of the MPL was not distributed with this +rem file, You can obtain one at http://mozilla.org/MPL/2.0/. +rem +rem This file incorporates work covered by the following license notice: +rem +rem Licensed to the Apache Software Foundation (ASF) under one or more +rem contributor license agreements. See the NOTICE file distributed +rem with this work for additional information regarding copyright +rem ownership. The ASF licenses this file to you under the Apache +rem License, Version 2.0 (the "License"); you may not use this file +rem except in compliance with the License. You may obtain a copy of +rem the License at http://www.apache.org/licenses/LICENSE-2.0 . +rem +@echo off + +set OO_SDK_NAME=%~n1 diff --git a/odk/configure.pl b/odk/configure.pl deleted file mode 100644 index 8cd2a54978dd..000000000000 --- a/odk/configure.pl +++ /dev/null @@ -1,810 +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 . -# -# 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"; -} -$main::OO_SDK_MAKE_HOME_SUGGESTION = searchprog($main::makeName); -$main::makeVersion = "3.79.1"; -$main::correctVersion = 0; - -$main::OO_SDK_ZIP_HOME = ""; -$main::OO_SDK_ZIP_HOME_SUGGESTION = searchprog("zip"); -$main::zipVersion = "2.3"; - -$main::OO_SDK_CPP_HOME = ""; -$main::cppName = "gcc"; -$main::cppVersion = "4.0.1"; -if ( $main::operatingSystem =~ m/solaris/ ) -{ - $main::cppName = "CC"; - $main::cppVersion = "5.2"; -} -$main::OO_SDK_CC_55_OR_HIGHER = ""; -$main::OO_SDK_CPP_HOME_SUGGESTION = searchprog($main::cppName); - -$main::OO_SDK_JAVA_HOME = ""; -$main::OO_SDK_JAVA_BIN_DIR = "bin"; -if ( $main::operatingSystem =~ m/darwin/ ) -{ - $main::OO_SDK_JAVA_BIN_DIR="Commands"; -} -$main::OO_SDK_JAVA_HOME_SUGGESTION = searchprog("javac"); -$main::javaVersion = "1.5.0_01"; - -$main::SDK_AUTO_DEPLOYMENT = ""; -$main::SDK_AUTO_DEPLOYMENT_SUGGESTION = "YES"; - -$main::OO_SDK_OUTPUT_DIR_SUGGESTION = "$ENV{HOME}"; -$main::OO_SDK_OUTPUT_DIR = ""; -$main::skipOutputDir = 0; - -$main::return = 0; - -if ( $main::OFFICE_OR_URE eq "Office" ) -{ - if ( $main::operatingSystem =~ m/darwin/ ) - { -# used for a SDK as part of the office installation -# $main::OFFICE_HOME = `cd $main::sdkpath/../../.. && pwd`; -# chomp($main::OFFICE_HOME); -# print " Used Office = $main::OFFICE_HOME\n"; - print " Used SDK = $main::OO_SDK_HOME\n\n"; - - $main::OFFICE_HOME_SUGGESTION = searchMacOffice(); - while ( (! -d "$main::OFFICE_HOME" ) || - ((-d "$main::OFFICE_HOME") && (! -d "$main::OFFICE_HOME/Contents/MacOS")) ) - { - print " Enter the Office installation directory [$main::OFFICE_HOME_SUGGESTION]: "; - $main::OFFICE_HOME = readStdIn(); - chop($main::OFFICE_HOME); - if ( $main::OFFICE_HOME eq "" ) - { - $main::OFFICE_HOME = $main::OFFICE_HOME_SUGGESTION; - } - - if ( ! -d "$main::OFFICE_HOME" ) - { - $main::OFFICE_HOME = ""; - print " Error: An office installation is required, please specify the path to a valid installation.\n"; - } - - # check more details - if ( -d "$main::OFFICE_HOME/Contents/ure-link" ) { - $main::OO_SDK_URE_HOME = "$main::OFFICE_HOME/Contents/ure-link"; - } else { - $main::OFFICE_HOME = ""; - $main::OO_SDK_URE_HOME = ""; - print " Error: no URE found in office installation, please specify the path to a valid installation.\n"; - } - } - } else - { - $main::OFFICE_HOME_SUGGESTION = searchoffice(); - - if ( $main::OFFICE_HOME_SUGGESTION eq "" ) { - # prepare Office path - $main::OFFICE_HOME_SUGGESTION = searchprog("soffice"); - } - - if ( ! $main::OFFICE_HOME_SUGGESTION eq "" ) - { - my $tmpOffice = readlink "$main::OFFICE_HOME_SUGGESTION/soffice"; - - if ( $tmpOffice eq "" ) - { - $tmpOffice = "$main::OFFICE_HOME_SUGGESTION/soffice"; - } - - my $offset = rindex($tmpOffice, "/program/soffice"); - if ( $offset != -1 ) - { - $main::OFFICE_HOME_SUGGESTION = substr($tmpOffice, 0, $offset); - } else - { - $offset = rindex($tmpOffice, "/soffice"); - if ( $offset != -1 ) - { - $main::OFFICE_HOME_SUGGESTION = substr($tmpOffice, 0, $offset); - } else - { - $main::OFFICE_HOME_SUGGESTION = ""; - } - } - } - - while ( (! -d "$main::OFFICE_HOME" ) || - ((-d "$main::OFFICE_HOME") && (! -d "$main::OFFICE_HOME/program")) ) - { - print " Enter the Office installation directory [$main::OFFICE_HOME_SUGGESTION]: "; - $main::OFFICE_HOME = readStdIn(); - chop($main::OFFICE_HOME); - if ( $main::OFFICE_HOME eq "" ) - { - $main::OFFICE_HOME = $main::OFFICE_HOME_SUGGESTION; - } - - if ( ! -d "$main::OFFICE_HOME" ) - { - $main::OFFICE_HOME = ""; - print " Error: An office installation is required, please specify the path to a valid installation.\n"; - } else - { - # special work for a network installation, no prgram directory but a link to the soffice binary - if ( (! -d "$main::OFFICE_HOME/program") && (-e "$main::OFFICE_HOME/soffice") ) - { - my $soserver = `ls -l $OFFICE_HOME_SUGGESTION/soffice | sed -n 's/.* -> //p'`; - $soserver= substr($soserver, 0, rindex($soserver, "program") - 1); - - if ( ! -d $soserver ) - { - $main::OFFICE_HOME = ""; - print " Error: An office installation is required, please specify the path to a valid installation.\n"; - } else - { - $main::OFFICE_HOME = $soserver; - } - } - } - } - } -} -else -{ - # prepare URE path - $main::OO_SDK_URE_HOME_SUGGESTION = "/opt/openoffice.org/ure"; - $main::OO_SDK_URE_HOME_SUGGESTION = "" unless - -e "$main::OO_SDK_URE_HOME_SUGGESTION/bin/uno"; - for (;;) - { - print " Enter the URE installation directory", - " [$main::OO_SDK_URE_HOME_SUGGESTION]: "; - $main::OO_SDK_URE_HOME = readStdIn(); - chop $main::OO_SDK_URE_HOME; - $main::OO_SDK_URE_HOME = $main::OO_SDK_URE_HOME_SUGGESTION if - $main::OO_SDK_URE_HOME eq "" && - $main::OO_SDK_URE_HOME_SUGGESTION ne ""; - last if -e "$main::OO_SDK_URE_HOME/bin/uno"; - print " Error: A valid URE installation is required.\n"; - } -} - -# prepare GNU make path -while ( (!$main::correctVersion) && - ((! -d "$main::OO_SDK_MAKE_HOME" ) || - ((-d "$main::OO_SDK_MAKE_HOME") && (! -e "$main::OO_SDK_MAKE_HOME/$main::makeName"))) ) -{ - print " Enter GNU make ($main::makeVersion or higher) tools directory [$main::OO_SDK_MAKE_HOME_SUGGESTION]: "; - $main::OO_SDK_MAKE_HOME = readStdIn(); - chop($main::OO_SDK_MAKE_HOME); - if ( $main::OO_SDK_MAKE_HOME eq "" ) - { - $main::OO_SDK_MAKE_HOME = $main::OO_SDK_MAKE_HOME_SUGGESTION; - } - if ( (! -d "$main::OO_SDK_MAKE_HOME") || - ((-d "$main::OO_SDK_MAKE_HOME") && (! -e "$main::OO_SDK_MAKE_HOME/$main::makeName")) ) - { - $main::OO_SDK_MAKE_HOME = ""; - print " Error: GNU make is required, please specify a GNU make tools directory.\n"; - } else - { - #check version - my $testVersion = `$OO_SDK_MAKE_HOME/$main::makeName --version`; - if ( $testVersion eq "") - { - print " Set the environment variable OO_SDK_MAKE_HOME to your GNU build tools directory.\n"; - print " GNU make version $main::makeVersion can be obtained at ftp://ftp.gnu.org/gnu/make/\n"; - } else - { - if ($testVersion =~ m#((\d+\.)+\d+)# ) - { - $testVersion = $1; - } - $main::correctVersion = testVersion($main::makeVersion, $testVersion, "$main::OO_SDK_MAKE_HOME/$main::makeName", 1); - if ( !$main::correctVersion ) - { - print " The '$main::makeName' command found at '$main::OO_SDK_MAKE_HOME' has a wrong version\n"; - $main::OO_SDK_MAKE_HOME = ""; - } - } - } -} - -# prepare zip path -$main::correctVersion = 0; -while ( (!$main::correctVersion) && - ((! -d "$main::OO_SDK_ZIP_HOME" ) || - ((-d "$main::OO_SDK_ZIP_HOME") && (! -e "$main::OO_SDK_ZIP_HOME/zip"))) ) -{ - print " Enter zip ($main::zipVersion or higher) tool directory [$main::OO_SDK_ZIP_HOME_SUGGESTION]: "; - $main::OO_SDK_ZIP_HOME = readStdIn(); - chop($main::OO_SDK_ZIP_HOME); - if ( $main::OO_SDK_ZIP_HOME eq "" ) - { - $main::OO_SDK_ZIP_HOME = $main::OO_SDK_ZIP_HOME_SUGGESTION; - } - if ( (! -d "$main::OO_SDK_ZIP_HOME") || - ((-d "$main::OO_SDK_ZIP_HOME") && (! -e "$main::OO_SDK_ZIP_HOME/zip")) ) - { - $main::OO_SDK_ZIP_HOME = ""; - print " Error: zip tool is required, please specify a zip tool directory.\n"; - } else - { - #check version - my $testVersion = `$OO_SDK_ZIP_HOME/zip -h 2>&1 | egrep Zip | head -n 1`; - $testVersion =~ s#Zip ([\d.]+) .*#$1#go; - if ( $testVersion eq "") - { - print " Set the environment variable OO_SDK_ZIP_HOME to your zip tool directory.\n"; - print " zip version $main::zipVersion can be obtained at ftp://www.info-zip.org/\n"; - } else - { - if ($testVersion =~ m#((\d+\.)+\d+)# ) - { - $testVersion = $1; - } - $main::correctVersion = testVersion($main::zipVersion, $testVersion, "$main::OO_SDK_MAKE_HOME/zip", 1); - if ( !$main::correctVersion ) - { - print " The 'zip' command found at '$main::OO_SDK_ZIP_HOME' has a wrong version\n"; - $main::OO_SDK_ZIP_HOME = ""; - } - } - } -} - -# prepare C++ compiler path -$main::correctVersion = 0; -while ( (!$main::correctVersion) && - ((! -d "$main::OO_SDK_CPP_HOME" ) || - ((-d "$main::OO_SDK_CPP_HOME") && (! -e "$main::OO_SDK_CPP_HOME/$main::cpp"))) ) -{ - print " C++ compilers where for example a language binding exist:\n"; - print " - Solaris, Sun WorkShop 6 update 1 C++ 5.2 2000/09/11 or higher\n"; - print " - Linux, GNU C++ compiler, gcc version 4.0.1 or higher\n"; - print " - MacOS, GNU C++ compiler, gcc version 4.0.1 or higher\n"; - print " Enter the directory of the C++ compiler, the directory\n"; - print " where the compiler is located (optional) [$main::OO_SDK_CPP_HOME_SUGGESTION]: "; - - $main::OO_SDK_CPP_HOME = readStdIn(); - chop($main::OO_SDK_CPP_HOME); - if ( $main::OO_SDK_CPP_HOME eq "" ) - { - $main::OO_SDK_CPP_HOME = $main::OO_SDK_CPP_HOME_SUGGESTION; - } - - if ( ! $main::OO_SDK_CPP_HOME eq "" ) - { - if ( (! -d "$main::OO_SDK_CPP_HOME") || - ((-d "$main::OO_SDK_CPP_HOME") && (! -e "$main::OO_SDK_CPP_HOME/$main::cppName")) ) - { - print " Error: Could not find directory '$main::OO_SDK_CPP_HOME'.\n"; - if ( skipChoice("C++ compiler") == 1 ) - { - $main::correctVersion = 1; - } - $main::OO_SDK_CPP_HOME = ""; - } else - { - #check version - if ( $main::cppName eq "gcc" ) - { - my $testVersion = `$OO_SDK_CPP_HOME/$main::cppName -dumpversion`; - if ( $testVersion eq "") - { - print " The '$main::cppName' command found at $main::OO_SDK_CPP_HOME/$main::cppName is not a "; - print " GNU compiler.\nSet the environment variable OO_SDK_CPP_HOME to your GNU build tools "; - print " directory.\nA GNU compiler version $main::cppVersion can be obtained at "; - print " ftp://ftp.gnu.org/gnu/gcc/\n"; - } else - { - $main::correctVersion = testVersion($main::cppVersion, $testVersion, "$main::OO_SDK_CPP_HOME/$main::cppName", 1); - if ( !$main::correctVersion ) - { - print " The '$main::cppName' command found at '$main::OO_SDK_CPP_HOME' has a wrong version\n"; - if ( skipChoice("C++ compiler") == 1 ) - { - $main::correctVersion = 1; - } - - $main::OO_SDK_CPP_HOME = ""; - } - } - } else - { - # for Solaris we have to check the version too - open(FILE, "$OO_SDK_CPP_HOME/$main::cppName -V 2>&1 |"); - my @lines = ; - my $testVersion = $lines[0]; - if ( $testVersion eq "") - { - print " The '$main::cppName' command found at $main::OO_SDK_CPP_HOME/$main::cppName is not a "; - print " Solaris C++ compiler.\nSet the environment variable OO_SDK_CPP_HOME to your Solaris C++ compiler directory.\n"; - } else - { - if ($testVersion =~ m#((\d+\.)+\d+)# ) - { - $testVersion = $1; - } - $main::correctVersion = testVersion($main::cppVersion, $testVersion, "$main::OO_SDK_CPP_HOME/$main::cppName", 1); - if ( !$main::correctVersion ) - { - print " The '$main::cppName' command found at '$main::OO_SDK_CPP_HOME' has a wrong version\n"; - if ( skipChoice("C++ compiler") == 1 ) - { - $main::correctVersion = 1; - } - - $main::OO_SDK_CPP_HOME = ""; - } else { - $main::correctVersion = testVersion("5.5", $testVersion, "$main::OO_SDK_CPP_HOME/$main::cppName", 2); - if ( $main::correctVersion ) { - $main::OO_SDK_CC_55_OR_HIGHER = $testVersion; - } - } - } - } - } - } else - { - # the C++ compiler is optional - $main::correctVersion = 1; - } -} - - -# prepare Java path -$main::correctVersion = 0; - -# prepare Java suggestion (cut bin or Commands directory to be in the root of the Java SDK) -$main::offset = rindex($main::OO_SDK_JAVA_HOME_SUGGESTION, "/$main::OO_SDK_JAVA_BIN_DIR"); -if ( $main::offset != -1 ) -{ - $main::OO_SDK_JAVA_HOME_SUGGESTION = substr($main::OO_SDK_JAVA_HOME_SUGGESTION, 0, $main::offset); -} - -while ( (!$main::correctVersion) && - ((! -d "$main::OO_SDK_JAVA_HOME" ) || - ((-d "$main::OO_SDK_JAVA_HOME") && (! -e "$main::OO_SDK_JAVA_HOME/$main::OO_SDK_JAVA_BIN_DIR/javac"))) ) -{ - print " Enter Java SDK (1.5, recommendation is 1.6 or higher) installation directory (optional) [$main::OO_SDK_JAVA_HOME_SUGGESTION]: "; - $main::OO_SDK_JAVA_HOME = readStdIn(); - chop($main::OO_SDK_JAVA_HOME); - if ( $main::OO_SDK_JAVA_HOME eq "" ) - { - $main::OO_SDK_JAVA_HOME = $main::OO_SDK_JAVA_HOME_SUGGESTION; - } - if ( ! $main::OO_SDK_JAVA_HOME eq "" ) - { - if ( (! -d "$main::OO_SDK_JAVA_HOME") || - ((-d "$main::OO_SDK_JAVA_HOME") && (! -e "$main::OO_SDK_JAVA_HOME/$main::OO_SDK_JAVA_BIN_DIR/javac")) ) - { - print " Error: Could not find directory '$main::OO_SDK_JAVA_HOME' or '$main::OO_SDK_JAVA_HOME/$main::OO_SDK_JAVA_BIN_DIR/javac'.\n"; - if ( skipChoice("JAVA SDK") == 1 ) - { - $main::correctVersion = 1; - } - $main::OO_SDK_JAVA_HOME = ""; - } else - { - #check version - my $testVersion = `$main::OO_SDK_JAVA_HOME/$main::OO_SDK_JAVA_BIN_DIR/java -version 2>&1 | egrep "java version" | head -n 1 | sed -e 's#.*version "##' | sed -e 's#".*##'`; - $testVersion =~ s#([^\n]+)\n#$1#go; - - $main::correctVersion = testVersion($main::javaVersion, $testVersion, "$main::OO_SDK_JAVA_HOME/$main::OO_SDK_JAVA_BIN_DIR/java", 1); - if ( !$main::correctVersion ) - { - if ( skipChoice("JAVA SDK") == 1 ) - { - $main::correctVersion = 1; - } - $main::OO_SDK_JAVA_HOME = ""; - } - } - }else - { - # the Java SDK is optional - $main::correctVersion = 1; - } -} - - -# prepare output directory (optional) -while ( (!$main::skipOutputDir) && - (! -d "$main::OO_SDK_OUTPUT_DIR") ) -{ - print " Default output directory is in your HOME directory.\n"; - print " Enter an existent directory if you prefer a different output directory (optional) [$main::OO_SDK_OUTPUT_DIR_SUGGESTION]: "; - - $main::OO_SDK_OUTPUT_DIR = readStdIn(); - - chop($main::OO_SDK_OUTPUT_DIR); - if ( $main::OO_SDK_OUTPUT_DIR eq "" ) - { - $main::OO_SDK_OUTPUT_DIR = $main::OO_SDK_OUTPUT_DIR_SUGGESTION; - } - if ( ! $main::OO_SDK_OUTPUT_DIR eq "" ) - { - if ( ! -d "$main::OO_SDK_OUTPUT_DIR" ) - { - print " Error: Could not find directory '$main::OO_SDK_OUTPUT_DIR'.\n"; - if ( skipChoice("optional output directory") == 1 ) - { - $main::skipOutputDir = 1; - } - $main::OO_SDK_OUTPUT_DIR = ""; - } - } else - { - # the output directory is optional - $main::skipOutputDir = 1; - } -} - -# prepare auto deployment -if ( $main::OFFICE_OR_URE eq "Office" ) -{ - while ( $main::SDK_AUTO_DEPLOYMENT eq "" || - ((! $main::SDK_AUTO_DEPLOYMENT eq "YES") && - (! $main::SDK_AUTO_DEPLOYMENT eq "NO")) ) - { - print " Automatic deployment of UNO components (YES/NO) [$main::SDK_AUTO_DEPLOYMENT_SUGGESTION]: "; - $main::SDK_AUTO_DEPLOYMENT = uc ; - chop($main::SDK_AUTO_DEPLOYMENT); - if ( $main::SDK_AUTO_DEPLOYMENT eq "" ) - { - $main::SDK_AUTO_DEPLOYMENT = "YES"; - } - } -} -else -{ - $main::SDK_AUTO_DEPLOYMENT = "NO"; -} - -prepareScriptFile("setsdkenv_unix.sh.in", "setsdkenv_unix.sh", 1); -chmod 0644, "$main::OO_SDK_CONFIG_HOME/$main::hostname/setsdkenv_unix.sh"; - -prepareScriptFile("setsdkenv_unix.csh.in", "setsdkenv_unix.csh", 2); -chmod 0644, "$main::OO_SDK_CONFIG_HOME/$main::hostname/setsdkenv_unix.csh"; - -print "\n"; -print " ************************************************************************\n"; -print " * ... your SDK environment has been prepared.\n"; -print " * For each time you want to use this configured SDK environment, you\n"; -print " * have to run the \"setsdkenv_unix\" script file!\n"; -print " * Alternatively can you source one of the scripts\n"; -print " * \"$main::OO_SDK_CONFIG_HOME/$main::hostname/setsdkenv_unix.sh\"\n"; -print " * \"$main::OO_SDK_CONFIG_HOME/$main::hostname/setsdkenv_unix.csh\"\n"; -print " * to get an environment without starting a new shell.\n"; -print " ************************************************************************\n\n"; - -exit $return; - -sub skipChoice -{ - my $msg = shift; - my $skip = ""; - while ( !( $skip eq "yes" || $skip eq "no") ) - { - print " Do you want to skip the choice of the '$msg' (YES/NO): [YES] "; - $skip = lc ; - chop($skip); - if ( $skip eq "" ) { $skip = "yes"; } # default - if ( $skip eq "yes" ) - { - return 1; - } - } - return 0; -} - -sub resolveLink -{ - my $base= shift; - my $link= shift; - - my $resolvedpath = "$base/$link"; - my $linktarget = readlink "$resolvedpath"; - my $resolvedlink = ""; - - while ( $linktarget ne "") { - - if ( $linktarget =~ m/^\/.*/ ) - { - $resolvedpath = "$linktarget"; - } else { - $resolvedpath = `cd $base/$linktarget; pwd`; - chop $resolvedpath; - } - $base = dirname("$resolvedpath"); - - $linktarget = readlink "$resolvedpath"; - } - - $resolvedlink = `cd $resolvedpath; pwd`; - chop $resolvedlink; - return $resolvedlink; -} - -sub searchprog -{ - my $_search= shift; - my $tmpPath = `echo "\$PATH"`; - my @pathList = split(":" , $tmpPath); - my $progDir = ""; - - if ( $_search eq "javac" ) - { - if ( $main::operatingSystem =~ m/darwin/ ) { - $progDir = resolveLink("/System/Library/Frameworks/JavaVM.Framework/Versions", "CurrentJDK"); - - if ( -e "$progDir/$main::OO_SDK_JAVA_BIN_DIR/javac" ) - { - return "$progDir/$main::OO_SDK_JAVA_BIN_DIR"; - } - } - - if ( $main::operatingSystem =~ m/solaris/ ) { - $progDir = resolveLink("/usr/jdk", "latest"); - if ( -e "$progDir/$main::OO_SDK_JAVA_BIN_DIR/javac" ) - { - return "$progDir/$main::OO_SDK_JAVA_BIN_DIR"; - } - } - } - - if ( $_search eq "gmake" && $main::operatingSystem =~ m/solaris/ ) { - if ( -e "/usr/sfw/bin/gmake" ) - { - return "/usr/sfw/bin"; - } - } - - foreach $i (@pathList) - { - chomp ($i); - - if ( -e "$i/$_search" ) - { - - if ( index($i, "/") == 0 ) - { - # # absolute path; leave unchanged - $progDir = $i; - } else - { - $progDir = `cd "$i"; pwd`; - } - return $progDir - } - } - return $progDir -} - -sub searchMacOffice -{ - if (-d "/Applications/LibreOffice.app" ) { - return "/Applications/LibreOffice.app" - } - if (-d "/Applications/OpenOffice.org.app" ) { - return "/Applications/OpenOffice.org.app" - } - if (-d "/Applications/Oracle Open Office.app" ) { - return "/Applications/Oracle Open Office.app"; - } - if (-d "/Applications/StarOffice.app" ) { - return "/Applications/StarOffice.app"; - } - if (-d "/Applications/StarSuite.app" ) { - return "/Applications/StarSuite.app"; - } - - return ""; -} - -sub searchoffice -{ - my $offset = rindex($main::sdkpath, "/libreoffice"); - my $tmpOffice = substr($main::sdkpath, 0, $offset); - my $officepath = "$tmpOffice/libreoffice"; - -# if ( $main::OO_MINORVERSION > 0) { -# $officepath = "$officepath$main::OO_MINORVERSION"; -# } - - # search corresponding office for this SDK - if (-d $officepath && -e "$officepath/program/soffice") { - return $officepath; - } - # fallback - my $tmpversion = $main::OO_MAJORVERSION; -# if ( $main::OO_MINORVERSION > 0) { -# $tmpversion = "$tmpversion.$main::OO_MINORVERSION"; -# } - - $officepath = "$tmpOffice/oracle_open_office$tmpversion"; - if (-d $officepath && -e "$officepath/program/soffice") { - return $officepath; - } - - my $tmpversion = $main::OO_MAJORVERSION + 6; - if ( $main::OO_MINORVERSION > 0) { - $tmpversion = "$tmpversion.$main::OO_MINORVERSION"; - } - - $officepath = "$tmpOffice/staroffice$tmpversion"; - if (-d $officepath && -e "$officepath/program/soffice") { - return $officepath; - } - $officepath = "$tmpOffice/StarOffice$tmpversion"; - if (-d $officepath && -e "$officepath/program/soffice") { - return $officepath; - } - $officepath = "$tmpOffice/starsuite$tmpversion"; - if (-d $officepath && -e "$officepath/program/soffice") { - return $officepath; - } - $officepath = "$tmpOffice/StarSuite$tmpversion"; - if (-d $officepath && -e "$officepath/program/soffice") { - return $officepath; - } - $officepath = ""; - - # search other potential matching office versions - my $path = "/opt/"; - my $entry = ""; - my $version = "0"; - for $entry (glob($path.'*')) { - ## if the file is a directory - if( -d $entry) { - - if ($entry =~ m#(.+(o|O)ffice(\.org){0,1}(\d([\d\.]){0,2}))# || - $entry =~ m#(.+(s|S)uite(.*)(\d([\d\.]){0,2}))# ) - { - if ($4 > $version) { - $version = $4; - $officepath = $entry; - } - } - } - } - return $officepath; -} - - - -sub testVersion -{ - my $tmpMustBeVersion = shift; - my $tmpTestVersion = shift; - my $toolName = shift; - # 1=check + message 2=check only - my $checkOnly = shift; - my @mustBeVersion = split(/\.|_|-/,$tmpMustBeVersion); - my @testVersion = split(/\.|_|-/,$tmpTestVersion); - my $length = $#mustBeVersion; - - if ($#testVersion < $#mustBeVersion) { - $length = $#testVersion; - } - - for ($i=0; $i <= $length; $i++ ) - { - if ( $testVersion[$i] > $mustBeVersion[$i] ) - { - return 1; # 1 indicates a correct version - } - - if ( $testVersion[$i] < $mustBeVersion[$i] ) - { - if ( $#checkOnly == 1 ) { - print " The command '$toolName' has the version $tmpTestVersion.\n"; - print " The SDK requires at least the version $tmpMustBeVersion.\n"; - } - return 0; - } - } - - return 1; # 1 indicates a correct version -} - -sub readStdIn -{ - my $tmpstdin = ; - if ( index($tmpstdin, "\$") != -1) - { - return `echo $tmpstdin`; - } - - return $tmpstdin; -} - -sub prepareScriptFile() -{ - my $inputFile = shift; - my $outputFile = shift; - # shell mode 1 = sh - # 2 = csh - my $shellMode = shift; - - if ( ! -d "$main::OO_SDK_CONFIG_HOME/$main::hostname" ) - { - system("mkdir -p $main::OO_SDK_CONFIG_HOME/$main::hostname"); - } - - open ( FILEIN, "$main::sdkpath/$inputFile" ) || die "\nERROR: could not open '$main::sdkpath/$inputFile' for reading"; - open ( FILEOUT, ">$main::OO_SDK_CONFIG_HOME/$main::hostname/$outputFile" ) || die "\nERROR: could not open '$main::OO_SDK_CONFIG_HOME/$main::hostname/$outputFile' for writing"; - - while ( ) - { - $_ =~ s#\@OO_SDK_NAME\@#$main::OO_SDK_NAME#go; - $_ =~ s#\@OO_SDK_HOME\@#$main::OO_SDK_HOME#go; - $_ =~ s#\@OFFICE_HOME\@#$main::OFFICE_HOME#go; - $_ =~ s#\@OO_SDK_URE_HOME\@#$main::OO_SDK_URE_HOME#go; - $_ =~ s#\@OO_SDK_MAKE_HOME\@#$main::OO_SDK_MAKE_HOME#go; - $_ =~ s#\@OO_SDK_ZIP_HOME\@#$main::OO_SDK_ZIP_HOME#go; - $_ =~ s#\@OO_SDK_CPP_HOME\@#$main::OO_SDK_CPP_HOME#go; - $_ =~ s#\@OO_SDK_CC_55_OR_HIGHER\@#$main::OO_SDK_CC_55_OR_HIGHER#go; - $_ =~ s#\@OO_SDK_JAVA_HOME\@#$main::OO_SDK_JAVA_HOME#go; - $_ =~ s#\@SDK_AUTO_DEPLOYMENT\@#$main::SDK_AUTO_DEPLOYMENT#go; - $_ =~ s#\@OO_SDK_OUTPUT_DIR\@#$main::OO_SDK_OUTPUT_DIR#go; - - print FILEOUT $_; - } - - close FILEIN; - close FILEOUT; -} diff --git a/odk/inc/makefile.mk b/odk/inc/makefile.mk deleted file mode 100644 index 64ae48c2dde0..000000000000 --- a/odk/inc/makefile.mk +++ /dev/null @@ -1,30 +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 . -# -PRJ=.. - -PRJNAME=odk -TARGET=inc - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk - -# --- Files -------------------------------------------------------- -# --- Targets ------------------------------------------------------- - -.INCLUDE : target.mk diff --git a/odk/pack/checkbin/makefile.mk b/odk/pack/checkbin/makefile.mk deleted file mode 100644 index e9b93d9be8a0..000000000000 --- a/odk/pack/checkbin/makefile.mk +++ /dev/null @@ -1,42 +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 . -# -PRJ=..$/.. -PRJNAME=odk -TARGET=checkbin - -#---------------------------------------------------------------- -.INCLUDE: settings.mk -.INCLUDE: $(PRJ)$/util$/makefile.pmk -#---------------------------------------------------------------- -.IF "$(L10N_framework)"=="" - -ODKCHECKFILE=$(MISC)$/$(TARGET).txt - -all: $(ODKCHECKFILE) - -$(ODKCHECKFILE) : $(SDK_CONTENT_CHECK_FILES) - @echo "" > $(ODKCHECKFILE) -# THE PERL SCRIPT DELETES THE CHECK FILE, WHEN AN ERROR OCCURS - $(PERL) $(PRJ)$/util$/check.pl $(DESTDIR) $(DESTPLATFROM) "$(EXEPOSTFIX)" $(ODKCHECKFILE) -# RAISE AN ERROR WHEN TAG FILE IS NOT THERE ANYMORE - cat $(ODKCHECKFILE) - -.ELSE -pseudo: - -.ENDIF diff --git a/odk/pack/checkidl/makefile.mk b/odk/pack/checkidl/makefile.mk deleted file mode 100644 index b087d919df46..000000000000 --- a/odk/pack/checkidl/makefile.mk +++ /dev/null @@ -1,42 +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 . -# -PRJ=..$/.. -PRJNAME=odk -TARGET=checkidl - -#---------------------------------------------------------------- -.INCLUDE: settings.mk -.INCLUDE: $(PRJ)$/util$/makefile.pmk -#---------------------------------------------------------------- - -.IF "$(L10N_framework)"=="" -ODKCHECKFILE=$(MISC)$/$(TARGET).txt - -all : $(ODKCHECKFILE) - -$(ODKCHECKFILE) : $(SDK_CONTENT_CHECK_FILES) - @echo "" > $(ODKCHECKFILE) -# THE PERL SCRIPT DELETES THE CHECK FILE, WHEN AN ERROR OCCURS - -diff -br $(DESTDIRIDL) $(SOLARIDLDIR) $(PIPEERROR) $(PERL) $(PRJ)$/util$/checkdiff.pl $(ODKCHECKFILE) -# RAISE AN ERROR WHEN TAG FILE IS NOT THERE ANYMORE - cat $(ODKCHECKFILE) - -.ELSE -pseudo: - -.ENDIF diff --git a/odk/pack/checkinc/makefile.mk b/odk/pack/checkinc/makefile.mk deleted file mode 100644 index c413e81da84c..000000000000 --- a/odk/pack/checkinc/makefile.mk +++ /dev/null @@ -1,43 +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 . -# -PRJ=..$/.. -PRJNAME=odk -TARGET=checkinc - -#---------------------------------------------------------------- -.INCLUDE: settings.mk -.INCLUDE: $(PRJ)$/util$/makefile.pmk -#---------------------------------------------------------------- -.IF "$(L10N_framework)"=="" -ODKCHECKFILE=$(MISC)$/$(TARGET).txt - -all : $(ODKCHECKFILE) - -$(ODKCHECKFILE) : $(SDK_CONTENT_CHECK_FILES) - @echo "" > $(ODKCHECKFILE) -# THE PERL SCRIPT DELETES THE CHECK FILE, WHEN AN ERROR OCCURS - -diff -br $(DESTDIRINC)$/osl $(SOLARINCDIR)$/osl $(PIPEERROR) $(PERL) $(PRJ)$/util$/checkdiff.pl $(ODKCHECKFILE) - -diff -br $(DESTDIRINC)$/rtl $(SOLARINCDIR)$/rtl $(PIPEERROR) $(PERL) $(PRJ)$/util$/checkdiff.pl $(ODKCHECKFILE) - -diff -br $(DESTDIRINC)$/sal $(SOLARINCDIR)$/sal $(PIPEERROR) $(PERL) $(PRJ)$/util$/checkdiff.pl $(ODKCHECKFILE) - -diff -br $(DESTDIRINC)$/store $(SOLARINCDIR)$/store $(PIPEERROR) $(PERL) $(PRJ)$/util$/checkdiff.pl $(ODKCHECKFILE) -# RAISE AN ERROR WHEN TAG FILE IS NOT THERE ANYMORE - cat $(ODKCHECKFILE) -.ELSE -pseudo: - -.ENDIF diff --git a/odk/pack/checkinc2/makefile.mk b/odk/pack/checkinc2/makefile.mk deleted file mode 100644 index 27a7a7f4e9d8..000000000000 --- a/odk/pack/checkinc2/makefile.mk +++ /dev/null @@ -1,45 +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 . -# -PRJ=..$/.. -PRJNAME=odk -TARGET=checkinc2 - -#---------------------------------------------------------------- -.INCLUDE: settings.mk -.INCLUDE: $(PRJ)$/util$/makefile.pmk -#---------------------------------------------------------------- -.IF "$(L10N_framework)"=="" -ODKCHECKFILE=$(MISC)$/$(TARGET).txt - -all : $(ODKCHECKFILE) - -$(ODKCHECKFILE) : $(SDK_CONTENT_CHECK_FILES) - @echo "" > $(ODKCHECKFILE) -# THE PERL SCRIPT DELETES THE CHECK FILE, WHEN AN ERROR OCCURS - -diff -br $(DESTDIRINC)$/typelib $(SOLARINCDIR)$/typelib $(PIPEERROR) $(PERL) $(PRJ)$/util$/checkdiff.pl $(ODKCHECKFILE) - -diff -br $(DESTDIRINC)$/uno $(SOLARINCDIR)$/uno $(PIPEERROR) $(PERL) $(PRJ)$/util$/checkdiff.pl $(ODKCHECKFILE) - -diff -br $(DESTDIRINC)$/bridges $(SOLARINCDIR)$/bridges $(PIPEERROR) $(PERL) $(PRJ)$/util$/checkdiff.pl $(ODKCHECKFILE) - -diff -br $(DESTDIRINC)$/cppu $(SOLARINCDIR)$/cppu $(PIPEERROR) $(PERL) $(PRJ)$/util$/checkdiff.pl $(ODKCHECKFILE) - -diff -br $(DESTDIRINC)$/com$/sun$/star$/uno $(SOLARINCDIR)$/com$/sun$/star$/uno $(PIPEERROR) $(PERL) $(PRJ)$/util$/checkdiff.pl $(ODKCHECKFILE) - -diff -br $(DESTDIRINC)$/cppuhelper $(SOLARINCDIR)$/cppuhelper $(PIPEERROR) $(PERL) $(PRJ)$/util$/checkdiff.pl $(ODKCHECKFILE) -# RAISE AN ERROR WHEN TAG FILE IS NOT THERE ANYMORE - cat $(ODKCHECKFILE) -.ELSE -pseudo: - -.ENDIF diff --git a/odk/pack/copying/makefile.mk b/odk/pack/copying/makefile.mk deleted file mode 100644 index bc1df039564a..000000000000 --- a/odk/pack/copying/makefile.mk +++ /dev/null @@ -1,244 +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 . -# - -PRJ=../.. -PRJNAME=odk -TARGET=copying - -#---------------------------------------------------------------- -.INCLUDE: settings.mk -.INCLUDE: $(PRJ)/util/makefile.pmk -#---------------------------------------------------------------- - -IDLLIST:={$(subst,/,/ $(shell @$(FIND) $(IDLOUT)/com -type f))} -DESTIDLLIST={$(subst,$(IDLOUT),$(DESTDIRIDL) $(IDLLIST))} - -DESTINCLUDELIST={$(subst,$(SOLARINCDIR),$(DESTDIRINC) $(INCLUDELIST))} -DESTINCLUDELIST+=$(DESTDIRINC)/udkversion.mk - -DESTINCDIRLIST={$(subst,$(INCOUT),$(DESTDIRINC) $(INCLUDEDIRLIST))} - -IDL_DOCU_INDEX_FILE = $(DESTDIRGENIDLREF)/module-ix.html -IDL_DOCU_CLEANUP_FLAG = $(MISC)/idl_docu_cleanup.flag - -IDL_CHAPTER_REFS=idl_chapter_refs.txt - -EXELIST = \ - $(DESTDIRBIN)/cppumaker$(EXEPOSTFIX) \ - $(DESTDIRBIN)/regcompare$(EXEPOSTFIX) \ - $(DESTDIRBIN)/idlc$(EXEPOSTFIX) \ - $(DESTDIRBIN)/javamaker$(EXEPOSTFIX) \ - $(DESTDIRBIN)/autodoc$(EXEPOSTFIX) \ - $(DESTDIRBIN)/unoapploader$(EXEPOSTFIX) \ - $(DESTDIRBIN)/uno-skeletonmaker$(EXEPOSTFIX) - -.IF "$(SYSTEM_UCPP)" == "" -EXELIST += \ - $(DESTDIRBIN)/ucpp$(EXEPOSTFIX) -.ENDIF - -.IF "$(OS)"=="WNT" -EXELIST += \ - $(DESTDIRBIN)/climaker$(EXEPOSTFIX) -.ENDIF - -.IF "$(OS)"=="WNT" -CLILIST = \ - $(DESTDIRCLI)/cli_basetypes.dll \ - $(DESTDIRCLI)/cli_uretypes.dll \ - $(DESTDIRCLI)/cli_oootypes.dll \ - $(DESTDIRCLI)/cli_ure.dll \ - $(DESTDIRCLI)/cli_cppuhelper.dll -.ENDIF - - -.IF "$(OS)"=="WNT" -LIBLIST = \ - $(DESTDIRLIB)/istore.lib \ - $(DESTDIRLIB)/ireg.lib \ - $(DESTDIRLIB)/isal.lib \ - $(DESTDIRLIB)/isalhelper.lib \ - $(DESTDIRLIB)/icppu.lib \ - $(DESTDIRLIB)/icppuhelper.lib \ - $(DESTDIRLIB)/irmcxt.lib \ - $(DESTDIRLIB)/ipurpenvhelper3MSC.lib -.ENDIF - -.IF "$(OS)"=="LINUX" - LIBLIST = $(DESTDIRLIB)/libsalcpprt.a -.ENDIF - -# note, that inner class files are copied implicitly -DESTCLASSESLIST= \ - $(DESTDIRJAR)/com/sun/star/lib/loader/Loader.class \ - $(DESTDIRJAR)/com/sun/star/lib/loader/InstallationFinder.class \ - $(DESTDIRJAR)/com/sun/star/lib/loader/WinRegKey.class \ - $(DESTDIRJAR)/com/sun/star/lib/loader/WinRegKeyException.class -# $(DESTDIRJAR)/com/sun/star/lib/loader/Loader$$CustomURLClassLoader.class \ -# $(DESTDIRJAR)/com/sun/star/lib/loader/InstallationFinder$$StreamGobbler.class \ - -SETTINGSLIST= \ - $(DESTDIRSETTINGS)/settings.mk \ - $(DESTDIRSETTINGS)/std.mk \ - $(DESTDIRSETTINGS)/stdtarget.mk \ - $(DESTDIRSETTINGS)/dk.mk - - -.IF "$(OS)"=="WNT" -SETTINGSLIST+=$(DESTDIRSETTINGS)/component.uno.def -.ENDIF - -.IF "$(OS)"!="WNT" -SETTINGSLIST+=$(DESTDIRSETTINGS)/component.uno.map -.ENDIF - - -DOCUHTMLFILES+= \ - $(DESTDIR)/index.html \ - $(DESTDIRDOCU)/tools.html \ - $(DESTDIRDOCU)/notsupported.html \ - $(DESTDIRDOCU)/install.html \ - $(DESTDIREXAMPLES)/examples.html \ - $(DESTDIREXAMPLES)/DevelopersGuide/examples.html - -DOCUFILES= \ - $(DOCUHTMLFILES) \ - $(DESTDIRDOCU)/sdk_styles.css \ - $(DESTDIRGENIDLREF)/idl.css \ - $(DESTDIRDOCUIMAGES)/nada.gif \ - $(DESTDIRDOCUIMAGES)/arrow-2.gif \ - $(DESTDIRDOCUIMAGES)/bluball.gif \ - $(DESTDIRDOCUIMAGES)/ooo-main-app_32.png \ - $(DESTDIRDOCUIMAGES)/odk-footer-logo.gif \ - $(DESTDIRDOCUIMAGES)/arrow-1.gif \ - $(DESTDIRDOCUIMAGES)/arrow-3.gif \ - $(DESTDIRDOCUIMAGES)/bg_table.png \ - $(DESTDIRDOCUIMAGES)/bg_table2.png \ - $(DESTDIRDOCUIMAGES)/bg_table3.png \ - $(DESTDIRDOCUIMAGES)/nav_down.png \ - $(DESTDIRDOCUIMAGES)/nav_home.png \ - $(DESTDIRDOCUIMAGES)/nav_left.png \ - $(DESTDIRDOCUIMAGES)/nav_right.png \ - $(DESTDIRDOCUIMAGES)/nav_up.png \ - $(DESTDIRDOCUIMAGES)/sdk_head-1.png \ - $(DESTDIRDOCUIMAGES)/sdk_head-2.png \ - $(DESTDIRDOCUIMAGES)/sdk_line-1.gif \ - $(DESTDIRDOCUIMAGES)/sdk_line-2.gif - -.IF "$(OS)"!="WNT" -INSTALLSCRIPT= \ - $(DESTDIR)/config.guess \ - $(DESTDIR)/config.sub \ - $(DESTDIR)/configure.pl \ - $(DESTDIR)/setsdkenv_unix \ - $(DESTDIR)/setsdkenv_unix.sh.in \ - $(DESTDIR)/setsdkenv_unix.csh.in -.ELSE -INSTALLSCRIPT= \ - $(DESTDIR)/setsdkenv_windows.bat \ - $(DESTDIR)/setsdkenv_windows.template \ - $(DESTDIR)/setsdkname.bat \ - $(DESTDIR)/cfgWin.js -.ENDIF - -DIR_FILE_LIST=\ - $(EXELIST) \ - $(CLILIST) \ - $(LIBLIST) \ - $(SETTINGSLIST) \ - $(DOCUFILES) \ - $(INSTALLSCRIPT) \ - $(DESTIDLLIST) \ - $(DESTINCLUDELIST) \ - $(DESTCLASSESLIST) \ - $(IDL_DOCU_INDEX_FILE) \ - $(CONVERTTAGFLAG) - -.IF "$(OS)"=="MACOSX" -DIR_FILE_LIST += $(DESTDIRBIN)/addsym-macosx.sh -.ENDIF - -.IF "$(SOLAR_JAVA)" != "" -DIR_FILE_LIST += $(DESTDIRJAR)/win/unowinreg.dll -.ENDIF - -DIR_DIRECTORY_LIST:=$(uniq $(DIR_FILE_LIST:d)) -DIR_CREATE_FLAG:=$(MISC)/copying_dirs_created.txt -DIR_FILE_FLAG:=$(MISC)/copying_files.txt - -.IF "$(SOLAR_JAVA)" != "" -# Special work for simple uno bootstrap mechanism -# zip uno loader class files and winreg helper library for later -# use in the build process (e.g. helper tools) -MYZIPTARGET=$(BIN)/uno_loader_classes.zip -MYZIPFLAGS=-u -r -MYZIPDIR=$(DESTDIRJAR) -MYZIPLIST=com/* win/* - -.ENDIF - -#-------------------------------------------------- -# TARGETS -#-------------------------------------------------- - -.IF "$(L10N_framework)"=="" - -all : CLEAN_DKVERSION_CHECK \ - $(DIR_FILE_LIST) \ - $(DIR_FILE_FLAG) \ - -.ENDIF - -#-------------------------------------------------- -# use global rules -#-------------------------------------------------- -.INCLUDE: $(PRJ)/util/odk_rules.pmk - - -CLEANUP_DKVERSION_FILE=$(DESTDIRSETTINGS)/dk.mk - - -CLEAN_DKVERSION_CHECK: - @@-rm -f $(CLEANUP_DKVERSION_FILE) - -$(DESTDIRBIN)/addsym-macosx.sh : addsym-macosx.sh - @@-rm -f $@ - $(MY_TEXTCOPY) $(MY_TEXTCOPY_SOURCEPRE) $< $(MY_TEXTCOPY_TARGETPRE) $@ - -chmod 755 $@ - -$(DESTDIRSETTINGS)/dk.mk : dk.mk - @@-rm -f $@ - -$(MKDIRHIER) $(@:d) - tr -d "\015" < dk.mk | sed -e 's/@@RELEASE@@/$(PRODUCT_RELEASE)/' -e 's/@@BUILDID@@/$(LIBO_VERSION_MAJOR).$(LIBO_VERSION_MINOR).$(LIBO_VERSION_MICRO).$(LIBO_VERSION_PATCH)/'> $@ - -$(IDL_DOCU_CLEANUP_FLAG) : $(IDL_CHAPTER_REFS) $(PRJ)/docs/common/ref/idl.css $(DESTIDLLIST) - @@-$(MY_DELETE_RECURSIVE) $(DESTDIRGENIDLREF) - $(TOUCH) $@ - -$(IDL_DOCU_INDEX_FILE) : $(IDL_DOCU_CLEANUP_FLAG) - -$(MKDIRHIER) $(@:d) - $(MY_AUTODOC) -html $(DESTDIRGENIDLREF) -dvgroot "http://wiki.services.openoffice.org/wiki" \ - -name $(IDLDOCREFNAME) -lg idl -dvgfile $(IDL_CHAPTER_REFS) -t $(DESTDIRIDL) - -rm $(@:d)/idl.css - $(MY_TEXTCOPY) $(MY_TEXTCOPY_SOURCEPRE) $(PRJ)/docs/common/ref/idl.css $(MY_TEXTCOPY_TARGETPRE) $(@:d:d)/idl.css - - -.IF "$(SOLAR_JAVA)" != "" -$(MYZIPTARGET) : $(BIN)/unowinreg.dll $(DESTCLASSESLIST) - cd $(MYZIPDIR) && zip $(MYZIPFLAGS) ../../../bin/$(MYZIPTARGET:b) $(MYZIPLIST) -.ENDIF diff --git a/odk/pack/gendocu/makefile.mk b/odk/pack/gendocu/makefile.mk deleted file mode 100644 index f3e5b080e794..000000000000 --- a/odk/pack/gendocu/makefile.mk +++ /dev/null @@ -1,118 +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 . -# - -PRJ=..$/.. -PRJNAME=odk -TARGET=gendocu - -#---------------------------------------------------------------- -.INCLUDE: settings.mk -.INCLUDE: $(PRJ)$/util$/makefile.pmk -#---------------------------------------------------------------- -.IF "$(L10N_framework)"=="" - -CPPDOCREFNAME="UDK $(UDK_MAJOR).$(UDK_MINOR).$(UDK_MICRO) C/C++ API Reference" -JAVADOCREFNAME="UDK $(UDK_MAJOR).$(UDK_MINOR).$(UDK_MICRO) Java API Reference" - -CPP_DOCU_INDEX_FILE = $(DESTDIRGENCPPREF)$/index.html -JAVA_DOCU_INDEX_FILE = $(DESTDIRGENJAVAREF)$/index.html - -CPP_DOCU_CLEANUP_FLAG = $(MISC)$/cpp_docu_cleanup.flag - -JAVA_SRC_DIR=$(MISC)$/java_src -JAVA_PACKAGES=\ - com.sun.star.comp.helper \ - com.sun.star.lib.uno.helper \ - com.sun.star.lib.unoloader \ - com.sun.star.uno \ - $(JAVA_SRC_DIR)$/com$/sun$/star$/lib$/util$/UrlToFileMapper.java -# com.sun.star.beans \ - -JAVA_SRC_FILES=\ - $(JAVA_SRC_DIR)$/juh_src.zip \ - $(JAVA_SRC_DIR)$/jurt_src.zip \ - $(JAVA_SRC_DIR)$/ridl_src.zip \ - $(JAVA_SRC_DIR)$/unoloader_src.zip - -JAVA_BEAN_SRC_FILES=\ - $(JAVA_SRC_DIR)$/com$/sun$/star$/beans$/ContainerFactory.java \ - $(JAVA_SRC_DIR)$/com$/sun$/star$/beans$/JavaWindowPeerFake.java \ - $(JAVA_SRC_DIR)$/com$/sun$/star$/beans$/LocalOfficeConnection.java \ - $(JAVA_SRC_DIR)$/com$/sun$/star$/beans$/LocalOfficeWindow.java \ - $(JAVA_SRC_DIR)$/com$/sun$/star$/beans$/NativeConnection.java \ - $(JAVA_SRC_DIR)$/com$/sun$/star$/beans$/NativeService.java \ - $(JAVA_SRC_DIR)$/com$/sun$/star$/beans$/OfficeConnection.java \ - $(JAVA_SRC_DIR)$/com$/sun$/star$/beans$/OfficeWindow.java - -JAVADOCPARAMS= -use -splitindex -windowtitle "Java UNO Runtime Reference" -header $(JAVADOCREFNAME) -d $(DESTDIRGENJAVAREF) -sourcepath $(JAVA_SRC_DIR) -classpath $(SOLARBINDIR)$/ridl.jar -linkoffline ../../common/ref ./uno -linkoffline http://java.sun.com/j2se/1.5/docs/api ./java $(JAVA_PACKAGES) -.IF "$(JAVADOCISGJDOC)" != "yes" -JAVADOCPARAMS+= -notimestamp -.ENDIF - -JAVADOCLOG = $(MISC)$/javadoc_log.txt - -all : - -.IF "$(DOXYGEN)" != "" -all : $(CPP_DOCU_INDEX_FILE) -.END - -.IF "$(SOLAR_JAVA)" != "" -all : $(JAVA_DOCU_INDEX_FILE) -.END - -$(CPP_DOCU_CLEANUP_FLAG) : $(INCLUDELIST) Doxyfile main.dox - @@-$(MY_DELETE_RECURSIVE) $(DESTDIRGENCPPREF) - $(TOUCH) $@ - -.IF "$(VERBOSE)" == "TRUE" -MY_QUIET = NO -.ELSE -MY_QUIET = YES -.END - -$(CPP_DOCU_INDEX_FILE) .ERRREMOVE : $(CPP_DOCU_CLEANUP_FLAG) - -$(MKDIRHIER) $(@:d) - $(SED) \ - -e 's!^INPUT = %$$!INPUT = main.dox $(INCLUDETOPDIRLIST) $(INCLUDEFILELIST)!' \ - -e 's!^OUTPUT_DIRECTORY = %$$!OUTPUT_DIRECTORY = $(DESTDIRGENCPPREF)!' \ - -e 's!^PROJECT_BRIEF = %$$!PROJECT_BRIEF = $(CPPDOCREFNAME)!' \ - -e 's!^QUIET = %$$!QUIET = $(MY_QUIET)!' \ - -e 's!^STRIP_FROM_PATH = %$$!STRIP_FROM_PATH = $(SOLARINCDIR)!' \ - Doxyfile > $(MISC)/Doxyfile - $(DOXYGEN) $(MISC)/Doxyfile - -$(JAVA_SRC_FILES) : $(SOLARCOMMONPCKDIR)$/$$(@:f) - -$(MKDIRHIER) $(@:d) - $(MY_COPY) $< $@ - cd $(JAVA_SRC_DIR) && unzip -quo $(@:f) - -#$(JAVA_SRC_DIR)$/com$/sun$/star$/beans$/%.java : $(PRJ)$/source$/bean$/com$/sun$/star$/beans$/%.java -# -$(MKDIRHIER) $(@:d) -# $(MY_COPY) $< $@ - -#$(JAVA_DOCU_INDEX_FILE) .SEQUENTIAL : $(JAVA_SRC_FILES) $(JAVA_BEAN_SRC_FILES) -.IF "$(SOLAR_JAVA)"!="" -$(JAVA_DOCU_INDEX_FILE) .SEQUENTIAL : $(JAVA_SRC_FILES) - -$(MKDIRHIER) $(@:d) - $(JAVADOC) -J-Xmx120m $(JAVADOCPARAMS) > $(JAVADOCLOG) -.ENDIF - -.ELSE -pseudo: -.ENDIF diff --git a/odk/pack/unzip_udk/deltree.txt b/odk/pack/unzip_udk/deltree.txt deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/odk/pack/unzip_udk/makefile.mk b/odk/pack/unzip_udk/makefile.mk deleted file mode 100644 index 61072afc36a9..000000000000 --- a/odk/pack/unzip_udk/makefile.mk +++ /dev/null @@ -1,37 +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 . -# - -PRJ=..$/.. -PRJNAME=odk -TARGET=unzip_udk - -#---------------------------------------------------------------- -.INCLUDE: settings.mk -.INCLUDE: $(PRJ)$/util$/makefile.pmk -#---------------------------------------------------------------- - -all: ..$/misc$/deltree.txt - -..$/misc$/deltree.txt .SETDIR=$(OUT)$/bin : $(PRJ)$/pack$/unzip_udk$/deltree.txt - @@-$(MY_DELETE_RECURSIVE) $(PRODUCT_NAME) - @@-rm -f $(PRODUCT_NAME).zip - @@-$(MY_DELETE_RECURSIVE) $(PRODUCT_NAME2) - @@-rm -f odkidl.zip - @@-rm -f odk_ooidl.zip - @echo "" > ..$/misc$/deltree.txt - diff --git a/odk/prj/build.lst b/odk/prj/build.lst index 78ea3149b8c5..5c324ffae539 100644 --- a/odk/prj/build.lst +++ b/odk/prj/build.lst @@ -1,15 +1,2 @@ od odk :: cppuhelper jurt javaunohelper udkapi ridljar offapi autodoc DESKTOP:unodevtools external NULL -od odk usr1 - all od_mkout NULL -od odk\inc nmake - all od_inc NULL -od odk\source\com\sun\star\lib\loader nmake - all od_loader od_inc NULL -od odk\source\unoapploader\win nmake - n od_unoapploaderwin od_inc NULL -od odk\source\unoapploader\unx nmake - u od_unoapploaderunx od_inc NULL -od odk\source\unowinreg\win nmake - all od_unowinreg od_inc NULL -od odk\pack\unzip_udk nmake - all od_unzip_udk NULL -od odk\pack\copying nmake - all od_copying od_unzip_udk od_loader od_unoapploaderwin.n od_unoapploaderunx.u od_unowinreg NULL -od odk\pack\checkinc nmake - all od_checkinc od_copying NULL -od odk\pack\checkinc2 nmake - all od_checkinc2 od_copying NULL -od odk\pack\checkidl nmake - all od_checkidl od_copying NULL -od odk\pack\gendocu nmake - all od_gendocu od_copying NULL -od odk\pack\checkbin nmake - all od_checkbin od_copying od_gendocu NULL -od odk\util nmake - all od_util od_checkbin od_checkinc od_checkinc2 od_checkidl NULL +od odk\prj nmake - all od_util NULL diff --git a/odk/prj/d.lst b/odk/prj/d.lst index a9337ad25c1c..e69de29bb2d1 100644 --- a/odk/prj/d.lst +++ b/odk/prj/d.lst @@ -1,5 +0,0 @@ -..\%__SRC%\bin\odkcommon.zip %_DEST%\bin\odkcommon.zip - -..\%__SRC%\bin\uno_loader_classes.zip %_DEST%\bin\uno_loader_classes.zip - -..\%__SRC%\bin\odkexamples.zip %COMMON_DEST%\bin\odkexamples.zip diff --git a/odk/prj/dmake b/odk/prj/dmake deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/odk/setsdkenv_unix b/odk/setsdkenv_unix deleted file mode 100755 index cb818d22ae25..000000000000 --- a/odk/setsdkenv_unix +++ /dev/null @@ -1,84 +0,0 @@ -#! /bin/sh -# -# 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 . -# - -OSTYPE=`uname -s` -HOSTNAME=`hostname` -CURRENTDIR=`/bin/pwd` -SDKTMPDIR=`dirname $0` -OO_SDK_HOME=`(cd $SDKTMPDIR && pwd && cd $CURRENTDIR) | head -n 1` -OOVERSION=`cat $OO_SDK_HOME/settings/dk.mk | tail -2 | head -n 1 | cut -d"=" -f2 | cut -d"." -f1,2` -if [ "$OSTYPE" = "Darwin" ] -then - OO_SDK_NAME=`basename $OO_SDK_HOME` -else - OO_SDK_NAME=libreoffice${OOVERSION}_sdk -fi - -export OO_SDK_HOME - -if [ "$1" = "--force-configure" ] -then - if [ -r $HOME/$OO_SDK_NAME/$HOSTNAME/setsdkenv_unix.sh ] - then - rm $HOME/$OO_SDK_NAME/$HOSTNAME/setsdkenv_unix.sh - fi - if [ -r $HOME/$OO_SDK_NAME/$HOSTNAME/setsdkenv_unix.csh ] - then - rm $HOME/$OO_SDK_NAME/$HOSTNAME/setsdkenv_unix.csh - fi - shift -elif [ "$1" = "-h" ] || [ "$1" = "--help" ] || [ -n "$1" ] -then - echo - echo " using: setsdkenv_unix [options]" - echo "" - echo " options:" - echo " --force-configure : force a new configuration of your SDK environment." - echo " Alternatively can you edit your SDK environment scripts directly:" - echo " $HOME/$OO_SDK_NAME/setsdkenv_unix.sh" - echo " $HOME/$OO_SDK_NAME/setsdkenv_unix.csh" - echo " -h, --help : print this help and exit" - echo - exit 1 -fi - -# source the prepared environment and start a new shell -if [ -r $HOME/$OO_SDK_NAME/$HOSTNAME/setsdkenv_unix.sh ] -then - . $HOME/$OO_SDK_NAME/$HOSTNAME/setsdkenv_unix.sh -else - echo - echo " ************************************************************************" - echo " *" - echo " * You have to configure your SDK environment first before you can" - echo " * can use it! The configuration has to be done only once." - echo " *" - echo " ************************************************************************" - echo - - perl $OO_SDK_HOME/configure.pl $HOSTNAME $OO_SDK_HOME $OO_SDK_NAME - - . $HOME/$OO_SDK_NAME/$HOSTNAME/setsdkenv_unix.sh -fi - -"$SHELL" "$@" -echo Shell terminated. - -TERMHEAD=$HOSTNAME -echo "]2;$TERMHEAD" diff --git a/odk/setsdkenv_unix.csh.in b/odk/setsdkenv_unix.csh.in deleted file mode 100644 index c7394146a5a4..000000000000 --- a/odk/setsdkenv_unix.csh.in +++ /dev/null @@ -1,289 +0,0 @@ -#! /bin/csh -# -# 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 sets all enviroment variables, which are necessary for building -# the examples of the Office Development Kit. -# The Script was developed for the operating systems Solaris, Linux and MacOS. - -# The SDK name -setenv OO_SDK_NAME @OO_SDK_NAME@ - -# Installation directory of the Software Development Kit. -# Example: setenv OO_SDK_HOME /opt/libreoffice/basis3.4/sdk -setenv OO_SDK_HOME '@OO_SDK_HOME@' - -# Office installation directory. -# Example: set OFFICE_HOME=/opt/libreoffice -setenv OFFICE_HOME '@OFFICE_HOME@' - -# URE installation directory. -# Example: setenv OO_SDK_URE_HOME /opt/libreoffice/ure -setenv OO_SDK_URE_HOME '@OO_SDK_URE_HOME@' - -# Directory of the make command. -# Example: setenv OO_SDK_MAKE_HOME /usr/bin -setenv OO_SDK_MAKE_HOME @OO_SDK_MAKE_HOME@ - -# Directory of the zip command. -# Example: setenv OO_SDK_ZIP_HOME /usr/bin -setenv OO_SDK_ZIP_HOME @OO_SDK_ZIP_HOME@ - -# Directory of the C++ compiler. -# Example: setenv OO_SDK_CPP_HOME /usr/bin -setenv OO_SDK_CPP_HOME @OO_SDK_CPP_HOME@ - -# Solaris only -setenv OO_SDK_CC_55_OR_HIGHER @OO_SDK_CC_55_OR_HIGHER@ - -# Directory of the Java SDK. -# Example: setenv OO_SDK_JAVA_HOME "/usr/jdk/jdk1.6.0_10" -setenv OO_SDK_JAVA_HOME @OO_SDK_JAVA_HOME@ - -# Special output directory -# Example: setenv OO_SDK_OUTPUT_DIR "$HOME" -setenv OO_SDK_OUTPUT_DIR @OO_SDK_OUTPUT_DIR@ - -# Environment variable to enable auto deployment of example components -# Example: set SDK_AUTO_DEPLOYMENT=YES -setenv SDK_AUTO_DEPLOYMENT @SDK_AUTO_DEPLOYMENT@ - -# Get the operating system. -set sdk_platform=`${OO_SDK_HOME}/config.guess | cut -d"-" -f3,4` - -# Set the directory name. -set programdir=program -set javadir=bin -switch (${sdk_platform}) - case "darwin*": - set programdir="Contents/MacOS" - set javacdir=Commands - breaksw -endsw - - -# Set office program path. -if ( "${OFFICE_HOME}" != "" ) then - setenv OFFICE_PROGRAM_PATH "${OFFICE_HOME}/${programdir}" -endif - - -# Set UNO path, necessary to ensure that the cpp examples using the -# new UNO bootstrap mechanism use the configured office installation. -if ( ${?OFFICE_PROGRAM_PATH} ) then - setenv UNO_PATH "${OFFICE_PROGRAM_PATH}" -endif - -if ( "${OO_SDK_URE_HOME}" != "" ) then - setenv OO_SDK_URE_BIN_DIR "${OO_SDK_URE_HOME}/bin" - setenv OO_SDK_URE_LIB_DIR "${OO_SDK_URE_HOME}/lib" - setenv OO_SDK_URE_JAVA_DIR "${OO_SDK_URE_HOME}/share/java" -else - setenv OO_SDK_URE_BIN_DIR "${OFFICE_PROGRAM_PATH}" - setenv OO_SDK_URE_LIB_DIR "${OFFICE_PROGRAM_PATH}" - setenv OO_SDK_URE_JAVA_DIR "${OFFICE_PROGRAM_PATH}/classes" -endif - -# Set SDK example output directory -setenv OO_SDK_OUT ${OO_SDK_HOME} -if ( $?OO_SDK_OUTPUT_DIR ) then - setenv OO_SDK_OUT ${OO_SDK_OUTPUT_DIR}/${OO_SDK_NAME} -endif - -# check platform and set appropriate variables -switch (`${OO_SDK_HOME}/config.guess | cut -d"-" -f3,4`) - case "solaris*": - if ( `${OO_SDK_HOME}/config.guess | cut -d"-" -f1` == "sparc" ) then - set directoryname=solsparc - set platform=Solaris Sparc - else - set directoryname=solintel - set platform=Solaris Intel - endif - set comid=C52 - set pltfrm=sunpro - set soext=so - set exampleout=SOLARISexample.out - - # set LD_LIBRARY_PATH - if ( $?LD_LIBRARY_PATH == 0) then - setenv LD_LIBRARY_PATH ${OO_SDK_HOME}/lib:${OO_SDK_OUT}/${exampleout}/lib:${OO_SDK_URE_LIB_DIR}:. - else - setenv LD_LIBRARY_PATH ${OO_SDK_HOME}/lib:${OO_SDK_OUT}/${exampleout}/lib:${OO_SDK_URE_LIB_DIR}:.:${LD_LIBRARY_PATH} - endif - breaksw - - case "linux-gnu": - set directoryname=linux - set comid=gcc3 - set pltfrm=gcc - set soext=so - set exampleout=LINUXexample.out - set platform=Linux - - # set LD_LIBRARY_PATH - if ( $?LD_LIBRARY_PATH == 0) then - setenv LD_LIBRARY_PATH ${OO_SDK_HOME}/lib:${OO_SDK_OUT}/${exampleout}/lib:${OO_SDK_URE_LIB_DIR}:. - else - setenv LD_LIBRARY_PATH ${OO_SDK_HOME}/lib:${OO_SDK_OUT}/${exampleout}/lib:${OO_SDK_URE_LIB_DIR}:.:${LD_LIBRARY_PATH} - endif - breaksw - - case "darwin*": - set directoryname=macosx - set comid=gcc3 - set pltfrm=gcc - set soext=dylib - set exampleout=MACOSXexample.out - set platform=MacOSX - - # set DYLD_LIBRARY_PATH - if ( $?DYLD_LIBRARY_PATH == 0) then - setenv DYLD_LIBRARY_PATH ${OO_SDK_OUT}/${directoryname}/lib:${OO_SDK_OUT}/${exampleout}/lib:${OO_SDK_URE_LIB_DIR}:. - else - setenv DYLD_LIBRARY_PATH ${OO_SDK_OUT}/${directoryname}/lib:${OO_SDK_OUT}/${exampleout}/lib:${OO_SDK_URE_LIB_DIR}:.:${DYLD_LIBRARY_PATH} - endif - breaksw - - case "freebsd*": - set directoryname=freebsd - set comid=gcc3 - set pltfrm=gcc - set soext=so - set exampleout=FREEBSDexample.out - set platform=FreeBSD - - # set LD_LIBRARY_PATH - if ( $?LD_LIBRARY_PATH == 0) then - setenv LD_LIBRARY_PATH ${OO_SDK_HOME}/lib:${OO_SDK_OUT}/${exampleout}/lib:${OO_SDK_URE_LIB_DIR}:. - else - setenv LD_LIBRARY_PATH ${OO_SDK_HOME}/lib:${OO_SDK_OUT}/${exampleout}/lib:${OO_SDK_URE_LIB_DIR}:.:${LD_LIBRARY_PATH} - endif - - if ( -e "/sbin/sysctl" ) then - set OSVERSION=`/sbin/sysctl -n kern.osreldate` - else - set OSVERSION=`/usr/sbin/sysctl -n kern.osreldate` - endif - - if ( ${OSVERSION} < 500016 ) then - setenv PTHREAD_CFLAGS -D_THREAD_SAFE - setenv PTHREAD_LIBS -pthread - else if ( ${OSVERSION} < 502102 ) then - setenv PTHREAD_CFLAGS -D_THREAD_SAFE - setenv PTHREAD_LIBS -lc_r - else - setenv PTHREAD_LIBS -pthread - endif - breaksw -endsw - -# set PATH -if ( $?PATH == 0) then - setenv PATH ${OO_SDK_ZIP_HOME}:${OO_SDK_MAKE_HOME}:${OO_SDK_HOME}/bin:${OO_SDK_OUT}/${exampleout}:${OO_SDK_URE_BIN_DIR}:. -else - setenv PATH ${OO_SDK_ZIP_HOME}:${OO_SDK_MAKE_HOME}:${OO_SDK_HOME}/bin:${OO_SDK_OUT}/${exampleout}:${OO_SDK_URE_BIN_DIR}:.:${PATH} -endif - -# Set CLASSPATH -if ( ${?OFFICE_PROGRAM_PATH} ) then - if ( ${?CLASSPATH} == 0 ) then - setenv CLASSPATH "${OFFICE_PROGRAM_PATH}/classes/unoil.jar" - else - setenv CLASSPATH "${OFFICE_PROGRAM_PATH}/classes/unoil.jar:${CLASSPATH}" - endif -endif -if ( $?CLASSPATH == 0) then - setenv 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" -else - setenv 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:${CLASSPATH}" -endif - -if ( $?OO_SDK_CPP_HOME == 0) then - setenv PATH ${OO_SDK_CPP_HOME}:${PATH} -endif - -if ( $?OO_SDK_JAVA_HOME == 0) then - setenv PATH ${OO_SDK_JAVA_HOME}:${PATH} -endif - - -if ( "${platform}" == "MacOSX" ) then -# For URE, prepare symbolic links for libraries: -# Only necessary on MacOSX, on other Unix systems the links are already prepared -# in the SDK installation. - -# cleanup potential old links first - rm -f "${OO_SDK_OUT}/${directoryname}/lib/libuno_cppu.so" \ - "${OO_SDK_OUT}/${directoryname}/lib/libuno_cppuhelper${comid}.${soext}" \ - "${OO_SDK_OUT}/${directoryname}/lib/libuno_sal.${soext}" \ - "${OO_SDK_OUT}/${directoryname}/lib/libuno_salhelper${comid}.${soext}" \ - "${OO_SDK_OUT}/${directoryname}/lib/libuno_purpenvhelper${comid}.${soext}" - - if ( "${OO_SDK_URE_HOME}" != "" ) then - mkdir -p "${OO_SDK_OUT}/${directoryname}/lib" - ln -s "${OO_SDK_URE_LIB_DIR}/libuno_cppu.${soext}.3" \ - "${OO_SDK_OUT}/${directoryname}/lib/libuno_cppu.${soext}" - ln -s "${OO_SDK_URE_LIB_DIR}/libuno_cppuhelper${comid}.${soext}.3" \ - "${OO_SDK_OUT}/${directoryname}/lib/libuno_cppuhelper${comid}.${soext}" - ln -s "${OO_SDK_URE_LIB_DIR}/libuno_sal.${soext}.3" \ - "${OO_SDK_OUT}/${directoryname}/lib/libuno_sal.${soext}" - ln -s "${OO_SDK_URE_LIB_DIR}/libuno_salhelper${comid}.${soext}.3" \ - "${OO_SDK_OUT}/${directoryname}/lib/libuno_salhelper${comid}.${soext}" - ln -s "${OO_SDK_URE_LIB_DIR}/libuno_purpenvhelper${comid}.${soext}.3" \ - "${OO_SDK_OUT}/${directoryname}/lib/libuno_purpenvhelper${comid}.${soext}" - endif -endif - - -echo -echo " ************************************************************************" -echo " *" -echo " * SDK environment is prepared for ${platform}" -echo " *" -echo " * SDK = ${OO_SDK_HOME}" -echo " * Office = ${OFFICE_HOME}" -echo " * URE = ${OO_SDK_URE_HOME}" -echo " * Make = ${OO_SDK_MAKE_HOME}" -echo " * Zip = ${OO_SDK_ZIP_HOME}" -if ( $?OO_SDK_CPP_HOME == 0) then -echo " * C++ Compiler = " -else -echo " * C++ Compiler = ${OO_SDK_CPP_HOME}" -endif -if ( $?OO_SDK_JAVA_HOME == 0) then -echo " * Java = " -else -echo " * Java = ${OO_SDK_JAVA_HOME}" -endif -if ( $?OO_SDK_OUTPUT_DIR == 0) then -echo " * Special Output directory = " -else -echo " * SDK Output directory = ${OO_SDK_OUT}" -endif -echo " * Auto deployment = ${SDK_AUTO_DEPLOYMENT}" -echo " *" -echo " ************************************************************************" - -unset sdkdir -unset directoryname -unset comid -unset exampleout -unset platform - -echo "]2;Shell prepared with the SDK environment" diff --git a/odk/setsdkenv_unix.sh.in b/odk/setsdkenv_unix.sh.in deleted file mode 100644 index 118154822319..000000000000 --- a/odk/setsdkenv_unix.sh.in +++ /dev/null @@ -1,312 +0,0 @@ -#! /bin/sh -# -# 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 starts a new shell and sets all enviroment variables, which -# are necessary for building the examples of the Office Development Kit. -# The Script was developed for the operating systems Solaris, Linux and MacOS. - -# The SDK name -OO_SDK_NAME=@OO_SDK_NAME@ -export OO_SDK_NAME - -# Installation directory of the Software Development Kit. -# Example: OO_SDK_HOME=/opt/libreoffice/basis3.4/sdk -OO_SDK_HOME='@OO_SDK_HOME@' - -# Office installation directory. -# Example: OFFICE_HOME=/opt/libreoffice -OFFICE_HOME='@OFFICE_HOME@' - -# URE installation directory. -# Example: OO_SDK_URE_HOME=/opt/libreoffice/ure -OO_SDK_URE_HOME='@OO_SDK_URE_HOME@' -export OO_SDK_URE_HOME - -# Directory of the make command. -# Example: OO_SDK_MAKE_HOME=/usr/bin -OO_SDK_MAKE_HOME=@OO_SDK_MAKE_HOME@ - -# Directory of the zip command. -# Example: OO_SDK_ZIP_HOME=/usr/bin -OO_SDK_ZIP_HOME=@OO_SDK_ZIP_HOME@ - -# Directory of the C++ compiler. -# Example: OO_SDK_CPP_HOME=/usr/bin -OO_SDK_CPP_HOME=@OO_SDK_CPP_HOME@ - -# Solaris only -OO_SDK_CC_55_OR_HIGHER=@OO_SDK_CC_55_OR_HIGHER@ - -# Directory of the Java SDK. -# Example: OO_SDK_JAVA_HOME=/usr/jdk/jdk1.6.0_10 -OO_SDK_JAVA_HOME=@OO_SDK_JAVA_HOME@ - -# Special output directory -# Example: OO_SDK_OUTPUT_DIR=$HOME -OO_SDK_OUTPUT_DIR=@OO_SDK_OUTPUT_DIR@ - -# Environment variable to enable auto deployment of example components -# Example: SDK_AUTO_DEPLOYMENT=YES -SDK_AUTO_DEPLOYMENT=@SDK_AUTO_DEPLOYMENT@ -export SDK_AUTO_DEPLOYMENT - -# Check installation path for the OpenOffice Development Kit. -if [ -z "${OO_SDK_HOME}" ] -then - echo Error: Please insert a correct value for the variable OO_SDK_HOME. - exit 0 -fi - -export OO_SDK_HOME - -# Check installation path for the office. -if [ -z "${OFFICE_HOME}" ] && [ -z "${OO_SDK_URE_HOME}" ] -then - echo 'Error: Please set either the environment variable OFFICE_HOME or the' - echo 'environment variable OO_SDK_URE_HOME.' - exit 0 -fi - -# Get the operating system. -sdk_platform=`${OO_SDK_HOME}/config.guess | cut -d"-" -f3,4` - -# Set the directory name. -programdir=program -javadir=bin -case ${sdk_platform} in - darwin*) - programdir="Contents/MacOS" - javacdir=Commands - ;; -esac - -# Set office program path (only set when using an Office). -if [ "${OFFICE_HOME}" ] -then - OFFICE_PROGRAM_PATH=${OFFICE_HOME}/${programdir} - export OFFICE_PROGRAM_PATH -fi - - -# Set UNO path, necessary to ensure that the cpp examples using the -# new UNO bootstrap mechanism use the configured office installation (only set -# when using an Office). -if [ "${OFFICE_HOME}" ] -then - UNO_PATH=${OFFICE_PROGRAM_PATH} - export UNO_PATH -fi - -if [ "${OO_SDK_URE_HOME}" ] -then - OO_SDK_URE_BIN_DIR=${OO_SDK_URE_HOME}/bin - OO_SDK_URE_LIB_DIR=${OO_SDK_URE_HOME}/lib - OO_SDK_URE_JAVA_DIR=${OO_SDK_URE_HOME}/share/java -else - OO_SDK_URE_BIN_DIR=${OFFICE_PROGRAM_PATH} - OO_SDK_URE_LIB_DIR=${OFFICE_PROGRAM_PATH} - OO_SDK_URE_JAVA_DIR=${OFFICE_PROGRAM_PATH}/classes -fi -export OO_SDK_URE_BIN_DIR -export OO_SDK_URE_LIB_DIR -export OO_SDK_URE_JAVA_DIR - -OO_SDK_OUT=$OO_SDK_HOME -# Prepare appropriate output directory. -if [ -n "${OO_SDK_OUTPUT_DIR}" ] -then - OO_SDK_OUT=${OO_SDK_OUTPUT_DIR}/${OO_SDK_NAME} - export OO_SDK_OUT -fi - -# Set the directory name. -case ${sdk_platform} in - solaris*) - sdk_proctype=`${OO_SDK_HOME}/config.guess | cut -d"-" -f1` - if [ "${sdk_proctype}" = "sparc" ] - then - directoryname=solsparc - platform='Solaris Sparc' - else - directoryname=solintel - platform='Solaris x86' - fi - comid=C52 - pltfrm=sunpro - soext=so - exampleout=SOLARISexample.out - LD_LIBRARY_PATH=${OO_SDK_HOME}/lib:${OO_SDK_OUT}/${exampleout}/lib:${OO_SDK_URE_LIB_DIR}:.:${LD_LIBRARY_PATH} - export LD_LIBRARY_PATH - ;; - - darwin*) - directoryname=macosx - comid=gcc3 - pltfrm=gcc - soext=dylib - exampleout=MACOSXexample.out - platform=MacOSX - DYLD_LIBRARY_PATH=${OO_SDK_OUT}/${directoryname}/lib:${OO_SDK_OUT}/${exampleout}/lib:${OO_SDK_URE_LIB_DIR}:.:${DYLD_LIBRARY_PATH} - export DYLD_LIBRARY_PATH - ;; - - linux-gnu) - directoryname=linux - comid=gcc3 - pltfrm=gcc - soext=so - exampleout=LINUXexample.out - platform=Linux - LD_LIBRARY_PATH=${OO_SDK_HOME}/lib:${OO_SDK_OUT}/${exampleout}/lib:${OO_SDK_URE_LIB_DIR}:.:${LD_LIBRARY_PATH} - export LD_LIBRARY_PATH - ;; - - freebsd*) - directoryname=freebsd - comid=gcc3 - pltfrm=gcc - soext=so - exampleout=FREEBSDexample.out - platform=FreeBSD - LD_LIBRARY_PATH=${OO_SDK_HOME}/lib:${OO_SDK_OUT}/${exampleout}/lib:${OO_SDK_URE_LIB_DIR}:.:${LD_LIBRARY_PATH} - export LD_LIBRARY_PATH - - if [ -e "/sbin/sysctl" ] - then - OSVERSION=`/sbin/sysctl -n kern.osreldate` - else - OSVERSION=`/usr/sbin/sysctl -n kern.osreldate` - fi - if [ $OSVERSION -lt 500016 ] - then - PTHREAD_CFLAGS=-D_THREAD_SAFE - PTHREAD_LIBS=-pthread - export PTHREAD_CFLAGS - export PTHREAD_LIBS - elif [ $OSVERSION -lt 502102 ] - then - PTHREAD_CFLAGS=-D_THREAD_SAFE - PTHREAD_LIBS=-lc_r - export PTHREAD_CFLAGS - export PTHREAD_LIBS - else - PTHREAD_LIBS=-pthread - export PTHREAD_LIBS - fi - ;; -esac - -# Add directory of the SDK tools to the path. -PATH=${OO_SDK_HOME}/bin:${OO_SDK_OUT}/${exampleout}/bin:${OO_SDK_URE_BIN_DIR}:${OFFICE_PROGRAM_PATH}:.:${PATH} - -# Set the classpath -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:${OFFICE_PROGRAM_PATH}/classes/unoil.jar:${CLASSPATH} -export CLASSPATH - - -# Add directory of the command make to the path, if necessary. -if [ -n "${OO_SDK_MAKE_HOME}" ] -then - PATH=${OO_SDK_MAKE_HOME}:${PATH} - export OO_SDK_MAKE_HOME -fi - -# Add directory of the zip tool to the path, if necessary. -if [ -n "${OO_SDK_ZIP_HOME}" ] -then - PATH=${OO_SDK_ZIP_HOME}:${PATH} - export OO_SDK_ZIP_HOME -fi - -# Add directory of the C++ tools to the path, if necessary. -if [ -n "${OO_SDK_CPP_HOME}" ] -then - PATH=${OO_SDK_CPP_HOME}:${PATH} - export OO_SDK_CPP_HOME - - if [ -n "${OO_SDK_CC_55_OR_HIGHER}" ] - then - export OO_SDK_CC_55_OR_HIGHER - fi -fi - -# Add directory of the Java tools to the path, if necessary. -if [ -n "${OO_SDK_JAVA_HOME}" ] -then - PATH=${OO_SDK_JAVA_HOME}/${javadir}:${PATH} -# JAVA_HOME=${OO_SDK_JAVA_HOME} -# export JAVA_HOME - export OO_SDK_JAVA_HOME - - export PATH -fi - -export PATH - -if [ "${platform}" = "MacOSX" ] -then -# For URE, prepare symbolic links for libraries: -# Only necessary on MacOSX, on other Unix systems the links are already prepared -# in the SDK installation. - -# cleanup potential old links first - rm -f "${OO_SDK_OUT}/${directoryname}/lib/libuno_cppu.${soext}" \ - "${OO_SDK_OUT}/${directoryname}/lib/libuno_cppuhelper${comid}.${soext}" \ - "${OO_SDK_OUT}/${directoryname}/lib/libuno_sal.${soext}" \ - "${OO_SDK_OUT}/${directoryname}/lib/libuno_salhelper${comid}.${soext}" \ - "${OO_SDK_OUT}/${directoryname}/lib/libuno_purpenvhelper${comid}.${soext}" - -# prepare links - if [ "${OO_SDK_URE_HOME}" ] - then - mkdir -p "${OO_SDK_OUT}/${directoryname}/lib" - ln -s "${OO_SDK_URE_LIB_DIR}/libuno_cppu.${soext}.3" \ - "${OO_SDK_OUT}/${directoryname}/lib/libuno_cppu.${soext}" - ln -s "${OO_SDK_URE_LIB_DIR}/libuno_cppuhelper${comid}.${soext}.3" \ - "${OO_SDK_OUT}/${directoryname}/lib/libuno_cppuhelper${comid}.${soext}" - ln -s "${OO_SDK_URE_LIB_DIR}/libuno_sal.${soext}.3" \ - "${OO_SDK_OUT}/${directoryname}/lib/libuno_sal.${soext}" - ln -s "${OO_SDK_URE_LIB_DIR}/libuno_salhelper${comid}.${soext}.3" \ - "${OO_SDK_OUT}/${directoryname}/lib/libuno_salhelper${comid}.${soext}" - ln -s "${OO_SDK_URE_LIB_DIR}/libuno_purpenvhelper${comid}.${soext}.3" \ - "${OO_SDK_OUT}/${directoryname}/lib/libuno_purpenvhelper${comid}.${soext}" - fi -fi - - -# Prepare shell with all necessary environment variables. -echo -echo " ************************************************************************" -echo " *" -echo " * SDK environment is prepared for ${platform}" -echo " *" -echo " * SDK = $OO_SDK_HOME" -echo " * Office = $OFFICE_HOME" -echo " * URE = $OO_SDK_URE_HOME" -echo " * Make = $OO_SDK_MAKE_HOME" -echo " * Zip = $OO_SDK_ZIP_HOME" -echo " * C++ Compiler = $OO_SDK_CPP_HOME" -echo " * Java = $OO_SDK_JAVA_HOME" -echo " * SDK Output directory = $OO_SDK_OUT" -echo " * Auto deployment = $SDK_AUTO_DEPLOYMENT" -echo " *" -echo " ************************************************************************" - -echo "]2;Shell prepared with the SDK environment" - diff --git a/odk/setsdkenv_windows.bat b/odk/setsdkenv_windows.bat deleted file mode 100755 index 249ab5da8ea1..000000000000 --- a/odk/setsdkenv_windows.bat +++ /dev/null @@ -1,82 +0,0 @@ -rem -rem This file is part of the LibreOffice project. -rem -rem This Source Code Form is subject to the terms of the Mozilla Public -rem License, v. 2.0. If a copy of the MPL was not distributed with this -rem file, You can obtain one at http://mozilla.org/MPL/2.0/. -rem -rem This file incorporates work covered by the following license notice: -rem -rem Licensed to the Apache Software Foundation (ASF) under one or more -rem contributor license agreements. See the NOTICE file distributed -rem with this work for additional information regarding copyright -rem ownership. The ASF licenses this file to you under the Apache -rem License, Version 2.0 (the "License"); you may not use this file -rem except in compliance with the License. You may obtain a copy of -rem the License at http://www.apache.org/licenses/LICENSE-2.0 . -rem - -@echo off - -set SDK_DIR_TMP=%~dp0 -set SDK_DIR=%SDK_DIR_TMP:~0,-1% - -if "%@RIGHT[5,%SDK_DIR%]" EQU "~0,-1" ( - set SDK_DIR=%@FULL[%0] - set /A LENGTH=%@LEN[%SDK_DIR%] - 22 - set SDK_DIR=%@LEFT[%LENGTH%,%SDK_DIR%] - unset LENGTH -) - -set OO_SDK_NAME=__SDKNAME__ - -set OO_USER_SDK_DIR=%APPDATA%\%OO_SDK_NAME% -set OO_USER_SDKENV_SCRIPT=%OO_USER_SDK_DIR%\setsdkenv_windows.bat - -if "%1" EQU "--force-configure" ( - if exist "%OO_USER_ENV_SCRIPT%". ( - del "%OO_USER_SDKENV_SCRIPT%" - ) - goto start -) - -if "%1" EQU "-h" goto printhelp -if "%1" EQU "--help" goto printhelp -if "%1" NEQ "" goto printhelp - -:start -cls - -if not exist "%OO_USER_SDKENV_SCRIPT%". ( - echo. - echo ****************************************************************** - echo * - echo * You have to configure your SDK environment first before you can - echo * can use it! The configuration has to be done only once. - echo * - echo ****************************************************************** - echo. - - cscript //I //Nologo "%SDK_DIR%\cfgWin.js" - goto setenv -) - -goto setenv - -:printhelp -echo. -echo using: setsdkenv_windows.bat [options] -echo. -echo options: -echo --force-configure : force a new configuration of your SDK environment. -echo Alternatively can you edit your SDK environment script directly: -echo "%OO_USER_SDKENV_SCRIPT%" -echo -h, --help : print this help and exit -echo. -goto end - - -:setenv -call "%OO_USER_SDKENV_SCRIPT%" - -:end \ No newline at end of file diff --git a/odk/setsdkenv_windows.template b/odk/setsdkenv_windows.template deleted file mode 100755 index 3adfed2dab1c..000000000000 --- a/odk/setsdkenv_windows.template +++ /dev/null @@ -1,186 +0,0 @@ -rem -rem This file is part of the LibreOffice project. -rem -rem This Source Code Form is subject to the terms of the Mozilla Public -rem License, v. 2.0. If a copy of the MPL was not distributed with this -rem file, You can obtain one at http://mozilla.org/MPL/2.0/. -rem -rem This file incorporates work covered by the following license notice: -rem -rem Licensed to the Apache Software Foundation (ASF) under one or more -rem contributor license agreements. See the NOTICE file distributed -rem with this work for additional information regarding copyright -rem ownership. The ASF licenses this file to you under the Apache -rem License, Version 2.0 (the "License"); you may not use this file -rem except in compliance with the License. You may obtain a copy of -rem the License at http://www.apache.org/licenses/LICENSE-2.0 . -rem - -@echo off -REM This script sets all enviroment variables, which -REM are necessary for building the examples of the Office Development Kit. -REM The Script was developed for the operating systems Windows. -REM The SDK name -REM Example: set OO_SDK_NAME=libreoffice3.4_sdk -set OO_SDK_NAME=libreoffice3.4_sdk - -REM Installation directory of the Software Development Kit. -REM Example: set OO_SDK_HOME=C:\Program Files\LibreOffice 3\sdk -set OO_SDK_HOME= - -REM Office installation directory. -REM Example: set OFFICE_HOME=C:\Program Files\LibreOffice 3 -set OFFICE_HOME= - -REM URE installation directory. -REM Example: set OO_SDK_URE_HOME=C:\Program Files\LibreOffice 3\URE -set OO_SDK_URE_HOME= - -REM Directory of the make command. -REM Example: set OO_SDK_MAKE_HOME=D:\NextGenerationMake\make -set OO_SDK_MAKE_HOME= - -REM Directory of the zip tool. -REM Example: set OO_SDK_ZIP_HOME=D:\infozip\bin -set OO_SDK_ZIP_HOME= - -REM Directory of the C++ compiler. -REM Example:set OO_SDK_CPP_HOME=C:\Program Files\Microsoft Visual Studio 9.0\VC\bin -REM Example:set CPP_WINDOWS_SDK=C:\Program Files\\Microsoft SDKs\Windows\v6.0A\ -set OO_SDK_CPP_HOME= -set CPP_VC8= -set CPP_WINDOWS_SDK= - -REM Directory of the C# and VB.NET compilers. -REM Example:set OO_SDK_CLI_HOME=C:\WINXP\Microsoft.NET\Framework\v1.0.3705 -set OO_SDK_CLI_HOME= - -REM Java SDK installation directory. -REM Example: set OO_SDK_JAVA_HOME=C:\Program Files\Java\jdk1.6.0_05 -set OO_SDK_JAVA_HOME= - -REM Special output directory -REM Example: set OO_SDK_OUT=C:\Program Files\Libreoffice 3\sdk -set OO_SDK_OUT= - -REM Automatic deployment -REM Example: set SDK_AUTO_DEPLOYMENT=YES -set SDK_AUTO_DEPLOYMENT=YES - -REM Check installation path for the StarOffice Development Kit. -if not defined OO_SDK_HOME ( - echo Error: the variable OO_SDK_HOME is missing! - goto :error - ) - -REM Check installation path for the office. -REM if not defined OFFICE_HOME ( -REM if not defined OO_SDK_URE_HOME ( -REM echo Error: either of the variables OFFICE_HOME and -REM echo OO_SDK_URE_HOME is missing! -REM goto :error -REM ) -REM ) - -REM Check installation path for GNU make. -if not defined OO_SDK_MAKE_HOME ( - echo Error: the variable OO_SDK_MAKE_HOME is missing! - goto :error - ) - -REM Check installation path for the zip tool. -if not defined OO_SDK_ZIP_HOME ( - echo Error: the variable OO_SDK_ZIP_HOME is missing! - goto :error - ) - -REM Set library path. -set LIB=%OO_SDK_HOME%\lib;%LIB% -if defined CPP_WINDOWS_SDK ( - set LIB=%LIB%;%CPP_WINDOWS_SDK%\lib - ) - -REM Set office program path. -if defined OFFICE_HOME ( - set OFFICE_PROGRAM_PATH=%OFFICE_HOME%\program - ) - -REM Set UNO path, necessary to ensure that the cpp examples using the -REM new UNO bootstrap mechanism use the configured office installation -REM (only set when using an Office). -if defined OFFICE_HOME ( - set UNO_PATH=%OFFICE_PROGRAM_PATH% - ) - -REM if defined OO_SDK_URE_HOME ( -set OO_SDK_URE_BIN_DIR=%OO_SDK_URE_HOME%\bin -set OO_SDK_URE_LIB_DIR=%OO_SDK_URE_HOME%\bin -set OO_SDK_URE_JAVA_DIR=%OO_SDK_URE_HOME%\java -REM ) else ( -set OO_SDK_OFFICE_BIN_DIR=%OFFICE_PROGRAM_PATH% -set OO_SDK_OFFICE_LIB_DIR=%OFFICE_PROGRAM_PATH% -set OO_SDK_OFFICE_JAVA_DIR=%OFFICE_PROGRAM_PATH%\classes -REM ) - -REM Set classpath -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 -REM if defined OFFICE_HOME ( -REM set CLASSPATH=%CLASSPATH%;%OO_SDK_OFFICE_JAVA_DIR%\unoil.jar -REM ) - -REM Add directory of the SDK tools to the path. -set PATH=%OO_SDK_HOME%\bin;%OO_SDK_URE_BIN_DIR%;%OO_SDK_OFFICE_BIN_DIR%;%OO_SDK_HOME%\WINexample.out\bin;%PATH% - -REM Set PATH appropriate to the output directory -if defined OO_SDK_OUT ( - set PATH=%OO_SDK_OUT%\WINexample.out\bin;%PATH% - ) else ( - set PATH=%OO_SDK_HOME%\WINexample.out\bin;%PATH% - ) - -REM Add directory of the command make to the path, if necessary. -if defined OO_SDK_MAKE_HOME set PATH=%OO_SDK_MAKE_HOME%;%PATH% - -REM Add directory of the zip tool to the path, if necessary. -if defined OO_SDK_ZIP_HOME set PATH=%OO_SDK_ZIP_HOME%;%PATH% - -REM Add directory of the C++ compiler to the path, if necessary. -if defined OO_SDK_CPP_HOME set PATH=%OO_SDK_CPP_HOME%;%PATH% - -REM Add directory of the C# and VB.NET compilers to the path, if necessary. -if defined OO_SDK_CLI_HOME set PATH=%OO_SDK_CLI_HOME%;%PATH% - -REM Add directory of the Java tools to the path, if necessary. -if defined OO_SDK_JAVA_HOME set PATH=%OO_SDK_JAVA_HOME%\bin;%OO_SDK_JAVA_HOME%\jre\bin;%PATH% - -REM Set environment for C++ compiler tools, if necessary. -if defined OO_SDK_CPP_HOME call "%OO_SDK_CPP_HOME%\VCVARS32.bat" - -REM Set tilte to identify the prepared shell. -title Shell prepared for SDK - -REM Prepare shell with all necessary environment variables. -echo. -echo ****************************************************************** -echo * -echo * SDK environment is prepared for Windows -echo * -echo * SDK = %OO_SDK_HOME% -echo * Office = %OFFICE_HOME% -echo * URE = %OO_SDK_URE_HOME% -echo * Make = %OO_SDK_MAKE_HOME% -echo * Zip = %OO_SDK_ZIP_HOME% -echo * C++ Compiler = %OO_SDK_CPP_HOME% -echo * C# and VB.NET compilers = %OO_SDK_CLI_HOME% -echo * Java = %OO_SDK_JAVA_HOME% -echo * Special Output directory = %OO_SDK_OUT% -echo * Auto deployment = %SDK_AUTO_DEPLOYMENT% -echo * -echo ****************************************************************** -echo. -goto end - - :error -Error: Please insert the necessary environment variables into the batch file. - - :end diff --git a/odk/setsdkname.bat b/odk/setsdkname.bat deleted file mode 100755 index 72cf9cfdbfe0..000000000000 --- a/odk/setsdkname.bat +++ /dev/null @@ -1,20 +0,0 @@ -rem -rem This file is part of the LibreOffice project. -rem -rem This Source Code Form is subject to the terms of the Mozilla Public -rem License, v. 2.0. If a copy of the MPL was not distributed with this -rem file, You can obtain one at http://mozilla.org/MPL/2.0/. -rem -rem This file incorporates work covered by the following license notice: -rem -rem Licensed to the Apache Software Foundation (ASF) under one or more -rem contributor license agreements. See the NOTICE file distributed -rem with this work for additional information regarding copyright -rem ownership. The ASF licenses this file to you under the Apache -rem License, Version 2.0 (the "License"); you may not use this file -rem except in compliance with the License. You may obtain a copy of -rem the License at http://www.apache.org/licenses/LICENSE-2.0 . -rem -@echo off - -set OO_SDK_NAME=%~n1 diff --git a/odk/source/com/sun/star/lib/loader/makefile.mk b/odk/source/com/sun/star/lib/loader/makefile.mk deleted file mode 100644 index c8d5725fac51..000000000000 --- a/odk/source/com/sun/star/lib/loader/makefile.mk +++ /dev/null @@ -1,47 +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 . -# - -PRJ=..$/..$/..$/..$/..$/.. - -PRJNAME = odk -PACKAGE = com$/sun$/star$/lib$/loader -TARGET = com_sun_star_lib_loader - - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk - -.IF "$(SOLAR_JAVA)"=="" -nojava: - @echo "Not building javaunohelper because Java is disabled" -.ENDIF - -# Files -------------------------------------------------------- - -JAVAFILES= \ - Loader.java\ - InstallationFinder.java\ - WinRegKey.java\ - WinRegKeyException.java - -JAVACLASSFILES= $(foreach,i,$(JAVAFILES) $(CLASSDIR)$/$(PACKAGE)$/$(i:b).class) - -# --- Targets ------------------------------------------------------ - -.INCLUDE : target.mk diff --git a/odk/source/unoapploader/unx/makefile.mk b/odk/source/unoapploader/unx/makefile.mk deleted file mode 100644 index a595df53e25c..000000000000 --- a/odk/source/unoapploader/unx/makefile.mk +++ /dev/null @@ -1,52 +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 . -# - -PRJ=..$/..$/.. - -PRJNAME=odk -TARGET=unoapploader -LIBTARGET=NO - -LIBSALCPPRT= - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk - -# --- Files -------------------------------------------------------- - -.IF "$(COM)"=="GCC" -LINK=$(CC) -.ENDIF - -.IF "$(OS)"!="FREEBSD" && "$(OS)"!="NETBSD" && "$(OS)"!="DRAGONFLY" -STDLIB= -ldl -.ENDIF - - -APP1NOSAL=TRUE -APP1RPATH=NONE - -APP1TARGET= $(TARGET) - -APP1OBJS= $(OBJ)$/unoapploader.obj -APP1STDLIBS=-lfindsofficepath - -# --- Targets ------------------------------------------------------ - -.INCLUDE : target.mk diff --git a/odk/source/unoapploader/win/makefile.mk b/odk/source/unoapploader/win/makefile.mk deleted file mode 100644 index 3c573b40c663..000000000000 --- a/odk/source/unoapploader/win/makefile.mk +++ /dev/null @@ -1,49 +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 . -# - -PRJ=..$/..$/.. - -PRJNAME=odk -TARGET=unoapploader -TARGETTYPE=GUI -LIBTARGET=NO - -DYNAMIC_CRT= -UWINAPILIB= -NO_DEFAULT_STL=true - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk - -# --- Files -------------------------------------------------------- - -APP1NOSAL=TRUE -APP1RPATH=NONE - -APP1TARGET= $(TARGET) - -APP1OBJS= $(OBJ)$/unoapploader.obj -APP1STDLIBS=findsofficepath.lib - -APP1STDLIBS+=\ - $(ADVAPI32LIB) - -# --- Targets ------------------------------------------------------ - -.INCLUDE : target.mk diff --git a/odk/source/unowinreg/win/makefile.mk b/odk/source/unowinreg/win/makefile.mk deleted file mode 100644 index e5fadd3cf2f0..000000000000 --- a/odk/source/unowinreg/win/makefile.mk +++ /dev/null @@ -1,104 +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 . -# - -PRJ=..$/..$/.. - -PRJNAME=odk -TARGET=unowinreg -ENABLE_EXCEPTIONS=TRUE - -NO_DEFAULT_STL=TRUE -USE_DEFFILE=TRUE - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk - -JAVA_INCLUDES:= -I$(JAVA_HOME)/include - -.IF "$(OS)" == "LINUX" -JAVA_INCLUDES+= -I$(JAVA_HOME)/include/linux -.ELIF "$(OS)" == "FREEBSD" -JAVA_INCLUDES+= -I$(JAVA_HOME)/include/freebsd -JAVA_INCLUDES+= -I$(JAVA_HOME)/include/bsd -JAVA_INCLUDES+= -I$(JAVA_HOME)/include/linux -.ELIF "$(OS)" == "NETBSD" -JAVA_INCLUDES+= -I$(JAVA_HOME)/include/netbsd -.ENDIF - -.IF "$(SOLAR_JAVA)"=="" -nojava: - @echo "Not building javaunohelper because Java is disabled" -.ENDIF - -.IF "$(OS)" != "WNT" - -.IF "$(BUILD_UNOWINREG)" == "YES" - -$(BIN)$/unowinreg.dll : unowinreg.cxx - $(MINGWCXX) -Wall -D_JNI_IMPLEMENTATION_ $(JAVA_INCLUDES) \ - -shared -o $(BIN)$/unowinreg.dll unowinreg.cxx \ - -Wl,--kill-at -lkernel32 -ladvapi32 - $(MINGWSTRIP) $(BIN)$/unowinreg.dll - -.ELSE - -$(BIN)$/unowinreg.dll : $(TARFILE_LOCATION)/$(UNOWINREG_DLL) - @@-rm -f $@ - $(GNUCOPY) $< $@ - -.ENDIF - -.ELSE # "$(OS)" != "WNT" -# Always build unowinreg.dll on windows - -# --- Files -------------------------------------------------------- - -SLOFILES = \ - $(SLO)$/unowinreg.obj -SHL1TARGET=$(TARGET) -SHL1LIBS=$(SLB)$/$(TARGET).lib - -#No default libraries -STDSHL= -.IF "$(COM)"=="GCC" -SHL1STDLIBS += -lstdc++ -.IF "$(MINGW_GCCLIB_EH)"=="YES" -SHL1STDLIBS += -lgcc_eh -.ENDIF -SHL1STDLIBS += -lgcc -lmingw32 -lmoldname -lmsvcrt -.ELSE -LINKFLAGS+=-MANIFEST:NO -.ENDIF - -SHL1STDLIBS +=\ - $(KERNEL32LIB)\ - $(ADVAPI32LIB) - -SHL1DEF=$(MISC)$/$(SHL1TARGET).def - -DEF1NAME=$(SHL1TARGET) -DEF1EXPORTFILE=$(TARGET).dxp -DEF1DES=unowinreg - -.ENDIF # "$(OS)" != "WNT" - -# --- Targets ------------------------------------------------------ - -.INCLUDE : target.mk - diff --git a/odk/source/unowinreg/win/unowinreg.def b/odk/source/unowinreg/win/unowinreg.def new file mode 100755 index 000000000000..232261b99fb7 --- /dev/null +++ b/odk/source/unowinreg/win/unowinreg.def @@ -0,0 +1,11 @@ +LIBRARY "unowinreg.dll" +EXPORTS + Java_com_sun_star_lib_loader_WinRegKey_winreg_1RegOpenClassesRoot + Java_com_sun_star_lib_loader_WinRegKey_winreg_1RegOpenCurrentConfig + Java_com_sun_star_lib_loader_WinRegKey_winreg_1RegOpenCurrentUser + Java_com_sun_star_lib_loader_WinRegKey_winreg_1RegOpenLocalMachine + Java_com_sun_star_lib_loader_WinRegKey_winreg_1RegOpenUsers + Java_com_sun_star_lib_loader_WinRegKey_winreg_1RegOpenKeyEx + Java_com_sun_star_lib_loader_WinRegKey_winreg_1RegCloseKey + Java_com_sun_star_lib_loader_WinRegKey_winreg_1RegQueryValueEx + Java_com_sun_star_lib_loader_WinRegKey_winreg_1RegQueryInfoKey diff --git a/odk/source/unowinreg/win/unowinreg.dxp b/odk/source/unowinreg/win/unowinreg.dxp deleted file mode 100644 index af44919d42a9..000000000000 --- a/odk/source/unowinreg/win/unowinreg.dxp +++ /dev/null @@ -1,9 +0,0 @@ -Java_com_sun_star_lib_loader_WinRegKey_winreg_1RegOpenClassesRoot -Java_com_sun_star_lib_loader_WinRegKey_winreg_1RegOpenCurrentConfig -Java_com_sun_star_lib_loader_WinRegKey_winreg_1RegOpenCurrentUser -Java_com_sun_star_lib_loader_WinRegKey_winreg_1RegOpenLocalMachine -Java_com_sun_star_lib_loader_WinRegKey_winreg_1RegOpenUsers -Java_com_sun_star_lib_loader_WinRegKey_winreg_1RegOpenKeyEx -Java_com_sun_star_lib_loader_WinRegKey_winreg_1RegCloseKey -Java_com_sun_star_lib_loader_WinRegKey_winreg_1RegQueryValueEx -Java_com_sun_star_lib_loader_WinRegKey_winreg_1RegQueryInfoKey diff --git a/odk/util/delzip b/odk/util/delzip deleted file mode 100644 index 8b137891791f..000000000000 --- a/odk/util/delzip +++ /dev/null @@ -1 +0,0 @@ - diff --git a/odk/util/makefile.mk b/odk/util/makefile.mk deleted file mode 100644 index f868ca04345d..000000000000 --- a/odk/util/makefile.mk +++ /dev/null @@ -1,75 +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 . -# - -PRJ=.. -PRJNAME=odk -TARGET=odk - -# ------------------------------------------------------------------ -.INCLUDE: settings.mk -.INCLUDE: makefile.pmk -# ------------------------------------------------------------------ -.IF "$(L10N_framework)"=="" - -ZIP1TARGET=odkexamples -ZIP1FLAGS=-u -r -ZIP1DIR=$(PRJ) -ZIP1LIST=examples -x "*.svn*" -x "*CVS*" -x "*makefile.mk" -x "*Inspector*" -x "*Container1*" -x "*Storage*" -x "*register_component*" -x "*examples.html" -x "*ConverterServlet*" -x "*NotesAccess*" -x "*delphi*" - -.ENDIF - -.INCLUDE : target.mk -.IF "$(L10N_framework)"=="" -ALLTAR:\ - $(BIN)$/$(PRODUCTZIPFILE) -# $(BIN)$/odk_oo.zip -.ENDIF - -$(BIN)$/$(PRODUCTZIPFILE) : $(SDK_CONTENT_CHECK_FILES) $(SDK_CHECK_FLAGS) - cd $(BIN)$/$(PRODUCT_NAME) && zip -urq ..$/$(PRODUCTZIPFILE) . $(CHECKZIPRESULT) -# cd $(BIN)$/$(PRODUCT_NAME) && zip -urq ..$/$(PRODUCTZIPFILE) . -x "idl/*" $(CHECKZIPRESULT) -# cd $(BIN)$/$(PRODUCT_NAME) && zip -urq ..$/odkidl.zip idl/* $(CHECKZIPRESULT) - -ODK_OO_FILES=\ - $(PRJ)$/index.html \ - $(PRJ)$/docs$/tools.html \ - $(PRJ)$/docs$/notsupported.html \ - $(PRJ)$/docs$/install.html \ - $(PRJ)$/docs$/sdk_styles.css \ - $(PRJ)$/docs$/images$/arrow-1.gif \ - $(PRJ)$/docs$/images$/arrow-3.gif \ - $(PRJ)$/docs$/images$/bg_table.gif \ - $(PRJ)$/docs$/images$/bg_table2.gif \ - $(PRJ)$/docs$/images$/bg_table3.gif \ - $(PRJ)$/docs$/images$/nav_down.png \ - $(PRJ)$/docs$/images$/nav_home.png \ - $(PRJ)$/docs$/images$/nav_left.png \ - $(PRJ)$/docs$/images$/nav_right.png \ - $(PRJ)$/docs$/images$/nav_up.png \ - $(PRJ)$/docs$/images$/sdk_head-1.gif \ - $(PRJ)$/docs$/images$/sdk_head-2.gif \ - $(PRJ)$/docs$/images$/sdk_head-3.gif \ - $(PRJ)$/docs$/images$/sdk_line-1.gif \ - $(PRJ)$/docs$/images$/sdk_line-2.gif \ - $(PRJ)$/examples$/examples.html \ - $(PRJ)$/examples$/DevelopersGuide$/examples.html - - -$(BIN)$/odk_oo.zip : $(ODK_OO_FILES) - cd $(PRJ) && zip -urq $(subst,$(PRJ)$/, $(BIN)$/odk_oo.zip) $(subst,$(PRJ)$/, $<) $(CHECKZIPRESULT) - diff --git a/odk/util/makefile.pmk b/odk/util/makefile.pmk deleted file mode 100644 index 31e526ffab98..000000000000 --- a/odk/util/makefile.pmk +++ /dev/null @@ -1,186 +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 . -# - -# used for sdk common files -PRODUCT_RELEASE=$(PRODUCTVERSION) -OFFICENAME=LibreOffice -SDKDIRNAME=libreoffice$(PRODUCT_RELEASE)_sdk -OFFICEPRODUCTNAME=$(OFFICENAME) $(PRODUCT_RELEASE) -TITLE=$(OFFICENAME) $(PRODUCT_RELEASE) SDK -IDLDOCREFNAME="$(OFFICENAME) $(PRODUCT_RELEASE) API" - -PRODUCT_NAME=odkcommon -PRODUCTZIPFILE=$(PRODUCT_NAME).zip - -DESTDIR=$(OUT)/bin/$(PRODUCT_NAME) -DESTDIRBIN=$(DESTDIR)/bin -DESTDIRLIB=$(DESTDIR)/lib -DESTDIRDLL=$(DESTDIRLIB) -DESTDIRIDL=$(DESTDIR)/idl -DESTDIRINC=$(DESTDIR)/include -DESTDIRJAR=$(DESTDIR)/classes -DESTDIRSETTINGS=$(DESTDIR)/settings -DESTDIREXAMPLES=$(DESTDIR)/examples -DESTDIRCLASSES=$(DESTDIR)/classes -DESTDIRDOCU=$(DESTDIR)/docs -DESTDIRCOMMONDOCU=$(DESTDIRDOCU)/common -DESTDIRGENIDLREF=$(DESTDIRCOMMONDOCU)/ref -DESTDIRDOCUIMAGES=$(DESTDIRDOCU)/images -DESTDIRCPPDOCU=$(DESTDIRDOCU)/cpp -DESTDIRGENCPPREF=$(DESTDIRDOCU)/cpp/ref -DESTDIRJAVADOCU=$(DESTDIRDOCU)/java -DESTDIRGENJAVAREF=$(DESTDIRDOCU)/java/ref - -.IF "$(CROSS_COMPILING)" == "YES" -BINOUT=$(SOLARVERSION)/$(INPATH)/bin -.ELSE -BINOUT=$(SOLARBINDIR) -.ENDIF -INCOUT=$(SOLARINCDIR) -IDLOUT=$(SOLARIDLDIR) -XMLOUT=$(SOLARXMLDIR) -LIBOUT=$(SOLARLIBDIR) - -MY_AUTODOC=$(AUGMENT_LIBRARY_PATH) $(WRAPCMD) $(SOLARBINDIR)/autodoc - -.IF "$(OS)"=="FREEBSD" || "$(OS)"=="NETBSD" || "$(OS)"=="MACOSX" || \ - "$(OS)"=="AIX" || "$(OS)"=="DRAGONFLY" -MY_COPY=$(GNUCOPY) -MY_COPY_RECURSIVE=$(GNUCOPY) -R -.ELSE -MY_COPY=$(GNUCOPY) -u -MY_COPY_RECURSIVE=$(GNUCOPY) -urf -.ENDIF - -MY_DELETE_RECURSIVE=rm -rf -MY_TEXTCOPY=@cp - -.IF "$(OS)"=="WNT" -#-------------------- -# WNT ONLY -#-------------------- - -MY_DLLPREFIX= -MY_DLLPOSTFIX=.dll -MY_DLLOUT=$(OUT)/bin -EXEPOSTFIX=.exe -DLLOUT=$(SOLARBINDIR) -DESTDIRCPPEXAMPLES=$(DESTDIR)/examples/cpp - -.IF "$(COM)"=="GCC" -DESTPLATFROM=mingw -.ELSE -DESTPLATFROM=windows -.ENDIF -DESTDIRDLL=$(DESTDIRBIN) -DESTDIRCLI=$(DESTDIR)/cli - -.ELSE -#-------------------- - -MY_DLLPREFIX=lib -.IF "$(OS)"=="MACOSX" -MY_DLLPOSTFIX=.dylib -.ELSE -MY_DLLPOSTFIX=.so -.ENDIF -MY_DLLOUT=$(OUT)/lib -DLLOUT=$(SOLARLIBDIR) - -.IF "$(OS)$(CPUNAME)"=="SOLARISSPARC" -# SOLARIS SPARC -DESTPLATFROM=solsparc - -.ELIF "$(OS)$(CPU)"=="SOLARISU" -# SOLARIS SPARC 64 -DESTPLATFROM=solsparc64 - -.ELIF "$(OS)$(CPUNAME)"=="SOLARISINTEL" -# SOLARIS INTEL -DESTPLATFROM=solintel - -.ELIF "$(OS)"=="LINUX" -# LINUX -DESTPLATFROM=linux - -.ELIF "$(OS)"=="NETBSD" -# NETBSD -DESTPLATFROM=netbsd - -.ELIF "$(OS)"=="FREEBSD" -# FREEBSD -DESTPLATFROM=freebsd - -.ELIF "$(OS)"=="DRAGONFLY" -DESTPLATFROM=dragonfly - -.ELIF "$(OS)"=="MACOSX" -# MACOSX -DESTPLATFROM=macosx - -.ELIF "$(OS)"=="AIX" -# MACOSX -DESTPLATFROM=aix - -.ENDIF - -.ENDIF - - -INCLUDETOPDIRLIST= \ - $(INCOUT)/sal \ - $(INCOUT)/salhelper \ - $(INCOUT)/rtl \ - $(INCOUT)/osl \ - $(INCOUT)/store \ - $(INCOUT)/typelib \ - $(INCOUT)/uno \ - $(INCOUT)/cppu \ - $(INCOUT)/cppuhelper \ - $(INCOUT)/registry - -.IF "$(OS)"=="WNT" -INCLUDETOPDIRLIST += $(INCOUT)/systools -.ENDIF - -INCLUDEDIRLIST:={$(subst,/,/ $(shell @$(FIND) $(INCLUDETOPDIRLIST) -type d -print))} - -INCLUDEFILELIST=\ - $(INCOUT)/com/sun/star/uno/Any.h \ - $(INCOUT)/com/sun/star/uno/Any.hxx \ - $(INCOUT)/com/sun/star/uno/genfunc.h \ - $(INCOUT)/com/sun/star/uno/genfunc.hxx \ - $(INCOUT)/com/sun/star/uno/Reference.h \ - $(INCOUT)/com/sun/star/uno/Reference.hxx \ - $(INCOUT)/com/sun/star/uno/Sequence.h \ - $(INCOUT)/com/sun/star/uno/Sequence.hxx \ - $(INCOUT)/com/sun/star/uno/Type.h \ - $(INCOUT)/com/sun/star/uno/Type.hxx - -INCLUDELIST:=\ - {$(shell @$(FIND) $(INCLUDETOPDIRLIST) -type f ! \( -name "*~" -o -name "*build.lst" -o -name "*deliver.log" \) -print)} \ - $(INCLUDEFILELIST) - -SDK_CONTENT_CHECK_FILES= \ - $(MISC)/copying_files.txt - -SDK_CHECK_FLAGS= \ - $(MISC)/checkbin.txt \ - $(MISC)/checkidl.txt \ - $(MISC)/checkinc.txt \ - $(MISC)/checkinc2.txt diff --git a/odk/util/odk_rules.pmk b/odk/util/odk_rules.pmk deleted file mode 100644 index bd819425e66b..000000000000 --- a/odk/util/odk_rules.pmk +++ /dev/null @@ -1,168 +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 . -# - - -$(DESTDIRDOCU)/%.html : $(PRJ)/docs/%.html - @@-rm -f $@ - tr -d "\015" < $< | sed -e 's/%PRODUCT_RELEASE%/$(PRODUCT_RELEASE)/g' > $@ - -$(DESTDIREXAMPLES)/%.html : $(PRJ)/examples/%.html - @@-rm -f $@ - tr -d "\015" < $< | sed -e 's/%PRODUCT_RELEASE%/$(PRODUCT_RELEASE)/g' > $@ - -$(DESTDIR)/index.html : $(PRJ)/index.html - @@-rm -f $@ - tr -d "\015" < $< | sed -e 's/%PRODUCT_RELEASE%/$(PRODUCT_RELEASE)/g' > $@ - -$(DESTDIRDOCU)/%.css : $(PRJ)/docs/%.css - @@-rm -f $@ - $(MY_TEXTCOPY) $< $@ - -$(DESTDIRDOCUIMAGES)/% : $(PRJ)/docs/images/% - @@-rm -f $@ - $(MY_COPY) $< $@ - -$(DESTDIR)/configure : $(PRJ)/configure - @@-rm -f $@ - $(MY_TEXTCOPY) $(PRJ)/configure $@ - -$(DESTDIR)/configure.pl : $(PRJ)/configure.pl - @@-rm -f $@ - $(MY_TEXTCOPY) $(PRJ)/configure.pl $@ - -$(DESTDIR)/config.guess : $(SRC_ROOT)/config.guess - @@-rm -f $@ - $(MY_TEXTCOPY) $(SRC_ROOT)/config.guess $@ - -$(DESTDIR)/config.sub : $(SRC_ROOT)/config.sub - @@-rm -f $@ - $(MY_TEXTCOPY) $(SRC_ROOT)/config.sub $@ - -$(DESTDIR)/setsdkenv_unix : $(PRJ)/setsdkenv_unix - @@-rm -f $@ - $(MY_TEXTCOPY) $< $@ - -$(DESTDIR)/setsdkenv_unix.%.in : $(PRJ)/setsdkenv_unix.%.in - @@-rm -f $@ - $(MY_TEXTCOPY) $< $@ - -$(DESTDIR)/setsdkenv_windows.bat : $(PRJ)/setsdkenv_windows.bat - @@-rm -f $@ - $(TYPE) $< | $(SED) 's#__SDKNAME__#$(SDKDIRNAME)#' > $@ - -$(DESTDIR)/%.bat : $(PRJ)/%.bat - @@-rm -f $@ - $(MY_TEXTCOPY) $< $@ - -$(DESTDIR)/setsdkenv_windows.template : $(PRJ)/setsdkenv_windows.template - @@-rm -f $@ - $(MY_TEXTCOPY) $< $@ - -$(DESTDIR)/cfgWin.js : $(PRJ)/cfgWin.js - @@-rm -f $@ - $(MY_TEXTCOPY) $(PRJ)/cfgWin.js $@ - -$(DESTDIRSETTINGS)/%.mk : $(PRJ)/settings/%.mk - @@-rm -f $@ - $(MY_TEXTCOPY) $< $@ - -$(DESTDIRBIN)/%$(EXEPOSTFIX) : $(BINOUT)/%$(EXEPOSTFIX) - @@-rm -f $@ - $(GNUCOPY) $(BINOUT)/$(@:f) $@ - -$(DESTDIRBIN)/%.bin : $(BINOUT)/%.bin - @@-rm -f $@ - $(GNUCOPY) $(BINOUT)/$(@:f) $@ - -$(DESTDIRBIN)/unoapploader$(EXEPOSTFIX) : $(BIN)/unoapploader$(EXEPOSTFIX) - @@-rm -f $@ - $(GNUCOPY) $(BIN)/$(@:f) $@ - -# special rule for special Java UNO native library -# (used for all platforms but built only under windows; -# otherwise provided in external) -$(DESTDIRJAR)/win/unowinreg.dll : $(BIN)/unowinreg.dll - @@-rm -f $@ - $(GNUCOPY) $< $@ - -$(DESTDIRCLI)/%.dll : $(BINOUT)/%.dll - @@-rm -f $@ - $(GNUCOPY) $< $@ - -$(DESTDIRDLL)/%$(MY_DLLPOSTFIX) : $(DLLOUT)/%$(MY_DLLPOSTFIX) - @@-rm -f $@ - $(GNUCOPY) $(DLLOUT)/$(@:f) $@ - -$(DESTDIRJAR)/com/sun/star/lib/loader/%.class : $(CLASSDIR)/com/sun/star/lib/loader/%.class - @@-$(RM) $(@:db).class - $(COPY) $(<:db).class $(@:d) -# deal with subclasses - @@-$(RM) $(@:db)$(EMQ)$$*.class - -$(COPY) $(<:db)$(EMQ)$$*.class $(@:d) - -$(DESTDIRIDL)/% : $(IDLOUT)/% - $(MY_TEXTCOPY) $< $@ - -$(DESTDIRINC)/udkversion.mk : - @@-rm -f $@ - @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) >> $@ - -$(DESTDIRINC)/% : $(INCOUT)/% - $(MY_TEXTCOPY) $< $@ - -$(DESTDIRLIB)/%.lib : $(LIBOUT)/%.lib - @@-rm -f $@ - $(GNUCOPY) $(LIBOUT)/$(@:f) $@ - -$(DESTDIRLIB)/%.a : $(LIBOUT)/%.a - @@-rm -f $@ - $(GNUCOPY) $(LIBOUT)/$(@:f) $@ - -$(DIR_CREATE_FLAG) : - $(TYPE) $(mktmp $(DIR_DIRECTORY_LIST)) | xargs -n 20 $(MKDIRHIER) && echo "dirs created" > $@ && touch $@ - $(DELAY) 2 - -$(DESTDIRSETTINGS)/component.uno.def : $(PRJ)/settings/component.uno.def - @@-rm -f $@ - $(MY_TEXTCOPY) $< $@ - -$(DESTDIRSETTINGS)/component.uno.map : $(SOLARENV)/bin/addsym.awk $(SOLARENV)/src/component.map - @@-$(RM) -f $@ -.IF "$(COMID)"=="gcc3" - tr -d "\015" < $(SOLARENV)/src/component.map | $(AWK) -f $(SOLARENV)/bin/addsym.awk > $@ -.IF "$(OS)"=="MACOSX" - tr -d "\015" < $(SOLARENV)/src/component.map | tail -n +3 | head -3 | sed -e 's/.*component/_component/g' -e 's/;[ ]*//' > $@ -.ENDIF -.ELSE # "$(COMID)"=="gcc3" - tr -d "\015" < $(SOLARENV)/src/component.map > $@ -.ENDIF # "$(COMID)"=="gcc3" - @chmod 664 $@ - -$(DIR_FILE_LIST) : $(DIR_CREATE_FLAG) - -$(DIR_FILE_FLAG) : $(DIR_FILE_LIST) - @echo "must be zipped" > $@ - - - diff --git a/postprocess/prj/build.lst b/postprocess/prj/build.lst index 2445a52050f2..a494d1ce53a7 100644 --- a/postprocess/prj/build.lst +++ b/postprocess/prj/build.lst @@ -1,2 +1,2 @@ -po postprocess :: HELP:helpcontent2 ODK:odk tail_build NULL +po postprocess :: HELP:helpcontent2 tail_build NULL po postprocess\prj nmake - all po_prj NULL diff --git a/solenv/gbuild/Zip.mk b/solenv/gbuild/Zip.mk index f446415babc3..a5226157d768 100644 --- a/solenv/gbuild/Zip.mk +++ b/solenv/gbuild/Zip.mk @@ -47,8 +47,11 @@ $(call gb_Zip_get_clean_target,%) : $(call gb_Zip_get_target,%) : $(call gb_Output_announce,$*,$(true),ZIP,3) $(call gb_Helper_abbreviate_dirs,\ + RESPONSEFILE=$(call var2file,$(shell $(gb_MKTEMP)),500,\ + $(FILES)) && \ mkdir -p $(dir $(call gb_Zip_get_target,$*)) && \ - cd $(LOCATION) && $(gb_Zip_ZIPCOMMAND) -rX --filesync $(call gb_Zip_get_target,$*) $(FILES) ) + cd $(LOCATION) && cat $${RESPONSEFILE} | tr "[:space:]" "\n" | $(gb_Zip_ZIPCOMMAND) -@rX --filesync $(call gb_Zip_get_target,$*) && \ + rm -f $${RESPONSEFILE} ) # the final target is a touch target; we use it as registered targets should be in workdir, not in outdir # the outdir target depends on the workdir target and is built by delivering the latter -- cgit