Changeset 34 for trunk


Ignore:
Timestamp:
Feb 18, 2012, 11:17:14 PM (13 years ago)
Author:
chronos
Message:
  • Removed: Action Compile and run. Now Compile is executed before Run action if not compiled yet.
Location:
trunk
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/Forms/UMainForm.lfm

    r33 r34  
    455455        }
    456456      end
    457       object MenuItem31: TMenuItem
    458         Action = ACompileAndRun
    459       end
    460457      object MenuItemTarget: TMenuItem
    461458        Caption = 'Target'
     
    788785      ShortCut = 16504
    789786    end
    790     object ACompileAndRun: TAction
    791       Caption = 'Compile and run'
    792       OnExecute = ACompileAndRunExecute
    793     end
    794787    object AProgramRun: TAction
    795788      Category = 'Program'
  • trunk/Forms/UMainForm.lrt

    r33 r34  
    1818TMAINFORM.AEXIT.CAPTION=Exit
    1919TMAINFORM.APROGRAMCOMPILE.CAPTION=Compile
    20 TMAINFORM.ACOMPILEANDRUN.CAPTION=Compile and run
    2120TMAINFORM.APROGRAMRUN.CAPTION=Run
    2221TMAINFORM.AABOUT.CAPTION=About
  • trunk/Forms/UMainForm.pas

    r33 r34  
    2323    AAbout: TAction;
    2424    ABreakpointToggle: TAction;
    25     ACompileAndRun: TAction;
    2625    AViewCompilers: TAction;
    2726    AGenerateNumber: TAction;
     
    7372    MenuItem29: TMenuItem;
    7473    MenuItem30: TMenuItem;
    75     MenuItem31: TMenuItem;
    7674    MenuItem32: TMenuItem;
    7775    MenuItem33: TMenuItem;
     
    113111    ToolButton9: TToolButton;
    114112    procedure ABreakpointToggleExecute(Sender: TObject);
    115     procedure ACompileAndRunExecute(Sender: TObject);
    116113    procedure AProgramCompileExecute(Sender: TObject);
    117114    procedure AExitExecute(Sender: TObject);
     
    376373    TTargetInterpretter(CurrentTarget).Input := InterpreterForm.MemoInput.Lines.Text;
    377374  CurrentTarget.SourceCode := MemoSource.Text;
     375  if not CurrentTarget.Compiled then CurrentTarget.Compile;
    378376  CurrentTarget.Run;
    379377end;
     
    502500end;
    503501
    504 procedure TMainForm.ACompileAndRunExecute(Sender: TObject);
    505 begin
    506   with CurrentTarget do begin
    507     Optimization := coNormal;
    508     SourceCode := MemoSource.Text;
    509     ProgramName := ExtractFileNameOnly(ProjectFileName);
    510     ProjectFileName := Self.ProjectFileName;
    511     Compile;
    512     CompileToFile;
    513     if CompiledExtension <> '' then Run;
    514   end;
    515 end;
    516 
    517502procedure TMainForm.AProgramPauseExecute(Sender: TObject);
    518503begin
  • trunk/Languages/LazFuckIDE.cs.po

    r33 r34  
    9797msgstr "Přepnout bod zastavení"
    9898
    99 #: tmainform.acompileandrun.caption
    100 msgid "Compile and run"
    101 msgstr "PřeloÅŸit a spustit"
    102 
    10399#: tmainform.aexit.caption
    104100msgid "Exit"
     
    182178#: tmainform.ashowsourceposition.caption
    183179msgid "Show position in source"
    184 msgstr ""
     180msgstr "UkaÅŸ pozici ve zdroji"
    185181
    186182#: tmainform.ashowtargetposition.caption
    187183msgid "Show position in target"
    188 msgstr ""
     184msgstr "UkaÅŸ pozici v cíli"
    189185
    190186#: tmainform.ashrinksource.caption
     
    248244#: tmainform.tabsheetsource.caption
    249245msgid "Source code"
    250 msgstr ""
     246msgstr "ZdrojovÃœ kód"
    251247
    252248#: tmainform.tabsheettarget.caption
    253249msgid "Target code"
    254 msgstr ""
     250msgstr "CílovÃœ kód"
    255251
    256252#: toptionsform.buttoncancel.caption
  • trunk/Languages/LazFuckIDE.po

    r33 r34  
    8888msgstr ""
    8989
    90 #: tmainform.acompileandrun.caption
    91 msgid "Compile and run"
    92 msgstr ""
    93 
    9490#: tmainform.aexit.caption
    9591msgid "Exit"
  • trunk/Target/UTarget.pas

    r33 r34  
    259259    Process.Free;
    260260  end else raise Exception.Create(Format(SCompilerNotFound, [CompilerPath]));
    261 end;
    262 
    263 procedure TTarget.Run;
    264 var
    265   CompiledFile: string;
    266   Process: TProcess;
    267 begin
     261
    268262  CompiledFile := ExtractFilePath(ProjectFileName) +
    269263    'compiled' + DirectorySeparator + Name + DirectorySeparator +
     
    280274end;
    281275
     276procedure TTarget.Run;
     277begin
     278end;
     279
    282280procedure TTarget.Pause;
    283281begin
  • trunk/Target/UTargetC.pas

    r33 r34  
    139139procedure TTargetC.Run;
    140140begin
    141   inherited Run;
     141  CompileToFile;
     142  inherited;
    142143end;
    143144
  • trunk/Target/UTargetDelphi.pas

    r33 r34  
    1717    constructor Create; override;
    1818    procedure Compile; override;
     19    procedure Run; override;
    1920  end;
    2021
     
    101102end;
    102103
     104procedure TTargetDelphi.Run;
     105begin
     106  CompileToFile;
     107  inherited Run;
     108end;
     109
    103110end.
    104111
  • trunk/Target/UTargetPHP.pas

    r33 r34  
    9898procedure TTargetPHP.Run;
    9999begin
     100  CompileToFile;
    100101  inherited Run;
    101102end;
Note: See TracChangeset for help on using the changeset viewer.