Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Not sure where to start in developing a plugin, documentation is fairly limited (Read 2157 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Not sure where to start in developing a plugin, documentation is fairly limited

I've been wanting to develop some plugins for foobar2000 and downloaded the SDK only to find it's not only rather hit-and-miss whether things will actually compile since there's lots of version mismatches and Visual Studio 2017 seems to be having a little bit of trouble still, which is fair enough since reportedly only 2013 and 2015 are verified. But there's very little, if any, documentation for writing plugins that I can find.

Can someone point me in the right direction just to start with - I've had a look around on these forums a bit but I've only found outdated tutorials or really specific cases which can't be applied generally. Even some commented code would go a long way!

Cheers in advance if anyone can provide some help! :)

Re: Not sure where to start in developing a plugin, documentation is fairly limited

Reply #1
Regarding VS2017-
The foobar2000 SDK, version 2015-08-03 is compatible with the latest version of Visual Studio 2017 at this time - I just tested it myself.

There was a period in which Visual Studio auto updater would give you broken platform SDK which made lots of my code fail to compile due to Windows.h vs WinSock #include order issues. This appears to have been fixed on their end.

You can load foo_sample workspace into VS2017, retarget to the new toolchain (original projects are VS2010), optionally enable -XP version of the toolchain in project settings, enable /d2notypeopt as per this thread and you're good to go.

foo_sample demonstrates most commonly used parts of foobar2000 SDK, it's a good starting point to learn how the SDK works. Also don't forget to check the readme doc first, it has lots of essential info on SDK architecture.
Microsoft Windows: We can't script here, this is bat country.

 

Re: Not sure where to start in developing a plugin, documentation is fairly limited

Reply #2
Regarding VS2017-
The foobar2000 SDK, version 2015-08-03 is compatible with the latest version of Visual Studio 2017 at this time - I just tested it myself.

There was a period in which Visual Studio auto updater would give you broken platform SDK which made lots of my code fail to compile due to Windows.h vs WinSock #include order issues. This appears to have been fixed on their end.

You can load foo_sample workspace into VS2017, retarget to the new toolchain (original projects are VS2010), optionally enable -XP version of the toolchain in project settings, enable /d2notypeopt as per this thread and you're good to go.

foo_sample demonstrates most commonly used parts of foobar2000 SDK, it's a good starting point to learn how the SDK works. Also don't forget to check the readme doc first, it has lots of essential info on SDK architecture.

Thanks for the help! There's lots of configurations in the foo_sample project that I found need to be copied over to any other plugin you're writing: the compiler option needed to be switched from /MD to /MT in my case - fixed issues when compiling. I also found out there's lots of plugins on GitHub whose code you can look through and get a grasp of what's going on, the foosion subdomain of foobar2000's website is also quite helpful even if it was originally written for the 0.9.x SDK.