Working with Haxe in FlashDevelop.
I’m looking for an equivalent to AS3’s bin-debug exporting with Haxe. I.E. when I’m in debug I want to export to ‘bin-debug’ and when I’m in release mode I want to export to ‘bin’.
Working with Haxe in FlashDevelop.
I’m looking for an equivalent to AS3’s bin-debug exporting with Haxe. I.E. when I’m in debug I want to export to ‘bin-debug’ and when I’m in release mode I want to export to ‘bin’.
Add this to your project file:
<app path="bin" />
<app path="bin-debug" if="debug" />
that didn’t really have the desired effect, but it’s a step in the right location. now i have a bin(-debug)/flash/bin/myApp.swf. I can work with this. and just make it export/(debug/release)/flash/bin/myApp.swf.
thanks
Ah, I thought you were using “bin” instead of “Export”, yeah, I’ve seen “Export/release” used before. I’m open to considering more flexibility in the output directory structure
yeah, what I have now is export/flash/bin and export/release/flash/bin.
More flexibility would be great, but all I wanted was a way to always keep my last release build, even after a debug build, which has been achieved.
FlashDevelop allows you to run scripts after you compile. Go to Project -> Properties -> Build, and put this in the “Post-Build” box:
if $(BuildConfig)==release haxe -main SaveCopy.hx --interp
Now make a SaveCopy.hx file in your project root, and add this:
class SaveCopy {
public static function main() {
sys.io.File.copy("export/flash/bin/SWFName.swf",
"export/release/flash/SWFName.swf");
}
}
It would be really nice if Lime provided a way to do this, because then you could pass data, such as the compile target and your defines. (Both are possible at the moment, but not without effort, and the latter requires the HXP format.)
Awesome, this pretty much allows me to do everything I wanted, and what’s really great is that I can put the swf in the release folder, without the accompanying build crap.