Skip to content

Commit 89754b8

Browse files
committed
修复构建错误 打包 pi win
1 parent 32d8468 commit 89754b8

2 files changed

Lines changed: 12 additions & 0 deletions

File tree

build_nuitka.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@
66
import sys
77
from pathlib import Path
88

9+
# 设置Windows控制台编码为UTF-8
10+
if sys.platform == "win32":
11+
import io
12+
sys.stdout = io.TextIOWrapper(sys.stdout.buffer, encoding='utf-8')
13+
sys.stderr = io.TextIOWrapper(sys.stderr.buffer, encoding='utf-8')
14+
915
from packaging_utils import (
1016
ADDITIONAL_HIDDEN_IMPORTS,
1117
ICON_FILE,

build_pyinstaller.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@
77
import sys
88
from pathlib import Path
99

10+
# 设置Windows控制台编码为UTF-8
11+
if sys.platform == "win32":
12+
import io
13+
sys.stdout = io.TextIOWrapper(sys.stdout.buffer, encoding='utf-8')
14+
sys.stderr = io.TextIOWrapper(sys.stderr.buffer, encoding='utf-8')
15+
1016
from packaging_utils import (
1117
ADDITIONAL_HIDDEN_IMPORTS,
1218
collect_data_includes,

0 commit comments

Comments
 (0)