jonthysell / Mzinga

Open-source software to play the board game Hive.
MIT License
83 stars 10 forks source link

Save options #125

Open soli opened 1 year ago

soli commented 1 year ago

I'm using MzingaViewer on a Mac to run the nokamute engine, and it's mostly great, thanks!

AFAIK each new version (ok, just saw this with the recent update πŸ˜…) resets my options (both Viewer Options, which are in a strange place on a Mac, should probably be in the main menu as "Preferences", and Engine Options).

Moreover, other Options (which extensions [bugs] are enabled, the size/position of the window, etc.) are also reset at each run, which is slightly inconvenient.

Finally, on a Mac, I always have to "dis-quarantine" MzingaViewer otherwise it appears "broken" (just run xattr -cr on the containing folder). Not sure if you can do anything about that.

(If you'd prefer separate issues, I can probably split this accordingly)

soli commented 1 year ago

Ok, just realized that MzingaViewer saves the "Viewer Options" at least in the xml file living in its directory (that was thus overwritten by an update)… So, besides putting this file somewhere more standard (in the user's home directory?) I guess my issue only remains for the other options.

jonthysell commented 1 year ago

AFAIK each new version (ok, just saw this with the recent update πŸ˜…) resets my options (both Viewer Options, which are in a strange place on a Mac, should probably be in the main menu as "Preferences", and Engine Options). Ok, just realized that MzingaViewer saves the "Viewer Options" at least in the xml file living in its directory (that was thus overwritten by an update)… So, besides putting this file somewhere more standard (in the user's home directory?) I guess my issue only remains for the other options.

Yes, this is a legacy of MzingaViewer being released as a loose executable- it just puts it's config file next to itself. In theory you could have multiple versions in different folders, each with their own config. Only on Windows (with the installer or Store version) do I know that it's the only one installed, and therefore I put its config in a user folder.

Moreover, other Options (which extensions [bugs] are enabled, the size/position of the window, etc.) are also reset at each run, which is slightly inconvenient.

This could be added to the config, I'll look into that. I just didn't want to assume that the version you're running is on the same monitor setup and end up with a window that's "off screen".

Finally, on a Mac, I always have to "dis-quarantine" MzingaViewer otherwise it appears "broken" (just run xattr -cr on the containing folder). Not sure if you can do anything about that.

I don't actually have access to a mac anymore, so I haven't really tested MzingaViewer on the mac in some time. I build the program in the cloud with GitHub VMs. I can see if adding that command during the build process helps.

soli commented 1 year ago

I don't actually have access to a mac anymore, so I haven't really tested MzingaViewer on the mac in some time. I build the program in the cloud with GitHub VMs. I can see if adding that command during the build process helps.

I don't think so, the fact that Mac's SafeKeeper (or whatever that's called) marks your build as unsafe comes at download time, so it's on the user's machine that xattr -cr has to be used to remove the quarantine.

I have no idea how to make your build "safe" (I guess it requires some signing of some kind… sorry, no idea).