Latest Changes
Differences between version #13658 and #15436
2,4c2,9
< First you need to download and compile tamarin for your system, more information can be found here:
< [[https://developer.mozilla.org/En/Tamarin/Tamarin_Build_Documentation|Tamarin Build Documentation]]
< Builds : ftp://ftp.mozilla.org/pub/js/tamarin/builds/tamarin-redux/ (copy paste to your browser, this wiki is not up to it)
---
> First you need to download and compile tamarin for your system. More information can be found in the [[https://developer.mozilla.org/En/Tamarin/Tamarin_Build_Documentation|Tamarin Build Documentation]]
> You can also download a ready built binary (avmshell) from here: **ftp://ftp.mozilla.org/pub/js/tamarin/builds/tamarin-redux/**
> Some changes are needed to the following classes:
> * **Boot.hx**
> Modify the standard //std\flash\Boot.hx// file by replacing it with the code from [[http://haxe.org/doc/targets/tamarin/boot?lang=en|Boot.hx]]
> * **System.hx**
> Add new System class by creating a folder //avmplus// in the //std// folder and in there add a new file [[http://haxe.org/doc/targets/tamarin/system?lang=en|System.hx]].
> You should end up with: //std\avmplus\System.hx//
6,14c11,12
< ==== ====
< Then you need to modify the standard Boot file for the flash target.
< ==== ====
< replace //std\flash9\Boot.hx// with code found on this page [[http://haxe.org/doc/targets/tamarin/boot?lang=en|Boot.hx]]
< ==== ====
< then you need to add a new System file in //std\avm// using code found here:
< [[http://haxe.org/doc/targets/tamarin/system?lang=en|System.hx]]
< ==== ====
< now you can create a test Main, unfortunately it differs slightly from regular as it needs a name space.
---
> Now, let's do a simple test:
> Create a file //Main.hx// and add the code below.
16c14
< @:ns("")@:native("IPL") class TamarinTest
---
> @:ns("")@:native("IPL") class Main
20c18
< trace("hello cruel world from Haxe targeting avmshell! tamarin v"+System.getAvmplusVersion());
---
> trace("hello cruel world from Haxe targeting avmshell! tamarin v" + System.getAvmplusVersion());
25c23
< var tt = new TamarinTest(); trace("goodbye cruel world! freeMem:"+System.freeMemory);
---
> var tt = new Main(); trace("goodbye cruel world! freeMem:" + System.freeMemory);
29,37c27,54
< Then you can compile it
< //-main TamarinTest -swf9 tamarinTest.swf -D avmshell//
< ==== ====
< Then you need to convert in to ABC using this file
< [[http://hg.mozilla.org/tamarin-central/file/fbecf6c8a86f/utils/abcdump.as|abcdump.as]]
< You can find some instruction here:
< [[http://propella.blogspot.com/2010/01/recent-tamarin-and-abc-tools.html|recent-tamarin-and-abc-tools]]
< but Haxe community hopes to add Haxe specific instructions, or create a tool to make this simpler.
< ==== ====
---
> Create a //build.hxml// file and add the following commands
> <code haxe>
> -main Main
> -D avmshell
> -swf main.swf
> </code>
>
> Before we can test our compiled code in avmshell we need to create a little script that calls the main class in our swf:
> Create a file //boot.as// with the following code:
> <code haxe>
> IPL.main()
> </code>
> and compile it to //boot.abc// with:
> <code haxe>
> java -jar asc.jar -import builtin.abc boot.as
> </code> (//asc.jar// and //builtin.abc// are part of the Flex sdk and can be downloaded from [[http://www.adobe.com/devnet/flex/flex-sdk-download.html|here]] )
>
> Now we can finally run our test from terminal /command line:
> <code haxe>
> avmshell main.swf boot.abc
> </code>
> You should see printed:
> <code haxe>
> Main.hx:5: hello cruel world from Haxe targeting avmshell! tamarin v2.1 1049616:
> Main.hx:11: goodbye cruel world! freeMem:794624
> </code>
> **Notes**
> Although you can extract the abc file from the compiled main.swf with this tool: [[http://hg.mozilla.org/tamarin-central/file/fbecf6c8a86f/utils/abcdump.as|abcdump.as]] ([[http://propella.blogspot.com/2010/01/recent-tamarin-and-abc-tools.html|instructions]]), you can also use the main.swf without conversion as shown in the test above.
| Ver | Date | Entry | Lg | User | Action |
|---|---|---|---|---|---|
| #19368 | 2013-05-25 09:43:00 | download | en | Simn | View | Diff |
| #19367 | 2013-05-25 09:36:11 | manual/haxe3 | en | Simn | View | Diff |
| #19366 | 2013-05-25 09:28:57 | download/manual_install | en | Simn | Changed title from Manual Installation, and SVN. to Manual Installation and SVN (pre 3.0) |
| #19365 | 2013-05-23 18:46:47 | ref/enums | jp | shohei909 | View | Diff |
| #19364 | 2013-05-19 18:01:37 | manual/haxe3 | en | orwellophile | View | Diff |
| #19363 | 2013-05-19 17:58:20 | manual/haxe3 | en | orwellophile | View | Diff |
| #19362 | 2013-05-19 16:16:17 | api/haxe/timer | en | vegetablesalad | View | Diff |
| #19361 | 2013-05-19 16:14:40 | api/haxe/timer | en | vegetablesalad | View | Diff |
| #19360 | 2013-05-13 17:42:34 | doc/libraries | en | Confidant | View | Diff |
| #19359 | 2013-05-13 05:01:15 | manual/macros/advanced | en | jason | View | Diff |
| #19358 | 2013-05-12 02:55:03 | com/ide | en | MarcWeber | View | Diff |
| #19357 | 2013-05-11 05:26:13 | ref/conditionals | jp | shohei909 | View | Diff |
| #19356 | 2013-05-10 09:29:15 | manual/completion | en | jason | View | Diff |
| #19355 | 2013-05-09 00:24:39 | download/manual_install/leopard | en | JLM | View | Diff |
| #19354 | 2013-05-09 00:10:46 | download/manual_install/leopard/justinsbuildnotes | en | JLM | View | Diff |
| #19353 | 2013-05-08 18:42:04 | com/news | en | ncannasse | View | Diff |
| #19352 | 2013-05-08 18:12:08 | manual/haxe3 | en | ncannasse | View | Diff |
| #19351 | 2013-05-08 18:09:11 | manual/haxe3 | en | Simn | View | Diff |
| #19350 | 2013-05-08 18:04:19 | manual/haxe3 | en | ncannasse | View | Diff |
| #19349 | 2013-05-08 15:57:29 | doc/haxelib/haxelib2 | en | jason | View | Diff |
Previous | Next