ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/public/ibx/trunk/runtime/IBIntf.pas
(Generate patch)

Comparing ibx/trunk/runtime/IBIntf.pas (file contents):
Revision 26 by tony, Sat Dec 28 19:22:24 2013 UTC vs.
Revision 27 by tony, Tue Apr 14 13:10:23 2015 UTC

# Line 174 | Line 174 | const
174  
175   implementation
176  
177 < uses Sysutils, IB, Dynlibs
177 > uses Sysutils, IB, Dynlibs, Classes
178   {$IFDEF WINDOWS}
179   ,Forms, Registry
180   {$ENDIF}
# Line 192 | Line 192 | procedure LoadIBLibrary;
192        raise Exception.Create('Unable to load Firebird Client Library');
193    end;
194   {$IFDEF UNIX }
195 +  function FindLibrary(LibNameList: string): TLibHandle;
196 +  var LibNames: TStringList;
197 +      i: integer;
198 +  begin
199 +    Result := NilHandle;
200 +    LibNames := TStringList.Create;
201 +    try
202 +      LibNames.Delimiter := ':';
203 +      LibNames.StrictDelimiter := true;
204 +      LibNames.DelimitedText := LibNameList; {Split list on semi-colon}
205 +      for i := 0 to LibNames.Count - 1 do
206 +      begin
207 +        Result := LoadLibrary(LibNames[i]);
208 +        if Result <> NilHandle then Exit;
209 +      end;
210 +    finally
211 +      LibNames.Free;
212 +    end;
213 +  end;
214 +
215    function InternalLoadLibrary: TLibHandle;
216    var LibName: string;
217    begin
# Line 204 | Line 224 | procedure LoadIBLibrary;
224        else
225          LibName := FIREBIRD_SO2;
226      end;
227 <    Result := LoadLibrary(LibName);
227 >    Result := FindLibrary(LibName);
228      {$IFDEF DARWIN}
229      if Result = NilHandle then
230      begin

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines