All right. For all of our Windows users, I have figured out why your databases weren't translated and have a few workarounds for you. mea culpa for not testing this on Windows as I should have. I will be attempting to make sure that doesn't happen again.
The root cause is that on Linux, the data directory is the same regardless of versions installed (/home/mik/.config/brewtarget, for example). The process by which we determine if we need to do a conversion involves looking for the existence of certain files in your data directory. On windows, though, the data directory changes with each upgrade so brewtarget v2 never saw the older files to import them.
So you can fix this in a couple of ways, depending on just what you want to do and how much fussing you want to do.
Method 1
This method will work if you have installed but never run brewtarget v2.
- Navigate to your brewtarget v1.2.4 data directory (c:\program files\brewtarget-1.2.4\data by default)
- Copy database.xml, recipes.xml and mashs.xml
- Navigate to your brewtarget v2.0.1 data directory (c:\program files\brewtarget-v2.0.1\data by default)
- Paste the three files
- Run brewtarget v2.0.1
It will take a few extra seconds as we process your existing data and import it into the new format. Once done processing, you should get a pop-up saying we have converted your XML and tell you where you can find the old files if you want/need them.
Method 2
This method will work if you have installed and run brewtarget v2 previously. If you have already manually imported your recipes, you may want to look at Method 2a or Method 3 instead.
- Navigate to your brewtarget v1.2.4 data directory (c:\program files\brewtarget-1.2.4\data by default)
- Copy database.xml, recipes.xml and mashs.xml
- Navigate to your brewtarget v2.0.1 data directory (c:\program files\brewtarget-v2.0.1\data by default)
- Paste the three files (yes, these are the same steps as above)
- Run regedit
- Navigate to HKEY_CURRENT_USER\Software\brewtarget\OrganizationDefaults
- Delete the "converted" key and its value
- Run brewtarget v2.0.1
This will do the same thing as a method 1, and pop the same message.
Method 2a
This is intended for people who have manually translated their recipes, but are would like all their interesting stuff (equipment profiles, custom fermentables, etc.) back.
Follow the Method 2 steps, but only copy the database.xml and mashs.xml files in step 2.
Method 3
This is for the hard core. This will use some older code we developers used while working on all of this before we had the automatic import. This method isn't pretty, but it will work.
- Copy your XML files as shown in the previous two methods. This isn't required, but makes the command lines much shorter.
- Open a command window
- cd c:\program files\brewtarget-2.0.1\bin
- Run: brewtarget.exe --from-xml ..\data\database.xml
- Answer "yes" to include the new items
- Answer "yes" to save your changes
- Run: brewtarget.exe --from-xml ..\data\mashs.xml
- Answer "Restore"
- Answer "yes" to include the new items
- Answer "yes" to save your changes
- Run: brewtarget.exe --from-xml ..\data\recipes.xml
- Answer "Restore"
- Answer "yes" to include the new items
- Answer "yes" to save your changes
- Run brewtarget v2.0.1
- Answer "Restore" one more time
There main difference between this and method2 or 2a is that you don't have to edit the registry by hand, but you do get to answer a lot more questions. You don't have to do the final import of the recipes.xml if you have already done that translation by hand. Just to be clean, you probably should remove the XML files from the data directory too.
Mik