Unify PlatformTarget.watch().

The implementation was copy-pasted, so it makes more sense to have only a single copy. `HTML5Platform` added a comment about possible future changes, so I kept that. Future changes will still be possible by overriding the function.
This commit is contained in:
Joseph Cloutier
2025-08-31 22:30:05 -04:00
parent 6ed53a9b92
commit 057a2a4f5e
12 changed files with 37 additions and 123 deletions

View File

@@ -357,7 +357,7 @@ class TVOSPlatform extends PlatformTarget
return context;
}
private function getDisplayHXML():HXML
private override function getDisplayHXML():HXML
{
var path = targetDirectory + "/" + project.app.file + "/haxe/Build.hxml";
@@ -644,20 +644,6 @@ class TVOSPlatform extends PlatformTarget
context.HAS_LAUNCH_IMAGE = has_launch_image;
}*/
public override function watch():Void
{
var hxml = getDisplayHXML();
var dirs = hxml.getClassPaths(true);
var outputPath = Path.combine(Sys.getCwd(), project.app.path);
dirs = dirs.filter(function(dir)
{
return (!Path.startsWith(dir, outputPath));
});
var command = ProjectHelper.getCurrentCommand();
System.watch(command, dirs);
}
@ignore public override function install():Void {}