private void HandleOptLinkOutput(BuildResult br, string linkerOutput) { var matches = optlinkRegex.Matches(linkerOutput); foreach (Match match in matches) { var error = new BuildError(); // Get associated D source file if (match.Groups ["obj"].Success) { var obj = Project.GetAbsoluteChildPath(new FilePath(match.Groups ["obj"].Value)).ChangeExtension(".d"); foreach (var pf in Project.Files) { if (pf.FilePath == obj) { error.FileName = pf.FilePath; break; } } } error.ErrorText = "Linker error " + match.Groups ["code"].Value + " - " + match.Groups ["message"].Value; br.Append(error); } }
public bool Store() { if (configuration == null) { return(false); } // Store used compiler vendor project.UseDefaultCompilerVendor = cbUseDefaultCompiler.Active; configuration.UnittestMode = cbIsUnittestConfig.Active; project.PreferOneStepBuild = cbPreferOneStepCompilation.Active; Gtk.TreeIter iter; if (cmbCompiler.GetActiveIter(out iter)) { project.UsedCompilerVendor = cmbCompiler.Model.GetValue(iter, 0) as string; } // Store args int oldHash = configuration.GetHashCode(); configuration.ExtraCompilerArguments = extraCompilerTextView.Buffer.Text; configuration.ExtraLinkerArguments = extraLinkerTextView.Buffer.Text; configuration.LinkinThirdPartyLibraries = check_LinkThirdPartyLibs.Active; configuration.OutputDirectory = project.GetAbsoluteChildPath(text_BinDirectory.Text); configuration.Output = text_TargetFile.Text; configuration.ObjectDirectory = text_ObjectsDirectory.Text; configuration.DDocDirectory = text_DDocDir.Text; if (combo_ProjectType.GetActiveIter(out iter)) { configuration.CompileTarget = (DCompileTarget)model_compileTarget.GetValue(iter, 1); } configuration.DebugLevel = spin_debugLevel.ValueAsInt; configuration.CustomDebugIdentifiers = text_debugConstants.Text.Split(new[] { ';' }, StringSplitOptions.RemoveEmptyEntries); configuration.CustomVersionIdentifiers = text_versionConstants.Text.Split(new[] { ';' }, StringSplitOptions.RemoveEmptyEntries); configuration.UpdateGlobalVersionIdentifiers(project); // Store libs configuration.ExtraLibraries.Clear(); foreach (var p in text_Libraries.Buffer.Text.Split('\n')) { var p_ = p.Trim(); if (!String.IsNullOrWhiteSpace(p_)) { configuration.ExtraLibraries.Add(p_); } } combo_Platform.GetActiveIter(out iter); var oldPlatform = configuration.Platform; configuration.Platform = model_Platforms.GetValue(iter, 0) as string; // Update solution configuration <-> Project configuration mapping if (oldPlatform != configuration.Platform) { var slnConfig = project.ParentSolution.GetConfiguration(Ide.IdeApp.Workspace.ActiveConfiguration); var en = slnConfig.GetEntryForItem(project); if (en != null) { slnConfig.RemoveItem(project); var newEn = slnConfig.AddItem(project); newEn.ItemConfiguration = configuration.Id; newEn.Build = en.Build; newEn.Deploy = en.Deploy; } } if (oldHash != configuration.GetHashCode() && Ide.IdeApp.Workspace.ActiveConfigurationId == configuration.Id) { project.NeedsFullRebuild = true; } return(true); }