Windows conversion always fails

Bug #1156892 reported by Mik Firestone
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Brewtarget
Fix Released
High
Mik Firestone

Bug Description

By default, a new version of brewtarget will install in c:\program files\brewtarget-version. This will deliver a new options.xml and a new data directory. When the new version is run, we have no way of seeing the previous version's installation directory in order to do the import -- the options.xml stores the location of the data directory (and it's brand new) and there is no old data to be imported in the new data directory.

We either need to develop a process to detect the previous installation and read those settings, or we need to prompt the user and ask them to point us at the old data directory.

We really need to figure this out before the next release.

Revision history for this message
Mik Firestone (mikfire) wrote :

Merge request 44 removes the options.xml and moves those options in the QSettings. This will cause the options to persist over upgrades. That is the first step.

Changed in brewtarget:
assignee: nobody → Mik Firestone (mikfire)
Revision history for this message
Mik Firestone (mikfire) wrote :

Fixed with merge request #53.

The Windows installer has been scripted to first look in the registry for the userdatadir attribute. If it can find it, there is nothing to do since brewtarget will do the right thing on start up.

If the key isn't in the registry, we prompt the user to locate the old installation. We try a few things to find the either the sqlite database or the old XML files. The "try" is caused by Windows Vista and later using "virtual directories" but doing it very inconsistently. If we can find them, the old files are copied into the new location and the registry key is created. If we cannot find them, we give a dialog explaining to the user what they need to do, and poke the registry key in anyway.

This checkin also changes the default location for the data directory on Windows. Storing user data in "\program files" is deprecated since Vista. We now use C:\Users\[user]\AppData\Roaming\brewtarget\ which is the recommended behavior.

Changed in brewtarget:
status: New → Fix Committed
Philip (rocketman768)
Changed in brewtarget:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.