77 Author : Kike Pérez
88 Version : 1.2
99 Created : 17/05/2018
10- Modified :21/01 /2019
10+ Modified :11/09 /2019
1111
1212 This file is part of QuickLib: https://github.com/exilon/QuickLib
1313
@@ -86,7 +86,8 @@ implementation
8686procedure TSystemInfo.GetInfo ;
8787begin
8888{ $IFNDEF NEXTGEN}
89- fAppName := ExtractFilenameWithoutExt(ParamStr(0 ));
89+ if IsLibrarythen fAppName := ExtractFileNameWithoutExt(GetModuleName(0 ))
90+ else fAppName := ExtractFilenameWithoutExt(ParamStr(0 ));
9091{ $ELSE}
9192{ $IFDEF ANDROID}
9293 fAppName := JStringToString(SharedActivityContext.getPackageName);
@@ -96,15 +97,16 @@ procedure TSystemInfo.GetInfo;
9697{ $ENDIF}
9798 fAppVersion := GetAppVersionFullStr;
9899{ $IFNDEF NEXTGEN}
99- fAppPath := ExtractFilePath(ParamStr(0 ));
100+ if IsLibrarythen fAppPath := ExtractFilePath(GetModuleName(0 ))
101+ else fAppPath := ExtractFilePath(ParamStr(0 ));
100102{ $ELSE}
101103 fAppPath := TPath.GetDocumentsPath;
102104{ $ENDIf}
103- { $IFDEF DELPHILINUX}
104- fUserName := GetLoggedUserName;
105- { $ELSE}
106- fUserName := Trim(GetLoggedUserName);
107- { $ENDIF}
105+ { $IFDEF DELPHILINUX}
106+ fUserName :=String.Copy( GetLoggedUserName) ;
107+ { $ELSE}
108+ fUserName := Trim(GetLoggedUserName);
109+ { $ENDIF}
108110 fHostName := GetComputerName;
109111 fOSVersion := GetOSVersion;
110112 fCPUCores := CPUCount;