python-visual-update-express 1.0.2__tar.gz → 1.0.3__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.
Files changed (22) hide show
  1. {python_visual_update_express-1.0.2 → python_visual_update_express-1.0.3}/PKG-INFO +8 -2
  2. {python_visual_update_express-1.0.2 → python_visual_update_express-1.0.3}/README.md +7 -1
  3. {python_visual_update_express-1.0.2 → python_visual_update_express-1.0.3}/pyproject.toml +1 -1
  4. {python_visual_update_express-1.0.2 → python_visual_update_express-1.0.3}/python_visual_update_express/application.py +0 -8
  5. {python_visual_update_express-1.0.2 → python_visual_update_express-1.0.3}/python_visual_update_express/ui/updater_window.py +14 -2
  6. {python_visual_update_express-1.0.2 → python_visual_update_express-1.0.3}/.gitignore +0 -0
  7. {python_visual_update_express-1.0.2 → python_visual_update_express-1.0.3}/DEV-README.md +0 -0
  8. {python_visual_update_express-1.0.2 → python_visual_update_express-1.0.3}/LICENSE +0 -0
  9. {python_visual_update_express-1.0.2 → python_visual_update_express-1.0.3}/python_visual_update_express/__init__.py +0 -0
  10. {python_visual_update_express-1.0.2 → python_visual_update_express-1.0.3}/python_visual_update_express/data/general_info.py +0 -0
  11. {python_visual_update_express-1.0.2 → python_visual_update_express-1.0.3}/python_visual_update_express/data/general_settings.py +0 -0
  12. {python_visual_update_express-1.0.2 → python_visual_update_express-1.0.3}/python_visual_update_express/libs/file_download.py +0 -0
  13. {python_visual_update_express-1.0.2 → python_visual_update_express-1.0.3}/python_visual_update_express/libs/icons.py +0 -0
  14. {python_visual_update_express-1.0.2 → python_visual_update_express-1.0.3}/python_visual_update_express/libs/threading.py +0 -0
  15. {python_visual_update_express-1.0.2 → python_visual_update_express-1.0.3}/python_visual_update_express/libs/update_manager.py +0 -0
  16. {python_visual_update_express-1.0.2 → python_visual_update_express-1.0.3}/python_visual_update_express/libs/updates_info.py +0 -0
  17. {python_visual_update_express-1.0.2 → python_visual_update_express-1.0.3}/python_visual_update_express/ui/__init__.py +0 -0
  18. {python_visual_update_express-1.0.2 → python_visual_update_express-1.0.3}/python_visual_update_express/ui/error_handling.py +0 -0
  19. {python_visual_update_express-1.0.2 → python_visual_update_express-1.0.3}/python_visual_update_express/ui/notifications.py +0 -0
  20. {python_visual_update_express-1.0.2 → python_visual_update_express-1.0.3}/python_visual_update_express/ui/status_text_widget.py +0 -0
  21. {python_visual_update_express-1.0.2 → python_visual_update_express-1.0.3}/python_visual_update_express/ui/window_content.py +0 -0
  22. {python_visual_update_express-1.0.2 → python_visual_update_express-1.0.3}/requirements.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: python-visual-update-express
3
- Version: 1.0.2
3
+ Version: 1.0.3
4
4
  Summary: A dialog for updating specific files by syncing them from a server. Designed to work like InstallForge's "Visual Update Express".
5
5
  Project-URL: Homepage, https://github.com/ChocolatePinecone/python-generic-updater
6
6
  Project-URL: Issues, https://github.com/ChocolatePinecone/python-generic-updater/issues
@@ -44,7 +44,13 @@ UPDATE_BASE_URL = 'https://yoursite.com/releases/yourapplication/'
44
44
  CURRENT_VERSION = '1.0.1'
45
45
  UPDATE_TARGET_DIR = 'C:/yourlocationpath'
46
46
 
47
- updater_window = UpdaterWindow(UPDATE_BASE_URL, CURRENT_VERSION, UPDATE_TARGET_DIR)
47
+ # If you are using have a PyQt6 QApplication set up, please indicate this to the UpdaterWindow by
48
+ # setting the create_q_application parameter to 'False'.
49
+ # Otherwise the UpdateWindow will create another QApplication, causing issues with PyQt.
50
+ # If you don't have a PyQt6 QApplication set up, please omit the create_q_application parameter
51
+ # so the updater will a QApplication up internally.
52
+ updater_window = UpdaterWindow(UPDATE_BASE_URL, CURRENT_VERSION, UPDATE_TARGET_DIR, False)
53
+
48
54
  ```
49
55
 
50
56
  Then when you are ready, simply call `show` on the window to start the updater:
@@ -27,7 +27,13 @@ UPDATE_BASE_URL = 'https://yoursite.com/releases/yourapplication/'
27
27
  CURRENT_VERSION = '1.0.1'
28
28
  UPDATE_TARGET_DIR = 'C:/yourlocationpath'
29
29
 
30
- updater_window = UpdaterWindow(UPDATE_BASE_URL, CURRENT_VERSION, UPDATE_TARGET_DIR)
30
+ # If you are using have a PyQt6 QApplication set up, please indicate this to the UpdaterWindow by
31
+ # setting the create_q_application parameter to 'False'.
32
+ # Otherwise the UpdateWindow will create another QApplication, causing issues with PyQt.
33
+ # If you don't have a PyQt6 QApplication set up, please omit the create_q_application parameter
34
+ # so the updater will a QApplication up internally.
35
+ updater_window = UpdaterWindow(UPDATE_BASE_URL, CURRENT_VERSION, UPDATE_TARGET_DIR, False)
36
+
31
37
  ```
32
38
 
33
39
  Then when you are ready, simply call `show` on the window to start the updater:
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "python-visual-update-express"
7
- version = "1.0.2"
7
+ version = "1.0.3"
8
8
  authors = [
9
9
  { name = "Jelmer Pijnappel", email = "chocolatepinecone@gmail.com" },
10
10
  ]
@@ -1,18 +1,10 @@
1
1
  from pathlib import Path
2
2
 
3
- from PyQt6.QtWidgets import QApplication
4
-
5
- from python_visual_update_express.data.general_settings import APP_STYLE
6
3
  from python_visual_update_express.ui.updater_window import UpdaterWindow
7
4
 
8
5
  TMP_UPDATE_BASE_URL = 'http://jelmerpijnappel.nl/releases/broers-optiek/lensplan-hulp-applicatie/'
9
6
  TMP_CURRENT_UPDATE_VERSION = '1.3.0'
10
7
  TMP_TARGET_DIR = str(Path(__file__).resolve().parent.parent / "target")
11
8
 
12
- app = QApplication([])
13
- app.setStyle(APP_STYLE)
14
-
15
9
  window = UpdaterWindow(TMP_UPDATE_BASE_URL, TMP_CURRENT_UPDATE_VERSION, TMP_TARGET_DIR)
16
10
  window.show()
17
-
18
- app.exec()
@@ -1,6 +1,6 @@
1
1
  from PyQt6.QtCore import QThreadPool, Qt, QSize
2
2
  from PyQt6.QtGui import QGuiApplication
3
- from PyQt6.QtWidgets import QMainWindow, QVBoxLayout, QWidget
3
+ from PyQt6.QtWidgets import QMainWindow, QVBoxLayout, QWidget, QApplication
4
4
  from semver import Version
5
5
 
6
6
  from python_visual_update_express.data import general_info
@@ -12,12 +12,18 @@ VERSION_PREFIX = 'v. '
12
12
 
13
13
 
14
14
  class UpdaterWindow(QMainWindow):
15
+ app: QApplication
15
16
  window_content: WindowContent
16
17
 
17
18
  threadpool: QThreadPool
18
19
  centered_on_init: bool = False
19
20
 
20
- def __init__(self, update_base_url: str, current_update_version: str, target_directory_path: str) -> None:
21
+ def __init__(self, update_base_url: str, current_update_version: str, target_directory_path: str,
22
+ create_q_application: bool = True) -> None:
23
+ if create_q_application:
24
+ self.app = QApplication([])
25
+ self.app.setStyle('Fusion')
26
+
21
27
  super().__init__()
22
28
 
23
29
  # GENERAL INFO
@@ -57,3 +63,9 @@ class UpdaterWindow(QMainWindow):
57
63
 
58
64
  self.centered_on_init = True
59
65
  return super().resizeEvent(event)
66
+
67
+ def show(self):
68
+ super().show()
69
+
70
+ if self.app:
71
+ self.app.exec()