Difference between revisions of "Windows"

From Apache OpenOffice Wiki
Jump to: navigation, search
(Miscellaneous info)
(Development Tools)
Line 10: Line 10:
 
There have been several different ways of building with more or less success...
 
There have been several different ways of building with more or less success...
  
The reference page to look at is [http://tools.openoffice.org/dev_docs/build_windows_tcsh.html Building under Windows with tcsh]
+
The reference page to look at is [http://tools.openoffice.org/dev_docs/build_windows_tcsh.html Building under Windows with tcsh]. If you are going to use the ooo-build method, you should stop reading that page after the Cygwin section. The ooo-build build system will download the rest of the dependencies.
  
 
Other ways to build are documented below, the official way requires Visual C++ .NET 2003
 
Other ways to build are documented below, the official way requires Visual C++ .NET 2003

Revision as of 14:03, 11 May 2006

Welcome to OOo development for Windows

This is an initial attempt to fill out information for building on Windows. If it ends up being complete, this notice can be removed! At the moment you'll have to piece together information from other pages with the changes here for doing it on Windows.

Most of this wiki assumes that you'll be using a reasonably current Linux system, as a time saving feature. While real hackers prefer Free software, if you're forced to build stuff for Windows, this is the place to be.

Development Tools

There have been several different ways of building with more or less success...

The reference page to look at is Building under Windows with tcsh. If you are going to use the ooo-build method, you should stop reading that page after the Cygwin section. The ooo-build build system will download the rest of the dependencies.

Other ways to build are documented below, the official way requires Visual C++ .NET 2003

Visual C++ .NET 2003 Professional

This is the full version of Visual C++. It is the official way to build OpenOffice.org.

Visual C++ .NET 2003 Standard (approx $109 price)

You can use the Standard version of Visual Studio to build OpenOffice but there are certain workarounds needed. The problem is that OO.o enables /O flags in Professional that conveniently cripples the compiler enough to hide some ugly hacks and bugs that have crept in over the years. Standard does not support optimizations so suddenly these beasts get out in the open. See BuildingMSVCStandard

Visual C++ Toolkit 2003

Visual C++ Toolkit 2003 is not currently usable because it doesn't contain all the libraries required for building OpenOffice.org. See Issue 51145 for progress on this issue.

TODO: fill in all the required libraries, and possible alternatives - in the issue.

MinGW

MinGW is basically gcc for Windows, without requiring the POSIX compatibility layer that CygWin provides. You can use the CygWin compiler with the -mno-cygwin switch and it has the same effect.

MinGW is not officially supported at the moment, so it will probably take some work to get it

Work to build OpenOffice.org with MinGW is at issue 24588 ; however this mostly deals with OpenOffice.org 1.1 branch at the moment.

Using vanilla source

While ooo-build has been developed to make building OOo less painful, you might also try to start out with the standard source code. After you download and unpack a vanilla ooo source tarball, running "configure" in the directory "config_office" will gladly complain about missing build-dependencies. The remaining build process is described in the document Building under Windows with tcsh

Using ooo-build

These are addenda to using ooo-build with the following command line:

 ./configure --with-win32

ooo-build should pick up all the other requirements for you automatically (reading them out of the registry)

Extra requirements

  • Cygwin requires the cabextract package.

Miscellaneous info

  • csc.exe comes from the c:\WINDOWS\Microsoft.NET\Framework\v1.1.4322 directory, you might need --with-csc-path.
  • Beware of using /c/ instead of /cygdrive/c/.
  • Avoid trailing slashes in configure parameters. They sure cause problems for --with-psdk-home.
  • Using the latest cygwin releases (1.5.18/1.5.19) can lead to tcsh freezing in places - the build will appear to hang. You can fix this by running ls /proc/$nnn/fd where $nnn is the number of the process. Or just run
     ls /proc/*/fd
    

    to "unhang" the process. See issue 51560 for more info...

    Noone so far created a reproducible hang that doesn't require the whole OOo environment, and to make it worse, there are those who cannot reproduce the hang at all ( Works fine here ;) (User:Vq) ). Until someone provides a recipe to reproduce this problem with a small testcase we have to hope that the cygwin developers accidentally fix this problem.

  • With cygwin 1.5.18, makecab.exe hangs when run from the build process (but it works fine when run standalone). So you definitely want to use a snapshot and avoid cygwin 1.5.18, unless you enjoy wasting half a week of your life debugging like I did ...
  • With later Cygwin versions (various 1.5.19 and 1.5.20 snapshots) hangs have been noticed at least by me (User:TorLillqvist) at various stages of the build on a hyperthreading (Pentium 4) machine, while doing the same build using the exact same Cygwin version on a single-processor machine worked fine. So it might be a good idea to turn off hyperthreading.
  • If you get errors like "too long line in ddf file" during the MSI installer build this is caused by too long filenames. Try setting your TEMP/TMP environment variable to something short like "C:\tmp". There is a 255 char line limit for dds files and class names like "InvalidAuthenticationMechanismException" push the envelope. Shaving of 10-15 chars puts us back just under the limit.
  • Avoid using winzip to extract the downloaded source archive. Observed problems include:
    • CR-LF errors that can affect makefiles and cause compile errors
    • Certain files unpacked into root folder, esp. likely when actual path is deeply nested (e.g. foo/bar/source/foo/java/org/x/y/z/w/LongFileName.hmm) which again causes mysterious compile errors.
    Use the tar from Cygwin instead:
     tar xvzf OOo_2.0.2_src.tar.gz
    

See also

Personal tools