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 20-06-2020, 22:40   #2581
Registered User

Join Date: May 2012
Posts: 1,223
Re: Beta Test / Technical

Steve... the Wiki needs a lot of updating. Spent a lot of time going down rabbit holes. Start with setting up your Cloudsmith using the GitHub signin. Get your Cloudsmith API key from there. You will need it for Travis/Appveyor environment variables.

Sign up to Travis/Appveyor/Circleci with your GitHub details. This gives these organisations permission to use your GitHub repo and you can choose the repos you want to use.

With 'Frontend2' You do not need to make a heap of other keys like 'git-ptoken-testplugin_pi-into-travis' etc.

'testplugin_pi' is a very good start. I use the plugins CMakeLists.txt as a template. I also used Mauroc's 'Squiddio_pi'. His readme is a good guide on what files need changing/adding to your GitHub repo, based on the lead given by Jon.

I got Appveyor working first, then Travis and finally added Circleci.

Be aware of 'case' issues. The Cloudsmith Base repository name you create must match the name of the GitHub repository (without the '_pi'). And the 'slug' must be the same as the Base Repository if you use it (It's optional, I left the 'slug name' blank).

Mike
Rasbats is offline   Reply With Quote
Old 20-06-2020, 23:30   #2582
Registered User

Join Date: May 2012
Posts: 1,223
Re: Beta Test / Technical

Forgot to say that as well as CMakeLists.txt you will need to modify your code to use API 116 and use 'GetPluginDataDir(...' instead of 'GetpSharedDataLocation(...'. 'testplugin_pi' helps again.

Get your plugin compiling and making a release with the modified code on your machine and then you are ready for the CI bit.

Mike
Rasbats is offline   Reply With Quote
Old 21-06-2020, 04:01   #2583
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,711
Images: 2
Re: Beta Test / Technical

Quote:
I also used Mauroc's 'Squiddio_pi'. His readme is a good guide on what files need changing/adding to your GitHub repo, based on the lead given by Jon.
I did that, and have put that in all plugins that are using Jon's frontend2
rgleason is offline   Reply With Quote
Old 29-06-2020, 21:31   #2584
Registered User

Join Date: May 2013
Location: NSW, Australia
Boat: Richter 42
Posts: 1,077
Re: Beta Test / Technical

Just to let you know I fill in the slug with the same (copy/paste) as the base repository otherwise you may find it doesn't work some characters get 'changed' to 'help you'. I just find it safer to fill in.


Regards
jon

Quote:
Originally Posted by Rasbats View Post
[--snip --]



Be aware of 'case' issues. The Cloudsmith Base repository name you create must match the name of the GitHub repository (without the '_pi'). And the 'slug' must be the same as the Base Repository if you use it (It's optional, I left the 'slug name' blank).

Mike
jongough is offline   Reply With Quote
Old 07-07-2020, 15:39   #2585
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,711
Images: 2
Re: Beta Test / Technical

Jon, I find the following:

In "celestial_navigation_pi.cpp" GetCommonName = "Celestial Navigation"

In "cmakelists.txt" that the set Commonname = "celestialnavigation"They are different! What the devil do I do with regard to Cloudsmith?


Maybe I'll just try "celestialnavigation"
rgleason is offline   Reply With Quote
Old 07-07-2020, 15:42   #2586
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,711
Images: 2
Re: Beta Test / Technical

Celestial Navigation does not yet use svg icons. I've made one. Now I need to have an example of the code changes required. Where would I find that?
rgleason is offline   Reply With Quote
Old 07-07-2020, 16:12   #2587
Registered User

Join Date: May 2013
Location: NSW, Australia
Boat: Richter 42
Posts: 1,077
Re: Beta Test / Technical

The common name is handled by the version.h.in file to create 'PLUGIN_COMMON_NAME' and then this is used within the c code:

wxString testplugin_pi::GetCommonName()
{
return _T(PLUGIN_COMMON_NAME);
}


There should be no conflicts as the name spcified in CMakeLists.txt is what is used.


Quote:
Originally Posted by rgleason View Post
Jon, I find the following:

In "celestial_navigation_pi.cpp" GetCommonName = "Celestial Navigation"

In "cmakelists.txt" that the set Commonname = "celestialnavigation"They are different! What the devil do I do with regard to Cloudsmith?


Maybe I'll just try "celestialnavigation"
jongough is offline   Reply With Quote
Old 07-07-2020, 16:18   #2588
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,711
Images: 2
Re: Beta Test / Technical

Re Celestial Navigation now building with circleci.
Mingw and Msvc build ok , everything else fails with messages like this:
Quote:

-- PluginPackage: CPACK_PACKAGE_VERSION: 2.3.1.0-ov50, PACKAGE_VERSION 2.3.1.0, CPACK_PACKAGE_FILE_NAME: celestialnavigation_pi-2.3.1.0-ubuntu-x86_64-16.04-xenial -- PluginPackage: CMAKE_SOURCE_DIR: /home/circleci/project, CPACK_PROJECT_CONFIG_FILE: /home/circleci/project/build/PluginCPackOptions.cmake -- Configuring done CMake Error: CMake can not determine linker language for target: celestialnavigation_pi CMake Error: Cannot determine link language for target "celestialnavigation_pi". -- Generating done -- Build files have been written to: /home/circleci/project/build Exited with code exit status 1

Something screwed up in language po/ files. (I git added two po/ files that were newly created, probably not the right thing to do.)
rgleason is offline   Reply With Quote
Old 07-07-2020, 16:42   #2589
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,711
Images: 2
Re: Beta Test / Technical

I found two files in po/
celestial_navigation_pi.pot
celestialnavigation_pi.pot

so it is perhaps related to a common name issue?


Quote:
Originally Posted by rgleason View Post
Re Celestial Navigation now building with circleci.
Mingw and Msvc build ok , everything else fails with messages like this:

Something screwed up in language po/ files. (I git added two po/ files that were newly created, probably not the right thing to do.)
rgleason is offline   Reply With Quote
Old 07-07-2020, 16:53   #2590
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,711
Images: 2
Re: Beta Test / Technical

Quote:
Originally Posted by jongough View Post
There should be no conflicts as the name spcified in CMakeLists.txt is what is used.

Yes, the problem I saw was that the names are different, which means that there may be additional puzzle icons due to the commonname used previously for the plugin.


This may not be a problem, because I think I have to change the name in CMakeLists.txt to "celestial_navigation" anyway because of issues related to the two po/ files mentioned below.



Anyway I am going to try it.
rgleason is offline   Reply With Quote
Old 08-07-2020, 12:03   #2591
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,711
Images: 2
Re: Beta Test / Technical

Can anyone provide some guidance here?

Quote:
Originally Posted by rgleason View Post
Celestial Navigation does not yet use svg icons. I've made one. Now I need to have an example of the code changes required. Where would I find that?
rgleason is offline   Reply With Quote
Old 08-07-2020, 12:45   #2592
Marine Service Provider
 
bdbcat's Avatar

Join Date: Mar 2008
Posts: 7,463
Re: Beta Test / Technical

Rick...
Please stand by for bit, and I'll help.
Dave
bdbcat is offline   Reply With Quote
Old 08-07-2020, 13:40   #2593
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,711
Images: 2
Re: Beta Test / Technical

Thanks Dave, I found this example https://github.com/jongough/testplug...rc/tpicons.cpp


Maybe I can figure out how to integrate that into Polar_pi and some others.


BTW I am going to have to remove Polar_pi from the master as the Icon is not turning on and showing and I haven't got a version that works right now.
(actually the icon shows up after close-open of opencpn)

Also version 1.1.10 has the common name as "polar" and it should be "Polar" but then I did not put

return _T(PLUGIN_COMMON_NAME); in polar_pi.cpp, so who knows what is out there.
rgleason is offline   Reply With Quote
Old 08-07-2020, 14:17   #2594
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,711
Images: 2
Re: Beta Test / Technical

Added polar.svg https://github.com/rgleason/polar_pi


I installed the tarball for 1.1.12.0 and it seems like that and 1.1.10.0 are both using an earlier icon and not the one that is now in the program (polar.png) so that might be why the icon does not show up...an earlier polar plugin has to be enabled?


This the CS repos https://cloudsmith.io/~opencpn/repos...beta/packages/
rgleason is offline   Reply With Quote
Old 09-07-2020, 02:04   #2595
Registered User

Join Date: May 2012
Posts: 1,223
Re: Beta Test / Technical

Rick...

The testplugin_pi icon code may lead you into over-complication. If you look at DR_pi you will see SVG in use, without too much extra code.

The files to look at are here:
CMakeLists.txt
icons.cpp (assumes using SVG)
icons.h
DR_pi.cpp (the plugins panel icon is a .png, side-bar icons are .SVG)
DR_pi.h

https://github.com/Rasbats/DR_pi

Mike
Rasbats is offline   Reply With Quote
Reply


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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Beta Marine Diesel michaelmrc Engines and Propulsion Systems 48 23-03-2016 13:44
Need some technical advice....antennas. Just a Tinch Marine Electronics 15 01-12-2007 15:57
Blue Sea Systems Technical Brief GordMay Electrical: Batteries, Generators & Solar 0 16-03-2007 04:16
technical difficulties witchcraft The Sailor's Confessional 1 30-05-2005 14:09
Dow Corning Technical Manual GordMay The Library 0 12-04-2005 16:25

Advertise Here


All times are GMT -7. The time now is 10:22.


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.