Changeset 60
- Timestamp:
- Jul 17, 2012, 7:25:56 AM (12 years ago)
- Location:
- trunk
- Files:
-
- 4 added
- 4 deleted
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Compiler/UExecutor.pas
r50 r60 18 18 procedure SetRunState(AValue: TRunState); 19 19 public 20 ExecutorPath: string; 20 21 Target: TObject; // TTarget; 21 22 procedure Run; virtual; abstract; -
trunk/Compiler/UTarget.pas
r50 r60 26 26 TListTarget = class(TListObject) 27 27 function SearchBySysName(Name: string): TTarget; 28 procedure LoadToStrings(Strings: TStrings); 28 29 end; 29 30 … … 57 58 end; 58 59 60 procedure TListTarget.LoadToStrings(Strings: TStrings); 61 var 62 I: Integer; 63 begin 64 try 65 Strings.BeginUpdate; 66 Strings.Clear; 67 for I := 0 to Count - 1 do 68 Strings.AddObject(TTarget(Items[I]).Name, Items[I]); 69 finally 70 Strings.EndUpdate; 71 end; 72 end; 73 59 74 end. 60 75 -
trunk/IDE/Forms/UFormMain.lfm
r57 r60 86 86 Top = 2 87 87 Action = AStop 88 end 89 object ComboBoxTarget: TComboBox 90 Left = 230 91 Height = 21 92 Top = 2 93 Width = 100 94 ItemHeight = 13 95 OnChange = ComboBoxTargetChange 96 Style = csDropDownList 97 TabOrder = 0 98 end 99 object ToolButton11: TToolButton 100 Left = 330 101 Top = 2 102 Action = AViewTargets 88 103 end 89 104 end … … 808 823 Category = 'View' 809 824 Caption = 'Targets' 825 ImageIndex = 14 810 826 OnExecute = AViewTargetsExecute 811 827 end … … 874 890 top = 272 875 891 Bitmap = { 876 4C690 E0000001000000010000000000000000000000000000000000000000000892 4C690F0000001000000010000000000000000000000000000000000000000000 877 893 0000000000000000000000000000000000000000000000000000000000000000 878 894 0000000000000000000000000000000000000000000000000000000000000000 … … 1322 1338 0000000000000000000000000000000000000000000000000000000000000000 1323 1339 0000000000000000000000000000000000000000000000000000000000000000 1340 0000000000000000000000000000000000000000000000000000000000000000 1341 0000000000000000000000000000000000000000000000000000000000000000 1342 0000000000000000000000000000000000000000000000000000000000000000 1343 000000000000000000003131312F313131FF3030301F00000000000000000000 1344 0000000000000000000000000000000000000000000000000000000000000000 1345 000000000000000000002E2E2E3F2E2E2EFF2E2E2E3F00000000000000000000 1346 0000000000000000000000000000000000000000000000000000000000000000 1347 00002A2A2A7F2A2A2ADF2B2B2BFF2B2B2BFF2B2B2BFF2A2A2ADF2A2A2A7F0000 1348 0000000000000000000000000000000000000000000000000000000000002727 1349 279F272727FF282828AF2828284F272727FF2828284F282828AF272727FF2727 1350 279F0000000000000000000000000000000000000000000000002424247F2424 1351 24FF2424245F0000000000000000242424FF00000000000000002424245F2424 1352 24FF2424247F0000000000000000000000000000000000000000202020DF2020 1353 20AF000000000000000000000000202020FF0000000000000000000000002020 1354 20AF202020DF0000000000000000000000001C1C1C1F1C1C1C3F1D1D1DFF1D1D 1355 1D4F0000000000000000000000001D1D1DFF0000000000000000000000001D1D 1356 1D4F1D1D1DFF1C1C1C3F1C1C1C1F1A1A1A1F1A1A1AFF1A1A1AFF1A1A1AFF1A1A 1357 1AFF1A1A1AFF1A1A1AFF1A1A1AFF1A1A1ABF1A1A1AFF1A1A1AFF1A1A1AFF1A1A 1358 1AFF1A1A1AFF1A1A1AFF1A1A1AFF000000001818182F1818183F161616FF1616 1359 167F1818183F1818183F1818183F161616FF1818183F1818183F1818183F1616 1360 167F161616FF1818183F1818181F000000000000000000000000131313DF1313 1361 13AF000000000000000000000000131313FF0000000000000000000000001313 1362 13AF131313DF00000000000000000000000000000000000000000F0F0F7F0F0F 1363 0FFF0E0E0E5F00000000000000000F0F0FFF00000000000000000E0E0E5F0F0F 1364 0FFF1010106F0000000000000000000000000000000000000000000000000D0D 1365 0D9F0C0C0CFF0C0C0CAF0B0B0B4F0C0C0CFF0B0B0B4F0C0C0CAF0C0C0CFF0D0D 1366 0D9F000000000000000000000000000000000000000000000000000000000000 1367 00000909097F090909DF090909FF090909FF090909FF090909DF0909096F0000 1368 0000000000000000000000000000000000000000000000000000000000000000 1369 000000000000000000000505053F050505FF0505053F00000000000000000000 1370 0000000000000000000000000000000000000000000000000000000000000000 1371 000000000000000000000202022F020202FF0303031F00000000000000000000 1324 1372 0000000000000000000000000000 1325 1373 } -
trunk/IDE/Forms/UFormMain.pas
r59 r60 43 43 AProjectClose: TAction; 44 44 ActionList1: TActionList; 45 ComboBoxTarget: TComboBox; 45 46 ImageList1: TImageList; 46 47 MainMenu: TMainMenu; … … 99 100 ToolButton1: TToolButton; 100 101 ToolButton10: TToolButton; 102 ToolButton11: TToolButton; 101 103 ToolButton2: TToolButton; 102 104 ToolButton3: TToolButton; … … 131 133 procedure AViewProjectExecute(Sender: TObject); 132 134 procedure AViewSourceEditorExecute(Sender: TObject); 133 procedure ComboBox1Change(Sender: TObject); 134 procedure ComboBoxProducerChange(Sender: TObject); 135 procedure ComboBoxTargetChange(Sender: TObject); 135 136 procedure FormShow(Sender: TObject); 136 137 procedure FormClose(Sender: TObject; var Action: TCloseAction); … … 313 314 314 315 UpdateMenu; 316 Core.Compiler.Targets.LoadToStrings(ComboBoxTarget.Items); 317 ComboBoxTarget.ItemIndex := Core.Compiler.Targets.IndexOf(Core.Compiler.Target); 315 318 FormSourceCode.UpdateInterface; 316 319 FormTargetCode.UpdateInterface; … … 476 479 end; 477 480 478 procedure TFormMain.ComboBox1Change(Sender: TObject);479 begin480 ABuildExecute(Self);481 end;482 483 481 procedure TFormMain.AProjectOpenExecute(Sender: TObject); 484 482 begin … … 545 543 end; 546 544 547 procedure TFormMain.ComboBoxProducerChange(Sender: TObject); 548 begin 549 ABuildExecute(Self); 545 procedure TFormMain.ComboBoxTargetChange(Sender: TObject); 546 begin 547 with TMenuItem(Sender) do begin 548 Core.Compiler.Target := TTarget(Core.Compiler.Targets[ComboBoxTarget.ItemIndex]); 549 UpdateInterface; 550 end; 550 551 end; 551 552 -
trunk/IDE/Forms/UFormTargets.lfm
r42 r60 1 1 object FormTargets: TFormTargets 2 2 Left = 292 3 Height = 2643 Height = 343 4 4 Top = 138 5 Width = 3605 Width = 522 6 6 Caption = 'Targets' 7 ClientHeight = 2648 ClientWidth = 3607 ClientHeight = 343 8 ClientWidth = 522 9 9 OnShow = FormShow 10 LCLVersion = ' 0.9.31'10 LCLVersion = '1.1' 11 11 object ListView1: TListView 12 12 Left = 8 13 Height = 24813 Height = 327 14 14 Top = 8 15 Width = 34615 Width = 508 16 16 Anchors = [akTop, akLeft, akRight, akBottom] 17 17 Columns = < … … 21 21 end 22 22 item 23 Caption = 'Execution path' 24 Width = 247 23 Caption = 'Compiler path' 24 Width = 200 25 end 26 item 27 Caption = 'Executor path' 28 Width = 200 25 29 end> 26 30 OwnerData = True 31 PopupMenu = PopupMenu1 27 32 ReadOnly = True 28 33 RowSelect = True … … 30 35 ViewStyle = vsReport 31 36 OnData = ListView1Data 32 OnDblClick = ListView1DblClick 37 OnDblClick = ATargetOptionsExecute 38 end 39 object PopupMenu1: TPopupMenu 40 Images = FormMain.ImageList1 41 left = 124 42 top = 69 43 end 44 object ActionList1: TActionList 45 left = 200 46 top = 72 47 object ATargetOptions: TAction 48 Caption = 'Options' 49 Hint = 'Target options' 50 OnExecute = ATargetOptionsExecute 51 end 33 52 end 34 53 end -
trunk/IDE/Forms/UFormTargets.lrt
r42 r60 1 1 TFORMTARGETS.CAPTION=Targets 2 2 TFORMTARGETS.LISTVIEW1.COLUMNS[0].CAPTION=Name 3 TFORMTARGETS.LISTVIEW1.COLUMNS[1].CAPTION=Execution path 3 TFORMTARGETS.LISTVIEW1.COLUMNS[1].CAPTION=Compiler path 4 TFORMTARGETS.LISTVIEW1.COLUMNS[2].CAPTION=Executor path 5 TFORMTARGETS.ATARGETOPTIONS.CAPTION=Options 6 TFORMTARGETS.ATARGETOPTIONS.HINT=Target options -
trunk/IDE/Forms/UFormTargets.pas
r53 r60 6 6 7 7 uses 8 Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, ComCtrls; 8 Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, ComCtrls, 9 Menus, ActnList; 9 10 10 11 type … … 13 14 14 15 TFormTargets = class(TForm) 16 ATargetOptions: TAction; 17 ActionList1: TActionList; 15 18 ListView1: TListView; 19 PopupMenu1: TPopupMenu; 20 procedure ATargetOptionsExecute(Sender: TObject); 16 21 procedure FormShow(Sender: TObject); 17 22 procedure ListView1Data(Sender: TObject; Item: TListItem); 18 procedure ListView1DblClick(Sender: TObject);19 23 private 20 24 { private declarations } … … 31 35 32 36 uses 33 UCore, UFormMain, UCompiler, UFormCompilerSettings, UProducer, UTarget; 37 UCore, UFormMain, UCompiler, UProducer, UTarget, 38 UFormTargetOptions; 34 39 35 40 resourcestring … … 44 49 end; 45 50 51 procedure TFormTargets.ATargetOptionsExecute(Sender: TObject); 52 begin 53 if Assigned(ListView1.Selected) then begin 54 FormTargetOptions.LoadControls(TTarget(ListView1.Selected.Data)); 55 if FormTargetOptions.ShowModal = mrOk then begin 56 FormTargetOptions.SaveControls(TTarget(ListView1.Selected.Data)); 57 ReloadList; 58 end; 59 end; 60 end; 61 46 62 procedure TFormTargets.ListView1Data(Sender: TObject; Item: TListItem); 47 63 begin … … 51 67 Item.Data := Core.Compiler.Targets[Item.Index]; 52 68 //Item.SubItems.Add(Producer.CompilerPath); 53 end;54 end;55 56 procedure TFormTargets.ListView1DblClick(Sender: TObject);57 begin58 if Assigned(ListView1.Selected) then begin59 FormCompilerSettings.LoadFromProducer(TProducer(ListView1.Selected.Data));60 if FormCompilerSettings.ShowModal = mrOk then61 FormCompilerSettings.SaveToProducer(TProducer(ListView1.Selected.Data));62 ReloadList;63 69 end; 64 70 end; -
trunk/IDE/Languages/Transpascal.cs.po
r55 r60 447 447 msgstr "Cílový kód" 448 448 449 #: tformtargetoptions.button1.caption 450 msgctxt "tformtargetoptions.button1.caption" 451 msgid "Ok" 452 msgstr "Ok" 453 454 #: tformtargetoptions.button2.caption 455 msgctxt "tformtargetoptions.button2.caption" 456 msgid "Cancel" 457 msgstr "Zrušit" 458 459 #: tformtargetoptions.buttonexecutorselect.caption 460 msgctxt "tformtargetoptions.buttonexecutorselect.caption" 461 msgid "Select..." 462 msgstr "" 463 464 #: tformtargetoptions.buttonproducerselect.caption 465 msgctxt "tformtargetoptions.buttonproducerselect.caption" 466 msgid "Select..." 467 msgstr "" 468 469 #: tformtargetoptions.caption 470 msgctxt "tformtargetoptions.caption" 471 msgid "Target options" 472 msgstr "" 473 474 #: tformtargetoptions.label1.caption 475 msgid "Name:" 476 msgstr "" 477 478 #: tformtargetoptions.label2.caption 479 msgctxt "tformtargetoptions.label2.caption" 480 msgid "Compiler path:" 481 msgstr "Cesta překladače:" 482 483 #: tformtargetoptions.label3.caption 484 msgid "Executor path:" 485 msgstr "" 486 487 #: tformtargetoptions.labelname.caption 488 msgid " " 489 msgstr "" 490 449 491 #: tformtargetproject.caption 450 492 msgid "FormTargetProject" 493 msgstr "" 494 495 #: tformtargets.atargetoptions.caption 496 msgctxt "tformtargets.atargetoptions.caption" 497 msgid "Options" 498 msgstr "Volby" 499 500 #: tformtargets.atargetoptions.hint 501 msgctxt "tformtargets.atargetoptions.hint" 502 msgid "Target options" 451 503 msgstr "" 452 504 … … 462 514 463 515 #: tformtargets.listview1.columns[1].caption 516 #, fuzzy 517 #| msgid "Execution path" 464 518 msgctxt "tformtargets.listview1.columns[1].caption" 465 msgid " Executionpath"519 msgid "Compiler path" 466 520 msgstr "Cesta vykonání" 521 522 #: tformtargets.listview1.columns[2].caption 523 msgid "Executor path" 524 msgstr "" 467 525 468 526 #: tmainform.aabout.caption -
trunk/IDE/Languages/Transpascal.po
r55 r60 438 438 msgstr "" 439 439 440 #: tformtargetoptions.button1.caption 441 msgctxt "TFORMTARGETOPTIONS.BUTTON1.CAPTION" 442 msgid "Ok" 443 msgstr "" 444 445 #: tformtargetoptions.button2.caption 446 msgctxt "TFORMTARGETOPTIONS.BUTTON2.CAPTION" 447 msgid "Cancel" 448 msgstr "" 449 450 #: tformtargetoptions.buttonexecutorselect.caption 451 msgctxt "TFORMTARGETOPTIONS.BUTTONEXECUTORSELECT.CAPTION" 452 msgid "Select..." 453 msgstr "" 454 455 #: tformtargetoptions.buttonproducerselect.caption 456 msgctxt "TFORMTARGETOPTIONS.BUTTONPRODUCERSELECT.CAPTION" 457 msgid "Select..." 458 msgstr "" 459 460 #: tformtargetoptions.caption 461 msgctxt "tformtargetoptions.caption" 462 msgid "Target options" 463 msgstr "" 464 465 #: tformtargetoptions.label1.caption 466 msgid "Name:" 467 msgstr "" 468 469 #: tformtargetoptions.label2.caption 470 msgctxt "TFORMTARGETOPTIONS.LABEL2.CAPTION" 471 msgid "Compiler path:" 472 msgstr "" 473 474 #: tformtargetoptions.label3.caption 475 msgid "Executor path:" 476 msgstr "" 477 478 #: tformtargetoptions.labelname.caption 479 msgid " " 480 msgstr "" 481 440 482 #: tformtargetproject.caption 441 483 msgid "FormTargetProject" 484 msgstr "" 485 486 #: tformtargets.atargetoptions.caption 487 msgctxt "TFORMTARGETS.ATARGETOPTIONS.CAPTION" 488 msgid "Options" 489 msgstr "" 490 491 #: tformtargets.atargetoptions.hint 492 msgctxt "TFORMTARGETS.ATARGETOPTIONS.HINT" 493 msgid "Target options" 442 494 msgstr "" 443 495 … … 454 506 #: tformtargets.listview1.columns[1].caption 455 507 msgctxt "TFORMTARGETS.LISTVIEW1.COLUMNS[1].CAPTION" 456 msgid "Execution path" 508 msgid "Compiler path" 509 msgstr "" 510 511 #: tformtargets.listview1.columns[2].caption 512 msgid "Executor path" 457 513 msgstr "" 458 514 -
trunk/IDE/Transpascal.lpi
r57 r60 193 193 </Unit11> 194 194 <Unit12> 195 <Filename Value="Forms\UFormCompilerSettings.pas"/> 196 <IsPartOfProject Value="True"/> 197 <ComponentName Value="FormCompilerSettings"/> 198 <ResourceBaseClass Value="Form"/> 199 <UnitName Value="UFormCompilerSettings"/> 195 <Filename Value="Forms\UFormProjectNew.pas"/> 196 <IsPartOfProject Value="True"/> 197 <ComponentName Value="FormProjectNew"/> 198 <HasResources Value="True"/> 199 <ResourceBaseClass Value="Form"/> 200 <UnitName Value="UFormProjectNew"/> 200 201 </Unit12> 201 202 <Unit13> 202 <Filename Value="Forms\UFormProjectNew.pas"/> 203 <IsPartOfProject Value="True"/> 204 <ComponentName Value="FormProjectNew"/> 205 <HasResources Value="True"/> 206 <ResourceBaseClass Value="Form"/> 207 <UnitName Value="UFormProjectNew"/> 203 <Filename Value="UProjectTemplates.pas"/> 204 <IsPartOfProject Value="True"/> 205 <UnitName Value="UProjectTemplates"/> 208 206 </Unit13> 209 207 <Unit14> 210 <Filename Value="UProjectTemplates.pas"/> 211 <IsPartOfProject Value="True"/> 212 <UnitName Value="UProjectTemplates"/> 208 <Filename Value="Forms\UFormTargetProject.pas"/> 209 <IsPartOfProject Value="True"/> 210 <ComponentName Value="FormTargetProject"/> 211 <HasResources Value="True"/> 212 <ResourceBaseClass Value="Form"/> 213 <UnitName Value="UFormTargetProject"/> 213 214 </Unit14> 214 215 <Unit15> 215 <Filename Value=" Forms\UFormTargetProject.pas"/>216 <IsPartOfProject Value="True"/> 217 <ComponentName Value=" FormTargetProject"/>218 <HasResources Value="True"/> 219 <ResourceBaseClass Value=" Form"/>220 <UnitName Value="U FormTargetProject"/>216 <Filename Value="UCore.pas"/> 217 <IsPartOfProject Value="True"/> 218 <ComponentName Value="Core"/> 219 <HasResources Value="True"/> 220 <ResourceBaseClass Value="DataModule"/> 221 <UnitName Value="UCore"/> 221 222 </Unit15> 222 223 <Unit16> 223 <Filename Value="UCore.pas"/> 224 <IsPartOfProject Value="True"/> 225 <ComponentName Value="Core"/> 226 <HasResources Value="True"/> 227 <ResourceBaseClass Value="DataModule"/> 228 <UnitName Value="UCore"/> 224 <Filename Value="Forms\UFormTargetOptions.pas"/> 225 <IsPartOfProject Value="True"/> 226 <ComponentName Value="FormTargetOptions"/> 227 <ResourceBaseClass Value="Form"/> 228 <UnitName Value="UFormTargetOptions"/> 229 229 </Unit16> 230 230 </Units> -
trunk/IDE/Transpascal.lpr
r55 r60 12 12 UFormSourceCode, UFormMessages, 13 13 UFormTargetCode, UFormCodeTree, TemplateGenerics, CoolTranslator, Common, 14 UFormAbout, UFormOptions, UFormTargets, UFormCompilerSettings, 15 UFormProjectNew, UProjectTemplates, UFormTargetProject, UCore; 14 UFormAbout, UFormOptions, UFormTargets, 15 UFormProjectNew, UProjectTemplates, UFormTargetProject, UCore, 16 UFormTargetOptions; 16 17 17 18 {$R *.res} … … 39 40 Application.CreateForm(TFormAbout, FormAbout); 40 41 Application.CreateForm(TFormOptions, FormOptions); 41 Application.CreateForm(TFormCompilerSettings, FormCompilerSettings);42 42 Application.CreateForm(TFormTargets, FormTargets); 43 43 Application.CreateForm(TFormProjectNew, FormProjectNew); 44 44 Application.CreateForm(TFormTargetProject, FormTargetProject); 45 45 Application.CreateForm(TCore, Core); 46 Application.CreateForm(TFormTargetOptions, FormTargetOptions); 46 47 Application.Run; 47 48 end.
Note:
See TracChangeset
for help on using the changeset viewer.