Browse Source

pas2js: cleaned up pcu

git-svn-id: trunk@40554 -
Mattias Gaertner 6 năm trước cách đây
mục cha
commit
38a511a2f0

+ 2 - 2
packages/pastojs/src/pas2jscompiler.pp

@@ -3844,7 +3844,7 @@ end;
 
 
 procedure TPas2jsCompiler.WritePrecompiledFormats;
 procedure TPas2jsCompiler.WritePrecompiledFormats;
 begin
 begin
-  WriteHelpLine('No support for PCU files in this class');
+  WriteHelpLine('   -JU: This pas2js does not support PCU files');
 end;
 end;
 
 
 procedure TPas2jsCompiler.AddNamespaces(const Paths: string;
 procedure TPas2jsCompiler.AddNamespaces(const Paths: string;
@@ -4204,7 +4204,7 @@ begin
   w('     -JoCheckVersion=main: insert rtl version check into main.');
   w('     -JoCheckVersion=main: insert rtl version check into main.');
   w('     -JoCheckVersion=system: insert rtl version check into system unit init.');
   w('     -JoCheckVersion=system: insert rtl version check into system unit init.');
   w('     -JoCheckVersion=unit: insert rtl version check into every unit init.');
   w('     -JoCheckVersion=unit: insert rtl version check into every unit init.');
-  w('     -JoRTL-<x>=<y>: set RTL identifier x to value y.');
+  w('     -JoRTL-<y>=<z>: set RTL identifier y to value z.');
   w('   -Jpcmd<command>: Run postprocessor. For each generated js execute command passing the js as stdin and read the new js from stdout. This option can be added multiple times to call several postprocessors in succession.');
   w('   -Jpcmd<command>: Run postprocessor. For each generated js execute command passing the js as stdin and read the new js from stdout. This option can be added multiple times to call several postprocessors in succession.');
   w('   -Ju<x>: Add <x> to foreign unit paths. Foreign units are not compiled.');
   w('   -Ju<x>: Add <x> to foreign unit paths. Foreign units are not compiled.');
   WritePrecompiledFormats;
   WritePrecompiledFormats;

+ 3 - 0
utils/pas2js/pas2js.lpi

@@ -34,6 +34,7 @@
       <Unit1>
       <Unit1>
         <Filename Value="../../packages/pastojs/src/pas2jspcucompiler.pp"/>
         <Filename Value="../../packages/pastojs/src/pas2jspcucompiler.pp"/>
         <IsPartOfProject Value="True"/>
         <IsPartOfProject Value="True"/>
+        <UnitName Value="Pas2JSPCUCompiler"/>
       </Unit1>
       </Unit1>
       <Unit2>
       <Unit2>
         <Filename Value="../../packages/pastojs/src/pas2jscompilercfg.pp"/>
         <Filename Value="../../packages/pastojs/src/pas2jscompilercfg.pp"/>
@@ -42,6 +43,7 @@
       <Unit3>
       <Unit3>
         <Filename Value="../../packages/pastojs/src/pas2jsfs.pp"/>
         <Filename Value="../../packages/pastojs/src/pas2jsfs.pp"/>
         <IsPartOfProject Value="True"/>
         <IsPartOfProject Value="True"/>
+        <UnitName Value="Pas2JSFS"/>
       </Unit3>
       </Unit3>
       <Unit4>
       <Unit4>
         <Filename Value="../../packages/pastojs/src/pas2jscompilerpp.pp"/>
         <Filename Value="../../packages/pastojs/src/pas2jscompilerpp.pp"/>
@@ -50,6 +52,7 @@
       <Unit5>
       <Unit5>
         <Filename Value="../../packages/pastojs/src/pas2jsfscompiler.pp"/>
         <Filename Value="../../packages/pastojs/src/pas2jsfscompiler.pp"/>
         <IsPartOfProject Value="True"/>
         <IsPartOfProject Value="True"/>
+        <UnitName Value="Pas2JSFSCompiler"/>
       </Unit5>
       </Unit5>
     </Units>
     </Units>
   </ProjectOptions>
   </ProjectOptions>

+ 4 - 4
utils/pas2js/pas2js.pp

@@ -13,7 +13,7 @@ uses
   {$ENDIF}
   {$ENDIF}
   Classes, SysUtils, CustApp,
   Classes, SysUtils, CustApp,
   Pas2jsFileUtils, Pas2jsLogger, Pas2jsCompiler,
   Pas2jsFileUtils, Pas2jsLogger, Pas2jsCompiler,
-  Pas2JSPCUCompiler, Pas2JSCompilerPP, Pas2JSCompilerCfg;
+  Pas2JSFSCompiler, Pas2JSCompilerPP, Pas2JSCompilerCfg;
 
 
 Type
 Type
 
 
@@ -21,14 +21,14 @@ Type
 
 
   TPas2jsCLI = class(TCustomApplication)
   TPas2jsCLI = class(TCustomApplication)
   private
   private
-    FCompiler: TPas2jsPCUCompiler;
+    FCompiler: TPas2JSFSCompiler;
     FWriteOutputToStdErr: Boolean;
     FWriteOutputToStdErr: Boolean;
   protected
   protected
     procedure DoRun; override;
     procedure DoRun; override;
   public
   public
     constructor Create(TheOwner: TComponent); override;
     constructor Create(TheOwner: TComponent); override;
     destructor Destroy; override;
     destructor Destroy; override;
-    property Compiler: TPas2jsPCUCompiler read FCompiler;
+    property Compiler: TPas2JSFSCompiler read FCompiler;
     property WriteOutputToStdErr: Boolean read FWriteOutputToStdErr write FWriteOutputToStdErr;
     property WriteOutputToStdErr: Boolean read FWriteOutputToStdErr write FWriteOutputToStdErr;
   end;
   end;
 
 
@@ -67,7 +67,7 @@ constructor TPas2jsCLI.Create(TheOwner: TComponent);
 begin
 begin
   inherited Create(TheOwner);
   inherited Create(TheOwner);
   StopOnException:=True;
   StopOnException:=True;
-  FCompiler:=TPas2jsPCUCompiler.Create;
+  FCompiler:=TPas2JSFSCompiler.Create;
   FCompiler.ConfigSupport:=TPas2JSFileConfigSupport.Create(FCompiler);
   FCompiler.ConfigSupport:=TPas2JSFileConfigSupport.Create(FCompiler);
   FCompiler.PostProcessorSupport:=TPas2JSFSPostProcessorSupport.Create(FCompiler);
   FCompiler.PostProcessorSupport:=TPas2JSFSPostProcessorSupport.Create(FCompiler);
 end;
 end;