FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

location of gtk libs on windows

 
Post new topic   Reply to topic     Forum Index -> gtkD
View previous topic :: View next topic  
Author Message
Ant



Joined: 06 Mar 2004
Posts: 306
Location: Canada

PostPosted: Sun Feb 11, 2007 2:21 am    Post subject: location of gtk libs on windows Reply with quote

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
View user's profile Send private message
Ant



Joined: 06 Mar 2004
Posts: 306
Location: Canada

PostPosted: Sat Feb 24, 2007 10:00 am    Post subject: Re: location of gtk libs on windows Reply with quote

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
View user's profile Send private message
JJR



Joined: 22 Feb 2004
Posts: 1104

PostPosted: Mon Feb 26, 2007 2:57 pm    Post subject: Reply with quote

Sorry, Ant,

I didn't get to that.
Back to top
View user's profile Send private message
Raedwulf



Joined: 21 Jan 2007
Posts: 9

PostPosted: Tue Feb 27, 2007 12:35 am    Post subject: Reply with quote

Apparently the environment variable is a pretty ok way too., but i guess advapi32 isn't any heartbreak.
_________________
Raedwulf
Back to top
View user's profile Send private message MSN Messenger
Ant



Joined: 06 Mar 2004
Posts: 306
Location: Canada

PostPosted: Tue Feb 27, 2007 12:52 am    Post subject: Reply with quote

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
View user's profile Send private message
Ant



Joined: 06 Mar 2004
Posts: 306
Location: Canada

PostPosted: Tue Feb 27, 2007 1:00 am    Post subject: Reply with quote

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
View user's profile Send private message
Raedwulf



Joined: 21 Jan 2007
Posts: 9

PostPosted: Tue Feb 27, 2007 12:37 pm    Post subject: Reply with quote

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 Razz.

Cheers Very Happy, good work with gtkd
_________________
Raedwulf
Back to top
View user's profile Send private message MSN Messenger
Ant



Joined: 06 Mar 2004
Posts: 306
Location: Canada

PostPosted: Tue Feb 27, 2007 6:56 pm    Post subject: Reply with quote

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
View user's profile Send private message
okibi



Joined: 04 Jan 2007
Posts: 170

PostPosted: Wed Feb 28, 2007 9:30 am    Post subject: Reply with quote

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
View user's profile Send private message
Raedwulf



Joined: 21 Jan 2007
Posts: 9

PostPosted: Thu Mar 15, 2007 11:22 am    Post subject: Reply with quote

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
View user's profile Send private message MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic     Forum Index -> gtkD All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group