|
@@ -257,7 +257,7 @@ type
|
|
function FindCustomJSFileName(const aFilename: string): String; override;
|
|
function FindCustomJSFileName(const aFilename: string): String; override;
|
|
function FindUnitJSFileName(const aUnitFilename: string): String; override;
|
|
function FindUnitJSFileName(const aUnitFilename: string): String; override;
|
|
function FindUnitFileName(const aUnitname, InFilename, ModuleDir: string; out IsForeign: boolean): String; override;
|
|
function FindUnitFileName(const aUnitname, InFilename, ModuleDir: string; out IsForeign: boolean): String; override;
|
|
- function FindIncludeFileName(const aFilename: string): String; override;
|
|
|
|
|
|
+ function FindIncludeFileName(const aFilename, ModuleDir: string): String; override;
|
|
function AddIncludePaths(const Paths: string; FromCmdLine: boolean; out ErrorMsg: string): boolean;
|
|
function AddIncludePaths(const Paths: string; FromCmdLine: boolean; out ErrorMsg: string): boolean;
|
|
function AddUnitPaths(const Paths: string; FromCmdLine: boolean; out ErrorMsg: string): boolean;
|
|
function AddUnitPaths(const Paths: string; FromCmdLine: boolean; out ErrorMsg: string): boolean;
|
|
function AddSrcUnitPaths(const Paths: string; FromCmdLine: boolean; out ErrorMsg: string): boolean;
|
|
function AddSrcUnitPaths(const Paths: string; FromCmdLine: boolean; out ErrorMsg: string): boolean;
|
|
@@ -1812,7 +1812,8 @@ begin
|
|
UsePointDirectory, true, RelPath);
|
|
UsePointDirectory, true, RelPath);
|
|
end;
|
|
end;
|
|
|
|
|
|
-function TPas2jsFilesCache.FindIncludeFileName(const aFilename: string): String;
|
|
|
|
|
|
+function TPas2jsFilesCache.FindIncludeFileName(const aFilename,
|
|
|
|
+ ModuleDir: string): String;
|
|
|
|
|
|
function SearchCasedInIncPath(const Filename: string): string;
|
|
function SearchCasedInIncPath(const Filename: string): string;
|
|
var
|
|
var
|
|
@@ -1820,9 +1821,9 @@ function TPas2jsFilesCache.FindIncludeFileName(const aFilename: string): String;
|
|
begin
|
|
begin
|
|
// file name is relative
|
|
// file name is relative
|
|
// first search in the same directory as the unit
|
|
// first search in the same directory as the unit
|
|
- if BaseDirectory<>'' then
|
|
|
|
|
|
+ if ModuleDir<>'' then
|
|
begin
|
|
begin
|
|
- Result:=BaseDirectory+Filename;
|
|
|
|
|
|
+ Result:=IncludeTrailingPathDelimiter(ModuleDir)+Filename;
|
|
if SearchLowUpCase(Result) then exit;
|
|
if SearchLowUpCase(Result) then exit;
|
|
end;
|
|
end;
|
|
// then search in include path
|
|
// then search in include path
|