Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

CS3 SDK plugin won't load in CS2

New Here ,
May 24, 2007 May 24, 2007
Hello,
Looking at the Illustrator SDK programmer's guide is looks like it should be possible to develop a universal binary plugin using XCode. It appears that its possible to use this universal binary plugin with both CS2 and CS3. When I compile the sample plugins that come with CS3 SDK, they will not load in CS2. "Error loading plugins" This is on an intel mac running 10.4.9. Could anyone shed some light on this situation for me? Do I have to develop two plugins? Does Illustrator output a debug log anywhere which would help me understand what's going on?
TOPICS
SDK
1.1K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe
New Here ,
May 24, 2007 May 24, 2007
Can anyone point me to an existing universal binary plug-in which works with both CS2 and CS3?
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 25, 2007 May 25, 2007
I know from testing that you cannot take a CS2 plugin and use it in CS3 either.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 28, 2007 May 28, 2007
Jon, yes it is possible to do this (i.e. develop a universal binary plug-in using Xcode that loads and runs under Illustrator CS2 and CS3). There are two reasons why the universal binaries for samples from the CS3 SDK don't load and run under CS2.

1) CS2 can't find their plug-in entry point function.

2) The CS3 SDK samples are dependent on versions of suites that are only available in CS3.

Regarding 1 - CS2 will use the entry point function name provided in the 'mach' property in your plug-in's PiPL resource. If the function name provided there is empty CS2 will look for a function named "main" and call that if it is available, otherwise you'll get an "Error loading plug-ins." alert. The behaviour of CS3 is slightly different, if the entry point name is empty it looks first for a function named "PluginMain", then for a function named "main", then gives up with the error alert. The CS3 samples all use an entry point function named "PluginMain" and leave the entry point name empty in their 'mach' property (and their 'mi32' property for that matter). It's straightforward to change this. For example, to name the entry point for the Tutorial sample on the CS3 SDK add the commented line below to Tutorial.r:

#define PIPL_PLUGIN_NAME "Tutorial"
#define PIPL_ENTRY "PluginMain" // add this line
#include "Plugin.r"

Regarding 2 - to have a plug-in that will successfully run under CS2 or CS3 the plug-in must only depend on suites that are available under the host application. The simplest arrangement is to have one plug-in binary that uses the suite versions supported by CS2 - the "lowest common denominator" approach. Alternatively your plug-in can make a run time check of the version of Illustrator it is running under and acquire / use the suite versions appropriately. The CS3 SDK samples don't do either of these things. So if you only make the fix for 1 described above in the Tutorial sample it will still fail to load under CS2 because it will try and acquire suites that are only available in CS3. If you change the Tutorial sample to use the legacy suite versions supported by CS2 (such as AIArtSuite, AIPathSuite,AIDocumentViewSuite, AIUnicodeStringSuite and AIToolSuite whose headers you'll find in the AI120xxx header files in the legacy folder on the CS3 SDK) you can implement a lowest common denominator approach for the sample and it should at least startup cleanly under CS2. There may be further changes required to get all the features of the sample to run properly.

I haven't had much luck getting the Xcode 2.4.1 debugger to host a debug session under Illustrator CS2 - so debugging is painful. But it may well be my own lack of Xcode / gdb knowledge that's the barrier here.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 28, 2007 May 28, 2007
LATEST
Karen, could you provide more info - I've tested the CS2 SDK sample plug-ins under Illustrator CS3 and they appear to work. Is there a particular platform you are finding problems getting CS2 plug-ins to run under CS3? On Windows it should be straight forward - plug-ins built with the CS2 SDK load and run under CS3. On Macintosh there are subtleties you need to be aware of. If CS3 is not loading a plug-in built with the CS2 SDK on the Macintosh check the following:

1) the file extension of your plug-in is ".aip"

2) your plug-in has a valid PiPL resource

Illustrator CS2 is a PowerPC Macintosh application - plug-ins must have a 'mach' property in their PiPL (for their MachO code) and/or a 'ppcb' property in their PiPL for the older PEF Carbon code.

Illustrator CS3 is a Universal Binary Macintosh application - plug-ins should have a 'mach' property in their PiPL (for their MachO codewhen running on PPC platforms or on Intel platforms under Rosetta) and / or a 'mi32' property (for their Intel code when running on Intel Mac platforms).

It's possible your CS2 plug-ins only have a 'ppcb' property in their PiPL resource specifying their old Carbon entry point. Illustrator CS3 won't recognise such plug-ins.

It's possible your CS2 plug-ins have a 'mach' resource but you are running on Illustrator CS3 natively an Intel platform. You'll need to run Illustrator CS3 under Rosetta to have your plug-ins load, or, port your plug-in to the CS3 SDK as a Universal Binary with both 'mach' and 'mi32' properties in your PiPL.

Seoras
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines