From d5eceb32d8e2656219d5f020fc7b7b094b74a71a Mon Sep 17 00:00:00 2001 From: Arjun Date: Fri, 14 Aug 2020 12:46:08 -0700 Subject: [PATCH 01/35] Added localization code to pipeline and created one LocProject json for Settings --- .pipelines/build-localization.cmd | 41 +++++++++++++++++++ .pipelines/pipeline.user.windows.yml | 10 +++++ nuget.config | 4 ++ .../LocProject.json | 14 +++++++ 4 files changed, 69 insertions(+) create mode 100644 .pipelines/build-localization.cmd create mode 100644 src/core/Microsoft.PowerToys.Settings.UI/LocProject.json diff --git a/.pipelines/build-localization.cmd b/.pipelines/build-localization.cmd new file mode 100644 index 00000000000..195a0c72d51 --- /dev/null +++ b/.pipelines/build-localization.cmd @@ -0,0 +1,41 @@ +@echo off + +cd /D "%~dp0" + +echo Preparing localization build... + +setlocal + +rem In this sample, the repo root is identical to the script directory path. Adjust the value of the RepoRoot variable accordingly based on your environment. +rem Again, ensure the RepoRoot variable is set to the real repo root location, otherwise the localization toolset wouldn't work as intended. +rem Note that the resolved %~dp0 ends with \. +set RepoRoot=%~dp0..\ +set OutDir=%RepoRoot%out +set NUGET_PACKAGES=%RepoRoot%packages +set LocalizationXLocPkgVer=2.0.0 + +nuget install Localization.XLoc -Version %LocalizationXLocPkgVer% -OutputDirectory "%NUGET_PACKAGES%" -NonInteractive -Verbosity detailed +if "%errorlevel%" neq "0" ( + exit /b %errorlevel% +) + +nuget install LSBuild.XLoc -OutputDirectory "%NUGET_PACKAGES%" -NonInteractive -Verbosity detailed +if "%errorlevel%" neq "0" ( + exit /b %errorlevel% +) + +nuget install Localization.Languages -OutputDirectory "%NUGET_PACKAGES%" -NonInteractive -Verbosity detailed +if "%errorlevel%" neq "0" ( + exit /b %errorlevel% +) + +echo Running localization build... + +set XLocPath=%NUGET_PACKAGES%\Localization.XLoc.%LocalizationXLocPkgVer% +set LocProject=%RepoRoot%src\core\Microsoft.PowerToys.Settings.UI\LocProject.json + +dotnet "%XLocPath%\tools\netcore\Microsoft.Localization.XLoc.dll" /f "%LocProject%" + +echo Localization build finished with exit code '%errorlevel%'. + +exit /b %errorlevel% diff --git a/.pipelines/pipeline.user.windows.yml b/.pipelines/pipeline.user.windows.yml index 0ee9147d521..d51b2c96b01 100644 --- a/.pipelines/pipeline.user.windows.yml +++ b/.pipelines/pipeline.user.windows.yml @@ -21,6 +21,7 @@ package_sources: feeds: 'Nuget': 'https://api.nuget.org/v3/index.json' 'PipelineBuildSupplement': 'https://msazure.pkgs.visualstudio.com/_packaging/PipelineBuildSupplement/nuget/v3/index.json' + 'Toolset': 'ttps://msazure.pkgs.visualstudio.com/_packaging/Toolset/nuget/v3/index.json' restore: commands: @@ -37,6 +38,15 @@ restore: build: commands: + - !!buildcommand + name: 'Localization Build' + command: '.pipelines\build-localization.cmd' + artifacts: + - from: 'out\loc' + to: 'loc' + include: + - '**/*' + - !!buildcommand name: 'Build Power Toys' command: '.pipelines\build.cmd' diff --git a/nuget.config b/nuget.config index 5a4b9c0fb99..c2923c08c6a 100644 --- a/nuget.config +++ b/nuget.config @@ -1,4 +1,8 @@ + + + + diff --git a/src/core/Microsoft.PowerToys.Settings.UI/LocProject.json b/src/core/Microsoft.PowerToys.Settings.UI/LocProject.json new file mode 100644 index 00000000000..7374ca929d7 --- /dev/null +++ b/src/core/Microsoft.PowerToys.Settings.UI/LocProject.json @@ -0,0 +1,14 @@ +{ + "Projects": [ + { + "LanguageSet": "Windows10_Languages", + "LocItems": [ + { + "SourceFile": "src\\core\\Microsoft.PowerToys.Settings.UI\\Strings\\en-us\\Resources.resw", + "CopyOption": "LangIDOnPath", + "OutputPath": "src\\core\\Microsoft.PowerToys.Settings.UI\\Strings" + } + ] + } + ] + } \ No newline at end of file From 0c4a9f9025fe4e7f47b8960f7b89d27e0a84dd11 Mon Sep 17 00:00:00 2001 From: Arjun Date: Fri, 14 Aug 2020 13:08:12 -0700 Subject: [PATCH 02/35] Fixed typo --- .pipelines/pipeline.user.windows.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pipelines/pipeline.user.windows.yml b/.pipelines/pipeline.user.windows.yml index d51b2c96b01..2772c090f76 100644 --- a/.pipelines/pipeline.user.windows.yml +++ b/.pipelines/pipeline.user.windows.yml @@ -21,7 +21,7 @@ package_sources: feeds: 'Nuget': 'https://api.nuget.org/v3/index.json' 'PipelineBuildSupplement': 'https://msazure.pkgs.visualstudio.com/_packaging/PipelineBuildSupplement/nuget/v3/index.json' - 'Toolset': 'ttps://msazure.pkgs.visualstudio.com/_packaging/Toolset/nuget/v3/index.json' + 'Toolset': 'https://msazure.pkgs.visualstudio.com/_packaging/Toolset/nuget/v3/index.json' restore: commands: From c7121cb1f3246e3f245ede7631b168f13bec1637 Mon Sep 17 00:00:00 2001 From: Arjun Date: Fri, 14 Aug 2020 13:38:47 -0700 Subject: [PATCH 03/35] Reordered nuget source --- .pipelines/pipeline.user.windows.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pipelines/pipeline.user.windows.yml b/.pipelines/pipeline.user.windows.yml index 2772c090f76..a20b212ba28 100644 --- a/.pipelines/pipeline.user.windows.yml +++ b/.pipelines/pipeline.user.windows.yml @@ -20,8 +20,8 @@ package_sources: nuget: feeds: 'Nuget': 'https://api.nuget.org/v3/index.json' - 'PipelineBuildSupplement': 'https://msazure.pkgs.visualstudio.com/_packaging/PipelineBuildSupplement/nuget/v3/index.json' 'Toolset': 'https://msazure.pkgs.visualstudio.com/_packaging/Toolset/nuget/v3/index.json' + 'PipelineBuildSupplement': 'https://msazure.pkgs.visualstudio.com/_packaging/PipelineBuildSupplement/nuget/v3/index.json' restore: commands: From 3222e60a46857bfc3ef7aece47b4b75b24032271 Mon Sep 17 00:00:00 2001 From: Arjun Date: Fri, 14 Aug 2020 14:08:11 -0700 Subject: [PATCH 04/35] Moved nuget install to restore step --- .pipelines/build-localization.cmd | 15 ------------- .pipelines/pipeline.user.windows.yml | 3 +++ .pipelines/restore-localization.cmd | 32 ++++++++++++++++++++++++++++ 3 files changed, 35 insertions(+), 15 deletions(-) create mode 100644 .pipelines/restore-localization.cmd diff --git a/.pipelines/build-localization.cmd b/.pipelines/build-localization.cmd index 195a0c72d51..213a7ce4998 100644 --- a/.pipelines/build-localization.cmd +++ b/.pipelines/build-localization.cmd @@ -14,21 +14,6 @@ set OutDir=%RepoRoot%out set NUGET_PACKAGES=%RepoRoot%packages set LocalizationXLocPkgVer=2.0.0 -nuget install Localization.XLoc -Version %LocalizationXLocPkgVer% -OutputDirectory "%NUGET_PACKAGES%" -NonInteractive -Verbosity detailed -if "%errorlevel%" neq "0" ( - exit /b %errorlevel% -) - -nuget install LSBuild.XLoc -OutputDirectory "%NUGET_PACKAGES%" -NonInteractive -Verbosity detailed -if "%errorlevel%" neq "0" ( - exit /b %errorlevel% -) - -nuget install Localization.Languages -OutputDirectory "%NUGET_PACKAGES%" -NonInteractive -Verbosity detailed -if "%errorlevel%" neq "0" ( - exit /b %errorlevel% -) - echo Running localization build... set XLocPath=%NUGET_PACKAGES%\Localization.XLoc.%LocalizationXLocPkgVer% diff --git a/.pipelines/pipeline.user.windows.yml b/.pipelines/pipeline.user.windows.yml index a20b212ba28..b57469b7742 100644 --- a/.pipelines/pipeline.user.windows.yml +++ b/.pipelines/pipeline.user.windows.yml @@ -34,6 +34,9 @@ restore: - !!defaultcommand name: 'Restore Installer' command: '.pipelines\restore-installer.cmd' + - !!defaultcommand + name: 'Restore Localization packages' + command: '.pipelines\restore-localization.cmd' build: diff --git a/.pipelines/restore-localization.cmd b/.pipelines/restore-localization.cmd new file mode 100644 index 00000000000..fdc8fa5e245 --- /dev/null +++ b/.pipelines/restore-localization.cmd @@ -0,0 +1,32 @@ +@echo off + +cd /D "%~dp0" + +echo Installing nuget packages + +setlocal + +rem In this sample, the repo root is identical to the script directory path. Adjust the value of the RepoRoot variable accordingly based on your environment. +rem Again, ensure the RepoRoot variable is set to the real repo root location, otherwise the localization toolset wouldn't work as intended. +rem Note that the resolved %~dp0 ends with \. +set RepoRoot=%~dp0..\ +set OutDir=%RepoRoot%out +set NUGET_PACKAGES=%RepoRoot%packages +set LocalizationXLocPkgVer=2.0.0 + +nuget install Localization.XLoc -Version %LocalizationXLocPkgVer% -OutputDirectory "%NUGET_PACKAGES%" -NonInteractive -Verbosity detailed +if "%errorlevel%" neq "0" ( + exit /b %errorlevel% +) + +nuget install LSBuild.XLoc -OutputDirectory "%NUGET_PACKAGES%" -NonInteractive -Verbosity detailed +if "%errorlevel%" neq "0" ( + exit /b %errorlevel% +) + +nuget install Localization.Languages -OutputDirectory "%NUGET_PACKAGES%" -NonInteractive -Verbosity detailed +if "%errorlevel%" neq "0" ( + exit /b %errorlevel% +) + +exit /b %errorlevel% From 8f049eac759040cb708a2d1e4583963ff737f6d5 Mon Sep 17 00:00:00 2001 From: Arjun Date: Fri, 14 Aug 2020 15:44:16 -0700 Subject: [PATCH 05/35] Added FZ.rc file to LocProj --- .pipelines/build-localization.cmd | 4 ++++ src/modules/fancyzones/lib/LocProj.json | 14 ++++++++++++++ 2 files changed, 18 insertions(+) create mode 100644 src/modules/fancyzones/lib/LocProj.json diff --git a/.pipelines/build-localization.cmd b/.pipelines/build-localization.cmd index 213a7ce4998..61aa709d837 100644 --- a/.pipelines/build-localization.cmd +++ b/.pipelines/build-localization.cmd @@ -21,6 +21,10 @@ set LocProject=%RepoRoot%src\core\Microsoft.PowerToys.Settings.UI\LocProject.jso dotnet "%XLocPath%\tools\netcore\Microsoft.Localization.XLoc.dll" /f "%LocProject%" +set LocProject=%RepoRoot%src\modules\fancyzones\lib\LocProject.json + +dotnet "%XLocPath%\tools\netcore\Microsoft.Localization.XLoc.dll" /f "%LocProject%" + echo Localization build finished with exit code '%errorlevel%'. exit /b %errorlevel% diff --git a/src/modules/fancyzones/lib/LocProj.json b/src/modules/fancyzones/lib/LocProj.json new file mode 100644 index 00000000000..4ceb6372ce0 --- /dev/null +++ b/src/modules/fancyzones/lib/LocProj.json @@ -0,0 +1,14 @@ +{ + "Projects": [ + { + "LanguageSet": "Windows10_Languages", + "LocItems": [ + { + "SourceFile": "src\\modules\\fancyzones\\lib\\fancyzones.rc", + "CopyOption": "LangIDOnPath", + "OutputPath": "src\\modules\\fancyzones\\lib" + } + ] + } + ] + } \ No newline at end of file From 502b4756430284758bc7929994657254efa55c87 Mon Sep 17 00:00:00 2001 From: Arjun Date: Mon, 17 Aug 2020 09:33:26 -0700 Subject: [PATCH 06/35] Added FZ resx file and modified rc file --- .pipelines/build-localization.cmd | 4 ++ .../editor/FancyZonesEditor/LocProj.json | 14 +++++++ src/modules/fancyzones/lib/LocProj.json | 2 +- src/modules/fancyzones/lib/fancyzones1.rc | 38 +++++++++++++++++++ 4 files changed, 57 insertions(+), 1 deletion(-) create mode 100644 src/modules/fancyzones/editor/FancyZonesEditor/LocProj.json create mode 100644 src/modules/fancyzones/lib/fancyzones1.rc diff --git a/.pipelines/build-localization.cmd b/.pipelines/build-localization.cmd index 61aa709d837..e05625e9404 100644 --- a/.pipelines/build-localization.cmd +++ b/.pipelines/build-localization.cmd @@ -21,6 +21,10 @@ set LocProject=%RepoRoot%src\core\Microsoft.PowerToys.Settings.UI\LocProject.jso dotnet "%XLocPath%\tools\netcore\Microsoft.Localization.XLoc.dll" /f "%LocProject%" +set LocProject=%RepoRoot%src\modules\fancyzones\editor\FancyZonesEditor\LocProject.json + +dotnet "%XLocPath%\tools\netcore\Microsoft.Localization.XLoc.dll" /f "%LocProject%" + set LocProject=%RepoRoot%src\modules\fancyzones\lib\LocProject.json dotnet "%XLocPath%\tools\netcore\Microsoft.Localization.XLoc.dll" /f "%LocProject%" diff --git a/src/modules/fancyzones/editor/FancyZonesEditor/LocProj.json b/src/modules/fancyzones/editor/FancyZonesEditor/LocProj.json new file mode 100644 index 00000000000..2bcf0515018 --- /dev/null +++ b/src/modules/fancyzones/editor/FancyZonesEditor/LocProj.json @@ -0,0 +1,14 @@ +{ + "Projects": [ + { + "LanguageSet": "Windows10_Languages", + "LocItems": [ + { + "SourceFile": "src\\modules\\fancyzones\\editor\\FancyZonesEditor\\Properties\\Resources.resx", + "CopyOption": "LangIDOnPath", + "OutputPath": "src\\modules\\fancyzones\\editor\\FancyZonesEditor\\Properties\\Resources.resx" + } + ] + } + ] + } \ No newline at end of file diff --git a/src/modules/fancyzones/lib/LocProj.json b/src/modules/fancyzones/lib/LocProj.json index 4ceb6372ce0..7668a3901c8 100644 --- a/src/modules/fancyzones/lib/LocProj.json +++ b/src/modules/fancyzones/lib/LocProj.json @@ -4,7 +4,7 @@ "LanguageSet": "Windows10_Languages", "LocItems": [ { - "SourceFile": "src\\modules\\fancyzones\\lib\\fancyzones.rc", + "SourceFile": "src\\modules\\fancyzones\\lib\\fancyzones1.rc", "CopyOption": "LangIDOnPath", "OutputPath": "src\\modules\\fancyzones\\lib" } diff --git a/src/modules/fancyzones/lib/fancyzones1.rc b/src/modules/fancyzones/lib/fancyzones1.rc new file mode 100644 index 00000000000..1a66bd760cc --- /dev/null +++ b/src/modules/fancyzones/lib/fancyzones1.rc @@ -0,0 +1,38 @@ +#include +#include "resource.h" +#include "../../../common/version.h" + +STRINGTABLE +BEGIN + IDS_SETTING_DESCRIPTION "Create window layouts to help make multi-tasking easy" + IDS_SETTING_DESCRIPTION_SHIFTDRAG "Hold Shift key to activate zones while dragging" + IDS_SETTING_DESCRIPTION_MOUSESWITCH "Use a non-primary mouse button to toggle zone activation" + IDS_SETTING_DESCRIPTION_OVERRIDE_SNAP_HOTKEYS "Override Windows Snap hotkeys (Win + Arrow) to move windows between zones" + IDS_SETTING_DESCRIPTION_MOVE_WINDOW_ACROSS_MONITORS "Move windows between zones across all monitors when snapping with (Win + Arrow)" + IDS_SETTING_DESCRIPTION_DISPLAYCHANGE_MOVEWINDOWS "Keep windows in their zones when the screen resolution changes" + IDS_SETTING_DESCRIPTION_ZONESETCHANGE_MOVEWINDOWS "During zone layout changes, windows assigned to a zone will match new size/positions" + IDS_SETTING_DESCRIPTION_ZONESETCHANGE_FLASHZONES "Flash zones when the active FancyZones layout changes" + IDS_SETTING_DESCRIPTION_SHOW_FANCY_ZONES_ON_ALL_MONITORS "Show zones on all monitors while dragging a window" + IDS_SETTING_DESCRIPTION_SPAN_ZONES_ACROSS_MONITORS "Allow zones to span across monitors" + IDS_SETTING_DESCRIPTION_MAKE_DRAGGED_WINDOW_TRANSPARENT "Make dragged window transparent" + IDS_SETTING_DESCRIPTION_ZONECOLOR "Zone inactive color (Default #F5FCFF)" + IDS_SETTING_DESCRIPTION_ZONE_BORDER_COLOR "Zone border color (Default #FFFFFF)" + IDS_SETTING_DESCRIPTION_ZONEHIGHLIGHTCOLOR "Zone highlight color (Default #008CFF)" + IDS_SETTING_DESCRIPTION_USE_CURSORPOS_EDITOR_STARTUPSCREEN "Follow mouse cursor instead of focus when launching editor in a multi screen environment" + IDS_SETTING_DESCRIPTION_APPLASTZONE_MOVEWINDOWS "Move newly created windows to their last known zone" + IDS_SETTING_DESCRIPTION_OPEN_WINDOW_ON_ACTIVE_MONITOR "Move newly created windows to the current active monitor [EXPERIMENTAL]" + IDS_SETTING_DESCRIPTION_RESTORESIZE "Restore the original size of windows when unsnapping" + IDS_SETTING_LAUNCH_EDITOR_LABEL "Zone configuration" + IDS_SETTING_LAUNCH_EDITOR_BUTTON "Edit zones" + IDS_SETTING_LAUNCH_EDITOR_DESCRIPTION "To launch the zone editor, select the Edit zones button below or press the zone editor hotkey anytime" + IDS_SETTING_LAUNCH_EDITOR_HOTKEY_LABEL "Configure the zone editor hotkey" + IDS_SETTING_EXCLUDED_APPS_DESCRIPTION "To exclude an application from snapping to zones add its name here (one per line). Excluded apps will react to the Windows Snap regardless of all other settings." + IDS_SETTINGS_HIGHLIGHT_OPACITY "Zone opacity (%)" + IDS_FANCYZONES "FancyZones" + IDS_CANT_DRAG_ELEVATED "We've detected an application running with administrator privileges. This blocks some functionality in PowerToys. Visit our wiki page to learn more." + IDS_CANT_DRAG_ELEVATED_LEARN_MORE "Learn more" + IDS_CANT_DRAG_ELEVATED_DIALOG_DONT_SHOW_AGAIN "Don't show again" + IDS_KEYBOARD_LISTENER_ERROR "Cannot install keyboard listener." + IDS_WINDOW_EVENT_LISTENER_ERROR "Cannot install Windows event listener." + IDS_POWERTOYS_FANCYZONES "PowerToys - FancyZones" +END From 7bd039fd72bffd50b8c3746067a5e7622d229ddf Mon Sep 17 00:00:00 2001 From: Arjun Date: Mon, 17 Aug 2020 09:58:53 -0700 Subject: [PATCH 07/35] Fixed file names --- .../editor/FancyZonesEditor/{LocProj.json => LocProject.json} | 0 src/modules/fancyzones/lib/{LocProj.json => LocProject.json} | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename src/modules/fancyzones/editor/FancyZonesEditor/{LocProj.json => LocProject.json} (100%) rename src/modules/fancyzones/lib/{LocProj.json => LocProject.json} (100%) diff --git a/src/modules/fancyzones/editor/FancyZonesEditor/LocProj.json b/src/modules/fancyzones/editor/FancyZonesEditor/LocProject.json similarity index 100% rename from src/modules/fancyzones/editor/FancyZonesEditor/LocProj.json rename to src/modules/fancyzones/editor/FancyZonesEditor/LocProject.json diff --git a/src/modules/fancyzones/lib/LocProj.json b/src/modules/fancyzones/lib/LocProject.json similarity index 100% rename from src/modules/fancyzones/lib/LocProj.json rename to src/modules/fancyzones/lib/LocProject.json From 85d9781531bb4d91f481e46bed5281c58d8f498f Mon Sep 17 00:00:00 2001 From: Arjun Date: Mon, 17 Aug 2020 11:05:04 -0700 Subject: [PATCH 08/35] Changed to check folder for LocProject files --- .pipelines/build-localization.cmd | 12 ++---------- .../editor/FancyZonesEditor/LocProject.json | 2 +- src/modules/fancyzones/lib/LocProject.json | 2 +- 3 files changed, 4 insertions(+), 12 deletions(-) diff --git a/.pipelines/build-localization.cmd b/.pipelines/build-localization.cmd index e05625e9404..35ae8a035f8 100644 --- a/.pipelines/build-localization.cmd +++ b/.pipelines/build-localization.cmd @@ -17,17 +17,9 @@ set LocalizationXLocPkgVer=2.0.0 echo Running localization build... set XLocPath=%NUGET_PACKAGES%\Localization.XLoc.%LocalizationXLocPkgVer% -set LocProject=%RepoRoot%src\core\Microsoft.PowerToys.Settings.UI\LocProject.json +set LocProjectBaseDir=%RepoRoot% -dotnet "%XLocPath%\tools\netcore\Microsoft.Localization.XLoc.dll" /f "%LocProject%" - -set LocProject=%RepoRoot%src\modules\fancyzones\editor\FancyZonesEditor\LocProject.json - -dotnet "%XLocPath%\tools\netcore\Microsoft.Localization.XLoc.dll" /f "%LocProject%" - -set LocProject=%RepoRoot%src\modules\fancyzones\lib\LocProject.json - -dotnet "%XLocPath%\tools\netcore\Microsoft.Localization.XLoc.dll" /f "%LocProject%" +dotnet "%XLocPath%\tools\netcore\Microsoft.Localization.XLoc.dll" /f "%LocProjectBaseDir%" echo Localization build finished with exit code '%errorlevel%'. diff --git a/src/modules/fancyzones/editor/FancyZonesEditor/LocProject.json b/src/modules/fancyzones/editor/FancyZonesEditor/LocProject.json index 2bcf0515018..f473734361d 100644 --- a/src/modules/fancyzones/editor/FancyZonesEditor/LocProject.json +++ b/src/modules/fancyzones/editor/FancyZonesEditor/LocProject.json @@ -6,7 +6,7 @@ { "SourceFile": "src\\modules\\fancyzones\\editor\\FancyZonesEditor\\Properties\\Resources.resx", "CopyOption": "LangIDOnPath", - "OutputPath": "src\\modules\\fancyzones\\editor\\FancyZonesEditor\\Properties\\Resources.resx" + "OutputPath": "src\\modules\\fancyzones\\editor\\FancyZonesEditor\\Properties" } ] } diff --git a/src/modules/fancyzones/lib/LocProject.json b/src/modules/fancyzones/lib/LocProject.json index 7668a3901c8..4ceb6372ce0 100644 --- a/src/modules/fancyzones/lib/LocProject.json +++ b/src/modules/fancyzones/lib/LocProject.json @@ -4,7 +4,7 @@ "LanguageSet": "Windows10_Languages", "LocItems": [ { - "SourceFile": "src\\modules\\fancyzones\\lib\\fancyzones1.rc", + "SourceFile": "src\\modules\\fancyzones\\lib\\fancyzones.rc", "CopyOption": "LangIDOnPath", "OutputPath": "src\\modules\\fancyzones\\lib" } From 55e3f1a278062838b88356d371f63e852327d106 Mon Sep 17 00:00:00 2001 From: Arjun Date: Mon, 17 Aug 2020 11:19:23 -0700 Subject: [PATCH 09/35] Updated folder --- .pipelines/build-localization.cmd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pipelines/build-localization.cmd b/.pipelines/build-localization.cmd index 35ae8a035f8..1ac5d9701de 100644 --- a/.pipelines/build-localization.cmd +++ b/.pipelines/build-localization.cmd @@ -17,7 +17,7 @@ set LocalizationXLocPkgVer=2.0.0 echo Running localization build... set XLocPath=%NUGET_PACKAGES%\Localization.XLoc.%LocalizationXLocPkgVer% -set LocProjectBaseDir=%RepoRoot% +set LocProjectBaseDir=%RepoRoot%src\ dotnet "%XLocPath%\tools\netcore\Microsoft.Localization.XLoc.dll" /f "%LocProjectBaseDir%" From 5106e89cd061835ab0c318c52227f2b1c288b177 Mon Sep 17 00:00:00 2001 From: Arjun Date: Mon, 17 Aug 2020 11:38:37 -0700 Subject: [PATCH 10/35] Changed directory --- .pipelines/build-localization.cmd | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.pipelines/build-localization.cmd b/.pipelines/build-localization.cmd index 1ac5d9701de..d5f5e512f40 100644 --- a/.pipelines/build-localization.cmd +++ b/.pipelines/build-localization.cmd @@ -17,9 +17,9 @@ set LocalizationXLocPkgVer=2.0.0 echo Running localization build... set XLocPath=%NUGET_PACKAGES%\Localization.XLoc.%LocalizationXLocPkgVer% -set LocProjectBaseDir=%RepoRoot%src\ +set LocProject=%RepoRoot%src\core\Microsoft.PowerToys.Settings.UI -dotnet "%XLocPath%\tools\netcore\Microsoft.Localization.XLoc.dll" /f "%LocProjectBaseDir%" +dotnet "%XLocPath%\tools\netcore\Microsoft.Localization.XLoc.dll" /f "%LocProject%" echo Localization build finished with exit code '%errorlevel%'. From 89b8a3441950a2718c8259fcc4a0d989f263f146 Mon Sep 17 00:00:00 2001 From: Arjun Date: Tue, 18 Aug 2020 09:35:03 -0700 Subject: [PATCH 11/35] Changed to src directory --- .pipelines/build-localization.cmd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pipelines/build-localization.cmd b/.pipelines/build-localization.cmd index d5f5e512f40..0433c4c898f 100644 --- a/.pipelines/build-localization.cmd +++ b/.pipelines/build-localization.cmd @@ -17,7 +17,7 @@ set LocalizationXLocPkgVer=2.0.0 echo Running localization build... set XLocPath=%NUGET_PACKAGES%\Localization.XLoc.%LocalizationXLocPkgVer% -set LocProject=%RepoRoot%src\core\Microsoft.PowerToys.Settings.UI +set LocProject=%RepoRoot%src dotnet "%XLocPath%\tools\netcore\Microsoft.Localization.XLoc.dll" /f "%LocProject%" From e6b599ebf535b215fa071d2c46099a9fa95d667e Mon Sep 17 00:00:00 2001 From: Arjun Date: Tue, 18 Aug 2020 09:56:23 -0700 Subject: [PATCH 12/35] Changed language set and name format, removed rc file localization --- .../LocProject.json | 4 +- .../editor/FancyZonesEditor/LocProject.json | 4 +- src/modules/fancyzones/lib/LocProject.json | 14 ------- src/modules/fancyzones/lib/fancyzones1.rc | 38 ------------------- 4 files changed, 4 insertions(+), 56 deletions(-) delete mode 100644 src/modules/fancyzones/lib/LocProject.json delete mode 100644 src/modules/fancyzones/lib/fancyzones1.rc diff --git a/src/core/Microsoft.PowerToys.Settings.UI/LocProject.json b/src/core/Microsoft.PowerToys.Settings.UI/LocProject.json index 7374ca929d7..d28d03d84c8 100644 --- a/src/core/Microsoft.PowerToys.Settings.UI/LocProject.json +++ b/src/core/Microsoft.PowerToys.Settings.UI/LocProject.json @@ -1,11 +1,11 @@ { "Projects": [ { - "LanguageSet": "Windows10_Languages", + "LanguageSet": "Azure_Languages", "LocItems": [ { "SourceFile": "src\\core\\Microsoft.PowerToys.Settings.UI\\Strings\\en-us\\Resources.resw", - "CopyOption": "LangIDOnPath", + "CopyOption": "LangIDOnName", "OutputPath": "src\\core\\Microsoft.PowerToys.Settings.UI\\Strings" } ] diff --git a/src/modules/fancyzones/editor/FancyZonesEditor/LocProject.json b/src/modules/fancyzones/editor/FancyZonesEditor/LocProject.json index f473734361d..4758e5d98f0 100644 --- a/src/modules/fancyzones/editor/FancyZonesEditor/LocProject.json +++ b/src/modules/fancyzones/editor/FancyZonesEditor/LocProject.json @@ -1,11 +1,11 @@ { "Projects": [ { - "LanguageSet": "Windows10_Languages", + "LanguageSet": "Azure_Languages", "LocItems": [ { "SourceFile": "src\\modules\\fancyzones\\editor\\FancyZonesEditor\\Properties\\Resources.resx", - "CopyOption": "LangIDOnPath", + "CopyOption": "LangIDOnName", "OutputPath": "src\\modules\\fancyzones\\editor\\FancyZonesEditor\\Properties" } ] diff --git a/src/modules/fancyzones/lib/LocProject.json b/src/modules/fancyzones/lib/LocProject.json deleted file mode 100644 index 4ceb6372ce0..00000000000 --- a/src/modules/fancyzones/lib/LocProject.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "Projects": [ - { - "LanguageSet": "Windows10_Languages", - "LocItems": [ - { - "SourceFile": "src\\modules\\fancyzones\\lib\\fancyzones.rc", - "CopyOption": "LangIDOnPath", - "OutputPath": "src\\modules\\fancyzones\\lib" - } - ] - } - ] - } \ No newline at end of file diff --git a/src/modules/fancyzones/lib/fancyzones1.rc b/src/modules/fancyzones/lib/fancyzones1.rc deleted file mode 100644 index 1a66bd760cc..00000000000 --- a/src/modules/fancyzones/lib/fancyzones1.rc +++ /dev/null @@ -1,38 +0,0 @@ -#include -#include "resource.h" -#include "../../../common/version.h" - -STRINGTABLE -BEGIN - IDS_SETTING_DESCRIPTION "Create window layouts to help make multi-tasking easy" - IDS_SETTING_DESCRIPTION_SHIFTDRAG "Hold Shift key to activate zones while dragging" - IDS_SETTING_DESCRIPTION_MOUSESWITCH "Use a non-primary mouse button to toggle zone activation" - IDS_SETTING_DESCRIPTION_OVERRIDE_SNAP_HOTKEYS "Override Windows Snap hotkeys (Win + Arrow) to move windows between zones" - IDS_SETTING_DESCRIPTION_MOVE_WINDOW_ACROSS_MONITORS "Move windows between zones across all monitors when snapping with (Win + Arrow)" - IDS_SETTING_DESCRIPTION_DISPLAYCHANGE_MOVEWINDOWS "Keep windows in their zones when the screen resolution changes" - IDS_SETTING_DESCRIPTION_ZONESETCHANGE_MOVEWINDOWS "During zone layout changes, windows assigned to a zone will match new size/positions" - IDS_SETTING_DESCRIPTION_ZONESETCHANGE_FLASHZONES "Flash zones when the active FancyZones layout changes" - IDS_SETTING_DESCRIPTION_SHOW_FANCY_ZONES_ON_ALL_MONITORS "Show zones on all monitors while dragging a window" - IDS_SETTING_DESCRIPTION_SPAN_ZONES_ACROSS_MONITORS "Allow zones to span across monitors" - IDS_SETTING_DESCRIPTION_MAKE_DRAGGED_WINDOW_TRANSPARENT "Make dragged window transparent" - IDS_SETTING_DESCRIPTION_ZONECOLOR "Zone inactive color (Default #F5FCFF)" - IDS_SETTING_DESCRIPTION_ZONE_BORDER_COLOR "Zone border color (Default #FFFFFF)" - IDS_SETTING_DESCRIPTION_ZONEHIGHLIGHTCOLOR "Zone highlight color (Default #008CFF)" - IDS_SETTING_DESCRIPTION_USE_CURSORPOS_EDITOR_STARTUPSCREEN "Follow mouse cursor instead of focus when launching editor in a multi screen environment" - IDS_SETTING_DESCRIPTION_APPLASTZONE_MOVEWINDOWS "Move newly created windows to their last known zone" - IDS_SETTING_DESCRIPTION_OPEN_WINDOW_ON_ACTIVE_MONITOR "Move newly created windows to the current active monitor [EXPERIMENTAL]" - IDS_SETTING_DESCRIPTION_RESTORESIZE "Restore the original size of windows when unsnapping" - IDS_SETTING_LAUNCH_EDITOR_LABEL "Zone configuration" - IDS_SETTING_LAUNCH_EDITOR_BUTTON "Edit zones" - IDS_SETTING_LAUNCH_EDITOR_DESCRIPTION "To launch the zone editor, select the Edit zones button below or press the zone editor hotkey anytime" - IDS_SETTING_LAUNCH_EDITOR_HOTKEY_LABEL "Configure the zone editor hotkey" - IDS_SETTING_EXCLUDED_APPS_DESCRIPTION "To exclude an application from snapping to zones add its name here (one per line). Excluded apps will react to the Windows Snap regardless of all other settings." - IDS_SETTINGS_HIGHLIGHT_OPACITY "Zone opacity (%)" - IDS_FANCYZONES "FancyZones" - IDS_CANT_DRAG_ELEVATED "We've detected an application running with administrator privileges. This blocks some functionality in PowerToys. Visit our wiki page to learn more." - IDS_CANT_DRAG_ELEVATED_LEARN_MORE "Learn more" - IDS_CANT_DRAG_ELEVATED_DIALOG_DONT_SHOW_AGAIN "Don't show again" - IDS_KEYBOARD_LISTENER_ERROR "Cannot install keyboard listener." - IDS_WINDOW_EVENT_LISTENER_ERROR "Cannot install Windows event listener." - IDS_POWERTOYS_FANCYZONES "PowerToys - FancyZones" -END From e09f070aecaf549c8cd6d392f41f1e732c552be9 Mon Sep 17 00:00:00 2001 From: Arjun Date: Tue, 18 Aug 2020 14:24:35 -0700 Subject: [PATCH 13/35] Added all projects with resx/resw files --- .pipelines/build-localization.cmd | 1 + .../LocProject.json | 22 +++++++++---------- .../colorPicker/ColorPickerUI/LocProject.json | 14 ++++++++++++ .../editor/FancyZonesEditor/LocProject.json | 22 +++++++++---------- src/modules/imageresizer/ui/LocProject.json | 14 ++++++++++++ .../launcher/PowerLauncher/LocProject.json | 14 ++++++++++++ .../MarkdownPreviewHandler/LocProject.json | 14 ++++++++++++ .../SvgPreviewHandler/LocProject.json | 14 ++++++++++++ 8 files changed, 93 insertions(+), 22 deletions(-) create mode 100644 src/modules/colorPicker/ColorPickerUI/LocProject.json create mode 100644 src/modules/imageresizer/ui/LocProject.json create mode 100644 src/modules/launcher/PowerLauncher/LocProject.json create mode 100644 src/modules/previewpane/MarkdownPreviewHandler/LocProject.json create mode 100644 src/modules/previewpane/SvgPreviewHandler/LocProject.json diff --git a/.pipelines/build-localization.cmd b/.pipelines/build-localization.cmd index 0433c4c898f..0771b0ef4d6 100644 --- a/.pipelines/build-localization.cmd +++ b/.pipelines/build-localization.cmd @@ -1,4 +1,5 @@ @echo off +rem This script will fail to run unless you have the appropriate permissions cd /D "%~dp0" diff --git a/src/core/Microsoft.PowerToys.Settings.UI/LocProject.json b/src/core/Microsoft.PowerToys.Settings.UI/LocProject.json index d28d03d84c8..96dcecd1a46 100644 --- a/src/core/Microsoft.PowerToys.Settings.UI/LocProject.json +++ b/src/core/Microsoft.PowerToys.Settings.UI/LocProject.json @@ -1,14 +1,14 @@ { "Projects": [ - { - "LanguageSet": "Azure_Languages", - "LocItems": [ - { - "SourceFile": "src\\core\\Microsoft.PowerToys.Settings.UI\\Strings\\en-us\\Resources.resw", - "CopyOption": "LangIDOnName", - "OutputPath": "src\\core\\Microsoft.PowerToys.Settings.UI\\Strings" - } - ] - } + { + "LanguageSet": "Azure_Languages", + "LocItems": [ + { + "SourceFile": "src\\core\\Microsoft.PowerToys.Settings.UI\\Strings\\en-us\\Resources.resw", + "CopyOption": "LangIDOnName", + "OutputPath": "src\\core\\Microsoft.PowerToys.Settings.UI\\Strings" + } + ] + } ] - } \ No newline at end of file +} \ No newline at end of file diff --git a/src/modules/colorPicker/ColorPickerUI/LocProject.json b/src/modules/colorPicker/ColorPickerUI/LocProject.json new file mode 100644 index 00000000000..ed93a414c3b --- /dev/null +++ b/src/modules/colorPicker/ColorPickerUI/LocProject.json @@ -0,0 +1,14 @@ +{ + "Projects": [ + { + "LanguageSet": "Azure_Languages", + "LocItems": [ + { + "SourceFile": "src\\modules\\colorPicker\\ColorPickerUI\\Properties\\Resources.resx", + "CopyOption": "LangIDOnName", + "OutputPath": "src\\modules\\colorPicker\\ColorPickerUI\\Properties" + } + ] + } + ] +} \ No newline at end of file diff --git a/src/modules/fancyzones/editor/FancyZonesEditor/LocProject.json b/src/modules/fancyzones/editor/FancyZonesEditor/LocProject.json index 4758e5d98f0..afa39341abc 100644 --- a/src/modules/fancyzones/editor/FancyZonesEditor/LocProject.json +++ b/src/modules/fancyzones/editor/FancyZonesEditor/LocProject.json @@ -1,14 +1,14 @@ { "Projects": [ - { - "LanguageSet": "Azure_Languages", - "LocItems": [ - { - "SourceFile": "src\\modules\\fancyzones\\editor\\FancyZonesEditor\\Properties\\Resources.resx", - "CopyOption": "LangIDOnName", - "OutputPath": "src\\modules\\fancyzones\\editor\\FancyZonesEditor\\Properties" - } - ] - } + { + "LanguageSet": "Azure_Languages", + "LocItems": [ + { + "SourceFile": "src\\modules\\fancyzones\\editor\\FancyZonesEditor\\Properties\\Resources.resx", + "CopyOption": "LangIDOnName", + "OutputPath": "src\\modules\\fancyzones\\editor\\FancyZonesEditor\\Properties" + } + ] + } ] - } \ No newline at end of file +} \ No newline at end of file diff --git a/src/modules/imageresizer/ui/LocProject.json b/src/modules/imageresizer/ui/LocProject.json new file mode 100644 index 00000000000..30fdd600d21 --- /dev/null +++ b/src/modules/imageresizer/ui/LocProject.json @@ -0,0 +1,14 @@ +{ + "Projects": [ + { + "LanguageSet": "Azure_Languages", + "LocItems": [ + { + "SourceFile": "src\\modules\\imageresizer\\ui\\Properties\\Resources.resx", + "CopyOption": "LangIDOnName", + "OutputPath": "src\\modules\\imageresizer\\ui\\Properties" + } + ] + } + ] +} \ No newline at end of file diff --git a/src/modules/launcher/PowerLauncher/LocProject.json b/src/modules/launcher/PowerLauncher/LocProject.json new file mode 100644 index 00000000000..2667c4bf854 --- /dev/null +++ b/src/modules/launcher/PowerLauncher/LocProject.json @@ -0,0 +1,14 @@ +{ + "Projects": [ + { + "LanguageSet": "Azure_Languages", + "LocItems": [ + { + "SourceFile": "src\\modules\\launcher\\PowerLauncher\\Properties\\Resources.resx", + "CopyOption": "LangIDOnName", + "OutputPath": "src\\modules\\launcher\\PowerLauncher\\Properties" + } + ] + } + ] +} \ No newline at end of file diff --git a/src/modules/previewpane/MarkdownPreviewHandler/LocProject.json b/src/modules/previewpane/MarkdownPreviewHandler/LocProject.json new file mode 100644 index 00000000000..d8a8684753b --- /dev/null +++ b/src/modules/previewpane/MarkdownPreviewHandler/LocProject.json @@ -0,0 +1,14 @@ +{ + "Projects": [ + { + "LanguageSet": "Azure_Languages", + "LocItems": [ + { + "SourceFile": "src\\modules\\previewpane\\MarkDownPreviewHandler\\Properties\\Resources.resx", + "CopyOption": "LangIDOnName", + "OutputPath": "src\\modules\\previewpane\\MarkDownPreviewHandler\\Properties" + } + ] + } + ] +} \ No newline at end of file diff --git a/src/modules/previewpane/SvgPreviewHandler/LocProject.json b/src/modules/previewpane/SvgPreviewHandler/LocProject.json new file mode 100644 index 00000000000..813b2c39509 --- /dev/null +++ b/src/modules/previewpane/SvgPreviewHandler/LocProject.json @@ -0,0 +1,14 @@ +{ + "Projects": [ + { + "LanguageSet": "Azure_Languages", + "LocItems": [ + { + "SourceFile": "src\\modules\\previewpane\\SvgPreviewHandler\\Resource.resx", + "CopyOption": "LangIDOnName", + "OutputPath": "src\\modules\\previewpane\\SvgPreviewHandler" + } + ] + } + ] + } \ No newline at end of file From ad38007a9f358eb96727c8548d1b548a7463e8b7 Mon Sep 17 00:00:00 2001 From: Arjun Date: Tue, 18 Aug 2020 15:01:02 -0700 Subject: [PATCH 14/35] Added newline to end of file --- src/core/Microsoft.PowerToys.Settings.UI/LocProject.json | 2 +- src/modules/colorPicker/ColorPickerUI/LocProject.json | 2 +- src/modules/fancyzones/editor/FancyZonesEditor/LocProject.json | 2 +- src/modules/imageresizer/ui/LocProject.json | 2 +- src/modules/launcher/PowerLauncher/LocProject.json | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/core/Microsoft.PowerToys.Settings.UI/LocProject.json b/src/core/Microsoft.PowerToys.Settings.UI/LocProject.json index 96dcecd1a46..2c4de4da570 100644 --- a/src/core/Microsoft.PowerToys.Settings.UI/LocProject.json +++ b/src/core/Microsoft.PowerToys.Settings.UI/LocProject.json @@ -11,4 +11,4 @@ ] } ] -} \ No newline at end of file +} diff --git a/src/modules/colorPicker/ColorPickerUI/LocProject.json b/src/modules/colorPicker/ColorPickerUI/LocProject.json index ed93a414c3b..c60c98a3080 100644 --- a/src/modules/colorPicker/ColorPickerUI/LocProject.json +++ b/src/modules/colorPicker/ColorPickerUI/LocProject.json @@ -11,4 +11,4 @@ ] } ] -} \ No newline at end of file +} diff --git a/src/modules/fancyzones/editor/FancyZonesEditor/LocProject.json b/src/modules/fancyzones/editor/FancyZonesEditor/LocProject.json index afa39341abc..ae726425160 100644 --- a/src/modules/fancyzones/editor/FancyZonesEditor/LocProject.json +++ b/src/modules/fancyzones/editor/FancyZonesEditor/LocProject.json @@ -11,4 +11,4 @@ ] } ] -} \ No newline at end of file +} diff --git a/src/modules/imageresizer/ui/LocProject.json b/src/modules/imageresizer/ui/LocProject.json index 30fdd600d21..22fd8a320f4 100644 --- a/src/modules/imageresizer/ui/LocProject.json +++ b/src/modules/imageresizer/ui/LocProject.json @@ -11,4 +11,4 @@ ] } ] -} \ No newline at end of file +} diff --git a/src/modules/launcher/PowerLauncher/LocProject.json b/src/modules/launcher/PowerLauncher/LocProject.json index 2667c4bf854..b195cbc41cf 100644 --- a/src/modules/launcher/PowerLauncher/LocProject.json +++ b/src/modules/launcher/PowerLauncher/LocProject.json @@ -11,4 +11,4 @@ ] } ] -} \ No newline at end of file +} From 7045a490de67c1fb2a357ce390c34b696ccebcbd Mon Sep 17 00:00:00 2001 From: Arjun Date: Tue, 18 Aug 2020 15:01:17 -0700 Subject: [PATCH 15/35] Removed nuget source as it is not used --- nuget.config | 4 ---- 1 file changed, 4 deletions(-) diff --git a/nuget.config b/nuget.config index c2923c08c6a..5a4b9c0fb99 100644 --- a/nuget.config +++ b/nuget.config @@ -1,8 +1,4 @@ - - - - From 6da613e7a722a2ab6b901b44d8d74b4fa328e416 Mon Sep 17 00:00:00 2001 From: Arjun Date: Tue, 18 Aug 2020 15:05:56 -0700 Subject: [PATCH 16/35] Updated comments --- .pipelines/build-localization.cmd | 5 +++-- .pipelines/pipeline.user.windows.yml | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.pipelines/build-localization.cmd b/.pipelines/build-localization.cmd index 0771b0ef4d6..318735382e8 100644 --- a/.pipelines/build-localization.cmd +++ b/.pipelines/build-localization.cmd @@ -18,9 +18,10 @@ set LocalizationXLocPkgVer=2.0.0 echo Running localization build... set XLocPath=%NUGET_PACKAGES%\Localization.XLoc.%LocalizationXLocPkgVer% -set LocProject=%RepoRoot%src +set LocProjectDirectory=%RepoRoot%src -dotnet "%XLocPath%\tools\netcore\Microsoft.Localization.XLoc.dll" /f "%LocProject%" +rem Run the localization tool on all LocProject.json files in the src directory and it's subdirectories +dotnet "%XLocPath%\tools\netcore\Microsoft.Localization.XLoc.dll" /f "%LocProjectDirectory%" echo Localization build finished with exit code '%errorlevel%'. diff --git a/.pipelines/pipeline.user.windows.yml b/.pipelines/pipeline.user.windows.yml index b57469b7742..7e91270a7e1 100644 --- a/.pipelines/pipeline.user.windows.yml +++ b/.pipelines/pipeline.user.windows.yml @@ -42,7 +42,7 @@ restore: build: commands: - !!buildcommand - name: 'Localization Build' + name: 'Localize Power Toys' command: '.pipelines\build-localization.cmd' artifacts: - from: 'out\loc' From 6f1c3481d70b2a58e7b67f21418b41390a81afe2 Mon Sep 17 00:00:00 2001 From: Arjun Date: Wed, 19 Aug 2020 15:40:08 -0700 Subject: [PATCH 17/35] Updated keyboard manager to use resx file --- .../keyboardmanager/Directory.Build.targets | 5 + .../keyboardmanager/common/Helpers.cpp | 2 +- .../common/KeyboardManagerConstants.h | 2 +- .../dll/KeyboardManager.base.rc | 38 +++ .../keyboardmanager/dll/KeyboardManager.rc | 91 ------ .../dll/KeyboardManager.vcxproj | 8 +- .../dll/KeyboardManager.vcxproj.filters | 10 +- .../keyboardmanager/dll/Resources.resx | 267 ++++++++++++++++++ src/modules/keyboardmanager/dll/dllmain.cpp | 2 +- .../keyboardmanager/dll/resource.base.h | 14 + src/modules/keyboardmanager/dll/resource.h | 64 ----- src/modules/keyboardmanager/ui/Dialog.cpp | 2 +- .../keyboardmanager/ui/EditKeyboardWindow.cpp | 2 +- .../ui/EditShortcutsWindow.cpp | 2 +- .../keyboardmanager/ui/ShortcutControl.cpp | 2 +- .../ui/SingleKeyRemapControl.cpp | 2 +- tools/build/convert-resx-to-rc.ps1 | 65 +++++ 17 files changed, 410 insertions(+), 168 deletions(-) create mode 100644 src/modules/keyboardmanager/Directory.Build.targets create mode 100644 src/modules/keyboardmanager/dll/KeyboardManager.base.rc delete mode 100644 src/modules/keyboardmanager/dll/KeyboardManager.rc create mode 100644 src/modules/keyboardmanager/dll/Resources.resx create mode 100644 src/modules/keyboardmanager/dll/resource.base.h delete mode 100644 src/modules/keyboardmanager/dll/resource.h create mode 100644 tools/build/convert-resx-to-rc.ps1 diff --git a/src/modules/keyboardmanager/Directory.Build.targets b/src/modules/keyboardmanager/Directory.Build.targets new file mode 100644 index 00000000000..d37c24b6555 --- /dev/null +++ b/src/modules/keyboardmanager/Directory.Build.targets @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/src/modules/keyboardmanager/common/Helpers.cpp b/src/modules/keyboardmanager/common/Helpers.cpp index 32704e40c5a..40f03db1c0a 100644 --- a/src/modules/keyboardmanager/common/Helpers.cpp +++ b/src/modules/keyboardmanager/common/Helpers.cpp @@ -4,7 +4,7 @@ #include "../common/shared_constants.h" #include #include "../../common/common.h" -#include "keyboardmanager/dll/resource.h" +#include "keyboardmanager/dll/Generated Files/resource.h" #include "../common/keyboard_layout.h" extern "C" IMAGE_DOS_HEADER __ImageBase; diff --git a/src/modules/keyboardmanager/common/KeyboardManagerConstants.h b/src/modules/keyboardmanager/common/KeyboardManagerConstants.h index 607573b0dba..77dd64797b2 100644 --- a/src/modules/keyboardmanager/common/KeyboardManagerConstants.h +++ b/src/modules/keyboardmanager/common/KeyboardManagerConstants.h @@ -2,7 +2,7 @@ #include #include #include "../../common/common.h" -#include "keyboardmanager/dll/resource.h" +#include "keyboardmanager/dll/Generated Files/resource.h" extern "C" IMAGE_DOS_HEADER __ImageBase; namespace KeyboardManagerConstants diff --git a/src/modules/keyboardmanager/dll/KeyboardManager.base.rc b/src/modules/keyboardmanager/dll/KeyboardManager.base.rc new file mode 100644 index 00000000000..e1afd78aced --- /dev/null +++ b/src/modules/keyboardmanager/dll/KeyboardManager.base.rc @@ -0,0 +1,38 @@ +#include +#include "Generated Files/resource.h" +#include "../../../common/version.h" + +IDS_KEYBOARDMANAGER_ICON ICON L"Keyboard.ico" + +1 VERSIONINFO +FILEVERSION FILE_VERSION +PRODUCTVERSION PRODUCT_VERSION +FILEFLAGSMASK VS_FFI_FILEFLAGSMASK +#ifdef _DEBUG +FILEFLAGS VS_FF_DEBUG +#else +FILEFLAGS 0x0L +#endif +FILEOS VOS_NT_WINDOWS32 +FILETYPE VFT_DLL +FILESUBTYPE VFT2_UNKNOWN +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904b0" // US English (0x0409), Unicode (0x04B0) charset + BEGIN + VALUE "CompanyName", COMPANY_NAME + VALUE "FileDescription", FILE_DESCRIPTION + VALUE "FileVersion", FILE_VERSION_STRING + VALUE "InternalName", INTERNAL_NAME + VALUE "LegalCopyright", COPYRIGHT_NOTE + VALUE "OriginalFilename", ORIGINAL_FILENAME + VALUE "ProductName", PRODUCT_NAME + VALUE "ProductVersion", PRODUCT_VERSION_STRING + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1200 // US English (0x0409), Unicode (1200) charset + END +END diff --git a/src/modules/keyboardmanager/dll/KeyboardManager.rc b/src/modules/keyboardmanager/dll/KeyboardManager.rc deleted file mode 100644 index 401a8b2d02f..00000000000 --- a/src/modules/keyboardmanager/dll/KeyboardManager.rc +++ /dev/null @@ -1,91 +0,0 @@ -#include -#include "resource.h" -#include "../../../common/version.h" - -STRINGTABLE -BEGIN - IDS_SETTINGS_DESCRIPTION L"This feature requires Windows 10 version 1903 or higher" - IDS_KEYBOARDMANAGER L"Keyboard Manager" - IDS_CREATEWINDOWFAILED_ERRORMESSAGE L"Call to CreateWindow failed!" - IDS_CREATEWINDOWFAILED_ERRORTITLE L"Error" - IDS_REGISTERCLASSFAILED_ERRORMESSAGE L"Windows registration failed!" - IDS_REGISTERCLASSFAILED_ERRORTITLE L"Error" - IDS_EDITKEYBOARD_WINDOWNAME L"Remap keys" - IDS_EDITSHORTCUTS_WINDOWNAME L"Remap shortcuts" - IDS_OK_BUTTON L"OK" - IDS_CANCEL_BUTTON L"Cancel" - IDS_CONTINUE_BUTTON L"Continue Anyway" - IDS_EDITKEYBOARD_SOURCEHEADER L"Key:" - IDS_EDITKEYBOARD_TARGETHEADER L"Mapped To:" - IDS_EDITSHORTCUTS_SOURCEHEADER L"Shortcut:" - IDS_EDITSHORTCUTS_TARGETHEADER L"Mapped To:" - IDS_EDITSHORTCUTS_TARGETAPPHEADER L"Target App:" - IDS_EDITKEYBOARD_ORPHANEDDIALOGTITLE L"The following keys are unassigned and you won't be able to use them:" - IDS_EDITKEYBOARD_PARTIALCONFIRMATIONDIALOGTITLE L"Some of the keys could not be remapped. Do you want to continue anyway?" - IDS_EDITSHORTCUTS_PARTIALCONFIRMATIONDIALOGTITLE L"Some of the shortcuts could not be remapped. Do you want to continue anyway?" - IDS_EDITKEYBOARD_INFO L"Select the key you want to change (Key) and then the key or shortcut you want it to become (Mapped To)." - IDS_EDITKEYBOARD_INFOEXAMPLE L"For example, if you want to press A and get ""Ctrl+C"", key ""A"" would be your ""Key"" column and the shortcut ""Ctrl+C"" would be your ""Mapped To"" column." - IDS_EDITSHORTCUTS_INFO L"Select the shortcut you want to change (Shortcut) and then the key or shortcut you want it to invoke (Mapped To)." - IDS_EDITSHORTCUTS_INFOEXAMPLE L"For example, if you want to press ""Ctrl+C"" and get ""Alt"" only on Microsoft Edge, ""Ctrl+C"" would be your ""Shortcut"" column, the key ""Alt"" would be your ""Mapped To"" column, and ""MSEdge"" would be your ""Target App"" column. If no target app is entered, it will apply globally. The name must be the process name and not the app name." - IDS_TYPE_BUTTON L"Type" - IDS_TYPEKEY_TITLE L"Press a key on selected keyboard:" - IDS_TYPESHORTCUT_TITLE L"Press the keys in shortcut:" - IDS_TYPEKEY_HEADER L"Key Pressed:" - IDS_TYPESHORTCUT_HEADER L"Keys Pressed:" - IDS_TYPE_HOLDENTER L"Hold Enter to continue" - IDS_TYPE_HOLDESC L"Hold Esc to discard" - IDS_EDITSHORTCUTS_ALLAPPS L"All Apps" - IDS_ERRORMESSAGE_REMAPSUCCESSFUL L"Remapping successful" - IDS_ERRORMESSAGE_REMAPUNSUCCESSFUL L"Some remappings were not applied" - IDS_ERRORMESSAGE_SAMEKEYPREVIOUSLYMAPPED L"Cannot remap a key more than once" - IDS_ERRORMESSAGE_MAPPEDTOSAMEKEY L"Cannot remap a key to itself" - IDS_ERRORMESSAGE_CONFLICTINGMODIFIERKEY L"Cannot remap this key as it conflicts with another remapped key" - IDS_ERRORMESSAGE_SAMESHORTCUTPREVIOUSLYMAPPED L"Cannot remap a shortcut more than once for the same target app" - IDS_ERRORMESSAGE_MAPTOSAMESHORTCUT L"Cannot remap a shortcut to itself" - IDS_ERRORMESSAGE_CONFLICTINGMODIFIERSHORTCUT L"Cannot remap this shortcut as it conflicts with another remapped shortcut" - IDS_ERRORMESSAGE_WINL L"Cannot remap from/to Win L" - IDS_ERRORMESSAGE_CTRLALTDEL L"Cannot remap from/to Ctrl Alt Del" - IDS_ERRORMESSAGE_SAVEFAILED L"Failed to save the remappings" - IDS_ERRORMESSAGE_SHORTCUTSTARTWITHMODIFIER L"Shortcut must start with a modifier key" - IDS_ERRORMESSAGE_SHORTCUTNOREPEATEDMODIFIER L"Shortcut cannot contain a repeated modifier" - IDS_ERRORMESSAGE_SHORTCUTATLEAST2KEYS L"Shortcut must have atleast 2 keys" - IDS_ERRORMESSAGE_SHORTCUTONEACTIONKEY L"Shortcut must contain an action key" - IDS_ERRORMESSAGE_SHORTCUTMAXONEACTIONKEY L"Shortcut cannot have more than one action key" - IDS_ERRORMESSAGE_MAXSHORTCUTSIZE L"Shortcuts can only have up to 2 modifier keys" - IDS_ERRORMESSAGE_DEFAULT L"Unexpected error" -END - -IDS_KEYBOARDMANAGER_ICON ICON L"Keyboard.ico" - -1 VERSIONINFO -FILEVERSION FILE_VERSION -PRODUCTVERSION PRODUCT_VERSION -FILEFLAGSMASK VS_FFI_FILEFLAGSMASK -#ifdef _DEBUG -FILEFLAGS VS_FF_DEBUG -#else -FILEFLAGS 0x0L -#endif -FILEOS VOS_NT_WINDOWS32 -FILETYPE VFT_DLL -FILESUBTYPE VFT2_UNKNOWN -BEGIN - BLOCK "StringFileInfo" - BEGIN - BLOCK "040904b0" // US English (0x0409), Unicode (0x04B0) charset - BEGIN - VALUE "CompanyName", COMPANY_NAME - VALUE "FileDescription", FILE_DESCRIPTION - VALUE "FileVersion", FILE_VERSION_STRING - VALUE "InternalName", INTERNAL_NAME - VALUE "LegalCopyright", COPYRIGHT_NOTE - VALUE "OriginalFilename", ORIGINAL_FILENAME - VALUE "ProductName", PRODUCT_NAME - VALUE "ProductVersion", PRODUCT_VERSION_STRING - END - END - BLOCK "VarFileInfo" - BEGIN - VALUE "Translation", 0x409, 1200 // US English (0x0409), Unicode (1200) charset - END -END diff --git a/src/modules/keyboardmanager/dll/KeyboardManager.vcxproj b/src/modules/keyboardmanager/dll/KeyboardManager.vcxproj index 82a3528f64d..f2cb878412b 100644 --- a/src/modules/keyboardmanager/dll/KeyboardManager.vcxproj +++ b/src/modules/keyboardmanager/dll/KeyboardManager.vcxproj @@ -10,7 +10,7 @@ Release x64 - + 15.0 {89f34af7-1c34-4a72-aa6e-534bcf972bd9} @@ -118,12 +118,14 @@ - + + + Create @@ -140,7 +142,7 @@ - + diff --git a/src/modules/keyboardmanager/dll/KeyboardManager.vcxproj.filters b/src/modules/keyboardmanager/dll/KeyboardManager.vcxproj.filters index 7fc6e2756aa..ec6bfffed3d 100644 --- a/src/modules/keyboardmanager/dll/KeyboardManager.vcxproj.filters +++ b/src/modules/keyboardmanager/dll/KeyboardManager.vcxproj.filters @@ -13,6 +13,9 @@ Source Files + + Resource Files + @@ -21,12 +24,15 @@ Header Files - + Header Files Header Files + + Header Files + @@ -48,7 +54,7 @@ - + Resource Files diff --git a/src/modules/keyboardmanager/dll/Resources.resx b/src/modules/keyboardmanager/dll/Resources.resx new file mode 100644 index 00000000000..e1544c169e2 --- /dev/null +++ b/src/modules/keyboardmanager/dll/Resources.resx @@ -0,0 +1,267 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + This feature requires Windows 10 version 1903 or higher + + + Keyboard Manager + + + Call to CreateWindow failed! + + + Error + + + Windows registration failed! + + + Error + + + Remap keys + + + Remap shortcuts + + + OK + + + Cancel + + + Continue Anyway + + + Key: + + + Mapped To: + + + Shortcut: + + + Mapped To: + + + Target App: + + + The following keys are unassigned and you won't be able to use them: + + + Some of the keys could not be remapped. Do you want to continue anyway? + + + Some of the shortcuts could not be remapped. Do you want to continue anyway? + + + Select the key you want to change (Key) and then the key or shortcut you want it to become (Mapped To). + + + For example, if you want to press A and get ""Ctrl+C"", key ""A"" would be your ""Key"" column and the shortcut ""Ctrl+C"" would be your ""Mapped To"" column. + + + Select the shortcut you want to change (Shortcut) and then the key or shortcut you want it to invoke (Mapped To). + + + For example, if you want to press ""Ctrl+C"" and get ""Alt"" only on Microsoft Edge, ""Ctrl+C"" would be your ""Shortcut"" column, the key ""Alt"" would be your ""Mapped To"" column, and ""MSEdge"" would be your ""Target App"" column. If no target app is entered, it will apply globally. The name must be the process name and not the app name. + + + Type + + + Press a key on selected keyboard: + + + Press the keys in shortcut: + + + Key Pressed: + + + Keys Pressed: + + + Hold Enter to continue + + + Hold Esc to discard + + + All Apps + + + Remapping successful + + + Some remappings were not applied + + + Cannot remap a key more than once + + + Cannot remap a key to itself + + + Cannot remap this key as it conflicts with another remapped key + + + Cannot remap a shortcut more than once for the same target app + + + Cannot remap a shortcut to itself + + + Cannot remap this shortcut as it conflicts with another remapped shortcut + + + Cannot remap from/to Win L + + + Cannot remap from/to Ctrl Alt Del + + + Failed to save the remappings + + + Shortcut must start with a modifier key + + + Shortcut cannot contain a repeated modifier + + + Shortcut must have atleast 2 keys + + + Shortcut must contain an action key + + + Shortcut cannot have more than one action key + + + Shortcuts can only have up to 2 modifier keys + + + Unexpected error + + \ No newline at end of file diff --git a/src/modules/keyboardmanager/dll/dllmain.cpp b/src/modules/keyboardmanager/dll/dllmain.cpp index 4bbb4c88200..1c38f024328 100644 --- a/src/modules/keyboardmanager/dll/dllmain.cpp +++ b/src/modules/keyboardmanager/dll/dllmain.cpp @@ -2,7 +2,7 @@ #include #include #include -#include "resource.h" +#include "Generated Files/resource.h" #include #include #include diff --git a/src/modules/keyboardmanager/dll/resource.base.h b/src/modules/keyboardmanager/dll/resource.base.h new file mode 100644 index 00000000000..45a7c1b43c1 --- /dev/null +++ b/src/modules/keyboardmanager/dll/resource.base.h @@ -0,0 +1,14 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Visual C++ generated include file. +// Used by KeyboardManager.rc + +////////////////////////////// +// Non-localizable + +#define FILE_DESCRIPTION "PowerToys KeyboardManager" +#define INTERNAL_NAME "KeyboardManager" +#define ORIGINAL_FILENAME "KeyboardManager.dll" +#define IDS_KEYBOARDMANAGER_ICON 1001 + +// Non-localizable +////////////////////////////// diff --git a/src/modules/keyboardmanager/dll/resource.h b/src/modules/keyboardmanager/dll/resource.h deleted file mode 100644 index cbce3521f52..00000000000 --- a/src/modules/keyboardmanager/dll/resource.h +++ /dev/null @@ -1,64 +0,0 @@ -//{{NO_DEPENDENCIES}} -// Microsoft Visual C++ generated include file. -// Used by KeyboardManager.rc - -////////////////////////////// -// Non-localizable - -#define FILE_DESCRIPTION "PowerToys KeyboardManager" -#define INTERNAL_NAME "KeyboardManager" -#define ORIGINAL_FILENAME "KeyboardManager.dll" - -// Non-localizable -////////////////////////////// - -#define IDS_SETTINGS_DESCRIPTION 101 -#define IDS_KEYBOARDMANAGER 102 -#define IDS_KEYBOARDMANAGER_ICON 103 -#define IDS_CREATEWINDOWFAILED_ERRORMESSAGE 104 -#define IDS_CREATEWINDOWFAILED_ERRORTITLE 105 -#define IDS_REGISTERCLASSFAILED_ERRORMESSAGE 106 -#define IDS_REGISTERCLASSFAILED_ERRORTITLE 107 -#define IDS_EDITKEYBOARD_WINDOWNAME 108 -#define IDS_EDITSHORTCUTS_WINDOWNAME 109 -#define IDS_CANCEL_BUTTON 110 -#define IDS_OK_BUTTON 111 -#define IDS_CONTINUE_BUTTON 112 -#define IDS_EDITKEYBOARD_SOURCEHEADER 113 -#define IDS_EDITKEYBOARD_TARGETHEADER 114 -#define IDS_EDITSHORTCUTS_SOURCEHEADER 115 -#define IDS_EDITSHORTCUTS_TARGETHEADER 116 -#define IDS_EDITSHORTCUTS_TARGETAPPHEADER 117 -#define IDS_EDITKEYBOARD_ORPHANEDDIALOGTITLE 118 -#define IDS_EDITKEYBOARD_PARTIALCONFIRMATIONDIALOGTITLE 119 -#define IDS_EDITSHORTCUTS_PARTIALCONFIRMATIONDIALOGTITLE 120 -#define IDS_EDITKEYBOARD_INFO 121 -#define IDS_EDITKEYBOARD_INFOEXAMPLE 122 -#define IDS_EDITSHORTCUTS_INFO 123 -#define IDS_EDITSHORTCUTS_INFOEXAMPLE 124 -#define IDS_TYPE_BUTTON 125 -#define IDS_TYPEKEY_TITLE 126 -#define IDS_TYPESHORTCUT_TITLE 127 -#define IDS_TYPEKEY_HEADER 128 -#define IDS_TYPESHORTCUT_HEADER 129 -#define IDS_TYPE_HOLDENTER 130 -#define IDS_TYPE_HOLDESC 131 -#define IDS_EDITSHORTCUTS_ALLAPPS 132 -#define IDS_ERRORMESSAGE_REMAPSUCCESSFUL 133 -#define IDS_ERRORMESSAGE_REMAPUNSUCCESSFUL 134 -#define IDS_ERRORMESSAGE_SAMEKEYPREVIOUSLYMAPPED 135 -#define IDS_ERRORMESSAGE_MAPPEDTOSAMEKEY 136 -#define IDS_ERRORMESSAGE_CONFLICTINGMODIFIERKEY 137 -#define IDS_ERRORMESSAGE_SAMESHORTCUTPREVIOUSLYMAPPED 138 -#define IDS_ERRORMESSAGE_MAPTOSAMESHORTCUT 139 -#define IDS_ERRORMESSAGE_CONFLICTINGMODIFIERSHORTCUT 140 -#define IDS_ERRORMESSAGE_WINL 141 -#define IDS_ERRORMESSAGE_CTRLALTDEL 142 -#define IDS_ERRORMESSAGE_SAVEFAILED 143 -#define IDS_ERRORMESSAGE_SHORTCUTSTARTWITHMODIFIER 144 -#define IDS_ERRORMESSAGE_SHORTCUTNOREPEATEDMODIFIER 145 -#define IDS_ERRORMESSAGE_SHORTCUTATLEAST2KEYS 146 -#define IDS_ERRORMESSAGE_SHORTCUTONEACTIONKEY 147 -#define IDS_ERRORMESSAGE_SHORTCUTMAXONEACTIONKEY 148 -#define IDS_ERRORMESSAGE_MAXSHORTCUTSIZE 149 -#define IDS_ERRORMESSAGE_DEFAULT 150 diff --git a/src/modules/keyboardmanager/ui/Dialog.cpp b/src/modules/keyboardmanager/ui/Dialog.cpp index e2db3abf35e..1cb2f8ce4ca 100644 --- a/src/modules/keyboardmanager/ui/Dialog.cpp +++ b/src/modules/keyboardmanager/ui/Dialog.cpp @@ -2,7 +2,7 @@ #include "Dialog.h" #include #include "common/common.h" -#include "keyboardmanager/dll/resource.h" +#include "keyboardmanager/dll/Generated Files/resource.h" extern "C" IMAGE_DOS_HEADER __ImageBase; using namespace winrt::Windows::Foundation; diff --git a/src/modules/keyboardmanager/ui/EditKeyboardWindow.cpp b/src/modules/keyboardmanager/ui/EditKeyboardWindow.cpp index 64a255a3183..f2bf25af051 100644 --- a/src/modules/keyboardmanager/ui/EditKeyboardWindow.cpp +++ b/src/modules/keyboardmanager/ui/EditKeyboardWindow.cpp @@ -10,7 +10,7 @@ #include #include "Styles.h" #include "Dialog.h" -#include +#include #include "../common/shared_constants.h" #include "keyboardmanager/common/KeyboardManagerState.h" #include "common/common.h" diff --git a/src/modules/keyboardmanager/ui/EditShortcutsWindow.cpp b/src/modules/keyboardmanager/ui/EditShortcutsWindow.cpp index c68dbdc015a..1e3dcaa9296 100644 --- a/src/modules/keyboardmanager/ui/EditShortcutsWindow.cpp +++ b/src/modules/keyboardmanager/ui/EditShortcutsWindow.cpp @@ -9,7 +9,7 @@ #include #include "Styles.h" #include "Dialog.h" -#include +#include #include #include "common/common.h" #include "LoadingAndSavingRemappingHelper.h" diff --git a/src/modules/keyboardmanager/ui/ShortcutControl.cpp b/src/modules/keyboardmanager/ui/ShortcutControl.cpp index da7d25786e9..b01f3434a4f 100644 --- a/src/modules/keyboardmanager/ui/ShortcutControl.cpp +++ b/src/modules/keyboardmanager/ui/ShortcutControl.cpp @@ -4,7 +4,7 @@ #include "keyboardmanager/common/KeyboardManagerState.h" #include "keyboardmanager/common/Helpers.h" #include "common/common.h" -#include "keyboardmanager/dll/resource.h" +#include "keyboardmanager/dll/Generated Files/resource.h" extern "C" IMAGE_DOS_HEADER __ImageBase; //Both static members are initialized to null diff --git a/src/modules/keyboardmanager/ui/SingleKeyRemapControl.cpp b/src/modules/keyboardmanager/ui/SingleKeyRemapControl.cpp index 2c56feb89be..d555f69b135 100644 --- a/src/modules/keyboardmanager/ui/SingleKeyRemapControl.cpp +++ b/src/modules/keyboardmanager/ui/SingleKeyRemapControl.cpp @@ -5,7 +5,7 @@ #include "keyboardmanager/common/KeyboardManagerState.h" #include "ShortcutControl.h" #include "common/common.h" -#include "keyboardmanager/dll/resource.h" +#include "keyboardmanager/dll/Generated Files/resource.h" extern "C" IMAGE_DOS_HEADER __ImageBase; //Both static members are initialized to null diff --git a/tools/build/convert-resx-to-rc.ps1 b/tools/build/convert-resx-to-rc.ps1 new file mode 100644 index 00000000000..56467331a6b --- /dev/null +++ b/tools/build/convert-resx-to-rc.ps1 @@ -0,0 +1,65 @@ +$parentDirectory = $args[0] + +$baseHeaderFileName = $args[1] +$generatedHeaderFileName = $args[2] +$baseRCFileName = $args[3] +$generatedRCFileName = $args[4] +$tempFile = "temporaryResourceFile.txt" + +$headerFileUpdated = $false +$rcFileUpdated = $false +$generatedFilesFolder = $parentDirectory + "\Generated Files" + +# Create Generated Files folder if it doesn't exist +if (!(Test-Path -Path $generatedFilesFolder)) +{ + $paramNewItem = @{ + Path = $generatedFilesFolder + ItemType = 'Directory' + Force = $true + } + + New-Item @paramNewItem +} + +# Iterate over all resx files in parent directory +Get-ChildItem $parentDirectory -Filter *.resx | +Foreach-Object { + # Convert resx to rc file + # Use resgen to parse resx to txt + resgen $_.FullName $tempFile + + $newLinesForRCFile = "" + $newLinesForHeaderFile = "" + $count = 101 + foreach ($line in Get-Content $tempFile) { + $content = $line -split "=", 2 + $lineInRCFormat = "IDS_" + $content[0].ToUpper() + " L`"" + $content[1] + "`"" + $newLinesForRCFile = $newLinesForRCFile + "`r`n`t" + $lineInRCFormat + if (!$headerFileUpdated) { + $lineInHeaderFormat = "#define IDS_" + $content[0].ToUpper() + " " + $count.ToString() + $newLinesForHeaderFile = $newLinesForHeaderFile + "`r`n" + $lineInHeaderFormat + $count++ + } + } + + # Delete temporary text file + Remove-Item $tempFile + + $newLinesForRCFile = "`r`nSTRINGTABLE`r`nBEGIN" + $newLinesForRCFile + "`r`nEND" + + if (!$rcFileUpdated) { + Set-Content -Path $generatedFilesFolder\$generatedRCFileName -Value ("// This file was auto-generated. Changes to this file may cause incorrect behavior and will be lost if the code is regenerated.`r`n") + Add-Content -Path $generatedFilesFolder\$generatedRCFileName -Value (Get-Content $parentDirectory\$baseRCFileName) + $rcFileUpdated = $true + } + + Add-Content -Path $generatedFilesFolder\$generatedRCFileName -Value $newLinesForRCFile + + if (!$headerFileUpdated) { + Set-Content -Path $generatedFilesFolder\$generatedHeaderFileName -Value ("// This file was auto-generated. Changes to this file may cause incorrect behavior and will be lost if the code is regenerated.`r`n") + Add-Content -Path $generatedFilesFolder\$generatedHeaderFileName -Value (Get-Content $parentDirectory\$baseHeaderFileName) + Add-Content -Path $generatedFilesFolder\$generatedHeaderFileName -Value $newLinesForHeaderFile + $headerFileUpdated = $true + } +} From d6bc1038792adb511f7e3d09164c142fefdb6d0d Mon Sep 17 00:00:00 2001 From: Arjun Date: Wed, 19 Aug 2020 16:24:43 -0700 Subject: [PATCH 18/35] Tweaked resources.resx and added it to project files --- .../dll/KeyboardManager.vcxproj | 5 +- .../dll/KeyboardManager.vcxproj.filters | 11 ++- .../keyboardmanager/dll/Resources.resx | 88 +++++++++---------- 3 files changed, 56 insertions(+), 48 deletions(-) diff --git a/src/modules/keyboardmanager/dll/KeyboardManager.vcxproj b/src/modules/keyboardmanager/dll/KeyboardManager.vcxproj index f2cb878412b..0001676c36c 100644 --- a/src/modules/keyboardmanager/dll/KeyboardManager.vcxproj +++ b/src/modules/keyboardmanager/dll/KeyboardManager.vcxproj @@ -10,7 +10,7 @@ Release x64 - + 15.0 {89f34af7-1c34-4a72-aa6e-534bcf972bd9} @@ -150,6 +150,9 @@ + + + diff --git a/src/modules/keyboardmanager/dll/KeyboardManager.vcxproj.filters b/src/modules/keyboardmanager/dll/KeyboardManager.vcxproj.filters index ec6bfffed3d..9e6904926e8 100644 --- a/src/modules/keyboardmanager/dll/KeyboardManager.vcxproj.filters +++ b/src/modules/keyboardmanager/dll/KeyboardManager.vcxproj.filters @@ -13,9 +13,6 @@ Source Files - - Resource Files - @@ -60,5 +57,13 @@ + + Resource Files + + + + + Resource Files + \ No newline at end of file diff --git a/src/modules/keyboardmanager/dll/Resources.resx b/src/modules/keyboardmanager/dll/Resources.resx index e1544c169e2..03d2d3be6fc 100644 --- a/src/modules/keyboardmanager/dll/Resources.resx +++ b/src/modules/keyboardmanager/dll/Resources.resx @@ -120,25 +120,25 @@ This feature requires Windows 10 version 1903 or higher - + Keyboard Manager - + Call to CreateWindow failed! - + Error - + Windows registration failed! - + Error - + Remap keys - + Remap shortcuts @@ -150,118 +150,118 @@ Continue Anyway - + Key: - + Mapped To: - + Shortcut: - + Mapped To: - + Target App: - + The following keys are unassigned and you won't be able to use them: - + Some of the keys could not be remapped. Do you want to continue anyway? - + Some of the shortcuts could not be remapped. Do you want to continue anyway? - + Select the key you want to change (Key) and then the key or shortcut you want it to become (Mapped To). - + For example, if you want to press A and get ""Ctrl+C"", key ""A"" would be your ""Key"" column and the shortcut ""Ctrl+C"" would be your ""Mapped To"" column. - + Select the shortcut you want to change (Shortcut) and then the key or shortcut you want it to invoke (Mapped To). - + For example, if you want to press ""Ctrl+C"" and get ""Alt"" only on Microsoft Edge, ""Ctrl+C"" would be your ""Shortcut"" column, the key ""Alt"" would be your ""Mapped To"" column, and ""MSEdge"" would be your ""Target App"" column. If no target app is entered, it will apply globally. The name must be the process name and not the app name. Type - + Press a key on selected keyboard: - + Press the keys in shortcut: - + Key Pressed: - + Keys Pressed: - + Hold Enter to continue - + Hold Esc to discard - + All Apps - + Remapping successful - + Some remappings were not applied - + Cannot remap a key more than once - + Cannot remap a key to itself - + Cannot remap this key as it conflicts with another remapped key - + Cannot remap a shortcut more than once for the same target app - + Cannot remap a shortcut to itself - + Cannot remap this shortcut as it conflicts with another remapped shortcut - + Cannot remap from/to Win L - + Cannot remap from/to Ctrl Alt Del - + Failed to save the remappings - + Shortcut must start with a modifier key - + Shortcut cannot contain a repeated modifier - + Shortcut must have atleast 2 keys - + Shortcut must contain an action key - + Shortcut cannot have more than one action key - + Shortcuts can only have up to 2 modifier keys - + Unexpected error \ No newline at end of file From 738481a04646071302aa38ef8492c4f1fe4e00f3 Mon Sep 17 00:00:00 2001 From: Arjun Date: Wed, 19 Aug 2020 16:45:47 -0700 Subject: [PATCH 19/35] Added comments and added in string table to resx script --- tools/build/convert-resx-to-rc.ps1 | 29 +++++++++++++++++-- tools/build/convert-stringtable-to-resx.ps1 | 31 +++++++++++++++++++++ 2 files changed, 57 insertions(+), 3 deletions(-) create mode 100644 tools/build/convert-stringtable-to-resx.ps1 diff --git a/tools/build/convert-resx-to-rc.ps1 b/tools/build/convert-resx-to-rc.ps1 index 56467331a6b..833ff113a8a 100644 --- a/tools/build/convert-resx-to-rc.ps1 +++ b/tools/build/convert-resx-to-rc.ps1 @@ -1,13 +1,28 @@ +# This script is used to move the resources from all the resx files in the directory (args[0]) to a .rc and .h file for use in C++ projects. + +# Root directory which contains the resx files $parentDirectory = $args[0] +# File name of the base resource.h which contains all the non-localized resource definitions $baseHeaderFileName = $args[1] + +# Target file name of the resource header file, which will be used in code - Example: resource.h $generatedHeaderFileName = $args[2] + +# File name of the base ProjectName.rc which contains all the non-localized resources $baseRCFileName = $args[3] + +# Target file name of the resource rc file, which will be used in code - Example: ProjectName.rc $generatedRCFileName = $args[4] + +# Temporary file created used for resgen $tempFile = "temporaryResourceFile.txt" +# Flags to check if the first updated has occurred $headerFileUpdated = $false $rcFileUpdated = $false + +# Output folder for the new resource files. It will be in ProjectDir\Generated Files so that the files are ignored by .gitignore $generatedFilesFolder = $parentDirectory + "\Generated Files" # Create Generated Files folder if it doesn't exist @@ -25,17 +40,21 @@ if (!(Test-Path -Path $generatedFilesFolder)) # Iterate over all resx files in parent directory Get-ChildItem $parentDirectory -Filter *.resx | Foreach-Object { - # Convert resx to rc file - # Use resgen to parse resx to txt + # Use resgen to parse resx to txt. More details at https://docs.microsoft.com/en-us/dotnet/framework/tools/resgen-exe-resource-file-generator#converting-between-resource-file-types resgen $_.FullName $tempFile $newLinesForRCFile = "" $newLinesForHeaderFile = "" $count = 101 foreach ($line in Get-Content $tempFile) { + # Each line of the resgen text file is of the form ResourceName=ResourceValue with no spaces. $content = $line -split "=", 2 + + # Each resource is named as IDS_ResxResourceName, in uppercase $lineInRCFormat = "IDS_" + $content[0].ToUpper() + " L`"" + $content[1] + "`"" $newLinesForRCFile = $newLinesForRCFile + "`r`n`t" + $lineInRCFormat + + # Resource header file needs to be updated only for one language if (!$headerFileUpdated) { $lineInHeaderFormat = "#define IDS_" + $content[0].ToUpper() + " " + $count.ToString() $newLinesForHeaderFile = $newLinesForHeaderFile + "`r`n" + $lineInHeaderFormat @@ -43,19 +62,23 @@ Foreach-Object { } } - # Delete temporary text file + # Delete temporary text file used by resgen Remove-Item $tempFile + # Add string table syntax $newLinesForRCFile = "`r`nSTRINGTABLE`r`nBEGIN" + $newLinesForRCFile + "`r`nEND" + # Initialize the rc file with an auto-generation warning and content from the base rc if (!$rcFileUpdated) { Set-Content -Path $generatedFilesFolder\$generatedRCFileName -Value ("// This file was auto-generated. Changes to this file may cause incorrect behavior and will be lost if the code is regenerated.`r`n") Add-Content -Path $generatedFilesFolder\$generatedRCFileName -Value (Get-Content $parentDirectory\$baseRCFileName) $rcFileUpdated = $true } + # Add in the new string table to the rc file Add-Content -Path $generatedFilesFolder\$generatedRCFileName -Value $newLinesForRCFile + # Resource header file needs to be set only once, with an auto-generation warning, content from the base resource header followed by #define for all the resources if (!$headerFileUpdated) { Set-Content -Path $generatedFilesFolder\$generatedHeaderFileName -Value ("// This file was auto-generated. Changes to this file may cause incorrect behavior and will be lost if the code is regenerated.`r`n") Add-Content -Path $generatedFilesFolder\$generatedHeaderFileName -Value (Get-Content $parentDirectory\$baseHeaderFileName) diff --git a/tools/build/convert-stringtable-to-resx.ps1 b/tools/build/convert-stringtable-to-resx.ps1 new file mode 100644 index 00000000000..3a3af7b1e39 --- /dev/null +++ b/tools/build/convert-stringtable-to-resx.ps1 @@ -0,0 +1,31 @@ +# This script is used to move the resources from a string table txt file to a resx file + +# File containing only the rows of the string table +$stringTableFile = args[0] + +# Output resx file +$resxFile = args[1] + +# Temporary text file used by resgen +$tempFile = "temporaryResourceFile.txt" + +$newLinesForTempFile = "" +foreach ($line in Get-Content $stringTableFile) { + # Each line of string table text file is of the form IDS_ResName L"ResourceValue" where there can be any number of spaces between the two. + $content = $line.Trim() -split "\s+", 2 + + # Each line of the resgen text input needs to be of the form ResourceName=ResourceValue with no spaces. + # For the resource name for the resx file, we remove the IDS_ prefix and convert the words to title case. This can be imperfect since the parts between underscores may also comprise of multiple words, so that will have to be manually tweaked + # For the resource value we only keep the content inside L"" + $lineInTempFileFormat = (Get-Culture).TextInfo.ToTitleCase($content[0].Substring(4).Replace("_", " ").ToLower()).Replace(" ", "_") + "=" + $content[1].Substring(2, $content[1].Length - 3) + $newLinesForTempFile = $newLinesForTempFile + "`r`n" + $lineInTempFileFormat +} + +# Save the text to a file +Set-Content -Path $tempFile -Value $newLinesForTempFile + +# Use resgen to parse the txt to resx. More details at https://docs.microsoft.com/en-us/dotnet/framework/tools/resgen-exe-resource-file-generator#converting-between-resource-file-types +resgen $tempFile $resxFile + +# Delete temporary text file used by resgen +Remove-Item $tempFile From 8b1f3bf384bb18cd8a57ba7fa10519b9c55e6c1d Mon Sep 17 00:00:00 2001 From: Arjun Date: Wed, 19 Aug 2020 16:53:50 -0700 Subject: [PATCH 20/35] Remove change from bad merge --- .pipelines/pipeline.user.windows.yml | 9 --------- 1 file changed, 9 deletions(-) diff --git a/.pipelines/pipeline.user.windows.yml b/.pipelines/pipeline.user.windows.yml index 7f37835ff0b..c851d2f1aa6 100644 --- a/.pipelines/pipeline.user.windows.yml +++ b/.pipelines/pipeline.user.windows.yml @@ -41,15 +41,6 @@ restore: build: commands: - - !!buildcommand - name: 'Localize Power Toys' - command: '.pipelines\build-localization.cmd' - artifacts: - - from: 'out\loc' - to: 'loc' - include: - - '**/*' - - !!buildcommand name: 'Build Power Toys' command: '.pipelines\build.cmd' From 555e4d13c873b5cef04a96e997ff88b474ff5c49 Mon Sep 17 00:00:00 2001 From: Arjun Date: Wed, 19 Aug 2020 17:00:11 -0700 Subject: [PATCH 21/35] Fix syntax error in convert stringtable --- tools/build/convert-stringtable-to-resx.ps1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/build/convert-stringtable-to-resx.ps1 b/tools/build/convert-stringtable-to-resx.ps1 index 3a3af7b1e39..b79ed142034 100644 --- a/tools/build/convert-stringtable-to-resx.ps1 +++ b/tools/build/convert-stringtable-to-resx.ps1 @@ -1,10 +1,10 @@ # This script is used to move the resources from a string table txt file to a resx file # File containing only the rows of the string table -$stringTableFile = args[0] +$stringTableFile = $args[0] # Output resx file -$resxFile = args[1] +$resxFile = $args[1] # Temporary text file used by resgen $tempFile = "temporaryResourceFile.txt" From 40c9311b5bf925bd5aca57c5a9c78ea7bcb2052a Mon Sep 17 00:00:00 2001 From: Arjun Date: Wed, 19 Aug 2020 17:02:21 -0700 Subject: [PATCH 22/35] Changed file type to None --- src/modules/keyboardmanager/dll/KeyboardManager.vcxproj | 2 +- .../keyboardmanager/dll/KeyboardManager.vcxproj.filters | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/modules/keyboardmanager/dll/KeyboardManager.vcxproj b/src/modules/keyboardmanager/dll/KeyboardManager.vcxproj index 0001676c36c..1483bcf3059 100644 --- a/src/modules/keyboardmanager/dll/KeyboardManager.vcxproj +++ b/src/modules/keyboardmanager/dll/KeyboardManager.vcxproj @@ -119,7 +119,7 @@ - + diff --git a/src/modules/keyboardmanager/dll/KeyboardManager.vcxproj.filters b/src/modules/keyboardmanager/dll/KeyboardManager.vcxproj.filters index 9e6904926e8..2f8f657d9d2 100644 --- a/src/modules/keyboardmanager/dll/KeyboardManager.vcxproj.filters +++ b/src/modules/keyboardmanager/dll/KeyboardManager.vcxproj.filters @@ -27,9 +27,6 @@ Header Files - - Header Files - @@ -60,6 +57,9 @@ Resource Files + + Header Files + From 300412582a82ae6a232c85d91a2ad11464a2a646 Mon Sep 17 00:00:00 2001 From: Arjun Date: Wed, 19 Aug 2020 17:11:19 -0700 Subject: [PATCH 23/35] Migrated color picker's resources --- .../{ColorPicker.rc => ColorPicker.base.rc} | 6 - .../ColorPicker/ColorPicker.vcxproj | 14 +- .../ColorPicker/ColorPicker.vcxproj.filters | 19 +++ .../colorPicker/ColorPicker/Resources.resx | 126 ++++++++++++++++++ .../colorPicker/ColorPicker/dllmain.cpp | 2 +- .../{resource.h => resource.base.h} | 3 - 6 files changed, 157 insertions(+), 13 deletions(-) rename src/modules/colorPicker/ColorPicker/{ColorPicker.rc => ColorPicker.base.rc} (85%) create mode 100644 src/modules/colorPicker/ColorPicker/Resources.resx rename src/modules/colorPicker/ColorPicker/{resource.h => resource.base.h} (78%) diff --git a/src/modules/colorPicker/ColorPicker/ColorPicker.rc b/src/modules/colorPicker/ColorPicker/ColorPicker.base.rc similarity index 85% rename from src/modules/colorPicker/ColorPicker/ColorPicker.rc rename to src/modules/colorPicker/ColorPicker/ColorPicker.base.rc index 2b44820fa71..a08ecc180a2 100644 --- a/src/modules/colorPicker/ColorPicker/ColorPicker.rc +++ b/src/modules/colorPicker/ColorPicker/ColorPicker.base.rc @@ -2,12 +2,6 @@ #include "resource.h" #include "../../../common/version.h" -STRINGTABLE -BEGIN - IDS_COLORPICKER_NAME L"ColorPicker" - IDS_COLORPICKER_SETTINGS_DESC L"This feature requires Windows 10 version 1903 or higher" -END - 1 VERSIONINFO FILEVERSION FILE_VERSION PRODUCTVERSION PRODUCT_VERSION diff --git a/src/modules/colorPicker/ColorPicker/ColorPicker.vcxproj b/src/modules/colorPicker/ColorPicker/ColorPicker.vcxproj index 17ac49700cd..402b9e0bb19 100644 --- a/src/modules/colorPicker/ColorPicker/ColorPicker.vcxproj +++ b/src/modules/colorPicker/ColorPicker/ColorPicker.vcxproj @@ -11,6 +11,9 @@ x64 + + + 15.0 Win32Proj @@ -101,8 +104,9 @@ + - + @@ -116,12 +120,16 @@ {74485049-c722-400f-abe5-86ac52d929b3} - - + + + + + + diff --git a/src/modules/colorPicker/ColorPicker/ColorPicker.vcxproj.filters b/src/modules/colorPicker/ColorPicker/ColorPicker.vcxproj.filters index 14ca2d56997..393da5e4567 100644 --- a/src/modules/colorPicker/ColorPicker/ColorPicker.vcxproj.filters +++ b/src/modules/colorPicker/ColorPicker/ColorPicker.vcxproj.filters @@ -21,6 +21,12 @@ Source Files + + Header Files + + + Header Files + @@ -35,5 +41,18 @@ + + Resource Files + + + + + Resource Files + + + + + Resource Files + \ No newline at end of file diff --git a/src/modules/colorPicker/ColorPicker/Resources.resx b/src/modules/colorPicker/ColorPicker/Resources.resx new file mode 100644 index 00000000000..a33728ac7f0 --- /dev/null +++ b/src/modules/colorPicker/ColorPicker/Resources.resx @@ -0,0 +1,126 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + ColorPicker + + + This feature requires Windows 10 version 1903 or higher + + \ No newline at end of file diff --git a/src/modules/colorPicker/ColorPicker/dllmain.cpp b/src/modules/colorPicker/ColorPicker/dllmain.cpp index 7f926117041..06277ac9d68 100644 --- a/src/modules/colorPicker/ColorPicker/dllmain.cpp +++ b/src/modules/colorPicker/ColorPicker/dllmain.cpp @@ -3,7 +3,7 @@ #include #include #include "trace.h" -#include "resource.h" +#include "Generated Files/resource.h" #include #include diff --git a/src/modules/colorPicker/ColorPicker/resource.h b/src/modules/colorPicker/ColorPicker/resource.base.h similarity index 78% rename from src/modules/colorPicker/ColorPicker/resource.h rename to src/modules/colorPicker/ColorPicker/resource.base.h index 2a54fc183c0..5b21b24ee4b 100644 --- a/src/modules/colorPicker/ColorPicker/resource.h +++ b/src/modules/colorPicker/ColorPicker/resource.base.h @@ -11,6 +11,3 @@ // Non-localizable ////////////////////////////// - -#define IDS_COLORPICKER_NAME 601 -#define IDS_COLORPICKER_SETTINGS_DESC 602 From 58278e86ed6d2cde2b83c5428b3404155e920a4f Mon Sep 17 00:00:00 2001 From: Arjun Date: Wed, 19 Aug 2020 17:19:16 -0700 Subject: [PATCH 24/35] Migrated resources for Microsoft.Launcher --- ...Launcher.rc => Microsoft.Launcher.base.rc} | Bin 2448 -> 2104 bytes .../Microsoft.Launcher.vcxproj | 12 +- .../Microsoft.Launcher.vcxproj.filters | 15 ++- .../Microsoft.Launcher/Resources.resx | 126 ++++++++++++++++++ .../launcher/Microsoft.Launcher/dllmain.cpp | 2 +- .../{resource.h => resource.base.h} | 3 - 6 files changed, 150 insertions(+), 8 deletions(-) rename src/modules/launcher/Microsoft.Launcher/{Microsoft.Launcher.rc => Microsoft.Launcher.base.rc} (85%) create mode 100644 src/modules/launcher/Microsoft.Launcher/Resources.resx rename src/modules/launcher/Microsoft.Launcher/{resource.h => resource.base.h} (80%) diff --git a/src/modules/launcher/Microsoft.Launcher/Microsoft.Launcher.rc b/src/modules/launcher/Microsoft.Launcher/Microsoft.Launcher.base.rc similarity index 85% rename from src/modules/launcher/Microsoft.Launcher/Microsoft.Launcher.rc rename to src/modules/launcher/Microsoft.Launcher/Microsoft.Launcher.base.rc index e207a1e89fdd70fc76fe301ede6a4b10f175efb6..d905e2d3e4a7588c89563bf0d7610ba1f520d7c9 100644 GIT binary patch delta 11 ScmbOryhC8Zn$0XsJ?sD)odfg$ delta 334 zcmZ`#y9&ZU5F8K`1VOM6yNh3-SXo9BG@wDesHF(L(j=Jpz(#*TNbMik*oj}~+@_X; zWo~wFX7)bSNA2-yXatzTgO34`jUGmDQ9(I-7V4G<2O3LqHfEgZW6185j8A3^H?xZM zyJEkI31VEZK|-AvSENv!JRxFF8AaCo{8!af4|wuC#@QjG>6^baJ^}U!MSV-R6^?hB zB!o)pfwxeQ39ulJu$E}%-bRb{EHP8|Vs;JNCEp>6`BI6&j@2yFl;|!Ob_AJ4+MJoo LM`%WUe{ZE9Qh+u3 diff --git a/src/modules/launcher/Microsoft.Launcher/Microsoft.Launcher.vcxproj b/src/modules/launcher/Microsoft.Launcher/Microsoft.Launcher.vcxproj index 7601003f02f..b449262024b 100644 --- a/src/modules/launcher/Microsoft.Launcher/Microsoft.Launcher.vcxproj +++ b/src/modules/launcher/Microsoft.Launcher/Microsoft.Launcher.vcxproj @@ -11,6 +11,9 @@ x64 + + + 15.0 {e364f67b-bb12-4e91-b639-355866ebcd8b} @@ -101,7 +104,8 @@ - + + @@ -117,11 +121,15 @@ - + + + + + diff --git a/src/modules/launcher/Microsoft.Launcher/Microsoft.Launcher.vcxproj.filters b/src/modules/launcher/Microsoft.Launcher/Microsoft.Launcher.vcxproj.filters index 220aa98370b..ede04cbf82f 100644 --- a/src/modules/launcher/Microsoft.Launcher/Microsoft.Launcher.vcxproj.filters +++ b/src/modules/launcher/Microsoft.Launcher/Microsoft.Launcher.vcxproj.filters @@ -8,7 +8,7 @@ - + Header Files @@ -21,11 +21,22 @@ - + Resource Files + + Header Files + + + Resource Files + + + + + Resource Files + \ No newline at end of file diff --git a/src/modules/launcher/Microsoft.Launcher/Resources.resx b/src/modules/launcher/Microsoft.Launcher/Resources.resx new file mode 100644 index 00000000000..7220424f790 --- /dev/null +++ b/src/modules/launcher/Microsoft.Launcher/Resources.resx @@ -0,0 +1,126 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + PowerToys Run + + + This feature requires Windows 10 version 1903 or higher + + \ No newline at end of file diff --git a/src/modules/launcher/Microsoft.Launcher/dllmain.cpp b/src/modules/launcher/Microsoft.Launcher/dllmain.cpp index 52a2667a411..feade6e699a 100644 --- a/src/modules/launcher/Microsoft.Launcher/dllmain.cpp +++ b/src/modules/launcher/Microsoft.Launcher/dllmain.cpp @@ -3,7 +3,7 @@ #include #include #include "trace.h" -#include "resource.h" +#include "Generated Files/resource.h" #include extern "C" IMAGE_DOS_HEADER __ImageBase; diff --git a/src/modules/launcher/Microsoft.Launcher/resource.h b/src/modules/launcher/Microsoft.Launcher/resource.base.h similarity index 80% rename from src/modules/launcher/Microsoft.Launcher/resource.h rename to src/modules/launcher/Microsoft.Launcher/resource.base.h index 1327743674a..bdb9a6044c0 100644 --- a/src/modules/launcher/Microsoft.Launcher/resource.h +++ b/src/modules/launcher/Microsoft.Launcher/resource.base.h @@ -11,6 +11,3 @@ // Non-localizable ////////////////////////////// - -#define IDS_LAUNCHER_NAME 601 -#define IDS_LAUNCHER_SETTINGS_DESC 602 From 201f5ed219b7a740d69451e707b2dd10877973f5 Mon Sep 17 00:00:00 2001 From: Arjun Date: Wed, 19 Aug 2020 17:55:23 -0700 Subject: [PATCH 25/35] Migrated resources for fancy zones --- .../ColorPicker/ColorPicker.base.rc | 2 +- .../fancyzones/dll/FancyZonesModule.vcxproj | 2 +- .../dll/FancyZonesModule.vcxproj.filters | 2 +- src/modules/fancyzones/dll/dllmain.cpp | 2 +- .../fancyzones/lib/FancyZonesLib.vcxproj | 12 +- .../lib/FancyZonesLib.vcxproj.filters | 19 +- src/modules/fancyzones/lib/Resources.resx | 213 ++++++++++++++++++ src/modules/fancyzones/lib/Settings.cpp | 1 + .../fancyzones/lib/WindowMoveHandler.cpp | 1 + src/modules/fancyzones/lib/fancyzones.base.rc | 36 +++ src/modules/fancyzones/lib/fancyzones.rc | 71 ------ src/modules/fancyzones/lib/pch.h | 2 - src/modules/fancyzones/lib/resource.base.h | 13 ++ src/modules/fancyzones/lib/resource.h | 45 ---- .../tests/UnitTests/FancyZones.Spec.cpp | 1 + .../UnitTests/FancyZonesSettings.Spec.cpp | 1 + .../Microsoft.Launcher.base.rc | Bin 2104 -> 2136 bytes 17 files changed, 295 insertions(+), 128 deletions(-) create mode 100644 src/modules/fancyzones/lib/Resources.resx create mode 100644 src/modules/fancyzones/lib/fancyzones.base.rc delete mode 100644 src/modules/fancyzones/lib/fancyzones.rc create mode 100644 src/modules/fancyzones/lib/resource.base.h delete mode 100644 src/modules/fancyzones/lib/resource.h diff --git a/src/modules/colorPicker/ColorPicker/ColorPicker.base.rc b/src/modules/colorPicker/ColorPicker/ColorPicker.base.rc index a08ecc180a2..8e7ad5d024d 100644 --- a/src/modules/colorPicker/ColorPicker/ColorPicker.base.rc +++ b/src/modules/colorPicker/ColorPicker/ColorPicker.base.rc @@ -1,5 +1,5 @@ #include -#include "resource.h" +#include "Generated Files/resource.h" #include "../../../common/version.h" 1 VERSIONINFO diff --git a/src/modules/fancyzones/dll/FancyZonesModule.vcxproj b/src/modules/fancyzones/dll/FancyZonesModule.vcxproj index ed6379e60cd..85adb7f0b44 100644 --- a/src/modules/fancyzones/dll/FancyZonesModule.vcxproj +++ b/src/modules/fancyzones/dll/FancyZonesModule.vcxproj @@ -124,7 +124,7 @@ - + diff --git a/src/modules/fancyzones/dll/FancyZonesModule.vcxproj.filters b/src/modules/fancyzones/dll/FancyZonesModule.vcxproj.filters index d90f9e60e7b..41474a79d06 100644 --- a/src/modules/fancyzones/dll/FancyZonesModule.vcxproj.filters +++ b/src/modules/fancyzones/dll/FancyZonesModule.vcxproj.filters @@ -25,7 +25,7 @@ - + diff --git a/src/modules/fancyzones/dll/dllmain.cpp b/src/modules/fancyzones/dll/dllmain.cpp index 8c5ff082cc4..5850b74e725 100644 --- a/src/modules/fancyzones/dll/dllmain.cpp +++ b/src/modules/fancyzones/dll/dllmain.cpp @@ -6,7 +6,7 @@ #include #include -#include +#include #include #include #include diff --git a/src/modules/fancyzones/lib/FancyZonesLib.vcxproj b/src/modules/fancyzones/lib/FancyZonesLib.vcxproj index a1fd7225fc0..abc6d5b7196 100644 --- a/src/modules/fancyzones/lib/FancyZonesLib.vcxproj +++ b/src/modules/fancyzones/lib/FancyZonesLib.vcxproj @@ -11,6 +11,9 @@ x64 + + + 16.0 {F9C68EDF-AC74-4B77-9AF1-005D9C9F6A99} @@ -108,7 +111,8 @@ - + + @@ -141,11 +145,15 @@ - + + + + + diff --git a/src/modules/fancyzones/lib/FancyZonesLib.vcxproj.filters b/src/modules/fancyzones/lib/FancyZonesLib.vcxproj.filters index 219d8bc5d71..e6036098297 100644 --- a/src/modules/fancyzones/lib/FancyZonesLib.vcxproj.filters +++ b/src/modules/fancyzones/lib/FancyZonesLib.vcxproj.filters @@ -36,7 +36,7 @@ Header Files - + Header Files @@ -124,11 +124,22 @@ - - Source Files + + + Header Files + + + Resource Files + + + + + Resource Files - + + Resource Files + \ No newline at end of file diff --git a/src/modules/fancyzones/lib/Resources.resx b/src/modules/fancyzones/lib/Resources.resx new file mode 100644 index 00000000000..7b4cb38896f --- /dev/null +++ b/src/modules/fancyzones/lib/Resources.resx @@ -0,0 +1,213 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Create window layouts to help make multi-tasking easy + + + Hold Shift key to activate zones while dragging + + + Use a non-primary mouse button to toggle zone activation + + + Override Windows Snap hotkeys (Win + Arrow) to move windows between zones + + + Move windows between zones across all monitors when snapping with (Win + Arrow) + + + Keep windows in their zones when the screen resolution changes + + + During zone layout changes, windows assigned to a zone will match new size/positions + + + Flash zones when the active FancyZones layout changes + + + Show zones on all monitors while dragging a window + + + Allow zones to span across monitors + + + Make dragged window transparent + + + Zone inactive color (Default #F5FCFF) + + + Zone border color (Default #FFFFFF) + + + Zone highlight color (Default #008CFF) + + + Follow mouse cursor instead of focus when launching editor in a multi screen environment + + + Move newly created windows to their last known zone + + + Move newly created windows to the current active monitor [EXPERIMENTAL] + + + Restore the original size of windows when unsnapping + + + Zone configuration + + + Edit zones + + + To launch the zone editor, select the Edit zones button below or press the zone editor hotkey anytime + + + Configure the zone editor hotkey + + + To exclude an application from snapping to zones add its name here (one per line). Excluded apps will react to the Windows Snap regardless of all other settings. + + + Zone opacity (%) + + + FancyZones + + + We've detected an application running with administrator privileges. This blocks some functionality in PowerToys. Visit our wiki page to learn more. + + + Learn more + + + Don't show again + + + Cannot install keyboard listener. + + + Cannot install Windows event listener. + + + PowerToys - FancyZones + + \ No newline at end of file diff --git a/src/modules/fancyzones/lib/Settings.cpp b/src/modules/fancyzones/lib/Settings.cpp index 9088db89855..501b7782304 100644 --- a/src/modules/fancyzones/lib/Settings.cpp +++ b/src/modules/fancyzones/lib/Settings.cpp @@ -3,6 +3,7 @@ #include "lib/Settings.h" #include "lib/FancyZones.h" #include "trace.h" +#include "Generated Files/resource.h" // Non-Localizable strings namespace NonLocalizable diff --git a/src/modules/fancyzones/lib/WindowMoveHandler.cpp b/src/modules/fancyzones/lib/WindowMoveHandler.cpp index 9fcc1a03af0..0901e4a7249 100644 --- a/src/modules/fancyzones/lib/WindowMoveHandler.cpp +++ b/src/modules/fancyzones/lib/WindowMoveHandler.cpp @@ -13,6 +13,7 @@ #include "lib/SecondaryMouseButtonsHook.h" #include "lib/GenericKeyHook.h" #include "lib/FancyZonesData.h" +#include "Generated Files/resource.h" extern "C" IMAGE_DOS_HEADER __ImageBase; diff --git a/src/modules/fancyzones/lib/fancyzones.base.rc b/src/modules/fancyzones/lib/fancyzones.base.rc new file mode 100644 index 00000000000..2d4180adc32 --- /dev/null +++ b/src/modules/fancyzones/lib/fancyzones.base.rc @@ -0,0 +1,36 @@ +#include +#include "../lib/Generated Files/resource.h" +#include "../../../common/version.h" + +1 VERSIONINFO + FILEVERSION FILE_VERSION + PRODUCTVERSION PRODUCT_VERSION + FILEFLAGSMASK VS_FFI_FILEFLAGSMASK +#ifdef _DEBUG + FILEFLAGS VS_FF_DEBUG +#else + FILEFLAGS 0x0L +#endif + FILEOS VOS_NT_WINDOWS32 + FILETYPE VFT_DLL + FILESUBTYPE VFT2_UNKNOWN +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904b0" + BEGIN + VALUE "CompanyName", COMPANY_NAME + VALUE "FileDescription", FILE_DESCRIPTION + VALUE "FileVersion", FILE_VERSION_STRING + VALUE "InternalName", INTERNAL_NAME + VALUE "LegalCopyright", COPYRIGHT_NOTE + VALUE "OriginalFilename", ORIGINAL_FILENAME + VALUE "ProductName", PRODUCT_NAME + VALUE "ProductVersion", PRODUCT_VERSION_STRING + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1200 + END +END diff --git a/src/modules/fancyzones/lib/fancyzones.rc b/src/modules/fancyzones/lib/fancyzones.rc deleted file mode 100644 index 11ceacd4a91..00000000000 --- a/src/modules/fancyzones/lib/fancyzones.rc +++ /dev/null @@ -1,71 +0,0 @@ -#include -#include "resource.h" -#include "../../../common/version.h" - -STRINGTABLE -BEGIN - IDS_SETTING_DESCRIPTION "Create window layouts to help make multi-tasking easy" - IDS_SETTING_DESCRIPTION_SHIFTDRAG "Hold Shift key to activate zones while dragging" - IDS_SETTING_DESCRIPTION_MOUSESWITCH "Use a non-primary mouse button to toggle zone activation" - IDS_SETTING_DESCRIPTION_OVERRIDE_SNAP_HOTKEYS "Override Windows Snap hotkeys (Win + Arrow) to move windows between zones" - IDS_SETTING_DESCRIPTION_MOVE_WINDOW_ACROSS_MONITORS "Move windows between zones across all monitors when snapping with (Win + Arrow)" - IDS_SETTING_DESCRIPTION_DISPLAYCHANGE_MOVEWINDOWS "Keep windows in their zones when the screen resolution changes" - IDS_SETTING_DESCRIPTION_ZONESETCHANGE_MOVEWINDOWS "During zone layout changes, windows assigned to a zone will match new size/positions" - IDS_SETTING_DESCRIPTION_ZONESETCHANGE_FLASHZONES "Flash zones when the active FancyZones layout changes" - IDS_SETTING_DESCRIPTION_SHOW_FANCY_ZONES_ON_ALL_MONITORS "Show zones on all monitors while dragging a window" - IDS_SETTING_DESCRIPTION_SPAN_ZONES_ACROSS_MONITORS "Allow zones to span across monitors" - IDS_SETTING_DESCRIPTION_MAKE_DRAGGED_WINDOW_TRANSPARENT "Make dragged window transparent" - IDS_SETTING_DESCRIPTION_ZONECOLOR "Zone inactive color (Default #F5FCFF)" - IDS_SETTING_DESCRIPTION_ZONE_BORDER_COLOR "Zone border color (Default #FFFFFF)" - IDS_SETTING_DESCRIPTION_ZONEHIGHLIGHTCOLOR "Zone highlight color (Default #008CFF)" - IDS_SETTING_DESCRIPTION_USE_CURSORPOS_EDITOR_STARTUPSCREEN "Follow mouse cursor instead of focus when launching editor in a multi screen environment" - IDS_SETTING_DESCRIPTION_APPLASTZONE_MOVEWINDOWS "Move newly created windows to their last known zone" - IDS_SETTING_DESCRIPTION_OPEN_WINDOW_ON_ACTIVE_MONITOR "Move newly created windows to the current active monitor [EXPERIMENTAL]" - IDS_SETTING_DESCRIPTION_RESTORESIZE "Restore the original size of windows when unsnapping" - IDS_SETTING_LAUNCH_EDITOR_LABEL "Zone configuration" - IDS_SETTING_LAUNCH_EDITOR_BUTTON "Edit zones" - IDS_SETTING_LAUNCH_EDITOR_DESCRIPTION "To launch the zone editor, select the Edit zones button below or press the zone editor hotkey anytime" - IDS_SETTING_LAUNCH_EDITOR_HOTKEY_LABEL "Configure the zone editor hotkey" - IDS_SETTING_EXCLUDED_APPS_DESCRIPTION "To exclude an application from snapping to zones add its name here (one per line). Excluded apps will react to the Windows Snap regardless of all other settings." - IDS_SETTINGS_HIGHLIGHT_OPACITY "Zone opacity (%)" - IDS_FANCYZONES "FancyZones" - IDS_CANT_DRAG_ELEVATED "We've detected an application running with administrator privileges. This blocks some functionality in PowerToys. Visit our wiki page to learn more." - IDS_CANT_DRAG_ELEVATED_LEARN_MORE "Learn more" - IDS_CANT_DRAG_ELEVATED_DIALOG_DONT_SHOW_AGAIN "Don't show again" - IDS_KEYBOARD_LISTENER_ERROR "Cannot install keyboard listener." - IDS_WINDOW_EVENT_LISTENER_ERROR "Cannot install Windows event listener." - IDS_POWERTOYS_FANCYZONES "PowerToys - FancyZones" -END - -1 VERSIONINFO - FILEVERSION FILE_VERSION - PRODUCTVERSION PRODUCT_VERSION - FILEFLAGSMASK VS_FFI_FILEFLAGSMASK -#ifdef _DEBUG - FILEFLAGS VS_FF_DEBUG -#else - FILEFLAGS 0x0L -#endif - FILEOS VOS_NT_WINDOWS32 - FILETYPE VFT_DLL - FILESUBTYPE VFT2_UNKNOWN -BEGIN - BLOCK "StringFileInfo" - BEGIN - BLOCK "040904b0" - BEGIN - VALUE "CompanyName", COMPANY_NAME - VALUE "FileDescription", FILE_DESCRIPTION - VALUE "FileVersion", FILE_VERSION_STRING - VALUE "InternalName", INTERNAL_NAME - VALUE "LegalCopyright", COPYRIGHT_NOTE - VALUE "OriginalFilename", ORIGINAL_FILENAME - VALUE "ProductName", PRODUCT_NAME - VALUE "ProductVersion", PRODUCT_VERSION_STRING - END - END - BLOCK "VarFileInfo" - BEGIN - VALUE "Translation", 0x409, 1200 - END -END diff --git a/src/modules/fancyzones/lib/pch.h b/src/modules/fancyzones/lib/pch.h index 3d418360714..46ae45264cd 100644 --- a/src/modules/fancyzones/lib/pch.h +++ b/src/modules/fancyzones/lib/pch.h @@ -1,6 +1,4 @@ #pragma once -#include "resource.h" - #define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers #include #include diff --git a/src/modules/fancyzones/lib/resource.base.h b/src/modules/fancyzones/lib/resource.base.h new file mode 100644 index 00000000000..75649eba857 --- /dev/null +++ b/src/modules/fancyzones/lib/resource.base.h @@ -0,0 +1,13 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Visual C++ generated include file. +// Used by fancyzones.rc + +////////////////////////////// +// Non-localizable + +#define FILE_DESCRIPTION "PowerToys FancyZones" +#define INTERNAL_NAME "fancyzones" +#define ORIGINAL_FILENAME "fancyzones.dll" + +// Non-localizable +////////////////////////////// diff --git a/src/modules/fancyzones/lib/resource.h b/src/modules/fancyzones/lib/resource.h deleted file mode 100644 index 2dabf2cf4b7..00000000000 --- a/src/modules/fancyzones/lib/resource.h +++ /dev/null @@ -1,45 +0,0 @@ -//{{NO_DEPENDENCIES}} -// Microsoft Visual C++ generated include file. -// Used by fancyzones.rc - -////////////////////////////// -// Non-localizable - -#define FILE_DESCRIPTION "PowerToys FancyZones" -#define INTERNAL_NAME "fancyzones" -#define ORIGINAL_FILENAME "fancyzones.dll" - -// Non-localizable -////////////////////////////// - -#define IDS_SETTING_DESCRIPTION_SHIFTDRAG 101 -#define IDS_SETTING_DESCRIPTION_MOUSESWITCH 102 -#define IDS_SETTING_DESCRIPTION_OVERRIDE_SNAP_HOTKEYS 103 -#define IDS_SETTING_DESCRIPTION_MOVE_WINDOW_ACROSS_MONITORS 104 -#define IDS_SETTING_DESCRIPTION_DISPLAYCHANGE_MOVEWINDOWS 105 -#define IDS_SETTING_DESCRIPTION_ZONESETCHANGE_MOVEWINDOWS 106 -#define IDS_SETTING_DESCRIPTION_ZONESETCHANGE_FLASHZONES 107 -#define IDS_SETTING_DESCRIPTION_SHOW_FANCY_ZONES_ON_ALL_MONITORS 108 -#define IDS_SETTING_DESCRIPTION_SPAN_ZONES_ACROSS_MONITORS 109 -#define IDS_SETTING_DESCRIPTION_MAKE_DRAGGED_WINDOW_TRANSPARENT 110 -#define IDS_SETTING_DESCRIPTION_ZONECOLOR 111 -#define IDS_SETTING_DESCRIPTION_ZONE_BORDER_COLOR 112 -#define IDS_SETTING_DESCRIPTION_ZONEHIGHLIGHTCOLOR 113 -#define IDS_SETTING_DESCRIPTION_APPLASTZONE_MOVEWINDOWS 114 -#define IDS_SETTING_DESCRIPTION_OPEN_WINDOW_ON_ACTIVE_MONITOR 115 -#define IDS_SETTING_DESCRIPTION_RESTORESIZE 116 -#define IDS_SETTING_DESCRIPTION_USE_CURSORPOS_EDITOR_STARTUPSCREEN 117 -#define IDS_SETTING_DESCRIPTION 118 -#define IDS_SETTING_LAUNCH_EDITOR_LABEL 119 -#define IDS_SETTING_LAUNCH_EDITOR_BUTTON 120 -#define IDS_SETTING_LAUNCH_EDITOR_DESCRIPTION 121 -#define IDS_SETTING_LAUNCH_EDITOR_HOTKEY_LABEL 122 -#define IDS_SETTING_EXCLUDED_APPS_DESCRIPTION 123 -#define IDS_SETTINGS_HIGHLIGHT_OPACITY 124 -#define IDS_FANCYZONES 125 -#define IDS_CANT_DRAG_ELEVATED 126 -#define IDS_CANT_DRAG_ELEVATED_LEARN_MORE 127 -#define IDS_CANT_DRAG_ELEVATED_DIALOG_DONT_SHOW_AGAIN 128 -#define IDS_KEYBOARD_LISTENER_ERROR 129 -#define IDS_WINDOW_EVENT_LISTENER_ERROR 130 -#define IDS_POWERTOYS_FANCYZONES 131 diff --git a/src/modules/fancyzones/tests/UnitTests/FancyZones.Spec.cpp b/src/modules/fancyzones/tests/UnitTests/FancyZones.Spec.cpp index 8d0dfcdcab9..2f3326dfdb7 100644 --- a/src/modules/fancyzones/tests/UnitTests/FancyZones.Spec.cpp +++ b/src/modules/fancyzones/tests/UnitTests/FancyZones.Spec.cpp @@ -5,6 +5,7 @@ #include #include #include +#include "lib/Generated Files/resource.h" #include "util.h" diff --git a/src/modules/fancyzones/tests/UnitTests/FancyZonesSettings.Spec.cpp b/src/modules/fancyzones/tests/UnitTests/FancyZonesSettings.Spec.cpp index c748e0e0923..f1adaeff085 100644 --- a/src/modules/fancyzones/tests/UnitTests/FancyZonesSettings.Spec.cpp +++ b/src/modules/fancyzones/tests/UnitTests/FancyZonesSettings.Spec.cpp @@ -5,6 +5,7 @@ #include #include #include +#include "lib/Generated Files/resource.h" using namespace Microsoft::VisualStudio::CppUnitTestFramework; diff --git a/src/modules/launcher/Microsoft.Launcher/Microsoft.Launcher.base.rc b/src/modules/launcher/Microsoft.Launcher/Microsoft.Launcher.base.rc index d905e2d3e4a7588c89563bf0d7610ba1f520d7c9..936a137bcb8d0d18703cefc8f6fe772f150cac7e 100644 GIT binary patch delta 42 tcmdlXa6@2%le{}aDnlL+7cnF;M_T1d{*& From 892b12d5257c144dcc4bd3db8221e8d1cb27e48d Mon Sep 17 00:00:00 2001 From: Arjun Date: Thu, 20 Aug 2020 08:48:25 -0700 Subject: [PATCH 26/35] Revert fancyzones changes --- .../fancyzones/dll/FancyZonesModule.vcxproj | 2 +- .../dll/FancyZonesModule.vcxproj.filters | 2 +- src/modules/fancyzones/dll/dllmain.cpp | 2 +- .../fancyzones/lib/FancyZonesLib.vcxproj | 12 +- .../lib/FancyZonesLib.vcxproj.filters | 19 +- src/modules/fancyzones/lib/Resources.resx | 213 ------------------ src/modules/fancyzones/lib/Settings.cpp | 1 - .../fancyzones/lib/WindowMoveHandler.cpp | 1 - src/modules/fancyzones/lib/fancyzones.base.rc | 36 --- src/modules/fancyzones/lib/fancyzones.rc | 71 ++++++ src/modules/fancyzones/lib/pch.h | 2 + src/modules/fancyzones/lib/resource.base.h | 13 -- src/modules/fancyzones/lib/resource.h | 45 ++++ .../tests/UnitTests/FancyZones.Spec.cpp | 1 - .../UnitTests/FancyZonesSettings.Spec.cpp | 1 - 15 files changed, 127 insertions(+), 294 deletions(-) delete mode 100644 src/modules/fancyzones/lib/Resources.resx delete mode 100644 src/modules/fancyzones/lib/fancyzones.base.rc create mode 100644 src/modules/fancyzones/lib/fancyzones.rc delete mode 100644 src/modules/fancyzones/lib/resource.base.h create mode 100644 src/modules/fancyzones/lib/resource.h diff --git a/src/modules/fancyzones/dll/FancyZonesModule.vcxproj b/src/modules/fancyzones/dll/FancyZonesModule.vcxproj index 85adb7f0b44..ed6379e60cd 100644 --- a/src/modules/fancyzones/dll/FancyZonesModule.vcxproj +++ b/src/modules/fancyzones/dll/FancyZonesModule.vcxproj @@ -124,7 +124,7 @@ - + diff --git a/src/modules/fancyzones/dll/FancyZonesModule.vcxproj.filters b/src/modules/fancyzones/dll/FancyZonesModule.vcxproj.filters index 41474a79d06..d90f9e60e7b 100644 --- a/src/modules/fancyzones/dll/FancyZonesModule.vcxproj.filters +++ b/src/modules/fancyzones/dll/FancyZonesModule.vcxproj.filters @@ -25,7 +25,7 @@ - + diff --git a/src/modules/fancyzones/dll/dllmain.cpp b/src/modules/fancyzones/dll/dllmain.cpp index 5850b74e725..8c5ff082cc4 100644 --- a/src/modules/fancyzones/dll/dllmain.cpp +++ b/src/modules/fancyzones/dll/dllmain.cpp @@ -6,7 +6,7 @@ #include #include -#include +#include #include #include #include diff --git a/src/modules/fancyzones/lib/FancyZonesLib.vcxproj b/src/modules/fancyzones/lib/FancyZonesLib.vcxproj index abc6d5b7196..a1fd7225fc0 100644 --- a/src/modules/fancyzones/lib/FancyZonesLib.vcxproj +++ b/src/modules/fancyzones/lib/FancyZonesLib.vcxproj @@ -11,9 +11,6 @@ x64 - - - 16.0 {F9C68EDF-AC74-4B77-9AF1-005D9C9F6A99} @@ -111,8 +108,7 @@ - - + @@ -145,15 +141,11 @@ - - + - - - diff --git a/src/modules/fancyzones/lib/FancyZonesLib.vcxproj.filters b/src/modules/fancyzones/lib/FancyZonesLib.vcxproj.filters index e6036098297..219d8bc5d71 100644 --- a/src/modules/fancyzones/lib/FancyZonesLib.vcxproj.filters +++ b/src/modules/fancyzones/lib/FancyZonesLib.vcxproj.filters @@ -36,7 +36,7 @@ Header Files - + Header Files @@ -124,22 +124,11 @@ - - - Header Files - - - Resource Files - - - - - Resource Files + + Source Files - - Resource Files - + \ No newline at end of file diff --git a/src/modules/fancyzones/lib/Resources.resx b/src/modules/fancyzones/lib/Resources.resx deleted file mode 100644 index 7b4cb38896f..00000000000 --- a/src/modules/fancyzones/lib/Resources.resx +++ /dev/null @@ -1,213 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - Create window layouts to help make multi-tasking easy - - - Hold Shift key to activate zones while dragging - - - Use a non-primary mouse button to toggle zone activation - - - Override Windows Snap hotkeys (Win + Arrow) to move windows between zones - - - Move windows between zones across all monitors when snapping with (Win + Arrow) - - - Keep windows in their zones when the screen resolution changes - - - During zone layout changes, windows assigned to a zone will match new size/positions - - - Flash zones when the active FancyZones layout changes - - - Show zones on all monitors while dragging a window - - - Allow zones to span across monitors - - - Make dragged window transparent - - - Zone inactive color (Default #F5FCFF) - - - Zone border color (Default #FFFFFF) - - - Zone highlight color (Default #008CFF) - - - Follow mouse cursor instead of focus when launching editor in a multi screen environment - - - Move newly created windows to their last known zone - - - Move newly created windows to the current active monitor [EXPERIMENTAL] - - - Restore the original size of windows when unsnapping - - - Zone configuration - - - Edit zones - - - To launch the zone editor, select the Edit zones button below or press the zone editor hotkey anytime - - - Configure the zone editor hotkey - - - To exclude an application from snapping to zones add its name here (one per line). Excluded apps will react to the Windows Snap regardless of all other settings. - - - Zone opacity (%) - - - FancyZones - - - We've detected an application running with administrator privileges. This blocks some functionality in PowerToys. Visit our wiki page to learn more. - - - Learn more - - - Don't show again - - - Cannot install keyboard listener. - - - Cannot install Windows event listener. - - - PowerToys - FancyZones - - \ No newline at end of file diff --git a/src/modules/fancyzones/lib/Settings.cpp b/src/modules/fancyzones/lib/Settings.cpp index 501b7782304..9088db89855 100644 --- a/src/modules/fancyzones/lib/Settings.cpp +++ b/src/modules/fancyzones/lib/Settings.cpp @@ -3,7 +3,6 @@ #include "lib/Settings.h" #include "lib/FancyZones.h" #include "trace.h" -#include "Generated Files/resource.h" // Non-Localizable strings namespace NonLocalizable diff --git a/src/modules/fancyzones/lib/WindowMoveHandler.cpp b/src/modules/fancyzones/lib/WindowMoveHandler.cpp index 0901e4a7249..9fcc1a03af0 100644 --- a/src/modules/fancyzones/lib/WindowMoveHandler.cpp +++ b/src/modules/fancyzones/lib/WindowMoveHandler.cpp @@ -13,7 +13,6 @@ #include "lib/SecondaryMouseButtonsHook.h" #include "lib/GenericKeyHook.h" #include "lib/FancyZonesData.h" -#include "Generated Files/resource.h" extern "C" IMAGE_DOS_HEADER __ImageBase; diff --git a/src/modules/fancyzones/lib/fancyzones.base.rc b/src/modules/fancyzones/lib/fancyzones.base.rc deleted file mode 100644 index 2d4180adc32..00000000000 --- a/src/modules/fancyzones/lib/fancyzones.base.rc +++ /dev/null @@ -1,36 +0,0 @@ -#include -#include "../lib/Generated Files/resource.h" -#include "../../../common/version.h" - -1 VERSIONINFO - FILEVERSION FILE_VERSION - PRODUCTVERSION PRODUCT_VERSION - FILEFLAGSMASK VS_FFI_FILEFLAGSMASK -#ifdef _DEBUG - FILEFLAGS VS_FF_DEBUG -#else - FILEFLAGS 0x0L -#endif - FILEOS VOS_NT_WINDOWS32 - FILETYPE VFT_DLL - FILESUBTYPE VFT2_UNKNOWN -BEGIN - BLOCK "StringFileInfo" - BEGIN - BLOCK "040904b0" - BEGIN - VALUE "CompanyName", COMPANY_NAME - VALUE "FileDescription", FILE_DESCRIPTION - VALUE "FileVersion", FILE_VERSION_STRING - VALUE "InternalName", INTERNAL_NAME - VALUE "LegalCopyright", COPYRIGHT_NOTE - VALUE "OriginalFilename", ORIGINAL_FILENAME - VALUE "ProductName", PRODUCT_NAME - VALUE "ProductVersion", PRODUCT_VERSION_STRING - END - END - BLOCK "VarFileInfo" - BEGIN - VALUE "Translation", 0x409, 1200 - END -END diff --git a/src/modules/fancyzones/lib/fancyzones.rc b/src/modules/fancyzones/lib/fancyzones.rc new file mode 100644 index 00000000000..11ceacd4a91 --- /dev/null +++ b/src/modules/fancyzones/lib/fancyzones.rc @@ -0,0 +1,71 @@ +#include +#include "resource.h" +#include "../../../common/version.h" + +STRINGTABLE +BEGIN + IDS_SETTING_DESCRIPTION "Create window layouts to help make multi-tasking easy" + IDS_SETTING_DESCRIPTION_SHIFTDRAG "Hold Shift key to activate zones while dragging" + IDS_SETTING_DESCRIPTION_MOUSESWITCH "Use a non-primary mouse button to toggle zone activation" + IDS_SETTING_DESCRIPTION_OVERRIDE_SNAP_HOTKEYS "Override Windows Snap hotkeys (Win + Arrow) to move windows between zones" + IDS_SETTING_DESCRIPTION_MOVE_WINDOW_ACROSS_MONITORS "Move windows between zones across all monitors when snapping with (Win + Arrow)" + IDS_SETTING_DESCRIPTION_DISPLAYCHANGE_MOVEWINDOWS "Keep windows in their zones when the screen resolution changes" + IDS_SETTING_DESCRIPTION_ZONESETCHANGE_MOVEWINDOWS "During zone layout changes, windows assigned to a zone will match new size/positions" + IDS_SETTING_DESCRIPTION_ZONESETCHANGE_FLASHZONES "Flash zones when the active FancyZones layout changes" + IDS_SETTING_DESCRIPTION_SHOW_FANCY_ZONES_ON_ALL_MONITORS "Show zones on all monitors while dragging a window" + IDS_SETTING_DESCRIPTION_SPAN_ZONES_ACROSS_MONITORS "Allow zones to span across monitors" + IDS_SETTING_DESCRIPTION_MAKE_DRAGGED_WINDOW_TRANSPARENT "Make dragged window transparent" + IDS_SETTING_DESCRIPTION_ZONECOLOR "Zone inactive color (Default #F5FCFF)" + IDS_SETTING_DESCRIPTION_ZONE_BORDER_COLOR "Zone border color (Default #FFFFFF)" + IDS_SETTING_DESCRIPTION_ZONEHIGHLIGHTCOLOR "Zone highlight color (Default #008CFF)" + IDS_SETTING_DESCRIPTION_USE_CURSORPOS_EDITOR_STARTUPSCREEN "Follow mouse cursor instead of focus when launching editor in a multi screen environment" + IDS_SETTING_DESCRIPTION_APPLASTZONE_MOVEWINDOWS "Move newly created windows to their last known zone" + IDS_SETTING_DESCRIPTION_OPEN_WINDOW_ON_ACTIVE_MONITOR "Move newly created windows to the current active monitor [EXPERIMENTAL]" + IDS_SETTING_DESCRIPTION_RESTORESIZE "Restore the original size of windows when unsnapping" + IDS_SETTING_LAUNCH_EDITOR_LABEL "Zone configuration" + IDS_SETTING_LAUNCH_EDITOR_BUTTON "Edit zones" + IDS_SETTING_LAUNCH_EDITOR_DESCRIPTION "To launch the zone editor, select the Edit zones button below or press the zone editor hotkey anytime" + IDS_SETTING_LAUNCH_EDITOR_HOTKEY_LABEL "Configure the zone editor hotkey" + IDS_SETTING_EXCLUDED_APPS_DESCRIPTION "To exclude an application from snapping to zones add its name here (one per line). Excluded apps will react to the Windows Snap regardless of all other settings." + IDS_SETTINGS_HIGHLIGHT_OPACITY "Zone opacity (%)" + IDS_FANCYZONES "FancyZones" + IDS_CANT_DRAG_ELEVATED "We've detected an application running with administrator privileges. This blocks some functionality in PowerToys. Visit our wiki page to learn more." + IDS_CANT_DRAG_ELEVATED_LEARN_MORE "Learn more" + IDS_CANT_DRAG_ELEVATED_DIALOG_DONT_SHOW_AGAIN "Don't show again" + IDS_KEYBOARD_LISTENER_ERROR "Cannot install keyboard listener." + IDS_WINDOW_EVENT_LISTENER_ERROR "Cannot install Windows event listener." + IDS_POWERTOYS_FANCYZONES "PowerToys - FancyZones" +END + +1 VERSIONINFO + FILEVERSION FILE_VERSION + PRODUCTVERSION PRODUCT_VERSION + FILEFLAGSMASK VS_FFI_FILEFLAGSMASK +#ifdef _DEBUG + FILEFLAGS VS_FF_DEBUG +#else + FILEFLAGS 0x0L +#endif + FILEOS VOS_NT_WINDOWS32 + FILETYPE VFT_DLL + FILESUBTYPE VFT2_UNKNOWN +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904b0" + BEGIN + VALUE "CompanyName", COMPANY_NAME + VALUE "FileDescription", FILE_DESCRIPTION + VALUE "FileVersion", FILE_VERSION_STRING + VALUE "InternalName", INTERNAL_NAME + VALUE "LegalCopyright", COPYRIGHT_NOTE + VALUE "OriginalFilename", ORIGINAL_FILENAME + VALUE "ProductName", PRODUCT_NAME + VALUE "ProductVersion", PRODUCT_VERSION_STRING + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1200 + END +END diff --git a/src/modules/fancyzones/lib/pch.h b/src/modules/fancyzones/lib/pch.h index 46ae45264cd..3d418360714 100644 --- a/src/modules/fancyzones/lib/pch.h +++ b/src/modules/fancyzones/lib/pch.h @@ -1,4 +1,6 @@ #pragma once +#include "resource.h" + #define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers #include #include diff --git a/src/modules/fancyzones/lib/resource.base.h b/src/modules/fancyzones/lib/resource.base.h deleted file mode 100644 index 75649eba857..00000000000 --- a/src/modules/fancyzones/lib/resource.base.h +++ /dev/null @@ -1,13 +0,0 @@ -//{{NO_DEPENDENCIES}} -// Microsoft Visual C++ generated include file. -// Used by fancyzones.rc - -////////////////////////////// -// Non-localizable - -#define FILE_DESCRIPTION "PowerToys FancyZones" -#define INTERNAL_NAME "fancyzones" -#define ORIGINAL_FILENAME "fancyzones.dll" - -// Non-localizable -////////////////////////////// diff --git a/src/modules/fancyzones/lib/resource.h b/src/modules/fancyzones/lib/resource.h new file mode 100644 index 00000000000..2dabf2cf4b7 --- /dev/null +++ b/src/modules/fancyzones/lib/resource.h @@ -0,0 +1,45 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Visual C++ generated include file. +// Used by fancyzones.rc + +////////////////////////////// +// Non-localizable + +#define FILE_DESCRIPTION "PowerToys FancyZones" +#define INTERNAL_NAME "fancyzones" +#define ORIGINAL_FILENAME "fancyzones.dll" + +// Non-localizable +////////////////////////////// + +#define IDS_SETTING_DESCRIPTION_SHIFTDRAG 101 +#define IDS_SETTING_DESCRIPTION_MOUSESWITCH 102 +#define IDS_SETTING_DESCRIPTION_OVERRIDE_SNAP_HOTKEYS 103 +#define IDS_SETTING_DESCRIPTION_MOVE_WINDOW_ACROSS_MONITORS 104 +#define IDS_SETTING_DESCRIPTION_DISPLAYCHANGE_MOVEWINDOWS 105 +#define IDS_SETTING_DESCRIPTION_ZONESETCHANGE_MOVEWINDOWS 106 +#define IDS_SETTING_DESCRIPTION_ZONESETCHANGE_FLASHZONES 107 +#define IDS_SETTING_DESCRIPTION_SHOW_FANCY_ZONES_ON_ALL_MONITORS 108 +#define IDS_SETTING_DESCRIPTION_SPAN_ZONES_ACROSS_MONITORS 109 +#define IDS_SETTING_DESCRIPTION_MAKE_DRAGGED_WINDOW_TRANSPARENT 110 +#define IDS_SETTING_DESCRIPTION_ZONECOLOR 111 +#define IDS_SETTING_DESCRIPTION_ZONE_BORDER_COLOR 112 +#define IDS_SETTING_DESCRIPTION_ZONEHIGHLIGHTCOLOR 113 +#define IDS_SETTING_DESCRIPTION_APPLASTZONE_MOVEWINDOWS 114 +#define IDS_SETTING_DESCRIPTION_OPEN_WINDOW_ON_ACTIVE_MONITOR 115 +#define IDS_SETTING_DESCRIPTION_RESTORESIZE 116 +#define IDS_SETTING_DESCRIPTION_USE_CURSORPOS_EDITOR_STARTUPSCREEN 117 +#define IDS_SETTING_DESCRIPTION 118 +#define IDS_SETTING_LAUNCH_EDITOR_LABEL 119 +#define IDS_SETTING_LAUNCH_EDITOR_BUTTON 120 +#define IDS_SETTING_LAUNCH_EDITOR_DESCRIPTION 121 +#define IDS_SETTING_LAUNCH_EDITOR_HOTKEY_LABEL 122 +#define IDS_SETTING_EXCLUDED_APPS_DESCRIPTION 123 +#define IDS_SETTINGS_HIGHLIGHT_OPACITY 124 +#define IDS_FANCYZONES 125 +#define IDS_CANT_DRAG_ELEVATED 126 +#define IDS_CANT_DRAG_ELEVATED_LEARN_MORE 127 +#define IDS_CANT_DRAG_ELEVATED_DIALOG_DONT_SHOW_AGAIN 128 +#define IDS_KEYBOARD_LISTENER_ERROR 129 +#define IDS_WINDOW_EVENT_LISTENER_ERROR 130 +#define IDS_POWERTOYS_FANCYZONES 131 diff --git a/src/modules/fancyzones/tests/UnitTests/FancyZones.Spec.cpp b/src/modules/fancyzones/tests/UnitTests/FancyZones.Spec.cpp index 2f3326dfdb7..8d0dfcdcab9 100644 --- a/src/modules/fancyzones/tests/UnitTests/FancyZones.Spec.cpp +++ b/src/modules/fancyzones/tests/UnitTests/FancyZones.Spec.cpp @@ -5,7 +5,6 @@ #include #include #include -#include "lib/Generated Files/resource.h" #include "util.h" diff --git a/src/modules/fancyzones/tests/UnitTests/FancyZonesSettings.Spec.cpp b/src/modules/fancyzones/tests/UnitTests/FancyZonesSettings.Spec.cpp index f1adaeff085..c748e0e0923 100644 --- a/src/modules/fancyzones/tests/UnitTests/FancyZonesSettings.Spec.cpp +++ b/src/modules/fancyzones/tests/UnitTests/FancyZonesSettings.Spec.cpp @@ -5,7 +5,6 @@ #include #include #include -#include "lib/Generated Files/resource.h" using namespace Microsoft::VisualStudio::CppUnitTestFramework; From c0a26c6e702a7949f3e17411986fa742800d4f62 Mon Sep 17 00:00:00 2001 From: Arjun Date: Thu, 20 Aug 2020 16:37:22 -0700 Subject: [PATCH 27/35] Migrated resources for ImageResizer and modified script to add language specific code --- .../ColorPicker/ColorPicker.base.rc | 4 +- .../ColorPicker/ColorPicker.vcxproj | 2 +- .../ColorPicker/ColorPicker.vcxproj.filters | 21 +-- .../imageresizer/dll/ContextMenuHandler.h | 2 +- .../imageresizer/dll/ImageResizerExt.base.rc | 85 +++++++++++ .../imageresizer/dll/ImageResizerExt.cpp | 2 +- .../imageresizer/dll/ImageResizerExt.rc | Bin 41724 -> 0 bytes .../imageresizer/dll/ImageResizerExt.vcxproj | 142 ++++-------------- .../dll/ImageResizerExt.vcxproj.filters | 85 ++++++++++- .../imageresizer/dll/Resources.ar.resx | 138 +++++++++++++++++ .../imageresizer/dll/Resources.bg.resx | 138 +++++++++++++++++ .../imageresizer/dll/Resources.ca.resx | 138 +++++++++++++++++ .../imageresizer/dll/Resources.cs.resx | 138 +++++++++++++++++ .../imageresizer/dll/Resources.de.resx | 138 +++++++++++++++++ .../imageresizer/dll/Resources.es.resx | 138 +++++++++++++++++ .../imageresizer/dll/Resources.eu-ES.resx | 138 +++++++++++++++++ .../imageresizer/dll/Resources.fr.resx | 138 +++++++++++++++++ .../imageresizer/dll/Resources.he.resx | 138 +++++++++++++++++ .../imageresizer/dll/Resources.hu.resx | 138 +++++++++++++++++ .../imageresizer/dll/Resources.it.resx | 138 +++++++++++++++++ .../imageresizer/dll/Resources.nb-NO.resx | 138 +++++++++++++++++ .../imageresizer/dll/Resources.nl.resx | 138 +++++++++++++++++ .../imageresizer/dll/Resources.pl.resx | 138 +++++++++++++++++ .../imageresizer/dll/Resources.pt-BR.resx | 138 +++++++++++++++++ src/modules/imageresizer/dll/Resources.resx | 138 +++++++++++++++++ .../imageresizer/dll/Resources.ro.resx | 138 +++++++++++++++++ .../imageresizer/dll/Resources.ru.resx | 138 +++++++++++++++++ .../imageresizer/dll/Resources.sk.resx | 138 +++++++++++++++++ .../imageresizer/dll/Resources.tr.resx | 138 +++++++++++++++++ .../imageresizer/dll/Resources.zh-Hans.resx | 138 +++++++++++++++++ src/modules/imageresizer/dll/dllmain.cpp | 2 +- src/modules/imageresizer/dll/pch.h | 2 +- src/modules/imageresizer/dll/resource.base.h | 14 ++ src/modules/imageresizer/dll/resource.h | 24 --- .../dll/KeyboardManager.base.rc | 4 +- .../dll/KeyboardManager.vcxproj | 2 +- .../dll/KeyboardManager.vcxproj.filters | 23 +-- .../Microsoft.Launcher.base.rc | Bin 2136 -> 2110 bytes .../Microsoft.Launcher.vcxproj | 2 +- .../Microsoft.Launcher.vcxproj.filters | 19 +-- tools/build/convert-resx-to-rc.ps1 | 44 +++++- 41 files changed, 3190 insertions(+), 187 deletions(-) create mode 100644 src/modules/imageresizer/dll/ImageResizerExt.base.rc delete mode 100644 src/modules/imageresizer/dll/ImageResizerExt.rc create mode 100644 src/modules/imageresizer/dll/Resources.ar.resx create mode 100644 src/modules/imageresizer/dll/Resources.bg.resx create mode 100644 src/modules/imageresizer/dll/Resources.ca.resx create mode 100644 src/modules/imageresizer/dll/Resources.cs.resx create mode 100644 src/modules/imageresizer/dll/Resources.de.resx create mode 100644 src/modules/imageresizer/dll/Resources.es.resx create mode 100644 src/modules/imageresizer/dll/Resources.eu-ES.resx create mode 100644 src/modules/imageresizer/dll/Resources.fr.resx create mode 100644 src/modules/imageresizer/dll/Resources.he.resx create mode 100644 src/modules/imageresizer/dll/Resources.hu.resx create mode 100644 src/modules/imageresizer/dll/Resources.it.resx create mode 100644 src/modules/imageresizer/dll/Resources.nb-NO.resx create mode 100644 src/modules/imageresizer/dll/Resources.nl.resx create mode 100644 src/modules/imageresizer/dll/Resources.pl.resx create mode 100644 src/modules/imageresizer/dll/Resources.pt-BR.resx create mode 100644 src/modules/imageresizer/dll/Resources.resx create mode 100644 src/modules/imageresizer/dll/Resources.ro.resx create mode 100644 src/modules/imageresizer/dll/Resources.ru.resx create mode 100644 src/modules/imageresizer/dll/Resources.sk.resx create mode 100644 src/modules/imageresizer/dll/Resources.tr.resx create mode 100644 src/modules/imageresizer/dll/Resources.zh-Hans.resx create mode 100644 src/modules/imageresizer/dll/resource.base.h delete mode 100644 src/modules/imageresizer/dll/resource.h diff --git a/src/modules/colorPicker/ColorPicker/ColorPicker.base.rc b/src/modules/colorPicker/ColorPicker/ColorPicker.base.rc index 8e7ad5d024d..5bbc01965cd 100644 --- a/src/modules/colorPicker/ColorPicker/ColorPicker.base.rc +++ b/src/modules/colorPicker/ColorPicker/ColorPicker.base.rc @@ -1,6 +1,6 @@ #include -#include "Generated Files/resource.h" -#include "../../../common/version.h" +#include "resource.h" +#include "../../../../common/version.h" 1 VERSIONINFO FILEVERSION FILE_VERSION diff --git a/src/modules/colorPicker/ColorPicker/ColorPicker.vcxproj b/src/modules/colorPicker/ColorPicker/ColorPicker.vcxproj index 402b9e0bb19..4f0c2f7fb35 100644 --- a/src/modules/colorPicker/ColorPicker/ColorPicker.vcxproj +++ b/src/modules/colorPicker/ColorPicker/ColorPicker.vcxproj @@ -128,7 +128,7 @@ - + diff --git a/src/modules/colorPicker/ColorPicker/ColorPicker.vcxproj.filters b/src/modules/colorPicker/ColorPicker/ColorPicker.vcxproj.filters index 393da5e4567..6bb6e599f5d 100644 --- a/src/modules/colorPicker/ColorPicker/ColorPicker.vcxproj.filters +++ b/src/modules/colorPicker/ColorPicker/ColorPicker.vcxproj.filters @@ -13,6 +13,9 @@ {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + {875a08c6-f610-4667-bd0f-80171ed96072} + @@ -22,10 +25,7 @@ Source Files - Header Files - - - Header Files + Generated Files @@ -44,15 +44,16 @@ Resource Files + + Header Files + + + Resource Files + - Resource Files + Generated Files - - - Resource Files - - \ No newline at end of file diff --git a/src/modules/imageresizer/dll/ContextMenuHandler.h b/src/modules/imageresizer/dll/ContextMenuHandler.h index 256d48a4114..f2cbb83928d 100644 --- a/src/modules/imageresizer/dll/ContextMenuHandler.h +++ b/src/modules/imageresizer/dll/ContextMenuHandler.h @@ -3,7 +3,7 @@ #define ID_RESIZE_PICTURES 0 #define RESIZE_PICTURES_VERBW L"resize" #include "pch.h" -#include "resource.h" +#include "Generated Files/resource.h" #include "ImageResizerExt_i.h" #if defined(_WIN32_WCE) && !defined(_CE_DCOM) && !defined(_CE_ALLOW_SINGLE_THREADED_OBJECTS_IN_MTA) diff --git a/src/modules/imageresizer/dll/ImageResizerExt.base.rc b/src/modules/imageresizer/dll/ImageResizerExt.base.rc new file mode 100644 index 00000000000..a71939136c4 --- /dev/null +++ b/src/modules/imageresizer/dll/ImageResizerExt.base.rc @@ -0,0 +1,85 @@ +// Microsoft Visual C++ generated resource script. +// +#include "resource.h" +#include "../../../../common/version.h" + +#define APSTUDIO_READONLY_SYMBOLS +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 2 resource. +// +#ifndef APSTUDIO_INVOKED +#include "../targetver.h" +#endif +#include "winres.h" +#include "verrsrc.h" + +///////////////////////////////////////////////////////////////////////////// +#undef APSTUDIO_READONLY_SYMBOLS + +/////////////////////////////////////////////////////////////////////////// +// +// Version +// + +VS_VERSION_INFO VERSIONINFO + FILEVERSION FILE_VERSION + PRODUCTVERSION PRODUCT_VERSION + FILEFLAGSMASK 0x3fL +#ifdef _DEBUG + FILEFLAGS 0x1L +#else + FILEFLAGS 0x0L +#endif + FILEOS 0x40004L + FILETYPE 0x2L + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904b0" + BEGIN + VALUE "CompanyName", COMPANY_NAME + VALUE "FileDescription", "ImageResizer PowerToy" + VALUE "FileVersion", FILE_VERSION_STRING + VALUE "InternalName", "ImageResizerExt.dll" + VALUE "LegalCopyright", COPYRIGHT_NOTE + VALUE "OriginalFilename", "ImageResizerExt.dll" + VALUE "ProductName", "ImageResizerExt PowerToy" + VALUE "ProductVersion", PRODUCT_VERSION_STRING + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1200 + END +END + +///////////////////////////////////////////////////////////////////////////// +// +// REGISTRY +// + +IDR_IMAGERESIZEREXT REGISTRY "ImageResizerExt.rgs" + +IDR_CONTEXTMENUHANDLER REGISTRY "ContextMenuHandler.rgs" + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// +1 TYPELIB "ImageResizerExt.tlb" + +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + +///////////////////////////////////////////////////////////////////////////// + +// +// Icon +// + +// Icon with lowest ID value placed first to ensure application icon +// remains consistent on all systems. +IDI_RESIZE_PICTURES ICON "..\ui\Resources\ImageResizer.ico" diff --git a/src/modules/imageresizer/dll/ImageResizerExt.cpp b/src/modules/imageresizer/dll/ImageResizerExt.cpp index 2999fd4876b..848fce8e6c4 100644 --- a/src/modules/imageresizer/dll/ImageResizerExt.cpp +++ b/src/modules/imageresizer/dll/ImageResizerExt.cpp @@ -1,5 +1,5 @@ #include "pch.h" -#include "resource.h" +#include "Generated Files/resource.h" #include "ImageResizerExt_i.h" #include "dllmain.h" diff --git a/src/modules/imageresizer/dll/ImageResizerExt.rc b/src/modules/imageresizer/dll/ImageResizerExt.rc deleted file mode 100644 index 2af0b8d0136cd7af0ff378a677383b9fb3071c18..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 41724 zcmeHQ&2J+~6|a$OA67zKkvPy~gk}boWHLL;&aBwc#Q%jZ z^}lat)Qs}fiaJ!gs;f>_58r)tj%S;A)>9X%t&Z_;Ui}0gPaUW|b%Jjf&(Cq~;8_<} z#=F4XF77@2V`_)$3}L3#chozeGNZ3|@$>|5j}f|~!%mIFpH{EbRAlIBq&S1G|GNv? zukkrW$}{Q{q}l}shx)&t7P+{qY3^$t$mg6|S54JY8>*t}YE5mchN|Le1^26JS-rrM zCVp2`8BdmRFL_~p^7j$$vJCzSeN^uCCW56QF=>Au@YIU=V(t|-MY^EHR#veU7d#xYHdF<{-?T54X=YS zM_Zd|A8a9Pt$tW3v;5U6IU;v=(Pze$v`yR1e=eC@%9~gHUfRO2BnR8U zA)a>BgOK*w(`9AKiy=Mr!$7a^sQc*Q3uy1Aw>Qx?H_-3r(LT4)LYMJjy1&K8i;USq z8V&TWZNysyZx1xpWjtNQ(+yl}x(CS<6OMhMiqKW{F4AryTp83%oNfJX1HG_;C(D<) z$Y*<$HaU1@j?U4m*yj$AzZUxR4(e-9=S4!YW+-zTTH4fbH>XRXsza4gHZ}c*;k^E* zj(TZc)>mDkD0!qmIr$MD%0;LGr^j1=o=%WW<1JWwHi9;!FEcKgUT%q`nY3m>+inl1}U z=qB>da$MJMh*=(5&J?)t)N@@A9Z335kvi*!vi=w!57*B$dY@e4q=%kz3hEwe>;hqq zaL4{8JQ~SL9!>2|Tl2|sB%-o3C0B;aCipnV$D~LecR}w&^FVZN<3Gm}J$%ea!$&U4 zd!iTPdSgm68K0B`;iW4%U@4FC&k}BHnZc5j61}RftEe}Fj7Dk^u?^Y@HTIqB%S5J< z&kyr0-+XdNuE-&;tO@qjU9`W^@lp2p!x5?t{!nTXtsM5Gi#;zPH@|=9L`x`7k7hY$ zIf8ucL1tYajmD?%p>1+B9!|$$6g9eGEOi)la~O4%WX!jGpClAo)cW87MjRY-n~~G7 zww^T_En+mjYJo;3Tn!^b%3^9j4wceHr6u(>wC6oNvVRL4dX4{VEu6)BgL{s#!!ct} zn;F%*f|`;I6>1h7_lHw+2;~qeO)bh^YC5F4UJ3a6(mKYz90T`qp)svvj%3LKqt^AD ze;wmRr!%EJUq_vWbGnr~)TmE^Nc_){jfa0bxVG`^KbXr3M~yfbWlxJMBp3L$)vqJy zI<#_Vl_px*NY3j?=`>@DHYG@qCavUY3wNA}=ej60sl4b@4PelU1y-4G)T5j>mBsoJ z*K9aP{~A|+6@_@kl?z!p;p)U;1aibdtT@!TZbEC0D7p@@9Ac%3Shg}Wxx7w0=A@xk z6S~zY)*0G*ZifAc28NeoVE1UJGCbY0MSO(1@yqo(=ckYiG&z@R@Zbj>-XLrn6 z)E@pD-RdoLD?a<=2C&MWmeH=l^*M)94yDpWDI1xYHqInZf6@@DtZj<&wNh1v9aY0Z zvnpdnYZ+nPN|mwEN#Azw2ZfId?-!oo_hI3K!q0L4ap6h9Qy=0#pOx|NBYeY=BaU8W zOQ{SVJXJ2t7e0)j>hQ|pRhoEZFF})|O4>0e4Ye9TE!v*uXD)C9Yf)EQ`Za)9O?=!; zU=}lh-|J)4N5BZ85|LsMxtQ8`+%R{u6@c)Ct zW6+z!yKua8$mNhLP2{qZqG@AK^7JPSwdOGo$QA2je7QH`w&w%qp*giIP|Jkl&L?LL zn7)n`wW8#q-EjU`*09d?9;Mz5%nQb)$aSpWU2-*&}9B!qFTXu3ZIj*D~bJB2& zJJq{=>xg^VdaXW9a;}^taB29 z7jd+zASLcHW!fInjz`mBl*6brG0H|}rj0Yn)1NeiYGVJ4u?@_J9XofZ+w8S!!asnq z40M+4x2IVVKWG>DR%=v5k~FodFltVta{epCqr`3audtJ!$?+uZn3INA3;pqMKKxWH zKu?;p(5M)W9#Nd9irc~}<1fzmzVc@R>G>}`#2QDFxasWK=~FA2HzSex&g;^khb>#L zOEyw8ZRAOw{-j}6y}x#q7n_SZ)~;+&%Y<8YHW!(A_iF$V!ggO74a<0~yScqrwzNFG zUgh>(Ih?u;?aEGaCP$LAV@?`URj~SSo)aH{^i^H4(5)(1(`q@*3iGCEuT{;#`{xcc zCVE^YQgQU&>w5$xKG8NeIG3|9jdM*D0E zhS)}`%}dY2Jey))+ZWiLWRSeYq#ctjk~HK>Z|q@bJji=#!Lz9C@Q|KPE8IVO_!%Bs z>S5m&BRJRcC?O3~KjTh72%a^uh57HT5mcSRISRz%;29)Sy2Xc`Krw|hqS7H|8&BQQ zVZvw;_fPcfe6N23#W*TqDTJM35uHXGeBfMlkGd~43}Ulkd`eiJ?);CEPdflt~`H-Hb*Q&o@*n| zdF6K#a%&sEv_9ibANu~^#&s1ZTdbi}f^XzGV|oZtN3B(d!uZdJ(>1ZyL1_(I#s>6< z)=1po+wc^G?gFUuoP?&fo1?!750c_D^&X_JIrkzciH$dY?!&F=y!)K`DVY>zFXMCE zO^>F*91n+oI1pZXaxlgkxHM@$29Nwa?#J=DXu;nFdx8n~Xym;)=OY+OD2K~ao(i&t za%RbJB<7#0v4HkK3++1E1kV=;j@83cll~G+l{tB+p6VR!;5V3(A1CZQ4tXnAdhy_? zK`etQ@J%mT##ZKYw8*yhJ~5@ee9R+XD}8$up02ctm@9~9N?puBxtR#Jmk%$BafHC*G=;95Uj z;u@(*jq)G;lw4JZ$#b|4%BMi=3!wjb%o4p`%L!5rYd_;9=+&*rA7e?|9eom%0GlZ9 z?q%sGkto65(L!ppkL#gMsXYw#NXmC3Z`h7zak3a?>0od0x%Kb(p5J7cnnf((POkJJ zXe6fT^)D{@m%Q*SqlU)n@Y90KC|&AsG(G=K_}$f#fumem$tPFB5qtNl?#nz2j#8Og z*CHe|&!^#tp@F(f!VwX{NHd;0w1PfL>uq!k=f2qk9~@2uj}w2Hr(*{%2zA*&da zIP%SkW_&unTwI0p@9Hu40VI*xm0ZTNBaHU`1?lhML`DhI#;7w7GmfjkLL2W;CfxHr z=11>bW@>|>w)Kg!OTa>R*5hhm94II;e!rHW7xhi{_m0Lko?a+>#CX=$fAN$!Waa|G z(P%uKAnw^x;=X&H1sHXjqeDQ4fN3J2NK@+b*OR#M<$hK%1OWwSvZ5Q0j&NsY54w63 zet?lU$Kmu8ejhks&bFZ3$^-K8EZMS!EeTIYX&@|TWjXT~b*gb#IHDhS1H9BT(Z)}e z)Mvc%%`&vqrCjr-@r7AL%04i2jxXnCu8)G${_JSUjx%Qy>1-lz!zPk*{mEr+ma-)t zEs>QXiQ>i1DztD1&#BP*dfGZ#Fwg&=2h5|dk6&6~UKyCxL`dRYn9q884Ou`KdJJw& zkdE%x)ZkhpEkWAQs5n0>A$a9?a7~LlB)GC*)_}s-AmeLwq)kgnvr6;^VWmzj%@Mm$G%4=ZuEZ_&R946>PJG~p-}pNDE(4$Iy_IfmJ2#@D#ME`C+~vgoNl z7ynxPOY!fx`?B~=@gMm26~5mT!}Xvzh$R%hKx)x+JoUHY7sY=@&~v!ta4Ah(vXPVV z<#1Lp1d&AUXGJ$29pR3pc2pcvhns|!j++8%{x>=nQ?zf4H{({^MF4p zJuTfU&6FOLJoV$!PfPEXeo?C8{$8n4dcU+-nk`))m#(Jasak0Pe1y|-nB*`iO-!

w$+JBz;ZClQ6nfr=)?a21bqC0{kAK`1#WQbd85X_EmU}X( zr463pJRMkn3EzEbyZ4fO3a|FL%rYdoi{9^ff^wu!i#hB>;wsbz_9k%uquKqqiMu7} zLzM~9&7~&f>LD+?$l>UYPu76{*7y!#TjGf=W=9(>9vPy7U!DejjJZIzv@<>LxQlz! z5)aY7OxSb8^zfW^A!c^~SJ}>V435bBT|CAI;~-zAmC6bo{X`nRIUCB - - Debug - Win32 - - - Release - Win32 - Debug x64 @@ -19,6 +11,9 @@ x64 + + + {0B43679E-EDFA-4DA0-AD30-F4628B308B1B} 10.0.17134.0 @@ -26,20 +21,6 @@ false - - DynamicLibrary - true - Static - v142 - Unicode - - - DynamicLibrary - false - Static - v142 - Unicode - DynamicLibrary true @@ -59,12 +40,6 @@ - - - - - - @@ -72,63 +47,18 @@ - - true - true - $(SolutionDir)$(Platform)\$(Configuration)\modules\ - true true $(SolutionDir)$(Platform)\$(Configuration)\modules\ImageResizer\ $(SolutionDir)$(Platform)\$(Configuration)\obj\$(ProjectName)\ - - true - false - $(SolutionDir)$(Platform)\$(Configuration)\modules\ - true false $(SolutionDir)$(Platform)\$(Configuration)\modules\ImageResizer\ $(SolutionDir)$(Platform)\$(Configuration)\obj\$(ProjectName)\ - - - Level3 - Disabled - WIN32;_WINDOWS;_DEBUG;_USRDLL;%(PreprocessorDefinitions) - true - MultiThreadedDebug - ..\..\..\common\inc;..\..\..\common\Telemetry;..\..\;..\..\..\;%(AdditionalIncludeDirectories) - stdcpplatest - - - false - Win32 - _DEBUG;%(PreprocessorDefinitions) - ImageResizerExt_i.h - ImageResizerExt_i.c - ImageResizerExt_p.c - true - $(IntDir)ImageResizerExt.tlb - - true - - - 0x0409 - $(IntDir);%(AdditionalIncludeDirectories) - _DEBUG;%(PreprocessorDefinitions) - - - Windows - .\ImageResizerExt.def - true - true - true - - Level3 @@ -163,43 +93,6 @@ true - - - Level3 - MaxSpeed - WIN32;_WINDOWS;NDEBUG;_USRDLL;%(PreprocessorDefinitions) - true - MultiThreaded - ..\..\..\common\inc;..\..\..\common\Telemetry;..\..\;..\..\..\;%(AdditionalIncludeDirectories) - stdcpplatest - - - false - Win32 - NDEBUG;%(PreprocessorDefinitions) - ImageResizerExt_i.h - ImageResizerExt_i.c - ImageResizerExt_p.c - true - $(IntDir)ImageResizerExt.tlb - - true - - - 0x0409 - $(IntDir);%(AdditionalIncludeDirectories) - NDEBUG;%(PreprocessorDefinitions) - - - Windows - .\ImageResizerExt.def - true - true - true - true - true - - Level3 @@ -268,15 +161,17 @@ + - + - + + @@ -295,6 +190,29 @@ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/modules/imageresizer/dll/ImageResizerExt.vcxproj.filters b/src/modules/imageresizer/dll/ImageResizerExt.vcxproj.filters index dc2723e5b80..b33294fc4aa 100644 --- a/src/modules/imageresizer/dll/ImageResizerExt.vcxproj.filters +++ b/src/modules/imageresizer/dll/ImageResizerExt.vcxproj.filters @@ -51,9 +51,6 @@ Header Files - - Header Files - Header Files @@ -72,11 +69,9 @@ Header Files - - - - Resource Files - + + Generated Files + @@ -89,6 +84,75 @@ Resource Files + + Resource Files + + + Header Files + + + Resource Files + + + Resource Files + + + Resource Files + + + Resource Files + + + Resource Files + + + Resource Files + + + Resource Files + + + Resource Files + + + Resource Files + + + Resource Files + + + Resource Files + + + Resource Files + + + Resource Files + + + Resource Files + + + Resource Files + + + Resource Files + + + Resource Files + + + Resource Files + + + Resource Files + + + Resource Files + + + Resource Files + @@ -100,4 +164,9 @@ Source Files + + + Generated Files + + \ No newline at end of file diff --git a/src/modules/imageresizer/dll/Resources.ar.resx b/src/modules/imageresizer/dll/Resources.ar.resx new file mode 100644 index 00000000000..e115822c219 --- /dev/null +++ b/src/modules/imageresizer/dll/Resources.ar.resx @@ -0,0 +1,138 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + إعادة تحجيم الصور + + + إعادة تحجيم الصور هنا + + + Image Resizer + + + A Windows Shell extension for bulk image resizing. + + + Settings can be accessed from within Image Resizer. + + + Settings header for Image Resizer + + \ No newline at end of file diff --git a/src/modules/imageresizer/dll/Resources.bg.resx b/src/modules/imageresizer/dll/Resources.bg.resx new file mode 100644 index 00000000000..2adc3c3a114 --- /dev/null +++ b/src/modules/imageresizer/dll/Resources.bg.resx @@ -0,0 +1,138 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Преоразмери каратини + + + Преоразмери каратините тук + + + Image Resizer + + + A Windows Shell extension for bulk image resizing. + + + Settings can be accessed from within Image Resizer. + + + Settings header for Image Resizer + + \ No newline at end of file diff --git a/src/modules/imageresizer/dll/Resources.ca.resx b/src/modules/imageresizer/dll/Resources.ca.resx new file mode 100644 index 00000000000..90192b0a59e --- /dev/null +++ b/src/modules/imageresizer/dll/Resources.ca.resx @@ -0,0 +1,138 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Redimensiona les imatges + + + Redimensiona les imatges aquí + + + Image Resizer + + + A Windows Shell extension for bulk image resizing. + + + Settings can be accessed from within Image Resizer. + + + Settings header for Image Resizer + + \ No newline at end of file diff --git a/src/modules/imageresizer/dll/Resources.cs.resx b/src/modules/imageresizer/dll/Resources.cs.resx new file mode 100644 index 00000000000..9cd32977a82 --- /dev/null +++ b/src/modules/imageresizer/dll/Resources.cs.resx @@ -0,0 +1,138 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Změnit velikost + + + Změnit velikost zde + + + Image Resizer + + + A Windows Shell extension for bulk image resizing. + + + Settings can be accessed from within Image Resizer. + + + Settings header for Image Resizer + + \ No newline at end of file diff --git a/src/modules/imageresizer/dll/Resources.de.resx b/src/modules/imageresizer/dll/Resources.de.resx new file mode 100644 index 00000000000..dd97c5cfab8 --- /dev/null +++ b/src/modules/imageresizer/dll/Resources.de.resx @@ -0,0 +1,138 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Bilder neu skalieren + + + Bilder hier neu skalieren + + + Image Resizer + + + A Windows Shell extension for bulk image resizing. + + + Settings can be accessed from within Image Resizer. + + + Settings header for Image Resizer + + \ No newline at end of file diff --git a/src/modules/imageresizer/dll/Resources.es.resx b/src/modules/imageresizer/dll/Resources.es.resx new file mode 100644 index 00000000000..d0641c34820 --- /dev/null +++ b/src/modules/imageresizer/dll/Resources.es.resx @@ -0,0 +1,138 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Redimensionar imágenes + + + Redimensionar imágenes aquí + + + Image Resizer + + + A Windows Shell extension for bulk image resizing. + + + Settings can be accessed from within Image Resizer. + + + Settings header for Image Resizer + + \ No newline at end of file diff --git a/src/modules/imageresizer/dll/Resources.eu-ES.resx b/src/modules/imageresizer/dll/Resources.eu-ES.resx new file mode 100644 index 00000000000..a2dee4b30d5 --- /dev/null +++ b/src/modules/imageresizer/dll/Resources.eu-ES.resx @@ -0,0 +1,138 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Tamainaz aldatu + + + Tamainaz aldatu hemen + + + Image Resizer + + + A Windows Shell extension for bulk image resizing. + + + Settings can be accessed from within Image Resizer. + + + Settings header for Image Resizer + + \ No newline at end of file diff --git a/src/modules/imageresizer/dll/Resources.fr.resx b/src/modules/imageresizer/dll/Resources.fr.resx new file mode 100644 index 00000000000..bac44f6a3b0 --- /dev/null +++ b/src/modules/imageresizer/dll/Resources.fr.resx @@ -0,0 +1,138 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Redimensionner des images + + + Redimensionner des images ici + + + Image Resizer + + + A Windows Shell extension for bulk image resizing. + + + Settings can be accessed from within Image Resizer. + + + Settings header for Image Resizer + + \ No newline at end of file diff --git a/src/modules/imageresizer/dll/Resources.he.resx b/src/modules/imageresizer/dll/Resources.he.resx new file mode 100644 index 00000000000..1acb7263061 --- /dev/null +++ b/src/modules/imageresizer/dll/Resources.he.resx @@ -0,0 +1,138 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + שנה גודל התמונות + + + שנה את גודל התמונות כאן + + + Image Resizer + + + A Windows Shell extension for bulk image resizing. + + + Settings can be accessed from within Image Resizer. + + + Settings header for Image Resizer + + \ No newline at end of file diff --git a/src/modules/imageresizer/dll/Resources.hu.resx b/src/modules/imageresizer/dll/Resources.hu.resx new file mode 100644 index 00000000000..b8cf0205c66 --- /dev/null +++ b/src/modules/imageresizer/dll/Resources.hu.resx @@ -0,0 +1,138 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Képek átméretezése + + + Képek átméretezése itt + + + Image Resizer + + + A Windows Shell extension for bulk image resizing. + + + Settings can be accessed from within Image Resizer. + + + Settings header for Image Resizer + + \ No newline at end of file diff --git a/src/modules/imageresizer/dll/Resources.it.resx b/src/modules/imageresizer/dll/Resources.it.resx new file mode 100644 index 00000000000..8d3b455da0f --- /dev/null +++ b/src/modules/imageresizer/dll/Resources.it.resx @@ -0,0 +1,138 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Ridimensiona immagini + + + Ridimensiona immagini qui + + + Image Resizer + + + A Windows Shell extension for bulk image resizing. + + + Settings can be accessed from within Image Resizer. + + + Settings header for Image Resizer + + \ No newline at end of file diff --git a/src/modules/imageresizer/dll/Resources.nb-NO.resx b/src/modules/imageresizer/dll/Resources.nb-NO.resx new file mode 100644 index 00000000000..60a89be2890 --- /dev/null +++ b/src/modules/imageresizer/dll/Resources.nb-NO.resx @@ -0,0 +1,138 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Endre bildestørrelse + + + Endre bildestørrelsen her + + + Image Resizer + + + A Windows Shell extension for bulk image resizing. + + + Settings can be accessed from within Image Resizer. + + + Settings header for Image Resizer + + \ No newline at end of file diff --git a/src/modules/imageresizer/dll/Resources.nl.resx b/src/modules/imageresizer/dll/Resources.nl.resx new file mode 100644 index 00000000000..024697743ac --- /dev/null +++ b/src/modules/imageresizer/dll/Resources.nl.resx @@ -0,0 +1,138 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Afbeeldingsformaat wijzigen + + + Wijzig het afbeeldingsformaat hier + + + Image Resizer + + + A Windows Shell extension for bulk image resizing. + + + Settings can be accessed from within Image Resizer. + + + Settings header for Image Resizer + + \ No newline at end of file diff --git a/src/modules/imageresizer/dll/Resources.pl.resx b/src/modules/imageresizer/dll/Resources.pl.resx new file mode 100644 index 00000000000..87b874d1592 --- /dev/null +++ b/src/modules/imageresizer/dll/Resources.pl.resx @@ -0,0 +1,138 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Zmień rozmiar obrazów + + + Zmień rozmiar obrazów tutaj + + + Image Resizer + + + A Windows Shell extension for bulk image resizing. + + + Settings can be accessed from within Image Resizer. + + + Settings header for Image Resizer + + \ No newline at end of file diff --git a/src/modules/imageresizer/dll/Resources.pt-BR.resx b/src/modules/imageresizer/dll/Resources.pt-BR.resx new file mode 100644 index 00000000000..7f455293106 --- /dev/null +++ b/src/modules/imageresizer/dll/Resources.pt-BR.resx @@ -0,0 +1,138 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Redimensionar imagens + + + Redimensionar imagens aqui + + + Image Resizer + + + A Windows Shell extension for bulk image resizing. + + + Settings can be accessed from within Image Resizer. + + + Settings header for Image Resizer + + \ No newline at end of file diff --git a/src/modules/imageresizer/dll/Resources.resx b/src/modules/imageresizer/dll/Resources.resx new file mode 100644 index 00000000000..15dd06dd60f --- /dev/null +++ b/src/modules/imageresizer/dll/Resources.resx @@ -0,0 +1,138 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Resize pictures + + + Resize pictures here + + + Image Resizer + + + A Windows Shell extension for bulk image resizing. + + + Settings can be accessed from within Image Resizer. + + + Settings header for Image Resizer + + \ No newline at end of file diff --git a/src/modules/imageresizer/dll/Resources.ro.resx b/src/modules/imageresizer/dll/Resources.ro.resx new file mode 100644 index 00000000000..12ffc70500b --- /dev/null +++ b/src/modules/imageresizer/dll/Resources.ro.resx @@ -0,0 +1,138 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Redimensionare imagini + + + Redimensionare imagini aici + + + Image Resizer + + + A Windows Shell extension for bulk image resizing. + + + Settings can be accessed from within Image Resizer. + + + Settings header for Image Resizer + + \ No newline at end of file diff --git a/src/modules/imageresizer/dll/Resources.ru.resx b/src/modules/imageresizer/dll/Resources.ru.resx new file mode 100644 index 00000000000..b838ca9a16c --- /dev/null +++ b/src/modules/imageresizer/dll/Resources.ru.resx @@ -0,0 +1,138 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Изменение размеров изображений + + + Изменить размеры здесь + + + Image Resizer + + + A Windows Shell extension for bulk image resizing. + + + Settings can be accessed from within Image Resizer. + + + Settings header for Image Resizer + + \ No newline at end of file diff --git a/src/modules/imageresizer/dll/Resources.sk.resx b/src/modules/imageresizer/dll/Resources.sk.resx new file mode 100644 index 00000000000..16d983620dc --- /dev/null +++ b/src/modules/imageresizer/dll/Resources.sk.resx @@ -0,0 +1,138 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Zmeň veľkosť obrázkov + + + Zmeň veľkosť obrázkov tu + + + Image Resizer + + + A Windows Shell extension for bulk image resizing. + + + Settings can be accessed from within Image Resizer. + + + Settings header for Image Resizer + + \ No newline at end of file diff --git a/src/modules/imageresizer/dll/Resources.tr.resx b/src/modules/imageresizer/dll/Resources.tr.resx new file mode 100644 index 00000000000..70b84948193 --- /dev/null +++ b/src/modules/imageresizer/dll/Resources.tr.resx @@ -0,0 +1,138 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Resimleri yeniden boyutlandır + + + Resimleri burada yeniden boyutlandır + + + Image Resizer + + + A Windows Shell extension for bulk image resizing. + + + Settings can be accessed from within Image Resizer. + + + Settings header for Image Resizer + + \ No newline at end of file diff --git a/src/modules/imageresizer/dll/Resources.zh-Hans.resx b/src/modules/imageresizer/dll/Resources.zh-Hans.resx new file mode 100644 index 00000000000..35d2205aac4 --- /dev/null +++ b/src/modules/imageresizer/dll/Resources.zh-Hans.resx @@ -0,0 +1,138 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 重设图片大小 + + + 点此重设图片大小 + + + Image Resizer + + + A Windows Shell extension for bulk image resizing. + + + Settings can be accessed from within Image Resizer. + + + Settings header for Image Resizer + + \ No newline at end of file diff --git a/src/modules/imageresizer/dll/dllmain.cpp b/src/modules/imageresizer/dll/dllmain.cpp index 8d3a7612916..93f30e4a025 100644 --- a/src/modules/imageresizer/dll/dllmain.cpp +++ b/src/modules/imageresizer/dll/dllmain.cpp @@ -1,5 +1,5 @@ #include "pch.h" -#include "resource.h" +#include "Generated Files/resource.h" #include "ImageResizerExt_i.h" #include "dllmain.h" #include diff --git a/src/modules/imageresizer/dll/pch.h b/src/modules/imageresizer/dll/pch.h index 32d2b50dc3c..4fef14e85a2 100644 --- a/src/modules/imageresizer/dll/pch.h +++ b/src/modules/imageresizer/dll/pch.h @@ -10,7 +10,7 @@ #define ATL_NO_ASSERT_ON_DESTROY_NONEXISTENT_WINDOW #include "targetver.h" -#include "resource.h" +#include "Generated Files/resource.h" #include #include diff --git a/src/modules/imageresizer/dll/resource.base.h b/src/modules/imageresizer/dll/resource.base.h new file mode 100644 index 00000000000..8c806391aed --- /dev/null +++ b/src/modules/imageresizer/dll/resource.base.h @@ -0,0 +1,14 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Visual C++ generated include file. +// Used by ImageResizerExt.rc +// + +////////////////////////////// +// Non-localizable + +#define IDR_IMAGERESIZEREXT 1001 +#define IDR_CONTEXTMENUHANDLER 1002 +#define IDI_RESIZE_PICTURES 1003 + +// Non-localizable +////////////////////////////// diff --git a/src/modules/imageresizer/dll/resource.h b/src/modules/imageresizer/dll/resource.h deleted file mode 100644 index f7b26fc9a18..00000000000 --- a/src/modules/imageresizer/dll/resource.h +++ /dev/null @@ -1,24 +0,0 @@ -//{{NO_DEPENDENCIES}} -// Microsoft Visual C++ generated include file. -// Used by ImageResizerExt.rc -// -#define IDS_RESIZE_PICTURES 100 -#define IDS_RESIZE_PICTURES_HERE 101 -#define IDR_IMAGERESIZEREXT 102 -#define IDR_CONTEXTMENUHANDLER 104 -#define IDI_RESIZE_PICTURES 105 -#define IDS_IMAGERESIZER 106 -#define IDS_SETTINGS_DESCRIPTION 107 -#define IDS_SETTINGS_HEADER 108 -#define IDS_SETTINGS_HEADER_DESCRIPTION 109 - -// Next default values for new objects -// -#ifdef APSTUDIO_INVOKED -#ifndef APSTUDIO_READONLY_SYMBOLS -#define _APS_NEXT_RESOURCE_VALUE 201 -#define _APS_NEXT_COMMAND_VALUE 32768 -#define _APS_NEXT_CONTROL_VALUE 201 -#define _APS_NEXT_SYMED_VALUE 103 -#endif -#endif diff --git a/src/modules/keyboardmanager/dll/KeyboardManager.base.rc b/src/modules/keyboardmanager/dll/KeyboardManager.base.rc index e1afd78aced..51a94ad0cc4 100644 --- a/src/modules/keyboardmanager/dll/KeyboardManager.base.rc +++ b/src/modules/keyboardmanager/dll/KeyboardManager.base.rc @@ -1,6 +1,6 @@ #include -#include "Generated Files/resource.h" -#include "../../../common/version.h" +#include "resource.h" +#include "../../../../common/version.h" IDS_KEYBOARDMANAGER_ICON ICON L"Keyboard.ico" diff --git a/src/modules/keyboardmanager/dll/KeyboardManager.vcxproj b/src/modules/keyboardmanager/dll/KeyboardManager.vcxproj index 1483bcf3059..3209148e07b 100644 --- a/src/modules/keyboardmanager/dll/KeyboardManager.vcxproj +++ b/src/modules/keyboardmanager/dll/KeyboardManager.vcxproj @@ -151,7 +151,7 @@ - + diff --git a/src/modules/keyboardmanager/dll/KeyboardManager.vcxproj.filters b/src/modules/keyboardmanager/dll/KeyboardManager.vcxproj.filters index 2f8f657d9d2..9e0e3cc4009 100644 --- a/src/modules/keyboardmanager/dll/KeyboardManager.vcxproj.filters +++ b/src/modules/keyboardmanager/dll/KeyboardManager.vcxproj.filters @@ -21,12 +21,12 @@ Header Files - - Header Files - Header Files + + Generated Files + @@ -41,17 +41,15 @@ {92a52637-acd2-441f-822d-430b726eade6} rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + {6581121b-1555-4598-8034-ab196538f593} + Resource Files - - - Resource Files - - @@ -60,10 +58,13 @@ Header Files + + Resource Files + - - Resource Files - + + Generated Files + \ No newline at end of file diff --git a/src/modules/launcher/Microsoft.Launcher/Microsoft.Launcher.base.rc b/src/modules/launcher/Microsoft.Launcher/Microsoft.Launcher.base.rc index 936a137bcb8d0d18703cefc8f6fe772f150cac7e..7f2e658bfa02d4ad863c844cad373f38d1b0141c 100644 GIT binary patch delta 13 Vcmca1uuouu)5Ii)jdS*}0{|&W1 - + diff --git a/src/modules/launcher/Microsoft.Launcher/Microsoft.Launcher.vcxproj.filters b/src/modules/launcher/Microsoft.Launcher/Microsoft.Launcher.vcxproj.filters index ede04cbf82f..d64a5f3fdf3 100644 --- a/src/modules/launcher/Microsoft.Launcher/Microsoft.Launcher.vcxproj.filters +++ b/src/modules/launcher/Microsoft.Launcher/Microsoft.Launcher.vcxproj.filters @@ -9,7 +9,7 @@ - Header Files + Generated Files @@ -19,11 +19,9 @@ {513da898-667d-48e4-bf15-74cf06f07ee1} - - - - Resource Files - + + {c90b18da-7f8b-4543-89e6-f968a62c7a25} + @@ -33,10 +31,13 @@ Resource Files + + Resource Files + - - Resource Files - + + Generated Files + \ No newline at end of file diff --git a/tools/build/convert-resx-to-rc.ps1 b/tools/build/convert-resx-to-rc.ps1 index 833ff113a8a..86ec3fb8e65 100644 --- a/tools/build/convert-resx-to-rc.ps1 +++ b/tools/build/convert-resx-to-rc.ps1 @@ -37,16 +37,49 @@ if (!(Test-Path -Path $generatedFilesFolder)) New-Item @paramNewItem } +# Hash table to get the language codes from the code used in the file name +$languageHashTable = @{ "en" = @("ENU", "ENGLISH", "ENGLISH_US", "English (United States)"); + "zh-Hans" = @("CHS", "CHINESE", "NEUTRAL", "Chinese (Simplified)"); + "cs" = @("CSY", "CZECH", "NEUTRAL", "Czech"); + "hu" = @("HUN", "HUNGARIAN", "NEUTRAL", "Hungarian"); + "pl" = @("PLK", "POLISH", "NEUTRAL", "Polish"); + "ro" = @("ROM", "ROMANIAN", "NEUTRAL", "Romanian"); + "sk" = @("SKY", "SLOVAK", "NEUTRAL", "Slovak"); + "bg" = @("BGR", "BULGARIAN", "NEUTRAL", "Bulgarian"); + "ru" = @("RUS", "RUSSIAN", "NEUTRAL", "Russian"); + "ca" = @("CAT", "CATALAN", "NEUTRAL", "Catalan"); + "de" = @("DEU", "GERMAN", "NEUTRAL", "German"); + "es" = @("ESN", "SPANISH", "NEUTRAL", "Spanish"); + "fr" = @("FRA", "FRENCH", "NEUTRAL", "French"); + "it" = @("ITA", "ITALIAN", "NEUTRAL", "Italian"); + "nl" = @("NLD", "DUTCH", "NEUTRAL", "Dutch"); + "nb-NO" = @("NOR", "NORWEGIAN", "NORWEGIAN_BOKMAL", "Norwegian Bokmål (Norway)"); + "pt-BR" = @("PTB", "PORTUGUESE", "PORTUGUESE_BRAZILIAN", "Portuguese (Brazil)"); + "eu-ES" = @("EUQ", "BASQUE", "DEFAULT", "Basque (Basque)"); + "tr" = @("TRK", "TURKISH", "NEUTRAL", "Turkish"); + "he" = @("HEB", "HEBREW", "NEUTRAL", "Hebrew"); + "ar" = @("ARA", "ARABIC", "NEUTRAL", "Arabic") + } + + # Iterate over all resx files in parent directory Get-ChildItem $parentDirectory -Filter *.resx | Foreach-Object { # Use resgen to parse resx to txt. More details at https://docs.microsoft.com/en-us/dotnet/framework/tools/resgen-exe-resource-file-generator#converting-between-resource-file-types resgen $_.FullName $tempFile + # Get language code from file name + $lang = "en" + $tokens = $_.Name -split "\." + if ($tokens.Count -eq 3) { + $lang = $tokens[1] + } + $langData = $languageHashTable[$lang] + $newLinesForRCFile = "" $newLinesForHeaderFile = "" $count = 101 - foreach ($line in Get-Content $tempFile) { + foreach ($line in (Get-Content $tempFile -Encoding unicode)) { # Each line of the resgen text file is of the form ResourceName=ResourceValue with no spaces. $content = $line -split "=", 2 @@ -68,9 +101,16 @@ Foreach-Object { # Add string table syntax $newLinesForRCFile = "`r`nSTRINGTABLE`r`nBEGIN" + $newLinesForRCFile + "`r`nEND" + $langStart = "`r`n/////////////////////////////////////////////////////////////////////////////`r`n// " + $langData[3] + " resources`r`n`r`n" + $langStart += "#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_" + $langData[0] + ")`r`nLANGUAGE LANG_" + $langData[1] + ", SUBLANG_" + $langData[2] + "`r`n" + + $langEnd = "`r`n`r`n#endif // " + $langData[3] + " resources`r`n/////////////////////////////////////////////////////////////////////////////`r`n" + + $newLinesForRCFile = $langStart + $newLinesForRCFile + $langEnd + # Initialize the rc file with an auto-generation warning and content from the base rc if (!$rcFileUpdated) { - Set-Content -Path $generatedFilesFolder\$generatedRCFileName -Value ("// This file was auto-generated. Changes to this file may cause incorrect behavior and will be lost if the code is regenerated.`r`n") + Set-Content -Path $generatedFilesFolder\$generatedRCFileName -Value ("// This file was auto-generated. Changes to this file may cause incorrect behavior and will be lost if the code is regenerated.`r`n") -Encoding unicode Add-Content -Path $generatedFilesFolder\$generatedRCFileName -Value (Get-Content $parentDirectory\$baseRCFileName) $rcFileUpdated = $true } From 6f963e2a38e2787cc3d25198619ddf486ca7fe23 Mon Sep 17 00:00:00 2001 From: Arjun Date: Thu, 20 Aug 2020 18:06:08 -0700 Subject: [PATCH 28/35] Added try catch and checks for modification to avoid unnecessary file creation --- .../ColorPicker/ColorPicker.base.rc | 4 + .../dll/KeyboardManager.base.rc | 6 +- .../Microsoft.Launcher.base.rc | Bin 2110 -> 2296 bytes tools/build/convert-resx-to-rc.ps1 | 74 ++++++++++++++++-- 4 files changed, 76 insertions(+), 8 deletions(-) diff --git a/src/modules/colorPicker/ColorPicker/ColorPicker.base.rc b/src/modules/colorPicker/ColorPicker/ColorPicker.base.rc index 5bbc01965cd..b22c9c2e804 100644 --- a/src/modules/colorPicker/ColorPicker/ColorPicker.base.rc +++ b/src/modules/colorPicker/ColorPicker/ColorPicker.base.rc @@ -2,6 +2,10 @@ #include "resource.h" #include "../../../../common/version.h" +#define APSTUDIO_READONLY_SYMBOLS +#include "winres.h" +#undef APSTUDIO_READONLY_SYMBOLS + 1 VERSIONINFO FILEVERSION FILE_VERSION PRODUCTVERSION PRODUCT_VERSION diff --git a/src/modules/keyboardmanager/dll/KeyboardManager.base.rc b/src/modules/keyboardmanager/dll/KeyboardManager.base.rc index 51a94ad0cc4..49cd57cb989 100644 --- a/src/modules/keyboardmanager/dll/KeyboardManager.base.rc +++ b/src/modules/keyboardmanager/dll/KeyboardManager.base.rc @@ -2,7 +2,11 @@ #include "resource.h" #include "../../../../common/version.h" -IDS_KEYBOARDMANAGER_ICON ICON L"Keyboard.ico" +#define APSTUDIO_READONLY_SYMBOLS +#include "winres.h" +#undef APSTUDIO_READONLY_SYMBOLS + +IDS_KEYBOARDMANAGER_ICON ICON L"../Keyboard.ico" 1 VERSIONINFO FILEVERSION FILE_VERSION diff --git a/src/modules/launcher/Microsoft.Launcher/Microsoft.Launcher.base.rc b/src/modules/launcher/Microsoft.Launcher/Microsoft.Launcher.base.rc index 7f2e658bfa02d4ad863c844cad373f38d1b0141c..05aac10d07aef96249e72f80c8cd12bd9a2f989e 100644 GIT binary patch delta 197 zcmdld@I!FIs(J+mUIs2OR%S?HNM%T4$YjU^(h3ZY3;_(m3?U4m3@!|w4E_x93_%R8 zKv5SU+mFGAArdGO3?zLSoPZ)eKsLxEWw8Eah8%`cuz3m$N(|*-u_B Date: Thu, 20 Aug 2020 18:14:49 -0700 Subject: [PATCH 29/35] Changed tab insertion to 4 spaces to avoid mixed file types in rc file --- tools/build/convert-resx-to-rc.ps1 | 69 ++++++++++++++---------------- 1 file changed, 32 insertions(+), 37 deletions(-) diff --git a/tools/build/convert-resx-to-rc.ps1 b/tools/build/convert-resx-to-rc.ps1 index f363448501b..4b4ad196d6a 100644 --- a/tools/build/convert-resx-to-rc.ps1 +++ b/tools/build/convert-resx-to-rc.ps1 @@ -87,21 +87,28 @@ Foreach-Object { $newLinesForRCFile = "" $newLinesForHeaderFile = "" $count = 101 - foreach ($line in (Get-Content $tempFile -Encoding unicode)) { - # Each line of the resgen text file is of the form ResourceName=ResourceValue with no spaces. - $content = $line -split "=", 2 - - # Each resource is named as IDS_ResxResourceName, in uppercase - $lineInRCFormat = "IDS_" + $content[0].ToUpper() + " L`"" + $content[1] + "`"" - $newLinesForRCFile = $newLinesForRCFile + "`r`n`t" + $lineInRCFormat - - # Resource header file needs to be updated only for one language - if (!$headerFileUpdated) { - $lineInHeaderFormat = "#define IDS_" + $content[0].ToUpper() + " " + $count.ToString() - $newLinesForHeaderFile = $newLinesForHeaderFile + "`r`n" + $lineInHeaderFormat - $count++ + + try { + foreach ($line in (Get-Content $tempFile -Encoding unicode)) { + # Each line of the resgen text file is of the form ResourceName=ResourceValue with no spaces. + $content = $line -split "=", 2 + + # Each resource is named as IDS_ResxResourceName, in uppercase + $lineInRCFormat = "IDS_" + $content[0].ToUpper() + " L`"" + $content[1] + "`"" + $newLinesForRCFile = $newLinesForRCFile + "`r`n " + $lineInRCFormat + + # Resource header file needs to be updated only for one language + if (!$headerFileUpdated) { + $lineInHeaderFormat = "#define IDS_" + $content[0].ToUpper() + " " + $count.ToString() + $newLinesForHeaderFile = $newLinesForHeaderFile + "`r`n" + $lineInHeaderFormat + $count++ + } } } + catch { + echo "Failed to read temporary file." + exit 0 + } # Delete temporary text file used by resgen Remove-Item $tempFile @@ -119,12 +126,10 @@ Foreach-Object { # Initialize the rc file with an auto-generation warning and content from the base rc if (!$rcFileUpdated) { $rcFileContent = "// This file was auto-generated. Changes to this file may cause incorrect behavior and will be lost if the code is regenerated.`r`n" - try - { + try { $rcFileContent += (Get-Content $parentDirectory\$baseRCFileName -Raw) } - catch - { + catch { echo "Failed to read base rc file." exit 0 } @@ -137,12 +142,10 @@ Foreach-Object { # Resource header file needs to be set only once, with an auto-generation warning, content from the base resource header followed by #define for all the resources if (!$headerFileUpdated) { $headerFileContent = "// This file was auto-generated. Changes to this file may cause incorrect behavior and will be lost if the code is regenerated.`r`n" - try - { + try { $headerFileContent += (Get-Content $parentDirectory\$baseHeaderFileName -Raw) } - catch - { + catch { echo "Failed to read base header file." exit 0 } @@ -152,37 +155,29 @@ Foreach-Object { } # Write to header file if the content has changed or if the file doesnt exist -try -{ - if (!(Test-Path -Path $generatedFilesFolder\$generatedHeaderFileName) -or (($headerFileContent + "`r`n") -ne (Get-Content $generatedFilesFolder\$generatedHeaderFileName -Raw))) - { +try { + if (!(Test-Path -Path $generatedFilesFolder\$generatedHeaderFileName) -or (($headerFileContent + "`r`n") -ne (Get-Content $generatedFilesFolder\$generatedHeaderFileName -Raw))) { Set-Content -Path $generatedFilesFolder\$generatedHeaderFileName -Value $headerFileContent } - else - { + else { echo "Skipping write to generated header file" } } -catch -{ +catch { echo "Failed to access generated header file." exit 0 } # Write to rc file if the content has changed or if the file doesnt exist -try -{ - if (!(Test-Path -Path $generatedFilesFolder\$generatedRCFileName) -or (($rcFileContent + "`r`n") -ne (Get-Content $generatedFilesFolder\$generatedRCFileName -Raw))) - { +try { + if (!(Test-Path -Path $generatedFilesFolder\$generatedRCFileName) -or (($rcFileContent + "`r`n") -ne (Get-Content $generatedFilesFolder\$generatedRCFileName -Raw))) { Set-Content -Path $generatedFilesFolder\$generatedRCFileName -Value $rcFileContent -Encoding unicode } - else - { + else { echo "Skipping write to generated rc file" } } -catch -{ +catch { echo "Failed to access generated rc file." exit 0 } From fa2f33cb1c40e839e7e3f1654e7ffe7b27b10259 Mon Sep 17 00:00:00 2001 From: Arjun Date: Thu, 20 Aug 2020 18:30:18 -0700 Subject: [PATCH 30/35] Migrated resources for power preview project --- .../previewpane/powerpreview/Resources.resx | 174 ++++++++++++++++++ .../powerpreview/powerpreview.base.rc | 46 +++++ .../previewpane/powerpreview/powerpreview.cpp | 2 +- .../previewpane/powerpreview/powerpreview.rc | 110 ----------- .../powerpreview/powerpreview.vcxproj | 12 +- .../powerpreview/powerpreview.vcxproj.filters | 69 +++++-- .../previewpane/powerpreview/resource.base.h | 13 ++ .../previewpane/powerpreview/resource.h | 43 ----- .../previewpane/powerpreview/settings.h | 2 +- 9 files changed, 299 insertions(+), 172 deletions(-) create mode 100644 src/modules/previewpane/powerpreview/Resources.resx create mode 100644 src/modules/previewpane/powerpreview/powerpreview.base.rc delete mode 100644 src/modules/previewpane/powerpreview/powerpreview.rc create mode 100644 src/modules/previewpane/powerpreview/resource.base.h delete mode 100644 src/modules/previewpane/powerpreview/resource.h diff --git a/src/modules/previewpane/powerpreview/Resources.resx b/src/modules/previewpane/powerpreview/Resources.resx new file mode 100644 index 00000000000..ec7f4859a01 --- /dev/null +++ b/src/modules/previewpane/powerpreview/Resources.resx @@ -0,0 +1,174 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + PowerToys add-ons for Windows File Explorer. + + + File Explorer + + + pt-power-preview + + + EXPLR_ICONS_PREV_STTNGS_GROUP_HEADER_ID + + + Settings Group Header Text + + + Explorer Icons + + + PRVPANE_FILE_PREV_STTNGS_GROUP_HEADER_ID + + + Settings Group Header Text + + + Preview pane extensions + + + PREVPANE_MD_BOOL_TOGGLE_CONTROLL_ID + + + Markdown Previewer + + + Markdown Previewer + + + IDS_PREVPANE_SVG_BOOL_TOGGLE_CONTROLL + + + Svg Previewer + + + SVG Previewer + + + Svg Thumbnail Provider + + + EXPLR_SVG_BOOL_TOGGLE_CONTROLL + + + Render SVG images + + \ No newline at end of file diff --git a/src/modules/previewpane/powerpreview/powerpreview.base.rc b/src/modules/previewpane/powerpreview/powerpreview.base.rc new file mode 100644 index 00000000000..ba9899c41ca --- /dev/null +++ b/src/modules/previewpane/powerpreview/powerpreview.base.rc @@ -0,0 +1,46 @@ +#include +#include "resource.h" +#include "../../../../common/version.h" + +#define APSTUDIO_READONLY_SYMBOLS +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 2 resource. +// +#include "winres.h" + +///////////////////////////////////////////////////////////////////////////// +#undef APSTUDIO_READONLY_SYMBOLS + +1 VERSIONINFO +FILEVERSION FILE_VERSION +PRODUCTVERSION PRODUCT_VERSION +FILEFLAGSMASK VS_FFI_FILEFLAGSMASK +#ifdef _DEBUG +FILEFLAGS VS_FF_DEBUG +#else +FILEFLAGS 0x0L +#endif +FILEOS VOS_NT_WINDOWS32 +FILETYPE VFT_DLL +FILESUBTYPE VFT2_UNKNOWN +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904b0" // US English (0x0409), Unicode (0x04B0) charset + BEGIN + VALUE "CompanyName", COMPANY_NAME + VALUE "FileDescription", FILE_DESCRIPTION + VALUE "FileVersion", FILE_VERSION_STRING + VALUE "InternalName", INTERNAL_NAME + VALUE "LegalCopyright", COPYRIGHT_NOTE + VALUE "OriginalFilename", ORIGINAL_FILENAME + VALUE "ProductName", PRODUCT_NAME + VALUE "ProductVersion", PRODUCT_VERSION_STRING + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1200 // US English (0x0409), Unicode (1200) charset + END +END diff --git a/src/modules/previewpane/powerpreview/powerpreview.cpp b/src/modules/previewpane/powerpreview/powerpreview.cpp index 113418fa8aa..61d2a6b0723 100644 --- a/src/modules/previewpane/powerpreview/powerpreview.cpp +++ b/src/modules/previewpane/powerpreview/powerpreview.cpp @@ -4,7 +4,7 @@ #include "powerpreview.h" #include "trace.h" #include "settings.h" -#include "resource.h" +#include "Generated Files/resource.h" // Destroy the powertoy and free memory. void PowerPreviewModule::destroy() diff --git a/src/modules/previewpane/powerpreview/powerpreview.rc b/src/modules/previewpane/powerpreview/powerpreview.rc deleted file mode 100644 index 52117b6099f..00000000000 --- a/src/modules/previewpane/powerpreview/powerpreview.rc +++ /dev/null @@ -1,110 +0,0 @@ -#include -#include "resource.h" -#include "../../../common/version.h" - -1 VERSIONINFO -FILEVERSION FILE_VERSION -PRODUCTVERSION PRODUCT_VERSION -FILEFLAGSMASK VS_FFI_FILEFLAGSMASK -#ifdef _DEBUG -FILEFLAGS VS_FF_DEBUG -#else -FILEFLAGS 0x0L -#endif -FILEOS VOS_NT_WINDOWS32 -FILETYPE VFT_DLL -FILESUBTYPE VFT2_UNKNOWN -BEGIN - BLOCK "StringFileInfo" - BEGIN - BLOCK "040904b0" // US English (0x0409), Unicode (0x04B0) charset - BEGIN - VALUE "CompanyName", COMPANY_NAME - VALUE "FileDescription", FILE_DESCRIPTION - VALUE "FileVersion", FILE_VERSION_STRING - VALUE "InternalName", INTERNAL_NAME - VALUE "LegalCopyright", COPYRIGHT_NOTE - VALUE "OriginalFilename", ORIGINAL_FILENAME - VALUE "ProductName", PRODUCT_NAME - VALUE "ProductVersion", PRODUCT_VERSION_STRING - END - END - BLOCK "VarFileInfo" - BEGIN - VALUE "Translation", 0x409, 1200 // US English (0x0409), Unicode (1200) charset - END -END - -#define APSTUDIO_READONLY_SYMBOLS -///////////////////////////////////////////////////////////////////////////// -// -// Generated from the TEXTINCLUDE 2 resource. -// -#include "winres.h" - -///////////////////////////////////////////////////////////////////////////// -#undef APSTUDIO_READONLY_SYMBOLS - -///////////////////////////////////////////////////////////////////////////// -// English (United States) resources - -#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) -LANGUAGE 9, 1 - -#ifdef APSTUDIO_INVOKED -///////////////////////////////////////////////////////////////////////////// -// -// TEXTINCLUDE -// - -1 TEXTINCLUDE -BEGIN - "resource.h\0" -END - -2 TEXTINCLUDE -BEGIN - "#include ""winres.h""\r\n" - "\0" -END - -3 TEXTINCLUDE -BEGIN - "\r\n" - "\0" -END - -#endif // APSTUDIO_INVOKED - -#endif // English (United States) resources -///////////////////////////////////////////////////////////////////////////// -STRINGTABLE -BEGIN - IDS_GENERAL_DESCRIPTION L"PowerToys add-ons for Windows File Explorer."; - IDS_MODULE_NAME L"File Explorer"; - IDS_ICON_KEY_NAME L"pt-power-preview"; - IDS_EXPLR_ICONS_PREV_STTNGS_GROUP_HEADER_ID L"EXPLR_ICONS_PREV_STTNGS_GROUP_HEADER_ID"; - IDS_EXPLR_ICONS_PREV_STTNGS_GROUP_DESC L"Settings Group Header Text"; - IDS_EXPLR_ICONS_PREV_STTNGS_GROUP_TEXT L"Explorer Icons"; - IDS_PRVPANE_FILE_PREV_STTNGS_GROUP_HEADER_ID L"PRVPANE_FILE_PREV_STTNGS_GROUP_HEADER_ID"; - IDS_PRVPANE_FILE_PREV_STTNGS_GROUP_DESC L"Settings Group Header Text"; - IDS_PRVPANE_FILE_PREV_STTNGS_GROUP_TEXT L"Preview pane extensions"; - IDS_PREVPANE_MD_BOOL_TOGGLE_CONTROLL L"PREVPANE_MD_BOOL_TOGGLE_CONTROLL_ID" - IDS_PREVPANE_MD_SETTINGS_DESCRIPTION L"Markdown Previewer" - IDS_PREVPANE_MD_SETTINGS_DISPLAYNAME L"Markdown Previewer" - IDS_PREVPANE_SVG_BOOL_TOGGLE_CONTROLL L"IDS_PREVPANE_SVG_BOOL_TOGGLE_CONTROLL" - IDS_PREVPANE_SVG_SETTINGS_DESCRIPTION L"Svg Previewer" - IDS_PREVPANE_SVG_SETTINGS_DISPLAYNAME L"SVG Previewer" - IDS_SVG_THUMBNAIL_PROVIDER_SETTINGS_DESCRIPTION L"Svg Thumbnail Provider" - IDS_EXPLR_SVG_BOOL_TOGGLE_CONTROLL L"EXPLR_SVG_BOOL_TOGGLE_CONTROLL" - IDS_EXPLR_SVG_SETTINGS_DESCRIPTION L"Render SVG images" -END - -#ifndef APSTUDIO_INVOKED -///////////////////////////////////////////////////////////////////////////// -// -// Generated from the TEXTINCLUDE 3 resource. -// - -///////////////////////////////////////////////////////////////////////////// -#endif // not APSTUDIO_INVOKED diff --git a/src/modules/previewpane/powerpreview/powerpreview.vcxproj b/src/modules/previewpane/powerpreview/powerpreview.vcxproj index 16926cb6a29..ce130a6fb30 100644 --- a/src/modules/previewpane/powerpreview/powerpreview.vcxproj +++ b/src/modules/previewpane/powerpreview/powerpreview.vcxproj @@ -11,6 +11,9 @@ x64 + + + 15.0 {217DF501-135C-4E38-BFC8-99D4821032EA} @@ -108,7 +111,8 @@ - + + @@ -124,7 +128,8 @@ - + + @@ -135,6 +140,9 @@ + + + diff --git a/src/modules/previewpane/powerpreview/powerpreview.vcxproj.filters b/src/modules/previewpane/powerpreview/powerpreview.vcxproj.filters index eae9ae3ac27..584f6254d19 100644 --- a/src/modules/previewpane/powerpreview/powerpreview.vcxproj.filters +++ b/src/modules/previewpane/powerpreview/powerpreview.vcxproj.filters @@ -1,28 +1,61 @@  - - - - - - + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + - - - - - - - + + Generated Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + Header Files + + Resource Files + + + Resource Files + + + Header Files + @@ -31,10 +64,16 @@ {9999f820-649a-456b-9eb5-e36d0d14ca5d} + + {8db56831-427b-4c55-9a50-7298bf009fa4} + + + {5d9192dd-25e2-46ed-a77a-310eb4d250fb} + - - Resource Files + + Generated Files \ No newline at end of file diff --git a/src/modules/previewpane/powerpreview/resource.base.h b/src/modules/previewpane/powerpreview/resource.base.h new file mode 100644 index 00000000000..f80f83b3922 --- /dev/null +++ b/src/modules/previewpane/powerpreview/resource.base.h @@ -0,0 +1,13 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Visual C++ generated include file. +// Used by powerpreview.rc + +////////////////////////////// +// Non-localizable + +#define FILE_DESCRIPTION "PowerToys PowerPreview" +#define INTERNAL_NAME "powerpreview" +#define ORIGINAL_FILENAME "powerpreview.dll" + +// Non-localizable +////////////////////////////// diff --git a/src/modules/previewpane/powerpreview/resource.h b/src/modules/previewpane/powerpreview/resource.h deleted file mode 100644 index 09e2091794f..00000000000 --- a/src/modules/previewpane/powerpreview/resource.h +++ /dev/null @@ -1,43 +0,0 @@ -//{{NO_DEPENDENCIES}} -// Microsoft Visual C++ generated include file. -// Used by powerpreview.rc - -////////////////////////////// -// Non-localizable - -#define FILE_DESCRIPTION "PowerToys PowerPreview" -#define INTERNAL_NAME "powerpreview" -#define ORIGINAL_FILENAME "powerpreview.dll" - -// Non-localizable -////////////////////////////// - -#define IDS_GENERAL_DESCRIPTION 200 -#define IDS_MODULE_NAME 201 -#define IDS_ICON_KEY_NAME 202 -#define IDS_EXPLR_ICONS_PREV_STTNGS_GROUP_HEADER_ID 203 -#define IDS_EXPLR_ICONS_PREV_STTNGS_GROUP_DESC 204 -#define IDS_EXPLR_ICONS_PREV_STTNGS_GROUP_TEXT 205 -#define IDS_PRVPANE_FILE_PREV_STTNGS_GROUP_HEADER_ID 206 -#define IDS_PRVPANE_FILE_PREV_STTNGS_GROUP_DESC 207 -#define IDS_PRVPANE_FILE_PREV_STTNGS_GROUP_TEXT 208 -#define IDS_PREVPANE_MD_BOOL_TOGGLE_CONTROLL 209 -#define IDS_PREVPANE_MD_SETTINGS_DESCRIPTION 210 -#define IDS_PREVPANE_SVG_BOOL_TOGGLE_CONTROLL 211 -#define IDS_PREVPANE_SVG_SETTINGS_DESCRIPTION 212 -#define IDS_EXPLR_SVG_BOOL_TOGGLE_CONTROLL 213 -#define IDS_EXPLR_SVG_SETTINGS_DESCRIPTION 214 -#define IDS_PREVPANE_SVG_SETTINGS_DISPLAYNAME 215 -#define IDS_PREVPANE_MD_SETTINGS_DISPLAYNAME 216 -#define IDS_SVG_THUMBNAIL_PROVIDER_SETTINGS_DESCRIPTION 217 - -// Next default values for new objects -// -#ifdef APSTUDIO_INVOKED -#ifndef APSTUDIO_READONLY_SYMBOLS -#define _APS_NEXT_RESOURCE_VALUE 101 -#define _APS_NEXT_COMMAND_VALUE 40001 -#define _APS_NEXT_CONTROL_VALUE 1001 -#define _APS_NEXT_SYMED_VALUE 101 -#endif -#endif diff --git a/src/modules/previewpane/powerpreview/settings.h b/src/modules/previewpane/powerpreview/settings.h index d28bd025620..3b522560212 100644 --- a/src/modules/previewpane/powerpreview/settings.h +++ b/src/modules/previewpane/powerpreview/settings.h @@ -1,7 +1,7 @@ #pragma once #include #include -#include "resource.h" +#include "Generated Files/resource.h" #include #include "registry_wrapper_interface.h" From 13b577798ede571cd1f759ca88e0697b9d24a475 Mon Sep 17 00:00:00 2001 From: Arjun Date: Fri, 21 Aug 2020 08:45:52 -0700 Subject: [PATCH 31/35] Added LocProject.json file for 5 projects --- .../colorPicker/ColorPicker/LocProject.json | 14 ++++++++++++++ src/modules/imageresizer/dll/LocProject.json | 14 ++++++++++++++ src/modules/keyboardmanager/dll/LocProject.json | 14 ++++++++++++++ .../launcher/Microsoft.Launcher/LocProject.json | 14 ++++++++++++++ .../previewpane/powerpreview/LocProject.json | 14 ++++++++++++++ 5 files changed, 70 insertions(+) create mode 100644 src/modules/colorPicker/ColorPicker/LocProject.json create mode 100644 src/modules/imageresizer/dll/LocProject.json create mode 100644 src/modules/keyboardmanager/dll/LocProject.json create mode 100644 src/modules/launcher/Microsoft.Launcher/LocProject.json create mode 100644 src/modules/previewpane/powerpreview/LocProject.json diff --git a/src/modules/colorPicker/ColorPicker/LocProject.json b/src/modules/colorPicker/ColorPicker/LocProject.json new file mode 100644 index 00000000000..61159da2329 --- /dev/null +++ b/src/modules/colorPicker/ColorPicker/LocProject.json @@ -0,0 +1,14 @@ +{ + "Projects": [ + { + "LanguageSet": "Azure_Languages", + "LocItems": [ + { + "SourceFile": "src\\modules\\colorPicker\\ColorPicker\\Resources.resx", + "CopyOption": "LangIDOnName", + "OutputPath": "src\\modules\\colorPicker\\ColorPicker" + } + ] + } + ] +} diff --git a/src/modules/imageresizer/dll/LocProject.json b/src/modules/imageresizer/dll/LocProject.json new file mode 100644 index 00000000000..cf893425fae --- /dev/null +++ b/src/modules/imageresizer/dll/LocProject.json @@ -0,0 +1,14 @@ +{ + "Projects": [ + { + "LanguageSet": "Azure_Languages", + "LocItems": [ + { + "SourceFile": "src\\modules\\imageresizer\\dll\\Resources.resx", + "CopyOption": "LangIDOnName", + "OutputPath": "src\\modules\\imageresizer\\dll" + } + ] + } + ] +} diff --git a/src/modules/keyboardmanager/dll/LocProject.json b/src/modules/keyboardmanager/dll/LocProject.json new file mode 100644 index 00000000000..5949b906678 --- /dev/null +++ b/src/modules/keyboardmanager/dll/LocProject.json @@ -0,0 +1,14 @@ +{ + "Projects": [ + { + "LanguageSet": "Azure_Languages", + "LocItems": [ + { + "SourceFile": "src\\modules\\keyboardmanager\\dll\\Resources.resx", + "CopyOption": "LangIDOnName", + "OutputPath": "src\\modules\\keyboardmanager\\dll" + } + ] + } + ] +} diff --git a/src/modules/launcher/Microsoft.Launcher/LocProject.json b/src/modules/launcher/Microsoft.Launcher/LocProject.json new file mode 100644 index 00000000000..788cc64e492 --- /dev/null +++ b/src/modules/launcher/Microsoft.Launcher/LocProject.json @@ -0,0 +1,14 @@ +{ + "Projects": [ + { + "LanguageSet": "Azure_Languages", + "LocItems": [ + { + "SourceFile": "src\\modules\\launcher\\Microsoft.Launcher\\Resources.resx", + "CopyOption": "LangIDOnName", + "OutputPath": "src\\modules\\launcher\\Microsoft.Launcher" + } + ] + } + ] +} diff --git a/src/modules/previewpane/powerpreview/LocProject.json b/src/modules/previewpane/powerpreview/LocProject.json new file mode 100644 index 00000000000..dfc3a6b3744 --- /dev/null +++ b/src/modules/previewpane/powerpreview/LocProject.json @@ -0,0 +1,14 @@ +{ + "Projects": [ + { + "LanguageSet": "Azure_Languages", + "LocItems": [ + { + "SourceFile": "src\\modules\\previewpane\\powerpreview\\Resources.resx", + "CopyOption": "LangIDOnName", + "OutputPath": "src\\modules\\previewpane\\powerpreview" + } + ] + } + ] +} From 3d78f4b310646d98771c9f93bd776984bab2cf05 Mon Sep 17 00:00:00 2001 From: Arjun Date: Fri, 21 Aug 2020 08:53:09 -0700 Subject: [PATCH 32/35] added resgen exception check --- tools/build/convert-resx-to-rc.ps1 | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tools/build/convert-resx-to-rc.ps1 b/tools/build/convert-resx-to-rc.ps1 index 4b4ad196d6a..767f5606bae 100644 --- a/tools/build/convert-resx-to-rc.ps1 +++ b/tools/build/convert-resx-to-rc.ps1 @@ -74,7 +74,13 @@ $rcFileContent = "" Get-ChildItem $parentDirectory -Filter *.resx | Foreach-Object { # Use resgen to parse resx to txt. More details at https://docs.microsoft.com/en-us/dotnet/framework/tools/resgen-exe-resource-file-generator#converting-between-resource-file-types - resgen $_.FullName $tempFile + try { + resgen $_.FullName $tempFile + } + catch { + echo "resgen failed to convert resx file" + exit 0 + } # Get language code from file name $lang = "en" From c87922e3ec49dd0cf20601aaf2903e9b012a11b2 Mon Sep 17 00:00:00 2001 From: Arjun Date: Fri, 21 Aug 2020 13:26:47 -0700 Subject: [PATCH 33/35] Moved non-localizable strings out of resx for powerpreview --- .../previewpane/powerpreview/Resources.resx | 15 --------------- .../previewpane/powerpreview/powerpreview.base.rc | 15 +++++++++++++++ .../previewpane/powerpreview/resource.base.h | 5 +++++ 3 files changed, 20 insertions(+), 15 deletions(-) diff --git a/src/modules/previewpane/powerpreview/Resources.resx b/src/modules/previewpane/powerpreview/Resources.resx index ec7f4859a01..070fc17cb7f 100644 --- a/src/modules/previewpane/powerpreview/Resources.resx +++ b/src/modules/previewpane/powerpreview/Resources.resx @@ -126,36 +126,24 @@ pt-power-preview - - EXPLR_ICONS_PREV_STTNGS_GROUP_HEADER_ID - Settings Group Header Text Explorer Icons - - PRVPANE_FILE_PREV_STTNGS_GROUP_HEADER_ID - Settings Group Header Text Preview pane extensions - - PREVPANE_MD_BOOL_TOGGLE_CONTROLL_ID - Markdown Previewer Markdown Previewer - - IDS_PREVPANE_SVG_BOOL_TOGGLE_CONTROLL - Svg Previewer @@ -165,9 +153,6 @@ Svg Thumbnail Provider - - EXPLR_SVG_BOOL_TOGGLE_CONTROLL - Render SVG images diff --git a/src/modules/previewpane/powerpreview/powerpreview.base.rc b/src/modules/previewpane/powerpreview/powerpreview.base.rc index ba9899c41ca..1bc28438ad8 100644 --- a/src/modules/previewpane/powerpreview/powerpreview.base.rc +++ b/src/modules/previewpane/powerpreview/powerpreview.base.rc @@ -44,3 +44,18 @@ BEGIN VALUE "Translation", 0x409, 1200 // US English (0x0409), Unicode (1200) charset END END + +////////////////////////////// +// Non-localizable + +STRINGTABLE +BEGIN + IDS_EXPLR_ICONS_PREV_STTNGS_GROUP_HEADER_ID L"EXPLR_ICONS_PREV_STTNGS_GROUP_HEADER_ID" + IDS_PRVPANE_FILE_PREV_STTNGS_GROUP_HEADER_ID L"PRVPANE_FILE_PREV_STTNGS_GROUP_HEADER_ID" + IDS_PREVPANE_MD_BOOL_TOGGLE_CONTROLL L"PREVPANE_MD_BOOL_TOGGLE_CONTROLL_ID" + IDS_PREVPANE_SVG_BOOL_TOGGLE_CONTROLL L"IDS_PREVPANE_SVG_BOOL_TOGGLE_CONTROLL" + IDS_EXPLR_SVG_BOOL_TOGGLE_CONTROLL L"EXPLR_SVG_BOOL_TOGGLE_CONTROLL" +END + +// Non-localizable +////////////////////////////// diff --git a/src/modules/previewpane/powerpreview/resource.base.h b/src/modules/previewpane/powerpreview/resource.base.h index f80f83b3922..a3778660714 100644 --- a/src/modules/previewpane/powerpreview/resource.base.h +++ b/src/modules/previewpane/powerpreview/resource.base.h @@ -8,6 +8,11 @@ #define FILE_DESCRIPTION "PowerToys PowerPreview" #define INTERNAL_NAME "powerpreview" #define ORIGINAL_FILENAME "powerpreview.dll" +#define IDS_EXPLR_ICONS_PREV_STTNGS_GROUP_HEADER_ID 1001 +#define IDS_PRVPANE_FILE_PREV_STTNGS_GROUP_HEADER_ID 1002 +#define IDS_PREVPANE_MD_BOOL_TOGGLE_CONTROLL 1003 +#define IDS_PREVPANE_SVG_BOOL_TOGGLE_CONTROLL 1004 +#define IDS_EXPLR_SVG_BOOL_TOGGLE_CONTROLL 1005 // Non-localizable ////////////////////////////// From 6bcb8fcf49c412dde0eb78b31c21381d53ec8b4a Mon Sep 17 00:00:00 2001 From: Arjun Date: Fri, 21 Aug 2020 13:37:56 -0700 Subject: [PATCH 34/35] Migrated shortcut guide resources to resx --- src/modules/shortcut_guide/Resources.resx | 174 ++++++++++++++++++ src/modules/shortcut_guide/overlay_window.cpp | 2 +- src/modules/shortcut_guide/resource.base.h | 13 ++ src/modules/shortcut_guide/resource.h | 32 ---- .../shortcut_guide/shortcut_guide.base.rc | Bin 0 -> 2288 bytes src/modules/shortcut_guide/shortcut_guide.cpp | 1 - src/modules/shortcut_guide/shortcut_guide.h | 2 +- src/modules/shortcut_guide/shortcut_guide.rc | Bin 4122 -> 0 bytes .../shortcut_guide/shortcut_guide.vcxproj | 12 +- .../shortcut_guide.vcxproj.filters | 22 ++- 10 files changed, 216 insertions(+), 42 deletions(-) create mode 100644 src/modules/shortcut_guide/Resources.resx create mode 100644 src/modules/shortcut_guide/resource.base.h delete mode 100644 src/modules/shortcut_guide/resource.h create mode 100644 src/modules/shortcut_guide/shortcut_guide.base.rc delete mode 100644 src/modules/shortcut_guide/shortcut_guide.rc diff --git a/src/modules/shortcut_guide/Resources.resx b/src/modules/shortcut_guide/Resources.resx new file mode 100644 index 00000000000..dd305d79172 --- /dev/null +++ b/src/modules/shortcut_guide/Resources.resx @@ -0,0 +1,174 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + How long to press the Windows key before showing the Shortcut Guide (ms) + + + Opacity of the Shortcut Guide's overlay background (%) + + + Choose Shortcut Guide overlay color + + + Light + + + Dark + + + System default app mode + + + Shows a help overlay with Windows shortcuts when the Windows key is pressed. + + + Shortcut Guide + + + No action + + + Restore + + + Snap right + + + Snap left + + + Snap upper right + + + Snap upper left + + + Snap lower right + + + Snap lower left + + + Minimize + + + Maximize + + \ No newline at end of file diff --git a/src/modules/shortcut_guide/overlay_window.cpp b/src/modules/shortcut_guide/overlay_window.cpp index b778902832e..40e340375cb 100644 --- a/src/modules/shortcut_guide/overlay_window.cpp +++ b/src/modules/shortcut_guide/overlay_window.cpp @@ -6,7 +6,7 @@ #include "keyboard_state.h" #include "shortcut_guide.h" #include "trace.h" -#include "resource.h" +#include "Generated Files/resource.h" #include extern "C" IMAGE_DOS_HEADER __ImageBase; diff --git a/src/modules/shortcut_guide/resource.base.h b/src/modules/shortcut_guide/resource.base.h new file mode 100644 index 00000000000..b2361e1dd96 --- /dev/null +++ b/src/modules/shortcut_guide/resource.base.h @@ -0,0 +1,13 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Visual C++ generated include file. +// Used by ShortcutGuide.rc + +////////////////////////////// +// Non-localizable + +#define FILE_DESCRIPTION "PowerToys ShortcutGuide" +#define INTERNAL_NAME "ShortcutGuide" +#define ORIGINAL_FILENAME "ShortcutGuide.dll" + +// Non-localizable +////////////////////////////// diff --git a/src/modules/shortcut_guide/resource.h b/src/modules/shortcut_guide/resource.h deleted file mode 100644 index c0b7cd69aab..00000000000 --- a/src/modules/shortcut_guide/resource.h +++ /dev/null @@ -1,32 +0,0 @@ -//{{NO_DEPENDENCIES}} -// Microsoft Visual C++ generated include file. -// Used by ShortcutGuide.rc - -////////////////////////////// -// Non-localizable - -#define FILE_DESCRIPTION "PowerToys ShortcutGuide" -#define INTERNAL_NAME "ShortcutGuide" -#define ORIGINAL_FILENAME "ShortcutGuide.dll" - -// Non-localizable -////////////////////////////// - -#define IDS_SETTING_DESCRIPTION_PRESS_TIME 101 -#define IDS_SETTING_DESCRIPTION_OVERLAY_OPACITY 102 -#define IDS_SETTING_DESCRIPTION_THEME 103 -#define IDS_SETTING_DESCRIPTION_THEME_LIGHT 104 -#define IDS_SETTING_DESCRIPTION_THEME_DARK 105 -#define IDS_SETTING_DESCRIPTION_THEME_SYSTEM 106 -#define IDS_SETTINGS_DESCRIPTION 107 -#define IDS_SHORTCUT_GUIDE 108 -#define IDS_NO_ACTION 109 -#define IDS_RESTORE 110 -#define IDS_SNAP_RIGHT 111 -#define IDS_SNAP_LEFT 112 -#define IDS_SNAP_UPPER_RIGHT 113 -#define IDS_SNAP_UPPER_LEFT 114 -#define IDS_SNAP_LOWER_RIGHT 115 -#define IDS_SNAP_LOWER_LEFT 116 -#define IDS_MINIMIZE 117 -#define IDS_MAXIMIZE 118 diff --git a/src/modules/shortcut_guide/shortcut_guide.base.rc b/src/modules/shortcut_guide/shortcut_guide.base.rc new file mode 100644 index 0000000000000000000000000000000000000000..68bc93d49c7447ad3d0ac92f12e1d08782372a96 GIT binary patch literal 2288 zcmb`HTaVIE5Xa})#P2}h#ZAn@uKQwQOklZawzLf`Y!cnVJ90e=fg&m1HW33}q%8d6JP7o0`3|Wzp5YvGGm)tV$@6#L|_ze3U@?(vb$I zb=JOk@`;m(Z(C}dc&tywVB@usILs0;C5Dsn#b}CngLV(kI(VRd`h0z9veMfoJCEC} zL}7Q{&)uj_h^>G)yK+zbdClzYG5r*?3363h_|@hg$%FAUg14r@*T41dP%`Cmykn@3 zM-8~{VsSq*r>i`q*7MROayujQqm#N7`5_fNw#Xxsn<@3Mj}>5FQS{%3<(TiI;ajWX zk<&MFo6(4=kPyFBt7+uxU|5ti`iPin++`(ivE2pZfmdz&*ic_;SZf(f-4(V^4VwY^ zQjUxGv8K+o^CqB9iF|}cLNxPj_c*;{*4*vB)r#D~&|BU+`OLQnR+*=OpUO+a;LX5W z(WM1>g^Y4)wXWo~kxaPPuC&v@$<&a%LSl&Sz;x+|DE4D?UOne?D%GRrJUmnGi!h^e zV1eaCe!}H|-H3Db=^p0VWU0!zcD2u{jovZr)2cofpWjVdpl<=N}6q3nGvWR zauSkv+qLJT^+0peERT}yTb)(0LG-u%lSY#NXL-}ASsR=L&Sp90bkf8y)iIoT7jfrd zePV2DjuvD`*_%)W>%IJhWJdXF$p;WMM}a~9d)9)jUF`~uB+Z%bTrC7!6pc*l$IYno zt0DwZ>wH5+tg*L`lb@phYW-L( #include diff --git a/src/modules/shortcut_guide/shortcut_guide.h b/src/modules/shortcut_guide/shortcut_guide.h index 4adeed06874..1af0b06b510 100644 --- a/src/modules/shortcut_guide/shortcut_guide.h +++ b/src/modules/shortcut_guide/shortcut_guide.h @@ -2,7 +2,7 @@ #include #include "overlay_window.h" -#include "resource.h" +#include "Generated Files/resource.h" #include diff --git a/src/modules/shortcut_guide/shortcut_guide.rc b/src/modules/shortcut_guide/shortcut_guide.rc deleted file mode 100644 index 73b0f9a3a7505a9550bdeecf6429b3983277bba8..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4122 zcmb`K*={076o$`rq`X6mQIxS1+00~aB1Mr{Z8U6Rb0#+}f;Ti6TVUcO51-`wt0?zk zz{W(VUDefR{m)Xz|NisNrZ%^U&1_{Cc4?9QY>)2j!tU5D?bvSY7yH(}vFEe}Tfnn~ za>Z`KUetxH)W>{3;nCj-T(|u0(0^ioz`H=w)V(KCq_=Ma>siCvcFL|~Wouf^=_s?F zx-X)O*1v{T;fZ-_&=1y}F{d@oDo$3{op+EKTbC1k5s#=_yhV6%hAofmX3nN-b`R_# zyI*^~bSF0swet*Sk$vU#FTVfIdIgtoitz8o$rR>Zp6Bkn^9AxJAo&30DeH6{k@ujq zw4*hyZ}qZcBmC-tUCF-SX$QYcpwYnRFK8@qa&KcSm|}r!zr%9*{IZSTW1r}K6lX~B zzDwFyJYDc@h0hmIy|?cU_GLh9YEN;hIP~tYK^X7GGH;`@Q1M+Hh;Cw048jfKcLuIP zwF#crSorWiYN!&qo_%)mtDwCAX^K_XH_k$hrG@bRomu@jKEAfeXS_7#yrZxnbVVxq574wG_rgZ`g%+1O0piEq&d5g z*?F!|yHl6dNwr_%-SH0Z&ZwXss8wvp-OR@ezO?jhwx(sj-tH#opTB6g`p_d->}z*g z`Zl}MvR|^hMYP*IT7P@W-WHLb^W5_Mjg{M?)gotp-M~GzKQr9wRW}M1-eFVh>Ufs=_OCFrZ!J4q{wmDFZ z$hjt#3Ht)bXl~Y|Hs@Auv);ODluZ?oYZ0Xq=bG`pkhL<*F*=Nr;)=l3dU%qFY;@DSwh4wSQK0 z(WpFMxp^atT)vAQDt%Kfw(pFx64 + + + 15.0 {A46629C4-1A6C-40FA-A8B6-10E5102BB0BA} @@ -104,7 +107,8 @@ - + + @@ -127,11 +131,15 @@ - + + + + + diff --git a/src/modules/shortcut_guide/shortcut_guide.vcxproj.filters b/src/modules/shortcut_guide/shortcut_guide.vcxproj.filters index 73c727557a2..4ee893ee3b8 100644 --- a/src/modules/shortcut_guide/shortcut_guide.vcxproj.filters +++ b/src/modules/shortcut_guide/shortcut_guide.vcxproj.filters @@ -36,8 +36,8 @@ Header Files - - Header Files + + Generated Files @@ -50,13 +50,25 @@ {d7932c11-20ad-4625-adbc-0780ea5e308d} + + {41a2f27e-76b5-4799-94c3-90a33a71786b} + - + + Resource Files - + + + Resource Files + + + Header Files + - + + Generated Files + \ No newline at end of file From 594985b92c8e2c03e093bf7aef378d6427f848d6 Mon Sep 17 00:00:00 2001 From: Arjun Date: Fri, 21 Aug 2020 13:39:01 -0700 Subject: [PATCH 35/35] Added LocProject.json --- src/modules/shortcut_guide/LocProject.json | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 src/modules/shortcut_guide/LocProject.json diff --git a/src/modules/shortcut_guide/LocProject.json b/src/modules/shortcut_guide/LocProject.json new file mode 100644 index 00000000000..3ae183d2543 --- /dev/null +++ b/src/modules/shortcut_guide/LocProject.json @@ -0,0 +1,14 @@ +{ + "Projects": [ + { + "LanguageSet": "Azure_Languages", + "LocItems": [ + { + "SourceFile": "src\\modules\\shortcut_guide\\Resources.resx", + "CopyOption": "LangIDOnName", + "OutputPath": "src\\modules\\shortcut_guide" + } + ] + } + ] +}