本文整理汇总了C#中VCFile类的典型用法代码示例。如果您正苦于以下问题:C# VCFile类的具体用法?C# VCFile怎么用?C# VCFile使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
VCFile类属于命名空间,在下文中一共展示了VCFile类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: RemoveIncludes
public Boolean RemoveIncludes(VCFile oFile)
{
Boolean bRetVal = false;
if (oFile.Extension != ".cpp" ||
oFile.Name.ToLowerInvariant().Contains("stdafx.cpp"))
{
return bRetVal;
}
if (Utilities.IsThirdPartyFile(oFile.FullPath, Utilities.GetCurrentConfiguration((VCProject)oFile.project)))
{
return bRetVal;
}
if (!Utilities.CompileFile(oFile, true))
{
mLogger.PrintMessage("ERROR: File '" + oFile.Name + "' must be in a compilable condition before you proceed! Aborting...");
return bRetVal;
}
try
{
SortedDictionary<IncludesKey, VCCodeInclude> oIncludes = new SortedDictionary<IncludesKey, VCCodeInclude>();
List<String> SkipFiles = new List<String>();
Utilities.RetrieveIncludes(oFile, ref oIncludes);
Utilities.RetrieveFilesToSkip(oFile, ref SkipFiles);
foreach (VCCodeInclude oCI in oIncludes.Values)
{
IncludeStructEx oInc = null;
Boolean isLocal = Utilities.IsLocalFile(oCI, ref oInc);
if (oInc != null && SkipFiles.Contains(oInc.sFullPath.ToUpperInvariant()))
{
continue;
}
String sIncludeFile = oCI.FullName;
TextPoint oStartPoint = oCI.StartPoint;
EditPoint oEditPoint = oStartPoint.CreateEditPoint();
String sOrigText = oEditPoint.GetText(oCI.EndPoint);
oEditPoint.Insert("//");
Utilities.SaveFile((ProjectItem)oFile.Object);
if (!Utilities.CompileFile(oFile))
{
oEditPoint.ReplaceText(oStartPoint, "", (int)vsEPReplaceTextOptions.vsEPReplaceTextAutoformat);
Utilities.SaveFile((ProjectItem)oFile.Object);
}
else
{
mLogger.PrintMessage("Dirrective " + sOrigText + " in file " + oFile.Name + " has been found as unnesessary and removed.");
bRetVal = true;
}
}
if (bRetVal)
bRetVal = RemoveIncludes(oFile);
}
catch (SystemException ex)
{
String msg = ex.Message;
}
return bRetVal;
}
开发者ID:kreuzerkrieg,项目名称:DotNetJunk,代码行数:60,代码来源:IncludesRemover.cs
示例2: VCFile
public VCFile(VCFile template)
{
mFileState1 = template.fileState1;
mFileState2 = template.fileState2;
mName1 = template.name1;
mName2 = template.name2;
mPath1 = template.path1;
mPath2 = template.path2;
}
开发者ID:nexaddo,项目名称:Unity-Version-Control,代码行数:9,代码来源:VCFile.cs
示例3: RccOptions
public RccOptions(EnvDTE.Project pro, VCFile qrcFile)
{
project = pro;
id = qrcFile.RelativePath;
qrcFileName = qrcFile.FullPath;
name = id;
if (id.StartsWith(".\\"))
name = name.Substring(2);
if (name.EndsWith(".qrc"))
name = name.Substring(0, name.Length-4);
}
开发者ID:Xenioz,项目名称:qt-labs-vstools,代码行数:11,代码来源:RccOptions.cs
示例4: SortIncludes
public void SortIncludes(VCFile oFile)
{
try
{
if (Utilities.IsThirdPartyFile(oFile.FullPath, Utilities.GetCurrentConfiguration((VCProject)oFile.project)))
{
return;
}
IncludeComparer comparer = new IncludeComparer();
SortedDictionary<IncludesKey, VCCodeInclude> oIncludes = new SortedDictionary<IncludesKey, VCCodeInclude>(comparer);
mLogger.PrintMessage("Processing file ..::" + oFile.FullPath + "::..");
Utilities.RetrieveIncludes(oFile, ref oIncludes);
SortInclude(oIncludes);
}
catch (SystemException ex)
{
mLogger.PrintMessage("Failed when processing file " + oFile.Name + ". Reason: " + ex.Message);
}
}
开发者ID:kreuzerkrieg,项目名称:DotNetJunk,代码行数:19,代码来源:SortIncludes.cs
示例5: Load
public void Load(VCFile file)
{
this.FileName = file.FullPath;
this.Cpps = new Dictionary<string, Cpp>();
string[] lines = File.ReadAllLines(file.FullPath);
for (int i = 0; i < lines.Length; i++)
{
Match match = Utils.IncludeRegex.Match(lines[i]);
if (match.Success && match.Groups["Include"].Captures.Count > 0)
{
string include = match.Groups["Include"].Captures[0].Value;
if (include.EndsWith(".cpp", true, null))
{
Cpp cpp;
VCFile f = Connect.GetVCFile(file.project as VCProject, include);
if (f != null)
{
cpp = new Cpp(f);
}
else
{
cpp = new Cpp(include);
}
if (i > 0 && lines[i - 1].StartsWith("#if"))
{
cpp.Condition = lines[i - 1].Substring(4);
}
cpp.Unity = this;
this.Cpps.Add(cpp.Name, cpp);
}
}
}
}
开发者ID:ccanan,项目名称:BladeMaster,代码行数:38,代码来源:Unity.cs
示例6: CompileSingleFile
/// <summary>
/// compile a single VCFile, do nothing with the OBJ
/// </summary>
public bool CompileSingleFile(VCFile vcFile, VCProject vcProject, VCConfiguration vcCfg, String additionalCmds = "")
{
CVXBuildSystem buildSystem;
try
{
buildSystem = new CVXBuildSystem(_vsOutputWindow, _outputPane);
}
catch (System.Exception ex)
{
MessageBox.Show(ex.Message, "ClangVSx Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
return false;
}
try
{
return buildSystem.CompileSingleFile(vcFile, vcProject, vcCfg, additionalCmds);
}
catch (System.Exception ex)
{
WriteToOutputPane("Exception During File Compile : \n" + ex.Message + "\n");
}
return false;
}
开发者ID:tritao,项目名称:ClangVSx,代码行数:27,代码来源:CVXOps.cs
示例7: AddMocStep
/// <summary>
/// Adds a moc step to a given file for this project.
/// </summary>
/// <param name="file">file</param>
public void AddMocStep(VCFile file)
{
string oldItemType = file.ItemType;
try
{
string mocFileName = GetMocFileName(file.FullPath);
if (mocFileName == null)
return;
bool hasDifferentMocFilePerConfig = QtVSIPSettings.HasDifferentMocFilePerConfig(envPro);
bool hasDifferentMocFilePerPlatform = QtVSIPSettings.HasDifferentMocFilePerPlatform(envPro);
bool mocableIsCPP = mocFileName.ToLower().EndsWith(".moc");
#if (VS2010 || VS2012 || VS2013)
if (!mocableIsCPP && file.ItemType != "CustomBuild")
{
file.ItemType = "CustomBuild";
}
#endif
#if VS2013
file = Update(this, file);
#endif
#region Add moc for each configuration
foreach (VCFileConfiguration config in (IVCCollection)file.FileConfigurations)
{
string name = ((VCCustomBuildTool)config.Tool).toolName;
VCConfiguration vcConfig = config.ProjectConfiguration as VCConfiguration;
VCPlatform platform = vcConfig.Platform as VCPlatform;
string platformName = platform.Name;
string mocRelPath = GetRelativeMocFilePath(file.FullPath, vcConfig.ConfigurationName, platformName);
string platformFilterName = null;
string configFilterName = null;
if (mocRelPath.Contains(platformName))
{
platformFilterName = platformName;
}
if (mocRelPath.Contains(vcConfig.ConfigurationName))
{
configFilterName = vcConfig.ConfigurationName;
}
VCFile mocFile = GetFileFromProject(mocRelPath);
if (mocFile == null)
{
FileInfo fi = new FileInfo(this.VCProject.ProjectDirectory + "\\" + mocRelPath);
if (!fi.Directory.Exists)
fi.Directory.Create();
mocFile = AddFileInSubfilter(Filters.GeneratedFiles(), platformFilterName, configFilterName, mocRelPath);
#if (VS2010 || VS2012 || VS2013)
if (mocFileName.ToLower().EndsWith(".moc"))
{
ProjectItem mocFileItem = mocFile.Object as ProjectItem;
if (mocFileItem != null)
HelperFunctions.EnsureCustomBuildToolAvailable(mocFileItem);
}
#endif
}
if (mocFile == null)
throw new Qt4VSException(SR.GetString("QtProject_CannotAddMocStep", file.FullPath));
VCCustomBuildTool tool = null;
string fileToMoc = null;
if (!mocableIsCPP)
{
tool = HelperFunctions.GetCustomBuildTool(config);
fileToMoc = ProjectMacros.Path;
}
else
{
VCFileConfiguration mocConf = GetVCFileConfigurationByName(mocFile, vcConfig.Name);
tool = HelperFunctions.GetCustomBuildTool(mocConf);
fileToMoc = HelperFunctions.GetRelativePath(vcPro.ProjectDirectory, file.FullPath);
}
if (tool == null)
throw new Qt4VSException(SR.GetString("QtProject_CannotFindCustomBuildTool", file.FullPath));
if (hasDifferentMocFilePerPlatform && hasDifferentMocFilePerConfig)
{
foreach (VCFileConfiguration mocConf in (IVCCollection)mocFile.FileConfigurations)
{
VCConfiguration projectCfg = mocConf.ProjectConfiguration as VCConfiguration;
if (projectCfg.Name != vcConfig.Name || (IsMoccedFileIncluded(file) && !mocableIsCPP))
{
if (!mocConf.ExcludedFromBuild)
mocConf.ExcludedFromBuild = true;
}
else
{
//.........这里部分代码省略.........
开发者ID:ago1024,项目名称:Qt4VSAddin,代码行数:101,代码来源:QtProject.cs
示例8: RefreshMocStep
/// <summary>
/// Updates the moc command line for the given header or source file
/// containing the Q_OBJECT macro.
/// If the function is called from a property change for a single file
/// (singleFile = true) we may have to look for the according header
/// file and refresh the moc step for this file, if it contains Q_OBJECT.
/// </summary>
/// <param name="vcfile"></param>
private void RefreshMocStep(VCFile vcfile, bool singleFile)
{
bool isHeaderFile = HelperFunctions.HasHeaderFileExtension(vcfile.FullPath);
if (!isHeaderFile && !HelperFunctions.HasSourceFileExtension(vcfile.FullPath))
return;
if (mocCmdChecker == null)
mocCmdChecker = new MocCmdChecker();
foreach (VCFileConfiguration config in (IVCCollection)vcfile.FileConfigurations)
{
try
{
VCCustomBuildTool tool = null;
VCFile mocable = null;
if (isHeaderFile)
{
mocable = vcfile;
tool = HelperFunctions.GetCustomBuildTool(config);
}
else
{
string mocFileName = GetMocFileName(vcfile.FullPath);
VCFile mocFile = GetGeneratedMocFile(mocFileName, config);
if (mocFile != null)
{
VCFileConfiguration mocFileConfig = GetVCFileConfigurationByName(mocFile, config.Name);
tool = HelperFunctions.GetCustomBuildTool(mocFileConfig);
mocable = mocFile;
}
// It is possible that the function was called from a source file's property change, it is possible that
// we have to obtain the tool from the according header file
if (tool == null && singleFile)
{
string headerName = vcfile.FullPath.Remove(vcfile.FullPath.LastIndexOf('.')) + ".h";
mocFileName = GetMocFileName(headerName);
mocFile = GetGeneratedMocFile(mocFileName, config);
if (mocFile != null)
{
mocable = GetFileFromProject(headerName);
VCFileConfiguration customBuildConfig = GetVCFileConfigurationByName(mocable, config.Name);
tool = HelperFunctions.GetCustomBuildTool(customBuildConfig);
}
}
}
if (tool == null || tool.CommandLine.ToLower().IndexOf("moc.exe") == -1)
continue;
VCFile srcMocFile = GetSourceFileForMocStep(mocable);
VCFile cppFile = GetCppFileForMocStep(mocable);
if (srcMocFile == null)
continue;
bool mocableIsCPP = (srcMocFile == cppFile);
string pchParameters = null;
VCFileConfiguration cppConfig = GetVCFileConfigurationByName(cppFile, config.Name);
CompilerToolWrapper compiler = CompilerToolWrapper.Create(cppConfig);
if (compiler.GetUsePrecompiledHeader() != pchOption.pchNone)
pchParameters = GetPCHMocOptions(srcMocFile, compiler);
string outputFileName = QtVSIPSettings.GetMocDirectory(envPro) + "\\";
if (mocableIsCPP)
{
outputFileName += ProjectMacros.Name;
outputFileName += ".moc";
}
else
{
outputFileName += "moc_";
outputFileName += ProjectMacros.Name;
outputFileName += ".cpp";
}
string newCmdLine = mocCmdChecker.NewCmdLine(tool.CommandLine,
GetIncludes(cppConfig),
GetDefines(cppConfig),
QtVSIPSettings.GetMocOptions(envPro), srcMocFile.RelativePath,
pchParameters,
outputFileName);
// The tool's command line automatically gets a trailing "\r\n".
// We have to remove it to make the check below work.
string origCommandLine = tool.CommandLine;
if (origCommandLine.EndsWith("\r\n"))
origCommandLine = origCommandLine.Substring(0, origCommandLine.Length - 2);
if (newCmdLine != null && newCmdLine != origCommandLine)
{
// We have to delete the old moc file in order to trigger custom build step.
string configName = config.Name.Remove(config.Name.IndexOf("|"));
string platformName = config.Name.Substring(config.Name.IndexOf("|") + 1);
string projectPath = envPro.FullName.Remove(envPro.FullName.LastIndexOf('\\'));
//.........这里部分代码省略.........
开发者ID:ago1024,项目名称:Qt4VSAddin,代码行数:101,代码来源:QtProject.cs
示例9: GetPCHMocOptions
private string GetPCHMocOptions(VCFile file, CompilerToolWrapper compiler)
{
// As .moc files are included, we should not add anything there
if (!HelperFunctions.HasHeaderFileExtension(file.Name))
return "";
string additionalMocOptions = "\"-f" + compiler.GetPrecompiledHeaderThrough().Replace('\\', '/') + "\" ";
//Get mocDir without .\\ at the beginning of it
string mocDir = QtVSIPSettings.GetMocDirectory(envPro);
if (mocDir.StartsWith(".\\"))
mocDir = mocDir.Substring(2);
//Get the absolute path
mocDir = vcPro.ProjectDirectory + mocDir;
string relPathToFile = HelperFunctions.GetRelativePath(mocDir, file.FullPath).Replace('\\', '/');
additionalMocOptions += "\"-f" + relPathToFile + "\"";
return additionalMocOptions;
}
开发者ID:ago1024,项目名称:Qt4VSAddin,代码行数:18,代码来源:QtProject.cs
示例10: SetPCHOption
public static void SetPCHOption(VCFile vcFile, pchOption option)
{
foreach (VCFileConfiguration config in vcFile.FileConfigurations as IVCCollection)
{
CompilerToolWrapper compiler = CompilerToolWrapper.Create(config);
compiler.SetUsePrecompiledHeader(option);
}
}
开发者ID:ago1024,项目名称:Qt4VSAddin,代码行数:8,代码来源:QtProject.cs
示例11: GetVCFileConfigurationByName
private static VCFileConfiguration GetVCFileConfigurationByName(VCFile file, string configName)
{
foreach (VCFileConfiguration cfg in (IVCCollection)file.FileConfigurations)
{
if (cfg.Name == configName)
return cfg;
}
return null;
}
开发者ID:ago1024,项目名称:Qt4VSAddin,代码行数:9,代码来源:QtProject.cs
示例12: RemoveFileFromFilter
/// <summary>
/// Removes a file from the filter.
/// This file will be deleted!
/// </summary>
/// <param name="project">project</param>
/// <param name="file">file</param>
public void RemoveFileFromFilter(VCFile file, VCFilter filter)
{
try
{
filter.RemoveFile(file);
FileInfo fi = new FileInfo(file.FullPath);
if (fi.Exists)
fi.Delete();
}
catch
{
}
IVCCollection subfilters = (IVCCollection)filter.Filters;
for (int i = subfilters.Count; i > 0; i--)
{
try
{
VCFilter subfilter = (VCFilter)subfilters.Item(i);
RemoveFileFromFilter(file, subfilter);
}
catch
{
}
}
}
开发者ID:ago1024,项目名称:Qt4VSAddin,代码行数:32,代码来源:QtProject.cs
示例13: OnExcludedFromBuildChanged
public void OnExcludedFromBuildChanged(VCFile vcFile, VCFileConfiguration vcFileCfg)
{
// Update the ExcludedFromBuild flags of the mocced file
// according to the ExcludedFromBuild flag of the mocable source file.
string moccedFileName = GetMocFileName(vcFile.Name);
if (string.IsNullOrEmpty(moccedFileName))
return;
VCFile moccedFile = GetGeneratedMocFile(moccedFileName, vcFileCfg);
if (moccedFile != null)
{
VCFile cppFile = null;
if (HelperFunctions.HasHeaderFileExtension(vcFile.Name))
cppFile = GetCppFileForMocStep(vcFile);
VCFileConfiguration moccedFileConfig = GetVCFileConfigurationByName(moccedFile, vcFileCfg.Name);
if (moccedFileConfig != null)
{
if (cppFile != null && IsMoccedFileIncluded(cppFile))
{
if (!moccedFileConfig.ExcludedFromBuild)
{
moccedFileConfig.ExcludedFromBuild = true;
}
}
else if (moccedFileConfig.ExcludedFromBuild != vcFileCfg.ExcludedFromBuild)
moccedFileConfig.ExcludedFromBuild = vcFileCfg.ExcludedFromBuild;
}
}
}
开发者ID:ago1024,项目名称:Qt4VSAddin,代码行数:31,代码来源:QtProject.cs
示例14: UpdateUicSteps
public void UpdateUicSteps(string oldUicDir, bool update_inc_path)
{
Messages.PaneMessage(dte, "\r\n=== Update uic steps ===");
VCFilter vcFilter = FindFilterFromGuid(Filters.GeneratedFiles().UniqueIdentifier);
if (vcFilter != null)
{
IVCCollection filterFiles = (IVCCollection)vcFilter.Files;
for (int i = filterFiles.Count; i > 0; i--)
{
VCFile file = (VCFile)filterFiles.Item(i);
if (file.Name.ToLower().StartsWith("ui_"))
{
RemoveFileFromFilter(file, vcFilter);
HelperFunctions.DeleteEmptyParentDirs(file);
}
}
}
int updatedFiles = 0;
int j = 0;
VCFile[] files = new VCFile[((IVCCollection)vcPro.Files).Count];
foreach (VCFile file in (IVCCollection)vcPro.Files)
{
files[j++] = file;
}
foreach (VCFile file in files)
{
if (file.Name.EndsWith(".ui") && !IsUic3File(file))
{
AddUic4BuildStep(file);
Messages.PaneMessage(dte, "Update uic step for " + file.Name + ".");
++updatedFiles;
}
}
if (update_inc_path)
{
UpdateCompilerIncludePaths(oldUicDir, QtVSIPSettings.GetUicDirectory(envPro));
}
Messages.PaneMessage(dte, "\r\n=== " + updatedFiles.ToString()
+ " uic steps updated. ===\r\n");
}
开发者ID:ago1024,项目名称:Qt4VSAddin,代码行数:44,代码来源:QtProject.cs
示例15: CheckForCommand
private static bool CheckForCommand(VCFile file, string cmd)
{
if (file == null)
return false;
foreach (VCFileConfiguration config in (IVCCollection)file.FileConfigurations)
{
VCCustomBuildTool tool = HelperFunctions.GetCustomBuildTool(config);
if (tool == null)
return false;
if (tool.CommandLine != null && tool.CommandLine.Contains(cmd))
return true;
}
return false;
}
开发者ID:ago1024,项目名称:Qt4VSAddin,代码行数:14,代码来源:QtProject.cs
示例16: RemoveMocStep
/// <summary>
/// Removes the custom build step of a given file.
/// </summary>
/// <param name="file">file</param>
public void RemoveMocStep(VCFile file)
{
try
{
if (!HasMocStep(file))
return;
if (HelperFunctions.HasHeaderFileExtension(file.Name))
{
foreach (VCFileConfiguration config in (IVCCollection)file.FileConfigurations)
{
VCCustomBuildTool tool = HelperFunctions.GetCustomBuildTool(config);
if (tool == null)
continue;
string cmdLine = tool.CommandLine;
if (cmdLine.Length > 0)
{
Regex rex = new Regex(@"(\S*moc.exe|""\S+:\\\.*moc.exe"")");
while (true)
{
Match m = rex.Match(cmdLine);
if (!m.Success)
break;
int start = m.Index;
int end = cmdLine.IndexOf("&&", start);
int a = cmdLine.IndexOf("\r\n", start);
if ((a > -1 && a < end) || (end < 0 && a > -1))
end = a;
if (end < 0)
end = cmdLine.Length;
cmdLine = cmdLine.Remove(start, end - start).Trim();
if (cmdLine.StartsWith("&&"))
cmdLine = cmdLine.Remove(0, 2).Trim();
}
tool.CommandLine = cmdLine;
}
Regex reg = new Regex("Moc'ing .+\\.\\.\\.");
string addDepends = tool.AdditionalDependencies;
addDepends = System.Text.RegularExpressions.Regex.Replace(addDepends,
@"(\S*moc.exe|""\S+:\\\.*moc.exe"")", "");
addDepends = addDepends.Replace(file.RelativePath, "");
tool.AdditionalDependencies = "";
tool.Description = reg.Replace(tool.Description, "");
tool.Description = tool.Description.Replace("MOC " + file.Name, "");
string baseFileName = file.Name.Remove(file.Name.LastIndexOf('.'));
string pattern = "(\"(.*\\\\" + GetMocFileName(file.FullPath)
+ ")\"|(\\S*" + GetMocFileName(file.FullPath) + "))";
string outputMocFile = null;
System.Text.RegularExpressions.Regex regExp = new Regex(pattern);
tool.Outputs = tool.Outputs.Replace(ProjectMacros.Name, baseFileName);
MatchCollection matchList = regExp.Matches(tool.Outputs);
if (matchList.Count > 0)
{
if (matchList[0].Length > 0)
{
outputMocFile = matchList[0].ToString();
}
else if (matchList[1].Length > 1)
{
outputMocFile = matchList[1].ToString();
}
}
tool.Outputs = System.Text.RegularExpressions.Regex.Replace(tool.Outputs, pattern, "",
RegexOptions.Multiline|RegexOptions.IgnoreCase);
tool.Outputs = System.Text.RegularExpressions.Regex.Replace(tool.Outputs,
@"\s*;\s*;\s*", ";", RegexOptions.Multiline);
tool.Outputs = System.Text.RegularExpressions.Regex.Replace(tool.Outputs,
@"(^\s*;|\s*;\s*$)", "", RegexOptions.Multiline);
if (outputMocFile != null)
{
if (outputMocFile.StartsWith("\""))
outputMocFile = outputMocFile.Substring(1);
if (outputMocFile.EndsWith("\""))
outputMocFile = outputMocFile.Substring(0, outputMocFile.Length-1);
outputMocFile = outputMocFile.Replace("$(ConfigurationName)",
config.Name.Substring(0, config.Name.IndexOf('|')));
outputMocFile = outputMocFile.Replace("$(PlatformName)",
config.Name.Remove(0, config.Name.IndexOf('|') + 1));
}
VCFile mocFile = GetFileFromProject(outputMocFile);
if (mocFile != null)
RemoveFileFromFilter(mocFile, Filters.GeneratedFiles());
}
file.ItemType = "ClInclude";
}
else
{
if (QtVSIPSettings.HasDifferentMocFilePerConfig(envPro)
|| QtVSIPSettings.HasDifferentMocFilePerPlatform(envPro))
{
foreach (VCFileConfiguration config in (IVCCollection)file.FileConfigurations)
//.........这里部分代码省略.........
开发者ID:ago1024,项目名称:Qt4VSAddin,代码行数:101,代码来源:QtProject.cs
示例17: IsUic3File
private static bool IsUic3File(VCFile file)
{
foreach (VCFileConfiguration config in (IVCCollection)file.FileConfigurations)
{
VCCustomBuildTool tool = HelperFunctions.GetCustomBuildTool(config);
if (tool == null)
return false;
if (tool.CommandLine.IndexOf("uic3.exe") > -1)
return true;
}
return false;
}
开发者ID:ago1024,项目名称:Qt4VSAddin,代码行数:12,代码来源:QtProject.cs
示例18: RemoveRccStep
public void RemoveRccStep(VCFile file)
{
if (file == null)
return;
try
{
string relativeQrcFilePath = file.RelativePath;
FileInfo qrcFileInfo = new FileInfo(ProjectDir + "\\" + relativeQrcFilePath);
if (qrcFileInfo.Exists)
{
RccOptions opts = new RccOptions(Project, file);
string qrcCppFile = QtVSIPSettings.GetRccDirectory(envPro) + "\\" + opts.OutputFileName;
VCFile generatedFile = GetFileFromProject(qrcCppFile);
if (generatedFile != null)
RemoveFileFromFilter(generatedFile, Filters.GeneratedFiles());
}
}
catch (System.Exception e)
{
Messages.DisplayWarningMessage(e);
}
}
开发者ID:ago1024,项目名称:Qt4VSAddin,代码行数:22,代码来源:QtProject.cs
示例19: GetCppFileForMocStep
/// <summary>
/// Helper function for Refresh/UpdateMocStep.
/// </summary>
/// <param name="file"></param>
/// <returns></returns>
private VCFile GetCppFileForMocStep(VCFile file)
{
string fileName = null;
if (HelperFunctions.HasHeaderFileExtension(file.Name) || file.Name.EndsWith(".moc"))
fileName = file.Name.Remove(file.Name.LastIndexOf('.')) + ".cpp";
if (fileName != null && fileName.Length > 0)
{
foreach (VCFile f in (IVCCollection)vcPro.Files)
{
if (f.FullPath.ToLower().EndsWith("\\" + fileName.ToLower()))
return f;
}
}
return null;
}
开发者ID:ago1024,项目名称:Qt4VSAddin,代码行数:20,代码来源:QtProject.cs
示例20: RemoveUic4BuildStep
public void RemoveUic4BuildStep(VCFile file)
{
if (file == null)
return;
foreach (VCFileConfiguration config in (IVCCollection)file.FileConfigurations)
{
VCCustomBuildTool tool = HelperFunctions.GetCustomBuildTool(config);
tool.AdditionalDependencies = "";
tool.Description = "";
tool.CommandLine = "";
tool.Outputs = "";
}
RemoveUiHeaderFile(file);
}
开发者ID:ago1024,项目名称:Qt4VSAddin,代码行数:14,代码来源:QtProject.cs
注:本文中的VCFile类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论