This commit is contained in:
saxc 2025-07-11 14:46:23 -06:00 committed by GitHub
commit bb1e608d2a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -2,14 +2,14 @@
Reference example for using [decky-frontend-lib](https://github.com/SteamDeckHomebrew/decky-frontend-lib) (@decky/ui) in a [decky-loader](https://github.com/SteamDeckHomebrew/decky-loader) plugin. Reference example for using [decky-frontend-lib](https://github.com/SteamDeckHomebrew/decky-frontend-lib) (@decky/ui) in a [decky-loader](https://github.com/SteamDeckHomebrew/decky-loader) plugin.
### **Please also refer to the [wiki](https://wiki.deckbrew.xyz/en/user-guide/home#plugin-development) for important information on plugin development and submissions/updates. currently documentation is split between this README and the wiki which is something we are hoping to rectify in the future.** ### **Please also refer to the [wiki](https://wiki.deckbrew.xyz/en/user-guide/home#plugin-development) for important information on plugin development and submissions/updates. currently documentation is split between this README and the wiki which is something we are hoping to rectify in the future.**
## Developers ## Developers
### Dependencies ### Dependencies
This template relies on the user having Node.js v16.14+ and `pnpm` (v9) installed on their system. This template relies on the user having Node.js v16.14+ and `pnpm` (v9) installed on their system.
Please make sure to install pnpm v9 to prevent issues with CI during plugin submission. Please make sure to install pnpm v9 to prevent issues with CI during plugin submission.
`pnpm` can be downloaded from `npm` itself which is recommended. `pnpm` can be downloaded from `npm` itself which is recommended.
#### Linux #### Linux
@ -24,11 +24,11 @@ If you would like to build plugins that have their own custom backends, Docker i
1. You can fork this repo or utilize the "Use this template" button on Github. 1. You can fork this repo or utilize the "Use this template" button on Github.
2. In your local fork/own plugin-repository run these commands: 2. In your local fork/own plugin-repository run these commands:
1. ``pnpm i`` 1. `pnpm i`
2. ``pnpm run build`` 2. `pnpm run build`
- These setup pnpm and build the frontend code for testing. - These setup pnpm and build the frontend code for testing.
3. Consult the [decky-frontend-lib](https://github.com/SteamDeckHomebrew/decky-frontend-lib) repository for ways to accomplish your tasks. 3. Consult the [decky-frontend-lib](https://github.com/SteamDeckHomebrew/decky-frontend-lib) repository for ways to accomplish your tasks.
- Documentation and examples are still rough, - Documentation and examples are still rough,
- Decky loader primarily targets Steam Deck hardware so keep this in mind when developing your plugin. - Decky loader primarily targets Steam Deck hardware so keep this in mind when developing your plugin.
4. If using VSCodium/VSCode, run the `setup` and `build` and `deploy` tasks. If not using VSCodium etc. you can derive your own makefile or just manually utilize the scripts for these commands as you see fit. 4. If using VSCodium/VSCode, run the `setup` and `build` and `deploy` tasks. If not using VSCodium etc. you can derive your own makefile or just manually utilize the scripts for these commands as you see fit.
@ -50,7 +50,7 @@ If you are developing with a backend for a plugin and would like to submit it to
When building your plugin, the source code will be built and any finished binary or binaries will be output to ``backend/out`` (which is created during CI.) When building your plugin, the source code will be built and any finished binary or binaries will be output to ``backend/out`` (which is created during CI.)
If your buildscript, makefile or any other build method does not place the binary files in the ``backend/out`` directory they will not be properly picked up during CI and your plugin will not have the required binaries included for distribution. If your buildscript, makefile or any other build method does not place the binary files in the ``backend/out`` directory they will not be properly picked up during CI and your plugin will not have the required binaries included for distribution.
Example: Example:
In our makefile used to demonstrate the CI process of building and distributing a plugin backend, note that the makefile explicitly creates the `out` folder (``backend/out``) and then compiles the binary into that folder. Here's the relevant snippet. In our makefile used to demonstrate the CI process of building and distributing a plugin backend, note that the makefile explicitly creates the `out` folder (``backend/out``) and then compiles the binary into that folder. Here's the relevant snippet.
```make ```make
@ -63,7 +63,7 @@ The CI does create the `out` folder itself but we recommend creating it yourself
Note: When locally building your plugin it will be placed into a folder called 'out' this is different from the concept described above. Note: When locally building your plugin it will be placed into a folder called 'out' this is different from the concept described above.
The out folder is not sent to the final plugin, but is then put into a ``bin`` folder which is found at the root of the plugin's directory. The out folder is not sent to the final plugin, but is then put into a ``bin`` folder which is found at the root of the plugin's directory.
More information on the bin folder can be found below in the distribution section below. More information on the bin folder can be found below in the distribution section below.
### Distribution ### Distribution
@ -86,7 +86,7 @@ pluginname-v1.0.0.zip (version number is optional but recommended for users sake
| dist/ <directory> [required] | dist/ <directory> [required]
| | | |
| index.js [required] | index.js [required]
| |
package.json [required] package.json [required]
plugin.json [required] plugin.json [required]
main.py {required if you are using the python backend of decky-loader: serverAPI} main.py {required if you are using the python backend of decky-loader: serverAPI}