|
111 | 111 | fFilename: String; // Der Dateiname in dem die Projekteinstellungen gespeichert wurden
|
112 | 112 | fChanged: Boolean;
|
113 | 113 | fCCColors: TCCColors;
|
| 114 | + Function GetSearchPaths: TPathList; |
114 | 115 | Procedure SetCCColors(AValue: TCCColors);
|
115 | 116 | Procedure SetFiles(AValue: TFileList);
|
116 | 117 | Procedure SetLPISource(AValue: String);
|
|
130 | 131 | Property RootFolder: String read fFiles.RootFolder write SetRootFolder;
|
131 | 132 | Property LPISource: String read fFiles.LPISource write SetLPISource;
|
132 | 133 | Property Files: TFileList read fFiles.Files write SetFiles;
|
133 |
| - Property SearchPaths: TPathList read FSearchPaths write FSearchPaths; // relativ zu Rootfolder |
| 134 | + Property SearchPaths: TPathList read GetSearchPaths write FSearchPaths; // relativ zu Rootfolder |
134 | 135 |
|
135 | 136 | (*
|
136 | 137 | * For Internal Use
|
|
809 | 810 | setlength(result, length(PathList));
|
810 | 811 | For i := 0 To high(PathList) Do Begin
|
811 | 812 | result[i] := PathList[i];
|
812 |
| - result[i].Path := ConcatRelativePath(RootFolder, IncludeTrailingPathDelimiter(result[i].Path)); |
| 813 | + If result[i].Path = '' Then Begin |
| 814 | + result[i].Path := RootFolder; |
| 815 | + End |
| 816 | + Else Begin |
| 817 | + result[i].Path := ConcatRelativePath(RootFolder, IncludeTrailingPathDelimiter(result[i].Path)); |
| 818 | + End; |
813 | 819 | End;
|
814 | 820 | End;
|
815 | 821 |
|
|
1063 | 1069 | fChanged := true;
|
1064 | 1070 | End;
|
1065 | 1071 |
|
| 1072 | +Function TProject.GetSearchPaths: TPathList; |
| 1073 | +Var |
| 1074 | + i: Integer; |
| 1075 | + found: Boolean; |
| 1076 | +Begin |
| 1077 | + result := FSearchPaths; |
| 1078 | + // At least make the .lpi file path the searchpath |
| 1079 | + If fFiles.LPISource <> '' Then Begin |
| 1080 | + // As all paths are relative to the .lpi file path, this is a empty string path |
| 1081 | + found := false; |
| 1082 | + For i := 0 To high(Result) Do Begin |
| 1083 | + If result[i].Path = '' Then Begin |
| 1084 | + found := true; |
| 1085 | + break; |
| 1086 | + End; |
| 1087 | + End; |
| 1088 | + If Not found Then Begin |
| 1089 | + SetLength(result, high(Result) + 2); |
| 1090 | + result[High(Result)].Path := ''; |
| 1091 | + result[High(Result)].FromLPI := true; |
| 1092 | + End; |
| 1093 | + End; |
| 1094 | +End; |
| 1095 | + |
1066 | 1096 | Procedure TProject.SetRootFolder(AValue: String);
|
1067 | 1097 | Begin
|
1068 | 1098 | AValue := IncludeTrailingPathDelimiter(AValue);
|
|
0 commit comments