Plugin compiling and framework for beginners

Discuss questions about plugin development with the Hollywood SDK here
User avatar
lazi
Posts: 625
Joined: Thu Feb 24, 2011 11:08 pm

Plugin compiling and framework for beginners

Post 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!
User avatar
airsoftsoftwair
Posts: 5425
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: Plugin compiling and framework for beginners

Post 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.
User avatar
lazi
Posts: 625
Joined: Thu Feb 24, 2011 11:08 pm

Re: Plugin compiling and framework for beginners

Post 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!
User avatar
airsoftsoftwair
Posts: 5425
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: Plugin compiling and framework for beginners

Post by airsoftsoftwair »

Yes, something like that is planned for the full SDK which will contain documentation and some examples of how to write plugins.
User avatar
lazi
Posts: 625
Joined: Thu Feb 24, 2011 11:08 pm

Re: Plugin compiling and framework for beginners

Post by lazi »

Thanks! That will do it surely.
All of your documentations are top notch undoubtedly!
User avatar
airsoftsoftwair
Posts: 5425
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: Plugin compiling and framework for beginners

Post by airsoftsoftwair »

Thanks :)
xz79
Posts: 18
Joined: Thu Mar 14, 2013 10:12 am

Re: Plugin compiling and framework for beginners

Post 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).
User avatar
airsoftsoftwair
Posts: 5425
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: Plugin compiling and framework for beginners

Post 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.
xz79
Posts: 18
Joined: Thu Mar 14, 2013 10:12 am

Re: Plugin compiling and framework for beginners

Post by xz79 »

@airsoftwair:
Thanks.
I'm looking forward to it :)
xz79
Posts: 18
Joined: Thu Mar 14, 2013 10:12 am

Re: Plugin compiling and framework for beginners

Post 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?
Post Reply