View previous topic :: View next topic |
Author |
Message |
Ant
Joined: 06 Mar 2004 Posts: 306 Location: Canada
|
Posted: Sun Feb 11, 2007 2:21 am Post subject: location of gtk libs on windows |
|
|
Someone raised the point that Duit (let's call it gtkD from now on)
I was saying, that gtkD lib loader has the location of the Gtk+ DLLs
hardcoded.
I can read the Gtk registry entry to find the actual location (done)
but is that suficient?
Is the solution to create a registry entry with that location during the install?
Ant
(can't compile the installation program on window,
see my post on link on the learn group) |
|
Back to top |
|
|
Ant
Joined: 06 Mar 2004 Posts: 306 Location: Canada
|
Posted: Sat Feb 24, 2007 10:00 am Post subject: Re: location of gtk libs on windows |
|
|
Ant wrote: | Someone raised the point that Duit (let's call it gtkD from now on)
I was saying, that gtkD lib loader has the location of the Gtk+ DLLs
hardcoded.
I can read the Gtk registry entry to find the actual location (done)
but is that suficient?
Is the solution to create a registry entry with that location during the install?
Ant
(can't compile the installation program on window,
see my post on link on the learn group) |
On windows:
Duit, i.e. gtkD, now will try to get the Gtk+ DLLs location from the registry.
this means applications will have to be linked with lib advapi32.
Ant |
|
Back to top |
|
|
JJR
Joined: 22 Feb 2004 Posts: 1104
|
Posted: Mon Feb 26, 2007 2:57 pm Post subject: |
|
|
Sorry, Ant,
I didn't get to that. |
|
Back to top |
|
|
Raedwulf
Joined: 21 Jan 2007 Posts: 9
|
Posted: Tue Feb 27, 2007 12:35 am Post subject: |
|
|
Apparently the environment variable is a pretty ok way too., but i guess advapi32 isn't any heartbreak. _________________ Raedwulf |
|
Back to top |
|
|
Ant
Joined: 06 Mar 2004 Posts: 306 Location: Canada
|
Posted: Tue Feb 27, 2007 12:52 am Post subject: |
|
|
JJR wrote: | Sorry, Ant,
I didn't get to that. |
It's cool.
Thank you for all the help you offered!
Ant |
|
Back to top |
|
|
Ant
Joined: 06 Mar 2004 Posts: 306 Location: Canada
|
Posted: Tue Feb 27, 2007 1:00 am Post subject: |
|
|
Raedwulf wrote: | Apparently the environment variable is a pretty ok way too., but i guess advapi32 isn't any heartbreak. |
which one?
CommonProgramFiles? probably not because I seem to remember the problem was someone installed Gtk+ on the root.
Or should the installation ask for the location and create an environment var?
Ant |
|
Back to top |
|
|
Raedwulf
Joined: 21 Jan 2007 Posts: 9
|
Posted: Tue Feb 27, 2007 12:37 pm Post subject: |
|
|
GTK_BASEPATH is set when GTK is installed.
Code: | this.libraryName = libraryName;
this.alternateLibraryName = alternateLibraryName;
onLoadFailure = fn;
version(Windows)
{
char[] expandedLibraryName;
uint charLen;
charLen = ExpandEnvironmentStringsA((this.libraryName ~ "\0").ptr, null, 0);
expandedLibraryName = new char[charLen];
ExpandEnvironmentStringsA((this.libraryName ~ "\0").ptr, expandedLibraryName.ptr, charLen);
handle = LoadLibraryA(expandedLibraryName.ptr);
//handle = LoadLibraryA( (this.libraryName ~ "\0").ptr );
if ( alternateLibraryName !is null )
{
charLen = ExpandEnvironmentStringsA((this.alternateLibraryName ~ "\0").ptr, null, 0);
expandedLibraryName = new char[charLen];
ExpandEnvironmentStringsA((this.alternateLibraryName ~ "\0").ptr, expandedLibraryName.ptr, charLen);
alternateHandle = LoadLibraryA(expandedLibraryName.ptr);
//alternateHandle = LoadLibraryA( (this.alternateLibraryName ~ "\0").ptr );
}
} |
That is my code in Loader.d to handle environment vars.
Code: |
// Specify the default path for the DUI dll's
//version(Windows) const char[] libPath = "\\Program Files\\Common Files\\GTK\\2.0\\bin\\";
version(Windows) const char[] libPath = "%GTK_BASEPATH%\\bin\\"; |
That is my change in Loader.d
This was some versions back, when i asked .
Cheers , good work with gtkd _________________ Raedwulf |
|
Back to top |
|
|
Ant
Joined: 06 Mar 2004 Posts: 306 Location: Canada
|
Posted: Tue Feb 27, 2007 6:56 pm Post subject: |
|
|
Raedwulf wrote: | GTK_BASEPATH is set when GTK is installed.
|
but..., but...
I don't have it.
how do you install Gtk+ on windows?
i use http://gimp-win.sourceforge.net/
Ant |
|
Back to top |
|
|
okibi
Joined: 04 Jan 2007 Posts: 170
|
Posted: Wed Feb 28, 2007 9:30 am Post subject: |
|
|
Just for future reference, there are several installers for GTK+ on Windows. I for one am using a custom made library set that I include with my program. Eventually, I'll just create a standalone installer for it. |
|
Back to top |
|
|
Raedwulf
Joined: 21 Jan 2007 Posts: 9
|
Posted: Thu Mar 15, 2007 11:22 am Post subject: |
|
|
Hmmmm thats strange, I guess your way is better then.
Here's where i installed mine:
http://gladewin32.sourceforge.net/modules/news/
Sorry for the late reply, been caught up recently. _________________ Raedwulf |
|
Back to top |
|
|
|