Changeset 41


Ignore:
Timestamp:
Feb 19, 2012, 5:26:03 PM (13 years ago)
Author:
chronos
Message:
  • Added: New Java target.
Location:
trunk
Files:
3 added
2 deleted
11 edited

Legend:

Unmodified
Added
Removed
  • trunk/Forms/UFormMain.lfm

    r39 r41  
    951951        Action = AViewCompilers
    952952      end
    953       object MenuItem19: TMenuItem
    954         Action = AViewInterpretter
    955       end
    956953    end
    957954    object MenuItem10: TMenuItem
     
    10791076      OnExecute = AProgramStopExecute
    10801077      ShortCut = 16497
    1081     end
    1082     object AViewInterpretter: TAction
    1083       Category = 'View'
    1084       Caption = 'Interpretter'
    1085       OnExecute = AViewInterpretterExecute
    10861078    end
    10871079    object AProgramStepInto: TAction
  • trunk/Forms/UFormMain.lrt

    r38 r41  
    2525TMAINFORM.APROGRAMPAUSE.CAPTION=Pause
    2626TMAINFORM.APROGRAMSTOP.CAPTION=Stop
    27 TMAINFORM.AVIEWINTERPRETTER.CAPTION=Interpretter
    2827TMAINFORM.APROGRAMSTEPINTO.CAPTION=Step into
    2928TMAINFORM.APROGRAMSTEPOVER.CAPTION=Step over
  • trunk/Forms/UFormMain.pas

    r40 r41  
    3434    AProgramStepOver: TAction;
    3535    AProgramStepInto: TAction;
    36     AViewInterpretter: TAction;
    3736    AProgramPause: TAction;
    3837    AProgramStop: TAction;
     
    6160    MenuItem17: TMenuItem;
    6261    MenuItem18: TMenuItem;
    63     MenuItem19: TMenuItem;
    6462    MenuItem2: TMenuItem;
    6563    MenuItem20: TMenuItem;
     
    198196
    199197uses
    200   UFormCPU, UApplicationInfo, UFormOptions, UFormMessages,
     198  UFormCPU, UApplicationInfo, UFormOptions, UFormMessages, UTargetJava,
    201199  UTargetDelphi, UTargetPHP, UTargetC, UFormTargets, UFormOutput, UFormInput,
    202200  UFormMemory;
     
    394392  AProgramStop.Enabled := (tcStop in CurrentTarget.Capabilities) and
    395393    (ProjectFileName <> '') and (CurrentTarget.State <> rsStopped);
    396   AProgramCompile.Enabled := (tcCompile in CurrentTarget.Capabilities);
     394  AProgramCompile.Enabled := (tcCompile in CurrentTarget.Capabilities) and
     395    (ProjectFileName <> '');
    397396  AProgramStepInto.Enabled := (tcStepInto in CurrentTarget.Capabilities) and
    398397    (ProjectFileName <> '') and ((CurrentTarget.State = rsPaused) or (CurrentTarget.State = rsStopped));
     
    437436  Targets.Add(TTargetPHP.Create);
    438437  Targets.Add(TTargetC.Create);
     438  Targets.Add(TTargetJava.Create);
    439439  UpdateTargetList;
    440440  LastOpenedList := TLastOpenedList.Create;
     
    577577    Optimization := coNormal;
    578578    SourceCode := MemoSource.Text;
    579     ProgramName := ExtractFileNameOnly(ProjectFileName);
     579    ProjectFileName := Self.ProjectFileName;
     580    ProgramName := ExtractFileNameOnly(Self.ProjectFileName);
    580581    CurrentTarget.Messages.AddMessage('Compiling...');
    581582    Compile;
  • trunk/Languages/LazFuckIDE.cs.po

    r40 r41  
    312312msgstr "Překladače"
    313313
    314 #: tmainform.aviewinterpretter.caption
    315 msgctxt "tmainform.aviewinterpretter.caption"
    316 msgid "Interpretter"
    317 msgstr "Interpretr"
    318 
    319314#: tmainform.caption
    320315msgid "LazFuck"
     
    470465#: uformmain.snewproject
    471466msgid "New project"
    472 msgstr ""
     467msgstr "NovÃœ projekt"
    473468
    474469#: uformmain.snumbergeneration
     
    484479#: uformmain.sprogramstarted
    485480msgid "Program started"
    486 msgstr ""
     481msgstr "Program spuÅ¡těn"
    487482
    488483#: uformmain.sprogramstopped
    489484msgid "Program stopped"
    490 msgstr ""
     485msgstr "Program zastaven"
    491486
    492487#: uformtargets.scompileroptions
  • trunk/Languages/LazFuckIDE.po

    r40 r41  
    301301msgstr ""
    302302
    303 #: tmainform.aviewinterpretter.caption
    304 msgctxt "tmainform.aviewinterpretter.caption"
    305 msgid "Interpretter"
    306 msgstr ""
    307 
    308303#: tmainform.caption
    309304msgid "LazFuck"
  • trunk/LazFuckIDE.lpi

    r40 r41  
    9090      </Item5>
    9191    </RequiredPackages>
    92     <Units Count="15">
     92    <Units Count="16">
    9393      <Unit0>
    9494        <Filename Value="LazFuckIDE.lpr"/>
     
    185185        <UnitName Value="UFormMessages"/>
    186186      </Unit14>
     187      <Unit15>
     188        <Filename Value="Target\UTargetJava.pas"/>
     189        <IsPartOfProject Value="True"/>
     190        <UnitName Value="UTargetJava"/>
     191      </Unit15>
    187192    </Units>
    188193  </ProjectOptions>
  • trunk/LazFuckIDE.lpr

    r40 r41  
    1010  Interfaces, // this includes the LCL widgetset
    1111  Forms, UApplicationInfo, UTarget, UTargetC, UTargetDelphi,
    12   UTargetInterpretter, UTargetPHP, UFormCPU, UFormMain,
     12  UTargetInterpretter, UTargetPHP, UTargetJava, UFormCPU, UFormMain,
    1313  UFormOptions, CoolTranslator, Common,
    1414  TemplateGenerics, UFormTargets, UFormOutput, UFormInput, UFormMemory,
  • trunk/Target/UTarget.pas

    r40 r41  
    7979    procedure SetSourceCode(AValue: string); virtual;
    8080    function GetTargetCode: string; virtual;
    81     procedure AddLine(Text: string);
     81    procedure AddLine(Text: string = '');
    8282    function LongFileName(FileName: string): string;
    8383    function GetExecutionPosition: Integer; virtual;
     
    8888    Optimization: TCompilerOptimization;
    8989    CompilerPath: string;
     90    ExecutorPath: string;
    9091    SourceExtension: string;
    9192    CompiledExtension: string;
     
    101102    procedure Compile; virtual;
    102103    procedure CompileToFile; virtual;
     104    procedure RunFromFile; virtual;
    103105    procedure Run; virtual;
    104106    procedure Pause; virtual;
     
    309311end;
    310312
    311 procedure TTarget.AddLine(Text: string);
     313procedure TTarget.AddLine(Text: string = '');
    312314begin
    313315  FTargetCode := FTargetCode + DupeString('  ', Indent) + Text + LineEnding;
     
    384386    Process.Free;
    385387  end else raise Exception.Create(Format(SCompilerNotFound, [CompilerPath]));
    386 
     388end;
     389
     390procedure TTarget.RunFromFile;
     391var
     392  Process: TProcess;
     393  CompiledFile: string;
     394begin
    387395  CompiledFile := ExtractFilePath(ProjectFileName) +
    388396    'compiled' + DirectorySeparator + Name + DirectorySeparator +
     
    391399  try
    392400    Process := TProcess.Create(nil);
    393     Process.CommandLine := LongFileName(CompiledFile);
     401    Process.CommandLine := LongFileName(ExecutorPath) + ' ' + LongFileName(CompiledFile);
    394402    Process.Options := [poWaitOnExit];
    395403    Process.Execute;
  • trunk/Target/UTargetC.pas

    r35 r41  
    107107  Dec(Indent);
    108108  AddLine('}');
     109
     110  CompileToFile;
    109111end;
    110112
     
    140142procedure TTargetC.Run;
    141143begin
    142   CompileToFile;
    143144  inherited;
     145  RunFromFile;
    144146end;
    145147
  • trunk/Target/UTargetDelphi.pas

    r35 r41  
    101101  Dec(Indent);
    102102  AddLine('end.');
     103
     104  CompileToFile;
    103105end;
    104106
    105107procedure TTargetDelphi.Run;
    106108begin
    107   CompileToFile;
    108109  inherited Run;
     110  RunFromFile;
    109111end;
    110112
  • trunk/Target/UTargetPHP.pas

    r35 r41  
    9595  AddLine('');
    9696  AddLine('?>');
     97
     98  CompileToFile;
    9799end;
    98100
    99101procedure TTargetPHP.Run;
    100102begin
    101   CompileToFile;
    102103  inherited Run;
     104  RunFromFile;
    103105end;
    104106
Note: See TracChangeset for help on using the changeset viewer.