ptulp / LogbookKonni_pi

Logbook Version 1.2 for OpenCPN > 3.0
1 stars 3 forks source link

Where is LogbookKonni_Layouts.zip? #24

Open rgleason opened 4 years ago

rgleason commented 4 years ago

Peter, Where can I find this important file that the instructions say should be downloaded and unzipped?

I note that the github repository gitignore has as the last change "ignore zip files for git"

while the instructions ask use to use "Preferences" to download the layout files, but that goes nowhere.

ptulp commented 4 years ago

You can build the layout zip file with the makezip.sh script in github. You can also download it through link in the https://www.opencpn.org/OpenCPN/plugins/logbookkonni.html page. That is stored here: http://opencpn.navnux.org/plugins/logbookkonni_pi/LogbookKonni_Layouts.zip

Hope this helps.

rgleason commented 4 years ago

That does help. Thanks Peter. I hope to have findit and logbookkonni updated for O v5.2 Plugin Manager, and will make a PR to your repos when ready. It builds multiple environments (about 11) with Plots to follow.

rgleason commented 4 years ago

Tried Preferences Install and it opens my local folder C:\Users\Rick\Documents\GitHub\LogbookKonni_pi\build

So this needs to be fixed. Will look at it.

rgleason commented 4 years ago

The most recent version of LogbookKonni v1.4.13.0 which works with Plugin Manager, however the Preferences > Layouts Install goes to

for some reason. This is not the correct location for downloads of the layouts and it needs to be fixed.

rgleason commented 4 years ago

In LogbookOptions.cpp (which should not be touched, wxformbuilder) Line 415

   m_buttonInstallHTMLFiles = new wxButton( m_panel15, wxID_ANY, _( "Install" ), wxDefaultPosition, wxDefaultSize, 0 );
    m_buttonInstallHTMLFiles->SetToolTip( _( "Install OpenCPN_Logbook_Layouts.zip" ) );

I have not found where the path is actually set. I have searched for Layouts.zip

ptulp commented 4 years ago

Rick,

The Layout structure is build and loaded in logbook_pi.cpp in function loadLayouts. As for personal reasons I have not been able to follow the changes for the plugin manager functionality. But there is no mention in the logbook code for tactics_pi.

rgleason commented 4 years ago

Plugin Manager is the new structure for adding plugins to a master opencpn/plugin catalog using tarballs and metadata files. As a result getpshared??? has changed to getplugindatadir and the data directory has changed location depending on the OS.

I have absolutely no idea why it is going to my repos for tactics, except that was what I was last using. Thanks, I will look through logbook_pi.cpp more carefully.

rgleason commented 4 years ago

logbookkonni_pi.cpp starting line 725

wxString logbookkonni_pi::StandardPath( void )
{
    wxStandardPathsBase& std_path = wxStandardPathsBase::Get();
    wxString s = wxFileName::GetPathSeparator();

#ifdef __WXMSW__
    wxString stdPath  = std_path.GetConfigDir();
#endif
#ifdef __WXGTK__
    wxString stdPath  = std_path.GetUserDataDir();
#endif
#ifdef __WXOSX__
    wxString stdPath  = ( std_path.GetUserConfigDir() + s + _T( "opencpn" ) );
#endif

    stdPath += s + _T( "plugins" );
    if ( !wxDirExists( stdPath ) )
        wxMkdir( stdPath );

    stdPath += s + _T( "logbook" );

This is not the path for layout.zip, but it does set up logbook's data directory. This seems to be working, but it may not conform to the new data location which would use getplugindatadir("logbookkonni_i) as a beginning.

GetPluginDataDir instead of previous GetpSharedDataLocation(). See https://github.com/leamas/OpenCPN/wiki/Plugin-adaptation#adapting-plugins-to-the-installer

It does appear that a logbook installation currently is using this folder for images and svg icons. C:\Users\Rick\AppData\Local\opencpn\plugins\logbookkonni_pi\data

It does appear that a logbook installation currently is using this folder for files C:\ProgramData\opencpn\plugins\logbook\data

logbookKonne_pi.cpp LINE 1461

Here is the logbook.zip download area. I think something has changed as a result of the change to Plugin Manager!!

void logbookkonni_pi::loadLayouts( wxWindow *parent )
{
    wxString FILE = _T( "LogbookKonni*.zip" );
    std::auto_ptr<wxZipEntry> entry;
    wxString path, sep;
    sep = wxFileName::GetPathSeparator();

    wxString data = StandardPath();
    data.Append( _T( "data" ) );
    data.append( sep );
    if ( !wxDir::Exists( data ) )
        wxMkdir( data );

    wxString data1 = data;
    wxString data2 = data;
    wxString data3 = data;
    wxString help  = data;

    data.Append( _T( "HTMLLayouts" ) );
    data.append( sep );
    if ( !wxDir::Exists( data ) )
        wxMkdir( data );

    data1.Append( _T( "ODTLayouts" ) );
    data1.append( sep );
    if ( !wxDir::Exists( data1 ) )
        wxMkdir( data1 );

    data2.Append( _T( "Clouds" ) );
    data2.append( sep );
    if ( !wxDir::Exists( data2 ) )
        wxMkdir( data2 );

    data3.Append( _T( "Images" ) );
    data3.append( sep );
    if ( !wxDir::Exists( data3 ) )
        wxMkdir( data3 );
#ifdef __WXOSX__
    wxFileDialog* openFileDialog =
        new wxFileDialog( parent, _( "Select zipped Layout-Files" ), _T( "" ), _T( "" ), _T( "*.zip" ),
                          wxFD_DEFAULT_STYLE, wxDefaultPosition, wxDefaultSize );
#else
    wxFileDialog* openFileDialog =
        new wxFileDialog( parent, _( "Select zipped Layout-Files" ), _T( "" ), _T( "" ), _T( "*.zip" ),
                          wxFD_OPEN, wxDefaultPosition );
#endif
    wxString n = _T( "not " );
    int ret = true;

I think this needs to be fixed.

bdbcat commented 4 years ago

Rick... What exactly is the problem observed? Dave

rgleason commented 4 years ago

logbookkonni_pi.cpp starting line 725

I believe this sets up logbook's data directory. This seems to be working, but it may not conform to the new data location which would use getplugindatadir("logbookkonni_i) as a beginning. GetPluginDataDir instead of previous GetpSharedDataLocation(). See https://github.com/leamas/OpenCPN/wiki/Plugin-adaptation#adapting-plugins-to-the-installer

logbookKonne_pi.cpp LINE 1461 for fixing Layout.zip download Under Preferences > Install Layouts > Install > Install Opencpn Logbook Layouts.zip opens to a random directory on my machine. It should be downloading from http://opencpn.navnux.org/plugins/logbookkonni_pi/LogbookKonni_Layouts.zip

Ptulp wrote:

You can build the layout zip file with the makezip.sh script in github.
You can also download it through link in the https://www.opencpn.org/OpenCPN/plugins/logbookkonni.html page.
That is stored here: http://opencpn.navnux.org/plugins/logbookkonni_pi/LogbookKonni_Layouts.zip

Hope this helps.

Logbook-layout-download