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 27-04-2014, 11:15   #121
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,765
Images: 2
Re: New Watchman Plugin

Using a windows search of ${CMAKE_ found this in cmake_install.cmake
Quote:
IF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified")
IF("${CMAKE_INSTALL_CONFIG_NAME}" MATCHES "^([Dd][Ee][Bb][Uu][Gg])$")
FILE(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/plugins" TYPE SHARED_LIBRARY FILES "C:/o-plugin/watchdog_pi/Debug/watchdog_pi.dll")
ELSEIF("${CMAKE_INSTALL_CONFIG_NAME}" MATCHES "^([Rr][Ee][Ll][Ee][Aa][Ss][Ee])$")
FILE(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/plugins" TYPE SHARED_LIBRARY FILES "C:/o-plugin/watchdog_pi/Release/watchdog_pi.dll")
ELSEIF("${CMAKE_INSTALL_CONFIG_NAME}" MATCHES "^([Mm][Ii][Nn][Ss][Ii][Zz][Ee][Rr][Ee][Ll])$")
So then I searched on CMAKE_INSTALL_CONFIG_NAME and found
CmakeCache.txt

with
CMAKE_CONFIGURATION_TYPES:STRING=Debug;Release;Min SizeRel;RelWithDebInfo

Am I getting anywhere?
rgleason is offline   Reply With Quote
Old 27-04-2014, 13:11   #122
Registered User

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

Rick...
We've been here already. You can't mix debug plugins and release core and vice versa. Never.

Pavel
nohal is offline   Reply With Quote
Old 27-04-2014, 14:12   #123
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,765
Images: 2
Re: New Watchman Plugin

Thanks Pavel I thought I had learned that already, I'm just trying to get this to compile so it works ( release or debug) and the new standalone setup and cake whatever files have me all balled up. You guys are incredibly brilliant and we earthlings need some instructions on how to start the engine. Thanks. Maybe I can figure it out later tonight with that word of advice. First I'll try what compiled in msvc.
Then I'll copy a release compiled of opencpn 3.3.1606 to the watchman directory and try that.

Do you know which file sets the configuration for release or debug, have not found it or is it those conditionals I copied above? Ie Do I have to change anything? --- IT SEEMS so close to working !!!

Sent from my SCH-I545 using Cruisers Sailing Forum mobile app
rgleason is offline   Reply With Quote
Old 27-04-2014, 14:32   #124
Registered User

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

Rick...
This plugin now builds without OpenCPN, all you have to do is
Code:
git clone https://github.com/seandepagnier/watchdog_pi.git
cd watchdog_pi
mkdir build
cd build
cmake ..
cmake --build . --config release
And copy the resulting DLL into your plugin directory (of a release version of OpenCPN). If the compilation on Windows works at all, which I can't check right now.

Pavel
nohal is offline   Reply With Quote
Old 27-04-2014, 14:42   #125
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,765
Images: 2
Re: New Watchman Plugin

Yes Pavel that is what I did, but I am going to start over. There was something not quite right and I ll see if it repeats or works, but it seems very close to working as it compiled with no errors. This would be a huge asset I think to be able to compile independently. Then the plugin could be compiled for the oldest version intended and we would not have revert back to recompile an older version. The code for each plugin compile could be in separate git directories and you could have a bat file that would execute all of the. I quite honestly do not know how you sean and bdcat do it, so much at once!

Sent from my SCH-I545 using Cruisers Sailing Forum mobile app
rgleason is offline   Reply With Quote
Old 27-04-2014, 19:33   #126
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,765
Images: 2
Re: New Watchman Plugin

Before I had had to reference the path to my copy of MSVC, this version I don't except for one thing, it would have passed:

Quote:
LINK : fatal error LNK1181: cannot open input file 'opencpn.lib' [C:\o-plugin\watchdog_pi\build\watchdog_pi.vcxproj]
Done Building Project "C:\o-plugin\watchdog_pi\build\watchdog_pi.vcxproj" (defau
lt targets) -- FAILED.
Do I just copy opencpn.lib from a release version of Opencpn 3.3.1606 and put it where? Are there any other opencpn files needed, I don't see opencpn.exe etc. Where does opencpn.lib go?

Thanks
Attached Files
File Type: doc Watchdog-compile-1error.doc (9.8 KB, 46 views)
rgleason is offline   Reply With Quote
Old 27-04-2014, 21:32   #127
Registered User

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

Rick...
You have to copy <YourOpenCPNSourceDir>\build\release\opencpn.lib to the watchdog plugin's build directory
The opencpn.lib has to be from the oldest possible OpenCPN version supporting the plugin api 1.11, which is actually the current 3.3 beta and changing as S-63 suport is being refined.
I know, this is a bit complicated...

Pavel
nohal is offline   Reply With Quote
Old 28-04-2014, 06:40   #128
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,765
Images: 2
Re: New Watchman Plugin

AWESOME Pavel - It compiled with 0 errors and 0 warnings! And it runs! Thank you!
Once I got out of the weeds it was not so hard. The cmake files are complex.

I've attached the instructions for Windows to the readme below.
Will attached the compiled plugin tonight.
Sean added separate port and starboard alarms too!

Thank you.
Thank you
Very nice method of compiling.

=====

For Windows Compile release version
=======================================
git clone https://github.com/seandepagnier/watchdog_pi.git

Copy <YourOpenCPNSourceDir>\build\release\opencpn.lib to the watchdog plugin's build directory ...watchdog/build/
The opencpn.lib has to be from the oldest possible OpenCPN version supporting the plugin api 1.11, which is actually the current 3.3 beta

cd watchdog_pi
mkdir build
cd build
cmake ..
cmake --build . --config release

copy the resulting DLL into your plugin directory (of a release version of OpenCPN).
Attached Files
File Type: doc README.doc (1.2 KB, 52 views)
rgleason is offline   Reply With Quote
Old 28-04-2014, 13:00   #129
Registered User

Join Date: Mar 2009
Posts: 83
Re: New Watchman Plugin

WHEN will this be available for general release in a 'non-technical' fully pre compiled version (Win linux etc) and where will it be available for downloading
dougwm10 is offline   Reply With Quote
Old 28-04-2014, 18:22   #130
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,765
Images: 2
Re: New Watchman Plugin

Here is the latest compilation (done standalone using the new system for compiling plugins). It works in my compiled version of Opencpn 3.3.1606, hope others will give it a trial on the seas. Sean has asked about a month ago if this should become a release version, but nobody responded, because they are so occupied on the other O.. projects...

I see Sean has added separate port and starboard alarms. If you have any suggestions or like this, let Sean know. We should probably start a new thread called Watchdog Plugin.

Many many thanks to Pavel for his guidance re the new compile process.

Take the doc off please. watchdog_win32_pi110_v10_ov331606_pi.dll
Attached Files
File Type: doc watchdog_win32_pi110_v10_ov331606_pi.dll.doc (189.5 KB, 53 views)
rgleason is offline   Reply With Quote
Old 28-04-2014, 18:25   #131
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,765
Images: 2
Re: New Watchman Plugin

Sean, since watchman now compiles very nicely with MSVC, do I dare try any others?
rgleason is offline   Reply With Quote
Old 28-04-2014, 18:58   #132
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,765
Images: 2
Re: New Watchman Plugin

I saw a note in Sean's github for WMM_pi that he had configured it for separate compiling, so I thought I would try it, following Pavel's instructions above.
The cmake command works fine. Also the second command finds MSVC but then there are variables that are unknown. See attached please. I copied v3.3.1606 Opencpn.lib into the ../wmm_pi/build/ directory. Maybe it is not finding the opencpn.lib? It also seems to need Lib.bzip.lib which is a Linux file maybe?
Attached Files
File Type: doc wmm_pi-output.doc (18.7 KB, 53 views)
rgleason is offline   Reply With Quote
Old 28-04-2014, 19:09   #133
Registered User

Join Date: Aug 2009
Location: oriental
Boat: crowther trimaran 33
Posts: 4,425
Re: New Watchman Plugin

Now that we verified watchdog compiles for visual studio, I can make all the other plugins use this. There are probably a few minor differences in the cmake files.

I did not know about mixing debug and release. I'm sure this is a visual studio issue.

The annoying part is copying the opencpn.lib file (or opencpn.dll for mingw). This is only needed on windows. I asked about having opencpn install this file to a known location.. but then it doesn't allow for building a plugin for an older opencpn if you have installed a newer one...

Now all I need is someone to attempt building on osx.
seandepagnier is offline   Reply With Quote
Old 29-04-2014, 03:01   #134
Registered User

Join Date: Jul 2010
Location: Hannover - Germany
Boat: Amel Sharki
Posts: 2,547
Re: New Watchman Plugin

Quote:
Originally Posted by boat_alexandra View Post
Now all I need is someone to attempt building on osx.
Now since it is possible to compile plugins as standalone the next step should be for the plugin programmer to provide installers for their plugins. For the average user it is sometimes difficult to copy the right files to the right place. Not every sailor is also an expert in computers and the plugins consists of several files (language files and and sometimes supplementary files).
The last s63 plugin has examples of installers even for Mac OS X.

If a programmer is not able or has no other connections to test his plugin with a particular OS he should left it out. I cannot help here for OS X because the whole OpenCPN stuff depends on wxWidgets which has several issues with OS X. So e.g. only 5 days ago a bug was fixed in wxWidgets for OS X Mavericks (issue #15999).

Gerhard
CarCode is offline   Reply With Quote
Old 29-04-2014, 03:30   #135
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,765
Images: 2
Re: New Watchman Plugin

Gerhard
Thankyou for responding. I thought you wanted more plugins for the Mac. Sean and I had successfuly operated (long pole style) with me compiling Sean's macros for windows. It has been frustrating for both of us but it does work.

Sean is unlikely to get a Mac unless people buy him one. I think it is pretty nice he hascreated a compile for osx. I am very sorry wx widgets ballsup mac and wish it were not so, very frustrating, but Sean didn't create the problem.

Congratulations!! I see that you've got a mac version being released. That is wonderful. Well done. I am sure it would be nice to have some plugins too. Maybe with some rewrite by some of the new mac users there could be plugins? Its a hope anyway. I amsure Sean willremove the osx option since there is no need for it right now.

Once again congrats on you Mac release.
rgleason 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
Logbook Konni for OpenCPN konni OpenCPN 1129 22-07-2024 03:15
OpenCPN Release Candidate Version 3.1.1411 Released bdbcat OpenCPN 48 24-02-2013 06:59
GRIB Weather Mark Ward OpenCPN 26 12-02-2012 21:33
Route Properties, Missing Functions James Baines OpenCPN 13 13-07-2011 04:31

Advertise Here


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


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.