diff --git a/src/modules/launcher/Wox.Launcher/Wox.Launcher.rc b/src/modules/launcher/Wox.Launcher/Wox.Launcher.rc index c85d6bb9ab..ceb12a24d8 100644 Binary files a/src/modules/launcher/Wox.Launcher/Wox.Launcher.rc and b/src/modules/launcher/Wox.Launcher/Wox.Launcher.rc differ diff --git a/src/modules/launcher/Wox.Launcher/dllmain.cpp b/src/modules/launcher/Wox.Launcher/dllmain.cpp index 4b9374f3ab..68efd29d09 100644 --- a/src/modules/launcher/Wox.Launcher/dllmain.cpp +++ b/src/modules/launcher/Wox.Launcher/dllmain.cpp @@ -4,6 +4,7 @@ #include #include #include "trace.h" +#include "resource.h" extern "C" IMAGE_DOS_HEADER __ImageBase; @@ -22,10 +23,6 @@ BOOL APIENTRY DllMain(HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReser return TRUE; } -// The PowerToy name that will be shown in the settings. -const static wchar_t* MODULE_NAME = L"Launcher"; -// Add a description that will we shown in the module settings page. -const static wchar_t* MODULE_DESC = L""; // These are the properties shown in the Settings page. struct ModuleSettings { @@ -54,9 +51,13 @@ private: // Handle to launch and terminate the launcher HANDLE m_hProcess; + //contains the name of the powerToys + std::wstring app_name; + public: // Constructor Wox_Launcher() { + app_name = GET_RESOURCE_STRING(IDS_LAUNCHER_NAME); init_settings(); }; @@ -67,7 +68,7 @@ public: // Return the display name of the powertoy, this will be cached by the runner virtual const wchar_t* get_name() override { - return MODULE_NAME; + return app_name.c_str(); } // Return array of the names of all events that this powertoy listens for, with @@ -92,7 +93,7 @@ public: // Create a Settings object. PowerToysSettings::Settings settings(hinstance, get_name()); - settings.set_description(MODULE_DESC); + settings.set_description(GET_RESOURCE_STRING(IDS_LAUNCHER_SETTINGS_DESC)); // Show an overview link in the Settings page //settings.set_overview_link(L"https://"); diff --git a/src/modules/launcher/Wox.Launcher/pch.cpp b/src/modules/launcher/Wox.Launcher/pch.cpp index a83d3bb2cc..a3d1ff4225 100644 --- a/src/modules/launcher/Wox.Launcher/pch.cpp +++ b/src/modules/launcher/Wox.Launcher/pch.cpp @@ -1,2 +1,3 @@ #include "pch.h" -#pragma comment(lib, "windowsapp") \ No newline at end of file +#pragma comment(lib, "windowsapp") +#pragma comment(lib, "shlwapi.lib") \ No newline at end of file diff --git a/src/modules/launcher/Wox.Launcher/pch.h b/src/modules/launcher/Wox.Launcher/pch.h index 8fca88842b..8cb4314b9c 100644 --- a/src/modules/launcher/Wox.Launcher/pch.h +++ b/src/modules/launcher/Wox.Launcher/pch.h @@ -3,4 +3,5 @@ #include #include #include -#include \ No newline at end of file +#include +#include \ No newline at end of file diff --git a/src/modules/launcher/Wox.Launcher/resource.h b/src/modules/launcher/Wox.Launcher/resource.h index e69de29bb2..aad6c4bbdc 100644 --- a/src/modules/launcher/Wox.Launcher/resource.h +++ b/src/modules/launcher/Wox.Launcher/resource.h @@ -0,0 +1,2 @@ +#define IDS_LAUNCHER_NAME 601 +#define IDS_LAUNCHER_SETTINGS_DESC 602