shlomif / PySolFC

A comprehensive, feature-rich, open source, and portable, collection of Solitaire games.
http://pysolfc.sourceforge.net/
GNU General Public License v3.0
467 stars 106 forks source link

Update to 3.0 resets player-options #385

Closed hajo4 closed 1 week ago

hajo4 commented 1 month ago

I installed the still-current pysol 3.0 over my old 2.18, and lost all the setting, for favorite games, cardsets, background,, sound, etc.

Most of those are no big deal,, but the list of favorite games is somewhat cumbersome to redo.

joeraz commented 1 month ago

Interesting. Though 3.0 is a pretty major update, and some of the config formatting was changed, I tested thoroughly to make sure that the old config files were compatible.

Do you still have the old options.cfg file? If so, could you send me a copy so I can review and test?

hajo4 commented 1 month ago

It looks like that file was overwritten by the update ;( I'm not sure if I can find a backup of it...

BTW, it would be nice if the update-proces would copy the old options.cfg file to a filename like options_old.cfg or options_v218.cfg or options_2024-09-30.cfg

joeraz commented 1 month ago

There isn't really a conversion process, as the old config file is still compatible. The new values/newly formatted values are updated as they're needed/used.

hajo4 commented 1 month ago

I now installed the new pysol 3,1 (downloaded from sourceforge.net) over 3.0, and again it reset the options, ie. cleared the favorites, changed cardset, style of toolbar etc. to defaults.

joeraz commented 1 month ago

Please confirm which platform you're running on (Windows, Mac, or Linux)?

hajo4 commented 1 month ago

I'm running Win 10 currently. I also restored a copy of the last options.cfg before the update, and it got overwritten when running pysol again.

Then I re-installed 3.0, using the existing location, and got an error: Failed to execute script pyi_rth.pkgres due to unhandled exception:

Traceback (most recent call last): File "PyInstaller\hooks\rthooks\pyi_rth_pkgres.py", line 158, in File "PyInstaller\hooks\rthooks\pyi_rth_pkgres.py", line 36, in _pyi_rthook File "PyInstaller\loader\pyimod02_importers.py", line 419, in exec_module File "pkg_resources__init__.py", line 32, in File "PyInstaller\loader\pyimod02_importers.py", line 419, in exec_module File "plistlib.py", line 70, in File "PyInstaller\loader\pyimod02_importers.py", line 419, in exec_module File "xml\parsers\expat.py", line 4, in ImportError: Module use of python312.dll conflicts with this version of Python.

Going back to 2.18, I got the error 'cardset Matching not found' (I had been playing memory), but the game ran ok. Strange - the data for that cardset still exists...

I tried some of my saved games with buggy stuck-messages, and they still come out as stuck.

joeraz commented 1 month ago

Considering that matching type cardsets were introduced in 2.20, the older versions probably don't recognize it as a valid cardset.

Can you provide the backup options.cfg file that keeps getting overwritten?

hajo4 commented 1 month ago

Can you provide the backup options.cfg file that keeps getting overwritten?

last options.cfg used on 3.0 before the update to 3.1 : options _30_2024-10-25.zip

joeraz commented 1 month ago

It looks like the config file had a non-fatal validation warning that it should have been able to correct, and it does so if I'm running off the source code. But the compiled version of the code is for some reason treating that non-fatal warning as a fatal error. And since it believed there was a fatal error (as if the config was not readable at all), it just generated a new one.

I removed that warning, as there really doesn't need to be a warning there, and updated the code. Based on my initial tests, it seems to work. If you use an installer straight off AppVeyor (go to the latest commit, click the check box, click details next to AppVeyor, then navigate to the artifacts tab and grab that installer) to get the latest dev code, you should be able to upgrade without issue.