Difference between revisions of "Documentation/Building Guide AOO/Step by step"

From Apache OpenOffice Wiki
Jump to: navigation, search
m (Fixed some typos)
m (Improved formatting of section Windows 7)
Line 113: Line 113:
 
**Open downloaded archive in file explorer and unzip it to a location of your choice, eg <code>c:\</code>.  Note that <code>C:\Program Files (x86)</code> will not work due to problems of quoting the spaces and parentheses.
 
**Open downloaded archive in file explorer and unzip it to a location of your choice, eg <code>c:\</code>.  Note that <code>C:\Program Files (x86)</code> will not work due to problems of quoting the spaces and parentheses.
 
    
 
    
* Prepare to install missing cygwin packages by installing apt-cyg from googlecode.com
+
* Prepare to install missing cygwin packages by installing apt-cyg from googlecode.com<pre>cd to /cygdrive/c/temp</pre>(or any other temporary directory of your choice)<pre>wget http://apt-cyg.googlecode.com/svn/trunk/apt-cyg&#10;chmod +x apt-cyg&#10;mv apt-cyg /usr/local/bin/</pre>
  cd to /cygdrive/c/temp
+
* Use apt-cyg to install missing cygwin packages<pre>apt-cyg install perl zip unzip gperf autoconf rsync gcc4-g++ bison flex patch</pre>   
:(or any other temporary directory of your choice)
+
  wget http://apt-cyg.googlecode.com/svn/trunk/apt-cyg
+
  chmod +x apt-cyg
+
  mv apt-cyg /usr/local/bin/
+
 
+
* Use apt-cyg to install missing cygwin packages
+
  apt-cyg install perl zip unzip gperf autoconf rsync gcc4-g++ bison flex patch
+
   
+
 
* Install Visual C++ 2008 Express
 
* Install Visual C++ 2008 Express
 
**Browse to http://www.microsoft.com/en-us/download/details.aspx?id=6506
 
**Browse to http://www.microsoft.com/en-us/download/details.aspx?id=6506
Line 145: Line 137:
 
** Download and run the installer.
 
** Download and run the installer.
 
    
 
    
* Replace symlinked awk with copy of gawk.exe:
+
* Replace symlinked awk with copy of gawk.exe:<pre>rm /usr/bin/awk&#10;mv /usr/bin/gawk.exe /usr/bin/awk.exe</pre>Note that if the <code>rm</code> command fails then the <code>mv</code> is not necessary.
  rm /usr/bin/awk
+
  mv /usr/bin/gawk.exe /usr/bin/awk.exe
+
:Note that if the <code>rm</code> command fails then the <code>mv</code> is not necessary.
+
 
+
 
* Get AOO source code. You can use the source release or check out from SVN:
 
* Get AOO source code. You can use the source release or check out from SVN:
 
{| class="prettytable"
 
{| class="prettytable"
Line 166: Line 154:
 
** Click on the "Source code" link or navigate manually to the "Source code" section.
 
** Click on the "Source code" link or navigate manually to the "Source code" section.
 
** Follow instructions for verifying your archive.
 
** Follow instructions for verifying your archive.
* Unpack source:
+
* Unpack source:<pre>cd /tmp&#10;tar -xjf <download-location>/aoo-3.4.1-incubating-src.tar.bz2&#10;cd aoo-3.4.1/main&#10;</pre>
  cd /tmp
+
  tar -xjf <download-location>/aoo-3.4.1-incubating-src.tar.bz2
+
  cd aoo-3.4.1/main
+
 
|
 
|
*Start with creating a parent directory for the source code:
+
*Start with creating a parent directory for the source code:<pre>mkdir /cygdrive/c/source&#10;cd /cygdrive/c/source</pre>
  mkdir /cygdrive/c/source
+
*Check out source from Apache SVN repository<pre>apt-cyg install subversion&#10;svn co https://svn.apache.org/repos/asf/incubator/ooo/trunk aoo-trunk&#10;cd aoo-trunk/main</pre>
  cd /cygdrive/c/source
+
*Check out source from Apache SVN repository
+
  apt-cyg install subversion
+
  svn co https://svn.apache.org/repos/asf/incubator/ooo/trunk aoo-trunk
+
  cd aoo-trunk/main
+
 
|}
 
|}
 
+
* Remember the source path:<pre>SourceMain=`pwd`</pre>
* Remember the source path
+
  SourceMain=`pwd`
+
 
+
 
* Get dbghelp.dll
 
* Get dbghelp.dll
 
** This dll is nowadays part of the Windows SDK
 
** This dll is nowadays part of the Windows SDK
Line 188: Line 165:
 
** Click on the "Install Debugging Tools for Windows as a Standalone Component (from Windows SDK)", this will (as the other links do, too) direct you to the download page of the current Windows SDK.
 
** Click on the "Install Debugging Tools for Windows as a Standalone Component (from Windows SDK)", this will (as the other links do, too) direct you to the download page of the current Windows SDK.
 
** Download the SDK and install at least the Debugging Tools for Windows.
 
** Download the SDK and install at least the Debugging Tools for Windows.
** Copy files
+
** Copy files<pre>cp /cygdrive/c/Program\ Files\ \(x86\)/Windows\ Kits/8.0/Debuggers/x86/dbghelp.dll $SourceMain/external/dbghelp</pre>(You may have to install c:/Program Files (x86)/Windows Kits/8.0/Debuggers/Redist/X86 Debuggers And Tools-x86_en-us.msi first)
  cp /cygdrive/c/Program\ Files\ \(x86\)/Windows\ Kits/8.0/Debuggers/x86/dbghelp.dll $SourceMain/external/dbghelp
+
:(You may have to install c:/Program Files (x86)/Windows Kits/8.0/Debuggers/Redist/X86 Debuggers And Tools-x86_en-us.msi first)
+
  
 
* Get MS Visual C++ 2008 SP1 Redistributable vcredist_x86.exe (both 32 and 64 bit)
 
* Get MS Visual C++ 2008 SP1 Redistributable vcredist_x86.exe (both 32 and 64 bit)
Line 197: Line 172:
 
** Browse to http://www.microsoft.com/en-us/download/details.aspx?id=2092
 
** Browse to http://www.microsoft.com/en-us/download/details.aspx?id=2092
 
** Download vcredist_x64.exe
 
** Download vcredist_x64.exe
** Copy to main/external
+
** Copy to main/external<pre>cp <download-location>/vcredist_x86.exe $SourceMain/external/vcredist&#10;cp <download-location>/vcredist_x64.exe $SourceMain/external/vcredist</pre>
  cp <download-location>/vcredist_x86.exe $SourceMain/external/vcredist
+
  cp <download-location>/vcredist_x64.exe $SourceMain/external/vcredist
+
 
+
 
* Get GDI+ redistributable.
 
* Get GDI+ redistributable.
 
**Browse to http://www.microsoft.com/en-us/download/details.aspx?id=18909
 
**Browse to http://www.microsoft.com/en-us/download/details.aspx?id=18909
Line 206: Line 178:
 
**Run WindowsXP-KB975337-x86-ENU.exe
 
**Run WindowsXP-KB975337-x86-ENU.exe
 
**Enter a temporary path (eg c:\temp\gdiplus) in the dialog and click OK to extract files
 
**Enter a temporary path (eg c:\temp\gdiplus) in the dialog and click OK to extract files
**Copy gdiplus.dll to main/external
+
**Copy gdiplus.dll to main/external<pre>cp /cygdrive/c/temp/gdiplus/asms/10/msft/windows/gdiplus/gdiplus.dll $SourceMain/external/gdiplus/</pre>
  cp /cygdrive/c/temp/gdiplus/asms/10/msft/windows/gdiplus/gdiplus.dll $SourceMain/external/gdiplus/
+
** Remove the temporary path<pre>cp -fr /cygdrive/c/temp/gdiplus</pre>
:* Remove the temporary path
+
* Get msvcr100.dll:<pre>cp /c/Windows/System32/msvcr100.dll $SourceMain/external/msvcp100</pre>
  cp -fr /cygdrive/c/temp/gdiplus
+
* Make sure that you are in the main source directory:<pre>cd $SourceMain</pre> 
 
+
* Run autoconf to create the configure script:<pre>autoconf</pre>
* Get msvcr100.dll
+
  cp /c/Windows/System32/msvcr100.dll $SourceMain/external/msvcp100
+
 
+
* Make sure that you are in the main source directory
+
  cd $SourceMain
+
 
+
* Run autoconf to create the configure script
+
  autoconf
+
 
+
 
* Call configure
 
* Call configure
** Run configure (adapt paths as necessary)
+
** Run configure (adapt paths as necessary)<pre>MSVC_HOME="/cygdrive/c/Program Files (x86)/Microsoft Visual Studio 9.0"&#10;SDK_PATH="/cygdrive/c/Program Files/Microsoft SDKs/Windows/v6.1"&#10;./configure \&#10;    --with-cl-home="$MSVC_HOME/VC" \&#10;    --with-mspdb-path="$MSVC_HOME/Common7/IDE" \&#10;    --with-asm-home="$MSVC_HOME/Bin" \&#10;    --with-csc-path="$MSVC_HOME/SDK/v3.5" \&#10;    --with-frame-home="$SDK_PATH" \&#10;    --with-psdk-home="$SDK_PATH" \&#10;    --with-midl-path="$SDK_PATH/bin" \&#10;    --with-directx-home="C:/Program Files (x86)/Microsoft DirectX SDK (June 2010)" \&#10;    --with-jdk-home="/cygdrive/c/Program Files (x86)/Java/jdk1.6.0_35" \&#10;    --with-ant-home="/cygdrive/c/apache-ant-1.8.4" \&#10;    --with-dmake-url="http://dmake.apache-extras.org.codespot.com/files/dmake-4.12.tar.bz2" \&#10;    --with-epm-url=http://ftp.easysw.com/pub/epm/3.7/epm-3.7-source.tar.gz \&#10;    --enable-pch \&#10;    --disable-atl \&#10;    --disable-activex \&#10;    --disable-binfilter \&#10;    --without-junit</pre>If you have not installed the optional DirectX SDK then remove the <code>--with-directx-home switch</code>
  MSVC_HOME="/cygdrive/c/Program Files (x86)/Microsoft Visual Studio 9.0"
+
*Finish configuration and download missing external source tarballs and extensions<pre>./bootstrap</pre>
  SDK_PATH="/cygdrive/c/Program Files/Microsoft SDKs/Windows/v6.1"
+
* Include the configured environment<pre>source winenv.set.sh</pre>
  ./configure \
+
* Build<pre>cd instsetoo_native/&#10;build --all</pre>Depending on your computer this will take one or more hours to finish.
    --with-cl-home="$MSVC_HOME/VC" \
+
    --with-mspdb-path="$MSVC_HOME/Common7/IDE" \
+
    --with-asm-home="$MSVC_HOME/Bin" \
+
    --with-csc-path="$MSVC_HOME/SDK/v3.5" \
+
    --with-frame-home="$SDK_PATH" \
+
    --with-psdk-home="$SDK_PATH" \
+
    --with-midl-path="$SDK_PATH/bin" \
+
    --with-directx-home="C:/Program Files (x86)/Microsoft DirectX SDK (June 2010)" \
+
    --with-jdk-home="/cygdrive/c/Program Files (x86)/Java/jdk1.6.0_35" \
+
    --with-ant-home="/cygdrive/c/apache-ant-1.8.4" \
+
    --with-dmake-url="http://dmake.apache-extras.org.codespot.com/files/dmake-4.12.tar.bz2" \
+
    --with-epm-url=http://ftp.easysw.com/pub/epm/3.7/epm-3.7-source.tar.gz \
+
    --enable-pch \
+
    --disable-atl \
+
    --disable-activex \
+
    --disable-binfilter \
+
    --without-junit
+
: If you have not installed the optional DirectX SDK then remove the <code>--with-directx-home switch</code>
+
 
+
*Finish configuration and download missing external source tarballs and extensions
+
  ./bootstrap
+
 
+
* Include the configured environment
+
  source winenv.set.sh
+
 
+
* Build
+
  cd instsetoo_native/
+
  build --all
+
: Depending on your computer this will take one or more hours to finish.
+
  
 
* Install<br/>There are three options:
 
* Install<br/>There are three options:

Revision as of 13:02, 8 October 2012


This page is intended as a collection of simple step-by-step recipes to build Apache OpenOffice from source code. A more thorough explanation of what the individual steps do and why they are necessary can be found in the building guide.

Ubuntu 12.04

  • Setup VirtualBox with Ubuntu 12.04 64 bit on Windows7 64bit host. A native installation is of course fine, too.
  • Let updater update ca. 380 packages. Restart.
  • Get the source. You can start with the source release or by checking out from SVN:
Source release SVN
Build from source release if you want to build OpenOffice once but don't want to do any development. Build from SVN if you want to development work with OpenOffice.
  • Download AOO 3.4.1 source tarball from

http://people.apache.org/~jsc/developer-snapshots/r1372282/src/aoo-3.4.1-incubating-src.tar.bz2

  • Optional: Download signature from

http://people.apache.org/~jsc/developer-snapshots/r1372282/src/aoo-3.4.1-incubating-src.tar.bz2.asc

and verify the source tarball with

gpg --verify aoo-3.4.1-incubating-src.tar.bz2.asc \
             aoo-3.4.1-incubating-src.tar.bz2

Note that you have to have the keys already imported to your key chain. The keys can be found on the download page:

http://www.apache.org/dist/incubator/ooo/KEYS

  • Unpack source:
 cd /tmp
 tar -xjf ~/Downloads/aoo-3.4.1-incubating-src.tar.bz2
 cd aoo-3.4.1/main
  • Start with creating a parent directory for the source code. Don't use /tmp because that is deleted on every boot:
 sudo mkdir /source
 sudo chown <your-user-name> /source
 cd /source
  • Install subversion and checkout the source:
 sudo apt-get install subversion
 svn co https://svn.apache.org/repos/asf/incubator/ooo/trunk aoo-trunk
 cd aoo-trunk/main
  • Install requirements (this will also install packages that are not listed):
 sudo apt-get install g++ gcc bison flex libarchive-zip-perl libcups2-dev \
      libpam0g-dev gperf libfreetype6-dev libxaw7-dev libfontconfig1-dev \
      libxrandr-dev patch libgconf2-dev libgnomevfs2-dev ant libgtk2.0-dev \
      junit junit4 libidl-dev liborbit2-dev openjdk-6-jdk libwww-perl \
      libxml-parser-perl autoconf libssl-dev
  • Run autoconf to generate configure script:
 autoconf
  • Configure (see the building guide section on configuration for further options):
 ./configure \
     --with-dmake-url=http://dmake.apache-extras.org.codespot.com/files/dmake-4.12.tar.bz2 \
     --with-epm-url=http://ftp.easysw.com/pub/epm/3.7/epm-3.7-source.tar.gz \
     --disable-odk \
     --disable-binfilter
  • Finish configuration and download missing tarballs and extensions:
 ./bootstrap
  • Include the configured environment:
 source LinuxX86-64Env.Set.sh
  • Build:
 cd instsetoo_native/
 build --all

This may take a while to complete. Several hours are not uncommong. To speed things up you may want to run 'build' like this

 build --all -P<n> -- -P<n>

to start a parallel build. Replace <n> with the number of CPU cores.

  • Install:
 sudo dpkg -i unxlngx6.pro/OpenOffice/deb/install/en-US/DEBS/*.deb
 sudo dpkg -i unxlngx6.pro/OpenOffice/deb/install/en-US/DEBS/desktop-integration/openoffice.org3.4-debian-menus_3.4-9593_all.deb
  • Start Apache OpenOffice:
 /opt/openoffice.org3/program/soffice

Windows 7

  • Install cygwin
    • Browse to http://cygwin.com.
    • Click on the setup.exe link (most recent Cygwin DLL at the moment is 1.7.16-1) to download the installer and run it.
    • Click through the questions.
    • On the "Choose A Download Site" select a nearby download server.
    • Expect a "Setup Alert" dialog box on the first cygwin install on the computer.
    • Click OK to close it.
    • On the page that allows you to select additional packages just select wget (enter wget in the Search box and select the wget enty in the Web/Default section.
    • Click Next to finish package selection.
    • Click Next to resolve dependencies.
    • After installation is finished click the Finish button to close the dialog.
  • Start bash in a terminal
One way to do this is:
  • Press WindowsKey-R
  • Enter c:\cygwin\Cygwin.bat
  • Hit Return.
  • Intall Java.
Choose between JDK 1.6 (but JDK 1.5 or JDK 1.7 should also be OK) or OpenJDK.
  • If you chose JDK 1.6: Download the current JDK from www.oracle.com/technetwork/java/javase/downloads/index.html.
  • Download and run the 32-bit Windows version (currently this is jdk-6u35-windows-i586.exe).
  • Install Ant
    • Browse to http://ant.apache.org/bindownload.cgi
    • Chose a mirror near you.
    • Download the zip archive (currently that is apache-ant-1.8.4-bin.zip).
    • Open downloaded archive in file explorer and unzip it to a location of your choice, eg c:\. Note that C:\Program Files (x86) will not work due to problems of quoting the spaces and parentheses.
  • Prepare to install missing cygwin packages by installing apt-cyg from googlecode.com
    cd to /cygdrive/c/temp
    (or any other temporary directory of your choice)
    wget http://apt-cyg.googlecode.com/svn/trunk/apt-cyg
    chmod +x apt-cyg
    mv apt-cyg /usr/local/bin/
  • Use apt-cyg to install missing cygwin packages
    apt-cyg install perl zip unzip gperf autoconf rsync gcc4-g++ bison flex patch
  • Install Visual C++ 2008 Express
  • Install Windows SDK for Windows Server 2008
    • Browse to http://www.microsoft.com/en-us/download/details.aspx?id=11310
    • Download Setup.exe and run the web installer (note that it will be saved as Setup(1).exe to disambiguate from the previously downloaded cygwin installer.) You can use the default values in the installation dialog.
    • Alternatively download the iso image. Burn it to a dvd or unzip it.
  • Optional: Install NSIS installer (for creating the EXE installer)
  • Replace symlinked awk with copy of gawk.exe:
    rm /usr/bin/awk
    mv /usr/bin/gawk.exe /usr/bin/awk.exe
    Note that if the rm command fails then the mv is not necessary.
  • Get AOO source code. You can use the source release or check out from SVN:
Source release SVN
Build from source release if you want to build OpenOffice once but don't want to do any development. Build from SVN if you want to development work with OpenOffice.
  • Start with creating a parent directory for the source code:
    mkdir /cygdrive/c/source
    cd /cygdrive/c/source
  • Check out source from Apache SVN repository
    apt-cyg install subversion
    svn co https://svn.apache.org/repos/asf/incubator/ooo/trunk aoo-trunk
    cd aoo-trunk/main
  • Remember the source path:
    SourceMain=`pwd`
  • Get dbghelp.dll
    • This dll is nowadays part of the Windows SDK
    • Browse to the "Download and Install Debugging Tools for Windows" page on msdn.microsoft.com (at the time of this writing at http://msdn.microsoft.com/en-us/windows/hardware/gg463009.aspx)
    • Click on the "Install Debugging Tools for Windows as a Standalone Component (from Windows SDK)", this will (as the other links do, too) direct you to the download page of the current Windows SDK.
    • Download the SDK and install at least the Debugging Tools for Windows.
    • Copy files
      cp /cygdrive/c/Program\ Files\ \(x86\)/Windows\ Kits/8.0/Debuggers/x86/dbghelp.dll $SourceMain/external/dbghelp
      (You may have to install c:/Program Files (x86)/Windows Kits/8.0/Debuggers/Redist/X86 Debuggers And Tools-x86_en-us.msi first)
  • Get MS Visual C++ 2008 SP1 Redistributable vcredist_x86.exe (both 32 and 64 bit)
  • Get GDI+ redistributable.
    • Browse to http://www.microsoft.com/en-us/download/details.aspx?id=18909
    • Download WindowsXP-KB975337-x86-ENU.exe
    • Run WindowsXP-KB975337-x86-ENU.exe
    • Enter a temporary path (eg c:\temp\gdiplus) in the dialog and click OK to extract files
    • Copy gdiplus.dll to main/external
      cp /cygdrive/c/temp/gdiplus/asms/10/msft/windows/gdiplus/gdiplus.dll $SourceMain/external/gdiplus/
    • Remove the temporary path
      cp -fr /cygdrive/c/temp/gdiplus
  • Get msvcr100.dll:
    cp /c/Windows/System32/msvcr100.dll $SourceMain/external/msvcp100
  • Make sure that you are in the main source directory:
    cd $SourceMain
  • Run autoconf to create the configure script:
    autoconf
  • Call configure
    • Run configure (adapt paths as necessary)
      MSVC_HOME="/cygdrive/c/Program Files (x86)/Microsoft Visual Studio 9.0"
      SDK_PATH="/cygdrive/c/Program Files/Microsoft SDKs/Windows/v6.1"
      ./configure \
          --with-cl-home="$MSVC_HOME/VC" \
          --with-mspdb-path="$MSVC_HOME/Common7/IDE" \
          --with-asm-home="$MSVC_HOME/Bin" \
          --with-csc-path="$MSVC_HOME/SDK/v3.5" \
          --with-frame-home="$SDK_PATH" \
          --with-psdk-home="$SDK_PATH" \
          --with-midl-path="$SDK_PATH/bin" \
          --with-directx-home="C:/Program Files (x86)/Microsoft DirectX SDK (June 2010)" \
          --with-jdk-home="/cygdrive/c/Program Files (x86)/Java/jdk1.6.0_35" \
          --with-ant-home="/cygdrive/c/apache-ant-1.8.4" \
          --with-dmake-url="http://dmake.apache-extras.org.codespot.com/files/dmake-4.12.tar.bz2" \
          --with-epm-url=http://ftp.easysw.com/pub/epm/3.7/epm-3.7-source.tar.gz \
          --enable-pch \
          --disable-atl \
          --disable-activex \
          --disable-binfilter \
          --without-junit
      If you have not installed the optional DirectX SDK then remove the --with-directx-home switch
  • Finish configuration and download missing external source tarballs and extensions
    ./bootstrap
  • Include the configured environment
    source winenv.set.sh
  • Build
    cd instsetoo_native/
    build --all
    Depending on your computer this will take one or more hours to finish.
  • Install
    There are three options:
    1. Regular install with integration into Windows.
      This allows only one instance of AOO to be installed.
      • Start setup.exe and click through dialog:
        $SourceMain/instsetoo_native/wntmsci12.pro/OpenOffice/msi/install/en-US/setup.exe
      • Apache OpenOffice can be started via the Windows start menu.
    2. Install without integration into Windows.
      This allows several instance of AOO, based on the same version, to be installed side by side.
      It still requires Administrator permissions.
      • Start setup.exe with option -a:
        $SourceMain/instsetoo_native/wntmsci12.pro/OpenOffice/msi/install/en-US/setup.exe -a
      • Enter an installation path into the dialog and click through the dialog to finish installation.
      • Start AOO by running
        <installation-path>/program/soffice.exe
    3. Unpack archive without installation.
      This does not require Administrator permissions
      • Go to installation directory:
        cd <installation-target>
      • Unzip archive:
        unzip $SourceMain/instsetoo_native/wntmsci12.pro/OpenOffice/archive/install/en-US/Apache_OpenOffice_incubating_3.5.0_Win_x86_install-arc_en-US.zip
      • Start AOO by running:
        ./Apache_OpenOffice_incubating_3.5.0_Win_x86_install-arc_en-US/program/soffice.exe
Personal tools