}
}
- bool Build(BuildType buildType, List<ProjectNode> onlyNodes, CompilerConfig compiler, ProjectConfig config, int bitDepth, bool justPrint, SingleFileCompileMode mode)
+ bool Build(BuildType buildType, List<ProjectNode> onlyNodes, CompilerConfig compiler, ProjectConfig config, int bitDepth, bool justPrint, bool raw, SingleFileCompileMode mode)
{
bool result = false;
DualPipe f;
targetPlatform,
bitDepth ? " ARCH=" : "", bitDepth == 32 ? "32" : bitDepth == 64 ? "64" : "",
/*(bitDepth == 64 && compiler.targetPlatform == win32) ? " GCC_PREFIX=x86_64-w64-mingw32-" : (bitDepth == 32 && compiler.targetPlatform == win32) ? " GCC_PREFIX=i686-w64-mingw32-" : */"",
+
compilerName,
objFileExt ? " O=." : "", objFileExt ? objFileExt : "",
topNode.path, justPrint ? " -n" : "", makeFilePath);
- if(justPrint)
+ if(justPrint || raw)
ide.outputView.buildBox.Logf("%s\n", command);
Execute(command);
}
// TODO: support justPrint
sprintf(command, "%s /useenv /nologo /logcommands %s.sln %s|Win32", compiler.makeCommand, name, config.name);
- if(justPrint)
+ if(justPrint || raw)
ide.outputView.buildBox.Logf("%s\n", command);
if((f = DualPipeOpen(PipeOpenMode { output = true, error = true/*, input = true*/ }, command)))
{
(compiler.ccacheEnabled && !eC_Debug) ? "CCACHE=y " : "",
(compiler.distccEnabled && !eC_Debug) ? "DISTCC=y " : "",
(String)makeTargets, topNode.path, (justPrint || eC_Debug) ? " -n" : "", makeFilePath);
- if(justPrint)
+ if(justPrint || raw)
ide.outputView.buildBox.Logf("%s\n", command);
if((f = DualPipeOpen(PipeOpenMode { output = true, error = true, input = true }, command)))
if(found)
result = true;
}
- else if(justPrint)
+ else if(justPrint || raw)
result = ProcessPipeOutputRaw(f);
else
result = ProcessBuildPipeOutput(f, objDirExp, buildType, onlyNodes, compiler, config, bitDepth);
return result;
}
- void Clean(CompilerConfig compiler, ProjectConfig config, int bitDepth, CleanType cleanType, bool justPrint)
+ void Clean(CompilerConfig compiler, ProjectConfig config, int bitDepth, CleanType cleanType, bool justPrint, bool raw)
{
char makeFile[MAX_LOCATION];
char makeFilePath[MAX_LOCATION];
// TODO: justPrint support
sprintf(command, "%s /useenv /clean /nologo /logcommands %s.sln %s|Win32", compiler.makeCommand, name, config.name);
- if(justPrint)
+ if(justPrint || raw)
ide.outputView.buildBox.Logf("%s\n", command);
if((f = DualPipeOpen(PipeOpenMode { output = true, error = true, input = true }, command)))
{
objFileExt ? " O=." : "", objFileExt ? objFileExt : "",
cleanType == realClean ? "real" : "", cleanType == cleanTarget ? "target" : "",
topNode.path, justPrint ? " -n": "", makeFilePath);
- if(justPrint)
+ if(justPrint || raw)
ide.outputView.buildBox.Logf("%s\n", command);
if((f = DualPipeOpen(PipeOpenMode { output = true, error = true, input = true }, command)))
{
ide.outputView.buildBox.Tellf($"Deleting %s%s...",
cleanType == realClean ? $"intermediate objects directory" : $"target",
cleanType == clean ? $" and object files" : "");
- if(justPrint)
+ if(justPrint || raw)
ProcessPipeOutputRaw(f);
else
ProcessCleanPipeOutput(f, compiler, config);
delete target;
}
- bool Compile(List<ProjectNode> nodes, CompilerConfig compiler, ProjectConfig config, int bitDepth, bool justPrint, SingleFileCompileMode mode)
+ bool Compile(List<ProjectNode> nodes, CompilerConfig compiler, ProjectConfig config, int bitDepth, bool justPrint, bool raw, SingleFileCompileMode mode)
{
- return Build(build, nodes, compiler, config, bitDepth, justPrint, mode);
+ return Build(build, nodes, compiler, config, bitDepth, justPrint, raw, mode);
}
#endif
return false;
}
- bool BuildInterrim(Project prj, BuildType buildType, CompilerConfig compiler, ProjectConfig config, int bitDepth, bool justPrint)
+ bool BuildInterrim(Project prj, BuildType buildType, CompilerConfig compiler, ProjectConfig config, int bitDepth, bool justPrint, bool raw)
{
if(ProjectPrepareForToolchain(prj, normal, true, true, compiler, config))
{
ide.outputView.buildBox.Logf($"Building project %s using the %s configuration...\n", prj.name, GetConfigName(config));
- return Build(prj, buildType, compiler, config, bitDepth, justPrint);
+ return Build(prj, buildType, compiler, config, bitDepth, justPrint, raw);
}
return false;
}
return result;
}
- bool Build(Project prj, BuildType buildType, CompilerConfig compiler, ProjectConfig config, int bitDepth, bool justPrint)
+ bool Build(Project prj, BuildType buildType, CompilerConfig compiler, ProjectConfig config, int bitDepth, bool justPrint, bool raw)
{
bool result = true;
Window document;
// TODO: Disabled until problems fixed... is it fixed?
if(buildType == rebuild || (config && config.compilingModified))
- prj.Clean(compiler, config, bitDepth, clean, justPrint);
+ prj.Clean(compiler, config, bitDepth, clean, justPrint, raw);
else
{
if(buildType == relink || (config && config.linkingModified))
- prj.Clean(compiler, config, bitDepth, cleanTarget, false);
+ prj.Clean(compiler, config, bitDepth, cleanTarget, false, raw);
if(config && config.symbolGenModified)
{
DirExpression objDir = prj.GetObjDir(compiler, config, bitDepth);
ide.AdjustBuildMenus();
ide.AdjustDebugMenus();
- result = prj.Build(buildType, null, compiler, config, bitDepth, justPrint, normal);
+ result = prj.Build(buildType, null, compiler, config, bitDepth, justPrint, raw, normal);
if(config)
{
config = prj.config;
if(/*prj != project || */!prj.GetConfigIsInDebugSession(config) || !ide.DontTerminateDebugSession($"Project Build"))
{
- BuildInterrim(prj, build, compiler, config, bitDepth, mods.ctrl && mods.shift);
+ BuildInterrim(prj, build, compiler, config, bitDepth, mods.ctrl && mods.shift, mods.ctrl && !mods.shift);
}
delete compiler;
}
if(!prj.GetConfigIsInDebugSession(config) ||
(!ide.DontTerminateDebugSession($"Project Install") && DebugStopForMake(prj, relink, compiler, config)))
{
- BuildInterrim(prj, build, compiler, config, bitDepth, mods.ctrl && mods.shift);
+ BuildInterrim(prj, build, compiler, config, bitDepth, mods.ctrl && mods.shift, mods.ctrl && !mods.shift);
if(ProjectPrepareForToolchain(prj, normal, false, false, compiler, config))
{
ide.outputView.buildBox.Logf($"\nInstalling project %s using the %s configuration...\n", prj.name, GetConfigName(config));
- Build(prj, install, compiler, config, bitDepth, mods.ctrl && mods.shift);
+ Build(prj, install, compiler, config, bitDepth, mods.ctrl && mods.shift, mods.ctrl && !mods.shift);
}
}
delete compiler;
ide.outputView.buildBox.Logf($"Relinking project %s using the %s configuration...\n", prj.name, GetConfigName(config));
if(config)
config.linkingModified = true;
- Build(prj, relink, compiler, config, bitDepth, mods.ctrl && mods.shift);
+ Build(prj, relink, compiler, config, bitDepth, mods.ctrl && mods.shift, mods.ctrl && !mods.shift);
}
}
delete compiler;
config.compilingModified = true;
config.makingModified = true;
}*/ // -- should this still be used depite the new solution of BuildType?
- Build(prj, rebuild, compiler, config, bitDepth, mods.ctrl && mods.shift);
+ Build(prj, rebuild, compiler, config, bitDepth, mods.ctrl && mods.shift, mods.ctrl && !mods.shift);
}
}
delete compiler;
bool ProjectCleanTarget(MenuItem selection, Modifiers mods)
{
- CleanProject($"Project Clean Target", $"Cleaning project %s target using the %s configuration...\n", selection, cleanTarget, mods.ctrl && mods.shift);
+ CleanProject($"Project Clean Target", $"Cleaning project %s target using the %s configuration...\n", selection, cleanTarget, mods.ctrl && mods.shift, mods.ctrl && !mods.shift);
return true;
}
bool ProjectClean(MenuItem selection, Modifiers mods)
{
- CleanProject($"Project Clean", $"Cleaning project %s using the %s configuration...\n", selection, clean, mods.ctrl && mods.shift);
+ CleanProject($"Project Clean", $"Cleaning project %s using the %s configuration...\n", selection, clean, mods.ctrl && mods.shift, mods.ctrl && !mods.shift);
return true;
}
bool ProjectRealClean(MenuItem selection, Modifiers mods)
{
- CleanProject($"Project Real Clean", $"Removing intermediate objects directory for project %s using the %s configuration...\n", selection, realClean, mods.ctrl && mods.shift);
+ CleanProject($"Project Real Clean", $"Removing intermediate objects directory for project %s using the %s configuration...\n", selection, realClean, mods.ctrl && mods.shift, mods.ctrl && !mods.shift);
return true;
}
- void CleanProject(const char * terminateDebugSessionMessage, const char * cleaningMessageLogFormat, MenuItem selection, CleanType cleanType, bool justPrint)
+ void CleanProject(const char * terminateDebugSessionMessage, const char * cleaningMessageLogFormat, MenuItem selection, CleanType cleanType, bool justPrint, bool raw)
{
Project prj = project;
Array<Project> projects { };
ide.AdjustBuildMenus();
ide.AdjustDebugMenus();
- prj.Clean(compiler, config, bitDepth, cleanType, justPrint);
+ prj.Clean(compiler, config, bitDepth, cleanType, justPrint, raw);
buildInProgress = none;
ide.AdjustBuildMenus();
ide.AdjustDebugMenus();
return true;
}
- bool Compile(Project project, List<ProjectNode> nodes, bool justPrint, SingleFileCompileMode mode)
+ bool Compile(Project project, List<ProjectNode> nodes, bool justPrint, bool raw, SingleFileCompileMode mode)
{
bool result = true;
Window document;
buildInProgress = compilingFile;
ide.AdjustBuildMenus();
- result = project.Compile(nodes, compiler, config, bitDepth, justPrint, mode);
+ result = project.Compile(nodes, compiler, config, bitDepth, justPrint, raw, mode);
buildInProgress = none;
ide.AdjustBuildMenus();
}
}
selectedRows.Free(null);
if(project)
- Compile(project, nodes, mods.ctrl && mods.shift, normal);
+ Compile(project, nodes, mods.ctrl && mods.shift, mods.ctrl && !mods.shift, normal);
else
ide.outputView.buildBox.Logf($"Please select files from a single project.\n");
delete nodes;
ProjectBuild(selection, mods);
ide.Update(null);
if(!stopBuild)
- Compile(node.project, nodes, mods.ctrl && mods.shift, debugPrecompile);
+ Compile(node.project, nodes, mods.ctrl && mods.shift, mods.ctrl && !mods.shift, debugPrecompile);
delete nodes;
}
return true;
if(node.type == project)
ProjectBuild(selection, mods);
else
- Compile(node.project, nodes, mods.ctrl && mods.shift, normal);
+ Compile(node.project, nodes, mods.ctrl && mods.shift, mods.ctrl && !mods.shift, normal);
if(!stopBuild)
- Compile(node.project, nodes, mods.ctrl && mods.shift, debugCompile);
+ Compile(node.project, nodes, mods.ctrl && mods.shift, mods.ctrl && !mods.shift, debugCompile);
delete nodes;
}
return true;
if(node.type == project)
ProjectBuild(selection, mods);
else
- Compile(node.project, nodes, mods.ctrl && mods.shift, normal);
+ Compile(node.project, nodes, mods.ctrl && mods.shift, mods.ctrl && !mods.shift, normal);
if(!stopBuild)
- Compile(node.project, nodes, mods.ctrl && mods.shift, debugGenerateSymbols);
+ Compile(node.project, nodes, mods.ctrl && mods.shift, mods.ctrl && !mods.shift, debugGenerateSymbols);
delete nodes;
}
return true;
project.Run(args, compiler, config, bitDepth);
/*else if(config.targetType == sharedLibrary || config.targetType == staticLibrary)
MessageBox { master = ide, type = ok, text = "Run", contents = "Shared and static libraries cannot be run like executables." }.Modal();*/
- else if(BuildInterrim(project, run, compiler, config, bitDepth, false))
+ else if(BuildInterrim(project, run, compiler, config, bitDepth, false, false))
project.Run(args, compiler, config, bitDepth);
delete args;
delete compiler;
else if(project.GetDebug(config) ||
MessageBox { master = ide, type = okCancel, text = $"Starting Debug", contents = $"Attempting to debug non-debug configuration\nProceed anyways?" }.Modal() == ok)
{
- if(/*!IsProjectModified() ||*/ BuildInterrim(project, start, compiler, config, bitDepth, false))
+ if(/*!IsProjectModified() ||*/ BuildInterrim(project, start, compiler, config, bitDepth, false, false))
{
if(compiler.type.isVC)
{
bool useValgrind = ide.workspace.useValgrind;
bool result = false;
- if(/*!IsProjectModified() ||*/ BuildInterrim(project, restart, compiler, config, bitDepth, false))
+ if(/*!IsProjectModified() ||*/ BuildInterrim(project, restart, compiler, config, bitDepth, false, false))
{
// For Restart, compiler and config will only be used if for
// whatever reason (if at all possible) the Debugger is in a
int bitDepth = ide.workspace.bitDepth;
bool useValgrind = ide.workspace.useValgrind;
- if((ide.debugger.isActive) || (!buildInProgress && BuildInterrim(project, start, compiler, config, bitDepth, false)))
+ if((ide.debugger.isActive) || (!buildInProgress && BuildInterrim(project, start, compiler, config, bitDepth, false, false)))
ide.debugger.StepInto(compiler, config, bitDepth, useValgrind);
delete compiler;
return true;
int bitDepth = ide.workspace.bitDepth;
bool useValgrind = ide.workspace.useValgrind;
- if((ide.debugger.isActive) || (!buildInProgress && BuildInterrim(project, start, compiler, config, bitDepth, false)))
+ if((ide.debugger.isActive) || (!buildInProgress && BuildInterrim(project, start, compiler, config, bitDepth, false, false)))
ide.debugger.StepOver(compiler, config, bitDepth, useValgrind, skip);
delete compiler;
int bitDepth = ide.workspace.bitDepth;
bool useValgrind = ide.workspace.useValgrind;
- if((ide.debugger.isActive) || (!buildInProgress && BuildInterrim(project, start, compiler, config, bitDepth, false)))
+ if((ide.debugger.isActive) || (!buildInProgress && BuildInterrim(project, start, compiler, config, bitDepth, false, false)))
ide.debugger.StepUntil(compiler, config, bitDepth, useValgrind, skip);
delete compiler;