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.
Greetings,
Bastian
save wgnuplot.ini to user's appdata directoty
Logged In: YES
user_id=27517
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?
Logged In: YES
user_id=1180072
It's probably not worth the trouble. According to MSDN
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platform/shell/reference/functions/shgetspecialfolderpath.asp
SHGetSpecialFolderPath is supported by shell32.dll version
4.71 or
later. This means every Windows with IE > 4.0! Checking for
this
is certainly doable:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platform/shell/programmersguide/versions.asp
An additional check for an installed shell32.dll would only
help
on NT <= 3.51.
I think having a requirement of NT >= 4.0 and IE >= 4.0 is
not a big restriction, Whereas not being able to save settings
under NT >= 4.0 is. So I vote for inclusion and I am willing
to fix iff anybody complains. Users of IE < 4 might be well
advised to upgrade anyway.
If this code is really necessary, into which file should I
put the
function for the version check?
As for the Win16 build: a simple #ifdef WIN32 would do it ;)
Logged In: YES
user_id=31505
I think the patch is worth to be added.
Comment:
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".
Logged In: YES
user_id=1180072
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.
revised version
Logged In: YES
user_id=31505
Committed to cvs.