diff --git a/resources/meson.build b/resources/meson.build index 27001eeb6..e7d8fb57f 100644 --- a/resources/meson.build +++ b/resources/meson.build @@ -6,6 +6,6 @@ resources_files += files( if copt_platform == 'win' powder_files += windows_mod.compile_resources( 'powder-res.rc', - depend_files: resources_files, + depend_files: [ resources_files, 'resource.h' ], ) endif diff --git a/resources/powder-res.rc b/resources/powder-res.rc index 63c7527b2..153b01218 100644 --- a/resources/powder-res.rc +++ b/resources/powder-res.rc @@ -2,4 +2,3 @@ IDI_ICON ICON DISCARDABLE "icon.ico" IDI_DOC_ICON ICON DISCARDABLE "document.ico" -IDI_EVENTCOMPAT LUASCRIPT "../src/lua/luascripts/eventcompat.lua" diff --git a/resources/resource.h b/resources/resource.h index fe0056183..d6086ac90 100644 --- a/resources/resource.h +++ b/resources/resource.h @@ -1,8 +1,5 @@ #define LUASCRIPT 256 #define IDI_ICON 101 -#define IDI_DOC_ICON 110 -#define IDI_TPTMP 120 -#define IDI_SCRIPTMANAGER 121 -#define IDI_EVENTCOMPAT 122 +#define IDI_DOC_ICON 102 diff --git a/src/client/Client.cpp b/src/client/Client.cpp index bfb2002a3..569b2c095 100644 --- a/src/client/Client.cpp +++ b/src/client/Client.cpp @@ -171,15 +171,15 @@ bool Client::DoInstallation() ByteString currentfilename = Platform::ExecutableName(); ByteString iconname = currentfilename + ",-102"; ByteString AppDataPath = Platform::WinNarrow(_wgetcwd(NULL, 0)); - ByteString opencommand = "\"" + currentfilename + "\" open \"%%1\" ddir \"" + AppDataPath + "\""; - ByteString protocolcommand = "\"" + currentfilename + "\" ddir \"" + AppDataPath + "\" ptsave \"%%1\""; + ByteString opencommand = "\"" + currentfilename + "\" open \"%1\" ddir \"" + AppDataPath + "\""; + ByteString protocolcommand = "\"" + currentfilename + "\" ddir \"" + AppDataPath + "\" ptsave \"%1\""; auto createKey = [](ByteString s, HKEY &k) { return RegCreateKeyExW(HKEY_CURRENT_USER, Platform::WinWiden(s).c_str(), 0, 0, REG_OPTION_NON_VOLATILE, KEY_ALL_ACCESS, NULL, &k, NULL); }; auto setValue = [](HKEY k, ByteString s) { auto w = Platform::WinWiden(s); - return RegSetValueExW(k, NULL, 0, REG_SZ, (LPBYTE)&w[0], w.size() + 1); + return RegSetValueExW(k, NULL, 0, REG_SZ, (LPBYTE)&w[0], (w.size() + 1) * 2); }; //Create protocol entry