(fullPath bool, rootPath string)
| 62 | } |
| 63 | |
| 64 | func getDefaultPath(fullPath bool, rootPath string) []string { |
| 65 | var paths []string |
| 66 | |
| 67 | if !fullPath { |
| 68 | fullPath := filepath.Join(env.GetCurrentDir(), consts.FolderDependencies, consts.DcpFolder) |
| 69 | |
| 70 | dir, err := filepath.Rel(rootPath, fullPath) |
| 71 | if err == nil { |
| 72 | paths = append(paths, dir) |
| 73 | } |
| 74 | |
| 75 | fullPath = filepath.Join(env.GetCurrentDir(), consts.FolderDependencies, consts.DcuFolder) |
| 76 | dir, err = filepath.Rel(rootPath, fullPath) |
| 77 | if err == nil { |
| 78 | paths = append(paths, dir) |
| 79 | } |
| 80 | } else { |
| 81 | paths = append(paths, filepath.Join(env.GetCurrentDir(), consts.FolderDependencies, consts.DcpFolder)) |
| 82 | paths = append(paths, filepath.Join(env.GetCurrentDir(), consts.FolderDependencies, consts.DcuFolder)) |
| 83 | } |
| 84 | |
| 85 | if isLazarus() { |
| 86 | return paths |
| 87 | } |
| 88 | |
| 89 | return append(paths, "$(DCC_UnitSearchPath)") |
| 90 | } |
| 91 | |
| 92 | func cleanEmpty(paths []string) []string { |
| 93 | for index, value := range paths { |
no test coverage detected