Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions src/lime/tools/HXProject.hx
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,9 @@ class HXProject extends Script
public var ndlls:Array<NDLL>;
public var platformType:PlatformType;
public var postBuildCallbacks:Array<CLICommand>;
public var postUpdateCallbacks:Array<CLICommand>;
public var preBuildCallbacks:Array<CLICommand>;
public var preUpdateCallbacks:Array<CLICommand>;
public var samplePaths:Array<String>;
public var sources:Array<String>;
public var splashScreens:Array<SplashScreen>;
Expand Down Expand Up @@ -206,7 +208,9 @@ class HXProject extends Script
modules = new Map<String, ModuleData>();
ndlls = new Array<NDLL>();
postBuildCallbacks = new Array<CLICommand>();
postUpdateCallbacks = new Array<CLICommand>();
preBuildCallbacks = new Array<CLICommand>();
preUpdateCallbacks = new Array<CLICommand>();
sources = new Array<String>();
samplePaths = new Array<String>();
splashScreens = new Array<SplashScreen>();
Expand Down Expand Up @@ -309,7 +313,9 @@ class HXProject extends Script

project.platformType = platformType;
project.postBuildCallbacks = postBuildCallbacks.copy();
project.postUpdateCallbacks = postUpdateCallbacks.copy();
project.preBuildCallbacks = preBuildCallbacks.copy();
project.preUpdateCallbacks = preUpdateCallbacks.copy();
project.samplePaths = samplePaths.copy();
project.sources = sources.copy();

Expand Down Expand Up @@ -954,7 +960,9 @@ class HXProject extends Script

ndlls = ArrayTools.concatUnique(ndlls, project.ndlls);
postBuildCallbacks = postBuildCallbacks.concat(project.postBuildCallbacks);
postUpdateCallbacks = postUpdateCallbacks.concat(project.postUpdateCallbacks);
preBuildCallbacks = preBuildCallbacks.concat(project.preBuildCallbacks);
preUpdateCallbacks = preUpdateCallbacks.concat(project.preUpdateCallbacks);
samplePaths = ArrayTools.concatUnique(samplePaths, project.samplePaths, true);
sources = ArrayTools.concatUnique(sources, project.sources, true);
splashScreens = ArrayTools.concatUnique(splashScreens, project.splashScreens);
Expand Down
4 changes: 4 additions & 0 deletions src/lime/tools/PlatformTarget.hx
Original file line number Diff line number Diff line change
Expand Up @@ -102,11 +102,15 @@ class PlatformTarget
{
logCommand("update");

CommandHelper.executeCommands(project.preUpdateCallbacks);

_touchedFiles = [];
update();

deleteStaleFiles(_touchedFiles);
_touchedFiles = null;

CommandHelper.executeCommands(project.postUpdateCallbacks);
}

if (command == "build" || command == "test")
Expand Down
6 changes: 6 additions & 0 deletions src/lime/tools/ProjectXMLParser.hx
Original file line number Diff line number Diff line change
Expand Up @@ -1895,6 +1895,12 @@ class ProjectXMLParser extends HXProject
case "postbuild":
parseCommandElement(element, postBuildCallbacks);

case "preupdate":
parseCommandElement(element, preUpdateCallbacks);

case "postupdate":
parseCommandElement(element, postUpdateCallbacks);

default:
if (StringTools.startsWith(element.name, "config:"))
{
Expand Down
Loading