Skip to main content
February 9, 2011
Question

Porting plugin from Windows to MAC,problem with the resource file

  • February 9, 2011
  • 1 reply
  • 860 views

Hi,

I have created a plugin which has a custom cursor and it's working fine on windows. Now I want to port it onto the MAC. I am having trouble with the resource file as I have never worked on MAC. I have a bmp file for the cursor as well as the .cur file.I looked at the sample Snapshot tool's resource file but was unable to figure out how they created such a file (it has all hex data in it). Can anyone help me on how to go about writing the resource file for MAC?

Thanks

This topic has been closed for replies.

1 reply

JADarnell
Inspiring
February 9, 2011

Mr. Sachedeva:

   It's really hard to help out when we don't know exactly what error you are receiving.  Can you please provide that and maybe we can provide some information.

R,

John

February 10, 2011

The problem is that my plugin loads successfully but it is unable to load my cursor because the resources are missing, So I add a resource file (taken from snapshot tool) to it which has the following code

#include "resource.h"

#include "SDKDef.h"

#define kCurToolPlusResource                115

#ifdef MACINTOSH
// Macintosh specific resources: ---------------------------------------------------------

#include <mactypes.r>

data 'CURS' (kCurToolPlusResource, "tool_cursor", preload)
{
    $"FFFE 8003 8E3B 913B A083 A083 A083 9103"            /* ˇ˛Ä.é;ë;†É†É†Éë. */
    $"8E03 8003 FFFF 3FFF 0000 0000 0000 0000"            /* é.Ä.ˇˇ?ˇ........ */
    $"0000 0000 0000 0000 0000 0000 0000 0000"            /* ................ */
    $"0000 0000 0000 0000 0000 0000 0000 0000"            /* ................ */
    $"0000 0000"                                          /* .... */
};

#else
// Windows specific resources: ---------------------------------------------------------

#endif // else MACINTOSH

Now after adding this file I get a warning that there are multiple build commands for output file,but the code compiles.

When I try to start indesign I get an assert that  "Plug-in is missing plug-in version resource".

Hope this helps in understanding my problem.

Inspiring
February 11, 2011

The CURS format is a native "Classic" Mac resource.

There might be newer resource editors, I just have the old tools and they work for me.

With old tools I mean ResEdit running on Mac OS9.

To get the required toolchain going nowadays:

Find the latest copy of Basilisk - a free virtual Mac Classic

Grab an old 68k Mac off eBay, Craigs List so you have a license. An early 90s ColorClassic will do.

Extract (by software) the ROM and make a bootable disk image of the system software.

If that's too hard to achieve with the old thing, there might be something equivalent in your favorite P2P system.

Download ResEdit from Apple

Download MPW from Apple

Use ResEdit to edit the pixels

Use DeRez from MPW to convert it to ODFRC source.

Btw, MAC (all caps) stands for http://en.wikipedia.org/wiki/MAC_address

Dirk