Page 1 of 2

Plugin compiling and framework for beginners

Posted: Tue Feb 19, 2013 4:39 pm
by lazi
Hi Andreas!

Played a bit with the plugin sources you made available. Not be a hardcore C programmer even compiling it is a challenge for me.

First I tried the vectorgraphics plugin.
After copied the hollywood sdk and the freetype includes into the SDK it is almost compiled.

> gcc plugin.c
plugin.c: In function 'InitPlugin':
plugin.c:63: error: 'HWPLUG_APIVERSION' undeclared (first use in this function)
plugin.c:63: error: (Each undeclared identifier is reported only once
plugin.c:63: error: for each function it appears in.)

What that error means, and how can I rid of it?

Could you provide us a simple framework which need no dependecies and easy to compile just to get started somehow?

Thanks!

Re: Plugin compiling and framework for beginners

Posted: Tue Feb 19, 2013 6:58 pm
by airsoftsoftwair
The HWPLUG_APIVERSION constant is now called HWPLUG_APIVERSION_CUR or HWPLUG_APIVERSION_MIN (see hollywood.h for definitions). I'm working on a better documentation of the SDK. However, I have to warn you that it is not very easy because on AmigaOS all code that is loaded at runtime of the program (such as shared libraries) faces several limitations, one of them being that many standard C functions cannot be used because the C runtime constructor and destructor code is never called. Hollywood works around this limitation by exposing its own C runtime interface with the most popular functions in CRTBase (see hollywood.h). But still, if you use normal C link libraries you have to replace all calls that require the C runtime constructor/destructor code (like fopen(), printf(), sprintf()...) with custom code or a redirection to Hollywood's CRTBase functions.

To make a long story short: If you do not have any C experience at all, it is probably not a good idea to start learning C by writing Hollywood plugins :) You also need to use special linker options because you must not link the startup code etc etc. Pretty complicated and different for each platform you're going to support.

Re: Plugin compiling and framework for beginners

Posted: Tue Feb 19, 2013 7:24 pm
by lazi
Thanks for clarify the situation a bit, however I can't understand half of that half as well as I should like :)

For a first step I would be satisfied with a plugin framework with a new command which can get parameters and could give back results. I don't plan to use any system dependency currently.

Bye!

Re: Plugin compiling and framework for beginners

Posted: Wed Feb 20, 2013 9:51 pm
by airsoftsoftwair
Yes, something like that is planned for the full SDK which will contain documentation and some examples of how to write plugins.

Re: Plugin compiling and framework for beginners

Posted: Wed Feb 20, 2013 11:21 pm
by lazi
Thanks! That will do it surely.
All of your documentations are top notch undoubtedly!

Re: Plugin compiling and framework for beginners

Posted: Tue Feb 26, 2013 7:19 pm
by airsoftsoftwair
Thanks :)

Re: Plugin compiling and framework for beginners

Posted: Sat Nov 01, 2014 4:43 am
by xz79
airsoftsoftwair wrote:Yes, something like that is planned for the full SDK which will contain documentation and some examples of how to write plugins.
Is the full sdk still on your schedule?
It would be great if there was at least some little tutorial for making plugins for simple purposes (e.g. a hollywood program passes a string to a plugin. The plugin uses a certain regex on that string and returns the result).

Re: Plugin compiling and framework for beginners

Posted: Sat Nov 01, 2014 12:03 pm
by airsoftsoftwair
Yes, it is. There will soon be a dedicated SDK section in this forum as well as a 300+ pages manual for writing plugins. And some example skeleton plugins to get you started as well.

Re: Plugin compiling and framework for beginners

Posted: Sat Nov 01, 2014 3:37 pm
by xz79
@airsoftwair:
Thanks.
I'm looking forward to it :)

Re: Plugin compiling and framework for beginners

Posted: Mon Feb 23, 2015 10:22 pm
by xz79
@airsoftwair:
Thank you very much for the release of Hollywood 6.0. I consider it to be one of the best software packages for the Amiga.

I was also happy to see that the history file says, that the plugin SDK documentation of 300+ pages is now released.
Where can you find it? Will it be put on the Hollywood homepage?