#181 WIN32: save wgnuplot.ini to user's appdata dir


This short patch changes the place where wgnuplot
saves wgnuplot.ini to the user's appdata directory.
That way every user can have his own custom
settings and saving without admin privileges will
no longer fail due to access rights.



  • Hans-Bernhard Broeker

    Logged In: YES

    I like the idea, but the implementation nees more
    consideration before this can go in.

    1) Win16 target is still formally allowed to build ;-)
    2) We don't want gnuplot to be restricted to Win98+ --- but
    Win95 wouldn't necessarily support this ShellAPI call.
    3) The previous issue might be fixable by providing and
    installing the ShellAPI redistributable DLL --- but only by
    having an actual installation program instead of the current
    "unzip and run" approach. I don't think we want to go there.

    I think this means the call to this ShellAPI function has to
    be protected by run-time checks for the presence and version
    of the DLL. Any takers?

  • Hans-Bernhard Broeker

    • assigned_to: nobody --> broeker
  • Petr Mikulik

    Petr Mikulik - 2005-07-26

    Logged In: YES

    I think the patch is worth to be added.

    Some old "shlobj.h" do not #define CSIDL_APPDATA (e.g.
    Mingw 2.95), thus you should protect the code which sets
    textwin.IniFile by "#ifdef CSIDL_APPDATA".

  • Bastian Märkisch

    Logged In: YES

    This revised version of the patch checks the version of the
    installed shell32.dll before actually using it. As a fallback
    wgnuplot.ini is saved to the user's APPDATA or HOME
    directory (taken from the environment) instead.

    So this patch no longer leaves out Win95 users, Win NT <=3.51
    is not supported.

  • Petr Mikulik

    Petr Mikulik - 2005-08-04
    • status: open --> closed-accepted
  • Petr Mikulik

    Petr Mikulik - 2005-08-04

    Logged In: YES

    Committed to cvs.


Log in to post a comment.