本文整理汇总了C#中MonoDevelop.Projects.Project.SetMakefileData方法的典型用法代码示例。如果您正苦于以下问题:C# Project.SetMakefileData方法的具体用法?C# Project.SetMakefileData怎么用?C# Project.SetMakefileData使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MonoDevelop.Projects.Project
的用法示例。
在下文中一共展示了Project.SetMakefileData方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ValidateChanges
//.........这里部分代码省略.........
data.AsmRefVar.Prefix = this.entryAsmRefPattern.Text.Trim ();
data.ProjectRefVar.Sync = this.cbKeepRefSync.Active;
data.ProjectRefVar.Name = GetActiveVar (comboProjectRefVar);
data.ProjectRefVar.Prefix = this.entryProjectRefPattern.Text.Trim ();
data.IsAutotoolsProject = this.cbAutotoolsProject.Active;
if (this.cbAutotoolsProject.Active)
data.RelativeConfigureInPath = this.fileEntryConfigureInPath.Path;
//data.AssemblyNameVar = GetActiveVar (comboAssemblyName);
//data.OutputDirVar = GetActiveVar (comboOutputDir);
data.BuildTargetName = this.BuildTargetName.Text.Trim ();
data.ExecuteTargetName = this.ExecuteTargetName.Text.Trim ();
data.CleanTargetName = this.CleanTargetName.Text.Trim ();
data.ParallelProcesses = this.spinProcesses.ValueAsInt;
data.MessageRegexName = GetActiveVar (comboMessageType);
if (data.MessageRegexName == "Custom") {
data.CustomErrorRegex = this.entryErrorRegex.Text;
data.CustomWarningRegex = this.entryWarningRegex.Text;
}
// Data validation
MakefileData oldData = project.GetMakefileData ();
MakefileData tmpData = data;
if (tmpData.IntegrationEnabled) {
//Validate
try {
tmpData.Makefile.GetVariables ();
} catch (FileNotFoundException e) {
ShowMakefileNotFoundError (e);
return false;
} catch (Exception e) {
MessageService.ShowError (parentDialog, GettextCatalog.GetString ("Specified makefile is invalid: {0}", tmpData.AbsoluteMakefileName), null, e);
return false;
}
if (tmpData.IsAutotoolsProject &&
!File.Exists (System.IO.Path.Combine (tmpData.AbsoluteConfigureInPath, "configure.in")) &&
!File.Exists (System.IO.Path.Combine (tmpData.AbsoluteConfigureInPath, "configure.ac")))
{
MessageService.ShowError (parentDialog, GettextCatalog.GetString ("Path specified for configure.in is invalid: {0}", tmpData.RelativeConfigureInPath));
return false;
}
if (tmpData.SyncReferences &&
(String.IsNullOrEmpty (tmpData.PackageRefVar.Name) ||
String.IsNullOrEmpty (tmpData.AsmRefVar.Name) ||
String.IsNullOrEmpty (tmpData.ProjectRefVar.Name))) {
MessageService.ShowError (parentDialog, GettextCatalog.GetString ("'Sync References' is enabled, but one of Reference variables is not set. Please correct this."));
return false;
}
if (!CheckNonEmptyFileVar (tmpData.BuildFilesVar, "Build"))
return false;
if (!CheckNonEmptyFileVar (tmpData.DeployFilesVar, "Deploy"))
return false;
if (!CheckNonEmptyFileVar (tmpData.ResourcesVar, "Resources"))
return false;
if (!CheckNonEmptyFileVar (tmpData.OthersVar, "Others"))
return false;
//FIXME: All file vars must be distinct
try {
tmpData.GetErrorRegex (true);
} catch (Exception e) {
MessageService.ShowError (parentDialog, GettextCatalog.GetString ("Invalid regex for Error messages: {0}", e.Message));
return false;
}
try {
tmpData.GetWarningRegex (true);
} catch (Exception e) {
MessageService.ShowError (parentDialog, GettextCatalog.GetString (
"Invalid regex for Warning messages: {0}", e.Message));
return false;
}
//FIXME: Do this only if there are changes b/w tmpData and Data
project.SetMakefileData (tmpData);
using (ProgressMonitor monitor = IdeApp.Workbench.ProgressMonitors.GetStatusProgressMonitor (
GettextCatalog.GetString ("Updating project"), "gtk-run", true)) {
tmpData.UpdateProject (monitor, oldData == null || (!oldData.IntegrationEnabled && tmpData.IntegrationEnabled));
}
} else {
if (oldData != null)
oldData.IntegrationEnabled = false;
}
return true;
}