After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 724885 - GI tools are not relocatable on W32
GI tools are not relocatable on W32
Status: RESOLVED OBSOLETE
Product: gobject-introspection
Classification: Platform
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: gobject-introspection Maintainer(s)
gobject-introspection Maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2014-02-21 13:13 UTC by LRN
Modified: 2018-02-08 12:26 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Make g-ir-* relocatable (W32) (6.20 KB, patch)
2014-02-21 13:13 UTC, LRN
reviewed Details | Review

Description LRN 2014-02-21 13:13:42 UTC
GI needs libdir and datadir. Hardcoding @datarootdir@ and @libdir@ doesn't
cut it on W32.

A more generic solution is to remember @prefix@, get actual prefix at runtime
by checking the parents directories for well-known subdirs (bin, lib, libexec,
 etc). Then append data and lib directories to runtime prefix (after
 stripping compile-time prefix from them).
Comment 1 LRN 2014-02-21 13:13:46 UTC
Created attachment 269911 [details] [review]
Make g-ir-* relocatable (W32)
Comment 2 Fan, Chun-wei 2014-02-25 04:43:37 UTC
Review of attachment 269911 [details] [review]:

Hi LRN,

I took a look at your patch, but I am more inclined to favor Dieter's patch for the same purpose at bug 620566 comment #5, as:
-It's simpler, and most other GNOME items use the relocatable capabilities of GLib (g_win32_get_installation_directory_of_module () for instance) directly when on Windows.
-It seems to be already deemed acceptable by the other devs.

Is it okay that you try that patch instead and see whether it works for you?

With blessings, thank you!
Comment 3 LRN 2014-02-25 05:36:32 UTC
Aside from minute details (use of sys.argv[0] vs __file__), the difference between 620566 and this are:

1) 620566 assumes g-ir-* are installed in <prefix>/<subdirectory> (subdirectory name does not matter). My patch assumes that g-ir-* are installed somewhere in the tree - i.e. prefix is one of the [grand]parent directories that contains a subdirectory from the known subdir list (bin, lib, etc...).

2) 620566 assumes that datadir is <prefix>/share and libdir is <prefix>/lib/gobject-introspection. My patch takes libdir and datadir as given by the configure script

I suspect that there will be people who will be unhappy about 620566's assumptions in (2). (1) - probably not so much.

Note that finding the prefix and making datadir/libdir path are two separate steps, so if my prefix-finding algorithm seems to be too fancy, it's possible to replace it with the simple one from 620566 and keep the datadir/libdir path derivation from my path.
Comment 4 André Klapper 2015-02-07 17:17:14 UTC
[Mass-moving gobject-introspection tickets to its own Bugzilla product - see bug 708029. Mass-filter your bugmail for this message: introspection20150207 ]
Comment 5 GNOME Infrastructure Team 2018-02-08 12:26:58 UTC
-- 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/gobject-introspection/issues/106.