GNOME Bugzilla – Bug 534134
Gnumeric does not seem to support XDG Base Directory Specification
Last modified: 2018-05-22 13:27:54 UTC
The XDG Base Directory Specification defines how an application can set various system paths at runtime. Supporting this standard will make it possible to integrate gnumeric more tightly into Mac OS X using application bundles and GTK+'s native Mac OS X code. Previous versions of gnumeric supported the -D and -L parameter, setting the program's shared data and library directories, respectively. However, this does not seem to be in 1.9 (though it is listed by --help-all). If reimplementing the feature, the XDG specification might as well be supported instead. See http://standards.freedesktop.org/basedir-spec/basedir-spec-0.6.html for the XDG Base Directory Standard. See http://www.flyn.org/apple/index.html for my work with bundling gnumeric for Mac OS X.
Created attachment 111379 [details] [review] Patch to re-implement -D and -L I use this patch to re-implement the -D and -L arguments. It does not implement the XDG Base Directory Specification, but I am able to use it to create a gnumeric application bundle for Mac OS X.
Created attachment 111380 [details] [review] Patch to re-implement -D and -L I use this patch to re-implement the -D and -L arguments. It does not implement the XDG Base Directory Specification, but I am able to use it to create a gnumeric application bundle for Mac OS X. I attached the wrong patch in the previous comment.
Created attachment 158349 [details] [review] Patch to re-implement -D and -L I use this patch to re-implement the -D and -L arguments. It does not implement the XDG Base Directory Specification, but I am able to use it to create a gnumeric application bundle for Mac OS X. This version of the patch applies against gnumeric 1.10.1.
Review of attachment 158349 [details] [review]: Interesting. I note that it uses g_win32_get_package_installation_directory which is deprecated, see http://library.gnome.org/devel/glib/stable/glib-Windows-Compatibility-Functions.html Also, it would appear that it leaks the result of that function. Apart from that, I don't see why we can't do this.
Created attachment 160225 [details] [review] Patch to re-implement -D and -L I use this patch to re-implement the -D and -L arguments. It does not implement the XDG Base Directory Specification, but I am able to use it to create a gnumeric application bundle for Mac OS X. This version of the patch applies against gnumeric Git as of May 3rd, 2010.
Review of attachment 160225 [details] [review]: You ignored my review of your previous patch. It still applies. https://bugzilla.gnome.org/show_bug.cgi?id=534134#c4
The most recent patch uses g_win32_get_package_installation_directory_of_module instead of g_win32_get_package_installation_directory. The return value of g_win32_get_package_installation_directoryX is free'd (and was in the previous patch too).
What is planned about FreeDesktop.org XDG basedir specification for Gnumeric? http://ploum.net/post/207-modify-your-application-to-use-xdg-folders https://live.gnome.org/GnomeGoals/XDGConfigFolders http://www.freedesktop.org/wiki/Specifications/basedir-spec
It missed the 1.11.x development series. The patch in attachment 160225 [details] [review] still leaks the result from g_win32_get_package_installation_directory. g_build_filename will not free it. In fact, the two attachment look so very much alike that I suspect the second wrong does not contain what it was meant to contain.
-- GitLab Migration Automatic Message -- This bug has been migrated to GNOME's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/gnumeric/issues/101.