From ffe9cd8afe9643c8d7b5e38c39fbe00847ed08e4 Mon Sep 17 00:00:00 2001 From: marios8543 Date: Thu, 26 Oct 2023 23:25:00 +0300 Subject: revert decky_plugin pyinstaller to previous version and fix sys path --- .github/workflows/build-win.yml | 4 ++-- .github/workflows/build.yml | 2 +- backend/src/main.py | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build-win.yml b/.github/workflows/build-win.yml index 118553ba..1ce47d4a 100644 --- a/.github/workflows/build-win.yml +++ b/.github/workflows/build-win.yml @@ -44,10 +44,10 @@ jobs: run: pnpm run build - name: Build Python Backend 🛠️ - run: pyinstaller --noconfirm --onefile --name "PluginLoader" --add-data "./backend/static;/static" --add-data "./backend/locales;/locales" --add-data "./backend/src/legacy;/src/legacy" --add-data "./plugin/*;/" --hidden-import=sqlite3 ./backend/main.py + run: pyinstaller --noconfirm --onefile --name "PluginLoader" --add-data "./backend/static;/static" --add-data "./backend/locales;/locales" --add-data "./backend/src/legacy;/src/legacy" --add-data "./plugin;/plugin" --hidden-import=sqlite3 ./backend/main.py - name: Build Python Backend (noconsole) 🛠️ - run: pyinstaller --noconfirm --noconsole --onefile --name "PluginLoader_noconsole" --add-data "./backend/static;/static" --add-data "./backend/locales;/locales" --add-data "./backend/src/legacy;/src/legacy" --add-data "./plugin/*;/" --hidden-import=sqlite3 ./backend/main.py + run: pyinstaller --noconfirm --noconsole --onefile --name "PluginLoader_noconsole" --add-data "./backend/static;/static" --add-data "./backend/locales;/locales" --add-data "./backend/src/legacy;/src/legacy" --add-data "./plugin;/plugin" --hidden-import=sqlite3 ./backend/main.py - name: Upload package artifact ⬆️ uses: actions/upload-artifact@v3 diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a2b1e29f..2d617db3 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -87,7 +87,7 @@ jobs: run: pnpm run build - name: Build Python Backend 🛠️ - run: pyinstaller --noconfirm --onefile --name "PluginLoader" --add-data ./backend/static:/static --add-data ./backend/locales:/locales --add-data ./backend/src/legacy:/src/legacy --add-data ./plugin/*:/ --hidden-import=sqlite3 ./backend/main.py + run: pyinstaller --noconfirm --onefile --name "PluginLoader" --add-data ./backend/static:/static --add-data ./backend/locales:/locales --add-data ./backend/src/legacy:/src/legacy --add-data ./plugin:/plugin --hidden-import=sqlite3 ./backend/main.py - name: Upload package artifact ⬆️ if: ${{ !env.ACT }} diff --git a/backend/src/main.py b/backend/src/main.py index 83a4b997..ca6eef58 100644 --- a/backend/src/main.py +++ b/backend/src/main.py @@ -182,7 +182,7 @@ def main(): logger.warning(f"decky is running as an unprivileged user, this is not officially supported and may cause issues") # Append the loader's plugin path to the recognized python paths - sys.path.append(path.join(path.dirname(__file__), "plugin")) + sys.path.append(path.join(path.dirname(__file__), "..", "plugin")) # Append the system and user python paths sys.path.extend(get_system_pythonpaths()) -- cgit v1.2.3