Cruisers Forum
 


Join CruisersForum Today

Reply
 
Thread Tools Rate Thread Display Modes
Old 28-08-2012, 14:37   #76
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 8,007
Re: Development Debugging Environment - Setup Help

Dave,
Thanks, and thanks for the idea, I'll try it because I want to see a crash so I know what to report.

By the way, under Locations of Programs above, one line is incorrect

Quote:
OCpn Source C:\ <your data directory>\<Navigation -optional>\opencpn-git\opencpn (Created by Git for Source Files)
It should be:

Quote:
OCpn Source C:\ <your data directory>\<Navigation -optional>\opencpn-git Without \opencpn (Folder for Source Files created by Git when correctly following the command line we give below.)
__________________

__________________
rgleason is offline   Reply With Quote
Old 09-09-2012, 17:42   #77
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 8,007
Re: Development Debugging Environment - Setup Help

Because CM93ed2 charts do not seem to be working (do not show) with this compilation, I am going to download a fresh copy of OpenCPN beta:

Goto "Start" in the search programs and files box at the bottom - Type "cmd"
A black command box will appear. In that box type:
cd.. until you are at the root directory. (or type cd c:\)
The root directory shows as "C:\" only, no sub-directories.
Then type cd C:\<your data directory>\opencpn-git
Then issue the command "git fetch --all"
This will fetch and update all opencpn beta source files.
The response will be something like:
Fetching origin
remote- Counting objects: 100% (30/30), done.
remote- Compressing objects: 100% (30/30), done.
remove- Total 70 (delta 58), reused 52 (delta 40)
Unpacking objects: 100% (70/70), done
From git://github.com/OpenCPN/OpenCPN
e019cc0..918a44b master ->origin/master


If you issue the fetch command again, response with be "Fetching origin" because you've already updated your copy at
C:\<your data directory>\opencpn-git

Now I have to recompile. See Note #12 Building OpenCPN here #post1023683 Note #74 in this thread. After the first command is issued properly it will say "staging to build OpenCPN" and end with "writing..done" "configuring..done" "generating..done" "build files have been written to..."

Then you will need to execute the second half of note #12. From within VS command prompt
cd C:\<Your Data Directory>\opencpn-git\build
cmake --build . <--period is important!!>
__________________

__________________
rgleason is offline   Reply With Quote
Old 09-09-2012, 18:07   #78
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 8,007
Re: Development Debugging Environment - Setup Help

Or as Pavel wrote very helpfully in Note #40
  • Start Visual Studio Command Prompt (2010)
Code:
Quote:
cd C:\Data-Dart\Up-Soft\Navigation git clone git://github.com/OpenCPN/OpenCPN.git opencpn-git cd opencpn-git mkdir build cd build cmake -G "Visual Studio 10" ..
If it goes well:
Code:
Quote:
cmake --build .
Please note the ".." and the "." in these commands they are very important and refer to the current directory and parent directory! They are essential to have the command work.

There it finished for me, with no errors and no warnings.
__________________
rgleason is offline   Reply With Quote
Old 10-09-2012, 17:19   #79
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 8,007
Re: Development Debugging Environment - Setup Help

After clearing and rebuilding OpenCPN beta 3.1.8.814 , and then testing CM93ed2 Charts only, in a very simple configuration using no Chart Groups, and checking "Scan Charts & update db" and "Force Full db rebuild", I still find that CM93ed2 are not working, but are working fine in OpenCPN 3.0.2. -Others seem to have no problem with the compiled exe version of beta.

see messages 158 through 170 of this thread

Dave seems to think it is not a build problem, so I am going to stop until someone has an idea, or I come up with some thoughts.

Quote:
Rick...

Your build logs look fine. I don't think it's a build problem.

In the case where you see the yellow bar, and then click on it, and then it disappears: Lets look at the logfile for this case. O is having some trouble opening the cm93 database.

It is safe to delete the logfile before you start, just to shorten it a bit for inclusion here.

Dave
__________________
rgleason is offline   Reply With Quote
Old 10-09-2012, 20:34   #80
Marine Service Provider
 
bdbcat's Avatar

Join Date: Mar 2008
Posts: 4,652
Re: Development Debugging Environment - Setup Help

Rick...

We need the OpenCPN runtime log file, which you can find from the OpenCPN Help dialog.

Dave
__________________
bdbcat is online now   Reply With Quote
Old 11-09-2012, 07:26   #81
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 8,007
Re: Development Debugging Environment - Setup Help

IF VECTOR CHARTS OR CM93ed2 charts are not working....

Found opencpn.log in c:\programdata\opencpn

Quote:
Originally Posted by rgleason
7:47:26 AM: ChartSymbols ConfigFile not found: C:\Data-Dart\Up-Soft\Navigation\opencpn-git\build\s57data\chartsymbols.xml

7:47:26 AM: S52PLIB: Cannot open S52 rules file: C:\Data-Dart\Up-Soft\Navigation\opencpn-git\build\s57data\S52RAZDS.RLE


From JesperWe:

Aha!! I totally forgot about that :-D

Since you are running from the debugger, the program wants to pick up its s57data folder in C:\Data-Dart\Up-Soft\Navigation\opencpn-git\build\s57data, not from the location of the installed copy. So you need to put a copy of the installed s57data folder in that location.

Or you can copy it from the source tree, OpenCPN/data/s57data

Thanks Dave and JesperWe
__________________
rgleason is offline   Reply With Quote
Old 11-09-2012, 07:49   #82
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 8,007
Re: Development Debugging Environment - Setup Help

CM93ed2 charts are now working.
Copied Opencpn 3.0.2 c:\program files (x86)\opencpn\s57data
folder and files to c:\<your-data-directory>\opencpn-git\build\

Then ran MS VC++ Studio and debug opencpn and Force full databse rebuild under toolbox settings - charts

Works great now. Thanks very much.

Rick
__________________
rgleason is offline   Reply With Quote
Old 11-09-2012, 09:18   #83
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 8,007
Re: Development Debugging Environment - Setup Help

Dave & JesperWe

Perhaps the description for Development Environment and compiling windows, as written on the website, should have a note about this for others who want to test with vector files?

Rick
__________________
rgleason is offline   Reply With Quote
Old 12-09-2012, 04:54   #84
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 8,007
Re: Development Debugging Environment - Setup Help

For Vector Charts and CM93 in Debug mode we should add the following instruction:

Copy the entire "s57data" directory from:
C:\<Data-Dir>\opencpn-git\data\s57data
To: C:\<Data-Dir>\opencpn-git\build to create a new directory "s57data"

However I am wondering if in the instructions we could simply have add a PATH rather than copy the directory?

I intend to improve the writeup and add it as a .doc attachment to this thread.

In using OpenCPN
beta 3.1.8.814 I am struck by how much it has improved.
Thank you!
__________________
rgleason is offline   Reply With Quote
Old 12-09-2012, 06:56   #85
Registered User

Join Date: Dec 2008
Boat: Journeyman
Posts: 705
Re: Development Debugging Environment - Setup Help

Personally I like that the s57data location is relative to the executable. This makes development easier as you can have different versions of the data for different executables, without mixing them up.

And given that you already wrote an instruction on how to handle this in the manual it will less of an issue in the future. Don't know why I didn't think of telling you about it earlier... Too many other things since I last messed with vector charts I guess.

Glad you like the new stuff. Go do another git pull now, and test the new (since yesterday) Options window before we go to beta with it. Feedback straight to me on email if you find any problems!
__________________
JesperWe is offline   Reply With Quote
Old 24-09-2012, 22:18   #86
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 8,007
Re: Development Debugging Environment - Setup Help

If you cannot get your MS VS C++ OpenCPN.sln Project to run properly under "Debug mode" after selecting "Clean" and then "Rebuild" , Jesper suggests as a final solution, you should go back to scratch:
Quote:
1. Delete everything in your build directory except the 4 folders uidata, gshhs, s57data and share.
2. Go "cmake -G "Visual Studio 10" .." from there again and now you have a clean OpenCPN.sln solution you can open in VS2010 and build again.
Rick adds - If that does not work, you could start completely over by
1. Saving the 4 directories Jesper listed above.
2. Then deleting opencpn-git.
3. Then issuing the appropriate git clone command to re download
using the Open Visual Studio Command Prompt
cd C:/<data-directory>OpenCpn-git directory.
Then execute: git clone git://github.com/OpenCPN/OpenCPN.git
See Second Try Note #27 for more information.
__________________
rgleason is offline   Reply With Quote
Old 24-09-2012, 22:21   #87
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 8,007
Re: Development Debugging Environment - Setup Help

I've been having trouble getting the "Options" icons for Display, Connections, Charts, Ship, UI, and Plugins to show. Jesper suggested the following solution:

Copy these files:
opencpn.png
styles.xml
toolicons_journeyman.png
toolicons_joourneyman_flat.png
toolicons_traditional.png
From c:\<data directory>\opencpn-git\src\bitmaps\
To c:\<Data Dir>\opencpn-git\build\uidata\

-I believe the styles.xml that is generated during a build is slightly different than the one in src\bitmaps.
__________________
rgleason is offline   Reply With Quote
Old 24-09-2012, 22:29   #88
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 8,007
Re: Development Debugging Environment - Setup Help

Jesper advises

Quote:
...you can't run plugins with the debug build, only the release.
Getting plugins to run under debug with VS2010 is pretty convoluted. So get rid of the plugins folder from your debug build.
This advice helped me rebuild successfully after I had tried to copy 3.0.2 plugin dlls into the build/plugins directory. --After "clean" and "rebuild" of opencpn.sln the plugins directory reappeared with new folders and files, and debug mode worked.
__________________
rgleason is offline   Reply With Quote
Old 25-09-2012, 04:23   #89
Registered User

Join Date: Dec 2008
Boat: Journeyman
Posts: 705
Re: Development Debugging Environment - Setup Help

Quote:
Originally Posted by rgleason View Post
I believe the styles.xml that is generated during a build is slightly different than the one in src\bitmaps.
Rick, the way you are recording experiences here for others to see is really great! Thanks!

Just to clarify: The styles.xml and related files are not different. The manual copy is needed because when you do a debug build you are not running the installer. The installer is responsible for putting all needed files in their correct location depending on what platform the user is installing on (locations differ between WinXP and Win7 for example).

So when you build your Debug, those steps are not done, and you need to do it manually.

When at some later point styles.xml or others are updated in Git, and you pull the updates, they update your source tree, but your manually copied copies do not update. So you need to copy them again.

The same goes for all content in the folders uidata, s57data, gshhs and share.
__________________
JesperWe is offline   Reply With Quote
Old 25-09-2012, 07:14   #90
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 8,007
Re: Development Debugging Environment - Setup Help

Ah, Ah. Now I understand. Thanks.

When we do a "clean", then "build" or "rebuild" , certain new files are landing in the source tree (for me, c:\<data-directory>\opencpn-git\<some-directory>)?
Or is it when we do a git fetch --all, the files in this directory are updated?

and thus must be copied to the "build" directory (for me, c:\<data-directory>\opencpn-git\build<some-folder>) to have a completely fresh "build", that we make and use from MS VS C++ 2010 to run the "Debug" version of Opencpn.
__________________

__________________
rgleason is offline   Reply With Quote
Reply

Tags
environment

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



Our Communities

Our communities encompass many different hobbies and interests, but each one is built on friendly, intelligent membership.

» More about our Communities

Automotive Communities

Our Automotive communities encompass many different makes and models. From U.S. domestics to European Saloons.

» More about our Automotive Communities

Marine Communities

Our Marine websites focus on Cruising and Sailing Vessels, including forums and the largest cruising Wiki project on the web today.

» More about our Marine Communities


Copyright 2002- Social Knowledge, LLC All Rights Reserved.

All times are GMT -7. The time now is 19:01.


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.