Playnite Forums
  • Playnite Web
  • Rules
  • Members
  • Team
  • Search
  • Register
  • Login
  • Home
  • Members
  • Help
  • Search
Playnite Forums Development Extensions Build Guide?

Build Guide?
templewulf
Offline

#1
09-20-2020, 06:13 PM
I checked the wiki, but I couldn't find a build guide for new extension developers. There aren't any insurmountable problems, but it would save time to know the expected process to get to a working baseline project.

For example, the missing XBOXONE.ttf and PlayStation4.ttf fonts cause build errors. As far as I can tell, this isn't mentioned in the wiki or anywhere in code. Only in .gitignore:276 does it say `# Not redistributable`. Similarly, if one tries to build Playnite.sln before building PlayniteServices.sln, they'll be faced with a lot of errors without a clear cause.

Are there any guides or checklists or anything that I've missed that would cover these kinds of errors?

Thanks!
darklinkpower
Offline

Super Moderator
#2
09-20-2020, 10:31 PM
https://github.com/JosefNemec/Playnite#development
There is an article in the wiki: https://github.com/JosefNemec/Playnite/wiki/Building
After doing that run build\build.ps1

But I don't understand, why do you require to build Playnite for an extension?
Crow
Offline

Administrator
#3
09-21-2020, 05:55 AM
You don't need to build Playnite if you are developing extensions. You can just load up resulting script or plugin in standard Playnite installation.

https://playnite.link/docs/tutorials/intro.html
templewulf
Offline

#4
09-21-2020, 09:54 PM
The main reason is that I want to extend the HumbleLibrary classes, rather than just rewriting them. I can always just copy the code from GitHub, but extending would make it more maintainable in the case of API changes.
templewulf
Offline

#5
09-23-2020, 02:46 AM (This post was last modified: 09-23-2020, 02:47 AM by templewulf.)
Moving ahead on compiling the plugin separately, how should I approach debugging? Compiling, packing, and installation were successful, AFAIK, but Playnite logs a FileNotFoundException when loading my library plugin.

Toolbox.log
2020-09-22 15:34:56.5895|DEBUG|Playnite.Toolbox.Program|Toolbox started.
2020-09-22 15:34:56.6024|DEBUG|Playnite.Toolbox.Program|C:\\Users\\templ\\Software\\PlayniteTest\\Toolbox.exe pack C:/Users/templ/Projects/desktop/HumbleKeysLibrary/ C:/Users/templ/Downloads/humblekeys/
2020-09-22 15:34:58.6283|INFO|Playnite.Toolbox.Program|LibraryPlugin successfully packed as "C:/Users/templ/Downloads/humblekeys/HumbleKeysLibrary_0_1_0.pext"

Playnite.log
2020-09-22 22:27:25.0838|INFO:Loaded plugin: Epic Store Library Importer
2020-09-22 22:27:25.0848|ERROR:Failed to load plugin: Humble Keys Library ImporterSystem.IO.FileNotFoundException: The system cannot find the file specified. (Exception from HRESULT: 0x80070002)
2020-09-22 22:27:25.0848|DEBUG:HumbleKeysLibrary constructor
2020-09-22 22:27:25.0848|DEBUG:HumbleKeysLibrarySettings constructor
2020-09-22 22:27:25.0848|DEBUG:HumbleKeysLibrarySettings constructor, after LoadPluginSettings, before LoadValues

The exception doesn't include what file path it attempted to access, so I searched for "Failed to load plugin" and saw it in ExtensionFactory:379. At this point, I'm dissecting LoadPlugins and finding that I need more domain-specific knowledge to track this down than I expected.

Any suggestions?
Crow
Offline

Administrator
#6
09-23-2020, 05:58 AM
You are probably not packaging some dependency. To test you don't need to put extension into pext file, just build the output to correct output directory (explained in the doc I linked) and then attach debugger to running Playnite process.
templewulf
Offline

#7
09-30-2020, 01:51 AM (This post was last modified: 09-30-2020, 05:37 PM by templewulf.)
(09-23-2020, 05:58 AM)Crow Wrote: You are probably not packaging some dependency. To test you don't need to put extension into pext file, just build the output to correct output directory (explained in the doc I linked) and then attach debugger to running Playnite process.
Thanks for the tip! I'm pretty sure you're right, but I had to clean and rebuild and generally shake Visual Studio by the shoulders, and now it works fine with no changes to my code or build configuration. ¯\_(ツ)_/¯

Edit: Oh wait, I saw what happened! The import was failing, because my NuGet version of Newtonsoft was 10.0.3, but VS kept reporting it as 9.0.0! So NuGet had 10.0.3, I compiled against 10.0.3, and Playnite supplies the 10.0.3 dependency, but somehow VS was serving the wrong version number!

Even after uninstalling and reinstalling Newtonsoft, it just stayed 9.0.0 regardless of what NuGet said. I had to close VS, re-open, uninstall PlayniteSDK, uninstall Newtonsoft, restart VS, install Newtonsoft 10.0.3, install PlayniteSDK Latest, restart VS again, then it finally worked.

I love VS, but it is absolutely wild sometimes.
« Next Oldest | Next Newest »



  • View a Printable Version
  • Subscribe to this thread

© Designed by D&D - Powered by MyBB

Linear Mode
Threaded Mode