How To Hack FancyZones
Background¶
A while back, I created a fork of the Microsoft PowerToys module, FancyZones, to take a stab at implementing a seemingly impossible to implement feature: Maximizing Windows Within A Zone.
My code can be found here: https://github.com/peddamat/PowerToys - See my changes: FancyZones Diff
FancyZones user, Taloth, provided code for his implementation: https://github.com/peddamat/PowerToys/discussions/5
Development Environment Setup¶
Getting The Code¶
# Clone repository and submodules
git clone https://github.com/peddamat/PowerToys.git
git submodule update --init --recursive
Opening The Solution¶
Open the PowerToys.sln
:
If this notice pops up in your Solution Explorer, go ahead and click Install:
Building Solution¶
To build Fancy Zones, you need to build the entire solution, which you do, using Build -> Build Solution
.
Builds take long enough for build failures to be painful. To maximize your chances at success, it's best to always do a Build -> Clean Solution
before triggering a build.
Alternatively, you can go into src\modules\previewpane
and type:
Debugging FancyZones¶
The FancyZones module can be debugged by setting the Solution's "Startup Project" to FancyZones.
Building A Release¶
The installer is a separate solution found in the \installer
subfolder of the project.
A release can be built by typing the following commands in the root PowerToys
folder:
git clean -xfd
msbuild -t:build -restore -p:RestorePackagesConfig=true /p:Configuration=Release /p:Platform=x64 PowerToys.sln
msbuild -t:build -restore -p:RestorePackagesConfig=true /p:Configuration=Release /p:Platform=x64 tools\BugReportTool\BugReportTool.sln
msbuild -t:build -restore -p:RestorePackagesConfig=true /p:Configuration=Release /p:Platform=x64 tools\WebcamReportTool\WebcamReportTool.sln
msbuild -t:build -restore -p:RestorePackagesConfig=true /p:Configuration=Release /p:Platform=x64 tools\StylesReportTool\StylesReportTool.sln
msbuild -t:build -restore -p:RestorePackagesConfig=true /p:Configuration=Release /p:Platform=x64 installer\PowerToysSetup.sln