вторник, 7 мая 2013 г.

HaxeBuilder 1.0.1 FAQ

FAQ

1. What is the current status of NME Live reloading feature support?
NME support is at an very early development stage. For simple projects it may work, but it's not tested much. Works only for flash target.

And currently compilation time for NME is not too fast.(Just like regular build using FlashDevelop, maybe a lil bit faster). I haven't worked on optimizing compilation times. But it's possible to speed up compilation a lot.

If you experiencing bugs, you still can use HaxeBuilder for building feature, it will keep up to date your swf, on every file change.

2. How to use NME Live reloading project template?
Currently HaxeBuilder will not automatically start when you press Project->Build Project(or F5 or F8) in FlashDevelop.

But it's very easy to start HaxeBuilder for NME projects using .bat files provided with NME project template:

"start.bat" - starts HaxeBuilder(With console window).
"stop.bat" - stops all HaxeBuilder instances.
"preview_swf.bat" - starts HaxeBuilder preview swf window(That is usefull when you accidentally closed window that shows swf, or if you got bugs and want to use HaxeBuilder, just as tool that will automatically rebuild swf, every time you change something).
"build_release.bat" - start HaxeBuilder and will compile release version of swf and quit.(You should stop HaxeBuilder for this project before running this .bat file).

You can run .bat files in FlashDevelop, if you right click on .bat file and select "Execute".

Actually you can set your FlashDevelop project, to run HaxeBuilder when you press build(Just like in Haxe/AS3 Live reloading project template).

To do this, open menu "Project"->"Properties..."
Go to "Build" tab, and add "HaxeBuilder" command to Pre-Build Command Line.


Now it should start automatically when you run build in FlashDevelop. When you want to close HaxeBuilder, run "stop.bat".

3. How to use it with existing FlashDevelop Haxe/AS3 projects?
You can use HaxeBuilder with almost any your FlashDevelop Haxe/AS3 project. You don't need to create new Haxe Live reloading project template in order to use HaxeBuilder.

There are two ways to do this:
1)Maybe one of simplest ways, is to use .bat files, provided with Haxe Live reloading project template. You can find these bat files, if you click on menu "Tools" ->"User Config Files...".


That will open FlashDevelop folder, that contain installed all templates. Open "Projects" folder and select "Haxe Live Reloading project", you will see something like this:

You can copy those .bat files and use them in Haxe/AS3 projects.


To do this, open menu "Project"->"Properties..."
Go to "Build" tab, and add "HaxeBuilder" command to Pre-Build Command Line.



IMPORTANT NOTE: You will need to stop HaxeBuilder manually, in order to do this, copy "stop.bat" file from project template or just run "Stopper" using command line(shortcut Win+R).

4. How can I specify custom build commands for HaxeBuilder?
You can create .hxml file and run HaxeBuilder like this:
HaxeBuilder build.hxml
HaxeBuilder will execute build instructions, just like "haxe build.hxml", on any file change. HaxeBuilder will check for file changes in folder where you start it. So it's not a good idea, to run it in root directory of hard drive. In this mode it will not show SWF preview window(Will not show result).