mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-04-29 23:09:44 -04:00
Merge 78a0c238ec
into 51d76634fb
This commit is contained in:
commit
72d9de11a9
14 changed files with 60 additions and 32 deletions
|
@ -31,3 +31,5 @@ BEGIN
|
||||||
VALUE "Translation", 0x0, 1252 // language neutral - multilingual (decimal)
|
VALUE "Translation", 0x0, 1252 // language neutral - multilingual (decimal)
|
||||||
END
|
END
|
||||||
END
|
END
|
||||||
|
|
||||||
|
CREATEPROCESS_MANIFEST_RESOURCE_ID RT_MANIFEST bitcoin-cli.manifest
|
||||||
|
|
|
@ -1313,8 +1313,7 @@ static int CommandLineRPC(int argc, char *argv[])
|
||||||
MAIN_FUNCTION
|
MAIN_FUNCTION
|
||||||
{
|
{
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
common::WinCmdLineArgs winArgs;
|
common::WindowsScopedCodePage windows_terminal_output_code_page{CP_UTF8};
|
||||||
std::tie(argc, argv) = winArgs.get();
|
|
||||||
#endif
|
#endif
|
||||||
SetupEnvironment();
|
SetupEnvironment();
|
||||||
if (!SetupNetworking()) {
|
if (!SetupNetworking()) {
|
||||||
|
|
9
src/bitcoin-cli.manifest
Normal file
9
src/bitcoin-cli.manifest
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||||
|
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
|
||||||
|
<assemblyIdentity type="win32" name="org.bitcoincore.bitcoin-cli" version="29.99.0.0"/>
|
||||||
|
<application>
|
||||||
|
<windowsSettings>
|
||||||
|
<activeCodePage xmlns="http://schemas.microsoft.com/SMI/2019/WindowsSettings">UTF-8</activeCodePage>
|
||||||
|
</windowsSettings>
|
||||||
|
</application>
|
||||||
|
</assembly>
|
|
@ -31,3 +31,5 @@ BEGIN
|
||||||
VALUE "Translation", 0x0, 1252 // language neutral - multilingual (decimal)
|
VALUE "Translation", 0x0, 1252 // language neutral - multilingual (decimal)
|
||||||
END
|
END
|
||||||
END
|
END
|
||||||
|
|
||||||
|
CREATEPROCESS_MANIFEST_RESOURCE_ID RT_MANIFEST bitcoin-wallet.manifest
|
||||||
|
|
|
@ -98,8 +98,7 @@ MAIN_FUNCTION
|
||||||
{
|
{
|
||||||
ArgsManager& args = gArgs;
|
ArgsManager& args = gArgs;
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
common::WinCmdLineArgs winArgs;
|
common::WindowsScopedCodePage windows_terminal_output_code_page{CP_UTF8};
|
||||||
std::tie(argc, argv) = winArgs.get();
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
int exit_status;
|
int exit_status;
|
||||||
|
|
9
src/bitcoin-wallet.manifest
Normal file
9
src/bitcoin-wallet.manifest
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||||
|
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
|
||||||
|
<assemblyIdentity type="win32" name="org.bitcoincore.bitcoin-wallet" version="29.99.0.0"/>
|
||||||
|
<application>
|
||||||
|
<windowsSettings>
|
||||||
|
<activeCodePage xmlns="http://schemas.microsoft.com/SMI/2019/WindowsSettings">UTF-8</activeCodePage>
|
||||||
|
</windowsSettings>
|
||||||
|
</application>
|
||||||
|
</assembly>
|
|
@ -31,3 +31,5 @@ BEGIN
|
||||||
VALUE "Translation", 0x0, 1252 // language neutral - multilingual (decimal)
|
VALUE "Translation", 0x0, 1252 // language neutral - multilingual (decimal)
|
||||||
END
|
END
|
||||||
END
|
END
|
||||||
|
|
||||||
|
CREATEPROCESS_MANIFEST_RESOURCE_ID RT_MANIFEST bitcoind.manifest
|
||||||
|
|
|
@ -255,8 +255,7 @@ static bool AppInit(NodeContext& node)
|
||||||
MAIN_FUNCTION
|
MAIN_FUNCTION
|
||||||
{
|
{
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
common::WinCmdLineArgs winArgs;
|
common::WindowsScopedCodePage windows_terminal_output_code_page{CP_UTF8};
|
||||||
std::tie(argc, argv) = winArgs.get();
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
NodeContext node;
|
NodeContext node;
|
||||||
|
|
9
src/bitcoind.manifest
Normal file
9
src/bitcoind.manifest
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||||
|
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
|
||||||
|
<assemblyIdentity type="win32" name="org.bitcoincore.bitcoind" version="29.99.0.0"/>
|
||||||
|
<application>
|
||||||
|
<windowsSettings>
|
||||||
|
<activeCodePage xmlns="http://schemas.microsoft.com/SMI/2019/WindowsSettings">UTF-8</activeCodePage>
|
||||||
|
</windowsSettings>
|
||||||
|
</application>
|
||||||
|
</assembly>
|
|
@ -867,27 +867,15 @@ void ArgsManager::LogArgs() const
|
||||||
|
|
||||||
namespace common {
|
namespace common {
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
WinCmdLineArgs::WinCmdLineArgs()
|
WindowsScopedCodePage::WindowsScopedCodePage(UINT new_console_outp_code_page)
|
||||||
|
: m_original_code_page{GetConsoleOutputCP()}
|
||||||
{
|
{
|
||||||
wchar_t** wargv = CommandLineToArgvW(GetCommandLineW(), &argc);
|
SetConsoleOutputCP(new_console_outp_code_page);
|
||||||
std::wstring_convert<std::codecvt_utf8_utf16<wchar_t>, wchar_t> utf8_cvt;
|
|
||||||
argv = new char*[argc];
|
|
||||||
args.resize(argc);
|
|
||||||
for (int i = 0; i < argc; i++) {
|
|
||||||
args[i] = utf8_cvt.to_bytes(wargv[i]);
|
|
||||||
argv[i] = &*args[i].begin();
|
|
||||||
}
|
|
||||||
LocalFree(wargv);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
WinCmdLineArgs::~WinCmdLineArgs()
|
WindowsScopedCodePage::~WindowsScopedCodePage()
|
||||||
{
|
{
|
||||||
delete[] argv;
|
SetConsoleOutputCP(m_original_code_page);
|
||||||
}
|
|
||||||
|
|
||||||
std::pair<int, char**> WinCmdLineArgs::get()
|
|
||||||
{
|
|
||||||
return std::make_pair(argc, argv);
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
} // namespace common
|
} // namespace common
|
||||||
|
|
|
@ -480,17 +480,17 @@ std::string HelpMessageOpt(const std::string& option, const std::string& message
|
||||||
|
|
||||||
namespace common {
|
namespace common {
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
class WinCmdLineArgs
|
/**
|
||||||
|
* A RAII-style class for temporarily changing the terminal output code page during runtime.
|
||||||
|
*/
|
||||||
|
class WindowsScopedCodePage
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
WinCmdLineArgs();
|
WindowsScopedCodePage(UINT new_console_outp_code_page);
|
||||||
~WinCmdLineArgs();
|
~WindowsScopedCodePage();
|
||||||
std::pair<int, char**> get();
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
int argc;
|
UINT m_original_code_page;
|
||||||
char** argv;
|
|
||||||
std::vector<std::string> args;
|
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
} // namespace common
|
} // namespace common
|
||||||
|
|
|
@ -479,8 +479,7 @@ static void SetupUIArgs(ArgsManager& argsman)
|
||||||
int GuiMain(int argc, char* argv[])
|
int GuiMain(int argc, char* argv[])
|
||||||
{
|
{
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
common::WinCmdLineArgs winArgs;
|
common::WindowsScopedCodePage windows_terminal_output_code_page{CP_UTF8};
|
||||||
std::tie(argc, argv) = winArgs.get();
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
std::unique_ptr<interfaces::Init> init = interfaces::MakeGuiInit(argc, argv);
|
std::unique_ptr<interfaces::Init> init = interfaces::MakeGuiInit(argc, argv);
|
||||||
|
|
|
@ -38,3 +38,5 @@ BEGIN
|
||||||
VALUE "Translation", 0x0, 1252 // language neutral - multilingual (decimal)
|
VALUE "Translation", 0x0, 1252 // language neutral - multilingual (decimal)
|
||||||
END
|
END
|
||||||
END
|
END
|
||||||
|
|
||||||
|
CREATEPROCESS_MANIFEST_RESOURCE_ID RT_MANIFEST bitcoin-qt.manifest
|
||||||
|
|
9
src/qt/res/bitcoin-qt.manifest
Normal file
9
src/qt/res/bitcoin-qt.manifest
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||||
|
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
|
||||||
|
<assemblyIdentity type="win32" name="org.bitcoincore.bitcoin-qt" version="29.99.0.0"/>
|
||||||
|
<application>
|
||||||
|
<windowsSettings>
|
||||||
|
<activeCodePage xmlns="http://schemas.microsoft.com/SMI/2019/WindowsSettings">UTF-8</activeCodePage>
|
||||||
|
</windowsSettings>
|
||||||
|
</application>
|
||||||
|
</assembly>
|
Loading…
Add table
Reference in a new issue