Loading Blog Search...

Wednesday, November 12, 2008

Develop Browser Plugin based on Windows Mobile

NPAPI is supported by various Web browser engines, such as WebKit and Gecko. Iris browser is a WebKit based Web browser that can run on Windows Mobile. So, we could extend Iris with NPAPI plugin.

I am not sure whether Iris provide develop environment for plugin. We might need to find another way to build plugin.

What I tried first is to build minimo, and study whether can build plugins based on minimo. Unfortunately, seems minimo does not support plugins well. Anyway, I write down my experiment for reference.

  • Build minimo
minimo is the minisized Mozilla running on Windows Mobile, and I guess it is a good start point to build plugin, as all its codes are available. http://www-archive.mozilla.org/projects/minimo/WinCE/build.html gives the steps to build minimo. Here, just add some points:
  1. I met the problem@http://forums.mozillazine.org/viewtopic.php?f=47&t=553405, solved by adding one line ac_cv_static_assertion_macros_work=yes before the line of "if eval "test \"`echo '$''{'ac_cv_static_assertion_macros_work'+set}'`\" = set"; then". I do not know the reason, and after it pass, and I revert the configure to original version, it still works
  2. on Windows Vista, \moztools\bin\nsinstall.exe requires administrator right, so, I run console by administrator to build.
  3. Then I met another issue: SEE_MASK_FLAG_DDEWAIT and SEE_MASK_INVOKEIDLIST undefined in nsOSHelperAppService.cpp, solved by using patch from https://bugzilla.mozilla.org/show_bug.cgi?id=402948
It takes 1~2 hours on my DualCore 1.86G Dell Precision PWS390 to build minimo.
  • qtWebKit as plugin development SDK

Although minimo runs smoothly on my emulator, but I found it does not support plugins (if I am wrong, let me know, tkz). qtWebKit is the Windows Mobile port of WebKit engine. It's the next candidate I tried. Please goto http://code.staikos.net/ for latest sources.

I download qtwebkit 4.5 from SVN repository http://svn.webkit.org/repository/webkit/trunk, version 37064. http://git.webvm.net/ provides npsimple, a simple plugin sample running on Windows Mobile.

I built npsimple with VS2008, after setting include directory in the project. Please make sure the directory setting contains those with npruntime.h and npfunctions.h. For the qtWebKit I downloaded, they are:

  1. WebCore\bridge
  2. WebCore\plugins

To try the plugin, I installed Iris browser based on WebKit to my Window Mobile emulator (WM5)(http://www.torchmobile.com/blog/?p=5), and then copy the built plugin to plugins folder under where I install Iris browser (http://www.torchmobile.com/blog/?p=9).

All done! Just open the html coming with npsimple project and see the result.

Monday, September 01, 2008

PdfEdit -- the strongest open source PDF editor.

There is no budget for me to study into Acrobat's pdf editor in detail, so, I do not know whether PdfEdit is weaker or stronger than it.

But based on my experience, I just recommend PdfEdit as your pdf editor, especially if you do not bother do a little script programming.

Here, I give an example of how could you change all pages' size with PdfEdit.

Step1: goto 1st page, and decide the desire page size: In this example, we change the left margin to 50, the effect on 1st page is:

Step2: goto 1st page again, if you want to change page 1-6's size to (50,0,595.2,841.92), then input the scripts to script window and press enter to execute it, that's all:



For more samples of PdfEdit script, you can refer to .ps files in PdfEdit home dir, e.g., ubuntu install it to /usr/share/pdfedit/.
Detailed script API can be found at: http://pdfedit.petricek.net/appendix.html

Monday, August 04, 2008

WinDbg theme

I just follow tess blog to setup the windbg theme. For reuse, the theme can be exported to windbg.reg (HKEY_CURRENT_USER\Software\Microsoft\Windbg\Workspaces), so that you can recover it easily.

Saturday, May 10, 2008

Google services down in Singapore?

Nothing special is at this weekend, but I cannot access google services (google search, google reader, etc.) today.
It's funny that I must revert to yahoo/msn to do search.