본문 바로가기
개발/Windows

[WTL] Visual studio 2022에서 WTL Wizard 설치하기

by lucidmaj7 2024. 8. 26.
728x90
반응형

Windows7은 이제 지원종료되어 Windows 10 이하 버전은 지원하지 않아도 되는 시대가 되었다. 그에 따라 Visual Studio 2019를 굳이 써야할 이유도 없다. Visual Studio 2022로 가자.

그런데 하나 걸리는게 WTL이다. WTL은 프로젝트 템플릿없이 nuget package로 쓸 수 있지만 기왕이면 프로젝트 템플릿이 자동으로 생성되면 시작하기 편해 좋을 것이다.

기존처럼 Visual studio 2022가 설치 된 상황에서 WTL 템플릿 마법사(WTL10_10320_Release 기준)를 설치하면 정상적으로 동작하지 않는다.

Setup could not find Visual Studio installed.

좀 찾아보니 아직 release에 merge는 안되었지만 vs2022대응 스크립트가 커밋되어 있었다.

https://sourceforge.net/p/wtl/git/ci/master/tree/AppWizard/Setup.js

 

Windows Template Library (WTL) / Git / [804aaa] /AppWizard/Setup.js

// Windows Template Library - WTL version 10.0 // Copyright (C) Microsoft Corporation, WTL Team. All rights reserved. // // This file is a part of the Windows Template Library. // The use and distribution terms for this software are covered by the // Micro

sourceforge.net

암튼 뭐 방법이 있다. 한번 설치해 봅시다.

1. WTL 다운로드

https://sourceforge.net/projects/wtl/files/WTL%2010/WTL%2010.0.10320%20Release/

 

Windows Template Library (WTL) - Browse /WTL 10/WTL 10.0.10320 Release at SourceForge.net

FactoryTalk Optix Cloud Manufacturing Software For manufacturers interested in a powerful, open, scalable, HMI visualization platform

sourceforge.net

에서 최신버전(WTL 10.0.10320 Release)을 받는다.

 

2. 업데이트된 스크립트 다운로드

Visual studio 2022대응 스크립트를 다운로드 받는다.

https://sourceforge.net/p/wtl/git/ci/master/tree/AppWizard/Setup.js 

 

Windows Template Library (WTL) / Git / [804aaa] /AppWizard/Setup.js

// Windows Template Library - WTL version 10.0 // Copyright (C) Microsoft Corporation, WTL Team. All rights reserved. // // This file is a part of the Windows Template Library. // The use and distribution terms for this software are covered by the // Micro

sourceforge.net

 

3. 스크립트 덮어쓰기

WTL 10.0.10320 압축파일을 압축을 풀고 AppWizard경로에 다운로드 받은 setup.js파일을 덮어쓴다.

 

4. Developer Command Prompt for VS 2022 로 스크립트 실행하기

Developer Command Prompt for VS 2022를 관리자 권한으로 실행한다.

 

스크립트가 있는 경로로 이동한다.

wscript Setup.js로 실행한다.

YES

 

설치가 성공되었다. 하지만 아직 설치가 제대로 된게 아니다.

5. 템플릿 파일 복사하기

왠지는 모르겠지만 일부 파일들이 누락되어 복사되는 듯? 하다.

WTL을 설치하면 다음 경로에 설치된다.

C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\VC\vcprojects

여기에 WTL 릴리즈 zip파일의 WTL10_10320_Release\AppWizard\Files의 파일들을 WTL폴더 하위에 복사해준다.

 

6. WTL10AppWiz.vsz 파일 수정

C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\VC\vcprojects\WTL10AppWiz.vsz 파일을 관리자권한 메모장으로 수정해야한다.

ABSOLUTE_PATH 부분을 아까 5에서 복사한 WTL폴더로 지정한다.

저장.

7. Visual studio 2022에서 프로젝트 생성해보기

프로젝트 템플릿 목록에서 WTL을 검색하면 WTL 프로젝트 마법사가 나온다.

 

이렇게 Vitsual Studio 2022에서 WTL 프로젝트 템플릿 마법사를 설치하는 방법을 알아보았다.

프로젝트에서 WTL nuget package를 설치해주면 끝.

728x90
반응형

댓글