Trying to create my first realy useful plugin

View: New views
4 Messages — Rating Filter:   Alert me  

Trying to create my first realy useful plugin

by Rafael Escote :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Dear 4D (plugin) gurus! :)

I'm trying to create my first -really-useful 4D plugin.
(I'm on Mac OS X 10.4.11)

The idea is to develop a plugin to interact with the
Sentinel SafeNet SuperPro USB hardware key used in some of our
applications. In fact, we already have the Windows OS 4D plugins but
it seems that people at SafeNet are not interested anymore in developing
4D plugins to run on the Mac OSX...

The guys at Safenet do provide an example application in XCode project format
that really compiles and accesses the key... so far so good... but it's
an OSX application, not a 4D plugin, of course!

So, to develop my plugin I'm using the following:

4D Plugin Wizard (2004.5)
XCode 2.2.1
Sentinel.framework
SentinelPro32.framework
spromeps.h (Sentinel declares etc...)


As soon as I include the frameworks in my XCode project, the resulting
plugin.bundle is not loaded by 4D (?)

If I try and do a simple test plugin, not adding the frameworks from Sentinel
and of course not using any Sentinel function call, the plugin loads in 4D
without problems.

I'm really stuck at this, being my first "plugin-in" plugins and I
really don't know
where to look for plugin development docs or info.

Any help would be very, very appreciated!!
TIA

--
Rafael Escoté
BlauSoft s.l.


**********************************************************************
4D Plugins hosted by 4D, Inc.                      http://www.4D.com/


4D v11 SQL - A 21st Century database for 21st Century developers
http://www.4D.com/products/new.html

To Unsubscribe:                      mailto:4D-Plugins-off@...
***********************************************************************


Re: Trying to create my first realy useful plugin

by Rob Laveaux :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


On 1 feb 2008, at 10:42, Rafael Escote wrote:

> As soon as I include the frameworks in my XCode project, the resulting
> plugin.bundle is not loaded by 4D (?)


Your plugin fails to load because the OS can't find the linked  
frameworks.
Solution: You need to copy the frameworks in a location where the OS  
can load them from.

The OS looks at the following locations to load frameworks:
/Library/Frameworks
~//Library/Frameworks
Your_4D_Application/Contents/Frameworks

HTH,

- Rob Laveaux

--------------------------------------------------------
Pluggers Software
Bleriotlaan 62
2497 BM  Den Haag
The Netherlands

Email: rob.laveaux@...
Website: http://www.pluggers.nl

--------------------------------------------------------



**********************************************************************
4D Plugins hosted by 4D, Inc.                      http://www.4D.com/     
   

4D v11 SQL - A 21st Century database for 21st Century developers
http://www.4D.com/products/new.html

To Unsubscribe:                      mailto:4D-Plugins-off@...
***********************************************************************


Re: Trying to create my first realy useful plugin

by aparajita :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

> Your plugin fails to load because the OS can't find the linked  
> frameworks.
> Solution: You need to copy the frameworks in a location where the OS  
> can load them from.

But there must be a way to include a private framework in the plugin  
bundle. I am faced with a similar problem.

Regards,

    Aparajita
    www.aparajitaworld.com

    "If you dare to fail, you are bound to succeed."
    - Sri Chinmoy   |   www.srichinmoy.org


**********************************************************************
4D Plugins hosted by 4D, Inc.                      http://www.4D.com/     
   

4D v11 SQL - A 21st Century database for 21st Century developers
http://www.4D.com/products/new.html

To Unsubscribe:                      mailto:4D-Plugins-off@...
***********************************************************************


Re: Trying to create my first realy useful plugin

by Rob Laveaux :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


On 1 feb 2008, at 17:28, Aparajita Fishman wrote:

> But there must be a way to include a private framework in the plugin  
> bundle. I am faced with a similar problem.

Yes, you can do that as well. Problem is that the OS won't look there  
automatically to load frameworks. Instead you have to load it  
dynamically at runtime (using CFBundleLoadExecutable) and use function  
pointers (using CFBundleGetFunctionPointerForName). But this is  
something I'd only recommend for advanced programmers, not for  
beginners.

- Rob Laveaux

--------------------------------------------------------
Pluggers Software
Bleriotlaan 62
2497 BM  Den Haag
The Netherlands

Email: rob.laveaux@...
Website: http://www.pluggers.nl

--------------------------------------------------------



**********************************************************************
4D Plugins hosted by 4D, Inc.                      http://www.4D.com/     
   

4D v11 SQL - A 21st Century database for 21st Century developers
http://www.4D.com/products/new.html

To Unsubscribe:                      mailto:4D-Plugins-off@...
***********************************************************************