diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2020-12-03 08:12:23 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2020-12-03 15:01:00 +0100 |
commit | 01241113947fc7bd7f7b765dd897bb023c8ca99c (patch) | |
tree | c224f9afa42e961d9b22fd66530276ed7b7ae410 /configure.ac | |
parent | 8e3dc5b81d1a7486a6787afef918e9d2b74542ef (diff) |
Replace unowinreg.dll with execution of `reg QUERY`
The SDK's <https://wiki.openoffice.org/wiki/Documentation/DevGuide/ProUNO/Java/
Transparent_Use_of_Office_UNO_Components> on all platforms included the Windows-
specific unowinreg.dll in generated jars (so that those jars, when distributed
to a Windows environment, would find a LO installation by inspecting the Windows
registry). That unowinreg.dll was originally built as a 32-bit DLL (though when
building a 64-bit Windows LO, it happened to be built as a 64-bit DLL). For
non-Windows LO builds, it could either be built locally with a MinGW toolchain
(--enable-build-unowinreg) or downloaded from dev-www.libreoffice.org.
However, that had various issues:
For one, unowinreg.dll was not necessarily available in a distributed jar as a
64-bit DLL for use with a 64-bit JRE on Windows. (Theoretically, running such a
jar with a 32-bit JRE to access a 64-bit LO installation's URE jars could have
worked. But practically, those URE jars in turn require native DLLs, which
would then not have been available as 32-bit DLLs for use in the 32-bit JRE.)
For another, at least the unowinreg.dll resulting from --enable-build-unowinreg
on Fedora 33 would have had a dependency on libgcc_s_dw2-1.dll that would
generally not have been available in a target Windows environment.
There appears to be no pure Java way to read the Windows registry, but instead
of using a native code DLL for that, it appears to work just as well to call out
to reg.exe and parse its output.
This removes the --enable-build-unowinreg and --with-mingw-cross-compiler
configuration options. (The sole use of the MinGW toolchain in LO was for
building unowinreg.dll.)
Change-Id: I3283ea38c884d3221a205e5ab6ec99a2691ef474
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107140
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Tested-by: Jenkins
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 63 |
1 files changed, 0 insertions, 63 deletions
diff --git a/configure.ac b/configure.ac index 3827f49005d8..3f418e27bb10 100644 --- a/configure.ac +++ b/configure.ac @@ -1644,12 +1644,6 @@ libo_FUZZ_ARG_ENABLE(chart-tests, who can judge if a test failure is a regression or not.]), ,) -AC_ARG_ENABLE(build-unowinreg, - AS_HELP_STRING([--enable-build-unowinreg], - [Do not use the prebuilt unowinreg.dll. Build it instead. The MinGW C++ - compiler is needed on Linux.]), -,) - AC_ARG_ENABLE(build-opensymbol, AS_HELP_STRING([--enable-build-opensymbol], [Do not use the prebuilt opens___.ttf. Build it instead. This needs @@ -2549,13 +2543,6 @@ AC_ARG_WITH(os-version, [For FreeBSD users, use this option to override the detected OSVERSION.]), ,) -AC_ARG_WITH(mingw-cross-compiler, - AS_HELP_STRING([--with-mingw-cross-compiler=<mingw32-g++ command>], - [Specify the MinGW cross-compiler to use. - When building on the ODK on Unix and building unowinreg.dll, - specify the MinGW C++ cross-compiler.]), -,) - AC_ARG_WITH(idlc-cpp, AS_HELP_STRING([--with-idlc-cpp=<cpp/ucpp>], [Specify the C Preprocessor to use for idlc. Default is ucpp.]), @@ -4072,12 +4059,6 @@ AC_SUBST(VCVER) AC_SUBST(DEVENV) AC_SUBST(MSVC_CXX) -# -# unowinreg.dll -# -UNOWINREG_DLL="185d60944ea767075d27247c3162b3bc-unowinreg.dll" -AC_SUBST(UNOWINREG_DLL) - COM_IS_CLANG= AC_MSG_CHECKING([whether the compiler is actually Clang]) AC_COMPILE_IFELSE([AC_LANG_SOURCE([[ @@ -8717,54 +8698,10 @@ AC_SUBST([DOXYGEN]) AC_MSG_CHECKING([whether to build the ODK]) if test "$enable_odk" = "" -o "$enable_odk" != "no"; then AC_MSG_RESULT([yes]) - - if test "$with_java" != "no"; then - AC_MSG_CHECKING([whether to build unowinreg.dll]) - if test "$_os" = "WINNT" -a "$enable_build_unowinreg" = ""; then - # build on Win by default - enable_build_unowinreg=yes - fi - if test "$enable_build_unowinreg" = "" -o "$enable_build_unowinreg" = "no"; then - AC_MSG_RESULT([no]) - BUILD_UNOWINREG= - else - AC_MSG_RESULT([yes]) - BUILD_UNOWINREG=TRUE - fi - if test "$_os" != "WINNT" -a "$BUILD_UNOWINREG" = "TRUE"; then - if test -z "$with_mingw_cross_compiler"; then - dnl Guess... - AC_CHECK_PROGS(MINGWCXX,i386-mingw32msvc-g++ i586-pc-mingw32-g++ i686-pc-mingw32-g++ i686-w64-mingw32-g++,false) - elif test -x "$with_mingw_cross_compiler"; then - MINGWCXX="$with_mingw_cross_compiler" - else - AC_CHECK_TOOL(MINGWCXX, "$with_mingw_cross_compiler", false) - fi - - if test "$MINGWCXX" = "false"; then - AC_MSG_ERROR([MinGW32 C++ cross-compiler not found.]) - fi - - mingwstrip_test="`echo $MINGWCXX | $SED -e s/g++/strip/`" - if test -x "$mingwstrip_test"; then - MINGWSTRIP="$mingwstrip_test" - else - AC_CHECK_TOOL(MINGWSTRIP, "$mingwstrip_test", false) - fi - - if test "$MINGWSTRIP" = "false"; then - AC_MSG_ERROR(MinGW32 binutils not found.) - fi - fi - fi BUILD_TYPE="$BUILD_TYPE ODK" else AC_MSG_RESULT([no]) - BUILD_UNOWINREG= fi -AC_SUBST(BUILD_UNOWINREG) -AC_SUBST(MINGWCXX) -AC_SUBST(MINGWSTRIP) dnl =================================================================== dnl Check for system zlib |