project config support for builder

This commit is contained in:
Anton Gushcha 2015-02-26 17:59:24 +03:00
parent b9b1b0e10b
commit 6de6b99afe
2 changed files with 8 additions and 2 deletions

View File

@ -16,6 +16,7 @@ class Builder : BackgroundOperationWatcher {
protected ExternalProcess _extprocess;
protected OutputPanel _log;
protected ProtectedTextStorage _box;
protected dstring _projectConfig;
protected BuildConfiguration _buildConfig;
protected BuildOperation _buildOp;
protected bool _verbose;
@ -23,8 +24,9 @@ class Builder : BackgroundOperationWatcher {
@property Project project() { return _project; }
@property void project(Project p) { _project = p; }
this(AppFrame frame, Project project, OutputPanel log, BuildConfiguration buildConfig, BuildOperation buildOp, bool verbose) {
this(AppFrame frame, Project project, OutputPanel log, dstring projectConfig, BuildConfiguration buildConfig, BuildOperation buildOp, bool verbose) {
super(frame);
_projectConfig = projectConfig;
_buildConfig = buildConfig;
_buildOp = buildOp;
_verbose = verbose;
@ -83,6 +85,10 @@ class Builder : BackgroundOperationWatcher {
}
}
if(_projectConfig != DEFAULT_PROJECT_CONFIGURATION) {
params ~= "--config=".dup ~ cast(string)(_projectConfig);
}
if (_verbose)
params ~= "-v".dup;

View File

@ -697,7 +697,7 @@ class IDEFrame : AppFrame {
_logPanel.logLine("No project is opened");
return;
}
Builder op = new Builder(this, currentWorkspace.startupProject, _logPanel, currentWorkspace.buildConfiguration, buildOp, false);
Builder op = new Builder(this, currentWorkspace.startupProject, _logPanel, currentWorkspace.projectConfiguration, currentWorkspace.buildConfiguration, buildOp, false);
setBackgroundOperation(op);
}