Cruisers Forum
 


Reply
  This discussion is proudly sponsored by:
Please support our sponsors and let them know you heard about their products on Cruisers Forums. Advertise Here
 
Thread Tools Search this Thread Rate Thread Display Modes
Old 02-05-2012, 20:03   #1
Registered User
 
globalkeith's Avatar

Join Date: Sep 2010
Location: Zhuhai, China
Boat: Prout G55
Posts: 76
New Plugin Development on Linux

So I've started looking at how to create a new plugin, so I've copied "demo_pi" to a new directory and renamed everything accordingly.

Everything builds ok, however when I do "sudo make install" (on Ubuntu 12.04) the .po file is copied to:

/usr/local/share/opencpn/plugins/liblatlonbounds_pi.so


Whereas all the other plugins get copied to:

/usr/local/lib/opencpn/libgrib_pi.so


Is this something I've done wrong, or does the demo_pi need updating?
globalkeith is offline   Reply With Quote
Old 02-05-2012, 20:25   #2
Marine Service Provider
 
bdbcat's Avatar

Join Date: Mar 2008
Posts: 7,463
Re: New Plugin Development on Linux

keith...

Bingo!

demo_pi is out of date.
If you can patch it to move the install location to the proper place, I'll include that in the next Beta.

Or, just copy it it you want to fool around with it.

Thanks, and welcome aboard
Dave
bdbcat is offline   Reply With Quote
Old 03-05-2012, 00:16   #3
Registered User
 
globalkeith's Avatar

Join Date: Sep 2010
Location: Zhuhai, China
Boat: Prout G55
Posts: 76
Re: New Plugin Development on Linux

No probs, thanks D
globalkeith is offline   Reply With Quote
Old 03-05-2012, 00:50   #4
Registered User
 
globalkeith's Avatar

Join Date: Sep 2010
Location: Zhuhai, China
Boat: Prout G55
Posts: 76
Re: New Plugin Development on Linux

Ok so its copying my plugin into the correct location: (My plugin is nothing more than a copy of the demo_pi_sample)

/usr/local/lib/opencpn/liblatlonbounds_pi.so

BUT its not showing up in the Plugins section of the preferences panel. There's no logs that suggest theres a problem - any suggestions as to what to do next? I've managed to compile the VDR plugin, so should I look to strip that down and use as a template instead?

thanks
keith
globalkeith is offline   Reply With Quote
Old 03-05-2012, 01:23   #5
Registered User

Join Date: Feb 2010
Location: Tierra del Fuego
Boat: Phantom 19
Posts: 6,234
Re: New Plugin Development on Linux

keith...
In https://github.com/ktec/OpenCPN/blob...lonbounds_pi.h change
Code:
#define     MY_API_VERSION_MINOR    1
to
Code:
#define     MY_API_VERSION_MINOR    5
the demo_pi code is really unmaintained for some time - consider using some normal plugin as your guide to plugin development. https://github.com/nohal/wmm_pi is really small and easy to understand for example.
Also, if you don't mind, please create a separate repository for your plugin and don't use a branch in the OpenCPN repo - I know it was my own invention, but the number of non-core plugins was 1 or 2 at that time and I was more or less the only person writing them. The idea was definitely not good - it actually starts to be a nightmare having so many remotes with a handful branches each connected to a single local repo just to get access to the plugins they contain...

Pavel
nohal is offline   Reply With Quote
Old 03-05-2012, 07:16   #6
Registered User
 
rooiedirk's Avatar

Join Date: Aug 2010
Location: Netherlands
Boat: Oneoff
Posts: 514
Re: New Plugin Development on Linux

Keith, Dave,
Looks like we running into the same problem at he same time.
I did some patching on the Demo plugin. Works now for me under linux.
It is using the PI API 1.8 now.
wkr
Dirk
Attached Files
File Type: doc demo.patch.doc (18.4 KB, 76 views)
rooiedirk is offline   Reply With Quote
Reply

Tags
linux


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Advertise Here


All times are GMT -7. The time now is 04:55.


Google+
Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Social Knowledge Networks
Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2024, vBulletin Solutions, Inc.

ShowCase vBulletin Plugins by Drive Thru Online, Inc.