Changeset 41 for trunk/IDE


Ignore:
Timestamp:
Feb 28, 2012, 8:34:31 PM (13 years ago)
Author:
chronos
Message:
  • Modified: Instead of TProducer class will be used TTarget as real target definition.
  • Added: For execution of compiled code TExecutor class is introduced.
Location:
trunk/IDE
Files:
1 added
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/IDE/Forms/UCompilersForm.lfm

    r37 r41  
    2222      item
    2323        Caption = 'Execution path'
    24         Width = 200
     24        Width = 247
    2525      end>
    2626    OwnerData = True
  • trunk/IDE/Forms/UCompilersForm.pas

    r37 r41  
    3131
    3232uses
    33   UMainForm, UCompiler, UCompilerSettingsForm, UProducer;
     33  UMainForm, UCompiler, UCompilerSettingsForm, UProducer, UTarget;
    3434
    3535resourcestring
     
    4646procedure TFormProducers.ListView1Data(Sender: TObject; Item: TListItem);
    4747begin
    48   if (Item.Index >= 0) and (Item.Index < MainForm.Compiler.Producers.Count) then
    49   with TProducer(MainForm.Compiler.Producers[Item.Index]) do begin
     48  if (Item.Index >= 0) and (Item.Index < MainForm.Compiler.Targets.Count) then
     49  with TTarget(MainForm.Compiler.Targets[Item.Index]) do begin
    5050    Item.Caption := Name;
    51     Item.Data := MainForm.Compiler.Producers[Item.Index];
    52     Item.SubItems.Add(CompilerPath);
     51    Item.Data := MainForm.Compiler.Targets[Item.Index];
     52    Item.SubItems.Add(Producer.CompilerPath);
    5353  end;
    5454end;
     
    6666procedure TFormProducers.ReloadList;
    6767begin
    68   ListView1.Items.Count := MainForm.Compiler.Producers.Count;
     68  ListView1.Items.Count := MainForm.Compiler.Targets.Count;
    6969  ListView1.Refresh;
    7070end;
  • trunk/IDE/Forms/UMainForm.lfm

    r39 r41  
    472472          0000000000000000000000000000000000000000000000000000
    473473        }
    474       end
    475       object MenuItemAnalyzer: TMenuItem
    476         Caption = 'Analyzer'
    477474      end
    478475      object MenuItemProducer: TMenuItem
  • trunk/IDE/Forms/UMainForm.lrt

    r39 r41  
    1111TMAINFORM.MENUITEM12.CAPTION=-
    1212TMAINFORM.MENUITEM7.CAPTION=Run
    13 TMAINFORM.MENUITEMANALYZER.CAPTION=Analyzer
    1413TMAINFORM.MENUITEMPRODUCER.CAPTION=Producer
    1514TMAINFORM.MENUITEM15.CAPTION=View
  • trunk/IDE/Forms/UMainForm.pas

    r39 r41  
    1111  UCDConjoinForm, UCDWindowList, UCDLayout, UCDCustomize, UCoolTranslator,
    1212  UCompiledForm, UCodeTreeForm, URegistry, ULastOpenedList, UApplicationInfo,
    13   UDebugLog, UAnalyzer, UProducer;
     13  UDebugLog;
    1414
    1515const
     
    6868    MenuItem23: TMenuItem;
    6969    MenuItem24: TMenuItem;
    70     MenuItemAnalyzer: TMenuItem;
    7170    MenuItemProducer: TMenuItem;
    7271    MenuItem3: TMenuItem;
     
    157156uses
    158157  UMessagesForm, UCodeForm, UProjectManager, UCommon, UAboutForm, UFormOptions,
    159   UCompilersForm;
     158  UCompilersForm, UTarget, UAnalyzer, UProducer;
    160159
    161160resourcestring
     
    171170    try
    172171      RootKey := Root;
    173       for I := 0 to Producers.Count - 1 do
    174       with TProducer(Producers[I]) do begin
    175         OpenKey(Key + '\Producers\' + Name, True);
     172      for I := 0 to Targets.Count - 1 do
     173      with TTarget(Targets[I]) do begin
     174        OpenKey(Key + '\Targets\' + Name, True);
    176175        if ValueExists('CompilerPath') then
    177           CompilerPath := ReadStringWithDefault('CompilerPath', CompilerPath);
     176          Producer.CompilerPath := ReadStringWithDefault('CompilerPath', Producer.CompilerPath);
    178177      end;
     178      if ValueExists('SelectedTarget') then
     179      Target := Targets.SearchBySysName(ReadString('SelectedTarget'))
     180        else Target := nil;
    179181    finally
    180182      Free;
     
    189191    try
    190192      RootKey := Root;
    191       for I := 0 to Producers.Count - 1 do
    192       with TProducer(Producers[I]) do begin
    193         OpenKey(Key + '\Producers\' + Name, True);
    194         if CompilerPath <> '' then WriteString('CompilerPath', CompilerPath)
    195           else DeleteValue('CompilerPath');
     193      for I := 0 to Targets.Count - 1 do
     194      with TTarget(Targets[I]) do begin
     195        OpenKey(Key + '\Targets\' + Name, True);
     196        if Assigned(Producer) then begin
     197          if Producer.CompilerPath <> '' then WriteString('CompilerPath', Producer.CompilerPath)
     198            else DeleteValue('CompilerPath');
     199        end;
    196200      end;
     201      if Assigned(Target) then WriteString('SelectedTarget', Target.SysName)
     202        else DeleteValue('SelectedTarget');
    197203    finally
    198204      Free;
     
    207213
    208214  // Compile project file
    209     Compiler.Producer := TProducer(Compiler.Producers[SelectedProducerIndex]);
    210     Compiler.Analyzer := TAnalyzer(Compiler.Analyzers[SelectedAnalyzerIndex]);
    211215    Compiler.Init;
    212216
     
    434438  NewMenuItem: TMenuItem;
    435439begin
    436   MenuItemAnalyzer.Clear;
    437   for I := 0 to Compiler.Analyzers.Count - 1 do begin
    438     NewMenuItem := TMenuItem.Create(MenuItemAnalyzer);
    439     NewMenuItem.Caption := TAnalyzer(Compiler.Analyzers[I]).Name;
    440     NewMenuItem.OnClick := MenuItemAnalyzerClick;
    441     if I = SelectedAnalyzerIndex then NewMenuItem.Checked := True;
    442     MenuItemAnalyzer.Add(NewMenuItem);
    443   end;
    444440  MenuItemProducer.Clear;
    445   for I := 0 to Compiler.Producers.Count - 1 do begin
     441  for I := 0 to Compiler.Targets.Count - 1 do begin
    446442    NewMenuItem := TMenuItem.Create(MenuItemProducer);
    447     NewMenuItem.Caption := TProducer(Compiler.Producers[I]).Name;
     443    NewMenuItem.Caption := TTarget(Compiler.Targets[I]).Name;
    448444    NewMenuItem.OnClick := MenuItemProducerClick;
    449445    if I = SelectedProducerIndex then NewMenuItem.Checked := True;
  • trunk/IDE/Languages/Transpascal.cs.po

    r40 r41  
    229229msgstr "Nápověda"
    230230
    231 #: tmainform.menuitemanalyzer.caption
    232 msgid "Analyzer"
    233 msgstr "Analyzátor"
    234 
    235231#: tmainform.menuitemopenrecent.caption
    236232msgid "Open recent"
  • trunk/IDE/Languages/Transpascal.po

    r40 r41  
    221221msgstr ""
    222222
    223 #: tmainform.menuitemanalyzer.caption
    224 msgid "Analyzer"
    225 msgstr ""
    226 
    227223#: tmainform.menuitemopenrecent.caption
    228224msgid "Open recent"
  • trunk/IDE/Transpascal.lpi

    r40 r41  
    9090      <Item3>
    9191        <PackageName Value="LCLBase"/>
    92         <MinVersion Major="1" Valid="True" Release="1"/>
     92        <MinVersion Major="1" Release="1" Valid="True"/>
    9393      </Item3>
    9494      <Item4>
  • trunk/IDE/UApplicationInfo.pas

    r38 r41  
    22
    33{$MODE Delphi}
    4 
    5 // Date: 2010-06-16
    64
    75interface
     
    5553  Name := 'Transpascal IDE';
    5654  Identification := 1;
    57   ReleaseDate := EncodeDate(2012, 2, 25);
     55  ReleaseDate := EncodeDate(2012, 2, 28);
    5856  MajorVersion := 0;
    5957  MinorVersion := 1;
Note: See TracChangeset for help on using the changeset viewer.