Cruisers Forum
 


Join CruisersForum Today

Reply
 
Thread Tools Rate Thread Display Modes
Old 04-01-2014, 07:56   #1
Registered User

Join Date: Jan 2011
Posts: 571
How to Update a Portable Install?

I realize that one could easily update a standard non-portable install and then copy the new files to the portable directory. But what if I've customized the settings for the portable version to be different from the non-portable version?

In past installs I discovered that the update process often makes changes to the .ini file. It adds new settings that are needed for the new version to operate properly. I once tried launching a newer version of OpenCPN with a .ini file from a prior version and it crashed quickly.

Is it possible to just point the installer at the portable directory and it will update the files at that location (along with the .ini file)? Or do I have to update a non-portable copy, copy the files to the portable directory, and compare the .ini files line by line to edit the portable version?
__________________

__________________
RhythmDoctor is offline   Reply With Quote
Old 04-01-2014, 08:24   #2
Marine Service Provider
 
bdbcat's Avatar

Join Date: Mar 2008
Posts: 4,883
Re: How to update a portable install?

Rhythm....

The scenario of having an update crash with an older .ini file would be considered a bug, and we would like to know about it.

So, since we are still officially in test mode with v3.3.x, I would like to hear your results with the standard install as described in your para 1. If you are nervous, take a copy of your 2 .ini files and save somewhere safe, so there will be not so much work to recover if problems.

Thanks
Dave
__________________

__________________
bdbcat is offline   Reply With Quote
Old 04-01-2014, 08:40   #3
Registered User

Join Date: Jan 2011
Posts: 571
Re: How to update a portable install?

Quote:
Originally Posted by bdbcat View Post
The scenario of having an update crash with an older .ini file would be considered a bug, and we would like to know about it.
Dave,

It was at least a year ago, and a few versions back, so I do not remember the details. It was probably the transition from 3.0 to 3.2. Also, it might not have been a crash, just some unusual behavior. I remember that I did pull up both .ini files side-by-side and it was clear that the installer for the new version had inserted some new lines that were missing from the old version (I suspect the new communications parameters were a big difference), so I just manually added the new/revised lines into the old .ini file and everything worked fine, so I went on my merry way. I did not report it because the reason looked pretty obvious, and I considered it "user error" to copy an old .ini file into the directory for the new version. I'd like to help you out with this, but I don't think it's useful to go back and debug year-old versions that are no longer of interest.

I can try to run the new beta off the old .ini files if that helps.

But back to my original question, it it possible to just point the installer to the folder with the portable install, or do I need to manually copy files over from a standard install?

I'm trying to be more proactive this time, and get my questions answered BEFORE I do the update.
__________________
RhythmDoctor is offline   Reply With Quote
Old 04-01-2014, 08:52   #4
Marine Service Provider
 
bdbcat's Avatar

Join Date: Mar 2008
Posts: 4,883
Re: How to update a portable install?

Rhythm....

OK, don't bother with the ancient history. I agree it is of not much interest.

The modern installer should be able to install as "upgrade" to any directory, even a portable configuration, without corrupting an existing customized .ini file.

Actually, the installer does not touch the .ini file. The first run of an upgraded version of OCPN will add new keys, but should not break old settings.


So, make backups, and give it a try. If your computer catches on fire, put it out. Just kidding....

Thanks
Dave
__________________
bdbcat is offline   Reply With Quote
Old 04-01-2014, 08:58   #5
Registered User

Join Date: Jan 2011
Posts: 571
Re: How to update a portable install?

Quote:
Originally Posted by bdbcat View Post
Actually, the installer does not touch the .ini file. The first run of an upgraded version of OCPN will add new keys, but should not break old settings.
This may be the key to what went wrong with me. At the time, it was not the first run of the new version. I copied an old version of the .ini file over into the directory after the first run. If O sets a "first run bit" somewhere, then it would not have inserted the new keys.

At the time I was running two instances without a portable install. I had a batch file that copied an .ini file into the settings directory for the left window, launched O, then copied an .ini over for the right window, and launced O a second time. That's how I got into trouble, because I forgot to update one of the .ini files first.

As you probably know, I've abandoned that method and now use two portable modes to accomplish the same thing, so each one has its own dedicated directory.
__________________
RhythmDoctor is offline   Reply With Quote
Old 04-01-2014, 09:03   #6
Registered User

Join Date: Jan 2011
Posts: 571
Re: How to update a portable install?

Another question: Does the installer set a "first run" bit somewhere? It seems it must, since the disclaimer comes up at first run, but not afterwards.

If the installer doesn't touch the .ini file, where does it set the bit? Or does O just compare its version to the version number embedded in the .ini file, and if they don't match it does first run activities?
__________________
RhythmDoctor is offline   Reply With Quote
Old 04-01-2014, 09:25   #7
Marine Service Provider
 
bdbcat's Avatar

Join Date: Mar 2008
Posts: 4,883
Re: How to update a portable install?

Rhythm....

Code:
Or does O just compare its version to the version number embedded in the .ini file, and if they don't match it does first run activities?
Correct.


Code:
As you probably know, I've abandoned that method and now use two  portable modes to accomplish the same thing, so each one has its own  dedicated directory.
Much safer.

Dave
__________________
bdbcat is offline   Reply With Quote
Old 04-01-2014, 17:50   #8
Registered User
 
HappySeagull's Avatar

Join Date: Dec 2010
Location: B.C.,Canada
Boat: 29'
Posts: 2,395
Re: How to update a portable install?

On XP, I copy just the new "opencpn.exe" into the old Portable folder....if you want to keep the old one around, just rename it to "oldopencpn.exe" or something instead of overwriting it.

The "new run startup message" has not affected old settings and is a one time moment . For me, it 's easier than editing the ini line.

I expect laziness like this will work until there's a new O generation..
__________________
HappySeagull is offline   Reply With Quote
Old 04-01-2014, 21:50   #9
Registered User

Join Date: Jan 2011
Posts: 571
Re: How to Update a Portable Install?

OK, I just did the update to 3.3.1220. Major corruption to my .ini file. You consider this a bug, so I'll report it here.

Here's how I updated: I have non-portable install on drive C:, and a chart directory also on C:. I also have two portable folders on drive E: (SD Card), with a chart directory in a third folder on E:, and both portable versions point to that directory on E:. Obviously the objective here is to have everything on E: so that the program can run on a computer with no prior history of OpenCPN.

I ran the installer to upgrade the program on C: to 3.3.1220. Then I copied all the program files and directories from C: to the respective E: folders. The .ini files were not copied (because they are not in the program folder on C:. They're in user settings, per Win7 guidelines). So the .ini files stayed on E: as-is from the prior version.

Here's what happened:

Upon first run of the portable programs on E:, the .ini files were modified in a way that

  • Changed the chart directories to point to the chart folder on C:. They should have been left pointing at E:. And I don't know where OpenCPN could have gotten these settings from, since the portable version should run independently of the program that's on C:.
  • Changed the chart groups to point to C:. Although these groups are a valid path, Chart Groups feature does not work (message says it's empty). I tried creating some new groups, and the settings did not "stick." Doing so also erased the directory locations of the existing chart groups.
  • I lost all connection settings, including the Bluetooth settings that I've carefully tweaked over the last few days.
  • Tides & Currents points to a harmonic file on C:
As an experiment, I restored 3.3.1117 .ini files to the E: drive (week-old versions, since I did not back these up before doing the update) and inserted the SD card into another computer that does not have OpenCPN installed on C:. Upon first launch of the portable versions, all settings were retained properly, with directories pointing to the proper folders on E:.

So it seems that when running a portable version on a removable drive from a Windows computer with OpenCPN installed on C:, the first launch of the program somehow causes settings to get pulled off the version on the C: drive, and also causes severe malfunction of the Chart Groups feature.
__________________
RhythmDoctor is offline   Reply With Quote
Old 04-01-2014, 22:14   #10
Marine Service Provider
 
bdbcat's Avatar

Join Date: Mar 2008
Posts: 4,883
Re: How to Update a Portable Install?

Rhythm....

Sorry for your troubles. Backups would have been a good idea.

I think I can see what is happening with the chart dirs. Turns out I was hasty in my statments before. On Windows, O looks for hints regarding the chart directories in the registry on first run. This is done to try and recover from a thoroughly scrambled .ini file. What it finds there, in your case, is a directory set left by the installer when you installed to C:. Obviously, it should actually ignore this information if it is running from a portable instance. This also explains the groups problems.

I do not see how the tide/current dirs will be changed, nor the connections parms. But I will try to simulate your setup and follow the steps.

Thanks for the report
Dave
__________________

__________________
bdbcat is offline   Reply With Quote
Reply

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Logbook connie - How to Install on Ubuntu? Jd1 OpenCPN 3 24-03-2013 09:47
Safe Portable Cabin Heater Ocean Girl Construction, Maintenance & Refit 14 19-02-2013 20:00
Xoom Quad Band Int'l Armel Running OpenCPN armido OpenCPN 25 03-11-2012 07:44
How to install a non brand remote on Honda BF5? Balthazar Engines and Propulsion Systems 2 27-04-2012 16:29
Tilt-Tolerant Danfoss Compressor for Portable Refrigerator cmzs Plumbing Systems and Fixtures 3 31-07-2011 19:39



Copyright 2002- Social Knowledge, LLC All Rights Reserved.

All times are GMT -7. The time now is 14:10.


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.