我需要制作一个自定义的C++项目向导,它与内置的C++向导相同。哪种类型并不重要。它可以是控制台类型的项目。
我需要更改的只是添加一个自定义包含目录的路径和一个自定义库目录的路径。
我该怎么做?
我需要制作一个自定义的C++项目向导,它与内置的C++向导相同。哪种类型并不重要。它可以是控制台类型的项目。
我需要更改的只是添加一个自定义包含目录的路径和一个自定义库目录的路径。
我该怎么做?
我认为您需要查看项目模板。
Here is a link to writing a new wizard http://msdn.microsoft.com/en-us/library/7k3w6w59.aspx
我建议将这些类型的设置(如自定义路径)存储在属性表中。(.props文件。)然后你可以稍后改变主意,让这个改变影响多个项目。您的向导可以简单地将.props文件添加到.vcxproj中。我也更喜欢.props的文件,因为您还可以定义vcxproj和其他.props可以使用的其他用户宏。
http://msdn.microsoft.com/en-us/library/a4xbdz1e.aspx
The built-in wizards are found in [vsinstalldir]vcVCWizardsAppWiz The additional files that register these project types are found in [vsinstalldir]vcVCprojects You could alter those or copy them to get the rest of the c++ wizard functionality.
其他想法:
您可能会注意到.vcxproj s通常有这样一个条目:
<ImportGroup Condition=" $(Configuration)|$(Platform) == Release|Win32 " Label="PropertySheets">
<Import Project="$(UserRootDir)Microsoft.Cpp.$(Platform).user.props" Condition="exists( $(UserRootDir)Microsoft.Cpp.$(Platform).user.props )" Label="LocalAppDataPlatform" />
</ImportGroup>
这意味着现有向导生成了一个条目,该条目试图绑定到用户属性表(如果存在)。
c:users<username>AppDataLocalMicrosoftMSBuildv4.0Microsoft.Cpp.Win32.user.props
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemDefinitionGroup>
<ClCompile>
<AdditionalIncludeDirectories>c:CustomInclude;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
<ItemDefinitionGroup>
</Project>
我推荐第二个想法。添加include、lib路径和其他类型的设置是一种常见的场景,现有向导通过引用用户属性表来实现这一点。
I just got a new work laptop. I want to run Visual Studio 2010 Beta 2. However, the rest of my team is using Visual Studio 2008 with .Net 3.5, and I don t want to check-in the solution migration code ...
I m interested to hear about people working with building .net applications using MSBuild, NAnt or similar tools. What are you using, why are you using it instead of the VS IDE? I like to use ...
I m trying to find the source of a bug I have found in an open-source application. I have managed to get a build up and running on my Windows machine, but I m having trouble finding the spot in the ...
I can t find the Code Analysis tool in Visual Studio Team System 2008 Database Edition. Is this feature not available in the Database Edition?
I have to turn in a hard copy of some code with an assignment. Is there any way in Visual Studio 2010 to print C# source code with syntax highlighting? PS: The assignment is solving a math problem, ...
When I m trying to change the default Image of a Control on Windows Forms in Form Designer (no matter where on which control) I get this error: Error message: An item with the same key has ...
On button Click I want to Set the Select command of a Gridview. I do this and then databind the grid but it doesn t work. What am i doing wrong? protected void bttnView_Click(object sender, ...
I am trying to create a custom wpf control, I m wondering how I can add some design-time features. I ve googled and can t seem to get to my goal. So here s my simple question, how can I add an entry ...