Hoi everybody,
I'm trying to change the grib plugin, inorder to have it again showing the isobars (as it did before it was moved to a plugin).
After my editing it is compiling without errors, libgrib_pi.so is made and installed in the right place. BUT Opencpn is not recognize the libgrib_pi.so as a plugin.
I didn't make any changes at the grib_pi and cmake files.
Anybody any idea what is going wrong??
Dirk
Code:
[ 0%] grib-i18n [ru]: Created mo file.
[ 0%] grib-i18n [fi_FI]: Created mo file.
[ 0%] grib-i18n [pt_PT]: Created mo file.
[ 0%] grib-i18n [de]: Created mo file.
[ 0%] grib-i18n [pl_PL]: Created mo file.
[ 0%] grib-i18n [fr]: Created mo file.
[ 0%] grib-i18n [et]: Created mo file.
[ 0%] grib-i18n [es]: Created mo file.
[ 0%] grib-i18n [da]: Created mo file.
[ 0%] grib-i18n [zh_TW]: Created mo file.
[ 0%] grib-i18n [nl]: Created mo file.
[ 0%] grib-i18n [cs]: Created mo file.
[ 0%] grib-i18n [sv]: Created mo file.
[ 0%] grib-i18n [pt_BR]: Created mo file.
[ 0%] grib-i18n [pl]: Created mo file.
[ 0%] grib-i18n [it]: Created mo file.
[ 0%] grib-i18n [el_GR]: Created mo file.
[ 0%] grib-i18n [nb_NO]: Created mo file.
[ 0%] grib-i18n: Done.
[ 75%] Built target grib-i18n
[ 75%] Building CXX object plugins/grib_pi/CMakeFiles/grib_pi.dir/src/grib_pi.cpp.o
[ 75%] Building CXX object plugins/grib_pi/CMakeFiles/grib_pi.dir/src/grib.cpp.o
[ 87%] Building CXX object plugins/grib_pi/CMakeFiles/grib_pi.dir/src/icons.cpp.o
[ 87%] Building CXX object plugins/grib_pi/CMakeFiles/grib_pi.dir/src/GribReader.cpp.o
[ 87%] Building CXX object plugins/grib_pi/CMakeFiles/grib_pi.dir/src/GribRecord.cpp.o
[100%] Building CXX object plugins/grib_pi/CMakeFiles/grib_pi.dir/src/zuFile.cpp.o
[100%] Building CXX object plugins/grib_pi/CMakeFiles/grib_pi.dir/src/IsoLine.cpp.o
Linking CXX shared library libgrib_pi.so
[100%] Built target grib_pi
dirk@dirk-desktop:~/development/opencpn-714/opencpn/build/plugins/grib_pi$ sudo make install
[sudo] password for dirk:
[ 0%] grib-i18n: Done.
[ 75%] Built target grib-i18n
[100%] Built target grib_pi
Install the project...
-- Install configuration: ""
-- Installing: /usr/local/lib/opencpn/libgrib_pi.so
-- Installing: /usr/local/share/locale/fi_FI/LC_MESSAGES/opencpn-grib_pi.mo
-- Installing: /usr/local/share/locale/pt_PT/LC_MESSAGES/opencpn-grib_pi.mo
-- Installing: /usr/local/share/locale/de/LC_MESSAGES/opencpn-grib_pi.mo
-- Installing: /usr/local/share/locale/pl_PL/LC_MESSAGES/opencpn-grib_pi.mo
-- Installing: /usr/local/share/locale/fr/LC_MESSAGES/opencpn-grib_pi.mo
-- Installing: /usr/local/share/locale/et/LC_MESSAGES/opencpn-grib_pi.mo
-- Installing: /usr/local/share/locale/es/LC_MESSAGES/opencpn-grib_pi.mo
-- Installing: /usr/local/share/locale/da/LC_MESSAGES/opencpn-grib_pi.mo
-- Installing: /usr/local/share/locale/zh_TW/LC_MESSAGES/opencpn-grib_pi.mo
-- Installing: /usr/local/share/locale/nl/LC_MESSAGES/opencpn-grib_pi.mo
-- Installing: /usr/local/share/locale/cs/LC_MESSAGES/opencpn-grib_pi.mo
-- Installing: /usr/local/share/locale/sv/LC_MESSAGES/opencpn-grib_pi.mo
-- Installing: /usr/local/share/locale/pt_BR/LC_MESSAGES/opencpn-grib_pi.mo
-- Installing: /usr/local/share/locale/pl/LC_MESSAGES/opencpn-grib_pi.mo
-- Installing: /usr/local/share/locale/it/LC_MESSAGES/opencpn-grib_pi.mo
-- Installing: /usr/local/share/locale/el_GR/LC_MESSAGES/opencpn-grib_pi.mo
-- Installing: /usr/local/share/locale/nb_NO/LC_MESSAGES/opencpn-grib_pi.mo
-- Installing: /usr/local/share/locale/ru/LC_MESSAGES/opencpn-grib_pi.mo
Hoi everybody,
I do have a grib plugin now that does show the isobars again. pls find attached the patch file. It works under Linux, I can't test under windows, so if somebody would do this, thanks on forehand.
WKR
Dirk
One problem: I don't see directly what "cutil.c" is used for. In any case, its not quite kosher to get it like this:
+ ../../src/cutil.c
Plugins (in theory) have no access to the mainline source tree. Nor should they require it. All they need from the mainline is ocpn_plugin.h
So, simple solution is to duplicate whatever parts of cutil.c that are needed by the PlugIn in the plugin branch itself.
For example, Dashboard does this now with NEMA decoding....
I know, I know, its silly duplication of code. But we need a real chinese wall here if we are ever to attract useful closed source (i.e. proprietary) plugins.
Of course, that's "whole 'nother thing", as they say, and lets not go there on this thread.....
ClipResult cohen_sutherland_line_clip_i (int *x0_, int *y0_, int *x1_, int *y1_,
int xmin_, int xmax_, int ymin_, int ymax_)
(and it's dependencies) is the only part used. To make it properly, we should also duplicate cutil.h
Not a big deal here - it's a couple of lines of code, but... We have to think about it anyway, as solving the possible conflicts between the libraries needed by different plugins could start to be non-trivial in the future.
My point exactly. If the only interface is ocpn_plugin.h, then we can manage the dependencies cleanly.
In other words, each PlugIn must be self contained. They must not depend on anything which may now be embedded but unexported in mainline, and which may go away, or worse, change definition.
I agree the the instant case is simply a matter of incorporating the required utility subroutine into one or another of grib's source modules, and not exporting it.
Hoi Dave, Pavel,
Does make sence a complete seperation. So I copied the used functions into IsoLine files.
I found that still some work to be done an the seawater temperature readings.
@SethDart:
on my Computer the openCPN is located in: /usr/local/bin/opencpn
the path to plugin is: /usr/local/share/opencpn/plugins
I moved the *.pl.so files to this folder
but! openCPN only shows the dashbord and the Dashbord an the Grib plugin.
Where is my fault?