Compare commits

...

4 Commits

Author SHA1 Message Date
jurassicplayer 22d579512d Preserve plugin order when reinstalling/updating (#530) 2023-08-28 07:00:37 -07:00
Marco Rodolfi caf4d75a06 Fix for SELinux handling logic (#529)
* Fix for SELinux handling logic

The old procedure was crashing with signal 9 SIGKILL, this should fix that problem
2023-08-26 19:00:02 +02:00
Marco Rodolfi a43e4328df Rollback to Python 3.10.6 for possible regression 2023-08-25 19:59:56 +02:00
TrainDoctor 0ede024771 Update README.md 2023-08-25 10:36:55 -07:00
5 changed files with 18 additions and 8 deletions
+2 -2
View File
@@ -47,10 +47,10 @@ jobs:
with:
node-version: 18
- name: Set up Python 3.11.4 🐍
- name: Set up Python 3.10.6 🐍
uses: actions/setup-python@v4
with:
python-version: "3.11.4"
python-version: "3.10.6"
- name: Upgrade SQLite 3 binary version to 3.42.0 🧑‍💻
run: >
+1
View File
@@ -35,6 +35,7 @@ For more information about Decky Loader as well as documentation and development
### 🤔 Common Issues
- Syncthing may use port 8080 on Steam Deck, which Decky Loader needs to function. If you are using Syncthing as a service, please change its port to something else.
- 8384 is the recommended port for Syncthing.
- If you are using any software that uses port 1337 or 8080, please change its port to something else or uninstall it.
- Sometimes Decky will disappear on SteamOS updates. This can easily be fixed by just re-running the installer and installing the stable branch again. If this doesn't work, try installing the prerelease instead. If that doesn't work, then [check the existing issues](https://github.com/SteamDeckHomebrew/decky-loader/issues) and if there isn't one then you can [file a new issue](https://github.com/SteamDeckHomebrew/decky-loader/issues/new?assignees=&labels=bug&template=bug_report.yml&title=%5BBUG%5D+%3Ctitle%3E).
+5 -3
View File
@@ -139,6 +139,8 @@ class PluginBrowser:
# Check if plugin is installed
isInstalled = False
# Preserve plugin order before removing plugin (uninstall alters the order and removes the plugin from the list)
current_plugin_order = self.settings.getSetting("pluginOrder")[:]
if self.loader.watcher:
self.loader.watcher.disabled = True
try:
@@ -191,9 +193,9 @@ class PluginBrowser:
self.loader.plugins[name].stop()
self.loader.plugins.pop(name, None)
await sleep(1)
current_plugin_order = self.settings.getSetting("pluginOrder")
current_plugin_order.append(name)
if not isInstalled:
current_plugin_order = self.settings.getSetting("pluginOrder")
current_plugin_order.append(name)
self.settings.setSetting("pluginOrder", current_plugin_order)
logger.debug("Plugin %s was added to the pluginOrder setting", name)
self.loader.import_plugin(path.join(plugin_dir, "main.py"), plugin_folder)
+7 -1
View File
@@ -43,4 +43,10 @@ def get_log_level() -> int:
]
def get_selinux() -> bool:
return os.getenv("DECKY_SELINUX", "0") == "1"
if ON_LINUX:
from subprocess import check_output
try:
if (check_output("getenforce").decode("ascii").strip("\n") == "Enforcing"): return True
except FileNotFoundError:
pass
return False
+3 -2
View File
@@ -209,8 +209,9 @@ class Updater:
shutil.move(path.join(getcwd(), download_temp_filename), path.join(getcwd(), download_filename))
chmod(path.join(getcwd(), download_filename), 777, False)
if get_selinux():
from subprocess import call
call(["chcon", "-t", "bin_t", path.join(getcwd(), download_filename)])
from asyncio.subprocess import create_subprocess_exec
process = await create_subprocess_exec("chcon", "-t", "bin_t", path.join(getcwd(), download_filename))
logger.info(f"Setting the executable flag with chcon returned {await process.wait()}")
logger.info("Updated loader installation.")
await tab.evaluate_js("window.DeckyUpdater.finish()", False, False)