PowerToys/tools/project_template/ModuleTemplate
Divyansh Srivastava 280d1907d8
Non localized module name (#7170)
* Added get_key to powertoysmodule interface

* Replace get_name with get_key

* Implement get_key function in modules

* Make key global constant in each module

* Update settings v1 to use key to load and save files

* Fixed fancyzones and preview pane unit tests

* Removed setings unit test as the case is not covered anymore

* Add constant files for modules and use it to reference module key

* Add constant string files to colorpicker, launcher and shortcut guide

* correct sunction signature in settings helper

* Fix powerpreview merge conflicts

* nit fix with include statement location

* add check for fields in from_json_string

* Updated preview pane tests with correct from_json_string signature

* Correct Image resizer naming

* Roll back changes for adding check for property and version

* Fix image resizer not working
2020-10-19 16:07:02 -07:00
..
$projectname$.rc project template: fix rc file in module template (#992) 2019-12-24 17:06:58 +03:00
dllmain.cpp Non localized module name (#7170) 2020-10-19 16:07:02 -07:00
ModuleTemplate.vcxproj sln: do not use PCH on CI (#3106) 2020-05-25 10:59:05 +03:00
ModuleTemplateCompileTest.vcxproj updated to Microsoft.Windows.CppWinRT.2.0.200729.8 (#5306) 2020-07-30 11:37:15 -07:00
ModuleTemplateCompileTest.vcxproj.filters Move from sdk-provided cppwinrt-1.x to cppwinrt-2.x nuget package (#2246) 2020-04-29 22:02:18 +02:00
packages.config updated to Microsoft.Windows.CppWinRT.2.0.200729.8 (#5306) 2020-07-30 11:37:15 -07:00
pch.cpp FancyZones and Shortcut Guide initial commit 2019-09-05 18:12:40 +02:00
pch.h Move from sdk-provided cppwinrt-1.x to cppwinrt-2.x nuget package (#2246) 2020-04-29 22:02:18 +02:00
README.md FancyZones and Shortcut Guide initial commit 2019-09-05 18:12:40 +02:00
resource.h FancyZones and Shortcut Guide initial commit 2019-09-05 18:12:40 +02:00
trace.cpp PowerToy project template update (#934) 2019-12-16 13:12:36 +03:00
trace.h PowerToy project template update (#934) 2019-12-16 13:12:36 +03:00

PowerToy ModuleTemplate

Introduction

This project is used to generate the Visual Studio PowerToys Module Template

Instruction

In Visual Studio from the menu Project->Export Template... generate the template. Set the name PowerToys Module, add a description A project for creating a PowerToys module and an icon. Open the resulting .zip file in %USERNAME%\Documents\Visual Studio 2019\Templates\ProjectTemplates and edit MyTemplate.vstemplate to make the necessary changes, the resulting template should look like this:

<VSTemplate Version="3.0.0" xmlns="http://schemas.microsoft.com/developer/vstemplate/2005" Type="Project">
  <TemplateData>
    <Name>PowerToys Module</Name>
    <Description>A project for creating a PowerToys module</Description>
    <ProjectType>VC</ProjectType>
    <ProjectSubType>
    </ProjectSubType>
	  <LanguageTag>C++</LanguageTag>
	  <PlatformTag>windows</PlatformTag>
	  <ProjectTypeTag>extension</ProjectTypeTag>
    <SortOrder>1000</SortOrder>
    <CreateNewFolder>true</CreateNewFolder>
    <DefaultName>PowerToy</DefaultName>
    <ProvideDefaultName>true</ProvideDefaultName>
    <LocationField>Enabled</LocationField>
    <EnableLocationBrowseButton>true</EnableLocationBrowseButton>
    <Icon>__TemplateIcon.ico</Icon>
  </TemplateData>
  <TemplateContent>
    <Project TargetFileName="$projectname$.vcxproj" File="ModuleTemplate.vcxproj" ReplaceParameters="true">
      <ProjectItem ReplaceParameters="false" TargetFileName="$projectname$.vcxproj.filters">ModuleTemplate.vcxproj.filters</ProjectItem>
      <ProjectItem ReplaceParameters="true" TargetFileName="dllmain.cpp">dllmain.cpp</ProjectItem>
      <ProjectItem ReplaceParameters="false" TargetFileName="pch.cpp">pch.cpp</ProjectItem>
      <ProjectItem ReplaceParameters="false" TargetFileName="trace.cpp">trace.cpp</ProjectItem>
      <ProjectItem ReplaceParameters="false" TargetFileName="pch.h">pch.h</ProjectItem>
      <ProjectItem ReplaceParameters="false" TargetFileName="resource.h">resource.h</ProjectItem>
      <ProjectItem ReplaceParameters="false" TargetFileName="trace.h">trace.h</ProjectItem>
      <ProjectItem ReplaceParameters="true" TargetFileName="$projectname$.rc">ModuleTemplate.rc</ProjectItem>
    </Project>
  </TemplateContent>
</VSTemplate>