- Timestamp:
- Jul 17, 2012, 6:44:54 AM (12 years ago)
- Location:
- trunk/IDE
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/IDE/Forms/UFormMain.pas
r55 r59 168 168 begin 169 169 FormSourceCode.Save; 170 AProjectSave.Execute; 170 171 with Core do begin 171 172 // Compile project file … … 178 179 if Project.Files.Count > 0 then 179 180 with TProjectFile(Project.Files[0]) do begin 180 Compiler.SourceFiles. Clear;181 Project.Files.DumpFileList(Compiler.SourceFiles );181 Compiler.SourceFiles.Files.Clear; 182 Project.Files.DumpFileList(Compiler.SourceFiles.Files); 182 183 Compiler.MainSource := Project.MainSource.AbsoluteFileName; 183 184 TargetProject.FileName := ExtractFileDir(Project.FileName) + DirectorySeparator + … … 186 187 Compiler.TargetFolder := ExtractFileDir(TargetProject.FileName); 187 188 Compiler.Compile; 188 TargetProject.Files.LoadFromList(Compiler.TargetFiles );189 TargetProject.Files.LoadFromList(Compiler.TargetFiles.Files); 189 190 FormTargetProject.UpdateInterface; 190 191 end; -
trunk/IDE/UCore.pas
r57 r59 13 13 14 14 TCustomCompiler = class(TCompiler) 15 SourceFiles: TSourceFileManager; 16 TargetFiles: TSourceFileManager; 15 17 procedure LoadFromRegistry(Root: HKEY; Key: string); 16 18 procedure SaveToRegistry(Root: HKEY; Key: string); 19 constructor Create; override; 20 destructor Destroy; override; 17 21 end; 18 22 … … 29 33 private 30 34 procedure ProjectChange(Sender: TObject); 35 function LoadSourceFile(FileName: string; var Content: string): Boolean; 36 function SaveSourceFile(FileName: string; const Content: string): Boolean; 31 37 public 32 38 ReopenLastOpenedFile: Boolean; … … 81 87 DeleteFile(DebugLog1.FileName); 82 88 Compiler := TCustomCompiler.Create; 89 //Compiler.OnLoadSource := LoadSourceFile; 90 //Compiler.OnSaveTarget := SaveSourceFile; 83 91 Project := TProject.Create; 84 92 ProjectTemplates := TProjectTemplateList.Create; … … 116 124 begin 117 125 FormMain.UpdateInterface; 126 end; 127 128 function TCore.LoadSourceFile(FileName: string; var Content: string): Boolean; 129 begin 130 131 end; 132 133 function TCore.SaveSourceFile(FileName: string; const Content: string): Boolean; 134 begin 135 118 136 end; 119 137 … … 205 223 end; 206 224 225 constructor TCustomCompiler.Create; 226 begin 227 inherited Create; 228 SourceFiles := TSourceFileManager.Create; 229 TargetFiles := TSourceFileManager.Create; 230 OnLoadSource := SourceFiles.GetFileContent; 231 OnSaveTarget := TargetFiles.SetFileContent; 232 end; 233 234 destructor TCustomCompiler.Destroy; 235 begin 236 TargetFiles.Free; 237 SourceFiles.Free; 238 inherited Destroy; 239 end; 240 207 241 208 242 end.
Note:
See TracChangeset
for help on using the changeset viewer.