Archicad C++ API
About Archicad add-on development using the C++ API.

!Restored: Add-Ons under Leopard

Ralph Wessel
Mentor
I've posted this under other topics, but it might be missed by developers who don't use ArchiCAD for architectural work. Under macOS 10.5, ArchiCAD will not recognise a bundle as an add-on if it lacks a 'PkgInfo' resource. Make sure you check the option 'Force Package Info Generation' in XCode (sets GENERATE_PKGINFO_FILE=YES).

Note that this option isn't set in the example files in the DevKit.
Ralph Wessel BArch
Software Engineer Speckle Systems
10 REPLIES 10
Anonymous
Not applicable
Ralph,
Is Objective updated for that? I am trying to jump in 10.5.
Joseph
Ralph Wessel
Mentor
Joseph wrote:
Ralph,
Is Objective updated for that? I am trying to jump in 10.5.
Joseph
Yes, the version currently available for download is fine under 10.5
Ralph Wessel BArch
Software Engineer Speckle Systems
Anonymous
Not applicable
Any idea why the MDID numbers which work on the Windows XP VisualStudio version won't work on the XCODE version?
(this Add-on can't be verified, please ask the distributor)

I've created way back a bunch of numbers with the ADD-ON manager tool, but I can't remember if at that time was there an "Authorization Code" prompt, and if yet what did I have to enter.

Is there some word swapping/byte swapping to be done to work on the Intel Macs (Leopard/Xcode)?
Ralph Wessel
Mentor
Ferenc wrote:
Any idea why the MDID numbers which work on the Windows XP VisualStudio version won't work on the XCODE version?
(this Add-on can't be verified, please ask the distributor) Is there some word swapping/byte swapping to be done to work on the Intel Macs (Leopard/Xcode)?
You shouldn't have to do anything special or different with XCode. Is there any chance the resources aren't included in the final build?

I'd suggest a quick test using the example projects with the API. Insert your MDID and see if it works.
Ralph Wessel BArch
Software Engineer Speckle Systems
Anonymous
Not applicable
That's exactly what I'm trying first (PlanDump).
And that's giving me the message above when attempting to load (Options/Add-Ons Manager)
Since it looks like the the MDID_APICD.H has a slightly different format for the GCC compiler I'm thinking it might be the decimal representation of a four byte long integer might be a problem, or the byte/word swapping.

Thanks for the reply.
Ralph Wessel
Mentor
Ferenc wrote:
That's exactly what I'm trying first (PlanDump).
And that's giving me the message above when attempting to load (Options/Add-Ons Manager)
Since it looks like the the MDID_APICD.H has a slightly different format for the GCC compiler I'm thinking it might be the decimal representation of a four byte long integer might be a problem, or the byte/word swapping.

Thanks for the reply.
I modified Plan_DumpFix.grc to look something like the following and it worked (obviously those aren't the real ID's though):
/* *****************************************************************************
// Non-localizable resource description for the Plan Dump Add-On
// API Development Kit 11; Mac/Win
//
// Namespaces:			Contact person:
//		-None-
//
// [SG compatible] - Yes
// ****************************************************************************/

'MDID' 32500 "Add-On Identifier" {
	1234	/* Developer ID */
	56789	/* Add-on ID */
}
Does this work for you?
Ralph Wessel BArch
Software Engineer Speckle Systems
Anonymous
Not applicable
No, it didn't

I tried with the normal decimal (like 1234 how it works on Windows) notation, the 1234UL notation, and even converted them to hex and tried the 0xaa55bc12 notations.

There might be something I was missing with the build project after hitting the build button after modifiing the .fix.grc file, (or touching everything and hitting the build button), because sometimes the .rsrc file in the bundle content doesn't seem to get updated, and looking into the file with a hex editor I don't see anywhere the hexa patterns corresponding to my numbers, little endian or big endian sequence either.

How do you verify it under mac osx (leopard, intelmac)?
Or you just load it and it works (as in windows)?
Ralph Wessel
Mentor
Ferenc wrote:
How do you verify it under mac osx (leopard, intelmac)?
Or you just load it and it works (as in windows)?
You could check the contents of the add-ons resources using a utility in Apple's Developer kit called "DeRez"

It reverses the compilation of resources, creating readable text. You could do this for Plan_Dump by typing something like the following into the Terminal:
DeRez -useDF /Applications/Graphisoft/ArchiCAD\ 11/Add-Ons/Plan_Dump.apx/Contents/Resources/Plan_Dump.rsrc
Enter the path to your build of the Plan_Dump add-on in the above statement naturally. You should then be able to determine if the built product has an MDID resource and confirm the values are correct.
Ralph Wessel BArch
Software Engineer Speckle Systems
Anonymous
Not applicable
Muchas Gracias!

I remember DeRez from the old MPW days, should have thought about it in the first time.

Didn't find the answer?

Check other topics in this Forum

Back to Forum

Read the latest accepted solutions!

Accepted Solutions

Start a new conversation!