Skip to content

Commit 93e8394

Browse files
authored
Merge pull request #13 from gri-gus/bugfix/fix_windows_plugin_deletion_or_update
Fixing bugs with updating and removing plugins on Windows;
2 parents e760c22 + 64cacd6 commit 93e8394

File tree

8 files changed

+80
-4
lines changed

8 files changed

+80
-4
lines changed

README-PYPI.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,22 @@ Library for creating Stream Deck plugins in Python.
3636

3737
**Supported Python versions:** 3.8 or later
3838

39+
## Installation
40+
41+
> ⚠️ To work correctly on Windows, you need to enable `LongPaths` support in
42+
> the system: [manual](https://www.backupery.com/how-to-enable-ntfs-long-paths-in-windows/).
43+
> Without this setting, installation problems may occur!
44+
45+
```shell
46+
pip install streamdeck-sdk
47+
```
48+
49+
or
50+
51+
```shell
52+
pip install streamdeck_sdk
53+
```
54+
3955
## Features
4056

4157
* Ease of use. You can quickly create your own plugin without having to understand how websockets and
@@ -50,11 +66,31 @@ Library for creating Stream Deck plugins in Python.
5066
* Build the project using the `streamdeck_sdk build` console command.
5167
* Property Inspector Generator. Write code in Python and get html and js for PI.
5268

69+
## ⚠️ Limitations
70+
71+
1. During installation and update of the plugin, the Internet must be available.
72+
73+
### Windows
74+
75+
1. Plugin requirements should take no longer than 30 seconds to install. This is a feature of Stream Deck on Windows,
76+
since the program restarts the plugin if a websocket connection has not been established within 30 seconds.
77+
Therefore, you need a good Internet connection when installing and updating the plugin.
78+
2. You need to enable `LongPaths` support in the system
79+
registry: [manual](https://www.backupery.com/how-to-enable-ntfs-long-paths-in-windows/).
80+
81+
Without this setting, the created plugins will not work!
82+
5383
## Examples
5484

5585
[LoremFlickr](https://github.com/gri-gus/loremflickr-streamdeck-plugin) - Plugin for installing images on a button from
5686
the LoremFlickr site. Supports MacOS and Windows.
5787

88+
[Proxy Manager](https://github.com/gri-gus/proxymanager-streamdeck-plugin) - Plugin for enabling and disabling
89+
proxies on MacOS. Periodically polls the proxy status through a separate thread.
90+
91+
[One-time password](https://github.com/gri-gus/otp-streamdeck-plugin) - Plugin for generating one-time passwords,
92+
like in Google Authenticator. Has several Actions. Supports MacOS and Windows.
93+
5894
---
5995

6096
See full description and usage examples on

README.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,10 @@ Library for creating Stream Deck plugins in Python.
4545

4646
## Installation
4747

48+
> ⚠️ To work correctly on Windows, you need to enable `LongPaths` support in
49+
> the system: [manual](https://www.backupery.com/how-to-enable-ntfs-long-paths-in-windows/).
50+
> Without this setting, installation problems may occur!
51+
4852
```shell
4953
pip install streamdeck-sdk
5054
```
@@ -69,6 +73,20 @@ pip install streamdeck_sdk
6973
* Build the project using the `streamdeck_sdk build` console command.
7074
* Property Inspector Generator. Write code in Python and get html and js for PI.
7175

76+
## ⚠️ Limitations
77+
78+
1. During installation and update of the plugin, the Internet must be available.
79+
80+
### Windows
81+
82+
1. Plugin requirements should take no longer than 30 seconds to install. This is a feature of Stream Deck on Windows,
83+
since the program restarts the plugin if a websocket connection has not been established within 30 seconds.
84+
Therefore, you need a good Internet connection when installing and updating the plugin.
85+
2. You need to enable `LongPaths` support in the system
86+
registry: [manual](https://www.backupery.com/how-to-enable-ntfs-long-paths-in-windows/).
87+
88+
Without this setting, the created plugins will not work!
89+
7290
## Quick Start
7391

7492
1. Install Python.

README.ru.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,10 @@
4545

4646
## Установка
4747

48+
> ⚠️ Для корректной работы на Windows нужно включить поддержку `LongPaths` в
49+
> системе: [manual](https://www.backupery.com/how-to-enable-ntfs-long-paths-in-windows/).
50+
> Без этой настройки возможны проблемы с установкой!
51+
4852
```shell
4953
pip install streamdeck-sdk
5054
```
@@ -69,6 +73,20 @@ pip install streamdeck_sdk
6973
* Сборка проекта через консольную команду `streamdeck_sdk build`.
7074
* Генератор Property Inspector. Пишите код на Python и получите html и js для PI.
7175

76+
## ⚠️ Ограничения
77+
78+
1. Во время установки и обновления плагина должен быть доступен интернет.
79+
80+
### Windows
81+
82+
1. Зависимости плагина должны устанавливаться не дольше 30 секунд. Это особенность Stream Deck на Windows, так как
83+
программа перезапускает плагин, если в течение 30 секунд не было установлено websocket соединение. Поэтому нужен
84+
хороший интернет при установке и обновлении плагина.
85+
2. Нужно включить поддержку `LongPaths` в реестре
86+
системы: [manual](https://www.backupery.com/how-to-enable-ntfs-long-paths-in-windows/).
87+
88+
Без этой настройки созданные плагины не будут работать!
89+
7290
## Быстрый старт
7391

7492
1. Установите Python.

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
import setuptools
44

5-
VERSION = "1.1.0"
5+
VERSION = "1.1.1"
66
PACKAGE_DIR = "."
77
REQUIREMENTS_FILE = "./requirements.txt"
88
README = "README-PYPI.md"
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
streamdeck-sdk>=1.1.0
1+
streamdeck-sdk>=1.1.1

streamdeck_sdk/executable/assets/base_project/com.bestdeveloper.mytestplugin.sdPlugin/manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
"Description": "Open streamdeck_sdk github page.",
2424
"Icon": "assets/plugin_icon",
2525
"Name": "MyTestPlugin",
26-
"Version": "0.0.2",
26+
"Version": "0.0.3",
2727
"SDKVersion": 2,
2828
"OS": [
2929
{

streamdeck_sdk/logger.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,11 @@ def log_errors(func):
4545
def wrapper(*args, **kwargs):
4646
try:
4747
result = func(*args, **kwargs)
48+
except SystemExit as err:
49+
_log_errors_decorator_logger.exception(str(err))
50+
raise err
4851
except BaseException as err:
49-
_log_errors_decorator_logger.error(str(err), exc_info=True)
52+
_log_errors_decorator_logger.exception(str(err))
5053
return
5154
return result
5255

streamdeck_sdk/mixins/event_routing_mixin.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ def ws_on_close(
3535
) -> None:
3636
logger.debug(f"{close_status_code=}; {close_msg=}")
3737
logger.info(f"WS CLOSED")
38+
exit(0)
3839

3940
@log_errors
4041
def ws_on_error(

0 commit comments

Comments
 (0)