Skip to content

Commit d60d7a7

Browse files
committed
other fixes and _is_gil_enabled detect
1 parent a22870c commit d60d7a7

4 files changed

Lines changed: 30 additions & 8 deletions

File tree

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
__pycache__/
2-
.DS_Store
2+
.DS_Store
3+
build/

README.md

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# 🌐伪本地化演示程序
1+
# 🌐 伪本地化演示程序
22

33
![截图](https://user-images.githubusercontent.com/89229642/255376854-128a04f0-cf92-4408-b74c-17d6ae7d66f8.png)
44

@@ -17,7 +17,7 @@
1717

1818
网页版:https://suntrise.github.io/pseudo
1919

20-
## 👇使用
20+
## 👇 使用
2121

2222
如果您没有Python环境且比较懒, 可以移步 [Release](https://github.com/suntrise/Pseudo-localization-Demo/releases) 下载, tar.gz 版本适用于 Linux, exe 版本适用于 Windows, 其他操作系统建议下载源码并执行 (macOS 版用户可以到 [Actions 页](https://github.com/suntrise/Pseudo-localization-Demo/actions)下载)
2323

@@ -77,12 +77,15 @@ poetry install
7777

7878
### 🛠️编译
7979

80-
> [!NOTE]
81-
> 待补充
80+
详见: https://flet.dev/docs/publish
81+
82+
在进行打包的过程中会需要您拥有良好的网络链接
83+
84+
如果遇到 Flutter 网络问题, 可参考 https://docs.flutter.cn/community/china/ 进行换源!
8285

8386
## 🗒️备注
8487

85-
- 经过测试, 在虚拟机下运行可能会造成非正常闪烁现象, 可能是flet库的驱动驱动兼容的问题
88+
- 经过测试, 在虚拟机下运行可能会造成非正常闪烁现象
8689

8790
- 以上命令可能会有些许滞后, 若编译效果不佳, 可参考 Workflow 脚本进行参数补充
8891

pslo.pyw renamed to pslo.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -849,4 +849,13 @@ def rail_ctrl(e):
849849
# startup_upd()
850850
log.out(0, "Window initialization completed")
851851

852-
ft.app(target = main)
852+
if __name__ == "__main__":
853+
try:
854+
gil_enabled = sys._is_gil_enabled()
855+
except AttributeError:
856+
gil_enabled = True
857+
858+
if gil_enabled == False:
859+
log.out(3, "Free-threaded build of Python detected, stability cannot be guaranteed!")
860+
861+
ft.app(target = main)

pslo_mini.pyw renamed to pslo_mini.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,4 +118,13 @@ def switch_theme(e):
118118
page.add(titlebar, page.pstype, page.result, row)
119119
log.out(0, "Window initialization completed")
120120

121-
ft.app(target = main)
121+
if __name__ == "__main__":
122+
try:
123+
gil_enabled = sys._is_gil_enabled()
124+
except AttributeError:
125+
gil_enabled = True
126+
127+
if gil_enabled == False:
128+
log.out(3, "Free-threaded build of Python detected, stability cannot be guaranteed!")
129+
130+
ft.app(target = main)

0 commit comments

Comments
 (0)