Skip to main content
Known Participant
August 30, 2006
Question

Multiple plug-ins in one file (CodeCarbonPowerPC)?

  • August 30, 2006
  • 10 replies
  • 753 views
I'm trying to put 3 plug-ins in one file.
Very simple on Windows (3 PiPL resource blocks with different entrypoints).
And don't worked on PowerPC:

CodeCarbonPowerPC(0,0,"") <-- what is last parameter (string)?

Any example?

Thanks,
Ivan Kharin
This topic has been closed for replies.

10 replies

Known Participant
September 5, 2006
Thanks!
Inspiring
September 5, 2006
Apologies for the confusion, that's a "custom" PiPL.r created some time ago before I saw the PS7 SDK, Adobe called it something different. You'll have to refer to the official SDK for the precise name but in other respects it's identical of course. I've never used the third parameter, but my v6 documentation describes it as follows:

Pstring fEntryName

Pascal string used to lookup the address of the function
to call within the fragment. In order for the Code
Fragment Manager to find an entrypoint by name,
that name must be an exported symbol of the code
fragment. If NULL, the default entrypoint will be used.
fEntryName allows a single code fragment to contain
more than one plug-in.


One day I mean to regularise my sources to match their official published selectors for Carbon CFM and Mach-O... The disparity is an artefact of the SDK's Iron Curtain period.
Known Participant
September 4, 2006
according to PiPL_universal.r:

CodePowerPCbundle { 0, CARBON_LENGTH, "" },
CodePowerPC { CARBON_LENGTH, CLASSIC_LENGTH, "" },

First parameter is file offset, second -- binary image length?
I'm correct?

BTW, i can't find CodePowerPCbundle in my PiPL.r (Adobe Photoshop CS2 SDK).
key longint = ????
Inspiring
September 2, 2006
Ivan, it should be clear from my MPW makefiles (via link above). Also you should be able to find this documented in the SDK, and/or in PiPL.r.
Known Participant
September 2, 2006
> Just link separately and set the appropriate executable offset and length in each respective PiPL. (This can be automated by MPW, of course.)

Interesting. How to specify executable offset and length -- which PiPL attribute?
Known Participant
September 2, 2006
> Just make sure you have the correct entry point names, and are exporting those entry points correctly.

hmm... any link to example? MPW-based, if possible?
Chris Cox
Legend
September 1, 2006
You can have all 3 entry points in a single binary - several companies do this, and Adobe does it for several plugins.

Just make sure you have the correct entry point names, and are exporting those entry points correctly.
Inspiring
September 1, 2006
The same approach used to package Carbon/Classic in one file can be used to ship multiple Carbon plugins. Just link separately and set the appropriate executable offset and length in each respective PiPL. (This can be automated by MPW, of course.)

If you don't wish to link separately and instead want multiple entry points, I have not done that. Perhaps someone from Adobe can confirm whether that works.
Known Participant
August 31, 2006
After checking Filter Foundry i don't find *many* distinct plugins in *one* binary module for Mac OS X (Carbon only).
Only Classic/Carbon as universal binary module.

I want to put three plug-ins into one binary file and call each via different menu item in "Filters".

Attempt to specify different entrypoints as

CodeCarbonPowerPC( 0,0, "ENTRY1" );

...

CodeCarbonPowerPC( 0,0, "ENTRY2" );

failed -- photoshop always call main entry point of binary module
(specified as -m parameter in PPCLink).

Any clue?
Inspiring
August 30, 2006
Easy - all my plugin projects do this - examine the MPW makefiles.