From beaa987f5399d4597d3fd7ffed5598df3638099d Mon Sep 17 00:00:00 2001 From: skalogryz Date: Sat, 1 May 2010 07:43:58 +0000 Subject: [PATCH] iphonelazext: removed 'is iPhone project' menu item, updates in project options frame, fixed XCode to Xcode (in env options) git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@1208 8e941d3f-bd1b-0410-a28a-d453659cc2b4 --- .../environment_iphone_options.lfm | 45 +++++----- .../environment_iphone_options.lrs | 84 ++++++++--------- components/iphonelazext/ideext.pas | 14 +-- components/iphonelazext/iphoneextoptions.pas | 6 +- .../iphonelazext/project_iphone_options.lfm | 1 + .../iphonelazext/project_iphone_options.lrs | 89 ++++++++++--------- .../iphonelazext/project_iphone_options.pas | 21 ++++- 7 files changed, 143 insertions(+), 117 deletions(-) diff --git a/components/iphonelazext/environment_iphone_options.lfm b/components/iphonelazext/environment_iphone_options.lfm index aad457985..613e95fdf 100644 --- a/components/iphonelazext/environment_iphone_options.lfm +++ b/components/iphonelazext/environment_iphone_options.lfm @@ -1,12 +1,11 @@ -object iPhoneSpecificOptions: TiPhoneSpecificOptions - Left = 0 +inherited iPhoneSpecificOptions: TiPhoneSpecificOptions Height = 473 - Top = 0 Width = 487 ClientHeight = 473 ClientWidth = 487 - LCLVersion = '0.9.29' - object lblRTLUtils: TLabel + DesignLeft = 567 + DesignTop = 313 + object lblRTLUtils: TLabel[0] Left = 16 Height = 18 Top = 184 @@ -14,7 +13,7 @@ object iPhoneSpecificOptions: TiPhoneSpecificOptions Caption = 'RTL units path' ParentColor = False end - object lblCompilerPath: TLabel + object lblCompilerPath: TLabel[1] Left = 16 Height = 18 Top = 152 @@ -22,7 +21,7 @@ object iPhoneSpecificOptions: TiPhoneSpecificOptions Caption = 'Compiler' ParentColor = False end - object edtCompilerPath: TEdit + object edtCompilerPath: TEdit[2] Left = 136 Height = 22 Top = 152 @@ -31,16 +30,16 @@ object iPhoneSpecificOptions: TiPhoneSpecificOptions TabOrder = 0 Text = 'edtCompilerPath' end - object lblXCodeProject: TLabel + object lblXCodeProject: TLabel[3] Left = 16 Height = 18 Top = 128 - Width = 395 - Caption = 'Specific ARM compiler settings (for generated XCode projects)' + Width = 394 + Caption = 'Specific ARM compiler settings (for generated Xcode projects)' ParentColor = False ParentFont = False end - object edtRTLPath: TEdit + object edtRTLPath: TEdit[4] Left = 136 Height = 22 Top = 184 @@ -49,7 +48,7 @@ object iPhoneSpecificOptions: TiPhoneSpecificOptions TabOrder = 1 Text = 'edtRTLPath' end - object edtCompilerOptions: TEdit + object edtCompilerOptions: TEdit[5] Left = 136 Height = 22 Top = 216 @@ -59,7 +58,7 @@ object iPhoneSpecificOptions: TiPhoneSpecificOptions TabOrder = 2 Text = 'edtCompilerOptions' end - object lblCmpOptions: TLabel + object lblCmpOptions: TLabel[6] Left = 16 Height = 18 Top = 216 @@ -69,7 +68,7 @@ object iPhoneSpecificOptions: TiPhoneSpecificOptions ParentFont = False OnClick = lblCmpOptionsClick end - object Label5: TLabel + object Label5: TLabel[7] Left = 16 Height = 18 Top = 16 @@ -78,7 +77,7 @@ object iPhoneSpecificOptions: TiPhoneSpecificOptions ParentColor = False ParentFont = False end - object edtPlatformsPath: TEdit + object edtPlatformsPath: TEdit[8] Left = 125 Height = 22 Top = 16 @@ -87,7 +86,7 @@ object iPhoneSpecificOptions: TiPhoneSpecificOptions TabOrder = 3 Text = 'edtPlatformsPath' end - object lblSimSettings: TLabel + object lblSimSettings: TLabel[9] Left = 16 Height = 18 Top = 256 @@ -95,7 +94,7 @@ object iPhoneSpecificOptions: TiPhoneSpecificOptions Caption = 'iPhone Simulator settings' ParentColor = False end - object edtSimBundle: TEdit + object edtSimBundle: TEdit[10] Left = 160 Height = 22 Top = 286 @@ -104,7 +103,7 @@ object iPhoneSpecificOptions: TiPhoneSpecificOptions TabOrder = 4 Text = 'edtSimBundle' end - object edtSimApps: TEdit + object edtSimApps: TEdit[11] Left = 160 Height = 22 Top = 318 @@ -113,7 +112,7 @@ object iPhoneSpecificOptions: TiPhoneSpecificOptions TabOrder = 5 Text = 'edtSimApps' end - object lblSimBundle: TLabel + object lblSimBundle: TLabel[12] Left = 16 Height = 18 Top = 287 @@ -121,7 +120,7 @@ object iPhoneSpecificOptions: TiPhoneSpecificOptions Caption = 'iPhoneSim bundle' ParentColor = False end - object lblSimAppPath: TLabel + object lblSimAppPath: TLabel[13] Left = 16 Height = 18 Top = 318 @@ -129,7 +128,7 @@ object iPhoneSpecificOptions: TiPhoneSpecificOptions Caption = 'Sim Applications path:' ParentColor = False end - object Button1: TButton + object Button1: TButton[14] Left = 16 Height = 20 Top = 56 @@ -139,7 +138,7 @@ object iPhoneSpecificOptions: TiPhoneSpecificOptions OnClick = Button1Click TabOrder = 6 end - object Label1: TLabel + object Label1: TLabel[15] Left = 16 Height = 18 Top = 88 @@ -147,7 +146,7 @@ object iPhoneSpecificOptions: TiPhoneSpecificOptions Caption = 'Default SDK version:' ParentColor = False end - object cmbDefaultSDK: TComboBox + object cmbDefaultSDK: TComboBox[16] Left = 152 Height = 20 Top = 88 diff --git a/components/iphonelazext/environment_iphone_options.lrs b/components/iphonelazext/environment_iphone_options.lrs index b8a9936ae..c2041efc8 100644 --- a/components/iphonelazext/environment_iphone_options.lrs +++ b/components/iphonelazext/environment_iphone_options.lrs @@ -1,45 +1,47 @@ { This is an automatically generated lazarus resource file } LazarusResources.Add('TiPhoneSpecificOptions','FORMDATA',[ - 'TPF0'#22'TiPhoneSpecificOptions'#21'iPhoneSpecificOptions'#4'Left'#2#0#6'Hei' - +'ght'#3#217#1#3'Top'#2#0#5'Width'#3#231#1#12'ClientHeight'#3#217#1#11'Client' - +'Width'#3#231#1#10'LCLVersion'#6#6'0.9.29'#0#6'TLabel'#11'lblRTLUtils'#4'Lef' - +'t'#2#16#6'Height'#2#18#3'Top'#3#184#0#5'Width'#2'\'#7'Caption'#6#14'RTL uni' - +'ts path'#11'ParentColor'#8#0#0#6'TLabel'#15'lblCompilerPath'#4'Left'#2#16#6 - +'Height'#2#18#3'Top'#3#152#0#5'Width'#2'7'#7'Caption'#6#8'Compiler'#11'Paren' - +'tColor'#8#0#0#5'TEdit'#15'edtCompilerPath'#4'Left'#3#136#0#6'Height'#2#22#3 - +'Top'#3#152#0#5'Width'#3'J'#1#7'Anchors'#11#5'akTop'#6'akLeft'#7'akRight'#0#8 - +'TabOrder'#2#0#4'Text'#6#15'edtCompilerPath'#0#0#6'TLabel'#15'lblXCodeProjec' - +'t'#4'Left'#2#16#6'Height'#2#18#3'Top'#3#128#0#5'Width'#3#139#1#7'Caption'#6 - +'=Specific ARM compiler settings (for generated XCode projects)'#11'ParentCo' - +'lor'#8#10'ParentFont'#8#0#0#5'TEdit'#10'edtRTLPath'#4'Left'#3#136#0#6'Heigh' - +'t'#2#22#3'Top'#3#184#0#5'Width'#3'J'#1#7'Anchors'#11#5'akTop'#6'akLeft'#7'a' - +'kRight'#0#8'TabOrder'#2#1#4'Text'#6#10'edtRTLPath'#0#0#5'TEdit'#18'edtCompi' - +'lerOptions'#4'Left'#3#136#0#6'Height'#2#22#3'Top'#3#216#0#5'Width'#3'J'#1#7 - +'Anchors'#11#5'akTop'#6'akLeft'#7'akRight'#0#8'OnChange'#7#24'edtCompilerOpt' - +'ionsChange'#8'TabOrder'#2#2#4'Text'#6#18'edtCompilerOptions'#0#0#6'TLabel' - +#13'lblCmpOptions'#4'Left'#2#16#6'Height'#2#18#3'Top'#3#216#0#5'Width'#2'j'#7 - +'Caption'#6#16'Compiler options'#11'ParentColor'#8#10'ParentFont'#8#7'OnClic' - +'k'#7#18'lblCmpOptionsClick'#0#0#6'TLabel'#6'Label5'#4'Left'#2#16#6'Height'#2 - +#18#3'Top'#2#16#5'Width'#2'a'#7'Caption'#6#15'Platforms path:'#11'ParentColo' - +'r'#8#10'ParentFont'#8#0#0#5'TEdit'#16'edtPlatformsPath'#4'Left'#2'}'#6'Heig' - +'ht'#2#22#3'Top'#2#16#5'Width'#3'U'#1#7'Anchors'#11#5'akTop'#6'akLeft'#7'akR' - +'ight'#0#8'TabOrder'#2#3#4'Text'#6#16'edtPlatformsPath'#0#0#6'TLabel'#14'lbl' - +'SimSettings'#4'Left'#2#16#6'Height'#2#18#3'Top'#3#0#1#5'Width'#3#161#0#7'Ca' - +'ption'#6#25'iPhone Simulator settings'#11'ParentColor'#8#0#0#5'TEdit'#12'ed' - +'tSimBundle'#4'Left'#3#160#0#6'Height'#2#22#3'Top'#3#30#1#5'Width'#3'2'#1#7 - +'Anchors'#11#5'akTop'#6'akLeft'#7'akRight'#0#8'TabOrder'#2#4#4'Text'#6#12'ed' - +'tSimBundle'#0#0#5'TEdit'#10'edtSimApps'#4'Left'#3#160#0#6'Height'#2#22#3'To' - +'p'#3'>'#1#5'Width'#3'2'#1#7'Anchors'#11#5'akTop'#6'akLeft'#7'akRight'#0#8'T' - +'abOrder'#2#5#4'Text'#6#10'edtSimApps'#0#0#6'TLabel'#12'lblSimBundle'#4'Left' - +#2#16#6'Height'#2#18#3'Top'#3#31#1#5'Width'#2'o'#7'Caption'#6#16'iPhoneSim b' - +'undle'#11'ParentColor'#8#0#0#6'TLabel'#13'lblSimAppPath'#4'Left'#2#16#6'Hei' - +'ght'#2#18#3'Top'#3'>'#1#5'Width'#3#141#0#7'Caption'#6#22'Sim Applications p' - +'ath:'#11'ParentColor'#8#0#0#7'TButton'#7'Button1'#4'Left'#2#16#6'Height'#2 - +#20#3'Top'#2'8'#5'Width'#2'p'#8'AutoSize'#9#7'Caption'#6#13'Scan for SDKs'#7 - +'OnClick'#7#12'Button1Click'#8'TabOrder'#2#6#0#0#6'TLabel'#6'Label1'#4'Left' - +#2#16#6'Height'#2#18#3'Top'#2'X'#5'Width'#3#129#0#7'Caption'#6#20'Default SD' - +'K version:'#11'ParentColor'#8#0#0#9'TComboBox'#13'cmbDefaultSDK'#4'Left'#3 - +#152#0#6'Height'#2#20#3'Top'#2'X'#5'Width'#3#194#0#10'ItemHeight'#2#0#5'Styl' - +'e'#7#14'csDropDownList'#8'TabOrder'#2#7#0#0#0 + 'TPF0'#241#22'TiPhoneSpecificOptions'#21'iPhoneSpecificOptions'#6'Height'#3 + +#217#1#5'Width'#3#231#1#12'ClientHeight'#3#217#1#11'ClientWidth'#3#231#1#10 + +'DesignLeft'#3'7'#2#9'DesignTop'#3'9'#1#0#242#2#0#6'TLabel'#11'lblRTLUtils'#4 + +'Left'#2#16#6'Height'#2#18#3'Top'#3#184#0#5'Width'#2'\'#7'Caption'#6#14'RTL ' + +'units path'#11'ParentColor'#8#0#0#242#2#1#6'TLabel'#15'lblCompilerPath'#4'L' + +'eft'#2#16#6'Height'#2#18#3'Top'#3#152#0#5'Width'#2'7'#7'Caption'#6#8'Compil' + +'er'#11'ParentColor'#8#0#0#242#2#2#5'TEdit'#15'edtCompilerPath'#4'Left'#3#136 + +#0#6'Height'#2#22#3'Top'#3#152#0#5'Width'#3'J'#1#7'Anchors'#11#5'akTop'#6'ak' + +'Left'#7'akRight'#0#8'TabOrder'#2#0#4'Text'#6#15'edtCompilerPath'#0#0#242#2#3 + +#6'TLabel'#15'lblXCodeProject'#4'Left'#2#16#6'Height'#2#18#3'Top'#3#128#0#5 + +'Width'#3#138#1#7'Caption'#6'=Specific ARM compiler settings (for generated ' + +'Xcode projects)'#11'ParentColor'#8#10'ParentFont'#8#0#0#242#2#4#5'TEdit'#10 + +'edtRTLPath'#4'Left'#3#136#0#6'Height'#2#22#3'Top'#3#184#0#5'Width'#3'J'#1#7 + +'Anchors'#11#5'akTop'#6'akLeft'#7'akRight'#0#8'TabOrder'#2#1#4'Text'#6#10'ed' + +'tRTLPath'#0#0#242#2#5#5'TEdit'#18'edtCompilerOptions'#4'Left'#3#136#0#6'Hei' + +'ght'#2#22#3'Top'#3#216#0#5'Width'#3'J'#1#7'Anchors'#11#5'akTop'#6'akLeft'#7 + +'akRight'#0#8'OnChange'#7#24'edtCompilerOptionsChange'#8'TabOrder'#2#2#4'Tex' + +'t'#6#18'edtCompilerOptions'#0#0#242#2#6#6'TLabel'#13'lblCmpOptions'#4'Left' + +#2#16#6'Height'#2#18#3'Top'#3#216#0#5'Width'#2'j'#7'Caption'#6#16'Compiler o' + +'ptions'#11'ParentColor'#8#10'ParentFont'#8#7'OnClick'#7#18'lblCmpOptionsCli' + +'ck'#0#0#242#2#7#6'TLabel'#6'Label5'#4'Left'#2#16#6'Height'#2#18#3'Top'#2#16 + +#5'Width'#2'a'#7'Caption'#6#15'Platforms path:'#11'ParentColor'#8#10'ParentF' + +'ont'#8#0#0#242#2#8#5'TEdit'#16'edtPlatformsPath'#4'Left'#2'}'#6'Height'#2#22 + +#3'Top'#2#16#5'Width'#3'U'#1#7'Anchors'#11#5'akTop'#6'akLeft'#7'akRight'#0#8 + +'TabOrder'#2#3#4'Text'#6#16'edtPlatformsPath'#0#0#242#2#9#6'TLabel'#14'lblSi' + +'mSettings'#4'Left'#2#16#6'Height'#2#18#3'Top'#3#0#1#5'Width'#3#161#0#7'Capt' + +'ion'#6#25'iPhone Simulator settings'#11'ParentColor'#8#0#0#242#2#10#5'TEdit' + +#12'edtSimBundle'#4'Left'#3#160#0#6'Height'#2#22#3'Top'#3#30#1#5'Width'#3'2' + +#1#7'Anchors'#11#5'akTop'#6'akLeft'#7'akRight'#0#8'TabOrder'#2#4#4'Text'#6#12 + +'edtSimBundle'#0#0#242#2#11#5'TEdit'#10'edtSimApps'#4'Left'#3#160#0#6'Height' + +#2#22#3'Top'#3'>'#1#5'Width'#3'2'#1#7'Anchors'#11#5'akTop'#6'akLeft'#7'akRig' + +'ht'#0#8'TabOrder'#2#5#4'Text'#6#10'edtSimApps'#0#0#242#2#12#6'TLabel'#12'lb' + +'lSimBundle'#4'Left'#2#16#6'Height'#2#18#3'Top'#3#31#1#5'Width'#2'o'#7'Capti' + +'on'#6#16'iPhoneSim bundle'#11'ParentColor'#8#0#0#242#2#13#6'TLabel'#13'lblS' + +'imAppPath'#4'Left'#2#16#6'Height'#2#18#3'Top'#3'>'#1#5'Width'#3#141#0#7'Cap' + +'tion'#6#22'Sim Applications path:'#11'ParentColor'#8#0#0#242#2#14#7'TButton' + +#7'Button1'#4'Left'#2#16#6'Height'#2#20#3'Top'#2'8'#5'Width'#2'p'#8'AutoSize' + +#9#7'Caption'#6#13'Scan for SDKs'#7'OnClick'#7#12'Button1Click'#8'TabOrder'#2 + +#6#0#0#242#2#15#6'TLabel'#6'Label1'#4'Left'#2#16#6'Height'#2#18#3'Top'#2'X'#5 + +'Width'#3#129#0#7'Caption'#6#20'Default SDK version:'#11'ParentColor'#8#0#0 + +#242#2#16#9'TComboBox'#13'cmbDefaultSDK'#4'Left'#3#152#0#6'Height'#2#20#3'To' + +'p'#2'X'#5'Width'#3#194#0#10'ItemHeight'#2#0#5'Style'#7#14'csDropDownList'#8 + +'TabOrder'#2#7#0#0#0 ]); diff --git a/components/iphonelazext/ideext.pas b/components/iphonelazext/ideext.pas index 37dcdc3d6..d014f37aa 100644 --- a/components/iphonelazext/ideext.pas +++ b/components/iphonelazext/ideext.pas @@ -48,11 +48,11 @@ type function ProjectOpened(Sender: TObject; AProject: TLazProject): TModalResult; procedure OnProjOptionsChanged(Sender: TObject); public - isiPhoneMenu :TIDEMenuCommand; + //isiPhoneMenu :TIDEMenuCommand; constructor Create; procedure UpdateXCode(Sender: TObject); procedure SimRun(Sender: TObject); - procedure isProjectClicked(Sender: TObject); + //procedure isProjectClicked(Sender: TObject); end; var @@ -249,7 +249,7 @@ begin RegisterIDEMenuCommand(itmProjectWindowSection, 'mnuiPhoneSeparator', '-', nil, nil); - isiPhoneMenu:=RegisterIDEMenuCommand(itmProjectWindowSection, 'mnuiPhoneProject', striPhoneProject, @isProjectClicked, nil); + //isiPhoneMenu:=RegisterIDEMenuCommand(itmProjectWindowSection, 'mnuiPhoneProject', striPhoneProject, @isProjectClicked, nil); RegisterIDEMenuCommand(itmProjectWindowSection, 'mnuiPhoneToXCode', strStartAtXCode, @UpdateXCode, nil); RegisterIDEMenuCommand(itmProjectWindowSection, 'mnuiPhoneRunSim', strRunSimulator, @SimRun, nil); @@ -275,7 +275,7 @@ function TiPhoneExtension.ProjectOpened(Sender: TObject; AProject: TLazProject): begin ProjOptions.Reset; ProjOptions.Load; - isiPhoneMenu.Checked:=ProjOptions.isIPhoneApp; + //isiPhoneMenu.Checked:=ProjOptions.isIPhoneApp; Result:=mrOk; end; @@ -336,7 +336,7 @@ end; procedure TiPhoneExtension.OnProjOptionsChanged(Sender: TObject); begin - isiPhoneMenu.Checked:=ProjOptions.isIPhoneApp; + //isiPhoneMenu.Checked:=ProjOptions.isIPhoneApp; end; procedure TiPhoneExtension.UpdateXCode(Sender: TObject); @@ -466,13 +466,13 @@ begin t.Free; end; -procedure TiPhoneExtension.isProjectClicked(Sender: TObject); +{procedure TiPhoneExtension.isProjectClicked(Sender: TObject); begin if not Assigned(Sender) or not Assigned(LazarusIDE.ActiveProject) then Exit; TIDEMenuCommand(Sender).Checked:=not TIDEMenuCommand(Sender).Checked; ProjOptions.isiPhoneApp:=TIDEMenuCommand(Sender).Checked; ProjOptions.Save; -end; +end;} procedure Register; begin diff --git a/components/iphonelazext/iphoneextoptions.pas b/components/iphonelazext/iphoneextoptions.pas index 324c55745..b980b0c68 100644 --- a/components/iphonelazext/iphoneextoptions.pas +++ b/components/iphonelazext/iphoneextoptions.pas @@ -22,6 +22,9 @@ interface uses Classes, SysUtils, IDEOptionsIntf, LazIDEIntf, ProjectIntf, iPhoneBundle, DOM, XMLRead, XMLConf, PlistFile; +const + DefaultResourceDir = 'Resources'; + type { TiPhoneProjectOptions } @@ -381,7 +384,8 @@ begin if CustomData.Contains(optAppID) then fAppID:=CustomData.Values[optAppID]; fSpaceName:=CustomData.Values[optSpaceName]; if fSpaceName='' then fSpaceName:=RandomSpaceName; - if CustomData.Contains(optResourceDir) then fResourceDir:=CustomData.Values[optResourceDir]; + if CustomData.Contains(optResourceDir) then fResourceDir:=CustomData.Values[optResourceDir] + else fResourceDir:=DefaultResourceDir; if CustomData.Contains(optExcludeMask) then fExcludeMask:=CustomData.Values[optExcludeMask]; if CustomData.Contains(optMainNib) then fMainNib:=CustomData.Values[optMainNib]; end; diff --git a/components/iphonelazext/project_iphone_options.lfm b/components/iphonelazext/project_iphone_options.lfm index 58114614d..f916d7b10 100644 --- a/components/iphonelazext/project_iphone_options.lfm +++ b/components/iphonelazext/project_iphone_options.lfm @@ -12,6 +12,7 @@ inherited iPhoneProjectOptionsEditor: TiPhoneProjectOptionsEditor Top = 16 Width = 199 Caption = 'is iPhone application project' + OnChange = chkisPhoneChange TabOrder = 0 end object lblAppID: TLabel[1] diff --git a/components/iphonelazext/project_iphone_options.lrs b/components/iphonelazext/project_iphone_options.lrs index a0a121952..efc3d00f9 100644 --- a/components/iphonelazext/project_iphone_options.lrs +++ b/components/iphonelazext/project_iphone_options.lrs @@ -5,48 +5,49 @@ LazarusResources.Add('TiPhoneProjectOptionsEditor','FORMDATA',[ +'eight'#3#218#1#5'Width'#3'l'#2#12'ClientHeight'#3#218#1#11'ClientWidth'#3'l' +#2#7'OnClick'#7#10'FrameClick'#10'DesignLeft'#3'c'#2#9'DesignTop'#3#128#0#0 +#242#2#0#9'TCheckBox'#10'chkisPhone'#4'Left'#2#16#6'Height'#2#18#3'Top'#2#16 - +#5'Width'#3#199#0#7'Caption'#6#29'is iPhone application project'#8'TabOrder' - +#2#0#0#0#242#2#1#6'TLabel'#8'lblAppID'#4'Left'#2#16#6'Height'#2#18#3'Top'#2 - +'X'#5'Width'#2'W'#7'Caption'#6#14'Application ID'#11'ParentColor'#8#0#0#242#2 - +#2#5'TEdit'#8'edtAppID'#4'Left'#2'p'#6'Height'#2#22#3'Top'#2'U'#5'Width'#3 - +#234#1#7'Anchors'#11#5'akTop'#6'akLeft'#7'akRight'#0#8'TabOrder'#2#1#4'Text' - +#6#19'com.mycompany.myapp'#0#0#242#2#3#6'TLabel'#12'lblAppIDHint'#4'Left'#2 - +#16#6'Height'#2#14#3'Top'#2'u'#5'Width'#3#237#1#7'Caption'#6'_It''s recommen' - +'ded by Apple to use domain-structured name, i.e. com.mycompany.myApplicatio' - +'n as ID'#11'Font.Height'#2#246#11'ParentColor'#8#10'ParentFont'#8#0#0#242#2 - +#4#6'TLabel'#9'lblSDKVer'#4'Left'#2#16#6'Height'#2#18#3'Top'#2'3'#5'Width'#2 - +'P'#7'Caption'#6#12'SDK version:'#11'ParentColor'#8#0#0#242#2#5#9'TComboBox' - +#7'cmbSDKs'#4'Left'#2'p'#6'Height'#2#20#3'Top'#2'0'#5'Width'#3#184#0#10'Item' - +'Height'#2#0#8'OnChange'#7#13'cmbSDKsChange'#5'Style'#7#14'csDropDownList'#8 - +'TabOrder'#2#2#0#0#242#2#6#5'TEdit'#9'edtResDir'#23'AnchorSideRight.Control' - +#7#15'btnShowInFinder'#4'Left'#2'x'#6'Height'#2#22#3'Top'#3#174#0#5'Width'#3 - +'c'#1#7'Anchors'#11#5'akTop'#6'akLeft'#7'akRight'#0#19'BorderSpacing.Right'#2 - +#10#8'OnChange'#7#15'edtResDirChange'#6'OnExit'#7#13'edtResDirExit'#8'TabOrd' - +'er'#2#3#4'Text'#6#9'Resources'#0#0#242#2#7#6'TLabel'#6'Label1'#4'Left'#2#16 - +#6'Height'#2#18#3'Top'#3#176#0#5'Width'#2'Y'#7'Caption'#6#14'Resources dir:' - +#11'ParentColor'#8#0#0#242#2#8#5'TEdit'#10'edtExclude'#4'Left'#2'x'#6'Height' - +#2#22#3'Top'#3#224#0#5'Width'#3#226#1#7'Anchors'#11#5'akTop'#6'akLeft'#7'akR' - +'ight'#0#8'OnChange'#7#16'edtExcludeChange'#8'TabOrder'#2#4#4'Text'#6#4'.svn' - +#0#0#242#2#9#6'TLabel'#6'Label2'#4'Left'#2#16#6'Height'#2#18#3'Top'#3#224#0#5 - +'Width'#2'Q'#7'Caption'#6#12'Ignore mask:'#11'ParentColor'#8#0#0#242#2#10#6 - +'TLabel'#6'Label3'#4'Left'#2#16#6'Height'#2#14#3'Top'#3#200#0#5'Width'#3'l'#1 - +#7'Caption'#6'NIt''s recommended to set resource dir as a relative (to proje' - +'ct .lpr file) path'#11'Font.Height'#2#246#11'ParentColor'#8#10'ParentFont'#8 - +#0#0#242#2#11#6'TLabel'#6'Label4'#4'Left'#2#16#6'Height'#2#18#3'Top'#3#0#1#5 - +'Width'#2'6'#7'Caption'#6#10'Nib files:'#11'ParentColor'#8#0#0#242#2#12#13'T' - +'CheckListBox'#11'nibFilesBox'#4'Left'#2'x'#6'Height'#3#180#0#3'Top'#3#0#1#5 - +'Width'#3#226#1#7'Anchors'#11#5'akTop'#6'akLeft'#7'akRight'#8'akBottom'#0#10 - +'ItemHeight'#2#0#12'OnClickCheck'#7#21'nibFilesBoxClickCheck'#11'OnItemClick' - +#7#20'nibFilesBoxItemClick'#11'OnMouseDown'#7#20'nibFilesBoxMouseDown'#9'OnM' - +'ouseUp'#7#18'nibFilesBoxMouseUp'#9'PopupMenu'#7#9'nibsPopup'#8'TabOrder'#2#5 - +#0#0#242#2#13#6'TLabel'#6'Label5'#21'AnchorSideTop.Control'#7#11'nibFilesBox' - +#18'AnchorSideTop.Side'#7#9'asrBottom'#4'Left'#2'x'#6'Height'#2#14#3'Top'#3 - +#180#1#5'Width'#3#246#0#7'Caption'#6'2The checked one is the main Nib of the' - +' application'#11'Font.Height'#2#246#11'ParentColor'#8#10'ParentFont'#8#0#0 - +#242#2#14#7'TButton'#15'btnShowInFinder'#4'Left'#3#229#1#6'Height'#2#20#3'To' - +'p'#3#176#0#5'Width'#2'u'#7'Anchors'#11#5'akTop'#7'akRight'#0#8'AutoSize'#9#7 - +'Caption'#6#14'Show in Finder'#7'OnClick'#7#20'btnShowInFinderClick'#8'TabOr' - +'der'#2#6#0#0#242#2#15#10'TPopupMenu'#9'nibsPopup'#7'OnPopup'#7#14'nibsPopup' - +'Popup'#4'left'#3#0#1#3'top'#3' '#1#0#9'TMenuItem'#9'mnuOpenIB'#7'Caption'#6 - +#22'Open Interface Builder'#7'OnClick'#7#14'mnuOpenIBClick'#0#0#0#0 + +#5'Width'#3#199#0#7'Caption'#6#29'is iPhone application project'#8'OnChange' + +#7#16'chkisPhoneChange'#8'TabOrder'#2#0#0#0#242#2#1#6'TLabel'#8'lblAppID'#4 + +'Left'#2#16#6'Height'#2#18#3'Top'#2'X'#5'Width'#2'W'#7'Caption'#6#14'Applica' + +'tion ID'#11'ParentColor'#8#0#0#242#2#2#5'TEdit'#8'edtAppID'#4'Left'#2'p'#6 + +'Height'#2#22#3'Top'#2'U'#5'Width'#3#234#1#7'Anchors'#11#5'akTop'#6'akLeft'#7 + +'akRight'#0#8'TabOrder'#2#1#4'Text'#6#19'com.mycompany.myapp'#0#0#242#2#3#6 + +'TLabel'#12'lblAppIDHint'#4'Left'#2#16#6'Height'#2#14#3'Top'#2'u'#5'Width'#3 + +#237#1#7'Caption'#6'_It''s recommended by Apple to use domain-structured nam' + +'e, i.e. com.mycompany.myApplication as ID'#11'Font.Height'#2#246#11'ParentC' + +'olor'#8#10'ParentFont'#8#0#0#242#2#4#6'TLabel'#9'lblSDKVer'#4'Left'#2#16#6 + +'Height'#2#18#3'Top'#2'3'#5'Width'#2'P'#7'Caption'#6#12'SDK version:'#11'Par' + +'entColor'#8#0#0#242#2#5#9'TComboBox'#7'cmbSDKs'#4'Left'#2'p'#6'Height'#2#20 + +#3'Top'#2'0'#5'Width'#3#184#0#10'ItemHeight'#2#0#8'OnChange'#7#13'cmbSDKsCha' + +'nge'#5'Style'#7#14'csDropDownList'#8'TabOrder'#2#2#0#0#242#2#6#5'TEdit'#9'e' + +'dtResDir'#23'AnchorSideRight.Control'#7#15'btnShowInFinder'#4'Left'#2'x'#6 + +'Height'#2#22#3'Top'#3#174#0#5'Width'#3'c'#1#7'Anchors'#11#5'akTop'#6'akLeft' + +#7'akRight'#0#19'BorderSpacing.Right'#2#10#8'OnChange'#7#15'edtResDirChange' + +#6'OnExit'#7#13'edtResDirExit'#8'TabOrder'#2#3#4'Text'#6#9'Resources'#0#0#242 + +#2#7#6'TLabel'#6'Label1'#4'Left'#2#16#6'Height'#2#18#3'Top'#3#176#0#5'Width' + +#2'Y'#7'Caption'#6#14'Resources dir:'#11'ParentColor'#8#0#0#242#2#8#5'TEdit' + +#10'edtExclude'#4'Left'#2'x'#6'Height'#2#22#3'Top'#3#224#0#5'Width'#3#226#1#7 + +'Anchors'#11#5'akTop'#6'akLeft'#7'akRight'#0#8'OnChange'#7#16'edtExcludeChan' + +'ge'#8'TabOrder'#2#4#4'Text'#6#4'.svn'#0#0#242#2#9#6'TLabel'#6'Label2'#4'Lef' + +'t'#2#16#6'Height'#2#18#3'Top'#3#224#0#5'Width'#2'Q'#7'Caption'#6#12'Ignore ' + +'mask:'#11'ParentColor'#8#0#0#242#2#10#6'TLabel'#6'Label3'#4'Left'#2#16#6'He' + +'ight'#2#14#3'Top'#3#200#0#5'Width'#3'l'#1#7'Caption'#6'NIt''s recommended t' + +'o set resource dir as a relative (to project .lpr file) path'#11'Font.Heigh' + +'t'#2#246#11'ParentColor'#8#10'ParentFont'#8#0#0#242#2#11#6'TLabel'#6'Label4' + +#4'Left'#2#16#6'Height'#2#18#3'Top'#3#0#1#5'Width'#2'6'#7'Caption'#6#10'Nib ' + +'files:'#11'ParentColor'#8#0#0#242#2#12#13'TCheckListBox'#11'nibFilesBox'#4 + +'Left'#2'x'#6'Height'#3#180#0#3'Top'#3#0#1#5'Width'#3#226#1#7'Anchors'#11#5 + +'akTop'#6'akLeft'#7'akRight'#8'akBottom'#0#10'ItemHeight'#2#0#12'OnClickChec' + +'k'#7#21'nibFilesBoxClickCheck'#11'OnItemClick'#7#20'nibFilesBoxItemClick'#11 + +'OnMouseDown'#7#20'nibFilesBoxMouseDown'#9'OnMouseUp'#7#18'nibFilesBoxMouseU' + +'p'#9'PopupMenu'#7#9'nibsPopup'#8'TabOrder'#2#5#0#0#242#2#13#6'TLabel'#6'Lab' + +'el5'#21'AnchorSideTop.Control'#7#11'nibFilesBox'#18'AnchorSideTop.Side'#7#9 + +'asrBottom'#4'Left'#2'x'#6'Height'#2#14#3'Top'#3#180#1#5'Width'#3#246#0#7'Ca' + +'ption'#6'2The checked one is the main Nib of the application'#11'Font.Heigh' + +'t'#2#246#11'ParentColor'#8#10'ParentFont'#8#0#0#242#2#14#7'TButton'#15'btnS' + +'howInFinder'#4'Left'#3#229#1#6'Height'#2#20#3'Top'#3#176#0#5'Width'#2'u'#7 + +'Anchors'#11#5'akTop'#7'akRight'#0#8'AutoSize'#9#7'Caption'#6#14'Show in Fin' + +'der'#7'OnClick'#7#20'btnShowInFinderClick'#8'TabOrder'#2#6#0#0#242#2#15#10 + +'TPopupMenu'#9'nibsPopup'#7'OnPopup'#7#14'nibsPopupPopup'#4'left'#3#0#1#3'to' + +'p'#3' '#1#0#9'TMenuItem'#9'mnuOpenIB'#7'Caption'#6#22'Open Interface Builde' + +'r'#7'OnClick'#7#14'mnuOpenIBClick'#0#0#0#0 ]); diff --git a/components/iphonelazext/project_iphone_options.pas b/components/iphonelazext/project_iphone_options.pas index a99c89434..a902b92c9 100644 --- a/components/iphonelazext/project_iphone_options.pas +++ b/components/iphonelazext/project_iphone_options.pas @@ -46,6 +46,7 @@ type lblSDKVer: TLabel; nibsPopup:TPopupMenu; procedure btnShowInFinderClick(Sender:TObject); + procedure chkisPhoneChange(Sender:TObject); procedure cmbSDKsChange(Sender: TObject); procedure edtExcludeChange(Sender: TObject); procedure edtResDirChange(Sender:TObject); @@ -68,6 +69,8 @@ type procedure DoChanged; procedure RefreshXIBList; + + procedure SetControlsEnabled(AEnabled: Boolean); public { public declarations } class function SupportedOptionsClass: TAbstractIDEOptionsClass; override; @@ -135,6 +138,8 @@ begin if (path='') or (path[1]<>PathDelim) then // project relative path LazarusIDE.ActiveProject.LongenFilename(path); + ForceDirectoriesUTF8(path); + while (path<>'') and (not DirectoryExistsUTF8(path)) do begin tmp:=path; path:=ExtractFileDir(path); @@ -143,6 +148,11 @@ begin if DirectoryExistsUTF8(path) then ExecCmdLineNoWait('open "'+path +'"'); end; +procedure TiPhoneProjectOptionsEditor.chkisPhoneChange(Sender:TObject); +begin + SetControlsEnabled(chkisPhone.Checked); +end; + procedure TiPhoneProjectOptionsEditor.edtExcludeChange(Sender: TObject); begin @@ -262,6 +272,15 @@ begin end; end; +procedure TiPhoneProjectOptionsEditor.SetControlsEnabled(AEnabled:Boolean); +var + i : Integer; +begin + for i:=0 to ControlCount-1 do + if not (Controls[i] is TLabel) and (Controls[i]<>chkisPhone) then + Controls[i].Enabled:=AEnabled; +end; + function TiPhoneProjectOptionsEditor.GetTitle: String; begin Result:=strPrjOptTitle; @@ -279,7 +298,6 @@ procedure TiPhoneProjectOptionsEditor.ReadSettings(AOptions: TAbstractIDEOptions var i : Integer; begin - with TiPhoneProjectOptions(AOptions) do begin Load; @@ -300,6 +318,7 @@ begin i:=nibFilesBox.Items.IndexOf(TiPhoneProjectOptions(AOptions).MainNib); if i>=0 then nibFilesBox.Checked[i]:=True; end; + SetControlsEnabled(chkisPhone.Checked); // is iPhone project end; procedure TiPhoneProjectOptionsEditor.WriteSettings(AOptions: TAbstractIDEOptions);