Changeset 44 for trunk


Ignore:
Timestamp:
Mar 4, 2012, 9:43:53 AM (13 years ago)
Author:
chronos
Message:
  • Fixed: Selection of target.
Location:
trunk
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • trunk/Compiler/Target/ASM8051/UProducerASM8051.pas

    r41 r44  
    108108begin
    109109  AssemblyCode := TObjectList.Create;
    110   Name := 'ASM 8051';
    111110  {$IFDEF Windows}
    112111  CompilerPath := 'c:\ASM8051\ASM51.EXE';
  • trunk/Compiler/Target/Delphi/UProducerPascal.pas

    r41 r44  
    5555begin
    5656  inherited;
    57   Name := 'Delphi';
    5857  {$IFDEF Windows}
    5958  CompilerPath := 'c:\Program Files\Embarcadero\RAD Studio\9.0\bin\DCC32.EXE';
     59  {$ENDIF}
     60  {$IFDEF Linux}
     61  CompilerPath := '';
    6062  {$ENDIF}
    6163end;
  • trunk/Compiler/Target/Dynamic C/UProducerDynamicc.pas

    r41 r44  
    4949constructor TProducerDynamicC.Create;
    5050begin
    51   Name := 'Dynamic C';
    5251  {$IFDEF Windows}
    5352  CompilerPath := 'c:\Program Files\Dynamic C Rabbit 9.62\Dcrab_9.62.exe';
  • trunk/Compiler/Target/GCC/UProducerGCC.pas

    r41 r44  
    5656  TextSource := TStringList.Create;
    5757  IndentationLength := 2;
    58   Name := 'GCC C';
    5958  {$IFDEF Windows}
    6059  CompilerPath := 'c:\Program Files\MinGW\bin\gcc.exe -o %1:s';
  • trunk/Compiler/TranspascalCompiler.lpk

    r42 r44  
    99      <PathDelim Value="\"/>
    1010      <SearchPaths>
    11         <OtherUnitFiles Value="Target;Target\Interpretter;Target\ASM8051;Target\Java;Target\GCC;Target\PHP;Target\Delphi;Target\Dynamic C;Target\XML"/>
     11        <OtherUnitFiles Value="Analyze;Target;Target\Interpretter;Target\ASM8051;Target\Java;Target\GCC;Target\PHP;Target\Delphi;Target\Dynamic C;Target\XML"/>
    1212        <UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/>
    1313      </SearchPaths>
  • trunk/Compiler/UAnalyzer.pas

    r41 r44  
    4747    procedure GetNextToken;
    4848  public
     49    SysName: string;
    4950    Name: string;
    5051    ProgramCode: TProgram;
     
    8283
    8384  // TListAnalyzer = TGObjectList<Integer, TAnalyzer>
    84   TListAnalyzer = class(TListObject);
     85  TListAnalyzer = class(TListObject)
     86  end;
    8587
    8688resourcestring
  • trunk/Compiler/UCompiler.pas

    r41 r44  
    4848
    4949uses
    50   UTargets;
     50  UTargets, UAnalyzerPascal;
    5151
    5252resourcestring
     
    6363constructor TCompiler.Create;
    6464begin
     65  Analyzer := TAnalyzerPascal.Create;
    6566  Targets := TListTarget.Create;
    6667  SourceFiles := TListString.Create;
     
    148149  TargetFileName: string;
    149150begin
     151  if Assigned(Target.Producer) then
    150152  try
    151153    ProducedCode := TStringList.Create;
     
    155157      Target.Producer.AssignToStringList(ProducedCode);
    156158      TargetFileName := TargetFolder + DirectorySeparator +
    157         CompiledFolder + DirectorySeparator + Target.Producer.Name +
     159        CompiledFolder + DirectorySeparator + Target.Name +
    158160        DirectorySeparator + TModule(Modules[I]).TargetFile;
    159161      ForceDirectoriesUTF8(ExtractFileDir(TargetFileName));
  • trunk/Compiler/UProducer.pas

    r41 r44  
    1313
    1414  TProducer = class
    15     Name: string;
    1615    TextSource: TStringList;
    1716    IndentationLength: Integer;
  • trunk/IDE/Forms/UMainForm.pas

    r43 r44  
    143143    LastOpenedFiles: TLastOpenedList;
    144144    procedure CompilerDebugLog(Text: string);
    145     procedure MenuItemAnalyzerClick(Sender: TObject);
    146     procedure MenuItemProducerClick(Sender: TObject);
     145    procedure MenuItemTargetClick(Sender: TObject);
    147146    procedure OpenRecentClick(Sender: TObject);
    148147    procedure DockInit;
     
    152151    procedure UpdateMenu;
    153152  public
    154     SelectedAnalyzerIndex: Integer;
    155     SelectedProducerIndex: Integer;
    156153    ReopenLastOpenedFile: Boolean;
    157154    LogParsing: Boolean;
     
    315312  AProgramPause.Enabled := Project.Active and (BrainFuckInterpreter.State = rsRunning);
    316313  AProgramStop.Enabled := Project.Active and (BrainFuckInterpreter.State <> rsStopped);*)
    317   ABuild.Enabled := Project.Active;
     314  ABuild.Enabled := Project.Active and Assigned(Compiler.Target) and
     315    Assigned(Compiler.Target.Producer);
    318316  UpdateMenu;
    319317  CodeForm.UpdateInterface;
     
    401399      OpenKey(Key, True);
    402400      ReopenLastOpenedFile := ReadBoolWithDefault('ReopenLastOpenedFile', True);
    403       SelectedProducerIndex := ReadIntegerWithDefault('ProducerType', 0);
    404       SelectedAnalyzerIndex := ReadIntegerWithDefault('AnalyzerType', 0);
     401      Compiler.Target := Compiler.Targets.SearchBySysName(ReadStringWithDefault('TargetName', ''));
    405402      LogParsing := ReadBoolWithDefault('LogParsing', False);
    406403      if ValueExists('LanguageCode') then
     
    423420      OpenKey(Key, True);
    424421      WriteBool('ReopenLastOpenedFile', ReopenLastOpenedFile);
    425       WriteInteger('ProducerType', SelectedProducerIndex);
    426       WriteInteger('AnalyzerType', SelectedAnalyzerIndex);
     422      if Assigned(Compiler.Target) then
     423        WriteString('TargetName', Compiler.Target.SysName)
     424        else DeleteValue('TargetName');
    427425      WriteBool('LogParsing', LogParsing);
    428426      if Assigned(CoolTranslator1.Language) and (CoolTranslator1.Language.Code <> '') then
     
    448446end;
    449447
    450 procedure TMainForm.MenuItemAnalyzerClick(Sender: TObject);
     448procedure TMainForm.MenuItemTargetClick(Sender: TObject);
    451449begin
    452450  with TMenuItem(Sender) do begin
    453     SelectedAnalyzerIndex := MenuIndex;
    454     UpdateMenu;
    455   end;
    456 end;
    457 
    458 procedure TMainForm.MenuItemProducerClick(Sender: TObject);
    459 begin
    460   with TMenuItem(Sender) do begin
    461     SelectedProducerIndex := MenuIndex;
    462     UpdateMenu;
     451    Compiler.Target := TTarget(Compiler.Targets[MenuIndex]);
     452    UpdateInterface;
    463453  end;
    464454end;
     
    473463    NewMenuItem := TMenuItem.Create(MenuItemProducer);
    474464    NewMenuItem.Caption := TTarget(Compiler.Targets[I]).Name;
    475     NewMenuItem.OnClick := MenuItemProducerClick;
    476     if I = SelectedProducerIndex then NewMenuItem.Checked := True;
     465    NewMenuItem.OnClick := MenuItemTargetClick;
     466    if Assigned(Compiler.Target) and
     467      (TTarget(Compiler.Targets[I]).SysName = Compiler.Target.SysName) then NewMenuItem.Checked := True;
    477468    MenuItemProducer.Add(NewMenuItem);
    478469  end;
  • trunk/IDE/Languages/Transpascal.cs.po

    r43 r44  
    105105msgctxt "tformtargets.caption"
    106106msgid "Targets"
    107 msgstr ""
     107msgstr "Cíle"
    108108
    109109#: tformtargets.listview1.columns[0].caption
     
    135135#: tmainform.apause.caption
    136136msgid "Pause"
    137 msgstr ""
     137msgstr "Pozastavit"
    138138
    139139#: tmainform.aprojectclose.caption
     
    175175#: tmainform.areset.caption
    176176msgid "Reset"
    177 msgstr ""
     177msgstr "Vynulovat"
    178178
    179179#: tmainform.arun.caption
     
    184184#: tmainform.aruntocursor.caption
    185185msgid "Run to cursor"
    186 msgstr ""
     186msgstr "Spustit po ukazatel"
    187187
    188188#: tmainform.astepin.caption
    189189msgid "Step in"
    190 msgstr ""
     190msgstr "Vejít do"
    191191
    192192#: tmainform.astepout.caption
    193193msgid "Step out"
    194 msgstr ""
     194msgstr "Vyjít ven"
    195195
    196196#: tmainform.astepover.caption
    197197msgid "Step over"
    198 msgstr ""
     198msgstr "Přejít přes"
    199199
    200200#: tmainform.astop.caption
    201201msgid "Stop"
    202 msgstr ""
     202msgstr "Zastavit"
    203203
    204204#: tmainform.aviewcodetree.caption
     
    238238msgctxt "tmainform.aviewtargets.caption"
    239239msgid "Targets"
    240 msgstr ""
     240msgstr "Cíle"
    241241
    242242#: tmainform.caption
     
    282282
    283283#: tmainform.menuitemproducer.caption
    284 #, fuzzy
    285284#| msgid "Producer"
    286285msgid "Target"
    287 msgstr "Tvůrce"
     286msgstr "Cíl"
    288287
    289288#: tmainform.tabsheetbreakpoints.caption
Note: See TracChangeset for help on using the changeset viewer.