- 论坛徽章:
- 0
|
1,打包打包比较简单,可以ant一句命令就行:
http://code.google.com/p/page-speed/wiki/HowToBuildXpi
2,编译http://code.google.com/p/page-speed/wiki/HowToBuildNative
以该文章为入口就可以找到所有需要的安装文档。
下面说下大概的过程:
2.1 安装VS2005 Pro版或者VS2008因为要编译的是VC++,所以多余的东西可以不选。另外,如果是VS2008,则不需2.2了。
2.2 安装
Windows Vista SDK
因为编译PageSpeed是与FF一起编译的,所以,还需要配置编译FF的软件
2.3 安装MozillaBuildhttp://ftp.mozilla.org/pub/mozilla.org/mozilla/libraries/win32/MozillaBuildSetup-1.4.exe
MozillaBuild是一个打包,里面包含了很多软件,包括vim,emacs,python,svn等等,让你可以在Windows下模拟linux下的终端。
2.4 安装Ant
Windows下应该也可以安装Ant。不过我是借用了Linux下的Ant来完成。
2.5 编译
这里我直接用了上面链接的话:
Preparing the Page Speed sources:
Download the Page Speed
source code
. Run ant pkg-moz
from the trunk of the source tree. This will package the Page Speed
sources for building in the Mozilla build system, in the file dist/page-speed-moz.zip.
Downloading and building in the Mozilla build system:
Download mozilla Firefox source:
http://releases.mozilla.org/pub/mozilla.org/firefox/releases/latest/source/
Run tar xjf firefox-*-source.tar.bz2 (you should probably do this somewhere outside of the Page Speed source tree, e.g. /tmp. Unzip page-speed-moz.zip
in the same directory that you untarred the mozilla source. This will
overlay the Page Speed source in the mozilla extensions directory. cd mozilla make -f client.mk build This will build Firefox as well as Page Speed. It can take an hour or more. The resulting shared object will be in obj-firefox/extensions/pagespeed/src/pagespeed 有个地方需要注意的是,我用的FF3.5.2的源码解压后是“mozilla-1.9.1”,而page-speed-moz.zip期待的是“mozilla”,所以要把FF解压的后的目录改名为“mozilla”。
本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u1/37472/showart_2043334.html |
|