Bug 19462 - Search path on Windows for .manager files
Summary: Search path on Windows for .manager files
Status: RESOLVED INVALID
Alias: None
Product: Telepathy
Classification: Unclassified
Component: tp-glib (show other bugs)
Version: unspecified
Hardware: Other Windows (All)
: medium normal
Assignee: Telepathy bugs list
QA Contact: Telepathy bugs list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-01-08 06:12 UTC by Sunil Mohan Adapa
Modified: 2009-01-20 04:37 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Sunil Mohan Adapa 2009-01-08 06:12:41 UTC
On Windows, telepathy-glib searches for .manager files in not so favorable locations. A typical application like Spicebird would like to ship an installer/zip that would sit in a directory containing all the data files and telepathy library dlls. There should be a way for .data files to be found by tp-glib.

Usually, Free Software ported from Unix like environments to Windows seem to do this by getting the current dll path and then appending to it "share/APP/DATA". This would be an ifdefed windows code.

I was wondering if we can have a way to add an additional search path to tp-glib. This would be helpful for Spicebird like apps that ship as a tarball (like Firefox) on Unixes and would look for tp-glib to pick up data files from extracted directory.
Comment 1 Simon McVittie 2009-01-08 07:38:20 UTC
We currently look in g_get_user_data_dir() and then g_get_system_data_dirs(), which have platform-specific results that are meant to be appropriate. I'd really rather not introduce Windows #ifdefs when GLib is already meant to do this for us!

On Windows, the documentation mentions that this looks in "the "share" subfolder in the installation folder for the package containing the DLL that calls this function, if it can be determined" and in "the "share" subfolder in the installation folder for GLib, and in the installation folder for the package the application's .exe file belongs to" (quoting from devhelp). Hopefully one of those locations is suitable for your needs?

For instance, if your main executable is either C:\Program Files\Spicebird\bin\spicebird.exe or C:\Program Files\Spicebird\spicebird.exe, you should be able to put .manager files in C:\Program Files\Spicebird\share\telepathy\managers.

Installing on Unix as a monolithic tarball containing all the dependencies is frowned upon (in particular, distro security teams absolutely hate it); I'd rather have telepathy-glib used "correctly", e.g. via distro packaging. In any case, the data search path on Unix is well-defined, and references the XDG base directory specification. If you need to manipulate the search path, you can do so by appending to the environment variable $XDG_DATA_DIRS in some sort of launcher script.
Comment 2 Sunil Mohan Adapa 2009-01-08 22:19:48 UTC
(In reply to comment #1)
[...]
> On Windows, the documentation mentions that this looks in "the "share"
> subfolder in the installation folder for the package containing the DLL that

[...]

> directory specification. If you need to manipulate the search path, you can do
> so by appending to the environment variable $XDG_DATA_DIRS in some sort of
> launcher script.
> 

Ahh! I missed both the ways and stupidly patched the tp_connection_manager_find_manager_file function. What you said should surely work and looks good too. I shall give it a try. Sorry for raising this bug.
Comment 3 Simon McVittie 2009-01-20 04:37:59 UTC
Marking as invalid since you seem to agree.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.