Photoshop SDK Hello World in 2016
Hello!
I'm in the process of figuring out the basics of creating Photoshop plugins using the SDK. Seems like most of the info and tutorials are somewhat dated and not so approachable. I have been able to build the Listener and Getter examples from the SDK using VS2015 and had Listener spitting out correct-seeming output. Now I would like to set up a Hello World project so that I understand the bare essentials required for a PS SDK Automation plugin. For my personal use I'm only interested in the Win version, but it seems easy enough to set things up so that Mac can be added later. I'm mostly a scripting guy with a tiny bit of C++ experience and I do not often set up Visual Studio projects. Here's what I've gathered so far:
Dir structure:
HelloWorldPlugin
HelloWorldPlugin\common
HelloWorldPlugin\win
(HelloWorldPlugin\mac)
Common files:
* PiPL (Plug-in Property List) describing what kind of plugin this is (e.g. HelloWorldPlugin\common\HelloWorldPluginPiPL.r). I stitched up a version that seems like it could work in todays world with 64-bit machines taken into account. It is a combo of code from Automation Tutorial.pdf from the SDK and some forum post somewhere. Here: HelloWorldPluginPiPL.r - Pastebin.com
* A source file with an entry point (duh :P). I'm working in C++ so this could be a function called PluginMain inside HelloWorldPlugin\common\HelloWorldPlugin.cpp. The function name is defined in the PiPL.
Windows/Visual Studio setup:
* Photoshop SDK includes in the VS Include Directories (e.g. $(PhotoshopSDK)\photoshopapi\photoshop;$(PhotoshopSDK)\samplecode\common\includes [TODO: add rest of paths])
* Build PiPL info into the plugin (using Cnvtpipl.exe on Win), specifics unclear
* Output a DLL with .8li extension (VS Project Properties > Configuration Properties > General > Target Extension)
...aaaaand I think that's all I have for now. It's still unclear for me what are the bare essential contents of the main source file and PluginMain. If the only function of the plugin is to trigger an alert saying 'Hello World!', which \samplecode\common\includes\PI[SomethingSomething].h header files do I need to include if any? Which function do I use to actually trigger the alert!? On the Windows side, which resource files (e.g. resource.h, HelloWorldPlugin.rc) are absolutely essential and how to generate them? Have I missed something completely?
I'll keep on scanning the docs and the web for answers to my questions, but I wanted to write all this down just to clarify my thinking a bit and possibly attract tips from someone more knowledgeable.
