[Open Office] ooo-build on Windows

David Fraser davidf at sjsoft.com
Thu Oct 13 12:33:40 EDT 2005


michael meeks wrote:

>Hi David,
>
>On Wed, 2005-10-12 at 23:26 +0200, David Fraser wrote:
>  
>
>>Other things I've noticed:
>>on HEAD, cairo-1.0.0.tar.gz and glitz-0.4.3.tar.gz aren't getting 
>>downloaded, but the unpack expects them.
>>    
>>
>	Ah - right; I fixed only 1 part of the problem; Can you conditionalize
>that on whether the source archive actually exists ?
>  
>
>>This seems to be because download.in has them in a non-Win32 section. So 
>>perhaps cairo isn't wanted on Windows...
>>    
>>
>	Sure it's not for now.
>  
>
So then surely conditionalizing on the source archive's existence is the 
wrong fix ... we should rather be disabling Cairo automatically and that 
will stop both the download and the unpack...

>>As a result of this, I found that if unpack dies, then it re-unpacks the 
>>source tarball every time.
>>    
>>
>	Yes of course.
>  
>
I would have thought that Make would be able to handle things a bit 
better than this. The tarball might be hard, but for example if you edit 
oowintool, it won't update the version it unpacked...

>>Still trying to get all the patches to apply, will report more tomorrow...
>>    
>>
>
>	Great - thanks :-)
>  
>
OK have committed a bunch of options to oowintool. This now gets 
everything that I used to pass in to configure automatically.

I've updated the patch to config_office/configure.in to use these 
methods now. I've found configure's output quite confusing as it often 
says "checking for file: no" and then proceeds to find it automatically, 
without reflecting that to the user. It seems like moving the 
AC_PATH_PROG to after the automatic path detection, you get a sane 
message if the file is found with the auto-pickup tools. But being a 
non-autoconfer and unable to find docs about this, it's fairly likely 
that this is the wrong thing to do, so I'm attaching the patch. rather 
than committing it.

David
-------------- next part --------------
--- config_office/configure.in.orig	2005-10-13 10:31:41.000000000 +0200
+++ config_office/configure.in	2005-10-13 13:05:12.000000000 +0200
@@ -1174,12 +1174,20 @@
 dnl ===================================================================
 if test "$_os" = "WINNT"; then
 	if test "$WITH_MINGWIN" != "yes"; then
-		AC_MSG_CHECKING([the Microsoft C/C++ Compiler])
+		AC_MSG_CHECKING([for friendly registry keys])
+		# VS.Net 2003, VS.Net 2002, VC6
+		if test -z "$with_cl_home"; then
+			vctest=`./oowintool --msvc-productdir`;
+			if test -x "$vctest/bin/cl.exe"; then
+				with_cl_home=$vctest;
+			fi
+		fi
+		AC_MSG_RESULT([done])
+
 		dnl ===========================================================
 		dnl  Check for mspdb71.dll
 		dnl ===========================================================
 		dnl  .NET 2003 Compiler
-		AC_PATH_PROG(MSPDB_PATH, mspdb71.dll)
 		if test -n "$MSPDB_PATH";then
 			MSPDB_PATH=`dirname "$MSPDB_PATH"`
 		fi
@@ -1201,6 +1209,9 @@
 		MSPDB_PATH=`cygpath -d "$MSPDB_PATH"`
 		MSPDB_PATH=`cygpath -u "$MSPDB_PATH"`
 		PATH="$MSPDB_PATH:$PATH"
+		AC_PATH_PROG(MSPDB_PATH, mspdb71.dll)
+
+		AC_MSG_CHECKING([the Microsoft C/C++ Compiler])
    		if test -x "$with_cl_home/bin/cl.exe"; then
    			CC="$with_cl_home/bin/cl.exe"
    		else
@@ -1226,7 +1237,7 @@
 							}
 							}"`
 			AC_MSG_RESULT([found Compiler version $CCNUMVER.])
-			if test "$CCNUMVER" -ge "001300100000"; then
+			if test "$CCNUMVER" -ge "001300102240"; then
 				COMEX=10
 			else
 				AC_MSG_ERROR([Compiler too old. Use Microsoft C/C++ .NET 2003 compiler.])
@@ -1251,7 +1262,6 @@
 dnl ===================================================================
 if test "$COMEX" = "8" -o "$COMEX" = "10"; then
 	dnl Check midl.exe
-	AC_PATH_PROG(MIDL_PATH, midl.exe)
 	if test -n "$MIDL_PATH";then
 		MIDL_PATH=`dirname "$MIDL_PATH"`
 	fi
@@ -1261,27 +1271,39 @@
 	if test -z "$MIDL_PATH" -a -e "$with_cl_home/../Common7/Tools/Bin/midl.exe"; then
 		MIDL_PATH="$with_cl_home/../Common7/Tools/Bin"
 	fi
+	if test -z "$MIDL_PATH" ; then
+      vstest=`./oowintool --msvs-productdir`;
+      if test -x "$vstest/Common7/Tools/Bin/midl.exe" ; then
+		  MIDL_PATH="$vstest/Common7/Tools/Bin"
+      fi
+	fi
 	if test ! -x "$MIDL_PATH/midl.exe"; then
 		AC_MSG_ERROR([midl.exe not found. Make sure it's in the path or use --with-midl-path])
 	fi
 	# Convert to posix path with 8.3 filename restrictions ( No spaces )
 	MIDL_PATH=`cygpath -d "$MIDL_PATH"`
 	MIDL_PATH=`cygpath -u "$MIDL_PATH"`
+	AC_PATH_PROG(MIDL_PATH, midl.exe)
 
 	dnl Check csc.exe
-	AC_PATH_PROG(CSC_PATH, csc.exe)
 	if test -n "$CSC_PATH";then
 		CSC_PATH=`dirname "$CSC_PATH"`
 	fi
 	if test -x "$with_csc_path/csc.exe"; then
 		CSC_PATH="$with_csc_path"
 	fi
+	csctest=`./oowintool --csc-compilerdir`;
+	if test -x "$csctest/csc.exe"; then
+		CSC_PATH="$csctest"
+	fi
+
 	if test ! -x "$CSC_PATH/csc.exe"; then
 		AC_MSG_ERROR([csc.exe not found. Make sure it's in the path or use --with-csc-path])
 	fi
 	# Convert to posix path with 8.3 filename restrictions ( No spaces )
 	CSC_PATH=`cygpath -d "$CSC_PATH"`
 	CSC_PATH=`cygpath -u "$CSC_PATH"`
+	AC_PATH_PROG(CSC_PATH, csc.exe)
 
     dnl Check nmake.exe for MS VC Toolkit
     if test -n "$ENABLE_VCTK"; then
@@ -1304,15 +1326,23 @@
     dnl This now has two meanings, for .NET2003 it has to point to the
     dnl directory with lib/mscoree.lib and for VCTK to lib/msvcrt.lib.
     if test -z "$ENABLE_VCTK"; then
+       AC_MSG_CHECKING(.NET Framework)
 	    if test -f "$with_frame_home/lib/mscoree.lib"; then
 		    FRAME_HOME="$with_frame_home"
 	    fi
 	    if test -z "$FRAME_HOME" -a -e "$with_cl_home/../SDK/v1.1/lib/mscoree.lib"; then
 		    FRAME_HOME="$with_cl_home/../SDK/v1.1"
 	    fi
+	    if test -z "$FRAME_HOME" ; then
+          frametest=`./oowintool --dotnetsdk-dir`
+          if test -x "$frametest/lib/mscoree.lib"; then
+             FRAME_HOME="$frametest"
+          fi
+	    fi
 	    if test ! -f "$FRAME_HOME/lib/mscoree.lib"; then
 		AC_MSG_ERROR([mscoree.lib (.NET Framework) not found. Make sure you use --with-frame-home])
 	    fi
+	    AC_MSG_RESULT(found)
     else
         if test ! -f "$COMPATH/../lib/mscoree.lib"; then
         AC_MSG_ERROR([mscoree.lib not found. Unexpected, ask dev at tools.openoffice.org for help.])
@@ -1809,6 +1839,12 @@
 fi
 AC_SUBST(LANG)
 
+if test -z "$with_jdk_home"; then
+    _jdk_home=`./oowintool --jdk-home`
+    if test -d "$_jdk_home"; then
+        with_jdk_home="$_jdk_home"
+    fi
+fi
 
 dnl ===================================================================
 dnl Checks for java
@@ -3300,7 +3336,7 @@
 	AC_MSG_CHECKING([for PSDK files])
 	if test -z "$with_psdk_home"; then
 		# This first line will detect a February 2003 Microsoft Platform SDK
-		PSDK_HOME=`cat "/proc/registry/HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/MicrosoftSDK/Directories/Install Dir" 2> /dev/null`
+		PSDK_HOME=`./oowintool --psdk-home`
         # But there might be also an April 2005 PSDK, unfortunately MS changed
         # the registry entry. (we prefer the old version!?)
         if test -z "$PSDK_HOME"; then
@@ -3408,6 +3444,10 @@
     if test -e "$with_nsis_path/nsis.exe"; then
         NSIS_PATH="$with_nsis_path"
     fi
+    nsistest=`./oowintool --nsis-dir`;
+    if test -x "$nsistest/nsis.exe"; then
+        NSIS_PATH="$nsistest"
+    fi
     if test -z "$NSIS_PATH"; then
         AC_MSG_WARN([NSIS not found, no self contained installer will be build.])
         echo "NSIS not found, no self contained installer will be build." >> warn
@@ -3535,6 +3575,7 @@
     if test -z "$ML_EXE"; then
       if test -x "$with_cl_home/bin/ml.exe"; then
         with_asm_home=$with_cl_home/bin
+        AC_MSG_RESULT([found ($with_asm_home)])
       else
         AC_MSG_ERROR([Configure did not find ml.exe assembler.])
       fi
@@ -3624,6 +3665,13 @@
 fi
 
 dnl ===================================================================
+dnl Windows builds - attempt to auto-copy required dlls into external/
+dnl ===================================================================
+if test "$_os" = "WINNT"; then
+       ./oowintool --msvc-copy-dlls ../external/msvcp
+fi
+
+dnl ===================================================================
 dnl Windows builds with .NET need msvcp70.dll/msvcr70.dll in external/msvcp70/
 dnl ===================================================================
 if test "$_os" = "WINNT" -a "$COMEX" = "8"; then
@@ -3676,6 +3724,13 @@
 fi
 
 dnl ===================================================================
+dnl Windows builds - attempt to auto-copy required instmsiX.exe into external/
+dnl ===================================================================
+if test "$_os" = "WINNT"; then
+       ./oowintool --msvc-copy-instmsi ../external/msi
+fi
+
+dnl ===================================================================
 dnl Windows builds with .NET 2003 need instmsia.exe and instmsiw.exe in external/msi
 dnl ===================================================================
 if test "$_os" = "WINNT" -a "$COMEX" = "10"; then


More information about the Openoffice mailing list