Project Properties -> Build Tab -> Pre-Build Command Line に記述。
Output Tab -> Platform -> Compilation を Custom Buildに設定するのを忘れずに。
$(CompilerPath)\haxelib.exe run munit test -as3 -js
$(CompilerPath)\haxe.exe $(ProjectDir)\compile.hxml
Project Properties -> Build Tab -> Pre-Build Command Line に記述。
Output Tab -> Platform -> Compilation を Custom Buildに設定するのを忘れずに。
$(CompilerPath)\haxelib.exe run munit test -as3 -js
$(CompilerPath)\haxe.exe $(ProjectDir)\compile.hxml
hxcppがインストールされていればホームディレクトリに「.hxcpp_config.xml」というファイルがあるのでこれを編集する。
varsセクション以下に 「toolchain」に「mingw」を、「MINGW_ROOT」に「TDM-GCCをインストールしたパス」を設定する。
<section id="vars">
<!-- ... -->
<set name="toolchain" value="mingw" />
-swf-lib ./lib/starling.swc | |
--macro patchTypes('starling.patch') |
package ; | |
import haxe.macro.Context; | |
import haxe.macro.Expr; | |
import haxe.macro.Expr.Field; | |
import haxe.macro.Expr.FieldType; | |
import haxe.macro.Expr.Function; | |
import haxe.macro.ExprTools; | |
using Lambda; |
例えばデータ形式をStarling
に設定したときの話。
C:\Program Files\Adobe\Adobe Flash CC\Common\Configuration\Sprite Sheet Plugins
にある Starling.plugin.jsfl
の frameExport
メソッドを書き換える。
function frameExport(frame) {
var frameId = frame.id;
if (frame.symbol != null && frame.frameSource instanceof SymbolItem) {
frameId = frame.frameSource.name;
var frameNumber = ('0000' + frame.frameNumber).slice(-4);
(function () { "use strict"; | |
var Main = function() { }; | |
Main.main = function() { | |
var vTimes = 2; | |
var timeline = jsfl.Lib.fl.getDocumentDOM().getTimeline(); | |
var _g1 = 0; | |
var _g = timeline.layerCount; | |
while(_g1 < _g) { | |
var layerIndex = _g1++; | |
var layer = timeline.layers[layerIndex]; |
MUnitのTestMain.hxを書き換える。
addResultClient
にPrintClientBase
を与える。
// TestMain.hx#new
var runner:TestRunner = new TestRunner(client);
runner.addResultClient(new HTTPClient(new PrintClientBase()));
すると例えばターゲットがAS3ならば、report/test/simple/as3/output.txt
が出力されるので
手順が複雑なのでバッチファイルを作った(build.bat)。
適当な新規ディレクトリを作成してbuild.bat
を保存。
同じ階層にplayerglobal14_0.swcを保存する。バッチファイルからplayerglobal14_0.swc
を呼び出すのでリネームしないように。
要するに次のようになっていれば動くはず。
$ dir
Alternativa3Dをクローンしておく。
最初にcompcでSWCを生成する。コマンドは次の通り。
compc ^
-swf-version 23 ^
-source-path src ^
-include-sources src ^
--external-library-path+=libs\A3DModelsBase-2.5.2.swc ^