- Grab MozillaFirefox 3.0.x and mozilla-xulrunner 1.9.0.x packages, and extract their contents to directory MozillaFirefox and mozilla-xulrunner190.
- Use quilt to apply patches to mozilla-xulrunner190:
- use quilt -v setup mozilla-xulrunner190.spec to setup the xulrunner 1.9.0 source tree.
- change directory to mozilla-xulrunner190/mozilla, using quilt push -a, to apply all xulrunner 1.9.0 patches.
- use quilt import to import all patches in MozillaFirefox packages, as we put Firefox patches in two seperate packages containing different patches.
- use quilt -v setup mozilla-xulrunner190.spec to setup the xulrunner 1.9.0 source tree.
- Put a mozconfig in directory mozilla-xulrunner190/mozilla, contains the following informations:
. $topsrcdir/browser/config/mozconfig
mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/objdir-ff-debug
ac_add_options --enable-debug
ac_add_options --disable-optimize - Type the command "make -f client.mk build" in directory mozilla-xulrunner190/mozilla.
- Wait for compiling finished, go to directory objdir-ff-debug/dist/bin, using "./firefox" to run the built Firefox 3.0.
Monday, July 06, 2009
How to prepare a Mozilla Building and Debuging Environment.
The following information is about Firefox 3.0 and mozilla-xulrunner 1.9.0 on SUSE Linux. Please following the steps below:
In SUSE Mozilla Team now.
Since February 2009, I was transfered from i18n team to Mozilla team in Novell.
Although it is a tough task, but it is also interesting to me.
Recent months I am very busy, thanks for the help from Wolfgang. Later maybe I can spend more time on making patches. :)
As I spend lots of time about how to debug Firefox bugs on SUSE Linux. I will write some series of articles to ease others to join developing Mozilla Firefox on SUSE Linux.
Although it is a tough task, but it is also interesting to me.
Recent months I am very busy, thanks for the help from Wolfgang. Later maybe I can spend more time on making patches. :)
As I spend lots of time about how to debug Firefox bugs on SUSE Linux. I will write some series of articles to ease others to join developing Mozilla Firefox on SUSE Linux.
Sunday, March 08, 2009
Make Intel 82845G/GL/GE card 3D Acceleration work on openSUSE 11.1.
This weekend I decided to update my home PC from openSUSE 10.2 to openSUSE 11.1.
After finishing the update, when X server starts, the OS stuck.
Re-configure my card using sax2, got vesa driver, without any 3D acceleration.
Using my card vendor id and device id searching on google, found a bug on launchpad, and it recommended to add this to xorg.conf in device section:
Option "NoAccel" "true" # works around LPB 304871 - probably disables the next two.
And the driver prints "failed to init memory manager", using git clone to get intel driver code, find the message in code:
if (!xf86InitFBManager(pScreen, &(pI810->FbMemBox))) {
xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
"Failed to init memory manager\n");
return FALSE;
}
And google xf86InitFBManager, found it was related to XAA. Reading man intel, find:
Option "AccelMethod" "string"
Choose acceleration architecture, either "XAA" or "EXA".
So I tried to remove "NoAccel", and add the following line to xorg.conf:
Option "AccelMethod" "XAA".
Last more than 20 changes to xorg.conf, failed to start Xserver, but for this time, the Xserver starts normally, and running glxgears, the performance is the same as before.
Oh, I got the 3D acceleration back again.
After the Xserver is OK, I checked the src/i810_driver.c file again. I found that it doesn't include exa.h. So it seems not support EXA, but by default, the EXA is chosen instead of XAA, so this is the cause of the problem.
PS: my card id:
Intel Corporation 82845G/GL[Brookdale-G]/GE Chipset Integrated Graphics Device [8086:2562] (rev 01)
After finishing the update, when X server starts, the OS stuck.
Re-configure my card using sax2, got vesa driver, without any 3D acceleration.
Using my card vendor id and device id searching on google, found a bug on launchpad, and it recommended to add this to xorg.conf in device section:
Option "NoAccel" "true" # works around LPB 304871 - probably disables the next two.
And the driver prints "failed to init memory manager", using git clone to get intel driver code, find the message in code:
if (!xf86InitFBManager(pScreen, &(pI810->FbMemBox))) {
xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
"Failed to init memory manager\n");
return FALSE;
}
And google xf86InitFBManager, found it was related to XAA. Reading man intel, find:
Option "AccelMethod" "string"
Choose acceleration architecture, either "XAA" or "EXA".
So I tried to remove "NoAccel", and add the following line to xorg.conf:
Option "AccelMethod" "XAA".
Last more than 20 changes to xorg.conf, failed to start Xserver, but for this time, the Xserver starts normally, and running glxgears, the performance is the same as before.
Oh, I got the 3D acceleration back again.
After the Xserver is OK, I checked the src/i810_driver.c file again. I found that it doesn't include exa.h. So it seems not support EXA, but by default, the EXA is chosen instead of XAA, so this is the cause of the problem.
PS: my card id:
Intel Corporation 82845G/GL[Brookdale-G]/GE Chipset Integrated Graphics Device [8086:2562] (rev 01)
Switch Editor from Vim to Emacs.
Recently I begin to maintain a new project in SUSE Linux, glad to return the C++ world. The new project is tough, but more challenging, so the last month is very busy.
On Feb 10, I am trying to switch editor to emacs. In the past, I use emacs for my own project, and use vim to make patches for SUSE Linux. But I still feel uncomfortable on mode editor like vim, already get used to mode-less editor. But I didn't know how to use emacs to browse function definitions in large projects before, finally I settled this.
First, turn cua-mode on, by which you can use Ctrl-X, Ctrl-C, Ctrl-V, for cut, copy, paste, and Ctrl-Z for undo.
Then use ctags or etags to generate TAGS files.
And enable emacs to browse multiple function definitions in C++ by using etags-select.el.
Here are the URL:
http://www.emacswiki.org/emacs/EtagsSelect.
Now browsing C++ code is easy, but the code completion still does not work. It doesn't matter I don't rely on code completion much now.
PS: command examples for generating TAGS file.
$ctags -eR .
or
$find \( -name '*.h' -or -name '*.cpp' \) -print | etags -
On Feb 10, I am trying to switch editor to emacs. In the past, I use emacs for my own project, and use vim to make patches for SUSE Linux. But I still feel uncomfortable on mode editor like vim, already get used to mode-less editor. But I didn't know how to use emacs to browse function definitions in large projects before, finally I settled this.
First, turn cua-mode on, by which you can use Ctrl-X, Ctrl-C, Ctrl-V, for cut, copy, paste, and Ctrl-Z for undo.
Then use ctags or etags to generate TAGS files.
And enable emacs to browse multiple function definitions in C++ by using etags-select.el.
Here are the URL:
http://www.emacswiki.org/emacs/EtagsSelect.
Now browsing C++ code is easy, but the code completion still does not work. It doesn't matter I don't rely on code completion much now.
PS: command examples for generating TAGS file.
$ctags -eR .
or
$find \( -name '*.h' -or -name '*.cpp' \) -print | etags -
Monday, August 25, 2008
Sorry, for the bugs of novel-pinyin 0.2.3 release.
As the first release of 0.2.x series, I put the novel-pinyin on sourceforge. But later I withdraw the package, because some serious bug has been found.
During the Beijing Olympics, I finally released the novel-pinyin 0.2.3 package.
Thank lyman for feedbacking the bug in initializing code.
As novel-pinyin has been released, the fix code is relatively small, so I decide to release the fix as a seperate patch.
using the following command in novel-pinyin-0.2.3 directory:
patch -p2 < ../../urgent-patch-fix-novel-pinyin-first-load.patch
PS:
顺便提一句,输入法的中文名称变为了新智能拼音,英文名称为Novel Pinyin不变。
During the Beijing Olympics, I finally released the novel-pinyin 0.2.3 package.
Thank lyman for feedbacking the bug in initializing code.
As novel-pinyin has been released, the fix code is relatively small, so I decide to release the fix as a seperate patch.
using the following command in novel-pinyin-0.2.3 directory:
patch -p2 < ../../urgent-patch-fix-novel-pinyin-first-load.patch
PS:
顺便提一句,输入法的中文名称变为了新智能拼音,英文名称为Novel Pinyin不变。
Friday, August 08, 2008
novel-pinyin 0.3.x wishlist
TODO Items:
1.Modify pinyin large table to merge scim-pinyin phrase lib into gb_char.table.
2. Write phrase to token conversion. (phrase_large_table)
3. Write n-gram segment to bootstrap phrase generation. (replace current mmseg.)
4. Larger corpus learning.
5. Entropy-based n-gram prune.
6. Add professional phrase libraries support.
7. Better fuzzy pinyin support.(like ms-pinyin)
1.Modify pinyin large table to merge scim-pinyin phrase lib into gb_char.table.
2. Write phrase to token conversion. (phrase_large_table)
3. Write n-gram segment to bootstrap phrase generation. (replace current mmseg.)
4. Larger corpus learning.
5. Entropy-based n-gram prune.
6. Add professional phrase libraries support.
7. Better fuzzy pinyin support.(like ms-pinyin)
novel-pinyin 0.2.3 released
Done Items:
1. Import the entire scim-pinyin phrases as corpus.
2. Better HMM parameter adjusts.
3. Better candidates adjusts.
4. Add version check.
5. Add data file corruption detection.
6. Protect against integer overflow.
Todo Items:
A input pad module for temporarily input Chinese characters by strokes lookup.
(Maybe this can be done in Hacker Week.)
1. Import the entire scim-pinyin phrases as corpus.
2. Better HMM parameter adjusts.
3. Better candidates adjusts.
4. Add version check.
5. Add data file corruption detection.
6. Protect against integer overflow.
Todo Items:
A input pad module for temporarily input Chinese characters by strokes lookup.
(Maybe this can be done in Hacker Week.)
Wednesday, May 14, 2008
novel-pinyin 0.2.x wishlist
As the first version of novel-pinyin has been released, some feedback has been received.
The next version of novel-pinyin will try to finish the following todo tasks:
1. Model Modification. Modify the P(P|W) from k/n to C(P,W)/C(W).
(C(P,W) stands for counter of pinyin and word combination,
C(W) stands for word counter.)
2. Dynamic adjust phrase positions according to bi-gram possibilities.
As in HMM model training process, the frequency adjusted is very small(1 or 6).
To magnify the position changes, replace unigram with bi-gram when possible.
3. Versioned Data File Format.
As data file format will be changed in next release. So I will add a version file in
~/.scim/novel-pinyin, to indicate file format version.
When different version has been detected, the files of old version will be flushed.
Optional:
skim integration.
The next version of novel-pinyin will try to finish the following todo tasks:
1. Model Modification. Modify the P(P|W) from k/n to C(P,W)/C(W).
(C(P,W) stands for counter of pinyin and word combination,
C(W) stands for word counter.)
2. Dynamic adjust phrase positions according to bi-gram possibilities.
As in HMM model training process, the frequency adjusted is very small(1 or 6).
To magnify the position changes, replace unigram with bi-gram when possible.
3. Versioned Data File Format.
As data file format will be changed in next release. So I will add a version file in
~/.scim/novel-pinyin, to indicate file format version.
When different version has been detected, the files of old version will be flushed.
Optional:
skim integration.
Tuesday, February 19, 2008
novel-pinyin 0.1.0 internal test
You can get newest novel-pinyin 0.1.0 from the following url:
http://download.opensuse.org/repositories/home:/wupeng/
The source code in sourceforge.net misses the data file, so it will not run.
Please use the rpm on the above url.
http://download.opensuse.org/repositories/home:/wupeng/
The source code in sourceforge.net misses the data file, so it will not run.
Please use the rpm on the above url.
Thursday, February 14, 2008
2008 New Year!
我自己的输入法Novel Pinyin终于跑起来了,还有一些bug,不过影响不大。现在我就在用我自己写的输入法,写自己的博客。
下周开始在同事中测试新的输入法。
首先,在这个周末,要把rpm在openSUSE Build Service上做出来。
下周开始在同事中测试新的输入法。
首先,在这个周末,要把rpm在openSUSE Build Service上做出来。
Thursday, December 20, 2007
Finish segment & training part, upload it to sourceforge.
Upload new novel-pinyin code to sourceforge, currently finished segment & training part.
In this place, I use a modified interpolation method to ease implementation.
The parameter optimization part is done in research prototype.
So the code in novel-pinyin is relatively simple, just use parameters computed from prototype.
The word segment use shortest path algorithm to segment words, and prepare the data to training part.
In this place, I use a modified interpolation method to ease implementation.
The parameter optimization part is done in research prototype.
So the code in novel-pinyin is relatively simple, just use parameters computed from prototype.
The word segment use shortest path algorithm to segment words, and prepare the data to training part.
Thursday, December 13, 2007
AIGLX on OpenSUSE 10.3
My Notebook has a 945 GM Graphics Card, which support AIGLX.
Default 3D Desktop on openSUSE will use XGL. But I want other OpenGL applications can benefit from
hardware acceleration. So I switched to AIGLX.
Refer to http://en.opensuse.org/AIGLX.
And I use X.org config file from here:
For Java Application, set AWT_TOOLKIT=MToolkit, from here:
export AWT_TOOLKIT=MToolkit to avoid gray window.
Default 3D Desktop on openSUSE will use XGL. But I want other OpenGL applications can benefit from
hardware acceleration. So I switched to AIGLX.
Refer to http://en.opensuse.org/AIGLX.
And I use X.org config file from here:
Section "Device"
Identifier "** Intel i810 (generic) [i810]"
Driver "i810"
VideoRam 262144
Option "DRI" "true"
Option "XAANoOffscreenPixmaps" "true"
EndSection
Section "ServerLayout"
Option "AIGLX" "true"
EndSection
Section "DRI"
Mode 0666
EndSection
Section "Extensions"
Option "Composite" "Enable"
EndSection
For Java Application, set AWT_TOOLKIT=MToolkit, from here:
export AWT_TOOLKIT=MToolkit to avoid gray window.
Friday, November 30, 2007
Upload new novel-pinyin source code to sourceforge.net
Finished n-gram storage code, and update code on http://novel-pinyin.cvs.sourceforge.net/novel-pinyin/novel-pinyin/.
On currently implementation, I modified the P(P|W) from ratio which is computed from scim-pinyin, to k/n, k indicates k matched pinyins, n indicates total n pinyins for word W.
I don't know how it will influence the result of HMM correct rate, hopes it will not be bad.
Tested this approach on research prototype, the correct rate is lower. And test with manual input, it don't work too bad.
And counting the computing complexity, it seems that the speed is sufficient.
On currently implementation, I modified the P(P|W) from ratio which is computed from scim-pinyin, to k/n, k indicates k matched pinyins, n indicates total n pinyins for word W.
I don't know how it will influence the result of HMM correct rate, hopes it will not be bad.
Tested this approach on research prototype, the correct rate is lower. And test with manual input, it don't work too bad.
And counting the computing complexity, it seems that the speed is sufficient.
Wednesday, November 14, 2007
Novel-Pinyin Ver1 TODO List
Storage:
- N-gram file
- Training using parameters in prototype system.
- Original Lookup with Candidate Selection.
- Learn User Sentence when Commit String.
- Special Table support rewrite from scim-pinyin in c.
- Scim UI Config Module.
Tuesday, October 16, 2007
Federico in Beijing
Now Federico has come to Beijing. He is a great hacker and good man.
Here we together looking at the pango CJK performance issue.
http://www.gnome.org/~federico/news-2007-10.html#pango-cjk-1
And He went to the Great Wall:
http://www.gnome.org/~federico/news-2007-10.html#15
Here we together looking at the pango CJK performance issue.
http://www.gnome.org/~federico/news-2007-10.html#pango-cjk-1
And He went to the Great Wall:
http://www.gnome.org/~federico/news-2007-10.html#15
Tuesday, September 11, 2007
Tuesday, December 26, 2006
让openSUSE 10.2支持包含中文文件名的U盘
先是在hal的源码中找了半天,最后终于在gnome-volume-manager的代码找到了设置iocharset=utf8的方法。
在gnome-terminal下运行:
gconftool-2 -s /system/storage/default_options/vfat/mount_options -t list --list-type string [shortname=winnt,uid=,iocharset=utf8]
就可以解决问题了。
在gnome-terminal下运行:
gconftool-2 -s /system/storage/default_options/vfat/mount_options -t list --list-type string [shortname=winnt,uid=,iocharset=utf8]
就可以解决问题了。
Tuesday, October 03, 2006
论文雏形基本搞定
非常努力的工作了半年,看了N多资料。
终于,基于Hidden Markov Model的拼音整句输入法原型,可以正常工作了。
过一阵儿,在Linux下就可以用整句输入法了。
效果很好,不过,离成品还有一段距离。
呵呵,兴奋中。
终于,基于Hidden Markov Model的拼音整句输入法原型,可以正常工作了。
过一阵儿,在Linux下就可以用整句输入法了。
效果很好,不过,离成品还有一段距离。
呵呵,兴奋中。
十一回家休息!!!
终于又回家了。
经过一番修改,我的Blog终于在IE6种正常显示了。
要把模板中的第一句话去掉,并把开头改成如下格式:
<html>
<head>
<meta equiv="content-type" content="text/html; charset=UTF-8">
...
-----------------------------------------------------------------------------------
就可以在IE6中正常显示了。呵呵
经过一番修改,我的Blog终于在IE6种正常显示了。
要把模板中的第一句话去掉,并把开头改成如下格式:
<html>
<head>
<meta equiv="content-type" content="text/html; charset=UTF-8">
...
-----------------------------------------------------------------------------------
就可以在IE6中正常显示了。呵呵
Monday, May 01, 2006
Subscribe to:
Posts (Atom)
