mauroc / squiddio_pi

squiddio_pi
3 stars 13 forks source link

Installation of icons not in correct location #113

Closed jongough closed 4 years ago

jongough commented 4 years ago

Just got my testplugin_pi installing in this version. Have changed to use the 'new' GetPlugingDataDir("testplugin_pi"). This returns a directory that does not exist. Here is the log showing the installation:

18:34:07 AEDT: Loading plugins from dir: /usr/local/lib/opencpn/opencpn
18:34:07 AEDT: PlugInManager searching for PlugIns in location /usr/local/lib/opencpn/opencpn
18:34:07 AEDT:    Directory /usr/local/lib/opencpn/opencpn does not exist.
18:34:26 AEDT: PluginHandler: using metadata path: /home/jon/.opencpn/ocpn-plugins.xml
18:34:28 AEDT: Installing testplugin
18:34:30 AEDT: filesize https://dl.cloudsmith.io/public/jon-gough/testplugin_pi-beta/raw/names/testplugin
-ubuntu-16.04-tarball/versions/1.0.41.0+325.91137b2/opencpn-plugin-testplugin-1.0.41.0-ov50-1.16_ubuntu-1
6.04.tar.gz: 225770 bytes
18:34:31 AEDT: PlugInManager: loading plugins from /home/jon/.local/lib/opencpn;/usr/local/lib/opencpn;/u
sr/lib/opencpn;/usr/local/lib/opencpn/opencpn
18:34:31 AEDT: Using LD_LIBRARY_PATH: /home/jon/.local/lib/opencpn:/usr/local/lib/opencpn:/usr/lib/opencp
n:/usr/local/lib/opencpn/opencpn:/home/jon/.local/lib/opencpn:/usr/local/lib/opencpn:/usr/lib/opencpn:/us
r/local/lib/opencpn/opencpn:/home/jon/.local/lib/opencpn:/usr/local/lib/opencpn:/usr/lib/opencpn:/usr/loc
al/lib/opencpn/opencpn
18:34:31 AEDT: Using PATH: /home/jon/.local/lib/opencp/bin:/usr/local/lib/opencp/bin:/usr/lib/opencp/bin:
/usr/local/lib/opencpn/opencp/bin:/home/jon/.local/lib/opencp/bin:/usr/local/lib/opencp/bin:/usr/lib/open
cp/bin:/usr/local/lib/opencpn/opencp/bin:/home/jon/.local/lib/opencp/bin:/usr/local/lib/opencp/bin:/usr/l
ib/opencp/bin:/usr/local/lib/opencpn/opencp/bin:/home/jon/bin:/home/jon/.local/bin:/usr/local/sbin:/usr/l
ocal/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
18:34:31 AEDT: Loading plugins from dir: /home/jon/.local/lib/opencpn
18:34:31 AEDT: PlugInManager searching for PlugIns in location /home/jon/.local/lib/opencpn
18:34:31 AEDT: Found 1 candidates
18:34:31 AEDT: Checking plugin candidate: /home/jon/.local/lib/opencpn/libtestplugin_pi.so
18:34:31 AEDT: PLugin is compatible: true
18:34:31 AEDT: PlugInManager: Loading PlugIn: /home/jon/.local/lib/opencpn/libtestplugin_pi.so
18:34:31 AEDT: testplugin_pi data location: /usr/local/share/opencpn/plugins/testplugin_pi/data/

The last line is put out by the plugin when it gets the directory from the OCPN api. The code tries to create the plugins, plugins/testplugin_pi and plugins/testplugin_pi/data directory. It does not get a failure but the the testplugin_pi and subdirectory are not created. These files are owned by root and it would appear that the installation process is not using root.

The actual files are installed in ~/.local/share/opencpn/plugins/testplugin_pi/data

This process is using the cloudsmith to deploy debug versions (*.tar.gz files). The metadata is correct and can be incorporated into the ocpn_plugins.xml file. I do this by hand as it is easier than the other process. You will find the file here: https://cloudsmith.io/~jon-gough/repos/testplugin_pi-beta/packages/?sort=-date

jongough commented 4 years ago

Raised on wrong repository, sorry. Move to https://github.com/OpenCPN/OpenCPN/pull/1457