How can I install WTL 8.0 Project Wizards in VS 2010?

末鹿安然 提交于 2020-01-13 02:13:10

问题


I've downloaded the WTL 8.0 package and come to find the scripts to install App Wizards don't support VS 2010.

Does anyone know of updates scripts to support installation in VS 2010?

Thank you!


回答1:


WTL 8.0 was released in june 2007 so couldn't possibly support VS 2010.

You may download the current work in progress WTL 8.1 AppWizard from http://wtl.svn.sourceforge.net/viewvc/wtl/trunk/wtl/Wizards/AppWiz.tar.gz?view=tar and the matching library files from /include.tar.gz?view=tar.




回答2:


The AppWizard for VS2010 above has two small glitches (however they might deter people from using WTL with VS2010). These are very easy to fix:

1) [Output Directory] and [Intermediate Directory] in new project properties are not followed by a backslash ('\').

To fix: file: .\AppWiz\Files\Scripts\1033\default.js

I have replaced:

            if(bDebug)
        {
            config.IntermediateDirectory = 'Debug';
            config.OutputDirectory = 'Debug';
            config.ATLMinimizesCRunTimeLibraryUsage = false;
        }
        else
        {
            config.IntermediateDirectory = 'Release\\';
            config.OutputDirectory = 'Release\\';
            config.ATLMinimizesCRunTimeLibraryUsage = true;
        }

with

        // Add generic configuration details
        config.IntermediateDirectory = '$(SolutionDir)$(Configuration)\\';
        config.OutputDirectory = '$(Configuration)\\';

        config.ATLMinimizesCRunTimeLibraryUsage = !bDebug;

2) Some WTL headers are missing in newly created projects.

The symbol WTL_USE_CPP_FILES seems to be missing when the template stdafx.h file is parsed, as a result a bunch of header files are not included in new projects.

Again in .\AppWiz\Files\Scripts\1033\default.js, I have added:

        // Add WTL_USE_CPP_FILES to all projects
    wizard.AddSymbol("WTL_USE_CPP_FILES", true)

just below line 41 (so that the lines are always included). This seems to do the trick.

I've never looked at VS appWizards before (or js for that matter), so I can't guarantee the workarounds are concrete. It seems pretty straighforward though & I've been using WTL with VS2010 with no problems since I've made those changes...

WTL is awesome btw - many thanks to the folks who still maintain it!

Cheers, Yiannis



来源:https://stackoverflow.com/questions/2260351/how-can-i-install-wtl-8-0-project-wizards-in-vs-2010

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!