- Timestamp:
- Aug 1, 2012, 6:20:01 AM (12 years ago)
- Location:
- trunk
- Files:
-
- 5 added
- 3 deleted
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Compiler/Modules/Pascal/UModulePascal.pas
r70 r71 6 6 7 7 uses 8 Classes, SysUtils, UModularSystem ;8 Classes, SysUtils, UModularSystem, UAnalyzerPascal; 9 9 10 10 type … … 13 13 14 14 TModulePascal = class(TModule) 15 Analyzer: TAnalyzerPascal; 15 16 constructor Create; override; 16 17 destructor Destroy; override; … … 21 22 22 23 implementation 24 25 uses 26 UCompilerAPI; 23 27 24 28 { TModulePascal } … … 39 43 procedure TModulePascal.Install; 40 44 begin 45 with TCompilerAPI(API) do begin 46 Analyzer := TAnalyzerPascal.Create; 47 Analyzers.Add(Analyzer); 48 end; 41 49 inherited Install; 42 50 end; … … 45 53 begin 46 54 inherited Uninstall; 55 with TCompilerAPI(API) do begin 56 Analyzers.Remove(Analyzer); 57 end; 47 58 end; 48 59 -
trunk/Compiler/TranspascalCompiler.lpk
r70 r71 9 9 <PathDelim Value="\"/> 10 10 <SearchPaths> 11 <OtherUnitFiles Value="Analyze;Target;Target\Interpretter;Target\ASM8051;Target\Java;Target\GCC;Target\PHP;Target\Delphi;Target\Dynamic C;Target\XML;Target\NASM;Modules\Pascal "/>11 <OtherUnitFiles Value="Analyze;Target;Target\Interpretter;Target\ASM8051;Target\Java;Target\GCC;Target\PHP;Target\Delphi;Target\Dynamic C;Target\XML;Target\NASM;Modules\Pascal;Modules\GCC"/> 12 12 <UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/> 13 13 </SearchPaths> … … 25 25 </CompilerOptions> 26 26 <Version Minor="1"/> 27 <Files Count="2 1">27 <Files Count="22"> 28 28 <Item1> 29 29 <Filename Value="UCompiler.pas"/> … … 55 55 </Item7> 56 56 <Item8> 57 <Filename Value="Target\ UTargets.pas"/>58 <UnitName Value="U Targets"/>57 <Filename Value="Target\Dynamic C\UProducerDynamicc.pas"/> 58 <UnitName Value="UProducerDynamicC"/> 59 59 </Item8> 60 60 <Item9> 61 <Filename Value="Target\ Dynamic C\UProducerDynamicc.pas"/>62 <UnitName Value="UProducer DynamicC"/>61 <Filename Value="Target\ASM8051\UProducerASM8051.pas"/> 62 <UnitName Value="UProducerAsm8051"/> 63 63 </Item9> 64 64 <Item10> 65 <Filename Value="Target\ASM8051\U ProducerASM8051.pas"/>66 <UnitName Value="U ProducerAsm8051"/>65 <Filename Value="Target\ASM8051\UTargetASM8051.pas"/> 66 <UnitName Value="UTargetASM8051"/> 67 67 </Item10> 68 68 <Item11> 69 <Filename Value=" Target\ASM8051\UTargetASM8051.pas"/>70 <UnitName Value="UTarget ASM8051"/>69 <Filename Value="Modules\GCC\UTargetGCC.pas"/> 70 <UnitName Value="UTargetGCC"/> 71 71 </Item11> 72 72 <Item12> 73 <Filename Value=" Target\GCC\UTargetGCC.pas"/>74 <UnitName Value="U TargetGCC"/>73 <Filename Value="Modules\GCC\UProducerGCC.pas"/> 74 <UnitName Value="UProducerGCC"/> 75 75 </Item12> 76 76 <Item13> 77 <Filename Value="Target\ GCC\UProducerGCC.pas"/>78 <UnitName Value="UProducer GCC"/>77 <Filename Value="Target\Delphi\UProducerPascal.pas"/> 78 <UnitName Value="UProducerPascal"/> 79 79 </Item13> 80 80 <Item14> 81 <Filename Value="Target\Delphi\U ProducerPascal.pas"/>82 <UnitName Value="U ProducerPascal"/>81 <Filename Value="Target\Delphi\UTargetDelphi.pas"/> 82 <UnitName Value="UTargetDelphi"/> 83 83 </Item14> 84 84 <Item15> 85 <Filename Value="Target\ Delphi\UTargetDelphi.pas"/>86 <UnitName Value="UTarget Delphi"/>85 <Filename Value="Target\PHP\UTargetPHP.pas"/> 86 <UnitName Value="UTargetPHP"/> 87 87 </Item15> 88 88 <Item16> 89 <Filename Value="Target\ PHP\UTargetPHP.pas"/>90 <UnitName Value="UTarget PHP"/>89 <Filename Value="Target\Java\UTargetJava.pas"/> 90 <UnitName Value="UTargetJava"/> 91 91 </Item16> 92 92 <Item17> 93 <Filename Value="Target\ Java\UTargetJava.pas"/>94 <UnitName Value="UTarget Java"/>93 <Filename Value="Target\XML\UTargetXML.pas"/> 94 <UnitName Value="UTargetXML"/> 95 95 </Item17> 96 96 <Item18> 97 <Filename Value="Target\ XML\UTargetXML.pas"/>98 <UnitName Value="UTarget XML"/>97 <Filename Value="Target\Interpretter\UTargetInterpretter.pas"/> 98 <UnitName Value="UTargetInterpretter"/> 99 99 </Item18> 100 100 <Item19> 101 <Filename Value="Target\ Interpretter\UTargetInterpretter.pas"/>102 <UnitName Value="UTarget Interpretter"/>101 <Filename Value="Target\NASM\UTargetNASM.pas"/> 102 <UnitName Value="UTargetNASM"/> 103 103 </Item19> 104 104 <Item20> 105 <Filename Value=" Target\NASM\UTargetNASM.pas"/>106 <UnitName Value="U TargetNASM"/>105 <Filename Value="Modules\Pascal\UModulePascal.pas"/> 106 <UnitName Value="UModulePascal"/> 107 107 </Item20> 108 108 <Item21> 109 <Filename Value=" Modules\Pascal\UModulePascal.pas"/>110 <UnitName Value="U ModulePascal"/>109 <Filename Value="UCompilerAPI.pas"/> 110 <UnitName Value="UCompilerAPI"/> 111 111 </Item21> 112 <Item22> 113 <Filename Value="Modules\GCC\UModuleGCC.pas"/> 114 <UnitName Value="UModuleGCC"/> 115 </Item22> 112 116 </Files> 113 117 <Type Value="RunAndDesignTime"/> -
trunk/Compiler/TranspascalCompiler.pas
r70 r71 9 9 uses 10 10 UCompiler, USourceCode, UProducer, UAnalyzer, UTarget, UExecutor, 11 UAnalyzerPascal, U Targets, UProducerDynamicc, UProducerASM8051,12 UTarget ASM8051, UTargetGCC, UProducerGCC, UProducerPascal, UTargetDelphi,13 UTarget PHP, UTargetJava, UTargetXML, UTargetInterpretter, UTargetNASM,14 U ModulePascal, LazarusPackageIntf;11 UAnalyzerPascal, UProducerDynamicc, UProducerASM8051, UTargetASM8051, 12 UTargetGCC, UProducerGCC, UProducerPascal, UTargetDelphi, UTargetPHP, 13 UTargetJava, UTargetXML, UTargetInterpretter, UTargetNASM, UModulePascal, 14 UCompilerAPI, UModuleGCC, LazarusPackageIntf; 15 15 16 16 implementation -
trunk/Compiler/UCompiler.pas
r70 r71 6 6 7 7 uses 8 SysUtils, Variants, Classes, Contnrs, FileUtil, UModularSystem, 8 SysUtils, Variants, Classes, Contnrs, FileUtil, UModularSystem, UCompilerAPI, 9 9 Dialogs, USourceCode, UProducer, UAnalyzer, SpecializedList, UTarget; 10 10 … … 47 47 CompiledFolder: string; 48 48 49 API: TCompilerAPI; 49 50 TargetFolder: string; 50 Targets: TListTarget;51 Analyzers: TListAnalyzer;52 51 MainSource: string; 53 52 ModuleManager: TModuleManager; … … 69 68 70 69 uses 71 U Targets, UAnalyzerPascal;70 UAnalyzerPascal; 72 71 73 72 resourcestring … … 164 163 constructor TCompiler.Create; 165 164 begin 166 Targets := TListTarget.Create;165 API := TCompilerAPI.Create; 167 166 AbstractCode := TProgram.Create; 168 167 ErrorMessages := TListObject.Create; 169 168 CompiledFolder := 'Compiled'; 170 169 ModuleManager := TModuleManager.Create(nil); 170 ModuleManager.API := API; 171 171 end; 172 172 … … 179 179 destructor TCompiler.Destroy; 180 180 begin 181 ModuleManager.Free; 182 Analyzer.Free; 183 AbstractCode.Free; 184 Targets.Free; 185 ErrorMessages.Free; 181 FreeAndNil(ModuleManager); 182 FreeAndNil(AbstractCode); 183 FreeAndNil(ErrorMessages); 186 184 end; 187 185 -
trunk/IDE/Forms/UFormAbout.pas
r55 r71 48 48 BeginUpdate; 49 49 Clear; 50 Add(SApplicationName + ': ' + Name);50 Add(SApplicationName + ': ' + AppName); 51 51 Add(SVersion + ': ' + Version); 52 52 Add(SReleaseDate + ': ' + DateToStr(ReleaseDate)); -
trunk/IDE/Forms/UFormMain.lfm
r68 r71 5 5 Width = 695 6 6 Caption = 'Transpascal IDE' 7 ClientHeight = 4 827 ClientHeight = 476 8 8 ClientWidth = 695 9 9 Font.Height = -11 … … 20 20 Left = 0 21 21 Height = 5 22 Top = 47 722 Top = 471 23 23 Width = 695 24 24 Align = alBottom … … 89 89 object ComboBoxTarget: TComboBox 90 90 Left = 230 91 Height = 2 191 Height = 27 92 92 Top = 2 93 93 Width = 100 94 ItemHeight = 1394 ItemHeight = 0 95 95 OnChange = ComboBoxTargetChange 96 96 Style = csDropDownList … … 105 105 object Splitter1: TSplitter 106 106 Left = 490 107 Height = 3 45107 Height = 339 108 108 Top = 26 109 109 Width = 5 … … 113 113 object PageControlRight: TPageControl 114 114 Left = 495 115 Height = 3 45115 Height = 339 116 116 Top = 26 117 117 Width = 200 … … 137 137 Left = 0 138 138 Height = 101 139 Top = 37 6139 Top = 370 140 140 Width = 695 141 141 ActivePage = TabSheetMessages … … 155 155 Left = 0 156 156 Height = 5 157 Top = 3 71157 Top = 365 158 158 Width = 695 159 159 Align = alBottom … … 162 162 object PageControlMain: TPageControl 163 163 Left = 0 164 Height = 3 45164 Height = 339 165 165 Top = 26 166 166 Width = 490 -
trunk/IDE/Forms/UFormMain.pas
r68 r71 330 330 331 331 UpdateMenu; 332 Core.Compiler. Targets.LoadToStrings(ComboBoxTarget.Items);333 ComboBoxTarget.ItemIndex := Core.Compiler. Targets.IndexOf(Core.Compiler.Target);332 Core.Compiler.API.Targets.LoadToStrings(ComboBoxTarget.Items); 333 ComboBoxTarget.ItemIndex := Core.Compiler.API.Targets.IndexOf(Core.Compiler.Target); 334 334 FormSourceCode.UpdateInterface; 335 335 FormTargetCode.UpdateInterface; … … 435 435 begin 436 436 with TMenuItem(Sender) do begin 437 Core.Compiler.Target := TTarget(Core.Compiler. Targets[MenuIndex]);437 Core.Compiler.Target := TTarget(Core.Compiler.API.Targets[MenuIndex]); 438 438 UpdateInterface; 439 439 end; -
trunk/IDE/Forms/UFormTargets.pas
r60 r71 62 62 procedure TFormTargets.ListView1Data(Sender: TObject; Item: TListItem); 63 63 begin 64 if (Item.Index >= 0) and (Item.Index < Core.Compiler. Targets.Count) then65 with TTarget(Core.Compiler. Targets[Item.Index]) do begin64 if (Item.Index >= 0) and (Item.Index < Core.Compiler.API.Targets.Count) then 65 with TTarget(Core.Compiler.API.Targets[Item.Index]) do begin 66 66 Item.Caption := Name; 67 Item.Data := Core.Compiler. Targets[Item.Index];67 Item.Data := Core.Compiler.API.Targets[Item.Index]; 68 68 //Item.SubItems.Add(Producer.CompilerPath); 69 69 end; … … 72 72 procedure TFormTargets.ReloadList; 73 73 begin 74 ListView1.Items.Count := Core.Compiler. Targets.Count;74 ListView1.Items.Count := Core.Compiler.API.Targets.Count; 75 75 ListView1.Refresh; 76 76 end; -
trunk/IDE/UCore.pas
r70 r71 56 56 procedure LoadFromRegistry(Root: HKEY; const Key: string); 57 57 procedure SaveToRegistry(Root: HKEY; const Key: string); 58 procedure RegisterModules; 58 procedure RegisterIDEModules; 59 procedure RegisterCompilerModules; 59 60 end; 60 61 … … 67 68 68 69 uses 69 UFormMain, UProjectTemplates, UIDEModulePascal ;70 UFormMain, UProjectTemplates, UIDEModulePascal, UModulePascal, UModuleGCC; 70 71 71 72 { TCore } … … 108 109 109 110 ModuleManager := TModuleManager.Create(nil); 110 RegisterModules; 111 RegisterIDEModules; 112 113 RegisterCompilerModules; 111 114 end; 112 115 … … 200 203 end; 201 204 202 procedure TCore.Register Modules;205 procedure TCore.RegisterIDEModules; 203 206 begin 204 207 ModuleManager.RegisterModule(TIDEModulePascal.Create); 208 end; 209 210 procedure TCore.RegisterCompilerModules; 211 begin 212 with Compiler.ModuleManager do begin 213 RegisterModule(TModulePascal.Create, True); 214 RegisterModule(TModuleGCC.Create, True); 215 { RegisterModule(TModuleInterpretter.Create); 216 RegisterModule(TModuleDelphi.Create); 217 RegisterModule(TModulePHP.Create); 218 RegisterModule(TModuleJava.Create); 219 RegisterModule(TModuleASM8051.Create); 220 RegisterModule(TModuleXML.Create); 221 RegisterModule(TModuleNASM.Create);} 222 end; 205 223 end; 206 224
Note:
See TracChangeset
for help on using the changeset viewer.