How to enable APPR with Apache OpenOffice 3.4 on Ubuntu 11.04

From Apache OpenOffice Wiki
Revision as of 02:52, 25 September 2013 by Adailton (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

APPR is a performance toolset for OpenOffice. You will get a step-to-step guide on "How to enable APPR with Apache OpenOffice 3.4 on Ubuntu 11.04".


Get AOO3.4 build ready with APPR patch

Make a full build for Apache OpenOffice 3.4

You can get the source code from "https://svn.apache.org/repos/asf/incubator/ooo/trunk". Please put it under "~/aoo340/build", mark the place as AOO_HOME. Make sure that you can locate to all the modules under "$AOO_HOME/main". Please follow the build guide to make a full build on Ubuntu. Then you can get the installation package at "$AOO_HOME/main/instsetoo_native/unxlngi6.pro/OpenOffice/archive/install/en-US/Apache_OpenOffice_incubating_3.4.0_Linux_x86_install-arc_en-US.tar.gz". Please extract it, rename the new dir to soffice and move it to "~/aoo340/". You can get a dir "~/aoo340/soffice/openoffice.org3", mark the place as SOFFICE_HOME.

Get the package for APPR

Here is the link. Please put it under "~/aoo340" and uncompress it. You can get a dir "~/aoo340/APPR.for.AOO340.on.Ubuntu/APPR", mark the place as APPR_HOME. Then run commands below to apply APPR's patch into AOO's codebase.

 cd "$APPR_HOME/src/appr_hook/ooo_patch"
 chmod a+x apply.sh
 ./apply.sh "$AOO_HOME/main"

Rebuild modules for Apache OpenOffice 3.4

Please rebuild modules SAL and SFX2 with "export TIMELOG=TRUE"

 cd "$AOO_HOME/main"
 source LinuxX86.Env.sh
 export TIMELOG=TRUE
 
 cd sal
 rm -rf unxlngi6.pro
 build -P4
 deliver
 cd ../sfx2
 make clean
 make -sr

Update Apache OpenOffice 3.4

Please copy the new lib to the right place.

 cd "$AOO_HOME/main/solver/340/unxlngi6.pro/lib"
 sudo cp libuno_sal.so.3 "$SOFFICE_HOME/../openoffice.org/ure/lib/"
 sudo cp libsfx.so "$SOFFICE_HOME/basis-link/program/"

Install Macro library for APPR

You need to launch AOO3.4 by command "$SOFFICE_HOME/program/soffice.bin" in ternimal. Then import the Macro library "$APPR_HOME/starBASIC/script.xlb". Please refer to the user guide under "$APPR_HOME/docs".

Install 3rd support for APPR

You can run commands as below to finish all the tasks.

 cd "$APPR_HOME/tools/"
 chmod a+x auto.install.sh
 ./auto.install.sh

Check gawk on Ubuntu

gawk is needed to run APPR. You can run command "sudo apt-get install gawk" to install it.

Check bash on Ubuntu

APPR is a bash shell script. You can run command "sudo dpkg-reconfigure dash" to make "dash" as not a default setting.

Check Perl on Ubuntu

You can run command "sudo apt-get install libperl-dev" to install it.

Check YAML on Ubuntu

You can run command "sudo apt-get install libyaml-perl" to install it.

Check SVG Viewer on Ubuntu

FireFox is selected here to display SVG file. You can run command "sudo apt-get install firefox" to install it. If you have a recommended one. Please update this section. Thanks!

Install Perl module SVG

You can get it from SVG-2.28. Run the following commands to install it.

 tar xvf SVG-2.28.tar.gz
 cd SVG-2.28
 sudo perl -MCPAN -e "install SVG"

Install Perl module miniXML

You can get it from XML-Mini-1.38. Run the following commands to install it.

 tar xvf XML-Mini-1.38.tar.gz
 cd XML-Mini-1.38
 perl Makefile.PL
 make
 make test
 sudo make install

Install Perl module XML::Simple

You can get it from XML-Simple-2.18. Run the following commands to install it.

 tar xvf XML-Simple-2.18.tar.gz
 cd XML-Simple-2.18
 perl Makefile.PL
 make
 make test
 sudo make install

Run APPR for Apache OpenOffice 3.4

You need to set executable attribute for shell script under "$APPR_HOME"

 cd "$APPR_HOME"
 chmod a+x *
 chmod a+x appr_hook.d/*

You can run commands as below to launch Aoo3.4.

 cd "$APPR_HOME"
 sudo ./appr -t "$SOFFICE_HOME/program/soffice.bin" -p Startup --enable-hooks=strace,monitor

Here is a snapshot for Startup.

11.startup.jpg


You can run commands as below to open sample file.

 cd "$APPR_HOME"
 sudo ./appr -t "$SOFFICE_HOME/program/soffice.bin" -p LoadFile ~/Documents/sw.111.odt/ --enable-hooks=strace,monitor

Here is a snapshot for LoadFile.

11.loadfile.jpg


You can run commands as below to play odp file.

 cd "$APPR_HOME"
 sudo ./appr -t "$SOFFICE_HOME/program/soffice.bin" -p PlaySlide ~/Documents/sd.222.odp/ --enable-hooks=strace,monitor

Here is a snapshot for PlaySlide.

11.playslide.jpg

Make a full build for Apache OpenOffice with APPR

Based on Section 1, you can make a full build with APPR like this.

 cd "$AOO_HOME/main"
 source LinuxX86.Env.sh
 export TIMELOG=TRUE
 cd solver
 make clean
 cd instsetoo_native
 build --all -P4

Then you can get a new installation package with full APPR support.

You can also get the latest source again, then apply APPR's patch into AOO's codebase. You need to set TIMELOG to TRUE before run "build --all -P4".

Todo List

How to get VTune package and enable it in APPR? If you can find resource for VTune, please update this section. Thanks!

Personal tools