Cruisers Forum
 


Join CruisersForum Today

Reply
 
Thread Tools Rate Thread Display Modes
Old 12-06-2016, 05:30   #31
Registered User

Join Date: Jul 2015
Location: Plano, Texas
Posts: 68
Re: Building on Mac El Capitan

Quote:
Originally Posted by CarCode View Post
Proposing a language depends always on the person who did it, e.g., if he well know a language he will propose it...

Gerhard
Quote:
Originally Posted by dwoodall View Post
You might want to take a look at the MonoDevelop tool. It allows C#/.NET programs to be built and ran on MAC's. It is open source.

Regards,
Doug
True Gerhard,

I will only say I have written a lot of code in C and C++. So in my case familiarity is not the reason I recommend C#. I simply feel it is a better language and much more maintainable than it's predecessors. But again, every one is different. However, I personally would not a start a new project in C or C++.

To the point made earlier about a lot of things being built in, here is my code to read the XML NOAA product catalog for ENC files. Notice that the actual reading of the XML file is one of line of code using the built in facilities of .NET.

private void btnENCCatalog_Click(object sender, EventArgs e)
{
const string ENCUrlString = "http://www.charts.noaa.gov/ENCs/ENCProdCat.xml";

// use XDocument to load the catalog
Cursor.Current = Cursors.WaitCursor;
ENCCat = XDocument.Load(ENCUrlString);
Cursor.Current = Cursors.Default;

// display it in a tree view just to do something with it
treeView(ENCCat, tviewXMLTree);
}

Saving the XML file is about the same and .net automatically builds a local cache of the file so it is not necessary to re-read it. I am going to spend some time looking a LINQ facilities to put the XML in an appropriate class so I can treat it as any other C# object. I also need to add some error checking on the load side using a try-catch clause.

Regards,
Doug
__________________

__________________
dwoodall is offline   Reply With Quote
Old 12-06-2016, 10:05   #32
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 9,356
Re: Building on Mac El Capitan

Doug, does .Net work in Linux and Mac? -no agenda here, just curious.

Also, as bdbcat says, he is concerned about speed, when separating Core + UI. Which leads to the question about raspberry_pi and other low powered computers being able to use OpenTrident? Is there some way of linking Core to UI at build time?

Just to understand, would the core have a whole list of functions like Pan, Zoom, Drop Mark, etc that get linked to by the UI?
__________________

__________________
rgleason is offline   Reply With Quote
Old 12-06-2016, 10:14   #33
bcn
Registered User

Join Date: May 2011
Location: underway whenever possible
Boat: Rangeboat 39
Posts: 2,758
Re: Building on Mac El Capitan

Rick,

the fork will be just for macOS, no other target.

This is an ambitious project and will take it's time and resources.
User interfaces require a lot of testing and another issue will be keeping the forked version in synch with the master (or not).

Without taking into account plug-ins, which are another important part of the OCPN biosphere.

Hubert
__________________
bcn is online now   Reply With Quote
Old 12-06-2016, 10:36   #34
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 9,356
Re: Building on Mac El Capitan

Quote:
the fork will be just for macOS, no other target
Yes, will there be a [Core] left that is useable by the other OS to develop OS specific UI's?

Or are you guys just going to write MAC only code?
__________________
rgleason is offline   Reply With Quote
Old 12-06-2016, 12:31   #35
Registered User

Join Date: Jul 2010
Location: Monastir, Tunisia
Boat: Amel Sharki
Posts: 1,774
Re: Building on Mac El Capitan

Quote:
Originally Posted by rgleason View Post
Yes, will there be a [Core] left that is useable by the other OS to develop OS specific UI's?

Or are you guys just going to write MAC only code?
Last warning now: Keep off and don't come back!
You are a spamer.

Gerhard
__________________
CarCode is offline   Reply With Quote
Old 12-06-2016, 13:12   #36
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 9,356
Re: Building on Mac El Capitan

Carcode, OpenCPN is open source, and I have been a contributing member of this forum for years. I think it is unreasonable to take the work of others and create a new work that does not contribute back to the main effort. (This is just my opinion, and it may expand upon the real definition of Open Source.) That is why I ask about there being a [Core] + UI which would allow others to build additional OS UI that would work.

Otherwise it would just be a big effort for the benefit of MAC only, with no advantage to any other OS. Then why bother to contribute to the effort?

I ask a good question here and am met with your unreasonable and irrational response. It is much like your own special version for MAC that you developed and did not share for years. Your colors are brilliant, and understood. You have no sense of community.
__________________
rgleason is offline   Reply With Quote
Old 12-06-2016, 13:39   #37
bcn
Registered User

Join Date: May 2011
Location: underway whenever possible
Boat: Rangeboat 39
Posts: 2,758
Re: Building on Mac El Capitan

Just to remember -

this is Open Software and about fun to develop practical things (or just weird ones), to support and to use it.

Now if somebody wants to go to a crusade or to fight wind mills emulating the Don Quixote hopefully there is a Sancho Panza at his side and somebody who helps to explain that fighting ghosts is just ridiculous.
__________________
bcn is online now   Reply With Quote
Old 12-06-2016, 13:44   #38
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 9,356
Re: Building on Mac El Capitan

Agreed, BCN. It should be fun. I don't really care Gerhard, so develop a MAC only version, it'd be a lost opportunity, but that's ok.
__________________
rgleason is offline   Reply With Quote
Old 12-06-2016, 13:49   #39
bcn
Registered User

Join Date: May 2011
Location: underway whenever possible
Boat: Rangeboat 39
Posts: 2,758
Re: Building on Mac El Capitan

I don't know if this is a lost opportunity - time will show.

But going to war about it is just nuts..

And for sure not the intention of Doug.
__________________
bcn is online now   Reply With Quote
Old 12-06-2016, 13:57   #40
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 9,356
Re: Building on Mac El Capitan

BCN all I did was to ask a good question.
__________________
rgleason is offline   Reply With Quote
Old 12-06-2016, 14:01   #41
bcn
Registered User

Join Date: May 2011
Location: underway whenever possible
Boat: Rangeboat 39
Posts: 2,758
Re: Building on Mac El Capitan

Yes, your question is a logical one. And deserves a response about it's content.
__________________
bcn is online now   Reply With Quote
Old 12-06-2016, 14:03   #42
Registered User

Join Date: Jul 2015
Location: Plano, Texas
Posts: 68
Re: Building on Mac El Capitan

Quote:
Originally Posted by rgleason View Post
Doug, does .Net work in Linux and Mac? -no agenda here, just curious.

Also, as bdbcat says, he is concerned about speed, when separating Core + UI. Which leads to the question about raspberry_pi and other low powered computers being able to use OpenTrident? Is there some way of linking Core to UI at build time?

Just to understand, would the core have a whole list of functions like Pan, Zoom, Drop Mark, etc that get linked to by the UI?
According to the mono web site, their version does. At least that is how I read it. Never used it so I don't know for sure. Might be worth a look. I am not a mac guy. I use them when I need to, but my development activities are all windows pc related. I would also be concerned about performance issues if the core and ui were isolated. I think the devs on this project have done a hell of a job and while I find it an interesting notion to have platform specific versions, until someone comes up with a decent scheme to make that happen, I would stick with it as it is. Mono would be worth a look if only because of all the features that .NET offers, if in fact it really works on macs and linux platforms.

Regards,
Doug
__________________
dwoodall is offline   Reply With Quote
Old 12-06-2016, 19:42   #43
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 9,356
Re: Building on Mac El Capitan

Thank you Doug, I should have looked it up myself.
Linux | Mono
Download | Mono
Application Portability | Mono
Getting Started | Mono
__________________
rgleason is offline   Reply With Quote
Old 13-06-2016, 03:34   #44
Registered User

Join Date: Feb 2012
Location: San Diego, CA
Boat: Cape George 36
Posts: 77
Images: 3
Re: Building on Mac El Capitan

Wow, I take a couple days to work on the boat (remember boats?) and this kind of explodes.

I have added a wxCompat library which has the bare minimum stuff to support non-gui code. There is a wx build flag which is something like -disable-gui but when you do that none of the image manipulation code gets built. I want basics plus image but no widgets so I'm dragging in just the wx code required for that and no more.

On language choice...I'm not rewriting anything I don't have to. C# is a non-starter because, apart from Xamarin, there is no nice way to call it from Objective C or much of anything else. There is Objective C++. That works. I have succeeded, so far, in building NMEA0813 library and am working on S57 now. I haven't checked anything in yet. My laptop needs to go into the shop for a new keyboard so I'll get precious little done this week but next weekend I will be cooped up in a hotel on business travel and will likely get a lot done.

I will start making commits to OpenTrident soon in branches and will make pull requests back to OpenCPN as I make changes to decouple the UI from the core code (ProgressDialog is a major leak of UI into model that needs addressing ASAP).
__________________
AuroraGH is offline   Reply With Quote
Old 15-06-2016, 04:52   #45
Registered User

Join Date: Jul 2010
Location: Monastir, Tunisia
Boat: Amel Sharki
Posts: 1,774
Re: Building on Mac El Capitan

Todays trunk of wxWidgets 3.1.1 was updated to macOS Sierra (10.12) and at least my own version of OCPN compiles fine with Xcode Beta 8 and SDK 10.12.

Gerhard
__________________

__________________
CarCode is offline   Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

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
Trouble building 3.2 on Mac jasenj1 OpenCPN 34 25-05-2013 08:53
Wood That Won't Warp For Building Entire Kitchen Counter, and Advice On Building Hatc albergsailor Monohull Sailboats 30 25-09-2012 10:15
Building OpenCPN on Mac sbfreddie OpenCPN 8 07-04-2012 18:24
Mac Mini Desktop Computers sluissa Marine Electronics 27 05-09-2009 19:46
sailmail and mac vonnwonder Marine Electronics 3 14-12-2006 15:53



Copyright 2002- Social Knowledge, LLC All Rights Reserved.

All times are GMT -7. The time now is 06:15.


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

ShowCase vBulletin Plugins by Drive Thru Online, Inc.