Cruisers Forum
 


Join CruisersForum Today

Reply
 
Thread Tools Rate Thread Display Modes
Old 21-09-2015, 08:06   #436
Registered User
 
rgleason's Avatar

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

To get current, I did
git fetch --all
git fetch upstream
git checkout master
git pull upstream master


Quote:
C:\..\GitHub\OpenCPN>git branch -va
* master beb7951 [ahead 398] Add Windows base build dependent libraries
this matches the upstream master except for the "[ahead 398]"
I am trying to determine why I am [ahead 398] should I remove my local repository and start over?

I thought git pull upstream master would make it exactly parallel.

maybe I should try

git pull hard upstream master?

I would just like to "mirror" upstream master. I have no local changes.

.
__________________

__________________
rgleason is offline   Reply With Quote
Old 21-09-2015, 08:16   #437
Registered User
 
rgleason's Avatar

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

I found that git pull is the same as git fetch and git merge.

I should use

git reset --hard origin/master

to force git to overwrite local files on a pull
https://www.quora.com/How-do-I-force...-files-on-pull
__________________

__________________
rgleason is offline   Reply With Quote
Old 21-09-2015, 09:29   #438
Registered User
 
rgleason's Avatar

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

Well, the above actions, took me back to version 4.1.718 from version 4.1.818 which is what I should have expected.

I suppose I could try to get on the android branch compile the android version

remotes/OpenCPN/android 7ed3cbd 4.1.915

under Windows. Would that be an appropriate thing to do?
__________________
rgleason is offline   Reply With Quote
Old 21-09-2015, 09:39   #439
Registered User
 
rgleason's Avatar

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

I see Hakan is compiling v4.1.915 on Win with vs2010. So I will try.
__________________
rgleason is offline   Reply With Quote
Old 21-09-2015, 11:37   #440
bcn
Registered User

Join Date: May 2011
Location: underway whenever possible
Boat: Rangeboat 39
Posts: 2,722
Re: Development Debugging Environment - Setup Help

Hakan is using VS2010 because he is is still on a XP machine which does not support VS2013.
__________________
bcn is online now   Reply With Quote
Old 21-09-2015, 12:13   #441
Registered User
 
rgleason's Avatar

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

Yes, BCN

I've compiled v4.1.915 with VS2013 and it runs properly. TransmitterDan advises the code is changing fast, and so it may not be easy to get a completion. However it did compile this time.
__________________
rgleason is offline   Reply With Quote
Old 21-10-2015, 16:23   #442
Registered User
 
rgleason's Avatar

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

Process behind how to set up git, make changes, commit changes and push changes to your own repository. Written by Pavel.

Accessing waypoints from plugin development
__________________
rgleason is offline   Reply With Quote
Old 28-10-2015, 06:00   #443
Registered User
 
rgleason's Avatar

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

I am having trouble getting VS2013 working in Debug Mode.
git branch -va * master feb04fd Merge pull request #420 from did-g/chartdlrd

from the MS command line Opencpn release and debug build successfully, so does NSIS cpack command. I have downloaded buildwin and installed it.

From VS2013 I have opend build/Opencpn.sln and set it as Startup project. When Debug would not work properly, I selected "Build>Clean" and then "Build>Build".

After Build the Output shows
= Build: 10 succeeded, 0 failed, 10 up-to-date, 0 skipped =

When I select "Start Debug " ithe progr --- bad internet...am says that
__________________
rgleason is offline   Reply With Quote
Old 28-10-2015, 06:18   #444
Registered User
 
rgleason's Avatar

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

Continued - prompt say
"Unable to start program
'C:/.../Opencpn/Build/Debug/ALL_BUILD'
System cannot find file specified"

MSVS2013 says when I close that I am missing MS DB 4.0 and Intellisense will not run. Also there are uppdates for VS2013. Should I update and install DB 4.0?
__________________
rgleason is offline   Reply With Quote
Old 28-10-2015, 06:23   #445
Registered User
 
rgleason's Avatar

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

Some stupid Shockwave popup from CF website is freezing my Firefox CF screen!
__________________
rgleason is offline   Reply With Quote
Old 28-10-2015, 06:32   #446
Registered User
 
rgleason's Avatar

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

The updates are:
Visual Studio 2013 Update 5 (2013.5) RTM
and NuGet Package Manager

I am inclined not to install them.

The DB is MS Compact SQL DB 4.0 or something like that.
__________________
rgleason is offline   Reply With Quote
Old 28-10-2015, 06:33   #447
Registered User

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

Rick...
I hope you are not trying to run the ALL_BUILD target and have set the opencpn one as what you want to run (Right-click, Set startup as startup project...; It will then be bold in the list).
And no, you should not install anything, you should have a look what is missing, if anything at all, and fix it. In this case I suppose it will be the DLLs from buildwin package in you build/[Debug,Release] folder (or the location where you decompressed buildwin archive added in your PATH).
I don't see anything wrong on keeping your VisualStudio installation up to date.

Pavel
__________________
nohal is offline   Reply With Quote
Old 28-10-2015, 07:08   #448
Registered User
 
transmitterdan's Avatar

Join Date: Oct 2011
Boat: Valiant 42
Posts: 3,897
Re: Development Debugging Environment - Setup Help

Rick,

Be sure to set "opencpn" as the startup project. It should be in bold and no other item should be shown in bold in the project explorer window.

Here are some "handy" batch files that I use to build O under windows 7, 8.1 and 10. The first one I call "build.bat" and it contains:

Code:
del opencpn*.exe
cmake --build . --config release
cmake --build . --config release --target package
Next is "dbbuild.bat" and it contains:

Code:
cmake --build . --config debug
cmake --build . --config debug
call dbcopy.bat
This requires "dbcopy.bat":

Code:
@echo "Copying chartdldr_pi.dll to .\plugins"
copy /Y plugins\chartdldr_pi\Debug\chartdldr_pi.dll .\plugins
@echo "Copying grib_pi.dll to .\plugins"
copy /Y plugins\grib_pi\Debug\grib_pi.dll .\plugins
@echo "Copying dashboard_pi.dll to .\plugins"
copy /Y plugins\dashboard_pi\Debug\dashboard_pi.dll .\plugins
This handy batch file I call "git_opencpn.bat". It fetches the repository and builds it with VS2013:

Code:
mkdir obeta
cd obeta
git clone https://github.com/OpenCPN/OpenCPN.git
cd Opencpn
powershell -Command "(New-Object Net.WebClient).DownloadFile('http://sourceforge.net/projects/opencpnplugins/files/opencpn_packaging_data/OpenCPN_buildwin.7z/download', 'OpenCPN_buildwin.7z')"
7z x -y OpenCPN_buildwin.7z
mkdir build
cd build
copy ..\..\..\*.bat
call config.bat
call dbbuild.bat
call build.bat
And now for the monster batch file that sets up all your folders so you can effectively debug O. I call this "config.bat":

Code:
del CMakeCache.txt
cmake -T v120_xp ..
xcopy /Y /Q /H /E /K /I ..\data\gshhs\*.* .\gshhs
xcopy /Y /Q /H /E /K /I ..\data\styles\*.* .\uidata
xcopy /Y /Q /H /E /K /I ..\data\s57data\*.* .\s57data
xcopy /Y /Q /H /E /K /I ..\data\sounds\*.* .\sounds
xcopy /Y /Q /H /E /K /I ..\data\tcdata\*.* .\tcdata
xcopy /Y /Q /H /E /K /I ..\data\wvsdata\*.* .\wvsdata
xcopy /Y /Q /H /E /K /I ..\data\license.txt .\
xcopy /Y /Q /H /E /K /I ..\data\doc\*.* .\doc
mkdir uidata
xcopy /Y /Q ..\src\bitmaps\styles.xml .\uidata
xcopy /Y /Q ..\src\bitmaps\toolicons_traditional.png .\uidata
xcopy /Y /Q ..\src\bitmaps\toolicons_journeyman.png .\uidata
xcopy /Y /Q ..\src\bitmaps\toolicons_journeyman_flat.png .\uidata
mkdir release
cd release
mkdir uidata
cd ..
xcopy /Y /Q /H /E /K /I ..\data\gshhs\*.* .\release\gshhs
xcopy /Y /Q /H /E /K /I ..\data\styles\*.* .\release\uidata
xcopy /Y /Q /H /E /K /I ..\data\s57data\*.* .\release\s57data
xcopy /Y /Q /H /E /K /I ..\data\sounds\*.* .\release\sounds
xcopy /Y /Q /H /E /K /I ..\data\tcdata\*.* .\release\tcdata
xcopy /Y /Q /H /E /K /I ..\data\wvsdata\*.* .\release\wvsdata
xcopy /Y /Q /H /E /K /I ..\data\license.txt .\release
xcopy /Y /Q /H /E /K /I ..\data\doc\*.* .\release\doc

xcopy /Y /Q /H /E /K /I ..\buildwin\*.dll .\release
xcopy /Y /Q /H /E /K /I ..\buildwin\crashrpt\CrashRpt1402.dll .\release
xcopy /Y /Q /H /E /K /I ..\buildwin\crashrpt\CrashSender1402.exe .\release
xcopy /Y /Q /H /E /K /I ..\buildwin\crashrpt\crashrpt_lang.ini .\release
xcopy /Y /Q /H /E /K /I ..\buildwin\crashrpt\dbghelp.dll .\release
xcopy /Y /Q /H /E /K /I ..\buildwin\*.dll .\debug
xcopy /Y /Q /H /E /K /I ..\buildwin\*.crt .

xcopy /Y /Q ..\src\bitmaps\styles.xml .\release\uidata

xcopy /Y /Q ..\src\bitmaps\toolicons_traditional.png .\Release\uidata
xcopy /Y /Q ..\src\bitmaps\toolicons_journeyman.png .\Release\uidata
xcopy /Y /Q ..\src\bitmaps\toolicons_journeyman_flat.png .\Release\uidata
And finally a little helper called "clean.bat" so I can do a clean build if I want.

Code:
cmake --build . --config release --target clean
cmake --build . --config debug --target clean
If you put these batch files in a folder and then run git_opencpn.bat it will fetch the repository, the buildwin dependencies, set up all the required folders so you can debug and then build O in both release and debug. If you have any problems let me know.

Dan
__________________
transmitterdan is offline   Reply With Quote
Old 28-10-2015, 07:48   #449
Registered User
 
rgleason's Avatar

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

Dear Pavel, and Dan.

Thank you! Pavel you were right had to set startup to "Opencpn" then had to "Clean" and "Rebuild" then found I had to copy uidata to /build/ directory, and it is running now.

Hopefully I can be of some real use with debug data now.

I did copy all contents of ...git/opencpn/buildwin directory to git/opencpn which may not be necessary. I will try removing those files and dir and see if it "Start Debug" still works.

Thanks for the help. I think I need to have the MS Database 4.0 for Intellisense, but I can run debug Opencpn without it.

The VS Update 5 shows as Version 13.5 or something so I am not going to do that!

Peave: MS dumps so much software on you and it never removes old stuff and I never know if I really need it. They need a better diet. Higher quality and less.

Thanks for the bat files. WOW. Will try them.
__________________
rgleason is offline   Reply With Quote
Old 28-10-2015, 14:05   #450
Registered User
 
rgleason's Avatar

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

Dan,
I've made all these bat files, but where is dbcopy.bat?

May I put these up on Opencpn Beta File Thingie?
under "Development Debugging Environment"?

Or maybe TDan Dev Environment?
__________________

__________________
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




Copyright 2002- Social Knowledge, LLC All Rights Reserved.

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


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.