空门's profileGateway to nowherePhotosBlogListsMore Tools Help
    11/7/2009

    7-zip rocks

    image

        重复或者类似文件太多的时候,7-zip 的压缩率太恐怖了。

    Project Trotsky: 十月革命纪念版正式发布

    revolution
    在 Trotskyist 目录下可以找到这份墙纸

         十月革命早已被背叛,被人遗忘。但是这丝毫不能改变这一事件在人类历史中的意义,更不用说对中国人的意义了。当然,对于大多数 Meizu M8 的用户,这一天仅仅是 Mozilla Firefox for M8 正式发布的日子:

    下载地址:压缩文件(需要 7-zip),安装文件

    Project Trotsky: Announcing October Revolution edition

    DISCLAIMER

    Mozilla owns Firefox, and nullgate is just a hacker who make it available on Meizu M8.

    This software and patch is AS IS, NO SUPPORT, NO WARRANTY, NO BLAH BLAH

    This is a private build, so don’t re-distribute the binary without permission from Mozilla.

    Build information:

    Source Repository

    https://hg.mozilla.org/releases/mozilla-1.9.2/fie/dfce9796b38f

    Source Patch

    nullgate’s private patch for Meizu M8

    Compiler

    Visual Studio 2008 Pro SP1

    SDK

    Meizu M8 SDK 0.9.26

    System

    Vista Business on HP 2710p

    Languages

    zh-CN, zh-TW, en-US, de, ru

    Release notes:

      • jemalloc enabled on customized CE 6.0 SDK (thanks to )
      • menu trimmed (thanks to tgfbeta@newsmth.net)
      • userChrome.css changed (thanks to sly9@newsmth.net)
      • mouse/keyboard emulation by M8’s power-button (thanks to AntiMars@newsmth.net)
      • M8’s SIP supported, allowing to change to large keyboard (thanks to we-hjb@cnblogs.com)
      • M8’s File Browser supported for choosing File and Directory
      • M8’s auto-dialup supported
      • landscape mode supported
      • acceleration sensor used
      • foreground window manipulation
      • does not allow multiple instance of browsers
      • flashlite is supported, but not bundled
      • gles acceleration not available

    Know issues:

      • Security components corrupted from time to time (delete profile or delete cert9.db)
      • Profile corrupted occasionly (wait for initialization)
      • Cannot respond to M8’s Task manager (run browser again to bring it to top)
      • All other issue inherited from Namoroka 3.6b2pre

    Downloading (both 7z and cab available, download cab if you don’t have 7-zip installed):

    http://cid-30f50c1bf7f56351.skydrive.live.com/browse.aspx/Firefox-wince-3.6/Trotsky/October%20Revolution

    User Manual:

    N/A

    11/6/2009

    Project Trotsky: Last Issue Solved?

        Since the first day that I’m hacking fennec, this problem is bothering me:

    PrtScn20091106214109

    http://kb.mozillazine.org/Could_not_initialize_the_browser_security_component

    https://bugzilla.mozilla.org/show_bug.cgi?id=469856

    http://hg.mozilla.org/mozilla-central/rev/23c2660edce2

        After the patch, I found no problems that if I visited the Google and logged in (establish ssl connection) and visit some pages for the first session. Maybe it’s the patch, or maybe it’s the google thing, or both. Anyway, there is a workaround, and I found no major issues preventing me from releasing firefox for M8.

        The October Revoultion is coming!

    BTW: If the problem is still there, try to delete one or two .db files in the profile:

    PrtScn20091106214201

    Delete cert9.db (maybe key4.db too?)

    Project Trotsky: Say NO to Flash


    flashlite

         Firefox for Windows CE 支持 ActiveX 和 Flash。但是 Flash 是邪恶的,是对开放网络的一种私有化。正因为如此,我将不会在我自己维护的版本中提供 Flash。事实上,我已经发布过支持 Flash 的 Namoroka Beta 了。而且我公开了所有的 Patch,有需要的人完全可以自己编译一个。

    BTW:这个版本的插件有个毛病,一个页面只能显示一个 Flash。不过我本来就不喜欢 Flash,因此不会去研究缘由了。

    Project Trotsky: Ready to Ship

         Since Mozilla is merging trunk code into namoroka, I won’t update source code before release to avoid problem. Only three new features have been added into Trotsky version:

    1. Bring old browser window to the foreground when user trys to start new browser (also a shake notification)

    2. Since I don’t know how to respond to M8’s task manager, Powerbutton-click will be used to activate window (user must hold the phone upside-down).

    3. Powerbutton-hold will be used to toggle SIP (user must hold the phone upside-down).

     

    l10n-de 
    l10n-de has been fixed

    SIP-toggle

    输入法切换可能只对中文 A4 用户有用,A4 无法输入英文密码
    (颠倒手机,长按电源键,有震动提示)

    11/5/2009

    Project Trotsky: Service Pack 1

    http://cid-30f50c1bf7f56351.skydrive.live.com/self.aspx/Firefox-wince-3.6/Trotsky/RC1/Binary/Trotsky.RC1.SP1.cab

    跟安装包的语言无关
    Language Neutral

    Right-Click

    Press powerkey quickly to simulate right click, hold powerkey to simulate escape (close dialogs)
    短按电源按钮模拟鼠标右键,长按模拟 Escape 键用于关闭对话框

    Resize-After Resize-Before 

    Double Click Powerkey to resize foreground window
    双击电源按钮将窗口最大化(很危险)

    4th-intl revolution TROTSKY

    Trotskyist Wallpaper included
    夹带私货

    11/4/2009

    Trotskyist’s Vision: Internet in one Country is nonsense

    4th-intl 
    All internet users united!

        If you request a build of Firefox for M8 other than en-US and zh-CN, please let me know.

    Project Trotsky: No Germanic Version?

     

    PrtScn20091103193339 PrtScn20091103192240

         Something goes wrong in the locale? Or I spoiled it? I may release Russian version on schedule, although there may be no M8 users at all.

    Project Trotsky: Firefox for M8 Release Candiates 1

    Release notes:

      1. Removed unstable sensor-related features
      2. Chromin Frame, Grab and Drag (modified for Gecko 1.9.2) bundled and pre-configured
      3. Landscape mode can be activated during startup (Gecko 1.9.2 does not support runtime-rotation)

    版本介绍:

      1. 取消了传感器相关的特性
      2. 预装 Chromin Frame, Grab and Drag (Gecko 1.9.2 修订版) bundled
      3. 程序启动阶段可以自动横屏(Gecko 1.9.2 不支持运行时旋转)

    PrtScn20091103232015

    PrtScn20091103225010 

    Binary: http://cid-30f50c1bf7f56351.skydrive.live.com/browse.aspx/Firefox-wince-3.6/Trotsky/RC1/Binary

    Patch: http://cid-30f50c1bf7f56351.skydrive.live.com/browse.aspx/Firefox-wince-3.6/Trotsky/RC1/Patch

    11/1/2009

    Trailer for Project Trotsky

       
     
         
     
       
     
      
     
     
      
    10/31/2009

    Hacking firefox userChrome/userContent

         自从发布了 Mozilla Firefox for Windows CE 6.0 之后,总是有人要我改按钮大小,优化界面,如此这般。其实,每个人都可以自己折腾 (感谢水木上的 tgf6eta 和 sly9)。在 Profile 目录下面有个 Chrome 目录,在下面创建 userChrome.cssuserContent.css 就能很方便地改变 Firefox 的界面。例如:

    PrtScn20091028214630
    修订 userContent.css

        不过,Firefox 对旋转的支持并不理想,对页面尺寸的计算出现了误差:

    PrtScn20091029001248 PrtScn20091028213940 

         我的时间很有限,我宁可多花点时间在 Trotsky Branding 的图标上,也不会去费力美化界面。我宁可多花些时间在 Windows CE 6.0 和 M8 SDK 的学习上。毕竟,这才是我的主要目的——Fennec/Firefox 都只是我热身的一个小插曲罢了。

    Breakthrough in Project Trotsky (nullgate’s private firefox build for M8)

         It’s almost ready to be released. Here are some previews of the Trotsky branding:

    PrtScn20091030193720PrtScn20091030193731

    Trotsky home page (marxist.org) and about(no text changes at all, so no offending to Mozilla):

    PrtScn20091030194004PrtScn20091030194041

    Keyboard hacking (for password input) and Chromin frame (activated by nightly tester tool):

    PrtScn20091030120210 PrtScn20091030113319

         The actual breakthrough is powered by M8’s platform APIs. The CE keyboard can be activated by acceleration sensor, while the fire-guetures can be suppressed by IR sensor. Fire-guestures is very useful for firefox CE, but it also causes a lot of problems if the trigger button is set to left (left is all what we have on M8, unless someone put an ugly LL_MOUSE hook into the system). With my hand above IR sensor, I can finally interact with the page without the inference of fire-guestures.

         A video may be released very soon.

    BTW: As an internationalist, I don’t see any suitable language to announce Trotsky related stuff other than English.

    10/30/2009

    与 Mozilla 同步发布 Firefox 3.6 beta for Windows CE 6.0

    http://cid-30f50c1bf7f56351.skydrive.live.com/browse.aspx/Firefox-wince-3.6/Namoroka/Beta/

    空门不提供任何支持和保证,如果对此不满请勿下载安装
    开发者可以 email 交流,非开发者请不要联系我,谢谢
    请下载 firefox.js 并覆盖 default/pref 的 firefox.js
    既然是纯洁版,当然不包含 preference hack 啦

    About
    Mozilla 尚未更新页面

          今天,Mozilla 终于要发布 Firefox 3.6 beta 了,我认为有必要同步放出 Windows CE 版本。不同于 Nvidia 定制的 Windows CE 版本,我编译的这个版本只需要 ddraw 支持。根据 Mozilla 的注释,该版本的 jemalloc 可能不能在 CE5.0 下正常工作。这并不是一个 M8 SDK 编译的版本,因此理论上应该可以在大多数 Windows CE 6.0 的设备上运行。所以,如果需要输入法,请使用 M8Key 等辅助软件;如果需要拨号,请使用待机助手等辅助软件;如果需要选择文件——请耐心点选。

         推荐插件:Fireguestures, Nightly Tester Tool, Chromin Frame

         同时提供 Firefox 3.6 b2pre,但是并不推荐使用。

         补充:由于用了平台标志 QRfpe-、QRarch6,应该只能在 ARM11(v6)系统上运行。有空编译一个不用平台优化的版本,才能在普通的 Armv4i 设备上 运行。此外,这玩意儿似乎不能再模拟器上运行(也是优化造成的)。

    BTW:Trotsky 作为押轴戏,不可能这么早登台的。由于托派“不断重构”的信条,Trotsky 将不会基于 3.6 Beta Release,而是某个更新的版本。

    Sunspider PrtScn20091025104432
    Firefox 3.6 Beta <-------> Trotsky build 1

    10/27/2009

    M8 上的实时路况似乎很棘手

         虽然我也就是打车的时候参考一下,但还是觉得不爽。Google Maps 是内存杀手,就不说了(这玩意儿 wifi 能用,遇到 edge 网络差就狂吃内存):

    gditu

    交管局的 Flash,PocketIE 能看到地图却看不到路况:

    PrtScn20091027204054

    Sougo 的相对靠谱,但是刚 load 出来就刷新,至于么:

    PrtScn20091027211649 PrtScn20091027212448

    有谁能推荐点靠谱的么?

    BTW: Firefox 十月革命纪念版预览:

    PrtScn20091027232154 PrtScn20091027232234

    10/25/2009

    Codename: Trotsky

    trocllie

         作为一个准托派,为了纪念十月革命的实际领导者,苏联红军的缔造者——Leon Trotsky,我将自己维护的 Firefox for M8 内部代号定位名 Trotsky。正巧十月革命的纪念日即将到来,我计划在这一天之前发布第一个版本,暂定名为十月革命纪念版。

    W020071130407322966886 
    时间会证明十月革命的意义

    BTW:由于这是一个 private build,不会使用 Mozilla Firefox 提供 branding。相信会有很多人对此表示不满,并且会抵制托派倾向。但这是我的自由,想要用没有夹带私货的版本,大可以等待我公开补丁自己编译(如果等不及了,也可以写信给我要尚未完善的补丁,但是仅此而已)。

    PrtScn20091025104432

    PrtScn20091024234154

    10/24/2009

    Firefox w/jemalloc on M8SDK

          经过将近一个月的 hacking,我终于征服了 jemalloc。回头看,hacking 的捷径就是没有捷径——只有在理解相关技术的前提下,才可能解决问题。

          jemalloc 是 BSD 默认的内存分配器,其特点前文已经介绍过了。要在非 BSD 系统上使用它,就必须绕过系统默认的内存分配器。Mozilla Firefox 在 windows ce 上使用一个 shunt 包(导向器)来拦截系统定义的 malloc/free/realloc/calloc/new/delete 等函数。它包含一系列头文件和 mozce_shunt.dll,替换 coredll.dll 导出的内存管理函数。遗憾的是,他们漏掉了 _msize。由于 Mozilla 使用 CE5 Standard SDK 作为主要的开发环境(其实还有 WM SDK,但是都是 CE5),使用的是较老的 CRT,Firefox 依赖的 CRT 函数并不需要 _msize。然而,CE6 的 CRT 越来越接近桌面系统,新设计的 CRT 函数中产生了对 _msize 的依赖。由于 _msize 的存在,以及微软 Linker 的如下特性

    The linker searches for unresolved externals in the following order:

    1. Find all modules in the library that define current unresolved externals.
    2. Process those modules (you may pickup more unresolved externals). The linker keeps making passes through that library until no new unresolved externals are picked up.
    3. It then advances to the next library.
    In a similar manner, the linker makes a pass through the entire set of libraries. After the last library is searched, if new unresolved externals have been picked up, it returns to the first library and makes another pass.
    Problems can be avoided if you do not use bidirectional cross-library references (that is, avoid library A calling something in library B that calls something else in library A). Try to make each library as self-contained as possible.

    结果,当系统在找到 _msize 之后,又顺便在系统的库里面找到了 free/realloc 等函数。由于这些函数都是成套使用的,将一个 jemalloc 分配的指针送给系统 CRT 提供的 _msize、free、realloc,程序如果 crash 就算是给面子了。Firefox 不会 Crash,因此连暴力调试都没办法。

         在最初的半个月里面,我只知道用 M8 SDK 编译出来的 Firefox 一定错误的引用了系统 CRT 的某个内存函数。然而我并不知道究竟是哪些函数被导入了,以及问题出在哪些 dll 里面。我试过很多办法,包括尝试暴力调试。不幸中的万幸是,我一直没搞定调试环境,否则一定会浪费更多时间。前些天,我终于放弃了指望奇迹发生的想法,决定研究 linker。幸运的是,我找到了这篇文章提到的内容:

    如果你系统中安装的有Visual C++,你可以使用DUMPBIN程序来看一看OBJ文件中的节。

    于是我终于可以看到 obj、lib、dll、exe 里面的符号以及相互依赖关系了,一下子为我打开了一扇大门。但是最后我发现我根本不需要 dumpbin,因为 Mozilla Build 默认就输出了 map 文件,只需要看这个 map 文件就可以知道 dll 文件的 export 和 import:

    0001:000d4f40       getenv                     100d5f40 f   mozce_shunt:mozce_shunt.dll
    0001:000d4f50       free                       100d5f50 f   mozce_shunt:mozce_shunt.dll
    0001:000d4f60       realloc                    100d5f60 f   mozce_shunt:mozce_shunt.dll
    0001:000d4f70       malloc                     100d5f70 f   mozce_shunt:mozce_shunt.dll
    0001:000d4f80       _msize                     100d5f80 f   mozce_shunt:mozce_shunt.dll
    0001:000d4f90       memset                     100d5f90 f   corelibc:COREDLL.dll
    0001:000d4fa0       strrchr                    100d5fa0 f   corelibc:COREDLL.dll
    0001:000d4fb0       strcpy                     100d5fb0 f   corelibc:COREDLL.dll
    0001:000d4fc0       memcpy                     100d5fc0 f   corelibc:COREDLL.dll
    0001:000d4fd0       strlen                     100d5fd0 f   corelibc:COREDLL.dll
    0001:000d4fe0       _isctype                   100d5fe0 f   corelibc:COREDLL.dll

    于是,我写了十来行 perl 程序分析 map 文件,用来对比 CE5 SSDK 和 M8 SDK 链接时从 coredll 中引入函数的区别,结果我很快便发现了问题。Firefox 的若干 dll 中,本来不依赖任何内存分配函数,但是在 CE6 的 CRT 中,却产生了对 _msize 的依赖(据我推测,应该是一些安全性的改良),由于这些 dll 本来不从 mozce_shunt.dll 中导入任何函数,因此它们优先从 coredll 中导入 _msize、free 和 realloc。知道了问题,再了解了微软 Linker 的脾气,对症下药就简单多了,只需要在 mozce_shunt.def 中增加 _msize 的导出,然后到处增加这样的函数即可:

    __declspec(dllexport) void __mozce_anchor_nssutil3( void )
    {
           free(realloc(malloc(4), _msize((void*)0)));
    }

    换句话说,强迫这些 dll 优先导入 mozce_shunt.dll 中的内存操作函数,不给 coredll.dll 任何机会。

         就这样,一切问题都消失了,Firefox w/jemalloc 终于可以在 M8 上正常运行了。简单总结一下:

      1. Win32 自带的内存管理函数性能的确不如 jemalloc
      2. Mozilla 的 JS 引擎真是内存杀手,很显然,它自己不做内存压缩
      3. 要想绕开系统默认的 CRT 函数,不了解 Linker 基本上是盲人摸象

         以我愚见,Mozilla 的 JS 引擎把内存分配的问题完全抛给 jemalloc 是有些问题的。它应该向 JVM 和 CLR 学习,完全接管内存管理,尤其是需要主动进行内存压缩。在 CLR 和 JVM 中,内存管理器会不断地改变内存布局,对象地址并不是固定的。这虽然带来了额外的开销,却缓解了传统 C/C++ 程序中内存碎片的问题。

    BTW:不知道 Chrome 的 V8 引擎是怎么管理内存的。我的直觉是,V8 一定是拿空间换了速度。

    还是 Perl 靠得住啊!

         说来惭愧,虽然 Perl 是我第一门深入学习的语言,现在我已经完全是外行了。今天靠 Google 搜索关键语法写了几十行代码来分析 Linker 生成的 map 文件,总算找到了 M8 SDK 编译出来的 Firefox w/jemalloc 不能用的嫌疑之一了:

    $ perl parse.pl js/src/js3250.map
    parsing /e/Temp/october/js/src/js3250.map
    parsing /e/Temp/ce5+jemalloc/js/src/js3250.map
    +coredll:COREDLL.dll    TerminateProcess
    +corelibc:pegdmain.obj  _DllMainCRTStartupHelper
    +corelibc:COREDLL.dll   _XcptFilter
    +coredll:COREDLL.dll    __imp_TerminateProcess
    +corelibc:COREDLL.dll   __imp__XcptFilter
    +corelibc:COREDLL.dll   __imp___security_gen_cookie2
    +corelibc:COREDLL.dll   __imp__msize
    +corelibc:COREDLL.dll   __imp_memmove_s
    +corelibc:seccinit.obj  __security_cookie
    +corelibc:seccinit.obj  __security_cookie_complement
    +corelibc:COREDLL.dll   __security_gen_cookie2
    +corelibc:seccinit.obj  __security_init_cookie
    +corelibc:cexit.obj     _exitflag
    +corelibc:crt0dat.obj   _initterm
    +corelibc:COREDLL.dll   _msize

    -coredll:COREDLL.dll    LocalAlloc
    -coredll:COREDLL.dll    LocalFree
    -coredll:COREDLL.dll    LocalReAlloc
    -coredll:COREDLL.dll    LocalSize
    -coredll:COREDLL.dll    RaiseException
    -coredll:COREDLL.dll    __imp_LocalAlloc
    -coredll:COREDLL.dll    __imp_LocalFree
    -coredll:COREDLL.dll    __imp_LocalReAlloc
    -coredll:COREDLL.dll    __imp_LocalSize
    -coredll:COREDLL.dll    __imp_RaiseException
    -libcmt:invarginternal.obj      _invalid_parameter
    -libcmt:invarg.obj      _invoke_watson

         CE5 SSDK 编译出来的版本可没有这个 _msize。WINCE 的 shunt 文件花了很大的力气来屏蔽系统自带的 malloc/free/strdup 等一列函数,却漏掉了这玩意儿。

    image

        Perl 真是 hacking 必备的工具呀,算上学习的时间,写这些脚本花的时间也不到一小时。

    补充,漏洞还真不少:

    $ perl parse.pl nsprpub/lib/ds/plds4.map
    parsing /e/Temp/october/nsprpub/lib/ds/plds4.map
    parsing /e/Temp/ce5+jemalloc/nsprpub/lib/ds/plds4.map
    +coredll:COREDLL.dll    TerminateProcess
    +corelibc:pegdmain.obj  _DllMainCRTStartupHelper
    +corelibc:COREDLL.dll   _XcptFilter
    +corelibc:COREDLL.dll   __C_specific_handler
    +coredll:COREDLL.dll    __imp_TerminateProcess
    +corelibc:COREDLL.dll   __imp__XcptFilter
    +corelibc:COREDLL.dll   __imp___C_specific_handler
    +corelibc:COREDLL.dll   __imp___security_gen_cookie2
    +corelibc:COREDLL.dll   __imp_free
    +corelibc:seccinit.obj  __security_cookie
    +corelibc:seccinit.obj  __security_cookie_complement
    +corelibc:COREDLL.dll   __security_gen_cookie2
    +corelibc:seccinit.obj  __security_init_cookie
    +corelibc:cexit.obj     _exitflag
    +corelibc:crt0dat.obj   _initterm
    +corelibc:COREDLL.dll   free

    -coredll:COREDLL.dll    LocalFree
    -coredll:COREDLL.dll    __imp_LocalFree

    10/22/2009

    难以跨越的数字鸿沟

          Firefox 的 Window CE 版本是 NVidia 为了推广自己的 Tegra 而资助 Mozilla 开发的。正因为这样,Firefox 的 Windows CE 渲染后端得到了改善,Cairo-ddraw-surface 的版权页也烙下了 NVidia 的印记。NVidia 为了进一步提高其图形性能,还应用了 OpenGL ES 2.0 来对 ddraw-surface 进行加速。但是,它依赖 OES_EGL_image extension,这也是 NVidia 提出的 extension,如果牺牲性能,理论上还是能绕过去的。最要命的是,它所用的 Shader 依赖 NVidia 的扩展,几乎不可能在别的平台编译通过。这使得在其他的移动平台上使用硬件加速 Firefox 变得几乎不可能——除非完全重写这个渲染管线。

         随着技术的发展,这样的数字鸿沟反而变得越来越难以逾越了。

    BTW:我并不是想谴责 NVidia,商业公司为了推广自己的硬件而提供非通用的软件无可厚非,更何况 NVidia 还贡献了很多扩展并向开元社区捐献了代码。虽然没有硬件加速,所有的 Windows CE 版本 Firefox/Fenenc 都能受益于 ddraw 版本的 Cairo。

    10/17/2009

    Firefox 与 FlashLite

          前几天看到有人从 Windows CE6.0 R3 中提取了 FlashLite,可以在 PIE 中正确浏览 Flash。恰好我切换到 Namoroka,而 Mozilla 为 Nvidia 制作的 CE 版本正好有 flash 支持。但是我很快就遇到了问题:在 M8SDK 下面完全无法编译,有很多在 sal.h 中定义符号都找不到。这让我非常困惑,不过用 CE5 SDDK 可以正常编译,于是我得到了一个支持 Flash 的版本:

    flash flash2

         虽然我个人认为,Firefox 的 Flash 插件完全没有价值。首先它有很多 FlashLite 3.1 支持的 Flash 无法打开;其次它会浪费大量内存,拖慢页面相应速度;最后,z-order 有问题,经常会挡住滚动条,显示出来的全都是垃圾广告。如果真要看 Flash 内容为主的广告,完全可以用 PIE (这个页面 Firefox 就无法争产显示):

    PrtScn20091017001751

         不过本着一个工程师的好奇心,我研究了一下 M8SDK 无法编译的问题,结果发现 M8SDK 中提供了一个完全不同版本的的 sal.h,导致依赖 VS2008 自带版本的 sal.h 丢失:

    image 

         对此我很困惑,难道 M8SDK 的开发人员就没考虑过兼容性问题么?M8SDK 中这些小写版本有可能是 CE6 提供的新定义,很可能是为了避免和老定义冲突提供的。但是考虑到 M8SDK 中有删除 time.h 里面函数定义的前科,这个问题很可能是 M8SDK 的开发人员造成的。这些宏是 atlbase.h 所依赖的,这使得 M8 的开发人员完全不能使用 Visual Studio 2008 提供的 atl 进行开发。它也正是用 M8SDK 无法编译支持 ActiveX 的 firefox 的罪魁祸首。

    补充:经过仔细阅读,Meizu 使用的是过时的定义(deprecated delcarations)。首字母大写的版本是微软提供的新版本呢,微软的新版 sal.h 同时提供了兼容这些小写定义的版本。毕竟微软是一家保守的企业,没有什么比兼容性更重要的了。经过简单的 hack,M8SDK 已经能编译支持 Flash 的版本了,但是仍然有一些 bug(似乎是字符串定义不同)。

    补充:经过分析,其实问题是 Mozilla Build 造成的。Mozilla Build 错误地把 SDK include 放在 VC include 前面,因此总是使用旧的定义——以及旧的 C++ libary。Mozilla Build 还强制把 _WIN32_WCE 定义为 0x502,而 M8SDK 应该使用 0x600。