rbeesoft 2.0.3__py3-none-any.whl → 2.0.4__py3-none-any.whl
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.
- rbeesoft/app/signlicense.py +14 -9
- rbeesoft/app/ui/rbeesoftmainwindow.py +2 -1
- rbeesoft/app/ui/widgets/pages/page.py +5 -1
- {rbeesoft-2.0.3.dist-info → rbeesoft-2.0.4.dist-info}/METADATA +1 -1
- {rbeesoft-2.0.3.dist-info → rbeesoft-2.0.4.dist-info}/RECORD +6 -6
- {rbeesoft-2.0.3.dist-info → rbeesoft-2.0.4.dist-info}/WHEEL +0 -0
rbeesoft/app/signlicense.py
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import base64
|
|
2
|
+
import argparse
|
|
2
3
|
import json
|
|
3
4
|
import time
|
|
4
5
|
from pathlib import Path
|
|
@@ -49,19 +50,23 @@ def sign_license(payload: dict, priv: Ed25519PrivateKey) -> dict:
|
|
|
49
50
|
}
|
|
50
51
|
|
|
51
52
|
def main():
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
53
|
+
parser = argparse.ArgumentParser()
|
|
54
|
+
parser.add_argument('private_key_path', help='Path to private key file')
|
|
55
|
+
parser.add_argument('output_dir', help='Path to output directory where license.json is written')
|
|
56
|
+
parser.add_argument('product', help='Name of product')
|
|
57
|
+
parser.add_argument('expires_days_from_now', help='Number of days to expire', type=int)
|
|
58
|
+
parser.add_argument('--features', help='Feature list', default='')
|
|
59
|
+
args = parser.parse_args()
|
|
60
|
+
priv_path = Path(args.private_key_path) # Path.home() / 'keys/ed25519_private.key'
|
|
61
|
+
out_path = Path(args.output_dir) / 'license.json'
|
|
55
62
|
priv = load_private_key(priv_path)
|
|
56
|
-
|
|
57
63
|
payload = make_license_payload(
|
|
58
|
-
customer=
|
|
59
|
-
product=
|
|
60
|
-
expires_days_from_now=
|
|
61
|
-
features=[
|
|
64
|
+
customer='Default customer',
|
|
65
|
+
product=args.product,
|
|
66
|
+
expires_days_from_now=args.expires_days_from_now,
|
|
67
|
+
features=[x.strip() for x in args.features.split(',')],
|
|
62
68
|
machine_fp=None, # set to a fingerprint to bind to a device
|
|
63
69
|
)
|
|
64
|
-
|
|
65
70
|
signed = sign_license(payload, priv)
|
|
66
71
|
out_path.write_text(json.dumps(signed, indent=2, ensure_ascii=False), encoding="utf-8")
|
|
67
72
|
print(f"Wrote signed license to: {out_path.resolve()}")
|
|
@@ -35,13 +35,13 @@ class RbeesoftMainWindow(QMainWindow):
|
|
|
35
35
|
self.setWindowTitle(self.app_title())
|
|
36
36
|
self.addDockWidget(Qt.DockWidgetArea.TopDockWidgetArea, self.central_dockwidget())
|
|
37
37
|
self.addDockWidget(Qt.DockWidgetArea.BottomDockWidgetArea, self.log_dockwidget())
|
|
38
|
+
LOG.info(f'Settings path: {self.settings().fileName()}')
|
|
38
39
|
if self.app_icon():
|
|
39
40
|
self.setWindowIcon(self.app_icon())
|
|
40
41
|
self.load_geometry_and_state()
|
|
41
42
|
self.init_default_menus()
|
|
42
43
|
self.check_license()
|
|
43
44
|
self.statusBar().showMessage('Ready')
|
|
44
|
-
LOG.info(f'Settings path: {self.settings().fileName()}')
|
|
45
45
|
|
|
46
46
|
def init_default_menus(self):
|
|
47
47
|
# Application menu
|
|
@@ -117,6 +117,7 @@ class RbeesoftMainWindow(QMainWindow):
|
|
|
117
117
|
if file_path:
|
|
118
118
|
try:
|
|
119
119
|
self._license = self.license_manager().verify(file_path)
|
|
120
|
+
LOG.info(f'License found at {file_path}')
|
|
120
121
|
LOG.info('License OK')
|
|
121
122
|
return True
|
|
122
123
|
except LicenseException as e:
|
|
@@ -5,11 +5,12 @@ from PySide6.QtWidgets import QWidget
|
|
|
5
5
|
class Page(QWidget):
|
|
6
6
|
page_changed = Signal(str)
|
|
7
7
|
|
|
8
|
-
def __init__(self, name, title, settings):
|
|
8
|
+
def __init__(self, name, title, settings, license=None):
|
|
9
9
|
super(Page, self).__init__()
|
|
10
10
|
self._name = name
|
|
11
11
|
self._title = title
|
|
12
12
|
self._settings = settings
|
|
13
|
+
self._license = license
|
|
13
14
|
|
|
14
15
|
def name(self):
|
|
15
16
|
return self._name
|
|
@@ -20,5 +21,8 @@ class Page(QWidget):
|
|
|
20
21
|
def settings(self):
|
|
21
22
|
return self._settings
|
|
22
23
|
|
|
24
|
+
def license(self):
|
|
25
|
+
return self._license
|
|
26
|
+
|
|
23
27
|
def switch_to_page(self, name):
|
|
24
28
|
self.page_changed.emit(name)
|
|
@@ -4,19 +4,19 @@ rbeesoft/app/core/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU
|
|
|
4
4
|
rbeesoft/app/generatekeys.py,sha256=YVxIhKhyo0JY6HFxCTNZdD5bU_K6Vb1zkRKdsYQ80Ew,1243
|
|
5
5
|
rbeesoft/app/license.json,sha256=m8ukgKJdiJ3fU4nsFIrE2fm6Qk_SdIdwoqkapM2MnlI,374
|
|
6
6
|
rbeesoft/app/main.py,sha256=AsDayu8MZoLnd9ODZmHL-AA-dqS8exodKv4LcHKw44o,2886
|
|
7
|
-
rbeesoft/app/signlicense.py,sha256=
|
|
7
|
+
rbeesoft/app/signlicense.py,sha256=Zp5bZOnmtHsFOACgU3iGRwy0Ko0nb4GZ97lB4BKTWMw,2704
|
|
8
8
|
rbeesoft/app/ui/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
9
9
|
rbeesoft/app/ui/processes/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
10
10
|
rbeesoft/app/ui/processes/dummyprocess.py,sha256=4r97xwHv7ZaoK85zBxR00zzYnYpoFAxZfBPmxFJYDkM,470
|
|
11
11
|
rbeesoft/app/ui/processes/process.py,sha256=qMrXKvT06oRe1yRSe3DLO9ObhV2qzzZLI5R-PwryOYs,1694
|
|
12
12
|
rbeesoft/app/ui/processes/processrunner.py,sha256=HqDQ3ZMlqCqQkyuEgV5sJCkzD35ENvp58z9D-TtnVdA,1170
|
|
13
|
-
rbeesoft/app/ui/rbeesoftmainwindow.py,sha256=
|
|
13
|
+
rbeesoft/app/ui/rbeesoftmainwindow.py,sha256=p-tO7YG39DEQ_15ijLGKSG1MFWnPBWR8CGR7nl971jA,5713
|
|
14
14
|
rbeesoft/app/ui/settings.py,sha256=JeUBdQgah9s2XbSqsgEEYzFN2yvUwFMk8L7KFsa55WM,2200
|
|
15
15
|
rbeesoft/app/ui/widgets/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
16
16
|
rbeesoft/app/ui/widgets/centraldockwidget.py,sha256=kK0x-Sz4yz7D4icaIepWpAtct7ZQ9BNroi9EccAvABA,1376
|
|
17
17
|
rbeesoft/app/ui/widgets/logdockwidget.py,sha256=DZkQQitarE5B82qvNCSnUWDWXxhWsuTauboULFoh7eI,1810
|
|
18
18
|
rbeesoft/app/ui/widgets/pages/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
19
|
-
rbeesoft/app/ui/widgets/pages/page.py,sha256=
|
|
19
|
+
rbeesoft/app/ui/widgets/pages/page.py,sha256=huzUrbvyx8qZmeelKRhLimB9RFfuj9bK_EsG_56AK_E,661
|
|
20
20
|
rbeesoft/app/ui/widgets/pages/pagerouter.py,sha256=L5EKEMWVibSI7IpabQBkLsCDw1xBt1wfYY50iR56VZA,1460
|
|
21
21
|
rbeesoft/common/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
22
22
|
rbeesoft/common/licenseexception.py,sha256=oapxaf0e9Fbl3iAa5e3c2EYxNhD0e1im1mwJfimsZ3Q,44
|
|
@@ -25,6 +25,6 @@ rbeesoft/common/logmanager.py,sha256=K_qCbPjrzoV5le3KSvLOSSXYa-_MWLJ3FdFNTEGYSxg
|
|
|
25
25
|
rbeesoft/common/logmanagerlistener.py,sha256=Gaig07yjBnyQq9I8sN85olTEeDCDyCFQnEJdwzvmgvc,99
|
|
26
26
|
rbeesoft/common/singleton.py,sha256=FV0k_LlOCmFhlWN6gf1c2x7YXWyd8-7DsIMvOKrI6NY,224
|
|
27
27
|
rbeesoft/webapp/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
28
|
-
rbeesoft-2.0.
|
|
29
|
-
rbeesoft-2.0.
|
|
30
|
-
rbeesoft-2.0.
|
|
28
|
+
rbeesoft-2.0.4.dist-info/METADATA,sha256=5JpIKhEMZamX4jm6keezUXIph6r5mfHTzOAp8jt7RDw,378
|
|
29
|
+
rbeesoft-2.0.4.dist-info/WHEEL,sha256=3ny-bZhpXrU6vSQ1UPG34FoxZBp3lVcvK0LkgUz6VLk,88
|
|
30
|
+
rbeesoft-2.0.4.dist-info/RECORD,,
|
|
File without changes
|