chgksuite_qt 0.0.4b0__tar.gz → 0.0.6__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {chgksuite_qt-0.0.4b0/chgksuite_qt.egg-info → chgksuite_qt-0.0.6}/PKG-INFO +1 -1
- {chgksuite_qt-0.0.4b0 → chgksuite_qt-0.0.6}/chgksuite_qt/gui.py +39 -10
- chgksuite_qt-0.0.6/chgksuite_qt/version.py +1 -0
- {chgksuite_qt-0.0.4b0 → chgksuite_qt-0.0.6/chgksuite_qt.egg-info}/PKG-INFO +1 -1
- {chgksuite_qt-0.0.4b0 → chgksuite_qt-0.0.6}/chgksuite_qt.egg-info/SOURCES.txt +0 -6
- {chgksuite_qt-0.0.4b0 → chgksuite_qt-0.0.6}/chgksuite_qt.egg-info/dependency_links.txt +0 -0
- {chgksuite_qt-0.0.4b0 → chgksuite_qt-0.0.6}/chgksuite_qt.egg-info/entry_points.txt +0 -0
- {chgksuite_qt-0.0.4b0 → chgksuite_qt-0.0.6}/chgksuite_qt.egg-info/requires.txt +0 -0
- {chgksuite_qt-0.0.4b0 → chgksuite_qt-0.0.6}/chgksuite_qt.egg-info/top_level.txt +0 -0
- chgksuite_qt-0.0.4b0/chgksuite_qt/version.py +0 -1
- chgksuite_qt-0.0.4b0/chgksuite_qt.egg-info/._PKG-INFO +0 -0
- chgksuite_qt-0.0.4b0/chgksuite_qt.egg-info/._SOURCES.txt +0 -0
- chgksuite_qt-0.0.4b0/chgksuite_qt.egg-info/._dependency_links.txt +0 -0
- chgksuite_qt-0.0.4b0/chgksuite_qt.egg-info/._entry_points.txt +0 -0
- chgksuite_qt-0.0.4b0/chgksuite_qt.egg-info/._requires.txt +0 -0
- chgksuite_qt-0.0.4b0/chgksuite_qt.egg-info/._top_level.txt +0 -0
- {chgksuite_qt-0.0.4b0 → chgksuite_qt-0.0.6}/LICENSE.txt +0 -0
- {chgksuite_qt-0.0.4b0 → chgksuite_qt-0.0.6}/chgksuite_qt/__main__.py +0 -0
- {chgksuite_qt-0.0.4b0 → chgksuite_qt-0.0.6}/pyproject.toml +0 -0
- {chgksuite_qt-0.0.4b0 → chgksuite_qt-0.0.6}/setup.cfg +0 -0
|
@@ -14,7 +14,7 @@ import urllib.request
|
|
|
14
14
|
|
|
15
15
|
try:
|
|
16
16
|
from PyQt6 import QtWidgets, QtGui
|
|
17
|
-
from PyQt6.QtCore import QTimer, pyqtSignal, QObject
|
|
17
|
+
from PyQt6.QtCore import QTimer, pyqtSignal, QObject, QThread
|
|
18
18
|
|
|
19
19
|
PYQT = True
|
|
20
20
|
except ImportError:
|
|
@@ -31,6 +31,13 @@ from chgksuite.version import __version__
|
|
|
31
31
|
from chgksuite.cli import ArgparseBuilder, single_action
|
|
32
32
|
|
|
33
33
|
|
|
34
|
+
def is_app_translocated(path):
|
|
35
|
+
"""Check if the app is running from macOS App Translocation."""
|
|
36
|
+
if sys.platform == "darwin" and path:
|
|
37
|
+
return "/AppTranslocation/" in path
|
|
38
|
+
return False
|
|
39
|
+
|
|
40
|
+
|
|
34
41
|
def get_pyapp_executable():
|
|
35
42
|
"""Return the pyapp executable path if running inside pyapp, else None."""
|
|
36
43
|
pyapp_env = os.environ.get("PYAPP", "")
|
|
@@ -87,6 +94,16 @@ def check_for_updates():
|
|
|
87
94
|
return False, current, None
|
|
88
95
|
|
|
89
96
|
|
|
97
|
+
class UpdateChecker(QObject):
|
|
98
|
+
"""Worker to check for updates in background thread."""
|
|
99
|
+
|
|
100
|
+
finished = pyqtSignal(object, object, object) # has_update, details, error
|
|
101
|
+
|
|
102
|
+
def run(self):
|
|
103
|
+
has_update, details, error = check_for_updates()
|
|
104
|
+
self.finished.emit(has_update, details, error)
|
|
105
|
+
|
|
106
|
+
|
|
90
107
|
LANGS = ["by", "by_tar", "en", "kz_cyr", "ru", "sr", "ua", "uz", "uz_cyr"] + ["custom"]
|
|
91
108
|
|
|
92
109
|
debug = False
|
|
@@ -312,15 +329,14 @@ class ParserWrapper(object):
|
|
|
312
329
|
self.update_button.setEnabled(False)
|
|
313
330
|
self.update_button.setText("Проверка обновлений...")
|
|
314
331
|
|
|
315
|
-
# Check for updates in a
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
threading.Thread(target=check_thread, daemon=True).start()
|
|
332
|
+
# Check for updates in a QThread to safely update UI
|
|
333
|
+
self._update_thread = QThread()
|
|
334
|
+
self._update_checker = UpdateChecker()
|
|
335
|
+
self._update_checker.moveToThread(self._update_thread)
|
|
336
|
+
self._update_thread.started.connect(self._update_checker.run)
|
|
337
|
+
self._update_checker.finished.connect(self._handle_update_check)
|
|
338
|
+
self._update_checker.finished.connect(self._update_thread.quit)
|
|
339
|
+
self._update_thread.start()
|
|
324
340
|
|
|
325
341
|
def _handle_update_check(self, has_update, details, error):
|
|
326
342
|
"""Handle update check result on main thread."""
|
|
@@ -358,6 +374,19 @@ class ParserWrapper(object):
|
|
|
358
374
|
|
|
359
375
|
def _run_self_update(self):
|
|
360
376
|
"""Run pyapp self-update command and close the application."""
|
|
377
|
+
# Check for macOS App Translocation
|
|
378
|
+
if is_app_translocated(self.pyapp_executable):
|
|
379
|
+
QtWidgets.QMessageBox.warning(
|
|
380
|
+
self.window,
|
|
381
|
+
"Обновление невозможно",
|
|
382
|
+
"Приложение запущено из временной папки (App Translocation).\n\n"
|
|
383
|
+
"Чтобы обновить приложение:\n"
|
|
384
|
+
"1. Закройте приложение\n"
|
|
385
|
+
"2. Переместите его в папку «Программы» (Applications)\n"
|
|
386
|
+
"3. Запустите приложение снова и нажмите «Обновить»",
|
|
387
|
+
)
|
|
388
|
+
return
|
|
389
|
+
|
|
361
390
|
try:
|
|
362
391
|
# Start the update process detached from current process
|
|
363
392
|
if sys.platform == "win32":
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.0.6"
|
|
@@ -3,12 +3,6 @@ pyproject.toml
|
|
|
3
3
|
chgksuite_qt/__main__.py
|
|
4
4
|
chgksuite_qt/gui.py
|
|
5
5
|
chgksuite_qt/version.py
|
|
6
|
-
chgksuite_qt.egg-info/._PKG-INFO
|
|
7
|
-
chgksuite_qt.egg-info/._SOURCES.txt
|
|
8
|
-
chgksuite_qt.egg-info/._dependency_links.txt
|
|
9
|
-
chgksuite_qt.egg-info/._entry_points.txt
|
|
10
|
-
chgksuite_qt.egg-info/._requires.txt
|
|
11
|
-
chgksuite_qt.egg-info/._top_level.txt
|
|
12
6
|
chgksuite_qt.egg-info/PKG-INFO
|
|
13
7
|
chgksuite_qt.egg-info/SOURCES.txt
|
|
14
8
|
chgksuite_qt.egg-info/dependency_links.txt
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "0.0.4b0"
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|