mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-08 11:38:21 +02:00
Reordered postbuild commands to occur after all linking
This commit is contained in:
parent
b0f69ae37d
commit
bb2fe56dc9
2 changed files with 35 additions and 20 deletions
|
@ -29,12 +29,8 @@ namespace IDE
|
|||
public int32 mUpdateCnt;
|
||||
public Project mHotProject;
|
||||
public Workspace.Options mWorkspaceOptions;
|
||||
public Dictionary<Project, String> mImpLibMap = new .() ~
|
||||
{
|
||||
for (let val in _.Values)
|
||||
delete val;
|
||||
delete _;
|
||||
};
|
||||
public Dictionary<Project, String> mImpLibMap = new .() ~ DeleteDictionaryAndValues!(_);
|
||||
public Dictionary<Project, String> mTargetPathMap = new .() ~ DeleteDictionaryAndValues!(_);
|
||||
public ScriptManager.Context mScriptContext = new .() ~ _.ReleaseLastRef();
|
||||
public ScriptManager mScriptManager ~ delete _;
|
||||
|
||||
|
@ -1218,6 +1214,8 @@ namespace IDE
|
|||
}
|
||||
}
|
||||
|
||||
mTargetPathMap[project] = new String(targetPath);
|
||||
|
||||
if (hotProject == null)
|
||||
{
|
||||
switch (QueueProjectCustomBuildCommands(project, targetPath, compileKind.WantsRunAfter ? options.mBuildOptions.mBuildCommandsOnRun : options.mBuildOptions.mBuildCommandsOnCompile, options.mBuildOptions.mPreBuildCmds))
|
||||
|
@ -1228,22 +1226,9 @@ namespace IDE
|
|||
completedCompileCmd.mFailed = true;
|
||||
}
|
||||
}
|
||||
|
||||
void DoPostBuild()
|
||||
{
|
||||
switch (QueueProjectCustomBuildCommands(project, targetPath, compileKind.WantsRunAfter ? options.mBuildOptions.mBuildCommandsOnRun : options.mBuildOptions.mBuildCommandsOnCompile, options.mBuildOptions.mPostBuildCmds))
|
||||
{
|
||||
case .NoCommands:
|
||||
case .HadCommands:
|
||||
case .Failed:
|
||||
completedCompileCmd.mFailed = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (project.mGeneralOptions.mTargetType == .CustomBuild)
|
||||
{
|
||||
if (hotProject == null)
|
||||
DoPostBuild();
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -1404,8 +1389,32 @@ namespace IDE
|
|||
return false;
|
||||
}
|
||||
|
||||
DoPostBuild();
|
||||
return true;
|
||||
}
|
||||
|
||||
public bool QueueProjectPostBuild(Project project, Project hotProject, IDEApp.BuildCompletedCmd completedCompileCmd, List<String> hotFileNames, CompileKind compileKind)
|
||||
{
|
||||
if (hotProject != null)
|
||||
return true;
|
||||
|
||||
Project.Options options = gApp.GetCurProjectOptions(project);
|
||||
if (options == null)
|
||||
return true;
|
||||
|
||||
String targetPath = null;
|
||||
mTargetPathMap.TryGetValue(project, out targetPath);
|
||||
if (targetPath == null)
|
||||
return false;
|
||||
|
||||
switch (QueueProjectCustomBuildCommands(project, targetPath, compileKind.WantsRunAfter ? options.mBuildOptions.mBuildCommandsOnRun : options.mBuildOptions.mBuildCommandsOnCompile, options.mBuildOptions.mPostBuildCmds))
|
||||
{
|
||||
case .NoCommands:
|
||||
case .HadCommands:
|
||||
case .Failed:
|
||||
completedCompileCmd.mFailed = true;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -10252,6 +10252,12 @@ namespace IDE
|
|||
success = false;
|
||||
}
|
||||
|
||||
for (var project in orderedProjectList)
|
||||
{
|
||||
if (!mBuildContext.QueueProjectPostBuild(project, hotProject, completedCompileCmd, hotFileNames, compileKind))
|
||||
success = false;
|
||||
}
|
||||
|
||||
if (hotFileNames.Count > 0)
|
||||
{
|
||||
// Why were we rehupping BEFORE hotLoad?
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue