ooo简易编译并调试

目的:不想在本地花费全部的编译时间,只编译改动代码的模块,并能够查看调试信息

办法:借用别人/别处已经编译好的solver包

具体步骤:

(1)ooo源码只下载必须的几个公共模块:(用export命令而非checkout,一是快,且因为你不需要修改这些模块去submit)
external、default_images、dmake、solenv、moz  (好像它还需要guw)


(2)下载源码根目录下的所有元文件(非目录!):.........

 

(3)下载别人或别处编译好的solver包,放在根目录下。

 

(4)now you can copy a configure and run (前提是你安装了所有需要的软件,否则这一步会fail)

    . configure_2008.bat

    eg. you should install Microsoft Visual Studio 2008 for ooo3.2

C/C++ Compiler: Visual C++ 2008 Express Compiler (basic install, no optional parts required) (default)
Java: JDK 1.6 for DEV300 milestones >= m37 and all OOo310 versions (older milestones will fail in the hsqldb module) (default)
Windows SDK for Windows Server 2008[1]

spotted- jdk1.5 fail at doing package when you build instsetoo_native.

 

(5)do what it told you

    run ./bootstrap

 

(6)设置环境变量

run . winenv.set.sh

you can manually set like this : export DISABLE_ATL=TRUE

check your settings in winenv.set.sh for DISABLE_ATL, DISABLE_ACTIVEX: all have to be set TRUE. Visual Studio Express compilers do not contain everything needed to build the OOo ActiveX control, OLE automation and native Windows OLE support, so disable support for them. A "complete" Visual Studio (no “Express” version) is not limited in that way.

 

(7)进到你需要调试的模块(你下载并修改你的代码)编译debug版

    cd sw

    build debug=t

 

OK, JUST copy .dll to your install directory and then have fun debugging your code.

spotted--if you changed eg. l10n, officecfg, may be you need to download instsetoo_native to build after building and delivering  all modules you changed. Because seems there is no way to copy all things to update your install,  a totally new install is needed.

[2010.3.26: In fact, it must build all modules only if you just changed l10n from 0003.2. That's because all localize.sdf in each module before are not there now.]

And You can use $build -a -s |grep Building|awk '{print $3}' in $SRC_ROOT/instsetoo_native to get a list of your working build in order.

posted @ 2010-03-19 16:42  MayFirst  阅读(279)  评论(0编辑  收藏  举报