Changeset 38 for trunk/IDE


Ignore:
Timestamp:
Feb 25, 2012, 6:04:21 PM (13 years ago)
Author:
chronos
Message:
  • Modified: Compiler now require source file list which should be composed of project files and project dependency packages files.
Location:
trunk/IDE
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/IDE

    • Property svn:ignore
      •  

        old new  
        55Transpascal.exe
        66heaptrclog.trc
         7Transpascal
  • trunk/IDE/Forms/UMainForm.lfm

    r37 r38  
    55  Width = 695
    66  Caption = 'Transpascal IDE'
    7   ClientHeight = 482
     7  ClientHeight = 476
    88  ClientWidth = 695
    99  Font.Height = -11
     
    2020    Left = 0
    2121    Height = 5
    22     Top = 477
     22    Top = 471
    2323    Width = 695
    2424    Align = alBottom
     
    2727  object DockPanel: TPanel
    2828    Left = 0
    29     Height = 345
     29    Height = 339
    3030    Top = 26
    3131    Width = 490
     
    8787  object Splitter1: TSplitter
    8888    Left = 490
    89     Height = 345
     89    Height = 339
    9090    Top = 26
    9191    Width = 5
     
    9595  object PageControlRight: TPageControl
    9696    Left = 495
    97     Height = 345
     97    Height = 339
    9898    Top = 26
    9999    Width = 200
     
    113113    Left = 0
    114114    Height = 101
    115     Top = 376
     115    Top = 370
    116116    Width = 695
    117117    ActivePage = TabSheet4
     
    131131    Left = 0
    132132    Height = 5
    133     Top = 371
     133    Top = 365
    134134    Width = 695
    135135    Align = alBottom
  • trunk/IDE/Forms/UMainForm.pas

    r37 r38  
    138138    LogParsing: Boolean;
    139139    Project: TProject;
     140    TargetProject: TProject;
    140141    Compiler: TCustomCompiler;
    141142    function GetSource(Name: string; var SourceCode: string): Boolean;
     
    203204    Compiler.Producer := TProducer(Compiler.Producers[SelectedProducerIndex]);
    204205    Compiler.Analyzer := TAnalyzer(Compiler.Analyzers[SelectedAnalyzerIndex]);
    205     Compiler.Analyzer.OnGetSource := GetSource;
    206206    Compiler.Init;
    207207
     
    212212    if Project.Items.Count > 0 then
    213213    with TProjectFile(Project.Items[0]) do begin
     214      Compiler.SourceFiles.Clear;
     215      Project.DumpFileList(Compiler.SourceFiles);
    214216      Compiler.TargetFolder := Project.RootDir;
    215       Compiler.Compile(Parent.GetDir + ExtractFileNameOnly(Name), Source);
     217      Compiler.Compile;
    216218    end;
    217219    ProjectManager.TreeViewProjectChange(Self, ProjectManager.TreeViewProject.Selected);
     
    453455  Compiler := TCustomCompiler.Create;
    454456  Project := TProject.Create;
     457  TargetProject := TProject.Create;
    455458  LastOpenedFiles := TLastOpenedList.Create;
    456459  LastOpenedFiles.MenuItem := MenuItemOpenRecent;
     
    461464begin
    462465  LastOpenedFiles.Free;
     466  TargetProject.Free;
    463467  Project.Free;
    464468  Compiler.Free;
  • trunk/IDE/Forms/UProjectManager.pas

    r37 r38  
    2929
    3030uses
    31   UMainForm, UCodeForm, UCompiledForm, UCodeTreeForm, UProducerTreeView;
     31  UMainForm, UCodeForm, UCompiledForm, UCodeTreeForm;
    3232
    3333{ TProjectManager }
  • trunk/IDE/Transpascal.lpi

    r37 r38  
    8989      <Item3>
    9090        <PackageName Value="LCLBase"/>
    91         <MinVersion Major="1" Valid="True" Release="1"/>
     91        <MinVersion Major="1" Release="1" Valid="True"/>
    9292      </Item3>
    9393      <Item4>
  • trunk/IDE/Transpascal.lpr

    r37 r38  
    99  Forms, Interfaces, SysUtils,
    1010  UMainForm in 'UMainForm.pas' {MainForm},
    11   UTextSource, UProject, UApplicationInfo, URegistry, ULastOpenedList,
    12   UDebugLog, TranspascalCompiler, UProjectManager, UCodeForm, UMessagesForm,
     11  UTextSource, UProject, UApplicationInfo, TranspascalCompiler, UProjectManager, UCodeForm, UMessagesForm,
    1312  UCompiledForm, UCodeTreeForm, TemplateGenerics, Common, CoolTranslator,
    1413  UAboutForm, UFormOptions, UCompilersForm, UCompilerSettingsForm;
  • trunk/IDE/UApplicationInfo.pas

    r37 r38  
    5555  Name := 'Transpascal IDE';
    5656  Identification := 1;
    57   ReleaseDate := EncodeDate(2012, 2, 14);
     57  ReleaseDate := EncodeDate(2012, 2, 25);
    5858  MajorVersion := 0;
    5959  MinorVersion := 1;
  • trunk/IDE/UProject.pas

    r37 r38  
    5353  TProjectGroup = class(TProjectNode)
    5454    Items: TListProjectNode;
     55    procedure DumpFileList(Files: TListString);
    5556    constructor Create;
    5657    destructor Destroy; override;
     
    8889{ TProjectGroup }
    8990
     91procedure TProjectGroup.DumpFileList(Files: TListString);
     92var
     93  I: Integer;
     94begin
     95  for I := 0 to Items.Count - 1 do
     96  if TProjectNode(Items[I]) is TProjectGroup then
     97    TProjectGroup(Items[I]).DumpFileList(Files)
     98    else Files.Add(GetDir(True) + TProjectFile(Items[I]).Name);
     99end;
     100
    90101constructor TProjectGroup.Create;
    91102begin
     
    230241function TProjectNode.GetDir(IncludeRoot: Boolean = False): string;
    231242begin
    232   if Assigned(Parent) then Result := Parent.GetDir(IncludeRoot) + Name + '/'
    233   else Result := Name + '/';
     243  if Assigned(Parent) then Result := Parent.GetDir(IncludeRoot) + Name + DirectorySeparator
     244  else Result := Name + DirectorySeparator;
    234245end;
    235246
Note: See TracChangeset for help on using the changeset viewer.