Cruisers Forum
 


Join CruisersForum Today

Reply
 
Thread Tools Rate Thread Display Modes
Old 06-12-2013, 08:41   #196
Registered User
 
rgleason's Avatar

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

Yes, Jean Pierre, it solved the immediate break that I was getting. I'd forgotten those steps! Thanks.
__________________

__________________
rgleason is online now   Reply With Quote
Old 06-12-2013, 08:49   #197
Registered User
 
rgleason's Avatar

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

I just noticed the "buildwin" directory, does that take the place of creating a "build" directory? Can we run Cmake, MSVC Build and Debug and Release in that directory?

If it is not for that purpose, what is it for? Thanks.

I also had a question about plugin Ilegal External file references related to Grib_pi and Dashboard_pi. Are these plugins subject to this rule too?
__________________

__________________
rgleason is online now   Reply With Quote
Old 12-12-2013, 17:35   #198
Registered User
 
rgleason's Avatar

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

NTRO on use of GITHUB.COM and Git

After setting up git

https://help.github.com/articles/set-up-git
and registering for a public account (free) on github.com and setting up and becoming familiar with github.

Then Create A Repository https://help.github.com/articles/create-a-repo

Fork a Repository
To make my own Fork (a snapshot in time of a copy of another repository on github)
see "Fork a Repository" https://help.github.com/articles/fork-a-repo
Using the above, I forked: github.com/seandepagnier/weatherfax_pi to github.com/rgleason/weatherfax_pi about six months ago.

Clone the Fork to your Local Repository
Next "Clone your Fork to a Local Repository" read the end of Fork-a-repo
Note how to keep track of the original repository (seandepagnier/weatherfax_pi) by "Configuring Remotes" by adding 'upstream'.

Six months went by and Sean Depagnier had made changes to his repository.
I needed to get my fork up to date with Sean's repository.

Synch a Fork
So I "Synched a Fork" https://help.github.com/articles/syncing-a-fork
Syncing your fork only updates your local copy of the repository; it does not update your repository on GitHub.
Done using the commands:
git remote -v
git remote add upstream https://github.com/seandepagnier/weatherfax_pi.git
git remote -v
git fetch upstream
git branch -va -Should show the most current upstream commit.
"remotes/upstream/master 5fdff0f Some upstream commit"
Now your Local repository on your computer has a remote branch 'upstream' with the most current commits from seandepagnier/weatherfax_pi
We have fetched the 'upstream' repository.

Next we need to Merge those changes into our local repository.
git checkout master (now pointing to the local repository master)
git merge upstream/master (now merging upstream to the local master)
Make changes on the Local, compile, test and then Commit.
After getting the local repository current with the original repository seandepagnier/weatherfax_pi,
we've made some changes and run some tests on the changes by compiling the code with MSVC++
and those changes work fine. Now we need to commit the changes and updat the personal repository on gitub:

Commit those changes and add an identifying note.
Then publish the commits from your repository into a remote for other users to view and potentially fetch.

Commit changes made.
1. Determine any untracked files that are needed as a part of the commit using git status. Write them down.
2. Add necessary untracked files using git add <file1> <file2> etc.
3. Check for untracked files again using git status.
3. Then commit using git commit -a
git status
show files added to the staging area, files with changes, and untracked files
git diff show a diff of the changes made since your last commit to diff one file: "git diff -- <filename>" to show a diff between staging area and HEAD: `git diff --cached`

git add <file1> <file2> ... add <file1>, <file2>, etc... to the project git add <dir> add all files under directory <dir> to the project, including subdirectories
git commit -a
commit all files changed since your last commit
(does not include new (untracked) files)
Update your personal forked repository on GitHub. ( github.com/rgleason/weatherfax_pi )
When you've made your awesome updates locally, you'll want to synchronize that work back onto GitHub. It's super easy to do:
https://help.github.com/articles/syn...g-repositories

https://help.github.com/articles/pus...shing-a-branch
You can only push to one of two writeable protocol URL addresses.
Those two include an SSH URL like git@github.com:user/repo.git
or HTTPS URL like https://github.com/user/repo.git.
If you cloned a repository with a read-only git:// URL and you have been granted permissions to write to it, you can update the URL to one of the writable forms with:
git remote set-url origin <NEWURL>
Pushing a Branch
To push a local branch to an established remote, you need to issue the command:
git push <REMOTENAME> <BRANCHNAME>

This is most typically invoked as
git push origin master

git push
update the server with your commits across all branches that are *COMMON*
between your local copy and the server. Local branches that were never
pushed to the server in the first place are not shared.

git push origin <branch>
update the server with your commits made to <branch> since your last push.
This is always *required* for new branches that you wish to share. After
the first explicit push, "git push" by itself is sufficient.
After the [git push origin master] is issued, open github and check the commits in your forked repository.
For example: https://github.com/rgleason/weatherfax_pi
To issued the "pull request" to sean was quite easy. I had two commits in the bin waiting.
I picked the "Compare" button on the right which created a diff and showed the pull details and had a green button to make the pull request.

====
Git Help https://help.github.com
Git Cheatsheet https://help.github.com/articles/git-cheatsheet
Cheatsheet $ command line ruby cheat sheets
__________________
rgleason is online now   Reply With Quote
Old 04-11-2014, 09:49   #199
Registered User
 
rgleason's Avatar

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

Quote:
Small advice: Keeping your build under C:\Program Files (x86) is not really a good idea. Permission problems are likely.

Better to have a c:\OpenCPN-Dev folder with a build and a OpenCPN repository underneath.
Agreed!
__________________
rgleason is online now   Reply With Quote
Old 05-11-2014, 23:37   #200
Registered User

Join Date: Feb 2013
Location: Kourou, French Guyana
Boat: Allegro 33
Posts: 245
Re: Development Debugging Environment - Setup Help

Hi!

I am trying to debeug OpenCPN. I have managed to compile and link all files.
I can start debugging in Visual Studio. All menus are fine except the plugin menu. It is completely blank when I am expecting the dashboard and the grib plugin to be there.
Also there must be something wrong with a makefile since I get "These projects are out of date" no madder how many time I recompile it. Se attachment.
Is there anyone experienced this and can it have something to do with the plugins not showing up ?
/Hans
Attached Thumbnails
Click image for larger version

Name:	Out_of_Date.jpg
Views:	57
Size:	31.6 KB
ID:	90970  
__________________
hasse_A is offline   Reply With Quote
Old 06-11-2014, 01:10   #201
Registered User

Join Date: Nov 2012
Location: Orust Sweden
Boat: Najad 34
Posts: 1,967
Re: Development Debugging Environment - Setup Help

Hasse..
I'm not sure if this is your sollution but....:
First:
In pluginmanager.cpp around ~224 based on advices from our guru Pavel I use to edit this function:
Code:
bool PlugInManager::LoadAllPlugIns(const wxString &plugin_dir, bool load_enabled)
{
    #if _DEBUG
        m_plugin_location = _T("C:\\Builds\\OpenCPN\\opencpn\\build\\plugins\\dashboard_pi\\Debug\\"); //Has for debug use
    #else
        m_plugin_location = plugin_dir;
    #endif
Second:
Now when I've pointed to dashboard_pi as the plugin directory all plugins I want to debug must be found there.
So, every time your gradar_pi project is built for debug you've to copy all files in ....\gradar_pi\debug\ to (in my case) .....dashboard_pi\debug\.

And, of course, all path to be edited to fit your environment.
So, if you make a change in gradar_pi and want to test it you've to first build it and then again copy the debug files before the debug test. In VC++ I use to "build only xxxx_pi" and then copy the files before running OCPN debug.
Håkan
__________________
Hakan is offline   Reply With Quote
Old 06-11-2014, 03:41   #202
Registered User
 
rgleason's Avatar

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

Did not know about pluggin manager edit. Never had to do that, but Hakan has described copying the files as i need to do yo run a plugin in debug mode. Hope his suggestion works. Also make sure your git head is ok and you have git fetch to where you want to be, sometimes not everything comes down. Do the same with the plugin git fetch too

Sent from my SCH-I545 using Cruisers Sailing Forum mobile app
__________________
rgleason is online now   Reply With Quote
Old 06-11-2014, 04:38   #203
Registered User

Join Date: Feb 2013
Location: Kourou, French Guyana
Boat: Allegro 33
Posts: 245
Re: Development Debugging Environment - Setup Help

Quote:
Originally Posted by rgleason View Post
Also make sure your git head is ok and you have git fetch to where you want to be, sometimes not everything comes down. Do the same with the plugin git fetch too
So, might this be the reason I get the "Out of date" warning ?

/Hans
__________________
hasse_A is offline   Reply With Quote
Old 06-11-2014, 04:55   #204
Registered User
 
rgleason's Avatar

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

Sometimes I will get errors and find the problem is solved by git pull, however if you have created a git branch and are coding you probably dont want to do that. I only try to fix code but i am not very skilled at it, so for me, git pulll will assure I've got everything needed. My head is usually at master * because i am just compiling code not making it. Git pull will over wrote stuff you've changed or written. Unless you stashed it or created your own branch first and got on that, do coding, then switch branch back to master. But you probably know that better than i do.

Sent from my SCH-I545 using Cruisers Sailing Forum mobile app
__________________
rgleason is online now   Reply With Quote
Old 06-11-2014, 05:51   #205
Registered User

Join Date: Feb 2010
Location: On the go. Not in Prague.
Posts: 4,016
Re: Development Debugging Environment - Setup Help

Just ignore those warnings, zero_check does nothing, i18n has to do with localization files. Both irrelevant for your build.

Pavel


Sent from my iPhone using Cruisers Sailing Forum
__________________
nohal is offline   Reply With Quote
Old 06-11-2014, 15:38   #206
Registered User

Join Date: Feb 2013
Location: Kourou, French Guyana
Boat: Allegro 33
Posts: 245
Re: Development Debugging Environment - Setup Help

Håkan

I changed the pluginmanager.cpp according to your instructions and copied the named files to the Debug directory after the build but I still can't see any plugins there.
F.Y.I. there was already the files for the dashboard there.

/Hans
__________________
hasse_A is offline   Reply With Quote
Old 06-11-2014, 16:39   #207
Registered User

Join Date: Feb 2010
Location: On the go. Not in Prague.
Posts: 4,016
Re: Development Debugging Environment - Setup Help

Hans...
Look into your logfile. Both the location where the plugins are looked for and, if the location is the place where your plugin libraries really are, the reason for failure loading them is there.
You are looking for a section similar to
Code:
18:01:38 CST: PlugInManager searching for PlugIns in location /home/nohal/source/opencpn/build/plugins/secret_pi/
18:01:38 CST: PlugInManager: Loading PlugIn: /home/nohal/source/opencpn/build/plugins/secret_pi/libsecret_pi.so
18:01:38 CST: Error: /home/nohal/source/opencpn/build/plugins/secret_pi/libsecret_pi.so: undefined symbol: _ZTV8AcThread
18:01:38 CST:    PlugInManager: Cannot load library: /home/nohal/source/opencpn/build/plugins/secret_pi/libsecret_pi.so
Of course in your case the paths will be different, but you get the picture - For example in this case the loading failed because I have tried to use an unfinished plugin, without a critical function implemented.

Pavel
__________________
nohal is offline   Reply With Quote
Old 07-11-2014, 07:25   #208
Registered User
 
rgleason's Avatar

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

Some help for reverting back to an earlier version of Garmin Radar that works better.[ I did the exercise below in order to extract the previous opencpn.lib files for the critical versions 3.2.0, 3.2.2 etc for the purpose of running plugins in the Standalone Compile format.] It should serve as an example of how to go back to a particular previous git commit.

Git checkout of various versions of Opencpn to get opencpn.lib versions

https://github.com/OpenCPN/OpenCPN/releases
on May 7, 2013 opencpn-3.2.2 … 0c4bcc9

git checkout 0c4bcc9
Head is not at 0c4bcc9 3.2.2

git branch -v
* no branch 0c4bcc9 3.2.2
master 3ef3142
opencpn-3.2.0 cf69568 3.2.0

git checkout -b opencpn-3.2.2
cd build
cmake ..
cmake --build .
cmake --build . --config release

then search on opencpn.lib and find two
C:\Data-Dart\Up-Soft\Navigation\opencpn-git2\build\release
C:\Data-Dart\Up-Soft\Navigation\opencpn-git2\build\debug
both the same 59kb
copy one to opencpn-lib folder

checkout master

Also did the same for
git checkout -b opencpn-3.2.0
Have included this opencpn-3-2.lib too, but they appear to be the same size.

To help Matt Neptune's Gear
OpenCPN SIMRAD/LOWRANCE Radar Overlay PlugIn
__________________
rgleason is online now   Reply With Quote
Old 07-11-2014, 10:06   #209
Registered User

Join Date: Feb 2013
Location: Kourou, French Guyana
Boat: Allegro 33
Posts: 245
Re: Development Debugging Environment - Setup Help

Håkan

Some progress.
Fallowing your advise, a "Build Clean" and a rebuild now shows the icons in the plugins menue.

Pavel
Now I will have to do some studying if the documents Pavel pointed me to.
Tanks Pavel. Very interesting software.

/Hans
__________________
hasse_A is offline   Reply With Quote
Old 07-11-2014, 10:33   #210
Registered User

Join Date: Nov 2012
Location: Orust Sweden
Boat: Najad 34
Posts: 1,967
Re: Development Debugging Environment - Setup Help

Hans..
Nice to hear. Please enjoy debugging.
If you come to a working data transmit simulation please advise how. My short attempts to use Ostinato is not yet very successful.
Håkan
__________________

__________________
Hakan 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




Copyright 2002- Social Knowledge, LLC All Rights Reserved.

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


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.