пятница, 22 мая 2015 г., 2:52:11 UTC+3 пользователь Michael Bebenita написал:
Hi Michael,
First of all thanks for your response !
Now, I have more questions that can be divided to 3 categories (the order is from less to more important): development environment issues, compilation issues and usage in base.js + avm2.js.
The questions mentioned in "environment issues" and "compilation issues" currently are less relevant than question about usage in AVM2 - I added them in order to get some background to procedure describing how I created base.js + avm2.js
However "usage" is critical for me ...
==========================================================
Environment :
==========================================================
1. Development Environment (environment build was based on recommendations from
https://github.com/mozilla/shumway/wiki):
1.1 "git clone --recursive
https://github.com/mozilla/shumway.git Shumway" didn't work for me because of certificate issues (my system failed to validate certificate related to https scheme), so I got sources as ZIP and installed it at destination place, as result I had with missing ".git" ... when tried "make bootstrap"
1.2 Create development environment for Firefox (Do I need it???) done according to "
https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Build_Instructions/Linux_Prerequisites": bootstrap.py did not work properly, so I installed manually (using chapter deals with RedHat family distributions), but were missing the following libraries: "wireless-tools-devel", "mesa-libGL-devel", "gstreamer-devel", "gstreamer-plugins-base-devel", "pulseaudio-libs-devel", "dbus-glib-devel", "Gconf2-devel" - how that is critical for Shumway compilation ?
1.3 Probably I tried to build system more comprehensive than I need ... may be installation of node.js, grunt, libstdc++ and mercurial will be enough to build Shumway sources or I'm wrong?
==========================================================
2. Compilation:
==========================================================
2.1 "make {bootstrap,install-libs,build-web,build-libs}" and some other options did not work. Does that matter for building procedure ???
2.2 "make -C utils/ install-tamarin-src install-tamarin-tests" does not work: "install-tamarin-src" returns error and "install-tamarin-tests" unsupported option ...
2.3 According to "
https://github.com/mozilla/shumway/wiki/Build-System" the "utils/builder/Makefile" is responsible to build all system ... but "utils/builder" directory is missing although running of "grunt build" created "base.js" and "avm2.js" !!!
==========================================================
Usage:
==========================================================
According to your comment I figured out that I can run ABC file in AVM2 using the following logic:
var sec = Shumway.createSecurityDomain(builtinABCPath, null, null);
var buffer = new Uint8Array(read(file, "binary"));
var env = {url: file, app: sec.application};
var abc = new Shumway.ABCFile(env, buffer);
sec.application.loadAndExecuteABC(abc);
var sec = createSecurityDomain(builtinABCPath, null, null);
sec.application.loadAndExecuteABC(abc);
Probably that code may be run from script tag after shell.js script was added to HTML page or not ?
I tried to find something similar in avm2.js but found definition:
"AXApplicationDomain.prototype.loadAndExecuteABC"
May be you can mention very simple example for working code. "Code" - I means HTML with script tags: includes JS lib and script running external ABC file with AVM2.
Best Regards,
Ze'ev