mirror of
https://gitlab.com/freepascal.org/fpc/pas2js.git
synced 2025-08-29 22:10:11 +02:00
* Fix compilation of web compiler
This commit is contained in:
parent
74a7874b96
commit
48cc8cdc77
@ -3,7 +3,7 @@ unit webfilecache;
|
||||
{$mode objfpc}
|
||||
|
||||
// Enable this to write lots of debugging info to the browser console.
|
||||
{ $DEFINE VERBOSEWEBCACHE}
|
||||
{$DEFINE VERBOSEWEBCACHE}
|
||||
|
||||
interface
|
||||
|
||||
@ -94,8 +94,8 @@ type
|
||||
function CreateResolver: TPas2jsFSResolver; override;
|
||||
function FileExists(const aFileName: String): Boolean; override;
|
||||
function FindCustomJSFileName(const aFilename: string): String; override;
|
||||
function FindIncludeFileName(const aFilename: string): String; override;
|
||||
function FindUnitFileName(const aUnitname, InFilename: string; out IsForeign: boolean): String; override;
|
||||
function FindIncludeFileName(const aFilename, ModuleDir: string): String; override;
|
||||
function FindUnitFileName(const aUnitname, InFilename, ModuleDir: string; out IsForeign: boolean): String; override;
|
||||
function FindUnitJSFileName(const aUnitFilename: string): String; override;
|
||||
function LoadFile(Filename: string; Binary: boolean=false): TPas2jsFile; override;
|
||||
procedure SaveToFile(ms: TFPJSStream; Filename: string); override;
|
||||
@ -330,10 +330,11 @@ begin
|
||||
{$ENDIF}
|
||||
end;
|
||||
|
||||
function TPas2jsWebFS.FindIncludeFileName(const aFilename: string): String;
|
||||
function TPas2jsWebFS.FindIncludeFileName(const aFilename, ModuleDir: string
|
||||
): String;
|
||||
begin
|
||||
{$IFDEF VERBOSEWEBCACHE}
|
||||
Writeln(ClassName,': FindIncludeFileName(',aFileName,')');
|
||||
Writeln(ClassName,': FindIncludeFileName(',aFileName,',',ModuleDir,')');
|
||||
{$ENDIF}
|
||||
Result:=NormalizeFileName(aFileName);
|
||||
If not FCache.HasFile(Result) then
|
||||
@ -372,10 +373,10 @@ begin
|
||||
Result:=TPas2jsWebResolver.Create(Self);
|
||||
end;
|
||||
|
||||
function TPas2jsWebFS.FindUnitFileName(const aUnitname, InFilename: string; out IsForeign: boolean): String;
|
||||
function TPas2jsWebFS.FindUnitFileName(const aUnitname, InFilename, ModuleDir: string; out IsForeign: boolean): String;
|
||||
begin
|
||||
{$IFDEF VERBOSEWEBCACHE}
|
||||
Writeln(ClassName,': FindUnitFileName(',aUnitName,')');
|
||||
Writeln(ClassName,': FindUnitFileName(',aUnitName,',',InFilename,',',ModuleDir,')');
|
||||
{$ENDIF}
|
||||
Result:=NormalizeFileName(aUnitName+'.pas');
|
||||
isForeign:=False;
|
||||
@ -493,7 +494,8 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
Function TPas2jsWebFS.LoadFiles(aList: TStrings; OnLoaded: TLoadFileEvent): Integer;
|
||||
function TPas2jsWebFS.LoadFiles(aList: TStrings; OnLoaded: TLoadFileEvent
|
||||
): Integer;
|
||||
|
||||
Var
|
||||
i: Integer;
|
||||
@ -505,7 +507,8 @@ begin
|
||||
Inc(Result);
|
||||
end;
|
||||
|
||||
function TPas2jsWebFS.LoadFiles(aList: array of String; OnLoaded: TLoadFileEvent): Integer;
|
||||
function TPas2jsWebFS.LoadFiles(aList: array of String; OnLoaded: TLoadFileEvent
|
||||
): integer;
|
||||
|
||||
Var
|
||||
i: Integer;
|
||||
|
Loading…
Reference in New Issue
Block a user