PowerToys/tools/project_template/ModuleTemplate
Stefan Markovic e637902892
[PowerRename][ImageResizer] Tier1 Win11 Context menu (#19000)
* Test win11 tier1 context menu

* Try to test signing

* Cleanup

* Cleanup project file

* Sign dll
Add PowerToys preffix
Add assets to installer

* expect.txt

* Switch to named pipes
Unregister package on uninstall
Remove unneeded files
Cleanup

* Bring back check if package registered but use per-user method

* Fix win11 check

* expect.txt

* Check if package already registered

* Revert "Check if package already registered"

FindPackages() method needs admin privileges.

This reverts commit 5af584fed4.

* Fix PowerRename args checking

* Cleanup assets

* Tier1 context menu ImageResizer
Minor cleanups
Move logic to package.h

* [WIP] Signing and installer
Expect.txt

* Localized context menu title

* Retarget everything 10.0.18362.0 -> 10.0.19041.0

* Address PR comments
 - check if selection renamable
 - minor cleanup
 - struct initialization

* Fix ImageResizerLib project configuration

* More Windows version updates

* Remove unneeded file & try fix resource build error

* Add Microsoft.PowerToys prefix to packages

* Test

* Fix convert-resx-to-rc.ps1 script issue causing resource files compile error

Don't generate empty STRINGTABLE for resx files without data

* Avoid duplicate context menu items

* [BugReportTool] Report installed context menu packages
2022-06-30 22:10:14 +02:00
..
$projectname$.rc [meta]Change copyright date to 2022 (#16279) 2022-02-17 18:41:30 +00:00
dllmain.cpp common: refactor common library pt2 (#8588) 2020-12-15 15:16:09 +03:00
ModuleTemplate.vcxproj Arm64 pending modules (#17972) 2022-05-11 11:35:18 +01:00
ModuleTemplateCompileTest.vcxproj [PowerRename][ImageResizer] Tier1 Win11 Context menu (#19000) 2022-06-30 22:10:14 +02: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 [PowerRename] Move to WinAppSDK WinUI3 Unpackaged & ARM64 Support (#18171) 2022-05-11 16:38:12 +02:00
pch.cpp build: Treat warnings as errors in the remaining projects (#8689) 2020-12-21 18:51:48 +03:00
pch.h common: refactor common library pt2 (#8588) 2020-12-15 15:16:09 +03:00
README.md [build]Update to .net 6 framework and VS 2022 (#15741) 2022-02-07 14:08:30 +00: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 2022\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>