需要自己添加新运行库时,tamarin的builtin.h和shell_toplevel.h可根据自己的需要生成,用来给avm添加新的运行时支持。否则windows下只需打开相关sln即可。
redux版本有几个.h和.cpp文件未添加进项目里,需要自己手工加下,lzma的源码在other-licenses目录下,也需要手工添加。这样就能成功编译出avm.exe了。
copy tamarin/platform/win32/armasm.rules to c:/Program Files/Microsoft Visual Studio 9.0/VC/VCProjectDefaults
Build "builtin.h" following the instructions below in the section "Compiling and running applications"
Do the same for shell_toplevel.h, starting in avmplus/shell, using the command "python shell_toplevel.py"
open the Tamarin project file platform/win32/avmplus2008.sln.
Choose your desired configuration and target, and build.
参见
https://developer.mozilla.org/en-US/docs/Tamarin/Tamarin_Build_Documentation的
Microsoft Visual Studio部分。
tamarin目前只支持部分runtime库,flash player的大部分运行库并没有开源。builtin.as中只含有最基础的部分,故flash.net、flash.display等等都不支持,avm.exe无法运行包含这些的swf。
redtamarin(https://code.google.com/p/redtamarin/)加了C.std、C.socket支持库,功能强了一些。
http://blog.youkuaiyun.com/isaaq/article/details/2165267 http://blog.youkuaiyun.com/hgl868/article/details/8193193 http://www.rritw.com/a/JAVAbiancheng/ANT/20110226/62534.html和http://blog.youkuaiyun.com/hgl868/article/details/8193185 写得比较详细,可参考。
http://sourceforge.net/projects/caspin/ 是个很不错的tamarin封装包