cmake: Set process code page to UTF-8 on Windows
Additionally, this change adds app manifests to targets that were previously missing them.
This commit is contained in:
7 files changed
+19
-1
No files matched your search
@@ -1,10 +1,15 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||||
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
|
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0" xmlns:asmv3="urn:schemas-microsoft-com:asm.v3">
|
||||||
<assemblyIdentity
|
<assemblyIdentity
|
||||||
type="win32"
|
type="win32"
|
||||||
name="org.bitcoincore.${target}"
|
name="org.bitcoincore.${target}"
|
||||||
version="${CLIENT_VERSION_MAJOR}.${CLIENT_VERSION_MINOR}.${CLIENT_VERSION_BUILD}.0"
|
version="${CLIENT_VERSION_MAJOR}.${CLIENT_VERSION_MINOR}.${CLIENT_VERSION_BUILD}.0"
|
||||||
/>
|
/>
|
||||||
|
<asmv3:application>
|
||||||
|
<asmv3:windowsSettings xmlns="http://schemas.microsoft.com/SMI/2019/WindowsSettings">
|
||||||
|
<activeCodePage>UTF-8</activeCodePage>
|
||||||
|
</asmv3:windowsSettings>
|
||||||
|
</asmv3:application>
|
||||||
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
|
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
|
||||||
<security>
|
<security>
|
||||||
<requestedPrivileges>
|
<requestedPrivileges>
|
||||||
|
|||||||
@@ -410,6 +410,7 @@ if(BUILD_UTIL_CHAINSTATE)
|
|||||||
add_executable(bitcoin-chainstate
|
add_executable(bitcoin-chainstate
|
||||||
bitcoin-chainstate.cpp
|
bitcoin-chainstate.cpp
|
||||||
)
|
)
|
||||||
|
add_windows_application_manifest(bitcoin-chainstate)
|
||||||
# TODO: The `SKIP_BUILD_RPATH` property setting can be deleted
|
# TODO: The `SKIP_BUILD_RPATH` property setting can be deleted
|
||||||
# in the future after reordering Guix script commands to
|
# in the future after reordering Guix script commands to
|
||||||
# perform binary checks after the installation step.
|
# perform binary checks after the installation step.
|
||||||
|
|||||||
@@ -56,6 +56,8 @@ add_executable(bench_bitcoin
|
|||||||
verify_script.cpp
|
verify_script.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
|
add_windows_application_manifest(bench_bitcoin)
|
||||||
|
|
||||||
include(TargetDataSources)
|
include(TargetDataSources)
|
||||||
target_raw_data_sources(bench_bitcoin NAMESPACE benchmark::data
|
target_raw_data_sources(bench_bitcoin NAMESPACE benchmark::data
|
||||||
data/block413567.raw
|
data/block413567.raw
|
||||||
|
|||||||
@@ -6,6 +6,7 @@
|
|||||||
|
|
||||||
#include <clientversion.h>
|
#include <clientversion.h>
|
||||||
#include <common/args.h>
|
#include <common/args.h>
|
||||||
|
#include <common/system.h>
|
||||||
#include <util/fs.h>
|
#include <util/fs.h>
|
||||||
#include <util/exec.h>
|
#include <util/exec.h>
|
||||||
#include <util/strencodings.h>
|
#include <util/strencodings.h>
|
||||||
@@ -61,6 +62,8 @@ static void ExecCommand(const std::vector<const char*>& args, std::string_view a
|
|||||||
|
|
||||||
int main(int argc, char* argv[])
|
int main(int argc, char* argv[])
|
||||||
{
|
{
|
||||||
|
SetupEnvironment();
|
||||||
|
|
||||||
try {
|
try {
|
||||||
CommandLine cmd{ParseCommandLine(argc, argv)};
|
CommandLine cmd{ParseCommandLine(argc, argv)};
|
||||||
if (cmd.show_version) {
|
if (cmd.show_version) {
|
||||||
|
|||||||
@@ -12,6 +12,7 @@
|
|||||||
#include <util/time.h>
|
#include <util/time.h>
|
||||||
|
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
|
#include <cassert>
|
||||||
#include <codecvt>
|
#include <codecvt>
|
||||||
#include <compat/compat.h>
|
#include <compat/compat.h>
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
@@ -83,6 +84,7 @@ void SetupEnvironment()
|
|||||||
setenv("LC_ALL", "C.UTF-8", 1);
|
setenv("LC_ALL", "C.UTF-8", 1);
|
||||||
}
|
}
|
||||||
#elif defined(WIN32)
|
#elif defined(WIN32)
|
||||||
|
assert(GetACP() == CP_UTF8);
|
||||||
// Set the default input/output charset is utf-8
|
// Set the default input/output charset is utf-8
|
||||||
SetConsoleCP(CP_UTF8);
|
SetConsoleCP(CP_UTF8);
|
||||||
SetConsoleOutputCP(CP_UTF8);
|
SetConsoleOutputCP(CP_UTF8);
|
||||||
|
|||||||
@@ -14,6 +14,8 @@ add_executable(test_bitcoin-qt
|
|||||||
../../init/bitcoin-qt.cpp
|
../../init/bitcoin-qt.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
|
add_windows_application_manifest(test_bitcoin-qt)
|
||||||
|
|
||||||
target_link_libraries(test_bitcoin-qt
|
target_link_libraries(test_bitcoin-qt
|
||||||
core_interface
|
core_interface
|
||||||
bitcoinqt
|
bitcoinqt
|
||||||
|
|||||||
@@ -134,6 +134,9 @@ add_executable(fuzz
|
|||||||
vecdeque.cpp
|
vecdeque.cpp
|
||||||
versionbits.cpp
|
versionbits.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
|
add_windows_application_manifest(fuzz)
|
||||||
|
|
||||||
target_link_libraries(fuzz
|
target_link_libraries(fuzz
|
||||||
core_interface
|
core_interface
|
||||||
fuzzer_interface
|
fuzzer_interface
|
||||||
|
|||||||
Reference in new issue
Block a user