diff --git a/backend/requirements_windows.txt b/backend/requirements_windows.txt deleted file mode 100644 index e44f79e15..000000000 --- a/backend/requirements_windows.txt +++ /dev/null @@ -1 +0,0 @@ -pywin32==304 diff --git a/backend/setup.py b/backend/setup.py index 6e381d5d7..3be383282 100644 --- a/backend/setup.py +++ b/backend/setup.py @@ -1,6 +1,5 @@ """Setup""" import io -import platform from setuptools import find_packages, setup @@ -12,13 +11,6 @@ with io.open("requirements.txt", encoding="utf-8") as f: requirements = f.read().splitlines() -if platform.system() == "Windows": - with io.open("requirements_windows.txt", encoding="utf-8") as f: - requirements = [ - *requirements, - *f.read().splitlines(), - ] - package_data = ["icon.png", "icon.ico"] setup( diff --git a/backend/systembridgebackend/autostart/windows.py b/backend/systembridgebackend/autostart/windows.py index 00ac09331..42b7f9e74 100644 --- a/backend/systembridgebackend/autostart/windows.py +++ b/backend/systembridgebackend/autostart/windows.py @@ -1,4 +1,5 @@ """System Bridge: Autostart Windows""" +import os import platform import sys @@ -52,6 +53,6 @@ def autostart_windows_enable(): "systembridgebackend", 0, REG_SZ, - f'"{sys.executable}" -m systembridgebackend --silent', + f'"{os.path.join(os.path.dirname(sys.executable), "pythonw.exe")}" -m systembridgebackend --silent', ) CloseKey(key) diff --git a/backend/systembridgebackend/server/__init__.py b/backend/systembridgebackend/server/__init__.py index 12b0f0ff9..aa79c3686 100644 --- a/backend/systembridgebackend/server/__init__.py +++ b/backend/systembridgebackend/server/__init__.py @@ -358,6 +358,5 @@ def stop_server(self) -> None: pending_task.cancel() self._logger.info("Stop the event loop") loop.stop() - # self._server.enable_websocket(False) self._listeners.remove_all_listeners() self._server.stop() diff --git a/backend/systembridgebackend/shortcut/windows.py b/backend/systembridgebackend/shortcut/windows.py index c715da939..4e77ffc61 100644 --- a/backend/systembridgebackend/shortcut/windows.py +++ b/backend/systembridgebackend/shortcut/windows.py @@ -37,6 +37,6 @@ def create_windows_shortcuts(): shortcut.Arguments = "-m systembridgebackend --silent" shortcut.Description = "System Bridge" shortcut.IconLocation = os.path.join(os.path.dirname(__file__), "../icon.ico") - shortcut.Targetpath = sys.executable + shortcut.Targetpath = os.path.join(os.path.dirname(sys.executable), "pythonw.exe") shortcut.WorkingDirectory = sys.prefix shortcut.save() diff --git a/windowssensors/WindowsSensors/SystemBridgeWindowsSensors.csproj b/windowssensors/WindowsSensors/SystemBridgeWindowsSensors.csproj index f874f56ef..809fa2625 100644 --- a/windowssensors/WindowsSensors/SystemBridgeWindowsSensors.csproj +++ b/windowssensors/WindowsSensors/SystemBridgeWindowsSensors.csproj @@ -5,7 +5,7 @@ Debug AnyCPU {058EAD2E-13C9-4586-9039-AE097F3AC080} - Exe + WinExe SystemBridgeWindowsSensors SystemBridgeWindowsSensors v4.8