diff options
| author | xXJSONDeruloXx <danielhimebauch@gmail.com> | 2025-01-23 19:55:32 -0500 |
|---|---|---|
| committer | xXJSONDeruloXx <danielhimebauch@gmail.com> | 2025-01-23 19:55:32 -0500 |
| commit | dba49f035b5dd0259c3fc3fa2da4aadd3bb9985b (patch) | |
| tree | c662db39f3ef0ffb9d12307f4e45b46913da233a | |
| parent | 049b5f3d4ce58cb067c9ec44d222e059c295861e (diff) | |
| download | Decky-Framegen-dba49f035b5dd0259c3fc3fa2da4aadd3bb9985b.tar.gz Decky-Framegen-dba49f035b5dd0259c3fc3fa2da4aadd3bb9985b.zip | |
updated readme
| -rw-r--r-- | README.md | 115 | ||||
| -rwxr-xr-x | src/index.tsx | 6 |
2 files changed, 35 insertions, 86 deletions
@@ -1,101 +1,48 @@ -# Decky Plugin Template [](https://deckbrew.xyz/discord) +# Decky Framegen 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. +This plugin swaps DLSS with FSR to enable upscaling and frame generation in games without built-in FSR support. -### **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.** +## Features -## Developers +- Install and uninstall Framegen mod +- Check if Framegen mod path exists -### Dependencies - -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. -`pnpm` can be downloaded from `npm` itself which is recommended. - -#### Linux - -```bash -sudo npm i -g pnpm@9 -``` +## Installation -If you would like to build plugins that have their own custom backends, Docker is required as it is used by the Decky CLI tool. +1. Clone the repository: + ```bash + git clone https://github.com/SteamDeckHomebrew/decky-plugin-template.git + cd decky-plugin-template + ``` -### Making your own plugin +2. Install dependencies: + ```bash + pnpm install + ``` -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: - 1. ``pnpm i`` - 2. ``pnpm run build`` - - 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. - - Documentation and examples are still rough, - - 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. +3. Build the plugin: + ```bash + pnpm run build + ``` -If you use VSCode or it's derivatives (we suggest [VSCodium](https://vscodium.com/)!) just run the `setup` and `build` tasks. It's really that simple. +## Usage -#### Other important information - -Everytime you change the frontend code (`index.tsx` etc) you will need to rebuild using the commands from step 2 above or the build task if you're using vscode or a derivative. - -Note: If you are receiving build errors due to an out of date library, you should run this command inside of your repository: - -```bash -pnpm update @decky/ui --latest -``` +### Frontend -### Backend support +The frontend code is located in [index.tsx](http://_vscodecontentref_/1). It uses the `@decky/ui` and `@decky/api` libraries to create the UI and interact with the backend. -If you are developing with a backend for a plugin and would like to submit it to the [decky-plugin-database](https://github.com/SteamDeckHomebrew/decky-plugin-database) you will need to have all backend code located in ``backend/src``, with backend being located in the root of your git repository. -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. +### Backend -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. +The backend code is located in [main.py](http://_vscodecontentref_/2). It handles the installation and uninstallation of the Framegen mod. -```make -hello: - mkdir -p ./out - gcc -o ./out/hello ./src/main.c -``` +### Scripts -The CI does create the `out` folder itself but we recommend creating it yourself if possible during your build process to ensure the build process goes smoothly. +- [prepare.sh](http://_vscodecontentref_/3): Prepares the environment for the Framegen mod installation. It downloads necessary files and sets up the mod path. Located in [prepare.sh](http://_vscodecontentref_/4). -Note: When locally building your plugin it will be placed into a folder called 'out' this is different from the concept described above. +## Development -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. - -### Distribution - -We recommend following the instructions found in the [decky-plugin-database](https://github.com/SteamDeckHomebrew/decky-plugin-database) on how to get your plugin up on the plugin store. This is the best way to get your plugin in front of users. -You can also choose to do distribution via a zip file containing the needed files, if that zip file is uploaded to a URL it can then be downloaded and installed via decky-loader. - -**NOTE: We do not currently have a method to install from a downloaded zip file in "game-mode" due to lack of a usable file-picking dialog.** - -Layout of a plugin zip ready for distribution: -``` -pluginname-v1.0.0.zip (version number is optional but recommended for users sake) - | - pluginname/ <directory> - | | | - | | bin/ <directory> (optional) - | | | - | | binary (optional) - | | - | dist/ <directory> [required] - | | - | index.js [required] - | - package.json [required] - plugin.json [required] - main.py {required if you are using the python backend of decky-loader: serverAPI} - README.md (optional but recommended) - LICENSE(.md) [required, filename should be roughly similar, suffix not needed] -``` - -Note regarding licenses: Including a license is required for the plugin store if your chosen license requires the license to be included alongside usage of source-code/binaries! - -Standard procedure for licenses is to have your chosen license at the top of the file, and to leave the original license for the plugin-template at the bottom. If this is not the case on submission to the plugin database, you will be asked to fix this discrepancy. +### Dependencies -We cannot and will not distribute your plugin on the Plugin Store if it's license requires it's inclusion but you have not included a license to be re-distributed with your plugin in the root of your git repository. +This template relies on Node.js v16.14+ and `pnpm` (v9). Install `pnpm` using: +```bash +sudo npm i -g pnpm@9
\ No newline at end of file diff --git a/src/index.tsx b/src/index.tsx index 6992b23..b20bf59 100755 --- a/src/index.tsx +++ b/src/index.tsx @@ -174,7 +174,9 @@ function MainRunningApp() { }; useEffect(() => { - checkLaunchOptions(); + if (mainRunningApp) { + checkLaunchOptions(); + } }, [mainRunningApp]); const handleSetLaunchOptions = async () => { @@ -204,7 +206,7 @@ function MainRunningApp() { <div> {mainRunningApp ? ( <> - <span>{isPatched ? `Ready to: ${mainRunningApp.display_name}` : `Patch: ${mainRunningApp.display_name}`}</span> + <span>{isPatched ? `UnPatch: ${mainRunningApp.display_name}` : `Patch: ${mainRunningApp.display_name}`}</span> <ButtonItem layout="below" onClick={handleSetLaunchOptions}> {isPatched ? `UnPatch: ${mainRunningApp.display_name}` : `Patch: ${mainRunningApp.display_name}`} </ButtonItem> |
