feat(ruffle): add alternative ruffle flash target runner

This commit is contained in:
2026-05-15 21:55:38 +03:00
parent 715f6807d8
commit ca61b68cd9
8 changed files with 115 additions and 12 deletions

View File

@@ -5,6 +5,7 @@ const fs = require('fs');
const fse = require('fs-extra');
const Haxe = require('./haxe');
const FlashPlayer = require('./flashplayer');
const RufflePlayer = require('./ruffle');
const Android = require('./android');
const Neko = require('./neko');
const InnoSetup = require('./innosetup');
@@ -332,9 +333,9 @@ Runner.factory = {};
*/
class FlashRunner extends Runner {
constructor(config, debug) {
constructor(config, debug, player = FlashPlayer) {
super(config, Platform.FLASH, debug);
this.player = new FlashPlayer(debug);
this.player = new player(debug);
}
prepare() {
@@ -349,6 +350,12 @@ class FlashRunner extends Runner {
}
}
class RuffleRunner extends FlashRunner {
constructor(config, debug) {
super(config, debug, RufflePlayer);
}
}
Runner.register(Platform.FLASH, FlashRunner);
/**
@@ -532,6 +539,10 @@ class Project {
}
return this;
}
static useRuffle() {
Runner.register(Platform.FLASH, RuffleRunner);
}
}
Project.BuildSystem = BuildSystem;