S60 WebKit 21772编译教程是本文要介绍的内容,主要是来了解并学习S60 WebKit应用,具体内容的学习来看本文详解。
1、安装环境:
- perl jdk S60-SDK-0548-3.0-f.3.215f.zip
- Carbide1.3(其他Carbide应该一样)
- svn
2、磁盘映射:
- subst X: C:/Symbian/9.1/S60_3rd
3、下载webkit
- svn co http://svn.webkit.org/repository/webkit/S60/trunk@21772 S60 到 X:
4、修改build.bat
(1)确定sdk在注册表的位置正确(同一个SDK安装多次会不同)
- my $sdkhome =
- $Registry->{
- "HKEY_LOCAL_MACHINE/SOFTWARE/Symbian/Series 60/3rd Ed. SDK for Symbian OS/TargetDir"
- };
(2)carbide的安装目录
- $cbdhome = "E://Nokia//Carbide.c++ v1.3" unless -d $cbdhome;
(3)carbide文件目录修改
- plugins//com.nokia.carbide.cpp.support_1.0.0 替换为 x86Build
原来carbide1.0的路径改为1.3的 $cbdhome//x86Build//Symbian_Support//
(4)注释掉delete $ENV{'MWSYM2LIBRARIES'};
改为 #delete $ENV{'MWSYM2LIBRARIES'};
5、memman的错误
- elf2e32 : Error: E1036: Symbol _ZTI15CSimpleNotifier Missing from ELF File : ../EPOC32/BUILD/S60/MEMMAN/GCCE/UREL/MemMan_sdk.dll.
- elf2e32 : Error: E1036: Symbol _ZTV15CSimpleNotifier Missing from ELF File : ../EPOC32/BUILD/S60/MEMMAN/GCCE/UREL/MemMan_sdk.dll.
这个错误是由于导出函数里面少函数
- 修改c:/Symbian/9.1/S60_3rd/S60/MemoryManager/Eabi/MemMan_gcceU.DEF
- _ZTI15CSimpleNotifier @ 18 NONAME ; #<TI># 改为 _ZTI15CSimpleNotifier @ 18 ABSENT ; #<TI>#
- _ZTV15CSimpleNotifier @ 23 ABSENT ; #<VT># 改为 _ZTV15CSimpleNotifier @ 23 ABSENT ; #<VT>#
修改c:/Symbian/9.1/S60_3rd/S60/MemoryManager/Eabi/MemMan_sdkU.DEF
- _ZTI15CSimpleNotifier @ 22 NONAME ; DATA 改为 _ZTI15CSimpleNotifier @ 22 ABSENT ; DATA
- _ZTV15CSimpleNotifier @ 27 NONAME ; DATA 改为 _ZTV15CSimpleNotifier @ 27 ABSENT ; DATA
6、"int64_t"数据类型的问题
- JavaScriptCore//bindings//HashFunctions.h:35:error:'int64_t' does not name a type..
- JavaScriptCore//bindings/HashTraits.h:53: error: no type named `SignedType' in `struct WTF::IntTypes<8u>'
由于GCCE编译器里面没有内置int64_t之类的数据类型导致的(armv5的编译器就没有这个问题)
修改c:/Symbian/9.1/S60_3rd/S60/JavaScriptCore/kjs/stdint.h文件,在末尾#endif的上面添加如下的定义:
- #ifdef __GCCE__
- typedef long long int64_t;
- typedef unsigned long long uint64_t;
- typedef unsigned long uintptr_t;
- typedef unsigned long intptr_t;
- #endif
7、代码中namespace忘记加分号结尾:
- c:/Symbian/9.1/S60_3rd/S60/WebKit/BrowserView/inc/WidgetExtension.h
- namespace KJS {
- class WidgetEventHandler;
- };
- c:/Symbian/9.1/S60_3rd/S60/WebCore/khtml/dom/dom_string.h
- namespace khtml {
- class Length;
- };
- c:/Symbian/9.1/S60_3rd/S60/WebCore/khtml/misc/loader.h
- namespace KIO {
- class Job;
- class TransferJob;
- };
8、在java script core里面,有几个函数是没有定义的,需要手工添加进去:
- Kwqkhtmlpart.cpp:(.text+0xb1ec): undefined reference to `_NPN_CreateScriptObject'
- make[1]: *** [../EPOC32/RELEASE/GCCE/UREL/WebCore_sdk.dll] Error 1
- c:/Symbian/9.1/S60_3rd/S60/JavaScriptCore/group/BMARM/JavaScriptCoreU.def
打开这个文件,然后在该文件的末尾添加如下定义:
- _ZN3KJS11Interpreter30createLanguageInstanceForValueEPNS_9ExecStateENS_8Bindings8
- Instance15BindingLanguageERKNS_6ObjectEPKNS3_10RootObjectESB_ @ 389 NONAME
- _ZN3KJS16RuntimeObjectImpC1EPNS_8Bindings8InstanceEb @ 390 NONAME
- _ZN3KJS16RuntimeObjectImpC2EPNS_8Bindings8InstanceEb @ 391 NONAME
- _ZTIN3KJS16RuntimeObjectImpE @ 392 NONAME ; #<TI>#
- _ZTVN3KJS16RuntimeObjectImpE @ 393 NONAME ; #<VT>#
- _ZN3KJS15ProtectedValues20decreaseProtectCountEPNS_8ValueImpE @ 394 ABSENT
- _ZN3KJS15ProtectedValues20increaseProtectCountEPNS_8ValueImpE @ 395 ABSENT
- _ZN3KJS8Bindings10RootObject14setInterpreterEPNS_11InterpreterE @ 396 NONAME
- _ZN3KJS8Bindings10RootObject25removeAllNativeReferencesEv @ 397 NONAME
- _ZN3KJS8Bindings8Instance32createBindingForLanguageInstanceENS1_15BindingLanguageEPvPKNS0_10RootObjectE @ 398 NONAME
- _NPN_CreateScriptObject @ 399 NONAME
9、
- WebCore_sdk.dso not found
- Solution: freeze exports by build -nfg and rebuild webcore completly as build -g webcore
10、
- aiwdialdata.dso: No such file: No such file or directory
- Solution: modify webkit.mmp file as given below #ifndef __BROWSER_SDK LIBRARY aiwdialdata.lib #endif
11、
- make[1]: *** [../EPOC32/RELEASE/GCCE/UREL/browserengine_sdk.dll] Error 1
- make: *** [TARGETWEBKIT] Error 2
- elf2e32 : Error: E1036: Symbol _ZTI10CScrollBar,_ZTI12CScrollThumb,_ZTI15CScrollBarFrame,_ZTI22CScrollBarCornerWindow,
- _ZTV10CScrollBar,_ZTV12CScrollThumb,_ZTV15CScrollBarFrame,_ZTV22CScrollBarCornerWi
- ndow Missing from ELF File : ../EPOC32/BUILD/S60/WEBKIT/GCCE/UREL/browserengine_sdk.dll.
Solution: 同8,把相应DEF中,这些已经不存在的方法改成 ABSENT
12、
- arm-none-symbianelf-ld: ../EPOC32/RELEASE/ARMV5/LIB/HomePage_Sdk.dso: No such file: No such file or
- directory
- make[1]: *** [../EPOC32/RELEASE/GCCE/UREL/WebUi.exe] Error 1
- make: *** [TARGETWEBUI] Error 2
- Solution: freeze exports by build -nfg and rebuild webcore completly as build -gn
- Processing Reindeer.pkg...
- Created Reindeer.SIS
- Sign Reindeer.sis...
- Delete intermediate files...
- Done, please copy Reindeer.sisx to your phone
- Completed in: 00:02:09
- Scanning build output for errors: 0 found
- Restoring variant.cfg
真机编译成功。
小结:详解S60 WebKit 21772编译教程的内容介绍完了,希望通过S60 WebKit内容的学习能对你有所帮助!