Skip to content

Commit 5615558

Browse files
committed
更新文件并准备版本 v1.7.9
1 parent 77add9a commit 5615558

30 files changed

Lines changed: 1463 additions & 2964 deletions

.github/workflows/build-and-release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,13 +172,13 @@ jobs:
172172
cp -r fonts dist/manga-translator-cpu/_internal/
173173
cp -r models dist/manga-translator-cpu/_internal/
174174
cp -r dict dist/manga-translator-cpu/_internal/
175-
cp VERSION dist/manga-translator-cpu/_internal/
175+
cp packaging/VERSION dist/manga-translator-cpu/_internal/
176176
177177
cp -r examples dist/manga-translator-gpu/_internal/
178178
cp -r fonts dist/manga-translator-gpu/_internal/
179179
cp -r models dist/manga-translator-gpu/_internal/
180180
cp -r dict dist/manga-translator-gpu/_internal/
181-
cp VERSION dist/manga-translator-gpu/_internal/
181+
cp packaging/VERSION dist/manga-translator-gpu/_internal/
182182
183183
- name: Create Release Archives using 7-Zip with Splitting
184184
run: |

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,8 @@
155155
## 🙏 致谢
156156

157157
- [zyddnys/manga-image-translator](https://github.com/zyddnys/manga-image-translator) - 核心翻译引擎
158+
- [lhj5426/YSG](https://github.com/lhj5426/YSG) - 提供模型支持
159+
- [PaddleOCR](https://github.com/PaddlePaddle/PaddleOCR) - 提供 OCR 模型支持
158160
- 所有贡献者和用户的支持
159161

160162
---

VERSION

Lines changed: 0 additions & 1 deletion
This file was deleted.

build_packages.py

Lines changed: 0 additions & 313 deletions
This file was deleted.

desktop-ui/app.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,16 @@ def resource_path(relative_path):
3838
base_path = sys._MEIPASS
3939
except Exception:
4040
base_path = os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))
41+
42+
# Special handling for VERSION file in development mode
43+
if relative_path == 'VERSION':
44+
try:
45+
# In PyInstaller, VERSION is in _MEIPASS
46+
return os.path.join(base_path, 'VERSION')
47+
except:
48+
# In development, VERSION is in packaging/
49+
return os.path.join(base_path, 'packaging', 'VERSION')
50+
4151
return os.path.join(base_path, relative_path)
4252

4353

@@ -2426,7 +2436,7 @@ def _update_template_state(self):
24262436
def CURRENT_VERSION(self):
24272437
if not hasattr(self, '_version'):
24282438
try:
2429-
version_file = os.path.join(os.path.dirname(__file__), '..', 'VERSION')
2439+
version_file = os.path.join(os.path.dirname(__file__), '..', 'packaging', 'VERSION')
24302440
with open(version_file, 'r', encoding='utf-8') as f:
24312441
self._version = f.read().strip()
24322442
except Exception:

desktop-ui/updater.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,16 @@ def resource_path(relative_path):
3636
base_path = sys._MEIPASS
3737
except Exception:
3838
base_path = os.path.dirname(os.path.abspath(__file__))
39+
40+
# Special handling for VERSION file in development mode
41+
if relative_path == 'VERSION':
42+
try:
43+
# In PyInstaller, VERSION is in _MEIPASS
44+
return os.path.join(base_path, 'VERSION')
45+
except:
46+
# In development, VERSION is in packaging/
47+
return os.path.join(os.path.dirname(base_path), 'packaging', 'VERSION')
48+
3949
return os.path.join(base_path, relative_path)
4050

4151
def get_app_variant():

0 commit comments

Comments
 (0)