Wednesday, January 5, 2011

To Build OpenOffice.org

OpenOffice.org is a good office software package and is a good alternative to Microsoft Office.

  1. Download setup.exe from Cygwin and run it. Select the following packages for installation.

    • bison
    • cabextract
    • flex
    • gcc4-g++
    • gperf
    • libtool
    • make
    • patch
    • pkg-config
    • unzip
    • wget
    • zip

    Replace symlinked awk with a copy of gawk.

    rm awk
    cp gawk.exe awk.exe
  2. Install Windows SDK for Windows Server 2008 and .NET Framework 3.5. Alternatively, install MinGW-w64, as shown in this post.

  3. Install DirectX SDK.

  4. Install the latest Java Development Kit.

  5. Install Apache Ant.

  6. Download and unpack OpenOffice.org source code.

  7. Download GDI+ Redistributable. Extract the files into a temporaray folder and copy gdiplus.dll to main/external/gdiplus folder of the OpenOffice.org source tree.

    cp /gdiplus/asms/10/msft/windows/gdiplus/gdiplus.dll aoo-3.4.1/main/external/gdiplus/
  8. Download Visual C++ Redistributable for Visual Studio 2012 Update 1 and put the file vcredist_x86.exe in main/external/vcredist folder.

  9. Build Seamonkey, as shown in this post.

  10. Install NSIS.

  11. Start Cygwin terminal. Set PATH.

    export PATH="/usr/bin:/cygdrive/c/Program Files/Microsoft Visual Studio 9.0/VC/bin:/cygdrive/c/Program Files/Microsoft Visual Studio 9.0/Common7/IDE:/cygdrive/c/Program Files/Microsoft SDKs/Windows/v6.1/Bin:/cygdrive/c/Program Files/Microsoft SDKs/Windows/6.1/Lib:/cygdrive/c/WINDOWS/Microsoft.NET/Framework/v2.0.50727:/cygdrive/c/Windows/system32"

    Make sure you're in the main folder of OpenOffice source. Run autoconf to create the configure script.

    cd /c/aoo-3.4.1/main
    autoconf

    Then, run configure.

    ./configure --disable-build-mozilla --with-mozilla-build="/cygdrive/c/mozilla-build" --with-cl-home="/cygdrive/c/Program Files/Microsoft Visual Studio 9.0/VC" --with-mspdb-path="/cygdrive/c/Program Files/Microsoft Visual Studio 9.0/Common7/IDE" --with-frame-home="/cygdrive/c/Program Files/Microsoft SDKs/Windows/v6.1/Lib" --with-psdk-home="/cygdrive/c/Program Files/Microsoft SDKs/Windows/v6.1" --with-midl-path="/cygdrive/c/Program Files/Microsoft SDKs/Windows/v6.1/Bin" --with-asm-home="/cygdrive/c/Program Files/Microsoft Visual Studio 9.0/VC/bin" --with-csc-path="/cygdrive/c/WINDOWS/Microsoft.NET/Framework/v2.0.50727" --with-jdk-home="/cygdrive/c/Program Files/Java/jdk1.7.0_10" --with-directx-home="/cygdrive/c/Program Files/Microsoft DirectX SDK (June 2010)" --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" --with-lang=ALL --with-dict=ALL --without-junit --enable-pch --enable-bundled-dictionaries --disable-atl --disable-activex --disable-odk --disable-binfilter --disable-dbgutil
  12. Finish configuration and download missing external source tarballs and extensions.

    ./bootstrap
  13. Include the configured environment and build.

    source winenv.set.sh
    cd instsetoo_native/
    build --all

Sunday, January 2, 2011

Building mplayer on Debian Linux

MPlayer is one of my favorite media players. It is used with such frontend as smplayer, gnome-mplayer or MPlayerGUI to provide a good alternative to Windows Media Player and VLC. First, I installed the necessary compiler toolchain.

  • autoconf
  • automake
  • binutils
  • bison
  • cpp
  • g77 or fort77
  • gcc
  • gettext
  • g++
  • libtool
  • make

Next, I installed the necessary development libraries:

  • libasound2-dev
  • libbz2-dev
  • libesd0-dev
  • libfontconfig1-dev
  • libfribidi-dev
  • libjpeg62-dev
  • libncurses5-dev
  • libpng12-dev
  • libxv-dev

Some useful libraries are not included in the Debian distribution, so I had to compile them on my own. They are faac, lame, libdca, live, x264 and xvidcore. First, I built liblzo.

tar xzvf /usr/src/lzo-2.04.tar.gz
cd lzo-2.04/
./configure --prefix /usr
make
make install

Then, I built the giflib.

tar xjvf /usr/src/giflib-4.1.6.tar.bz2
cd giflib-4.1.6/
ls
./configure --build=i586-pc-linux-gnu --prefix=/usr --disable-shared
make
make install

I built cdparanoia.

tar xzvf /usr/src/cdparanoia-III-10.2.src.tgz
cd cdparanoia-III-10.2/
./configure --build=i586-pc-linux-gnu --prefix=/usr --disable-shared
make
make install

I compiled libdca in the following way:

tar xjvf libdca-0.0.5.tar.bz2
cd libdca-0.0.5/
./configure --build=i586-pc-linux-gnu --prefix=/usr --disable-shared
make
make install

I built ogg, vorbis, theora and speex.

./configure --build=i586-pc-linux-gnu --prefix=/usr --disable-shared
make
make install

To compile lame, run:

tar xzvf /usr/src/lame-3.98.4.tar.gz
cd lame-3.98.4/
./configure --build=i586-pc-linux-gnu --prefix=/usr --disable-shared --mandir=/usr/share/man --enable-expopt=full --enable-nasm
make
make install

Unpack live555 source in /usr/lib and compile live555 as follows:

cd /usr/lib/live
./genMakefiles linux
make

To compile x264, do:

tar xjvf /usr/src/x264-snapshot-20110102-2245.tar.bz2
cd x264-snapshot-20110102-2245/
sh configure --host=i586-pc-linux-gnu --prefix=/usr --enable-pic --disable-asm
make
make install

Compile the xvid library as follows:

cd xvidcore/build/generic
./configure --build=i586-pc-linux-gnu --prefix=/usr
make
make install

Finally, you're ready to compile MPlayer. Get the latest snapshot tarball and extract it:

wget ftp://ftp.mplayerhq.hu/MPlayer/releases/mplayer-export-snapshot.tar.bz2
tar xjvf mplayer-export-snapshot.tar.bz2
cd mplayer-export-2009-05-29
CPPFLAGS='-DLIBTWOLAME_STATIC' ./configure --prefix=/usr --enable-runtime-cpudetection --yasm=/usr/bin/yasm --language=all --confdir=/etc/mplayer
make
make install
chmod 4755 /usr/bin/mplayer

About This Blog

KBlog logo This blog seeks to provide useful information to people, based on the author's knowledge and experience. Thanks for visiting the blog and posting your comments.

© Contents by KBlog

© Blogger template by Emporium Digital 2008

Follow by Email

Total Pageviews