SteamDeckHomebrew / decky-loader

A plugin loader for the Steam Deck.
https://decky.xyz
GNU General Public License v2.0
4.26k stars 154 forks source link

import decky_plugin during plugin loading and set it up as module #545

Closed Jan200101 closed 6 months ago

Jan200101 commented 9 months ago

Please tick as appropriate:

Description

Currently the plugin logic relies on decky_plugin.py being on the path, this PR makes it so that decky_plugin is loaded directly and put into the sys modules ready to be used.

Tested against 2 copies of the plugin template with prints added to verify that the imported instance desky_plugin is indeed different.

Had to import from an absolute path because relative imports can only be done in a package

Jan200101 commented 8 months ago

completely untested both with and without PyInstaller. Plugin path may be wrong, idk.