mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-29 03:29:19 +02:00
IDE: build,run file now stores options for non pascal files
git-svn-id: trunk@14941 -
This commit is contained in:
parent
d88b4969be
commit
1d9a456c64
@ -1,49 +1,49 @@
|
||||
object BuildFileDialog: TBuildFileDialog
|
||||
Left = 317
|
||||
Height = 344
|
||||
Height = 417
|
||||
Top = 196
|
||||
Width = 414
|
||||
HorzScrollBar.Page = 413
|
||||
VertScrollBar.Page = 343
|
||||
ActiveControl = AlwaysCompileFirstCheckbox
|
||||
Width = 451
|
||||
HorzScrollBar.Page = 450
|
||||
VertScrollBar.Page = 416
|
||||
ActiveControl = Notebook1
|
||||
BorderIcons = [biSystemMenu]
|
||||
Caption = 'BuildFileDialog'
|
||||
ClientHeight = 344
|
||||
ClientWidth = 414
|
||||
ClientHeight = 417
|
||||
ClientWidth = 451
|
||||
KeyPreview = True
|
||||
OnCreate = BuildFileDialogCREATE
|
||||
OnKeyDown = BuildFileDialogKEYDOWN
|
||||
Position = poScreenCenter
|
||||
LCLVersion = '0.9.25'
|
||||
object Notebook1: TNotebook
|
||||
AnchorSideBottom.Control = HelpButton
|
||||
Height = 296
|
||||
Width = 414
|
||||
Align = alTop
|
||||
Anchors = [akTop, akLeft, akRight, akBottom]
|
||||
PageIndex = 2
|
||||
Height = 369
|
||||
Width = 451
|
||||
Align = alClient
|
||||
PageIndex = 1
|
||||
TabOrder = 0
|
||||
object GeneralPage: TPage
|
||||
Caption = 'Options'
|
||||
ClientWidth = 410
|
||||
ClientHeight = 273
|
||||
ClientWidth = 447
|
||||
ClientHeight = 338
|
||||
object WhenFileIsActiveGroupbox: TGroupBox
|
||||
Left = 6
|
||||
Height = 81
|
||||
Top = 6
|
||||
Width = 398
|
||||
Width = 435
|
||||
Align = alTop
|
||||
AutoSize = True
|
||||
BorderSpacing.Around = 6
|
||||
Caption = 'When this file is active in source editor ...'
|
||||
ClientHeight = 62
|
||||
ClientWidth = 394
|
||||
ClientHeight = 77
|
||||
ClientWidth = 431
|
||||
ParentCtl3D = False
|
||||
TabOrder = 0
|
||||
object OverrideBuildProjectCheckbox: TCheckBox
|
||||
Left = 6
|
||||
Height = 22
|
||||
Top = 6
|
||||
Width = 382
|
||||
Width = 419
|
||||
Align = alTop
|
||||
BorderSpacing.Around = 6
|
||||
Caption = 'On build project execute the Build File command instead'
|
||||
@ -53,7 +53,7 @@ object BuildFileDialog: TBuildFileDialog
|
||||
Left = 6
|
||||
Height = 22
|
||||
Top = 34
|
||||
Width = 382
|
||||
Width = 419
|
||||
Align = alTop
|
||||
BorderSpacing.Around = 6
|
||||
Caption = 'On run project execute the Run File command instead'
|
||||
@ -63,25 +63,25 @@ object BuildFileDialog: TBuildFileDialog
|
||||
end
|
||||
object BuildPage: TPage
|
||||
Caption = 'Build'
|
||||
ClientWidth = 410
|
||||
ClientHeight = 273
|
||||
ClientWidth = 447
|
||||
ClientHeight = 338
|
||||
object BuildCommandGroupbox: TGroupBox
|
||||
Left = 6
|
||||
Height = 80
|
||||
Top = 68
|
||||
Width = 398
|
||||
Top = 72
|
||||
Width = 435
|
||||
Align = alTop
|
||||
BorderSpacing.Around = 6
|
||||
Caption = 'Build Command'
|
||||
ClientHeight = 61
|
||||
ClientWidth = 394
|
||||
ClientWidth = 431
|
||||
ParentCtl3D = False
|
||||
TabOrder = 0
|
||||
object BuildCommandMemo: TMemo
|
||||
Left = 6
|
||||
Height = 49
|
||||
Top = 6
|
||||
Width = 382
|
||||
Width = 419
|
||||
Align = alClient
|
||||
BorderSpacing.Around = 6
|
||||
Lines.Strings = (
|
||||
@ -93,8 +93,8 @@ object BuildFileDialog: TBuildFileDialog
|
||||
object BuildScanForFPCMsgCheckbox: TCheckBox
|
||||
Left = 6
|
||||
Height = 22
|
||||
Top = 154
|
||||
Width = 398
|
||||
Top = 158
|
||||
Width = 435
|
||||
Align = alTop
|
||||
BorderSpacing.Around = 6
|
||||
Caption = 'Scan for FPC messages'
|
||||
@ -103,8 +103,8 @@ object BuildFileDialog: TBuildFileDialog
|
||||
object BuildScanForMakeMsgCheckbox: TCheckBox
|
||||
Left = 6
|
||||
Height = 22
|
||||
Top = 182
|
||||
Width = 398
|
||||
Top = 186
|
||||
Width = 435
|
||||
Align = alTop
|
||||
BorderSpacing.Around = 6
|
||||
Caption = 'Scan for Make messages'
|
||||
@ -112,15 +112,15 @@ object BuildFileDialog: TBuildFileDialog
|
||||
end
|
||||
object BuildWorkingDirGroupbox: TGroupBox
|
||||
Left = 6
|
||||
Height = 56
|
||||
Height = 60
|
||||
Top = 6
|
||||
Width = 398
|
||||
Width = 435
|
||||
Align = alTop
|
||||
AutoSize = True
|
||||
BorderSpacing.Around = 6
|
||||
Caption = 'Working directory (Leave empty for file path)'
|
||||
ClientHeight = 37
|
||||
ClientWidth = 394
|
||||
ClientHeight = 41
|
||||
ClientWidth = 431
|
||||
ParentCtl3D = False
|
||||
TabOrder = 3
|
||||
object BuildWorkDirCombobox: TComboBox
|
||||
@ -128,9 +128,9 @@ object BuildFileDialog: TBuildFileDialog
|
||||
AnchorSideTop.Control = BuildWorkingDirGroupbox
|
||||
AnchorSideRight.Control = BuildBrowseWorkDirButton
|
||||
Left = 6
|
||||
Height = 25
|
||||
Height = 29
|
||||
Top = 6
|
||||
Width = 351
|
||||
Width = 388
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
AutoCompleteText = [cbactEndOfLineComplete, cbactSearchAscending]
|
||||
BorderSpacing.Around = 6
|
||||
@ -143,7 +143,7 @@ object BuildFileDialog: TBuildFileDialog
|
||||
AnchorSideTop.Control = BuildWorkingDirGroupbox
|
||||
AnchorSideRight.Control = BuildWorkingDirGroupbox
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 363
|
||||
Left = 400
|
||||
Height = 25
|
||||
Top = 6
|
||||
Width = 25
|
||||
@ -157,13 +157,13 @@ object BuildFileDialog: TBuildFileDialog
|
||||
end
|
||||
object RunPage: TPage
|
||||
Caption = 'Run'
|
||||
ClientWidth = 410
|
||||
ClientHeight = 265
|
||||
ClientWidth = 447
|
||||
ClientHeight = 338
|
||||
object AlwaysCompileFirstCheckbox: TCheckBox
|
||||
Left = 6
|
||||
Height = 22
|
||||
Top = 6
|
||||
Width = 398
|
||||
Width = 435
|
||||
Align = alTop
|
||||
BorderSpacing.Around = 6
|
||||
Caption = 'Always Build before Run'
|
||||
@ -172,20 +172,20 @@ object BuildFileDialog: TBuildFileDialog
|
||||
object RunCommandGroupbox: TGroupBox
|
||||
Left = 6
|
||||
Height = 70
|
||||
Top = 96
|
||||
Width = 398
|
||||
Top = 100
|
||||
Width = 435
|
||||
Align = alTop
|
||||
BorderSpacing.Around = 6
|
||||
Caption = 'Run Command'
|
||||
ClientHeight = 51
|
||||
ClientWidth = 394
|
||||
ClientWidth = 431
|
||||
ParentCtl3D = False
|
||||
TabOrder = 1
|
||||
object RunCommandMemo: TMemo
|
||||
Left = 6
|
||||
Height = 39
|
||||
Top = 6
|
||||
Width = 382
|
||||
Width = 419
|
||||
Align = alClient
|
||||
BorderSpacing.Around = 6
|
||||
Lines.Strings = (
|
||||
@ -196,15 +196,15 @@ object BuildFileDialog: TBuildFileDialog
|
||||
end
|
||||
object RunWorkDirGroupbox: TGroupBox
|
||||
Left = 6
|
||||
Height = 56
|
||||
Height = 60
|
||||
Top = 34
|
||||
Width = 398
|
||||
Width = 435
|
||||
Align = alTop
|
||||
AutoSize = True
|
||||
BorderSpacing.Around = 6
|
||||
Caption = 'Working Directory (Leave empty for file path)'
|
||||
ClientHeight = 37
|
||||
ClientWidth = 394
|
||||
ClientHeight = 41
|
||||
ClientWidth = 431
|
||||
ParentCtl3D = False
|
||||
TabOrder = 2
|
||||
object RunWorkDirCombobox: TComboBox
|
||||
@ -212,9 +212,9 @@ object BuildFileDialog: TBuildFileDialog
|
||||
AnchorSideTop.Control = RunWorkDirGroupbox
|
||||
AnchorSideRight.Control = RunBrowseWorkDirButton
|
||||
Left = 6
|
||||
Height = 25
|
||||
Height = 29
|
||||
Top = 6
|
||||
Width = 351
|
||||
Width = 388
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
AutoCompleteText = [cbactEndOfLineComplete, cbactSearchAscending]
|
||||
BorderSpacing.Around = 6
|
||||
@ -227,7 +227,7 @@ object BuildFileDialog: TBuildFileDialog
|
||||
AnchorSideTop.Control = RunWorkDirGroupbox
|
||||
AnchorSideRight.Control = RunWorkDirGroupbox
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 363
|
||||
Left = 400
|
||||
Height = 25
|
||||
Top = 6
|
||||
Width = 25
|
||||
@ -241,64 +241,70 @@ object BuildFileDialog: TBuildFileDialog
|
||||
end
|
||||
end
|
||||
end
|
||||
object HelpButton: TBitBtn
|
||||
AnchorSideLeft.Control = Owner
|
||||
AnchorSideBottom.Control = Owner
|
||||
AnchorSideBottom.Side = asrBottom
|
||||
Left = 6
|
||||
Height = 36
|
||||
Top = 302
|
||||
Width = 75
|
||||
Anchors = [akLeft, akBottom]
|
||||
object BtnPanel: TPanel
|
||||
Height = 48
|
||||
Top = 369
|
||||
Width = 451
|
||||
Align = alBottom
|
||||
AutoSize = True
|
||||
BorderSpacing.Around = 6
|
||||
Caption = '&Help'
|
||||
Constraints.MinHeight = 25
|
||||
Constraints.MinWidth = 75
|
||||
Kind = bkHelp
|
||||
NumGlyphs = 0
|
||||
OnClick = HelpButtonClick
|
||||
BevelOuter = bvNone
|
||||
ClientHeight = 48
|
||||
ClientWidth = 451
|
||||
TabOrder = 1
|
||||
end
|
||||
object CancelButton: TBitBtn
|
||||
AnchorSideRight.Control = Owner
|
||||
AnchorSideRight.Side = asrBottom
|
||||
AnchorSideBottom.Control = Owner
|
||||
AnchorSideBottom.Side = asrBottom
|
||||
Left = 330
|
||||
Height = 32
|
||||
Top = 306
|
||||
Width = 78
|
||||
Anchors = [akRight, akBottom]
|
||||
AutoSize = True
|
||||
BorderSpacing.Around = 6
|
||||
Cancel = True
|
||||
Caption = 'Cancel'
|
||||
Constraints.MinHeight = 25
|
||||
Constraints.MinWidth = 75
|
||||
Kind = bkCancel
|
||||
ModalResult = 2
|
||||
NumGlyphs = 0
|
||||
TabOrder = 2
|
||||
end
|
||||
object OKButton: TBitBtn
|
||||
AnchorSideRight.Control = CancelButton
|
||||
AnchorSideBottom.Control = Owner
|
||||
AnchorSideBottom.Side = asrBottom
|
||||
Left = 249
|
||||
Height = 36
|
||||
Top = 302
|
||||
Width = 75
|
||||
Anchors = [akRight, akBottom]
|
||||
AutoSize = True
|
||||
BorderSpacing.Around = 6
|
||||
Caption = '&OK'
|
||||
Constraints.MinHeight = 25
|
||||
Constraints.MinWidth = 75
|
||||
Default = True
|
||||
Kind = bkOK
|
||||
ModalResult = 1
|
||||
NumGlyphs = 0
|
||||
TabOrder = 3
|
||||
object CancelButton: TBitBtn
|
||||
AnchorSideRight.Side = asrBottom
|
||||
AnchorSideBottom.Side = asrBottom
|
||||
Left = 367
|
||||
Height = 36
|
||||
Top = 6
|
||||
Width = 78
|
||||
Align = alRight
|
||||
AutoSize = True
|
||||
BorderSpacing.Around = 6
|
||||
Cancel = True
|
||||
Caption = 'Cancel'
|
||||
Constraints.MinHeight = 25
|
||||
Constraints.MinWidth = 75
|
||||
Kind = bkCancel
|
||||
ModalResult = 2
|
||||
NumGlyphs = 0
|
||||
TabOrder = 0
|
||||
end
|
||||
object OKButton: TBitBtn
|
||||
AnchorSideBottom.Side = asrBottom
|
||||
Left = 286
|
||||
Height = 36
|
||||
Top = 6
|
||||
Width = 75
|
||||
Align = alRight
|
||||
AutoSize = True
|
||||
BorderSpacing.Around = 6
|
||||
Caption = '&OK'
|
||||
Constraints.MinHeight = 25
|
||||
Constraints.MinWidth = 75
|
||||
Default = True
|
||||
Kind = bkOK
|
||||
ModalResult = 1
|
||||
NumGlyphs = 0
|
||||
OnClick = OkButtonCLICK
|
||||
TabOrder = 1
|
||||
end
|
||||
object HelpButton: TBitBtn
|
||||
AnchorSideBottom.Side = asrBottom
|
||||
Left = 6
|
||||
Height = 36
|
||||
Top = 6
|
||||
Width = 75
|
||||
Align = alLeft
|
||||
AutoSize = True
|
||||
BorderSpacing.Around = 6
|
||||
Caption = '&Help'
|
||||
Constraints.MinHeight = 25
|
||||
Constraints.MinWidth = 75
|
||||
Kind = bkHelp
|
||||
NumGlyphs = 0
|
||||
OnClick = HelpButtonClick
|
||||
TabOrder = 2
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -1,99 +1,98 @@
|
||||
{ This is an automatically generated lazarus resource file }
|
||||
|
||||
LazarusResources.Add('TBuildFileDialog','FORMDATA',[
|
||||
'TPF0'#16'TBuildFileDialog'#15'BuildFileDialog'#4'Left'#3'='#1#6'Height'#3'X'
|
||||
+#1#3'Top'#3#196#0#5'Width'#3#158#1#18'HorzScrollBar.Page'#3#157#1#18'VertScr'
|
||||
+'ollBar.Page'#3'W'#1#13'ActiveControl'#7#26'AlwaysCompileFirstCheckbox'#11'B'
|
||||
+'orderIcons'#11#12'biSystemMenu'#0#7'Caption'#6#15'BuildFileDialog'#12'Clien'
|
||||
+'tHeight'#3'X'#1#11'ClientWidth'#3#158#1#10'KeyPreview'#9#8'OnCreate'#7#21'B'
|
||||
+'uildFileDialogCREATE'#9'OnKeyDown'#7#22'BuildFileDialogKEYDOWN'#8'Position'
|
||||
+#7#14'poScreenCenter'#0#9'TNotebook'#9'Notebook1'#24'AnchorSideBottom.Contro'
|
||||
+'l'#7#10'HelpButton'#6'Height'#3'('#1#5'Width'#3#158#1#5'Align'#7#5'alTop'#7
|
||||
+'Anchors'#11#5'akTop'#6'akLeft'#7'akRight'#8'akBottom'#0#9'PageIndex'#2#2#8
|
||||
+'TabOrder'#2#0#0#5'TPage'#11'GeneralPage'#7'Caption'#6#7'Options'#11'ClientW'
|
||||
+'idth'#3#154#1#12'ClientHeight'#3#17#1#0#9'TGroupBox'#24'WhenFileIsActiveGro'
|
||||
+'upbox'#4'Left'#2#6#6'Height'#2'Q'#3'Top'#2#6#5'Width'#3#142#1#5'Align'#7#5
|
||||
+'alTop'#8'AutoSize'#9#20'BorderSpacing.Around'#2#6#7'Caption'#6'-When this f'
|
||||
+'ile is active in source editor ...'#12'ClientHeight'#2'>'#11'ClientWidth'#3
|
||||
+#138#1#11'ParentCtl3D'#8#8'TabOrder'#2#0#0#9'TCheckBox'#28'OverrideBuildProj'
|
||||
+'ectCheckbox'#4'Left'#2#6#6'Height'#2#22#3'Top'#2#6#5'Width'#3'~'#1#5'Align'
|
||||
+#7#5'alTop'#20'BorderSpacing.Around'#2#6#7'Caption'#6'7On build project exec'
|
||||
+'ute the Build File command instead'#8'TabOrder'#2#0#0#0#9'TCheckBox'#26'Ove'
|
||||
+'rrideRunProjectCheckbox'#4'Left'#2#6#6'Height'#2#22#3'Top'#2'"'#5'Width'#3
|
||||
+'~'#1#5'Align'#7#5'alTop'#20'BorderSpacing.Around'#2#6#7'Caption'#6'3On run '
|
||||
+'project execute the Run File command instead'#8'TabOrder'#2#1#0#0#0#0#5'TPa'
|
||||
+'ge'#9'BuildPage'#7'Caption'#6#5'Build'#11'ClientWidth'#3#154#1#12'ClientHei'
|
||||
+'ght'#3#17#1#0#9'TGroupBox'#20'BuildCommandGroupbox'#4'Left'#2#6#6'Height'#2
|
||||
+'P'#3'Top'#2'D'#5'Width'#3#142#1#5'Align'#7#5'alTop'#20'BorderSpacing.Around'
|
||||
+#2#6#7'Caption'#6#13'Build Command'#12'ClientHeight'#2'='#11'ClientWidth'#3
|
||||
+#138#1#11'ParentCtl3D'#8#8'TabOrder'#2#0#0#5'TMemo'#16'BuildCommandMemo'#4'L'
|
||||
+'eft'#2#6#6'Height'#2'1'#3'Top'#2#6#5'Width'#3'~'#1#5'Align'#7#8'alClient'#20
|
||||
'TPF0'#16'TBuildFileDialog'#15'BuildFileDialog'#4'Left'#3'='#1#6'Height'#3#161
|
||||
+#1#3'Top'#3#196#0#5'Width'#3#195#1#18'HorzScrollBar.Page'#3#194#1#18'VertScr'
|
||||
+'ollBar.Page'#3#160#1#13'ActiveControl'#7#9'Notebook1'#11'BorderIcons'#11#12
|
||||
+'biSystemMenu'#0#7'Caption'#6#15'BuildFileDialog'#12'ClientHeight'#3#161#1#11
|
||||
+'ClientWidth'#3#195#1#10'KeyPreview'#9#8'OnCreate'#7#21'BuildFileDialogCREAT'
|
||||
+'E'#9'OnKeyDown'#7#22'BuildFileDialogKEYDOWN'#8'Position'#7#14'poScreenCente'
|
||||
+'r'#10'LCLVersion'#6#6'0.9.25'#0#9'TNotebook'#9'Notebook1'#24'AnchorSideBott'
|
||||
+'om.Control'#7#10'HelpButton'#6'Height'#3'q'#1#5'Width'#3#195#1#5'Align'#7#8
|
||||
+'alClient'#9'PageIndex'#2#1#8'TabOrder'#2#0#0#5'TPage'#11'GeneralPage'#7'Cap'
|
||||
+'tion'#6#7'Options'#11'ClientWidth'#3#191#1#12'ClientHeight'#3'R'#1#0#9'TGro'
|
||||
+'upBox'#24'WhenFileIsActiveGroupbox'#4'Left'#2#6#6'Height'#2'Q'#3'Top'#2#6#5
|
||||
+'Width'#3#179#1#5'Align'#7#5'alTop'#8'AutoSize'#9#20'BorderSpacing.Around'#2
|
||||
+#6#7'Caption'#6'-When this file is active in source editor ...'#12'ClientHei'
|
||||
+'ght'#2'M'#11'ClientWidth'#3#175#1#11'ParentCtl3D'#8#8'TabOrder'#2#0#0#9'TCh'
|
||||
+'eckBox'#28'OverrideBuildProjectCheckbox'#4'Left'#2#6#6'Height'#2#22#3'Top'#2
|
||||
+#6#5'Width'#3#163#1#5'Align'#7#5'alTop'#20'BorderSpacing.Around'#2#6#7'Capti'
|
||||
+'on'#6'7On build project execute the Build File command instead'#8'TabOrder'
|
||||
+#2#0#0#0#9'TCheckBox'#26'OverrideRunProjectCheckbox'#4'Left'#2#6#6'Height'#2
|
||||
+#22#3'Top'#2'"'#5'Width'#3#163#1#5'Align'#7#5'alTop'#20'BorderSpacing.Around'
|
||||
+#2#6#7'Caption'#6'3On run project execute the Run File command instead'#8'Ta'
|
||||
+'bOrder'#2#1#0#0#0#0#5'TPage'#9'BuildPage'#7'Caption'#6#5'Build'#11'ClientWi'
|
||||
+'dth'#3#191#1#12'ClientHeight'#3'R'#1#0#9'TGroupBox'#20'BuildCommandGroupbox'
|
||||
+#4'Left'#2#6#6'Height'#2'P'#3'Top'#2'H'#5'Width'#3#179#1#5'Align'#7#5'alTop'
|
||||
+#20'BorderSpacing.Around'#2#6#7'Caption'#6#13'Build Command'#12'ClientHeight'
|
||||
+#2'='#11'ClientWidth'#3#175#1#11'ParentCtl3D'#8#8'TabOrder'#2#0#0#5'TMemo'#16
|
||||
+'BuildCommandMemo'#4'Left'#2#6#6'Height'#2'1'#3'Top'#2#6#5'Width'#3#163#1#5
|
||||
+'Align'#7#8'alClient'#20'BorderSpacing.Around'#2#6#13'Lines.Strings'#1#6#18
|
||||
+'CompileCommandMemo'#0#8'TabOrder'#2#0#0#0#0#9'TCheckBox'#26'BuildScanForFPC'
|
||||
+'MsgCheckbox'#4'Left'#2#6#6'Height'#2#22#3'Top'#3#158#0#5'Width'#3#179#1#5'A'
|
||||
+'lign'#7#5'alTop'#20'BorderSpacing.Around'#2#6#7'Caption'#6#21'Scan for FPC '
|
||||
+'messages'#8'TabOrder'#2#1#0#0#9'TCheckBox'#27'BuildScanForMakeMsgCheckbox'#4
|
||||
+'Left'#2#6#6'Height'#2#22#3'Top'#3#186#0#5'Width'#3#179#1#5'Align'#7#5'alTop'
|
||||
+#20'BorderSpacing.Around'#2#6#7'Caption'#6#22'Scan for Make messages'#8'TabO'
|
||||
+'rder'#2#2#0#0#9'TGroupBox'#23'BuildWorkingDirGroupbox'#4'Left'#2#6#6'Height'
|
||||
+#2'<'#3'Top'#2#6#5'Width'#3#179#1#5'Align'#7#5'alTop'#8'AutoSize'#9#20'Borde'
|
||||
+'rSpacing.Around'#2#6#7'Caption'#6'-Working directory (Leave empty for file '
|
||||
+'path)'#12'ClientHeight'#2')'#11'ClientWidth'#3#175#1#11'ParentCtl3D'#8#8'Ta'
|
||||
+'bOrder'#2#3#0#9'TComboBox'#20'BuildWorkDirCombobox'#22'AnchorSideLeft.Contr'
|
||||
+'ol'#7#23'BuildWorkingDirGroupbox'#21'AnchorSideTop.Control'#7#23'BuildWorki'
|
||||
+'ngDirGroupbox'#23'AnchorSideRight.Control'#7#24'BuildBrowseWorkDirButton'#4
|
||||
+'Left'#2#6#6'Height'#2#29#3'Top'#2#6#5'Width'#3#132#1#7'Anchors'#11#5'akTop'
|
||||
+#6'akLeft'#7'akRight'#0#16'AutoCompleteText'#11#22'cbactEndOfLineComplete'#20
|
||||
+'cbactSearchAscending'#0#20'BorderSpacing.Around'#2#6#9'MaxLength'#2#0#11'Pa'
|
||||
+'rentCtl3D'#8#8'TabOrder'#2#0#4'Text'#6#20'BuildWorkDirCombobox'#0#0#7'TButt'
|
||||
+'on'#24'BuildBrowseWorkDirButton'#21'AnchorSideTop.Control'#7#23'BuildWorkin'
|
||||
+'gDirGroupbox'#23'AnchorSideRight.Control'#7#23'BuildWorkingDirGroupbox'#20
|
||||
+'AnchorSideRight.Side'#7#9'asrBottom'#4'Left'#3#144#1#6'Height'#2#25#3'Top'#2
|
||||
+#6#5'Width'#2#25#7'Anchors'#11#5'akTop'#7'akRight'#0#20'BorderSpacing.Around'
|
||||
+#2#6#7'Caption'#6#3'...'#7'OnClick'#7#29'BuildBrowseWorkDirButtonCLICK'#8'Ta'
|
||||
+'bOrder'#2#1#0#0#0#0#5'TPage'#7'RunPage'#7'Caption'#6#3'Run'#11'ClientWidth'
|
||||
+#3#191#1#12'ClientHeight'#3'R'#1#0#9'TCheckBox'#26'AlwaysCompileFirstCheckbo'
|
||||
+'x'#4'Left'#2#6#6'Height'#2#22#3'Top'#2#6#5'Width'#3#179#1#5'Align'#7#5'alTo'
|
||||
+'p'#20'BorderSpacing.Around'#2#6#7'Caption'#6#23'Always Build before Run'#8
|
||||
+'TabOrder'#2#0#0#0#9'TGroupBox'#18'RunCommandGroupbox'#4'Left'#2#6#6'Height'
|
||||
+#2'F'#3'Top'#2'd'#5'Width'#3#179#1#5'Align'#7#5'alTop'#20'BorderSpacing.Arou'
|
||||
+'nd'#2#6#7'Caption'#6#11'Run Command'#12'ClientHeight'#2'3'#11'ClientWidth'#3
|
||||
+#175#1#11'ParentCtl3D'#8#8'TabOrder'#2#1#0#5'TMemo'#14'RunCommandMemo'#4'Lef'
|
||||
+'t'#2#6#6'Height'#2''''#3'Top'#2#6#5'Width'#3#163#1#5'Align'#7#8'alClient'#20
|
||||
+'BorderSpacing.Around'#2#6#13'Lines.Strings'#1#6#18'CompileCommandMemo'#0#8
|
||||
+'TabOrder'#2#0#0#0#0#9'TCheckBox'#26'BuildScanForFPCMsgCheckbox'#4'Left'#2#6
|
||||
+#6'Height'#2#22#3'Top'#3#154#0#5'Width'#3#142#1#5'Align'#7#5'alTop'#20'Borde'
|
||||
+'rSpacing.Around'#2#6#7'Caption'#6#21'Scan for FPC messages'#8'TabOrder'#2#1
|
||||
+#0#0#9'TCheckBox'#27'BuildScanForMakeMsgCheckbox'#4'Left'#2#6#6'Height'#2#22
|
||||
+#3'Top'#3#182#0#5'Width'#3#142#1#5'Align'#7#5'alTop'#20'BorderSpacing.Around'
|
||||
+#2#6#7'Caption'#6#22'Scan for Make messages'#8'TabOrder'#2#2#0#0#9'TGroupBox'
|
||||
+#23'BuildWorkingDirGroupbox'#4'Left'#2#6#6'Height'#2'8'#3'Top'#2#6#5'Width'#3
|
||||
+#142#1#5'Align'#7#5'alTop'#8'AutoSize'#9#20'BorderSpacing.Around'#2#6#7'Capt'
|
||||
+'ion'#6'-Working directory (Leave empty for file path)'#12'ClientHeight'#2'%'
|
||||
+#11'ClientWidth'#3#138#1#11'ParentCtl3D'#8#8'TabOrder'#2#3#0#9'TComboBox'#20
|
||||
+'BuildWorkDirCombobox'#22'AnchorSideLeft.Control'#7#23'BuildWorkingDirGroupb'
|
||||
+'ox'#21'AnchorSideTop.Control'#7#23'BuildWorkingDirGroupbox'#23'AnchorSideRi'
|
||||
+'ght.Control'#7#24'BuildBrowseWorkDirButton'#4'Left'#2#6#6'Height'#2#25#3'To'
|
||||
+'p'#2#6#5'Width'#3'_'#1#7'Anchors'#11#5'akTop'#6'akLeft'#7'akRight'#0#16'Aut'
|
||||
+'oCompleteText'#11#22'cbactEndOfLineComplete'#20'cbactSearchAscending'#0#20
|
||||
+'BorderSpacing.Around'#2#6#9'MaxLength'#2#0#11'ParentCtl3D'#8#8'TabOrder'#2#0
|
||||
+#4'Text'#6#20'BuildWorkDirCombobox'#0#0#7'TButton'#24'BuildBrowseWorkDirButt'
|
||||
+'on'#21'AnchorSideTop.Control'#7#23'BuildWorkingDirGroupbox'#23'AnchorSideRi'
|
||||
+'ght.Control'#7#23'BuildWorkingDirGroupbox'#20'AnchorSideRight.Side'#7#9'asr'
|
||||
+'Bottom'#4'Left'#3'k'#1#6'Height'#2#25#3'Top'#2#6#5'Width'#2#25#7'Anchors'#11
|
||||
+#5'akTop'#7'akRight'#0#20'BorderSpacing.Around'#2#6#7'Caption'#6#3'...'#7'On'
|
||||
+'Click'#7#29'BuildBrowseWorkDirButtonCLICK'#8'TabOrder'#2#1#0#0#0#0#5'TPage'
|
||||
+#7'RunPage'#7'Caption'#6#3'Run'#11'ClientWidth'#3#154#1#12'ClientHeight'#3#9
|
||||
+#1#0#9'TCheckBox'#26'AlwaysCompileFirstCheckbox'#4'Left'#2#6#6'Height'#2#22#3
|
||||
+'Top'#2#6#5'Width'#3#142#1#5'Align'#7#5'alTop'#20'BorderSpacing.Around'#2#6#7
|
||||
+'Caption'#6#23'Always Build before Run'#8'TabOrder'#2#0#0#0#9'TGroupBox'#18
|
||||
+'RunCommandGroupbox'#4'Left'#2#6#6'Height'#2'F'#3'Top'#2'`'#5'Width'#3#142#1
|
||||
+#5'Align'#7#5'alTop'#20'BorderSpacing.Around'#2#6#7'Caption'#6#11'Run Comman'
|
||||
+'d'#12'ClientHeight'#2'3'#11'ClientWidth'#3#138#1#11'ParentCtl3D'#8#8'TabOrd'
|
||||
+'er'#2#1#0#5'TMemo'#14'RunCommandMemo'#4'Left'#2#6#6'Height'#2''''#3'Top'#2#6
|
||||
+#5'Width'#3'~'#1#5'Align'#7#8'alClient'#20'BorderSpacing.Around'#2#6#13'Line'
|
||||
+'s.Strings'#1#6#18'CompileCommandMemo'#0#8'TabOrder'#2#0#0#0#0#9'TGroupBox'
|
||||
+#18'RunWorkDirGroupbox'#4'Left'#2#6#6'Height'#2'8'#3'Top'#2'"'#5'Width'#3#142
|
||||
+#1#5'Align'#7#5'alTop'#8'AutoSize'#9#20'BorderSpacing.Around'#2#6#7'Caption'
|
||||
+#6'-Working Directory (Leave empty for file path)'#12'ClientHeight'#2'%'#11
|
||||
+'ClientWidth'#3#138#1#11'ParentCtl3D'#8#8'TabOrder'#2#2#0#9'TComboBox'#18'Ru'
|
||||
,'nWorkDirCombobox'#22'AnchorSideLeft.Control'#7#18'RunWorkDirGroupbox'#21'An'
|
||||
+'chorSideTop.Control'#7#18'RunWorkDirGroupbox'#23'AnchorSideRight.Control'#7
|
||||
+#22'RunBrowseWorkDirButton'#4'Left'#2#6#6'Height'#2#25#3'Top'#2#6#5'Width'#3
|
||||
+'_'#1#7'Anchors'#11#5'akTop'#6'akLeft'#7'akRight'#0#16'AutoCompleteText'#11
|
||||
+#22'cbactEndOfLineComplete'#20'cbactSearchAscending'#0#20'BorderSpacing.Arou'
|
||||
+'nd'#2#6#9'MaxLength'#2#0#11'ParentCtl3D'#8#8'TabOrder'#2#0#4'Text'#6#18'Run'
|
||||
+'WorkDirCombobox'#0#0#7'TButton'#22'RunBrowseWorkDirButton'#21'AnchorSideTop'
|
||||
+'.Control'#7#18'RunWorkDirGroupbox'#23'AnchorSideRight.Control'#7#18'RunWork'
|
||||
+'DirGroupbox'#20'AnchorSideRight.Side'#7#9'asrBottom'#4'Left'#3'k'#1#6'Heigh'
|
||||
+'t'#2#25#3'Top'#2#6#5'Width'#2#25#8'HelpType'#7#9'htKeyword'#7'Anchors'#11#5
|
||||
+'akTop'#7'akRight'#0#20'BorderSpacing.Around'#2#6#7'Caption'#6#3'...'#7'OnCl'
|
||||
+'ick'#7#29'BuildBrowseWorkDirButtonCLICK'#8'TabOrder'#2#1#0#0#0#0#0#7'TBitBt'
|
||||
+'n'#10'HelpButton'#22'AnchorSideLeft.Control'#7#5'Owner'#24'AnchorSideBottom'
|
||||
+'.Control'#7#5'Owner'#21'AnchorSideBottom.Side'#7#9'asrBottom'#4'Left'#2#6#6
|
||||
+'Height'#2'$'#3'Top'#3'.'#1#5'Width'#2'K'#7'Anchors'#11#6'akLeft'#8'akBottom'
|
||||
+#0#8'AutoSize'#9#20'BorderSpacing.Around'#2#6#7'Caption'#6#5'&Help'#21'Const'
|
||||
+'raints.MinHeight'#2#25#20'Constraints.MinWidth'#2'K'#4'Kind'#7#6'bkHelp'#9
|
||||
+'NumGlyphs'#2#0#7'OnClick'#7#15'HelpButtonClick'#8'TabOrder'#2#1#0#0#7'TBitB'
|
||||
+'tn'#12'CancelButton'#23'AnchorSideRight.Control'#7#5'Owner'#20'AnchorSideRi'
|
||||
+'ght.Side'#7#9'asrBottom'#24'AnchorSideBottom.Control'#7#5'Owner'#21'AnchorS'
|
||||
+'ideBottom.Side'#7#9'asrBottom'#4'Left'#3'J'#1#6'Height'#2' '#3'Top'#3'2'#1#5
|
||||
+'Width'#2'N'#7'Anchors'#11#7'akRight'#8'akBottom'#0#8'AutoSize'#9#20'BorderS'
|
||||
+'pacing.Around'#2#6#6'Cancel'#9#7'Caption'#6#6'Cancel'#21'Constraints.MinHei'
|
||||
+'ght'#2#25#20'Constraints.MinWidth'#2'K'#4'Kind'#7#8'bkCancel'#11'ModalResul'
|
||||
+'t'#2#2#9'NumGlyphs'#2#0#8'TabOrder'#2#2#0#0#7'TBitBtn'#8'OKButton'#23'Ancho'
|
||||
+'rSideRight.Control'#7#12'CancelButton'#24'AnchorSideBottom.Control'#7#5'Own'
|
||||
+'er'#21'AnchorSideBottom.Side'#7#9'asrBottom'#4'Left'#3#249#0#6'Height'#2'$'
|
||||
+#3'Top'#3'.'#1#5'Width'#2'K'#7'Anchors'#11#7'akRight'#8'akBottom'#0#8'AutoSi'
|
||||
+'ze'#9#20'BorderSpacing.Around'#2#6#7'Caption'#6#3'&OK'#21'Constraints.MinHe'
|
||||
+'ight'#2#25#20'Constraints.MinWidth'#2'K'#7'Default'#9#4'Kind'#7#4'bkOK'#11
|
||||
+'ModalResult'#2#1#9'NumGlyphs'#2#0#8'TabOrder'#2#3#0#0#0
|
||||
+'TabOrder'#2#0#0#0#0#9'TGroupBox'#18'RunWorkDirGroupbox'#4'Left'#2#6#6'Heigh'
|
||||
+'t'#2'<'#3'Top'#2'"'#5'Width'#3#179#1#5'Align'#7#5'alTop'#8'AutoSize'#9#20'B'
|
||||
+'orderSpacing.Around'#2#6#7'Caption'#6'-Working Directory (Leave empty for f'
|
||||
+'ile path)'#12'ClientHeight'#2')'#11'ClientWidth'#3#175#1#11'ParentCtl3D'#8#8
|
||||
+'TabOrder'#2#2#0#9'TComboBox'#18'RunWorkDirCombobox'#22'AnchorSideLeft.Contr'
|
||||
,'ol'#7#18'RunWorkDirGroupbox'#21'AnchorSideTop.Control'#7#18'RunWorkDirGroup'
|
||||
+'box'#23'AnchorSideRight.Control'#7#22'RunBrowseWorkDirButton'#4'Left'#2#6#6
|
||||
+'Height'#2#29#3'Top'#2#6#5'Width'#3#132#1#7'Anchors'#11#5'akTop'#6'akLeft'#7
|
||||
+'akRight'#0#16'AutoCompleteText'#11#22'cbactEndOfLineComplete'#20'cbactSearc'
|
||||
+'hAscending'#0#20'BorderSpacing.Around'#2#6#9'MaxLength'#2#0#11'ParentCtl3D'
|
||||
+#8#8'TabOrder'#2#0#4'Text'#6#18'RunWorkDirCombobox'#0#0#7'TButton'#22'RunBro'
|
||||
+'wseWorkDirButton'#21'AnchorSideTop.Control'#7#18'RunWorkDirGroupbox'#23'Anc'
|
||||
+'horSideRight.Control'#7#18'RunWorkDirGroupbox'#20'AnchorSideRight.Side'#7#9
|
||||
+'asrBottom'#4'Left'#3#144#1#6'Height'#2#25#3'Top'#2#6#5'Width'#2#25#8'HelpTy'
|
||||
+'pe'#7#9'htKeyword'#7'Anchors'#11#5'akTop'#7'akRight'#0#20'BorderSpacing.Aro'
|
||||
+'und'#2#6#7'Caption'#6#3'...'#7'OnClick'#7#29'BuildBrowseWorkDirButtonCLICK'
|
||||
+#8'TabOrder'#2#1#0#0#0#0#0#6'TPanel'#8'BtnPanel'#6'Height'#2'0'#3'Top'#3'q'#1
|
||||
+#5'Width'#3#195#1#5'Align'#7#8'alBottom'#8'AutoSize'#9#10'BevelOuter'#7#6'bv'
|
||||
+'None'#12'ClientHeight'#2'0'#11'ClientWidth'#3#195#1#8'TabOrder'#2#1#0#7'TBi'
|
||||
+'tBtn'#12'CancelButton'#20'AnchorSideRight.Side'#7#9'asrBottom'#21'AnchorSid'
|
||||
+'eBottom.Side'#7#9'asrBottom'#4'Left'#3'o'#1#6'Height'#2'$'#3'Top'#2#6#5'Wid'
|
||||
+'th'#2'N'#5'Align'#7#7'alRight'#8'AutoSize'#9#20'BorderSpacing.Around'#2#6#6
|
||||
+'Cancel'#9#7'Caption'#6#6'Cancel'#21'Constraints.MinHeight'#2#25#20'Constrai'
|
||||
+'nts.MinWidth'#2'K'#4'Kind'#7#8'bkCancel'#11'ModalResult'#2#2#9'NumGlyphs'#2
|
||||
+#0#8'TabOrder'#2#0#0#0#7'TBitBtn'#8'OKButton'#21'AnchorSideBottom.Side'#7#9
|
||||
+'asrBottom'#4'Left'#3#30#1#6'Height'#2'$'#3'Top'#2#6#5'Width'#2'K'#5'Align'#7
|
||||
+#7'alRight'#8'AutoSize'#9#20'BorderSpacing.Around'#2#6#7'Caption'#6#3'&OK'#21
|
||||
+'Constraints.MinHeight'#2#25#20'Constraints.MinWidth'#2'K'#7'Default'#9#4'Ki'
|
||||
+'nd'#7#4'bkOK'#11'ModalResult'#2#1#9'NumGlyphs'#2#0#7'OnClick'#7#13'OkButton'
|
||||
+'CLICK'#8'TabOrder'#2#1#0#0#7'TBitBtn'#10'HelpButton'#21'AnchorSideBottom.Si'
|
||||
+'de'#7#9'asrBottom'#4'Left'#2#6#6'Height'#2'$'#3'Top'#2#6#5'Width'#2'K'#5'Al'
|
||||
+'ign'#7#6'alLeft'#8'AutoSize'#9#20'BorderSpacing.Around'#2#6#7'Caption'#6#5
|
||||
+'&Help'#21'Constraints.MinHeight'#2#25#20'Constraints.MinWidth'#2'K'#4'Kind'
|
||||
+#7#6'bkHelp'#9'NumGlyphs'#2#0#7'OnClick'#7#15'HelpButtonClick'#8'TabOrder'#2
|
||||
+#2#0#0#0#0
|
||||
]);
|
||||
|
@ -5,9 +5,10 @@ unit BuildFileDlg;
|
||||
interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils, LResources, LCLType, Forms, Controls, Graphics, Dialogs,
|
||||
Buttons, ExtCtrls, StdCtrls, BasicCodeTools, FileUtil, IDEProcs, InputHistory,
|
||||
LazarusIDEStrConsts, EnvironmentOpts, TransferMacros, IDEContextHelpEdit;
|
||||
Classes, SysUtils, LCLProc, LResources, LCLType, Forms, Controls, Graphics,
|
||||
Dialogs, Buttons, ExtCtrls, StdCtrls, BasicCodeTools, FileUtil, IDEProcs,
|
||||
InputHistory, LazarusIDEStrConsts, EnvironmentOpts, TransferMacros,
|
||||
IDEContextHelpEdit;
|
||||
|
||||
type
|
||||
TIDEDirective = (
|
||||
@ -79,6 +80,7 @@ type
|
||||
Notebook1: TNOTEBOOK;
|
||||
OverrideBuildProjectCheckbox: TCHECKBOX;
|
||||
OverrideRunProjectCheckbox: TCHECKBOX;
|
||||
BtnPanel: TPanel;
|
||||
RunBrowseWorkDirButton: TBUTTON;
|
||||
RunCommandGroupbox: TGROUPBOX;
|
||||
RunCommandMemo: TMEMO;
|
||||
@ -303,6 +305,7 @@ var
|
||||
NewEntry: String;
|
||||
begin
|
||||
if (DirectiveName='') or (DirectiveList=nil) then exit;
|
||||
//DebugLn(['SetIDEDirective ',DirectiveName,' NewValue="',NewValue,'" DefaultValue="',DefaultValue,'"']);
|
||||
Index:=IndexOfIDEDirective(DirectiveList,DirectiveName);
|
||||
if NewValue=DefaultValue then begin
|
||||
// value is default -> remove entry
|
||||
@ -711,6 +714,7 @@ begin
|
||||
RunCommand:=Trim(SpecialCharsToSpaces(RunCommandMemo.Lines.Text));
|
||||
|
||||
// set values to directivelist
|
||||
//DebugLn(['TBuildFileDialog.WriteDirectiveList ']);
|
||||
SetIDEDirective(DirectiveList,IDEDirectiveNames[idedBuildWorkingDir],
|
||||
BuildWorkingDir,'');
|
||||
SetIDEDirective(DirectiveList,IDEDirectiveNames[idedBuildCommand],
|
||||
|
132
ide/ideprocs.pp
132
ide/ideprocs.pp
@ -204,7 +204,9 @@ function StringListToText(List: TStrings; const Delimiter: string;
|
||||
function StringListPartToText(List: TStrings; FromIndex, ToIndex: integer;
|
||||
const Delimiter: string;
|
||||
IgnoreEmptyLines: boolean = false): string;
|
||||
|
||||
function StringListToString(List: TStrings; FromIndex, ToIndex: integer;
|
||||
IgnoreEmptyLines: boolean = false): string;
|
||||
procedure StringToStringList(const s: string; List: TStrings);
|
||||
|
||||
// environment
|
||||
function GetCurrentUserName: string;
|
||||
@ -1800,6 +1802,7 @@ begin
|
||||
Result:='';
|
||||
exit;
|
||||
end;
|
||||
if FromIndex<0 then FromIndex:=0;
|
||||
if ToIndex>=List.Count then ToIndex:=List.Count-1;
|
||||
// calculate size
|
||||
Size:=0;
|
||||
@ -1827,6 +1830,133 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
function StringListToString(List: TStrings; FromIndex, ToIndex: integer;
|
||||
IgnoreEmptyLines: boolean): string;
|
||||
// concatenates strings with #10 characters
|
||||
// and quotes strings containing #10 with '
|
||||
var
|
||||
Size: PtrInt;
|
||||
i: PtrInt;
|
||||
s: string;
|
||||
j: PtrInt;
|
||||
p: PtrInt;
|
||||
begin
|
||||
if (List=nil) or (FromIndex>ToIndex) or (FromIndex>=List.Count) then begin
|
||||
Result:='';
|
||||
exit;
|
||||
end;
|
||||
if FromIndex<0 then FromIndex:=0;
|
||||
if ToIndex>=List.Count then ToIndex:=List.Count-1;
|
||||
// calculate size
|
||||
Size:=0;
|
||||
for i:=FromIndex to ToIndex do begin
|
||||
s:=List[i];
|
||||
if IgnoreEmptyLines and (s='') then continue;
|
||||
if Size>0 then
|
||||
inc(Size);// adding #10 as delimiter
|
||||
inc(Size,length(s));
|
||||
if System.Pos(#10,s)>0 then begin
|
||||
inc(Size,2);
|
||||
for j:=1 to length(s) do begin
|
||||
if s[j]='''' then
|
||||
inc(Size);
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
// build string
|
||||
SetLength(Result,Size);
|
||||
p:=1;
|
||||
for i:=FromIndex to ToIndex do begin
|
||||
s:=List[i];
|
||||
if IgnoreEmptyLines and (s='') then continue;
|
||||
if p>1 then begin
|
||||
Result[p]:=#10;
|
||||
inc(p);
|
||||
end;
|
||||
if System.Pos(#10,s)<1 then begin
|
||||
// just copy the string
|
||||
if s<>'' then begin
|
||||
System.Move(s[1],Result[p],length(s));
|
||||
inc(p,length(s));
|
||||
end;
|
||||
end else begin
|
||||
// quote
|
||||
Result[p]:='''';
|
||||
inc(p);
|
||||
for j:=1 to length(s) do begin
|
||||
if s[p]='''' then begin
|
||||
Result[p]:='''';
|
||||
inc(p);
|
||||
end;
|
||||
Result[p]:=s[j];
|
||||
inc(p);
|
||||
end;
|
||||
Result[p]:='''';
|
||||
inc(p);
|
||||
end;
|
||||
end;
|
||||
//DebugLn(['StringListToString ',dbgstr(Result),' ',Size,' ',p]);
|
||||
if Size<>p-1 then
|
||||
RaiseException('StringListToString');
|
||||
end;
|
||||
|
||||
procedure StringToStringList(const s: string; List: TStrings);
|
||||
var
|
||||
p: PtrInt;
|
||||
LineStartPos: PtrInt;
|
||||
Size: PtrInt;
|
||||
DstPos: PtrInt;
|
||||
Line: string;
|
||||
begin
|
||||
if s='' then exit;
|
||||
p:=1;
|
||||
while true do begin
|
||||
if s[p]='''' then begin
|
||||
// quoted
|
||||
Size:=0;
|
||||
inc(p);
|
||||
LineStartPos:=p;
|
||||
while p<=length(s) do begin
|
||||
if (s[p]='''') then begin
|
||||
inc(p);
|
||||
if (p>length(s)) or (s[p]<>'''') then break;
|
||||
end;
|
||||
inc(Size);
|
||||
inc(p);
|
||||
end;
|
||||
SetLength(Line,Size);
|
||||
p:=LineStartPos;
|
||||
DstPos:=1;
|
||||
while p<=length(s) do begin
|
||||
if (s[p]='''') then begin
|
||||
inc(p);
|
||||
if (p>length(s)) or (s[p]<>'''') then break;
|
||||
end;
|
||||
Line[DstPos]:=s[p];
|
||||
inc(DstPos);
|
||||
inc(p);
|
||||
end;
|
||||
List.Add(Line);
|
||||
// skip line end
|
||||
if p>length(s) then exit;
|
||||
if s[p]=#10 then
|
||||
inc(p);
|
||||
end else begin
|
||||
// just copy the string
|
||||
LineStartPos:=p;
|
||||
while (p<=length(s)) and (s[p]<>#10) do inc(p);
|
||||
List.Add(copy(s,LineStartPos,p-LineStartPos));
|
||||
// skip line end
|
||||
if p>length(s) then exit;
|
||||
inc(p);
|
||||
end;
|
||||
if p>length(s) then begin
|
||||
List.Add('');
|
||||
exit;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
{-------------------------------------------------------------------------------
|
||||
NameToValidIdentifier
|
||||
|
||||
|
17
ide/main.pp
17
ide/main.pp
@ -9601,6 +9601,7 @@ var
|
||||
DirectiveList: TStringList;
|
||||
CodeResult: Boolean;
|
||||
BuildFileDialog: TBuildFileDialog;
|
||||
s: String;
|
||||
begin
|
||||
Result:=mrCancel;
|
||||
if not BeginCodeTool(ActiveSrcEdit,ActiveUnitInfo,[]) then exit;
|
||||
@ -9622,6 +9623,7 @@ begin
|
||||
BuildFileDialog.Filename:=
|
||||
CreateRelativePath(ActiveUnitInfo.Filename,Project1.ProjectDirectory);
|
||||
if BuildFileDialog.ShowModal<>mrOk then begin
|
||||
DebugLn(['TMainIDE.DoConfigBuildFile cancelled']);
|
||||
Result:=mrCancel;
|
||||
exit;
|
||||
end;
|
||||
@ -9631,6 +9633,8 @@ begin
|
||||
BuildFileDialog.Free;
|
||||
end;
|
||||
|
||||
//DebugLn(['TMainIDE.DoConfigBuildFile ',ActiveUnitInfo.Filename,' ',DirectiveList.DelimitedText]);
|
||||
|
||||
// save IDE directives
|
||||
if FilenameIsPascalSource(ActiveUnitInfo.Filename) then begin
|
||||
// parse source for IDE directives (i.e. % comments)
|
||||
@ -9643,8 +9647,11 @@ begin
|
||||
end;
|
||||
|
||||
end else begin
|
||||
// ToDo: load .lfi file
|
||||
exit;
|
||||
s:=StringListToString(DirectiveList,0,DirectiveList.Count-1,true);
|
||||
if ActiveUnitInfo.CustomData['IDEDirectives']<>s then begin
|
||||
ActiveUnitInfo.CustomData['IDEDirectives']:=s;
|
||||
ActiveUnitInfo.Modified:=true;
|
||||
end;
|
||||
end;
|
||||
|
||||
finally
|
||||
@ -9668,11 +9675,7 @@ begin
|
||||
exit;
|
||||
end;
|
||||
end else begin
|
||||
// ToDo: load .lfi file
|
||||
MessageDlg('Not implemented',
|
||||
'Sorry, IDE directives are only implemented for pascal sources',
|
||||
mtInformation,[mbCancel],0);
|
||||
exit;
|
||||
StringToStringList(AnUnitInfo.CustomData['IDEDirectives'],DirectiveList);
|
||||
end;
|
||||
Result:=mrOk;
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user