Cruisers Forum
 

Go Back   Cruisers & Sailing Forums > Seamanship, Navigation & Boat Handling > OpenCPN
Cruiser Wiki Click Here to Login
Register Vendors FAQ Community Calendar Today's Posts Log in

Reply
  This discussion is proudly sponsored by:
Please support our sponsors and let them know you heard about their products on Cruisers Forums. Advertise Here
 
Thread Tools Search this Thread Rate Thread Display Modes
Old 15-04-2023, 01:13   #1
Registered User
 
yachtvalhalla's Avatar

Join Date: Aug 2009
Location: Philippines
Boat: Formerly Fuji 32 Ketch
Posts: 1,021
Why Climatology files in Program Data?

The location of the Climatology files in Program Data and not with the other plugins prevents it from being used in a Portable version of the program.

Is there a reason for this difference?

Terry
yachtvalhalla is offline   Reply With Quote
Old 17-04-2023, 15:41   #2
Registered User
 
yachtvalhalla's Avatar

Join Date: Aug 2009
Location: Philippines
Boat: Formerly Fuji 32 Ketch
Posts: 1,021
Re: Why Climatology files in Program Data?

A portable version of 5.8.0 cannot be made to include the Climatology plugin.

If, in the future, the Climatology files are moved to the plugin folder under the program (vice under ProgramData) then it will be possible.

Sad to lose this useful plugin in the portable versions.

Terry
yachtvalhalla is offline   Reply With Quote
Old 18-04-2023, 12:19   #3
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,766
Images: 2
Re: Why Climatology files in Program Data?

Terry, I believe the portable version will be seeing improvements insofar as plugin handling. The plugin handling part is only handling legacy type PI right now. Alec has made some reports about this and may have this in his sights, but it would definitely be after all the user reports on O5.8.
rgleason is offline   Reply With Quote
Old 18-04-2023, 16:14   #4
Registered User
 
yachtvalhalla's Avatar

Join Date: Aug 2009
Location: Philippines
Boat: Formerly Fuji 32 Ketch
Posts: 1,021
Re: Why Climatology files in Program Data?

Quote:
Originally Posted by rgleason View Post
Alec has made some reports about this and may have this in his sights, but it would definitely be after all the user reports on O5.8.
Thanks Rick Any way to contact Alec?
Terry
yachtvalhalla is offline   Reply With Quote
Old 18-04-2023, 16:40   #5
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,766
Images: 2
Re: Why Climatology files in Program Data?

Quote:
Originally Posted by yachtvalhalla View Post
Thanks Rick Any way to contact Alec?
Terry
You can reach him via github/opencpn, but his is quite busy right now. I haven't used portable much.

Please tell me what you have tried to install a the Ov5.8 Climatology version with the Ov5.8 Portable version.
What directories did you use?
Did you try expanding the tarball and copying the dll file and climatology data dir to %localappdata\opencpn\plugins? (for Windows)


It may not work because the new non-portable Ov5.8 works differently with plugins than the current portable Ov5.8!


Let us know what you have tried. Perhaps the plugin will work when installed in the Internal Plugin locations.
rgleason is offline   Reply With Quote
Old 18-04-2023, 17:11   #6
Registered User
 
yachtvalhalla's Avatar

Join Date: Aug 2009
Location: Philippines
Boat: Formerly Fuji 32 Ketch
Posts: 1,021
Re: Why Climatology files in Program Data?

Quote:
Originally Posted by rgleason View Post
It may not work because the new non-portable Ov5.8 works differently with plugins than the current portable Ov5.8!
Hi Rick,

What is the "current portable Ov5.8"? I don't know what this is.

The portable version I've been making and have provided to many users over the years is made buy putting the contents of the OpenCPN folders under Program Files (x86), the opencpn folder under Program Data and a batch file together in a single folder. This procedure is in the Help file for OpenCPN (from a guide I made explaining how to make a portable version)

The problem now is that previously the Climatology files were in the 'plugin' folder under Program Files. They are now in a folder 'plugin' under the opencpn folder in Program Data. Combining the contents of both 'plugin' folders does not work. Adding another folder 'opencpn' containing the Climatology files does not work.

All was fine through versions up to 5.6.2.

Terry
yachtvalhalla is offline   Reply With Quote
Old 19-04-2023, 11:31   #7
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,766
Images: 2
Re: Why Climatology files in Program Data?

Quote:
Originally Posted by yachtvalhalla View Post
Hi Rick,

The problem now is that previously the Climatology files were in the 'plugin' folder under Program Files. They are now in a folder 'plugin' under the opencpn folder in Program Data. Combining the contents of both 'plugin' folders does not work. Adding another folder 'opencpn' containing the Climatology files does not work. All was fine through versions up to 5.6.2.

Terry

Terry, I haven't taken the time to play your youtube, sorry.


If you are using the typical O5.8 exe file and "making a batch file" to make it all portable, you need to mimic exactly the right External PI file locations for O5.6.2 and O5.8 (which have not changed).


The climatology.dll and climatology_pi/usericons folder should be installed to the standard location for o5.6.2 and o5.8 which is
  • %localappdata\opencpn\plugins
  • OR
  • C:\Users\<username>\AppData\Local\opencpn\plugins
  • which are the same location.
I also notice that after installation of the plugin and activation, and upon first use, climatology data is then downloaded to the old legacy plugin folder

  • C:\ProgramData\opencpn\plugins\climatology_pi\data
I think we need to consider changing this to
  • C:\Users\<username>\AppData\Local\opencpn\plugins\ climatology_pi\data
in the next update, but it seems to work fine right now where it is located.


Your batch file should duplicate this setup. If you have any further questions please be more detailed so that we can help you.
rgleason is offline   Reply With Quote
Old 19-04-2023, 17:04   #8
Registered User
 
yachtvalhalla's Avatar

Join Date: Aug 2009
Location: Philippines
Boat: Formerly Fuji 32 Ketch
Posts: 1,021
Re: Why Climatology files in Program Data?

Rick,

>Terry, I haven't taken the time to play your youtube, sorry.

What youtube? I referred to the Help file for OpenCPN, not any youtube. And didn't you assist in getting my guide to making a portable version in the Help file several years ago?

>you need to mimic exactly the right External PI file locations for O5.6.2 and O5.8 (which have not changed)

I believe they have changed and that is the problem. In O5.6.2 the PI files were under the Program files and in O5.8 they are now under ProgramData files.

>The climatology.dll and climatology_pi/usericons folder should be installed to the standard location for o5.6.2 and o5.8 which is
  • %localappdata\opencpn\plugins
  • OR
  • C:\Users\<username>\AppData\Local\opencpn\plugins
  • which are the same location.
That location does not contain the cache folder which I presume is necessary. And that location has not previously been associated with a portable version which up to now has worked fine.

A portable version of 5.8.0 runs fine using the ages old procedure of putting files from the Program and ProgramData in a single folder with a batch file EXCEPT for the Climatology plugin which goes through the motions of being installed but does not present an icon in the Toolbar for activation.

Terry
yachtvalhalla is offline   Reply With Quote
Old 19-04-2023, 17:19   #9
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,766
Images: 2
Re: Why Climatology files in Program Data?

Quote:
Originally Posted by yachtvalhalla View Post
Rick,

>Terry, I haven't taken the time to play your youtube, sorry.

What youtube? I referred to the Help file for OpenCPN, not any youtube. And didn't you assist in getting my guide to making a portable version in the Help file several years ago?

>you need to mimic exactly the right External PI file locations for O5.6.2 and O5.8 (which have not changed)

I believe they have changed and that is the problem. In O5.6.2 the PI files were under the Program files and in O5.8 they are now under ProgramData files.

>The climatology.dll and climatology_pi/usericons folder should be installed to the standard location for o5.6.2 and o5.8 which is
  • %localappdata\opencpn\plugins
  • OR
  • C:\Users\<username>\AppData\Local\opencpn\plugins
  • which are the same location.
That location does not contain the cache folder which I presume is necessary. And that location has not previously been associated with a portable version which up to now has worked fine.

A portable version of 5.8.0 runs fine using the ages old procedure of putting files from the Program and ProgramData in a single folder with a batch file EXCEPT for the Climatology plugin which goes through the motions of being installed but does not present an icon in the Toolbar for activation.

Terry

Terry that is right, I did help you. It was a while ago.


I am talking about expanding climatology.tar.gz and putting the pieces such as dll and climatology_pi\icons and climatology_pi\data in the correct places.


Sorry, I do not believe you can use the old procedures with OpenCPN 5.8


I would have to experiment further to determine this, but don't have time right now. We will try to fix Climatology for portable when we next touch it, but it is a known fact that O5.8 needs some work on the portable version with respect to its use of plugins!!!


You can file an Issue under my github repos for climatology if you would like.
But I believe you can get climatology running with o5.8 if you follow what I told you.
rgleason is offline   Reply With Quote
Old 20-04-2023, 01:30   #10
Registered User
 
yachtvalhalla's Avatar

Join Date: Aug 2009
Location: Philippines
Boat: Formerly Fuji 32 Ketch
Posts: 1,021
Re: Why Climatology files in Program Data?

Quote:
Originally Posted by rgleason View Post
But I believe you can get climatology running with o5.8 if you follow what I told you.
I seriously doubt that so will continue to use O5.6.2 for portable versions.

Thanks, Terry
yachtvalhalla is offline   Reply With Quote
Old 21-04-2023, 11:59   #11
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,766
Images: 2
Re: Why Climatology files in Program Data?

Rick wrote:
Quote:
I have been telling Terry to just move plugin DLL and data directories to that location, but he doesn't think it will work. (with the exception of the downloaded data which finds its own directory under "Program Data" right now)
Alec wrote:
Quote:
It will certainly work, but then he needs to set LOCALAPPDATA to the actual directory to be used.
Windows environment variables are not case sensitive, but documented using ALL CAPS -- this is the general convention for environment variables.
rgleason is offline   Reply With Quote
Old 21-04-2023, 12:52   #12
Registered User

Join Date: Mar 2016
Location: San Francisco
Boat: Morgan 382
Posts: 3,193
Re: Why Climatology files in Program Data?

The developers know this, I'm sure, but it is very important to follow Microsoft guidelines for where files are stored. Failure to do so leaves an application to suddenly stop working with a Windows update.

Microsoft provides The Program Files folder for actual executable files Exe, dll, and some other files that will be read-only. This folder has properties and permissions set so that a normal user can't change them It helps prevents malware from infecting programs.

Program Data contains just that. Data, which might change or be updated, and not any executable program files themselves. So, a normal user or malware might be able to corrupt the data, but can't infect the program.

Unix/Linux has done the same thing since much longer than windows with /bin, /var, and /usr directories. Its a big reason unix has a reputation for being more secure than windows.

So anyway, it *might* work to move files around how you like, but you break the system Microsoft uses to secure Windows, and it could stop working at any time as Microsoft updates address changing security needs. The supported way is to use the environment variables, because different windows versions actually use different real locations, and Microsoft can change them without breaking things that way .

I suspect the answer might be for an installation to detect if it is portable. A portable install should never be in Program Files (for similar security issues). If the install is portable, PI files could be known to exist under the installation folder.

Probably not an easy or quick to implement solution, but probably the most compatible with Microsoft.
wholybee is offline   Reply With Quote
Old 22-04-2023, 02:04   #13
Registered User
 
yachtvalhalla's Avatar

Join Date: Aug 2009
Location: Philippines
Boat: Formerly Fuji 32 Ketch
Posts: 1,021
Re: Why Climatology files in Program Data?

Quote:
Originally Posted by rgleason View Post
Rick wrote:
I have been telling Terry to just move plugin DLL and data directories to that location, but he doesn't think it will work. (with the exception of the downloaded data which finds its own directory under "Program Data" right now)

Alec wrote:
It will certainly work, but then he needs to set LOCALAPPDATA to the actual directory to be used.
Windows environment variables are not case sensitive, but documented using ALL CAPS -- this is the general convention for environment variables.
1. I challenge either of you to make a portable version with a Climatology plugin that works and post a screenshot of the Climatology plugin being displayed.

2. If you can do that then please explain how.

3. I know of at least 8 others that are using a portable version that would benefit from you assistance.

Thanks, Terry


yachtvalhalla is offline   Reply With Quote
Old 22-04-2023, 06:22   #14
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,766
Images: 2
Re: Why Climatology files in Program Data?

Sorry Terry, I've got too much on my table to do that right now.


Terry, I invite you to join or view this discussion occurring right now.
https://github.com/OpenCPN/OpenCPN/i...ent-1518257112
rgleason is offline   Reply With Quote
Old 22-04-2023, 16:13   #15
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,766
Images: 2
Re: Why Climatology files in Program Data?

Terry download this version from bdbcat. Using opencpn.exe -p it works as portable and climatology installs under the plugins directory along with both data and icons


See bdbcat's post and the two following
https://github.com/OpenCPN/OpenCPN/i...ent-1518770570


Hakan provided a good batch file.
rgleason is offline   Reply With Quote
Reply


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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Converting PNG files to KAP files for usage in OpenCPN 58gschol OpenCPN 3 07-09-2019 06:46
Climatology Plugin Data Sources waqas.qazi OpenCPN 15 30-04-2019 15:13
Predictwind´s .pwr files to .grb files? andreas.mehlin Navigation 0 16-02-2017 07:03
Which app or program to open grib files from Winmor Goudurix Marine Electronics 0 10-01-2017 09:15
What Nav Program to Open .scn Files? Dennis.G Navigation 1 14-06-2013 14:56

Advertise Here


All times are GMT -7. The time now is 04:34.


Google+
Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Social Knowledge Networks
Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2024, vBulletin Solutions, Inc.

ShowCase vBulletin Plugins by Drive Thru Online, Inc.