Skip to content

Commit

Permalink
Merge pull request #2 from microsoft/master
Browse files Browse the repository at this point in the history
Update with latest changes
  • Loading branch information
dend authored Apr 20, 2021
2 parents cd647eb + 6ec30e2 commit c13840b
Show file tree
Hide file tree
Showing 150 changed files with 2,710 additions and 2,197 deletions.
5 changes: 1 addition & 4 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
name: "🐛 Bug report"
description: Report errors or unexpected behavior
title: ''
labels:
- Issue-Bug
- Triage-Needed
assignees: ''
issue_body: true
body:
- type: markdown
attributes:
Expand Down Expand Up @@ -56,7 +53,7 @@ body:
- type: textarea
attributes:
label: Steps to reproduce
description: We highly suggest including a screenshots and a bug report log (System tray->Report bug). To include, paste them into the markdown editor below the form or follow up with a separate comment.
description: We highly suggest including a screenshots and a bug report log (System tray->Report bug).
placeholder: Tell us the steps required to trigger your bug.
validations:
required: true
Expand Down
14 changes: 0 additions & 14 deletions .github/ISSUE_TEMPLATE/documentation-issue.md

This file was deleted.

12 changes: 12 additions & 0 deletions .github/ISSUE_TEMPLATE/documentation-issue.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: "📚 Documentation Issue"
description: Report issues in our documentation
labels:
- Issue-Docs
- Triage-Needed
body:
- type: textarea
attributes:
label: Provide a description of requested docs changes
placeholder: Briefly describe which document needs to be corrected and why.
validations:
required: true
11 changes: 3 additions & 8 deletions .github/ISSUE_TEMPLATE/translation_issue.yml
Original file line number Diff line number Diff line change
@@ -1,31 +1,26 @@
name: "🌐 Localization/Translation issue"
description: Report incorrect translations.
title: ''
labels:
- Issue-Bug
- Area-Localization
- Issue-Translation
- Triage-Needed
assignees: ''
issue_body: true
body:
- type: markdown
attributes:
value: |
Please make sure to [search for existing issues](https://github.com/microsoft/PowerTOys/issues) before filing a new one!
Please make sure to [search for existing issues](https://github.com/microsoft/PowerToys/issues) before filing a new one!
- type: input
attributes:
label: Microsoft PowerToys version
placeholder: "0.33.1"
placeholder: "0.35.0"
description: |
Hover over system tray icon or look at Settings
validations:
required: true
- type: dropdown
attributes:
label: Utility with translation issue
description: |
Please include a screenshot as that is extremely helpful. To include, paste them into the markdown editor below the form or follow up with a separate comment.
options:
- General
- ColorPicker
Expand Down Expand Up @@ -54,7 +49,7 @@ body:
- type: textarea
attributes:
label: ❌ Actual phrase(s)
placeholder: What is there?
placeholder: What is there? Please include a screenshot as that is extremely helpful.
validations:
required: true
- type: textarea
Expand Down
5 changes: 5 additions & 0 deletions .github/actions/spell-check/expect.txt
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,7 @@ buildtransitive
BValue
bytearray
callbackptr
capitalized
CANRENAME
Captureascreenshot
CAPTURECHANGED
Expand Down Expand Up @@ -1585,6 +1586,8 @@ pguid
phbm
phbmp
Phishing
php
phptest
phwnd
pici
pid
Expand Down Expand Up @@ -1700,6 +1703,7 @@ pwcs
PWSTR
pwtd
px
py
Qand
QI
qianlifeng
Expand Down Expand Up @@ -1825,6 +1829,7 @@ runsettings
runtimeclass
runtimeconfig
runtimes
rutkas
rv
rvalue
rvm
Expand Down
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,12 @@ Microsoft PowerToys is a set of utilities for power users to tune and streamline

#### Stable version

Install from the [Microsoft PowerToys GitHub releases page][github-release-link]. Click on `Assets` to show the files available in the release and then click on `PowerToysSetup-0.33.1-x64.exe` to download the PowerToys installer.
Install from the [Microsoft PowerToys GitHub releases page][github-release-link]. Click on `Assets` to show the files available in the release and then click on `PowerToysSetup-0.35.0-x64.exe` to download the PowerToys installer.

This is our preferred method.

#### Experimental version
To install the Video Conference mute, please use the [v0.28 pre-release experimental version of PowerToys][github-prerelease-link] to try out this version. It includes all improvements from v0.27 in addition to the Video conference utility. Click on `Assets` to show the files available in the release and then download the .exe installer.

We hope to have an updated version in February 2021 with the new DirectShow driver.
To install the Video Conference mute, please use the [v0.36 experimental version of PowerToys][github-prerelease-link] to try out this version. It includes all improvements from v0.35 in addition to the Video conference utility. Click on `Assets` to show the files available in the release and then download the .exe installer.

### Via WinGet (Preview)
Download PowerToys from [WinGet](https://github.com/microsoft/winget-cli#installing-the-client). To install PowerToys, run the following command from the command line / PowerShell:
Expand Down Expand Up @@ -78,7 +76,9 @@ Our [prioritized roadmap][roadmap] of features and utilities that the core team

### 0.35 - March 2021 Update

Our goals for the [v0.35 release cycle][github-release-link] were to add in new functionality to support quick swapping layouts for FancyZones, wrap up work for the DirectShow migration for Video Conference Mute so we can migrate into the main dev branch as well as fixing bugs. The 0.36 experimental release will happen the week of April 5th toward the end of the week pending testing. Throughout these efforts, we continue working towards stability across all PowerToys utilities.
Our goals for the [v0.35 release cycle][github-release-link] were to add in new functionality to support quick swapping layouts for FancyZones, wrap up work for the DirectShow migration for Video Conference Mute so we can migrate into the main dev branch as well as fixing bugs.

The 0.36 experimental release was released as well which includes Video Conference Mute.

Our [prioritized roadmap][roadmap] of features and utilities will dictate what the core team is focusing on for the near future.

Expand Down Expand Up @@ -166,4 +166,4 @@ The application logs basic telemetry. Our Telemetry Data page (Coming Soon) has

<!-- items that need to be updated release to release -->
[github-next-release-work]: https://github.com/microsoft/PowerToys/issues?q=is%3Aopen+is%3Aissue+project%3Amicrosoft%2FPowerToys%2F19
[github-prerelease-link]: https://github.com/microsoft/PowerToys/releases/tag/v0.28.0
[github-prerelease-link]: https://github.com/microsoft/PowerToys/releases/tag/v0.36.0
30 changes: 30 additions & 0 deletions doc/devdocs/modules/launcher/new-plugin-checklist.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# New plugin checklist
- [ ] The plugin is a project under `modules\launcher\Plugins`
- [ ] Microsoft plugin project name pattern: `Microsoft.PowerToys.Run.Plugin.{PluginName}`
- [ ] Community plugin project name pattern: `Community.PowerToys.Run.Plugin.{PluginName}`
- [ ] [`GlobalSuppressions.cs`](/src/codeAnalysis/GlobalSuppressions.cs) and [`StyleCop.json`](/src/codeAnalysis/StyleCop.json) have to be included in the plugin project so it follows PowerToys code guidelines
- [ ] The plugin has to have `{PowerToys version}.0` version
- [ ] Make sure `*.csproj` specify only x64 platform target
- [ ] The plugin has to contain a `plugin.json` file of the following format in its root folder
```
{
"ID": string, // GUID string
"ActionKeyword": string, // Direct activation phrase
"IsGlobal": boolean,
"Name": string, // Has to be unique, same as 'PluginName' in the project name pattern
"Author": string,
"Version": "1.0.0", // For future compatibility
"Language": "csharp", // So far we support only csharp
"Website": "https://aka.ms/powertoys",
"ExecuteFileName": string, // Should be {Type}.PowerToys.Run.Plugin.{PluginName}.dll
"IcoPathDark": string, // Path to dark theme icon. The path is relative to the root plugin folder
"IcoPathLight": string // Path to light theme icon. The path is relative to the root plugin folder
}
```
- [ ] Do not use plugin name or PowerToys as prefixes for entities inside of the plugin project
- [ ] The plugin has to have Unit tests. Use MSTest framework
- [ ] To enable localization add `LocProject.json` file to the plugin root folder. For details see [`localization.md`](/doc/devdocs/localization.md#enabling-localization-on-a-new-project)
- [ ] Plugin's output code and assets have to be included in the installer [`Product.wxs`](/installer/PowerToysSetup/Product.wxs)
- [ ] Test the plugin with a local build. Build the installer, install, check that the plugin works as expected
- [ ] All plugin's binaries have to be included in the signed build [`pipeline.user.windows.yml`](/.pipelines/pipeline.user.windows.yml)
- [ ] The plugin target framework has to be .NET Core 3.1. All dependencies have to have .NET 5 version
14 changes: 7 additions & 7 deletions installer/PowerToysBootstrapper/bootstrapper/bootstrapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,9 @@ int Bootstrapper(HINSTANCE hInstance)
options.add_options()
("h,help", "Show help")
("no_full_ui", "Use reduced UI for MSI")
("s,silent", "Suppress MSI UI and notifications")
("s,silent", "Suppress all UI, notifications and does not start PowerToys")
("no_start_pt", "Do not launch PowerToys after the installation is complete")
("start_pt", "Always launch PowerToys after the installation is complete")
("skip_dotnet_install", "Skip dotnet 3.X installation even if it's not detected")
("log_level", "Log level. Possible values: off|debug|error", cxxopts::value<std::string>()->default_value("off"))
("log_dir", "Log directory", cxxopts::value<std::string>()->default_value("."))
Expand Down Expand Up @@ -169,10 +170,11 @@ int Bootstrapper(HINSTANCE hInstance)
const bool noFullUI = cmdArgs["no_full_ui"].as<bool>();
const bool skipDotnetInstall = cmdArgs["skip_dotnet_install"].as<bool>();
const bool noStartPT = cmdArgs["no_start_pt"].as<bool>();
const bool startPT = cmdArgs["start_pt"].as<bool>();
const auto logLevel = cmdArgs["log_level"].as<std::string>();
const auto logDirArg = cmdArgs["log_dir"].as<std::string>();
const auto installDirArg = cmdArgs["install_dir"].as<std::string>();
const bool extract_msi_only = cmdArgs["extract_msi"].as<bool>();
const bool extractMsiOnly = cmdArgs["extract_msi"].as<bool>();

std::wstring installFolderProp;
if (!installDirArg.empty())
Expand Down Expand Up @@ -216,7 +218,7 @@ int Bootstrapper(HINSTANCE hInstance)
}

SetupLogger(logDir, severity);
spdlog::debug("PowerToys Bootstrapper is launched\nnoFullUI: {}\nsilent: {}\nno_start_pt: {}\nskip_dotnet_install: {}\nlog_level: {}\ninstall_dir: {}\nextract_msi: {}\n", noFullUI, g_Silent, noStartPT, skipDotnetInstall, logLevel, installDirArg, extract_msi_only);
spdlog::debug("PowerToys Bootstrapper is launched\nnoFullUI: {}\nsilent: {}\nno_start_pt: {}\nskip_dotnet_install: {}\nlog_level: {}\ninstall_dir: {}\nextract_msi: {}\n", noFullUI, g_Silent, noStartPT, skipDotnetInstall, logLevel, installDirArg, extractMsiOnly);

const VersionHelper myVersion(VERSION_MAJOR, VERSION_MINOR, VERSION_REVISION);

Expand All @@ -229,7 +231,7 @@ int Bootstrapper(HINSTANCE hInstance)
}

// If a user requested an MSI -> extract it and exit
if (extract_msi_only)
if (extractMsiOnly)
{
if (const auto installerPath = ExtractEmbeddedInstaller(fs::current_path()))
{
Expand Down Expand Up @@ -402,8 +404,6 @@ int Bootstrapper(HINSTANCE hInstance)
ShowMessageBoxError(IDS_DOTNET_INSTALL_ERROR);
}

CleanupSettingsFromOlderVersions();

// At this point, there's no reason to show progress bar window, since MSI installers have their own
CloseProgressBarDialog();

Expand All @@ -418,7 +418,7 @@ int Bootstrapper(HINSTANCE hInstance)

spdlog::debug("Installation completed");

if (!noStartPT && !g_Silent)
if ((!noStartPT && !g_Silent) || startPT)
{
spdlog::debug("Starting the newly installed PowerToys.exe");
auto newPTPath = updating::get_msi_package_installed_path();
Expand Down
6 changes: 3 additions & 3 deletions installer/PowerToysSetup/Product.wxs
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@
<Property Id="WINDOWSBUILDNUMBER" Secure="yes">
<RegistrySearch Id="BuildNumberSearch" Root="HKLM" Key="SOFTWARE\Microsoft\Windows NT\CurrentVersion" Name="CurrentBuildNumber" Type="raw" />
</Property>
<Condition Message="This application is only supported on Windows 10 version 1803 (build 17134) or higher.">
<![CDATA[(WINDOWSBUILDNUMBER >= 17134)]]>
<Condition Message="This application is only supported on Windows 10 version 1903 (build 18362) or higher.">
<![CDATA[(WINDOWSBUILDNUMBER >= 18362)]]>
</Condition>

<Icon Id="powertoys.exe" SourceFile="$(var.BinX64Dir)svgs\icon.ico"/>
Expand Down Expand Up @@ -642,7 +642,7 @@
<File Source="$(var.BinX64Dir)Settings\PowerToys.Settings.exe"/>
<File Source="$(var.BinX64Dir)Settings\Microsoft.PowerToys.Settings.UI.exe"/>
<!-- dll -->
<?foreach File in concrt140_app.dll;Microsoft.Bcl.AsyncInterfaces.dll;System.IO.Abstractions.dll;Microsoft.PowerToys.Settings.UI.Lib.dll;PowerToys.Settings.dll;Microsoft.Toolkit.dll;Microsoft.Toolkit.Uwp.dll;Microsoft.Toolkit.Uwp.UI.dll;Microsoft.Toolkit.Win32.UI.XamlHost.dll;Microsoft.Toolkit.Win32.UI.XamlHost.Managed.dll;Microsoft.Toolkit.Wpf.UI.Controls.dll;Microsoft.Toolkit.Wpf.UI.XamlHost.dll;Microsoft.UI.Xaml.dll;Microsoft.Xaml.Interactions.dll;Microsoft.Xaml.Interactivity.dll;msvcp140_1_app.dll;msvcp140_2_app.dll;msvcp140_app.dll;Newtonsoft.Json.dll;PowerToysInterop.dll;System.Runtime.CompilerServices.Unsafe.dll;System.Text.Encodings.Web.dll;System.Text.Json.dll;vcamp140_app.dll;vccorlib140_app.dll;vcomp140_app.dll;vcruntime140_1_app.dll;vcruntime140_app.dll;ManagedTelemetry.dll;ManagedCommon.dll?>
<?foreach File in concrt140_app.dll;Microsoft.Bcl.AsyncInterfaces.dll;System.IO.Abstractions.dll;Microsoft.PowerToys.Settings.UI.Lib.dll;PowerToys.Settings.dll;Microsoft.Toolkit.dll;Microsoft.Toolkit.Uwp.dll;Microsoft.Toolkit.Uwp.UI.dll;Microsoft.Toolkit.Win32.UI.XamlHost.dll;Microsoft.Toolkit.Win32.UI.XamlHost.Managed.dll;Microsoft.Toolkit.Wpf.UI.Controls.dll;Microsoft.Toolkit.Wpf.UI.XamlHost.dll;Microsoft.UI.Xaml.dll;Microsoft.Xaml.Interactions.dll;Microsoft.Xaml.Interactivity.dll;msvcp140_1_app.dll;msvcp140_2_app.dll;msvcp140_app.dll;Newtonsoft.Json.dll;PowerToysInterop.dll;System.Runtime.CompilerServices.Unsafe.dll;System.Text.Encodings.Web.dll;System.Text.Json.dll;vcamp140_app.dll;vccorlib140_app.dll;vcomp140_app.dll;vcruntime140_1_app.dll;vcruntime140_app.dll;ManagedTelemetry.dll;ManagedCommon.dll;ColorCode.Core.dll;ColorCode.UWP.dll;Microsoft.Graphics.Canvas.winmd;Microsoft.Toolkit.Parsers.dll;Microsoft.Toolkit.Uwp.UI.Animations.dll;Microsoft.Toolkit.Uwp.UI.Controls.dll?>
<File Id="SettingsV2_$(var.File)" Source="$(var.BinX64Dir)Settings\$(var.File)" />
<?endforeach?>
<!-- json -->
Expand Down
1 change: 1 addition & 0 deletions src/common/interop/PowerToysInterop.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@
<ClInclude Include="KeyboardHook.h" />
<ClInclude Include="pch.h" />
<ClInclude Include="resource.h" />
<ClInclude Include="shared_constants.h" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="Generated Files\AssemblyInfo.cpp" />
Expand Down
3 changes: 3 additions & 0 deletions src/common/interop/PowerToysInterop.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@
<ClInclude Include="resource.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="shared_constants.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ClCompile Include="interop.cpp">
Expand Down
3 changes: 0 additions & 3 deletions src/common/interop/interop-tests/InteropTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,6 @@ public class InteropTests : IDisposable
[TestInitialize]
public void Initialize()
{
// Make sure we don't crash
Assert.IsTrue(CommonManaged.ShouldNewSettingsBeUsed() == CommonManaged.ShouldNewSettingsBeUsed());

ClientPipe = new TwoWayPipeMessageIPCManaged(ClientSidePipe, ServerSidePipe, null);
}

Expand Down
9 changes: 4 additions & 5 deletions src/common/interop/interop.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -122,11 +122,6 @@ public
static String ^ GetProductVersion() {
return gcnew String(get_product_version().c_str());
}

static bool ShouldNewSettingsBeUsed()
{
return UseNewSettings();
}
};

public
Expand Down Expand Up @@ -160,5 +155,9 @@ public
static String ^ ShowShortcutGuideSharedEvent() {
return gcnew String(CommonSharedConstants::SHOW_SHORTCUT_GUIDE_SHARED_EVENT);
}

static String ^ KeyboardManagerConfigFileMutexName() {
return gcnew String(CommonSharedConstants::KEYBOARD_MANAGER_CONFIG_FILE_MUTEX_NAME);
}
};
}
5 changes: 4 additions & 1 deletion src/common/interop/shared_constants.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,7 @@ namespace CommonSharedConstants

// Max DWORD for key code to disable keys.
const int VK_DISABLED = 0x100;
}

// Name of the mutex which controls access to the configuration file for Keyboard Manager
const wchar_t KEYBOARD_MANAGER_CONFIG_FILE_MUTEX_NAME[] = L"Local\\PowerToys_KeyboardManager_ConfigFileMutex";
}
9 changes: 0 additions & 9 deletions src/common/updating/updating.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
#include <common/notifications/notifications.h>
#include <common/SettingsAPI/settings_helpers.h>
#include <common/utils/json.h>
#include <common/utils/os-detect.h>

namespace // Strings in this namespace should not be localized
{
Expand Down Expand Up @@ -77,9 +76,6 @@ namespace updating
const VersionHelper current_version(VERSION_MAJOR, VERSION_MINOR, VERSION_REVISION);
VersionHelper github_version = current_version;

// On a <1903 system, block updates to 0.36+
const bool blockNonPatchReleases = current_version.major == 0 && current_version.minor == 35 && !Is19H1OrHigher();

if (prerelease)
{
const auto body = co_await client.request(Uri{ ALL_RELEASES_ENDPOINT });
Expand Down Expand Up @@ -108,11 +104,6 @@ namespace updating
}
}

if (blockNonPatchReleases && github_version >= VersionHelper{ 0, 36, 0 })
{
co_return version_up_to_date{};
}

if (github_version <= current_version)
{
co_return version_up_to_date{};
Expand Down
12 changes: 4 additions & 8 deletions src/common/utils/appMutex.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,13 @@

namespace
{
constexpr inline wchar_t POWERTOYS_MSI_MUTEX_NAME[] = L"Local\\PowerToyRunMutex";
constexpr inline wchar_t POWERTOYS_MSIX_MUTEX_NAME[] = L"Local\\PowerToyMSIXRunMutex";
constexpr inline wchar_t POWERTOYS_BOOTSTRAPPER_MUTEX_NAME[] = L"PowerToysBootstrapperMutex";
constexpr inline wchar_t POWERTOYS_MSI_MUTEX_NAME[] = L"Local\\PowerToys_Runner_MSI_InstanceMutex";
constexpr inline wchar_t POWERTOYS_MSIX_MUTEX_NAME[] = L"Local\\PowerToys_Runner_MSIX_InstanceMutex";
constexpr inline wchar_t POWERTOYS_BOOTSTRAPPER_MUTEX_NAME[] = L"Local\\PowerToys_Bootstrapper_InstanceMutex";
}

inline wil::unique_mutex_nothrow createAppMutex(std::wstring mutexName)
inline wil::unique_mutex_nothrow createAppMutex(const std::wstring& mutexName)
{
wchar_t username[UNLEN + 1];
DWORD username_length = UNLEN + 1;
GetUserNameW(username, &username_length);
mutexName += username;
wil::unique_mutex_nothrow result{ CreateMutexW(nullptr, TRUE, mutexName.c_str()) };

return GetLastError() == ERROR_ALREADY_EXISTS ? wil::unique_mutex_nothrow{} : std::move(result);
Expand Down
Loading

0 comments on commit c13840b

Please sign in to comment.