@@ -1949,9 +1949,9 @@ function TConnectionParameters.GetLibraries: TStringList;
19491949 rx.Expression := ' ^\s*(libsqlite3)[^=]+=>\s*(\S+)$' ;
19501950 { $Else}
19511951 if NetType = ntSQLite then
1952- rx.Expression := ' ^sqlite.*\.' + SharedSuffix
1952+ rx.Expression := ' ^(lib)? sqlite.*\.' + SharedSuffix
19531953 else
1954- rx.Expression := ' ^sqlite3mc.*\.' + SharedSuffix;
1954+ rx.Expression := ' ^(lib)? sqlite3mc.*\.' + SharedSuffix;
19551955 { $EndIf}
19561956 end ;
19571957 ngInterbase:
@@ -1969,7 +1969,7 @@ function TConnectionParameters.GetLibraries: TStringList;
19691969 end ;
19701970 end ;
19711971 { $Else}
1972- Dlls := FindAllFiles(GetAppDir , ' *.' + SharedSuffix, False);
1972+ Dlls := FindAllFiles(GetLibDir , ' *.' + SharedSuffix, False);
19731973 for DllPath in Dlls do begin
19741974 DllFile := ExtractFileName(DllPath);
19751975 if rx.Exec(DllFile) then begin
@@ -3300,7 +3300,7 @@ procedure TMySQLConnection.DoBeforeConnect;
33003300 LibraryPath: String;
33013301begin
33023302 // Init libmysql before actually connecting.
3303- LibraryPath := { $IFNDEF LINUX } GetAppDir + { $ENDIF } Parameters.LibraryOrProvider;
3303+ LibraryPath := GetLibDir + Parameters.LibraryOrProvider;
33043304 Log(lcDebug, f_(' Loading library file %s ...' , [LibraryPath]));
33053305 // Throws EDbError on any failure:
33063306 FLib := TMySQLLib.Create(LibraryPath, Parameters.DefaultLibrary);
@@ -3315,7 +3315,7 @@ procedure TPgConnection.DoBeforeConnect;
33153315 msg: String;
33163316begin
33173317 // Init lib before actually connecting.
3318- LibraryPath := { $IFNDEF LINUX } GetAppDir + { $ENDIF } Parameters.LibraryOrProvider;
3318+ LibraryPath := GetLibDir + Parameters.LibraryOrProvider;
33193319 Log(lcDebug, f_(' Loading library file %s ...' , [LibraryPath]));
33203320 try
33213321 FLib := TPostgreSQLLib.Create(LibraryPath, Parameters.DefaultLibrary);
@@ -3346,7 +3346,7 @@ procedure TSQLiteConnection.DoBeforeConnect;
33463346 LibraryPath: String;
33473347begin
33483348 // Init lib before actually connecting.
3349- LibraryPath := { $IFNDEF LINUX } GetAppDir + { $ENDIF } Parameters.LibraryOrProvider;
3349+ LibraryPath := GetLibDir + Parameters.LibraryOrProvider;
33503350 Log(lcDebug, f_(' Loading library file %s ...' , [LibraryPath]));
33513351 // Throws EDbError on any failure:
33523352 if Parameters.NetType = ntSQLite then
0 commit comments