Closed rgleason closed 3 years ago
See Dev Manual User Config Path https://opencpn-manuals.github.io/development/plugin-installer/0.0.1/Terminology.html#_user_config_path
For windows this is %LOCALAPPDATA% or %HOME%\Appdata\Local on window This directory cannot be written to by the User! Instead another data directory has to be created.
Why is it called the "User Config Path"? I think this is confusing. terminology.
I think it is intended to be called Plugin Install Path https://opencpn-manuals.github.io/development/plugin-installer/0.0.1/Terminology.html#_user_install_path
Anyway right now I am having trouble getting getpPrivateApplicationDataLocation along with Android configuration (which worked earlier)
Please see these two builds.
2.3.5.1 incl android + flatpak (should be labeled2.3.5.2 to match the tag) - FAILS
2.3.5.1 rework bad merge - ALL BUILD
The last commit tries to implement getpPrivateApplicationDataLocation and add Android UI features. The difference is the issue in 2.3.5.1 rework bad merge The errors are "NAN" errors. Which I have not been able to fix.
Rick... I do not see NAN issues in the latest build failures. What I "see" is a missing file: src/zuFile.h. Causes all builds to fail. What happened to this file? Seems that this file first appeared in climatology, and is also required for celestial?
Oh that is very helpful. Why did I not see that? I think Norton may have stolen it and put it in quarantine, not sure but this has happened once or twice before. Jeez Norton is a pain, but I feel bare without it. I will find one. Thank you! Sorry about bothering you.
Dave, I've found two files that are needed, plus added zlib-1.2.3 and bzip2 files which were also missing since there were errors looking for these. What I have done so far:
C:\Users\fcgle\source\celestial_navigation_pi\src\CelestialNavigationDialog.cpp(625): fatal error C1004: unexpected end-of-file found [C:\Users\fcgle\source\celestial_navigation_pi\build\celestial_navigation_pi.vcxproj]
(Also there are a lot of Nan and infinity warnings.)
I have checked all the pairs of brackets in the file, compared it to earlier files and have tried to save it with a feature "trim trailing spaces". I can't figure out what the problem is. It won't build locally, but I am going to push it up to github.
https://github.com/rgleason/celestial_navigation_pi Master branch
If you have any other thoughts about this I would be very interested.
Rick... typo in CelestialNavigationDialog.cpp:424 is: m_lSights->SetItem(idx, rmTYPE, SightType[s->m_Type]); should be: m_lSights->SetItem(idx, rmTYPE, SightType([s->m_Type]);
Note added "(".
Dave,
m_lSights->SetItem(idx, rmTYPE, SightType([s->m_Type]));
You are very kind to put up with the likes of me, with eyesight getting worse, an old hack, etc.
Do I need another right bracket too?
Rick PS: Sorry I emailed this too by mistake.
Rick... Disregard previous suggestion. Line 424 is fine as is.
Maybe I was sloppy and deleted or missed in copying, an #endif after
. #ifdef __OCPN__ANDROID__
void CelestialNavigationDialog::OnEvtPanGesture( wxQT_PanGestureEvent &event)
{
switch(event.GetState()){
case GestureStarted:
m_startPos = GetPosition();
m_startMouse = event.GetCursorPos(); //g_mouse_pos_screen;
break;
default:
{
wxPoint pos = event.GetCursorPos();
int x = wxMax(0, pos.x + m_startPos.x - m_startMouse.x);
int y = wxMax(0, pos.y + m_startPos.y - m_startMouse.y);
int xmax = ::wxGetDisplaySize().x - GetSize().x;
x = wxMin(x, xmax);
int ymax = ::wxGetDisplaySize().y - GetSize().y; // Some fluff at the bottom
y = wxMin(y, ymax);
Move(x, y);
} break;
}
// master
}
LINE 217? put #endif here?
around line 217
I think I'll try that.
Ok that seems to build further, don't know for sure if that is where the #endif goes.....
but the next hangup is from zuFile and I have seen this before, unresolved external symbol gzopen, gzread, gzseek, gxtell, and gxclose
So something is wrong in my cmakelists.txt file
geodesic.c
Creating library C:/Users/fcgle/source/celestial_navigation_pi/build/Release/celestial_navigation_pi.lib and object C:/Users/fcgle/source/celestial_navigation_pi/build/Release/celestial_navigation_pi.exp
zuFile.obj : error LNK2019: unresolved external symbol _gzopen referenced in function _zu_open [C:\Users\fcgle\source\celestial_navigation_pi\build\celestial_navigation_pi.vcxproj]
zuFile.obj : error LNK2019: unresolved external symbol _gzread referenced in function _zu_read [C:\Users\fcgle\source\celestial_navigation_pi\build\celestial_navigation_pi.vcxproj]
zuFile.obj : error LNK2019: unresolved external symbol _gzseek referenced in function _zu_rewind [C:\Users\fcgle\source\celestial_navigation_pi\build\celestial_navigation_pi.vcxproj]
zuFile.obj : error LNK2019: unresolved external symbol _gztell referenced in function _zu_rewind [C:\Users\fcgle\source\celestial_navigation_pi\build\celestial_navigation_pi.vcxproj]
zuFile.obj : error LNK2019: unresolved external symbol _gzclose referenced in function _zu_can_read_file [C:\Users\fcgle\source\celestial_navigation_pi\build\celestial_navigation_pi.vcxproj]
C:\Users\fcgle\source\celestial_navigation_pi\build\Release\celestial_navigation_pi.dll : fatal error LNK1120: 5 unresolved externals [C:\Users\fcgle\source\celestial_navigation_pi\build\celestial_navigation_pi.vcxproj]
Those are located in zlib and we have zlib-1.2.3 in the libs/ folder, but there are no cpp files! https://www.zlib.net/ has zlib 1.2.11 from 2017 do I dare download and use that? I guess I don't understand why all this is missing. I am going to check github history!
I checked back in the frontend2 branch and did not find these libraries were being used. I don't know why we are being forced down this road of adding libraries that were not there. Indeed frontend2 built fine, but without some of the more recent if androids.
I did find that Sean had added android UI and had fixed the database for android see https://github.com/rgleason/celestial_navigation_pi/commit/89fef0eb6f5ac4d3a811cef84309ce12cc47a892#diff-41f953ddfbd947912eec708c84fc4a9bfdce02acea05dd66e86d034e141f51cd
And in that same area he changed the db to work with android, so android has been around for some time...
Do you think I should just update the library to zlib 1.2.11 ?
No. This is a rathole. Revert back to before Android, and drop Android for now. I cannot help you now. Later days....
Ok, I agree totally. I will revert it. But as I wrote earlier, android has been in this plugin a long time However, I think I still need the getpPrivateDataLocation addition to be compatible with the new PIM standard for data location.
BTW I found https://zlib.net/fossils/ with zlib-1.2.3 it is just500kb but many files, and I determined that weather_routing (which is where I got zlib-1.2.3) just has the two header files and no cpp.
Thanks
I had to try it after learning more, I uncommented the one AndroidUI command at the top of cel_navdialog.cpp and then ran a build and it completed! The include zuFile.h is still commented out, so that was the problem, I think I am going to remove that commented out line completely and all the excess files/libs and cmakelists.txt refs. to clean up.
Will test and see what happens.
Cleaned up and working in Win10, will push