remove utf8init lib
This commit is contained in:
parent
e0d57213ad
commit
9f622ec06c
|
@ -230,8 +230,6 @@ global function main(): CompilerHint
|
||||||
) then
|
) then
|
||||||
if C_FileSystem.isExecutable("/usr/bin/x86_64-w64-mingw32-gcc") then
|
if C_FileSystem.isExecutable("/usr/bin/x86_64-w64-mingw32-gcc") then
|
||||||
local extraObjects = {
|
local extraObjects = {
|
||||||
utf8init = libexecDir .. "/x86_64-w64-mingw32/utf8init.o",
|
|
||||||
utf8manifest = libexecDir .. "/x86_64-w64-mingw32/utf8manifest.o",
|
|
||||||
}
|
}
|
||||||
|
|
||||||
do
|
do
|
||||||
|
@ -241,7 +239,7 @@ global function main(): CompilerHint
|
||||||
{
|
{
|
||||||
arch = "x86_64",
|
arch = "x86_64",
|
||||||
triplet = "x86_64-w64-mingw32",
|
triplet = "x86_64-w64-mingw32",
|
||||||
customLinkParams = {extraObjects.utf8init, extraObjects.utf8manifest},
|
customLinkParams = {},
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
table.insert(compilerList, release)
|
table.insert(compilerList, release)
|
||||||
|
@ -257,7 +255,6 @@ global function main(): CompilerHint
|
||||||
customCompileParams = {"-target", "x86_64-w64-mingw32"},
|
customCompileParams = {"-target", "x86_64-w64-mingw32"},
|
||||||
customLinkParams = {
|
customLinkParams = {
|
||||||
"-target", "x86_64-w64-mingw32",
|
"-target", "x86_64-w64-mingw32",
|
||||||
extraObjects.utf8init, extraObjects.utf8manifest,
|
|
||||||
"-lstdc++", "-lwinpthread",
|
"-lstdc++", "-lwinpthread",
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
@ -267,11 +264,6 @@ global function main(): CompilerHint
|
||||||
end
|
end
|
||||||
|
|
||||||
if C_FileSystem.isExecutable("/usr/bin/i686-w64-mingw32-gcc") then
|
if C_FileSystem.isExecutable("/usr/bin/i686-w64-mingw32-gcc") then
|
||||||
local extraObjects = {
|
|
||||||
utf8init = libexecDir .. "/i686-w64-mingw32/utf8init.o",
|
|
||||||
utf8manifest = libexecDir .. "/i686-w64-mingw32/utf8manifest.o",
|
|
||||||
}
|
|
||||||
|
|
||||||
do
|
do
|
||||||
local release, _, _ = generateConfig(
|
local release, _, _ = generateConfig(
|
||||||
lang, "GCC", "mingw",
|
lang, "GCC", "mingw",
|
||||||
|
@ -279,7 +271,7 @@ global function main(): CompilerHint
|
||||||
{
|
{
|
||||||
arch = "i686",
|
arch = "i686",
|
||||||
triplet = "i686-w64-mingw32",
|
triplet = "i686-w64-mingw32",
|
||||||
customLinkParams = {extraObjects.utf8init, extraObjects.utf8manifest},
|
customLinkParams = {},
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
table.insert(compilerList, release)
|
table.insert(compilerList, release)
|
||||||
|
@ -296,7 +288,6 @@ global function main(): CompilerHint
|
||||||
customCompileParams = {"-target", "i686-w64-mingw32"},
|
customCompileParams = {"-target", "i686-w64-mingw32"},
|
||||||
customLinkParams = {
|
customLinkParams = {
|
||||||
"-target", "i686-w64-mingw32",
|
"-target", "i686-w64-mingw32",
|
||||||
extraObjects.utf8init, extraObjects.utf8manifest,
|
|
||||||
"-lstdc++", "-lwinpthread",
|
"-lstdc++", "-lwinpthread",
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
|
@ -272,11 +272,6 @@ global function main(): CompilerHint
|
||||||
)
|
)
|
||||||
) then
|
) then
|
||||||
if C_FileSystem.isExecutable("/usr/bin/x86_64-w64-mingw32-gcc") then
|
if C_FileSystem.isExecutable("/usr/bin/x86_64-w64-mingw32-gcc") then
|
||||||
local extraObjects = {
|
|
||||||
utf8init = libexecDir .. "/x86_64-w64-mingw32/utf8init.o",
|
|
||||||
utf8manifest = libexecDir .. "/x86_64-w64-mingw32/utf8manifest.o",
|
|
||||||
}
|
|
||||||
|
|
||||||
do
|
do
|
||||||
local release, _, _ = generateConfig(
|
local release, _, _ = generateConfig(
|
||||||
lang, "GCC", "mingw",
|
lang, "GCC", "mingw",
|
||||||
|
@ -284,7 +279,7 @@ global function main(): CompilerHint
|
||||||
{
|
{
|
||||||
arch = "x86_64",
|
arch = "x86_64",
|
||||||
triplet = "x86_64-w64-mingw32",
|
triplet = "x86_64-w64-mingw32",
|
||||||
customLinkParams = {extraObjects.utf8init, extraObjects.utf8manifest},
|
customLinkParams = {},
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
table.insert(compilerList, release)
|
table.insert(compilerList, release)
|
||||||
|
@ -292,11 +287,6 @@ global function main(): CompilerHint
|
||||||
end
|
end
|
||||||
|
|
||||||
if C_FileSystem.isExecutable("/usr/bin/i686-w64-mingw32-gcc") then
|
if C_FileSystem.isExecutable("/usr/bin/i686-w64-mingw32-gcc") then
|
||||||
local extraObjects = {
|
|
||||||
utf8init = libexecDir .. "/i686-w64-mingw32/utf8init.o",
|
|
||||||
utf8manifest = libexecDir .. "/i686-w64-mingw32/utf8manifest.o",
|
|
||||||
}
|
|
||||||
|
|
||||||
do
|
do
|
||||||
local release, _, _ = generateConfig(
|
local release, _, _ = generateConfig(
|
||||||
lang, "GCC", "mingw",
|
lang, "GCC", "mingw",
|
||||||
|
@ -304,7 +294,7 @@ global function main(): CompilerHint
|
||||||
{
|
{
|
||||||
arch = "i686",
|
arch = "i686",
|
||||||
triplet = "i686-w64-mingw32",
|
triplet = "i686-w64-mingw32",
|
||||||
customLinkParams = {extraObjects.utf8init, extraObjects.utf8manifest},
|
customLinkParams = {},
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
table.insert(compilerList, release)
|
table.insert(compilerList, release)
|
||||||
|
|
|
@ -264,7 +264,6 @@ global function main(): CompilerHint
|
||||||
programs,
|
programs,
|
||||||
{
|
{
|
||||||
arch = appArch,
|
arch = appArch,
|
||||||
customLinkParams = {"-Wl,utf8init.o", "-Wl,utf8manifest.o"},
|
|
||||||
isClang = true,
|
isClang = true,
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
@ -303,7 +302,6 @@ global function main(): CompilerHint
|
||||||
programs,
|
programs,
|
||||||
{
|
{
|
||||||
arch = foreignArch,
|
arch = foreignArch,
|
||||||
customLinkParams = {"-Wl,utf8init.o", "-Wl,utf8manifest.o"},
|
|
||||||
isClang = true,
|
isClang = true,
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
@ -347,7 +345,6 @@ global function main(): CompilerHint
|
||||||
},
|
},
|
||||||
customLinkParams = {
|
customLinkParams = {
|
||||||
"-target", msvcTriplet,
|
"-target", msvcTriplet,
|
||||||
"-Wl,utf8init.o", "-Wl,utf8manifest.o",
|
|
||||||
},
|
},
|
||||||
isClang = true,
|
isClang = true,
|
||||||
}
|
}
|
||||||
|
@ -387,7 +384,6 @@ global function main(): CompilerHint
|
||||||
},
|
},
|
||||||
customLinkParams = {
|
customLinkParams = {
|
||||||
"-target", msvcTriplet,
|
"-target", msvcTriplet,
|
||||||
"-Wl,utf8init.o", "-Wl,utf8manifest.o",
|
|
||||||
},
|
},
|
||||||
isClang = true,
|
isClang = true,
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,7 +8,6 @@ url="https://github.com/royqh1979/$_pkgname"
|
||||||
license=('GPL3')
|
license=('GPL3')
|
||||||
depends=(qt5-base qt5-svg gcc gdb)
|
depends=(qt5-base qt5-svg gcc gdb)
|
||||||
makedepends=(qt5-tools)
|
makedepends=(qt5-tools)
|
||||||
makedepends_x86_64=(mingw-w64-gcc)
|
|
||||||
optdepends=(
|
optdepends=(
|
||||||
'clang: C/C++ compiler (alternative)'
|
'clang: C/C++ compiler (alternative)'
|
||||||
)
|
)
|
||||||
|
@ -35,14 +34,6 @@ prepare() {
|
||||||
}
|
}
|
||||||
|
|
||||||
build() {
|
build() {
|
||||||
local _utf8dir="$srcdir/$_pkgname/platform/windows/utf8"
|
|
||||||
if [[ "$CARCH" == 'x86_64' ]]; then
|
|
||||||
x86_64-w64-mingw32-gcc -Os -fno-exceptions -nodefaultlibs -nostdlib -c -o utf8init.x86_64.o "$_utf8dir/utf8init.cpp"
|
|
||||||
x86_64-w64-mingw32-windres -O coff -o utf8manifest.x86_64.o "$_utf8dir/utf8manifest.rc"
|
|
||||||
i686-w64-mingw32-gcc -Os -fno-exceptions -nodefaultlibs -nostdlib -c -o utf8init.i686.o "$_utf8dir/utf8init.cpp"
|
|
||||||
i686-w64-mingw32-windres -O coff -o utf8manifest.i686.o "$_utf8dir/utf8manifest.rc"
|
|
||||||
fi
|
|
||||||
|
|
||||||
mkdir redpanda-build
|
mkdir redpanda-build
|
||||||
cd redpanda-build
|
cd redpanda-build
|
||||||
qmake \
|
qmake \
|
||||||
|
@ -56,13 +47,6 @@ package() {
|
||||||
local _libexecdir="$pkgdir/usr/lib/RedPandaCPP"
|
local _libexecdir="$pkgdir/usr/lib/RedPandaCPP"
|
||||||
install -Dm644 "compiler_hint.lua" "$_libexecdir/compiler_hint.lua"
|
install -Dm644 "compiler_hint.lua" "$_libexecdir/compiler_hint.lua"
|
||||||
|
|
||||||
if [[ "$CARCH" == 'x86_64' ]]; then
|
|
||||||
install -Dm644 "utf8init.x86_64.o" "$_libexecdir/x86_64-w64-mingw32/utf8init.o"
|
|
||||||
install -Dm644 "utf8manifest.x86_64.o" "$_libexecdir/x86_64-w64-mingw32/utf8manifest.o"
|
|
||||||
install -Dm644 "utf8init.i686.o" "$_libexecdir/i686-w64-mingw32/utf8init.o"
|
|
||||||
install -Dm644 "utf8manifest.i686.o" "$_libexecdir/i686-w64-mingw32/utf8manifest.o"
|
|
||||||
fi
|
|
||||||
|
|
||||||
cd redpanda-build
|
cd redpanda-build
|
||||||
make INSTALL_ROOT="$pkgdir" install
|
make INSTALL_ROOT="$pkgdir" install
|
||||||
}
|
}
|
||||||
|
|
|
@ -229,11 +229,6 @@ function main()
|
||||||
|
|
||||||
|
|
||||||
if C_FileSystem.isExecutable("/usr/bin/x86_64-w64-mingw32-gcc") then
|
if C_FileSystem.isExecutable("/usr/bin/x86_64-w64-mingw32-gcc") then
|
||||||
local extraObjects = {
|
|
||||||
utf8init = libexecDir .. "/x86_64-w64-mingw32/utf8init.o",
|
|
||||||
utf8manifest = libexecDir .. "/x86_64-w64-mingw32/utf8manifest.o",
|
|
||||||
}
|
|
||||||
|
|
||||||
do
|
do
|
||||||
local release, _, _ = generateConfig(
|
local release, _, _ = generateConfig(
|
||||||
lang, "GCC", "mingw",
|
lang, "GCC", "mingw",
|
||||||
|
@ -241,7 +236,7 @@ function main()
|
||||||
{
|
{
|
||||||
arch = "x86_64",
|
arch = "x86_64",
|
||||||
triplet = "x86_64-w64-mingw32",
|
triplet = "x86_64-w64-mingw32",
|
||||||
customLinkParams = { extraObjects.utf8init, extraObjects.utf8manifest },
|
customLinkParams = {},
|
||||||
})
|
})
|
||||||
|
|
||||||
table.insert(compilerList, release)
|
table.insert(compilerList, release)
|
||||||
|
@ -257,7 +252,6 @@ function main()
|
||||||
customCompileParams = { "-target", "x86_64-w64-mingw32" },
|
customCompileParams = { "-target", "x86_64-w64-mingw32" },
|
||||||
customLinkParams = {
|
customLinkParams = {
|
||||||
"-target", "x86_64-w64-mingw32",
|
"-target", "x86_64-w64-mingw32",
|
||||||
extraObjects.utf8init, extraObjects.utf8manifest,
|
|
||||||
"-lstdc++", "-lwinpthread",
|
"-lstdc++", "-lwinpthread",
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
@ -267,11 +261,6 @@ function main()
|
||||||
end
|
end
|
||||||
|
|
||||||
if C_FileSystem.isExecutable("/usr/bin/i686-w64-mingw32-gcc") then
|
if C_FileSystem.isExecutable("/usr/bin/i686-w64-mingw32-gcc") then
|
||||||
local extraObjects = {
|
|
||||||
utf8init = libexecDir .. "/i686-w64-mingw32/utf8init.o",
|
|
||||||
utf8manifest = libexecDir .. "/i686-w64-mingw32/utf8manifest.o",
|
|
||||||
}
|
|
||||||
|
|
||||||
do
|
do
|
||||||
local release, _, _ = generateConfig(
|
local release, _, _ = generateConfig(
|
||||||
lang, "GCC", "mingw",
|
lang, "GCC", "mingw",
|
||||||
|
@ -279,7 +268,7 @@ function main()
|
||||||
{
|
{
|
||||||
arch = "i686",
|
arch = "i686",
|
||||||
triplet = "i686-w64-mingw32",
|
triplet = "i686-w64-mingw32",
|
||||||
customLinkParams = { extraObjects.utf8init, extraObjects.utf8manifest },
|
customLinkParams = {},
|
||||||
})
|
})
|
||||||
|
|
||||||
table.insert(compilerList, release)
|
table.insert(compilerList, release)
|
||||||
|
@ -296,7 +285,6 @@ function main()
|
||||||
customCompileParams = { "-target", "i686-w64-mingw32" },
|
customCompileParams = { "-target", "i686-w64-mingw32" },
|
||||||
customLinkParams = {
|
customLinkParams = {
|
||||||
"-target", "i686-w64-mingw32",
|
"-target", "i686-w64-mingw32",
|
||||||
extraObjects.utf8init, extraObjects.utf8manifest,
|
|
||||||
"-lstdc++", "-lwinpthread",
|
"-lstdc++", "-lwinpthread",
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
|
@ -272,11 +272,6 @@ function main()
|
||||||
|
|
||||||
|
|
||||||
if C_FileSystem.isExecutable("/usr/bin/x86_64-w64-mingw32-gcc") then
|
if C_FileSystem.isExecutable("/usr/bin/x86_64-w64-mingw32-gcc") then
|
||||||
local extraObjects = {
|
|
||||||
utf8init = libexecDir .. "/x86_64-w64-mingw32/utf8init.o",
|
|
||||||
utf8manifest = libexecDir .. "/x86_64-w64-mingw32/utf8manifest.o",
|
|
||||||
}
|
|
||||||
|
|
||||||
do
|
do
|
||||||
local release, _, _ = generateConfig(
|
local release, _, _ = generateConfig(
|
||||||
lang, "GCC", "mingw",
|
lang, "GCC", "mingw",
|
||||||
|
@ -284,7 +279,7 @@ function main()
|
||||||
{
|
{
|
||||||
arch = "x86_64",
|
arch = "x86_64",
|
||||||
triplet = "x86_64-w64-mingw32",
|
triplet = "x86_64-w64-mingw32",
|
||||||
customLinkParams = { extraObjects.utf8init, extraObjects.utf8manifest },
|
customLinkParams = {},
|
||||||
})
|
})
|
||||||
|
|
||||||
table.insert(compilerList, release)
|
table.insert(compilerList, release)
|
||||||
|
@ -292,11 +287,6 @@ function main()
|
||||||
end
|
end
|
||||||
|
|
||||||
if C_FileSystem.isExecutable("/usr/bin/i686-w64-mingw32-gcc") then
|
if C_FileSystem.isExecutable("/usr/bin/i686-w64-mingw32-gcc") then
|
||||||
local extraObjects = {
|
|
||||||
utf8init = libexecDir .. "/i686-w64-mingw32/utf8init.o",
|
|
||||||
utf8manifest = libexecDir .. "/i686-w64-mingw32/utf8manifest.o",
|
|
||||||
}
|
|
||||||
|
|
||||||
do
|
do
|
||||||
local release, _, _ = generateConfig(
|
local release, _, _ = generateConfig(
|
||||||
lang, "GCC", "mingw",
|
lang, "GCC", "mingw",
|
||||||
|
@ -304,7 +294,7 @@ function main()
|
||||||
{
|
{
|
||||||
arch = "i686",
|
arch = "i686",
|
||||||
triplet = "i686-w64-mingw32",
|
triplet = "i686-w64-mingw32",
|
||||||
customLinkParams = { extraObjects.utf8init, extraObjects.utf8manifest },
|
customLinkParams = {},
|
||||||
})
|
})
|
||||||
|
|
||||||
table.insert(compilerList, release)
|
table.insert(compilerList, release)
|
||||||
|
|
|
@ -7,33 +7,11 @@ export DEB_BUILD_MAINT_OPTIONS = hardening=+all
|
||||||
%:
|
%:
|
||||||
dh ${@} --buildsystem qmake
|
dh ${@} --buildsystem qmake
|
||||||
|
|
||||||
ifeq ($(DEB_HOST_ARCH), amd64)
|
override_dh_auto_build:
|
||||||
|
|
||||||
MINGW_UTF8_OBJS = x86_64-w64-mingw32/utf8init.o i686-w64-mingw32/utf8init.o x86_64-w64-mingw32/utf8manifest.o i686-w64-mingw32/utf8manifest.o
|
|
||||||
|
|
||||||
override_dh_auto_build: $(MINGW_UTF8_OBJS)
|
|
||||||
dh_auto_build -O--buildsystem qmake
|
dh_auto_build -O--buildsystem qmake
|
||||||
|
|
||||||
x86_64-w64-mingw32/utf8init.o: platform/windows/utf8/utf8init.cpp
|
|
||||||
mkdir -p $(dir $@)
|
|
||||||
x86_64-w64-mingw32-g++ -Os -fno-exceptions -nodefaultlibs -nostdlib -c -o $@ $<
|
|
||||||
|
|
||||||
x86_64-w64-mingw32/utf8manifest.o: platform/windows/utf8/utf8manifest.rc
|
|
||||||
mkdir -p $(dir $@)
|
|
||||||
x86_64-w64-mingw32-windres -O coff -o $@ $<
|
|
||||||
|
|
||||||
i686-w64-mingw32/utf8init.o: platform/windows/utf8/utf8init.cpp
|
|
||||||
mkdir -p $(dir $@)
|
|
||||||
i686-w64-mingw32-g++ -Os -fno-exceptions -nodefaultlibs -nostdlib -c -o $@ $<
|
|
||||||
|
|
||||||
i686-w64-mingw32/utf8manifest.o: platform/windows/utf8/utf8manifest.rc
|
|
||||||
mkdir -p $(dir $@)
|
|
||||||
i686-w64-mingw32-windres -O coff -o $@ $<
|
|
||||||
|
|
||||||
override_dh_auto_install:
|
override_dh_auto_install:
|
||||||
dh_auto_install -O--buildsystem=qmake
|
dh_auto_install -O--buildsystem=qmake
|
||||||
dh_install debian/compiler_hint.lua usr/libexec/RedPandaCPP
|
dh_install debian/compiler_hint.lua usr/libexec/RedPandaCPP
|
||||||
dh_install x86_64-w64-mingw32/* usr/libexec/RedPandaCPP/x86_64-w64-mingw32
|
|
||||||
dh_install i686-w64-mingw32/* usr/libexec/RedPandaCPP/i686-w64-mingw32
|
|
||||||
|
|
||||||
endif
|
endif
|
||||||
|
|
|
@ -143,11 +143,6 @@ function prepare-mingw() {
|
||||||
bsdtar -C "$_BUILDDIR" -xf "$_ASSETSDIR/$mingw_archive"
|
bsdtar -C "$_BUILDDIR" -xf "$_ASSETSDIR/$mingw_archive"
|
||||||
local old_path="$PATH"
|
local old_path="$PATH"
|
||||||
export PATH="$mingw_dir/bin:$PATH"
|
export PATH="$mingw_dir/bin:$PATH"
|
||||||
{
|
|
||||||
gcc -Os -fno-exceptions -nodefaultlibs -nostdlib -c -o "$mingw_lib_dir/utf8init.o" "$_SRCDIR/platform/windows/utf8/utf8init.cpp"
|
|
||||||
windres -O coff -o "$mingw_lib_dir/utf8manifest.o" "$_SRCDIR/platform/windows/utf8/utf8manifest.rc"
|
|
||||||
ar rcs "$mingw_lib_dir/libutf8.a" "$mingw_lib_dir/utf8init.o" "$mingw_lib_dir/utf8manifest.o"
|
|
||||||
}
|
|
||||||
export PATH="$old_path"
|
export PATH="$old_path"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
|
@ -264,7 +264,7 @@ function main()
|
||||||
programs,
|
programs,
|
||||||
{
|
{
|
||||||
arch = appArch,
|
arch = appArch,
|
||||||
customLinkParams = { "-Wl,utf8init.o", "-Wl,utf8manifest.o" },
|
customLinkParams = {},
|
||||||
isClang = true,
|
isClang = true,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
@ -303,7 +303,7 @@ function main()
|
||||||
programs,
|
programs,
|
||||||
{
|
{
|
||||||
arch = foreignArch,
|
arch = foreignArch,
|
||||||
customLinkParams = { "-Wl,utf8init.o", "-Wl,utf8manifest.o" },
|
customLinkParams = {},
|
||||||
isClang = true,
|
isClang = true,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
@ -347,7 +347,6 @@ function main()
|
||||||
},
|
},
|
||||||
customLinkParams = {
|
customLinkParams = {
|
||||||
"-target", msvcTriplet,
|
"-target", msvcTriplet,
|
||||||
"-Wl,utf8init.o", "-Wl,utf8manifest.o",
|
|
||||||
},
|
},
|
||||||
isClang = true,
|
isClang = true,
|
||||||
})
|
})
|
||||||
|
@ -387,7 +386,6 @@ function main()
|
||||||
},
|
},
|
||||||
customLinkParams = {
|
customLinkParams = {
|
||||||
"-target", msvcTriplet,
|
"-target", msvcTriplet,
|
||||||
"-Wl,utf8init.o", "-Wl,utf8manifest.o",
|
|
||||||
},
|
},
|
||||||
isClang = true,
|
isClang = true,
|
||||||
})
|
})
|
||||||
|
|
|
@ -1,25 +0,0 @@
|
||||||
extern "C" {
|
|
||||||
unsigned __stdcall GetConsoleCP() noexcept;
|
|
||||||
unsigned __stdcall GetConsoleOutputCP() noexcept;
|
|
||||||
int __stdcall SetConsoleCP(unsigned) noexcept;
|
|
||||||
int __stdcall SetConsoleOutputCP(unsigned) noexcept;
|
|
||||||
}
|
|
||||||
|
|
||||||
constexpr int CP_UTF8 = 65001;
|
|
||||||
|
|
||||||
struct __utf8init_t {
|
|
||||||
unsigned saved_input_cp;
|
|
||||||
unsigned saved_output_cp;
|
|
||||||
|
|
||||||
__utf8init_t() noexcept {
|
|
||||||
saved_input_cp = GetConsoleCP();
|
|
||||||
saved_output_cp = GetConsoleOutputCP();
|
|
||||||
SetConsoleCP(CP_UTF8);
|
|
||||||
SetConsoleOutputCP(CP_UTF8);
|
|
||||||
}
|
|
||||||
|
|
||||||
~__utf8init_t() noexcept {
|
|
||||||
SetConsoleCP(saved_input_cp);
|
|
||||||
SetConsoleOutputCP(saved_output_cp);
|
|
||||||
}
|
|
||||||
} __utf8init;
|
|
|
@ -1,12 +0,0 @@
|
||||||
1 24 MOVEABLE PURE DISCARDABLE
|
|
||||||
BEGIN
|
|
||||||
"<?xml version=""1.0"" encoding=""UTF-8"" standalone=""yes""?>"
|
|
||||||
"<assembly manifestVersion=""1.0"" xmlns=""urn:schemas-microsoft-com:asm.v1"">"
|
|
||||||
"<assemblyIdentity type=""win32"" name=""..."" version=""6.0.0.0""/>"
|
|
||||||
"<application>"
|
|
||||||
"<windowsSettings>"
|
|
||||||
"<activeCodePage xmlns=""http://schemas.microsoft.com/SMI/2019/WindowsSettings"">UTF-8</activeCodePage>"
|
|
||||||
"</windowsSettings>"
|
|
||||||
"</application>"
|
|
||||||
"</assembly>"
|
|
||||||
END
|
|
Loading…
Reference in New Issue