当前位置:首页 > 服务端 > A Perl script to update your WTL installation

A Perl script to update your WTL installation

A Perl script to update your WTL installation

 

Introduction

When installing the Microsoft Platform SDK, you can choose to install WTL (Windows Template Library) source files, a collection of MFC-like classes that make GUI development a bit easier without the overhead imposed by "True-MFC". Unfortunately, the default installation does not enable immediate usage of WTL in Visual Studio (the complier can not find #included WTL headers even though WTL has been installed).

Description

This Perl script was written to automate the update of WTL. No input is required from the user and all arguments are ignored. We will define update as a process of making WTL available to projects in Visual Studio (i.e. #includes will successfuly locate WTL files).

First, we suppose you have installed Microsoft Platform SDK with at least the following options:

  • Selected "Configuration Options/Integrate with MS Visual C++"
  • Selected "Configuration Options/Register Environment Variables"
  • Selected "Source Code/Windows Template Library"

The Readme.txt file provided by Microsoft says it is is enough to copy header files from WTL source directory to one of include directories (directory that is searched when compiler looks for #includes). MS SDK installer registers path %MSSDK%/Include/Atl30 as the first include directory. Therefore the script first looks for the "MSSDK" environment value (path of the SDK installation). Then, files in %MSSDK%/Include/Atl30 (target) are updated with files from %MSSDK%/Src/WTL/Include (source). The update procedure evaluates time stamp difference between target file (if any) and source file. Each comparison may have one of those outcomes:

  • No target file: copy source file to target
  • Target and source files have the same time stamp: do not update target
  • Target is newer than source: issue warning and do not update target
  • Target is older than source: overwrite target with newer source file

 

You can also use this script with further releases of MSSDK. After installing newer Platform SDK the script will ensure that %MSSDK%/Include/Atl30 contains current versions of WTL source files (all older files will be automatically replaced with new (installed) versions).

Discussion

Another way to update WTL would be to update a list of directories that Visual Studio scans when looking for #included files. This script tried to follow recommendation from WTL's readme.txt though.

To do:

  • Update not only sources, but also application wizard file. That means copy awx files from WTL install directory to Visual Studio wizard directory. The only problem is how to locate Visual Studio installation path...

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here

作者:小风风的博客
来源链接:https://www.cnblogs.com/qzxff/p/16978618.html

版权声明:
1、Java侠(https://www.javaxia.com)以学习交流为目的,由作者投稿、网友推荐和小编整理收藏优秀的IT技术及相关内容,包括但不限于文字、图片、音频、视频、软件、程序等,其均来自互联网,本站不享有版权,版权归原作者所有。

2、本站提供的内容仅用于个人学习、研究或欣赏,以及其他非商业性或非盈利性用途,但同时应遵守著作权法及其他相关法律的规定,不得侵犯相关权利人及本网站的合法权利。
3、本网站内容原作者如不愿意在本网站刊登内容,请及时通知本站(javaclubcn@163.com),我们将第一时间核实后及时予以删除。





本文链接:https://www.javaxia.com/server/124705.html

标签: No compiler
分享给朋友:

“A Perl script to update your WTL installation” 的相关文章