You've already forked lazarus-ccr
iphonelazext: initiated support for building script. Added into environmental option. Changing registration process
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@5040 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
31
components/iphonelazext/def_buildscript.sh
Normal file
31
components/iphonelazext/def_buildscript.sh
Normal file
@ -0,0 +1,31 @@
|
||||
## start
|
||||
echo "compiling FPC project"
|
||||
|
||||
export RESULT_EXE=${BUILT_PRODUCTS_DIR}/${EXECUTABLE_PATH}
|
||||
export IOSHEADERS=
|
||||
cd $FPC_MAIN_DIR
|
||||
#rm $RESULT_EXE
|
||||
export TargetCPU=${PLATFORM_PREFERRED_ARCH}
|
||||
|
||||
if [ "${PLATFORM_NAME}" == "iphonesimulator" ]; then
|
||||
export TargetOS="iphonesim"
|
||||
fi
|
||||
export Target=${TargetCPU}-${TargetOS}
|
||||
|
||||
pwd
|
||||
echo ${RESULT_EXE}
|
||||
|
||||
${FPC_DIR}fpc -T${TargetOS} -P${TargetCPU} -MDelphi -Scghi -O1 -l -dIPHONEALL \
|
||||
${FPC_CUSTOM_OPTIONS} \
|
||||
-Filib/${Target} -FUlib/${Target} \
|
||||
-XR${SDKROOT} -FD${PLATFORM_DEVELOPER_BIN_DIR} $FPC_MAIN_FILE \
|
||||
-o${RESULT_EXE}
|
||||
export RES=$?
|
||||
|
||||
if [ $RES != 0 ]; then
|
||||
exit $RES
|
||||
fi
|
||||
|
||||
echo ${RESULT_EXE}
|
||||
|
||||
exit $FPCRES
|
564
components/iphonelazext/environment_buildscript.lfm
Normal file
564
components/iphonelazext/environment_buildscript.lfm
Normal file
@ -0,0 +1,564 @@
|
||||
object TiPhoneBuildScriptEditor: TTiPhoneBuildScriptEditor
|
||||
Left = 0
|
||||
Height = 270
|
||||
Top = 0
|
||||
Width = 460
|
||||
ClientHeight = 270
|
||||
ClientWidth = 460
|
||||
Constraints.MinWidth = 200
|
||||
TabOrder = 0
|
||||
DesignLeft = 366
|
||||
DesignTop = 261
|
||||
object lblFileName: TLabel
|
||||
Left = 8
|
||||
Height = 15
|
||||
Top = 8
|
||||
Width = 70
|
||||
Caption = 'Template File'
|
||||
ParentColor = False
|
||||
end
|
||||
object scriptFileName: TFileNameEdit
|
||||
AnchorSideLeft.Control = lblFileName
|
||||
AnchorSideLeft.Side = asrBottom
|
||||
AnchorSideRight.Control = Owner
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 88
|
||||
Height = 23
|
||||
Top = 8
|
||||
Width = 362
|
||||
FileName = 'scriptFileName'
|
||||
FilterIndex = 0
|
||||
HideDirectories = False
|
||||
ButtonWidth = 23
|
||||
NumGlyphs = 1
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
BorderSpacing.Left = 10
|
||||
BorderSpacing.Right = 10
|
||||
MaxLength = 0
|
||||
TabOrder = 0
|
||||
Text = 'scriptFileName'
|
||||
end
|
||||
inline scriptEdit: TSynEdit
|
||||
AnchorSideTop.Control = lblScriptNote
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 0
|
||||
Height = 205
|
||||
Top = 65
|
||||
Width = 460
|
||||
Align = alBottom
|
||||
BorderSpacing.Top = 10
|
||||
Anchors = [akTop, akLeft, akRight, akBottom]
|
||||
Font.Height = -13
|
||||
Font.Name = 'Courier New'
|
||||
Font.Pitch = fpFixed
|
||||
Font.Quality = fqNonAntialiased
|
||||
ParentColor = False
|
||||
ParentFont = False
|
||||
TabOrder = 1
|
||||
Gutter.Width = 57
|
||||
Gutter.MouseActions = <>
|
||||
RightGutter.Width = 0
|
||||
RightGutter.MouseActions = <>
|
||||
Highlighter = SynUNIXShellScriptSyn1
|
||||
Keystrokes = <
|
||||
item
|
||||
Command = ecUp
|
||||
ShortCut = 38
|
||||
end
|
||||
item
|
||||
Command = ecSelUp
|
||||
ShortCut = 8230
|
||||
end
|
||||
item
|
||||
Command = ecScrollUp
|
||||
ShortCut = 16422
|
||||
end
|
||||
item
|
||||
Command = ecDown
|
||||
ShortCut = 40
|
||||
end
|
||||
item
|
||||
Command = ecSelDown
|
||||
ShortCut = 8232
|
||||
end
|
||||
item
|
||||
Command = ecScrollDown
|
||||
ShortCut = 16424
|
||||
end
|
||||
item
|
||||
Command = ecLeft
|
||||
ShortCut = 37
|
||||
end
|
||||
item
|
||||
Command = ecSelLeft
|
||||
ShortCut = 8229
|
||||
end
|
||||
item
|
||||
Command = ecWordLeft
|
||||
ShortCut = 16421
|
||||
end
|
||||
item
|
||||
Command = ecSelWordLeft
|
||||
ShortCut = 24613
|
||||
end
|
||||
item
|
||||
Command = ecRight
|
||||
ShortCut = 39
|
||||
end
|
||||
item
|
||||
Command = ecSelRight
|
||||
ShortCut = 8231
|
||||
end
|
||||
item
|
||||
Command = ecWordRight
|
||||
ShortCut = 16423
|
||||
end
|
||||
item
|
||||
Command = ecSelWordRight
|
||||
ShortCut = 24615
|
||||
end
|
||||
item
|
||||
Command = ecPageDown
|
||||
ShortCut = 34
|
||||
end
|
||||
item
|
||||
Command = ecSelPageDown
|
||||
ShortCut = 8226
|
||||
end
|
||||
item
|
||||
Command = ecPageBottom
|
||||
ShortCut = 16418
|
||||
end
|
||||
item
|
||||
Command = ecSelPageBottom
|
||||
ShortCut = 24610
|
||||
end
|
||||
item
|
||||
Command = ecPageUp
|
||||
ShortCut = 33
|
||||
end
|
||||
item
|
||||
Command = ecSelPageUp
|
||||
ShortCut = 8225
|
||||
end
|
||||
item
|
||||
Command = ecPageTop
|
||||
ShortCut = 16417
|
||||
end
|
||||
item
|
||||
Command = ecSelPageTop
|
||||
ShortCut = 24609
|
||||
end
|
||||
item
|
||||
Command = ecLineStart
|
||||
ShortCut = 36
|
||||
end
|
||||
item
|
||||
Command = ecSelLineStart
|
||||
ShortCut = 8228
|
||||
end
|
||||
item
|
||||
Command = ecEditorTop
|
||||
ShortCut = 16420
|
||||
end
|
||||
item
|
||||
Command = ecSelEditorTop
|
||||
ShortCut = 24612
|
||||
end
|
||||
item
|
||||
Command = ecLineEnd
|
||||
ShortCut = 35
|
||||
end
|
||||
item
|
||||
Command = ecSelLineEnd
|
||||
ShortCut = 8227
|
||||
end
|
||||
item
|
||||
Command = ecEditorBottom
|
||||
ShortCut = 16419
|
||||
end
|
||||
item
|
||||
Command = ecSelEditorBottom
|
||||
ShortCut = 24611
|
||||
end
|
||||
item
|
||||
Command = ecToggleMode
|
||||
ShortCut = 45
|
||||
end
|
||||
item
|
||||
Command = ecCopy
|
||||
ShortCut = 16429
|
||||
end
|
||||
item
|
||||
Command = ecPaste
|
||||
ShortCut = 8237
|
||||
end
|
||||
item
|
||||
Command = ecDeleteChar
|
||||
ShortCut = 46
|
||||
end
|
||||
item
|
||||
Command = ecCut
|
||||
ShortCut = 8238
|
||||
end
|
||||
item
|
||||
Command = ecDeleteLastChar
|
||||
ShortCut = 8
|
||||
end
|
||||
item
|
||||
Command = ecDeleteLastChar
|
||||
ShortCut = 8200
|
||||
end
|
||||
item
|
||||
Command = ecDeleteLastWord
|
||||
ShortCut = 16392
|
||||
end
|
||||
item
|
||||
Command = ecUndo
|
||||
ShortCut = 32776
|
||||
end
|
||||
item
|
||||
Command = ecRedo
|
||||
ShortCut = 40968
|
||||
end
|
||||
item
|
||||
Command = ecLineBreak
|
||||
ShortCut = 13
|
||||
end
|
||||
item
|
||||
Command = ecSelectAll
|
||||
ShortCut = 16449
|
||||
end
|
||||
item
|
||||
Command = ecCopy
|
||||
ShortCut = 16451
|
||||
end
|
||||
item
|
||||
Command = ecBlockIndent
|
||||
ShortCut = 24649
|
||||
end
|
||||
item
|
||||
Command = ecLineBreak
|
||||
ShortCut = 16461
|
||||
end
|
||||
item
|
||||
Command = ecInsertLine
|
||||
ShortCut = 16462
|
||||
end
|
||||
item
|
||||
Command = ecDeleteWord
|
||||
ShortCut = 16468
|
||||
end
|
||||
item
|
||||
Command = ecBlockUnindent
|
||||
ShortCut = 24661
|
||||
end
|
||||
item
|
||||
Command = ecPaste
|
||||
ShortCut = 16470
|
||||
end
|
||||
item
|
||||
Command = ecCut
|
||||
ShortCut = 16472
|
||||
end
|
||||
item
|
||||
Command = ecDeleteLine
|
||||
ShortCut = 16473
|
||||
end
|
||||
item
|
||||
Command = ecDeleteEOL
|
||||
ShortCut = 24665
|
||||
end
|
||||
item
|
||||
Command = ecUndo
|
||||
ShortCut = 16474
|
||||
end
|
||||
item
|
||||
Command = ecRedo
|
||||
ShortCut = 24666
|
||||
end
|
||||
item
|
||||
Command = ecGotoMarker0
|
||||
ShortCut = 16432
|
||||
end
|
||||
item
|
||||
Command = ecGotoMarker1
|
||||
ShortCut = 16433
|
||||
end
|
||||
item
|
||||
Command = ecGotoMarker2
|
||||
ShortCut = 16434
|
||||
end
|
||||
item
|
||||
Command = ecGotoMarker3
|
||||
ShortCut = 16435
|
||||
end
|
||||
item
|
||||
Command = ecGotoMarker4
|
||||
ShortCut = 16436
|
||||
end
|
||||
item
|
||||
Command = ecGotoMarker5
|
||||
ShortCut = 16437
|
||||
end
|
||||
item
|
||||
Command = ecGotoMarker6
|
||||
ShortCut = 16438
|
||||
end
|
||||
item
|
||||
Command = ecGotoMarker7
|
||||
ShortCut = 16439
|
||||
end
|
||||
item
|
||||
Command = ecGotoMarker8
|
||||
ShortCut = 16440
|
||||
end
|
||||
item
|
||||
Command = ecGotoMarker9
|
||||
ShortCut = 16441
|
||||
end
|
||||
item
|
||||
Command = ecSetMarker0
|
||||
ShortCut = 24624
|
||||
end
|
||||
item
|
||||
Command = ecSetMarker1
|
||||
ShortCut = 24625
|
||||
end
|
||||
item
|
||||
Command = ecSetMarker2
|
||||
ShortCut = 24626
|
||||
end
|
||||
item
|
||||
Command = ecSetMarker3
|
||||
ShortCut = 24627
|
||||
end
|
||||
item
|
||||
Command = ecSetMarker4
|
||||
ShortCut = 24628
|
||||
end
|
||||
item
|
||||
Command = ecSetMarker5
|
||||
ShortCut = 24629
|
||||
end
|
||||
item
|
||||
Command = ecSetMarker6
|
||||
ShortCut = 24630
|
||||
end
|
||||
item
|
||||
Command = ecSetMarker7
|
||||
ShortCut = 24631
|
||||
end
|
||||
item
|
||||
Command = ecSetMarker8
|
||||
ShortCut = 24632
|
||||
end
|
||||
item
|
||||
Command = ecSetMarker9
|
||||
ShortCut = 24633
|
||||
end
|
||||
item
|
||||
Command = EcFoldLevel1
|
||||
ShortCut = 41009
|
||||
end
|
||||
item
|
||||
Command = EcFoldLevel2
|
||||
ShortCut = 41010
|
||||
end
|
||||
item
|
||||
Command = EcFoldLevel3
|
||||
ShortCut = 41011
|
||||
end
|
||||
item
|
||||
Command = EcFoldLevel4
|
||||
ShortCut = 41012
|
||||
end
|
||||
item
|
||||
Command = EcFoldLevel5
|
||||
ShortCut = 41013
|
||||
end
|
||||
item
|
||||
Command = EcFoldLevel6
|
||||
ShortCut = 41014
|
||||
end
|
||||
item
|
||||
Command = EcFoldLevel7
|
||||
ShortCut = 41015
|
||||
end
|
||||
item
|
||||
Command = EcFoldLevel8
|
||||
ShortCut = 41016
|
||||
end
|
||||
item
|
||||
Command = EcFoldLevel9
|
||||
ShortCut = 41017
|
||||
end
|
||||
item
|
||||
Command = EcFoldLevel0
|
||||
ShortCut = 41008
|
||||
end
|
||||
item
|
||||
Command = EcFoldCurrent
|
||||
ShortCut = 41005
|
||||
end
|
||||
item
|
||||
Command = EcUnFoldCurrent
|
||||
ShortCut = 41003
|
||||
end
|
||||
item
|
||||
Command = EcToggleMarkupWord
|
||||
ShortCut = 32845
|
||||
end
|
||||
item
|
||||
Command = ecNormalSelect
|
||||
ShortCut = 24654
|
||||
end
|
||||
item
|
||||
Command = ecColumnSelect
|
||||
ShortCut = 24643
|
||||
end
|
||||
item
|
||||
Command = ecLineSelect
|
||||
ShortCut = 24652
|
||||
end
|
||||
item
|
||||
Command = ecTab
|
||||
ShortCut = 9
|
||||
end
|
||||
item
|
||||
Command = ecShiftTab
|
||||
ShortCut = 8201
|
||||
end
|
||||
item
|
||||
Command = ecMatchBracket
|
||||
ShortCut = 24642
|
||||
end
|
||||
item
|
||||
Command = ecColSelUp
|
||||
ShortCut = 40998
|
||||
end
|
||||
item
|
||||
Command = ecColSelDown
|
||||
ShortCut = 41000
|
||||
end
|
||||
item
|
||||
Command = ecColSelLeft
|
||||
ShortCut = 40997
|
||||
end
|
||||
item
|
||||
Command = ecColSelRight
|
||||
ShortCut = 40999
|
||||
end
|
||||
item
|
||||
Command = ecColSelPageDown
|
||||
ShortCut = 40994
|
||||
end
|
||||
item
|
||||
Command = ecColSelPageBottom
|
||||
ShortCut = 57378
|
||||
end
|
||||
item
|
||||
Command = ecColSelPageUp
|
||||
ShortCut = 40993
|
||||
end
|
||||
item
|
||||
Command = ecColSelPageTop
|
||||
ShortCut = 57377
|
||||
end
|
||||
item
|
||||
Command = ecColSelLineStart
|
||||
ShortCut = 40996
|
||||
end
|
||||
item
|
||||
Command = ecColSelLineEnd
|
||||
ShortCut = 40995
|
||||
end
|
||||
item
|
||||
Command = ecColSelEditorTop
|
||||
ShortCut = 57380
|
||||
end
|
||||
item
|
||||
Command = ecColSelEditorBottom
|
||||
ShortCut = 57379
|
||||
end>
|
||||
MouseActions = <>
|
||||
MouseTextActions = <>
|
||||
MouseSelActions = <>
|
||||
Lines.Strings = (
|
||||
'scriptEdit'
|
||||
)
|
||||
VisibleSpecialChars = [vscSpace, vscTabAtLast]
|
||||
SelectedColor.BackPriority = 50
|
||||
SelectedColor.ForePriority = 50
|
||||
SelectedColor.FramePriority = 50
|
||||
SelectedColor.BoldPriority = 50
|
||||
SelectedColor.ItalicPriority = 50
|
||||
SelectedColor.UnderlinePriority = 50
|
||||
SelectedColor.StrikeOutPriority = 50
|
||||
BracketHighlightStyle = sbhsBoth
|
||||
BracketMatchColor.Background = clNone
|
||||
BracketMatchColor.Foreground = clNone
|
||||
BracketMatchColor.Style = [fsBold]
|
||||
FoldedCodeColor.Background = clNone
|
||||
FoldedCodeColor.Foreground = clGray
|
||||
FoldedCodeColor.FrameColor = clGray
|
||||
MouseLinkColor.Background = clNone
|
||||
MouseLinkColor.Foreground = clBlue
|
||||
LineHighlightColor.Background = clNone
|
||||
LineHighlightColor.Foreground = clNone
|
||||
inline SynLeftGutterPartList1: TSynGutterPartList
|
||||
object SynGutterMarks1: TSynGutterMarks
|
||||
Width = 24
|
||||
MouseActions = <>
|
||||
end
|
||||
object SynGutterLineNumber1: TSynGutterLineNumber
|
||||
Width = 17
|
||||
MouseActions = <>
|
||||
MarkupInfo.Background = clBtnFace
|
||||
MarkupInfo.Foreground = clNone
|
||||
DigitCount = 2
|
||||
ShowOnlyLineNumbersMultiplesOf = 1
|
||||
ZeroStart = False
|
||||
LeadingZeros = False
|
||||
end
|
||||
object SynGutterChanges1: TSynGutterChanges
|
||||
Width = 4
|
||||
MouseActions = <>
|
||||
ModifiedColor = 59900
|
||||
SavedColor = clGreen
|
||||
end
|
||||
object SynGutterSeparator1: TSynGutterSeparator
|
||||
Width = 2
|
||||
MouseActions = <>
|
||||
MarkupInfo.Background = clWhite
|
||||
MarkupInfo.Foreground = clGray
|
||||
end
|
||||
object SynGutterCodeFolding1: TSynGutterCodeFolding
|
||||
MouseActions = <>
|
||||
MarkupInfo.Background = clNone
|
||||
MarkupInfo.Foreground = clGray
|
||||
MouseActionsExpanded = <>
|
||||
MouseActionsCollapsed = <>
|
||||
end
|
||||
end
|
||||
end
|
||||
object lblScriptNote: TLabel
|
||||
AnchorSideRight.Control = Owner
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 8
|
||||
Height = 15
|
||||
Top = 40
|
||||
Width = 442
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
BorderSpacing.Right = 10
|
||||
Caption = 'This is a script that would be used to compile the project from Xcode'
|
||||
ParentColor = False
|
||||
WordWrap = True
|
||||
end
|
||||
object SynUNIXShellScriptSyn1: TSynUNIXShellScriptSyn
|
||||
DefaultFilter = 'UNIX Shell Scripts (*.sh)|*.sh'
|
||||
Enabled = False
|
||||
left = 136
|
||||
top = 96
|
||||
end
|
||||
end
|
75
components/iphonelazext/environment_buildscript.pas
Normal file
75
components/iphonelazext/environment_buildscript.pas
Normal file
@ -0,0 +1,75 @@
|
||||
unit environment_buildscript;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils, FileUtil, SynEdit, synhighlighterunixshellscript, Forms,
|
||||
Controls, StdCtrls, EditBtn, IDEOptionsIntf, iPhoneExtOptions;
|
||||
|
||||
type
|
||||
|
||||
{ TTiPhoneBuildScriptEditor }
|
||||
|
||||
TTiPhoneBuildScriptEditor = class(TAbstractIDEOptionsEditor)
|
||||
lblScriptNote: TLabel;
|
||||
scriptFileName: TFileNameEdit;
|
||||
lblFileName: TLabel;
|
||||
scriptEdit: TSynEdit;
|
||||
SynUNIXShellScriptSyn1: TSynUNIXShellScriptSyn;
|
||||
private
|
||||
{ private declarations }
|
||||
public
|
||||
{ public declarations }
|
||||
function GetTitle: String; override;
|
||||
class function SupportedOptionsClass: TAbstractIDEOptionsClass; override;
|
||||
procedure Setup(ADialog: TAbstractOptionsEditorDialog); override;
|
||||
procedure ReadSettings(AOptions: TAbstractIDEOptions); override;
|
||||
procedure WriteSettings(AOptions: TAbstractIDEOptions); override;
|
||||
end;
|
||||
|
||||
implementation
|
||||
|
||||
{$R *.lfm}
|
||||
|
||||
{ TTiPhoneBuildScriptEditor }
|
||||
|
||||
function TTiPhoneBuildScriptEditor.GetTitle: String;
|
||||
begin
|
||||
Result:='Xcode Build Script';
|
||||
end;
|
||||
|
||||
class function TTiPhoneBuildScriptEditor.SupportedOptionsClass: TAbstractIDEOptionsClass;
|
||||
begin
|
||||
Result:=TiPhoneEnvironmentOptions;
|
||||
end;
|
||||
|
||||
procedure TTiPhoneBuildScriptEditor.Setup(ADialog: TAbstractOptionsEditorDialog
|
||||
);
|
||||
begin
|
||||
|
||||
end;
|
||||
|
||||
procedure TTiPhoneBuildScriptEditor.ReadSettings(AOptions: TAbstractIDEOptions);
|
||||
var
|
||||
opt: TiPhoneEnvironmentOptions;
|
||||
begin
|
||||
if not (AOptions is TiPhoneEnvironmentOptions) then Exit;
|
||||
opt:=TiPhoneEnvironmentOptions(AOptions);
|
||||
|
||||
scriptFileName.FileName:=opt.ScriptTemplate;
|
||||
if FileExists(opt.ScriptTemplate) then begin
|
||||
scriptEdit.Lines.LoadFromFile(opt.ScriptTemplate)
|
||||
end else
|
||||
scriptEdit.Text:='';
|
||||
end;
|
||||
|
||||
procedure TTiPhoneBuildScriptEditor.WriteSettings(AOptions: TAbstractIDEOptions
|
||||
);
|
||||
begin
|
||||
|
||||
end;
|
||||
|
||||
end.
|
||||
|
@ -173,8 +173,5 @@ begin
|
||||
Result:=TiPhoneEnvironmentOptions;
|
||||
end;
|
||||
|
||||
initialization
|
||||
RegisterIDEOptionsEditor(iPhoneEnvGroup, TiPhoneSpecificOptions, iPhoneEnvGroup+1);
|
||||
|
||||
end.
|
||||
|
||||
|
@ -29,7 +29,9 @@ uses
|
||||
|
||||
,project_iphone_options, xcodetemplate, iphonelog_form,
|
||||
|
||||
iPhoneExtOptions, iPhoneExtStr, iPhoneBundle, lazfilesutils, iphonesimctrl;
|
||||
iPhoneExtOptions, iPhoneExtStr, iPhoneBundle, lazfilesutils, iphonesimctrl
|
||||
,PackageIntf
|
||||
,environment_iphone_options, environment_buildscript;
|
||||
|
||||
procedure Register;
|
||||
|
||||
@ -590,12 +592,28 @@ begin
|
||||
end;
|
||||
|
||||
procedure Register;
|
||||
var
|
||||
Pkg: TIDEPackage;
|
||||
begin
|
||||
iPhoneEnvGroup := GetFreeIDEOptionsGroupIndex(GroupEnvironment);
|
||||
iPhonePrjGroup := GetFreeIDEOptionsGroupIndex(GroupProject);
|
||||
RegisterIDEOptionsGroup(iPhoneEnvGroup, TiPhoneEnvironmentOptions);
|
||||
RegisterIDEOptionsGroup(iPhonePrjGroup, TiPhoneProjectOptions);
|
||||
RegisterIDEOptionsEditor(iPhoneEnvGroup, TiPhoneSpecificOptions, iPhoneEnvGroup+1);
|
||||
RegisterIDEOptionsEditor(iPhoneEnvGroup, TTiPhoneBuildScriptEditor, iPhoneEnvGroup+2);
|
||||
|
||||
// IDE integration is done in constructor
|
||||
Extension := TiPhoneExtension.Create;
|
||||
try
|
||||
Pkg:=PackageEditingInterface.FindPackageWithName('iphonelazext');
|
||||
if Assigned(Pkg) then begin
|
||||
// default script template.
|
||||
// it would be overriden by the call to .Load()
|
||||
EnvOptions.ScriptTemplate:=DefaultScriptTemplateFileName(ExtractFileDir(pkg.Filename));
|
||||
end;
|
||||
EnvOptions.Load;
|
||||
EnvOptions.RefreshVersions;
|
||||
|
||||
except
|
||||
end;
|
||||
end;
|
||||
|
@ -83,6 +83,7 @@ type
|
||||
fDefaultSDK : String;
|
||||
fDefaultSimType : String;
|
||||
fDefaultDeviceID : String;
|
||||
fScriptTemplate : String;
|
||||
|
||||
fVersions : TStringList;
|
||||
fDeviceList : TList;
|
||||
@ -114,6 +115,7 @@ type
|
||||
procedure DeviceListClear;
|
||||
procedure DeviceListReload;
|
||||
|
||||
property ScriptTemplate: String read fScriptTemplate write fScriptTemplate;
|
||||
property PlatformsBaseDir: String read fPlatformsBaseDir write fPlatformsBaseDir;
|
||||
property CompilerPath: String read fCompilerPath write fCompilerPath;
|
||||
property BaseRTLPath: String read fBaseRTLPath write fBaseRTLPath;
|
||||
@ -143,8 +145,21 @@ function LazToXcodeProjFile(AProject: TLazProject): string;
|
||||
function LazToXcodePlistFile(AProject: TLazProject): string;
|
||||
procedure ReadUploadFilesList(pbx: PBXProject; lst: TStrings);
|
||||
|
||||
const
|
||||
Default_ScriptTemplate = 'def_buildscript.sh';
|
||||
|
||||
function DefaultScriptTemplateFileName(const packageDir: string): string;
|
||||
|
||||
implementation
|
||||
|
||||
function DefaultScriptTemplateFileName(const packageDir: string): string;
|
||||
begin
|
||||
if packageDir <> '' then
|
||||
Result:=IncludeTrailingPathDelimiter(packageDir)+Default_ScriptTemplate
|
||||
else
|
||||
Result:='';
|
||||
end;
|
||||
|
||||
var
|
||||
fEnvOptions : TiPhoneEnvironmentOptions = nil;
|
||||
fProjOptions : TiPhoneProjectOptions = nil;
|
||||
@ -175,14 +190,6 @@ begin
|
||||
Result:=fProjOptions;
|
||||
end;
|
||||
|
||||
procedure InitOptions;
|
||||
begin
|
||||
iPhoneEnvGroup := GetFreeIDEOptionsGroupIndex(GroupEnvironment);
|
||||
iPhonePrjGroup := GetFreeIDEOptionsGroupIndex(GroupProject);
|
||||
RegisterIDEOptionsGroup(iPhoneEnvGroup, TiPhoneEnvironmentOptions);
|
||||
RegisterIDEOptionsGroup(iPhonePrjGroup, TiPhoneProjectOptions);
|
||||
end;
|
||||
|
||||
procedure FreeOptions;
|
||||
begin
|
||||
fEnvOptions.Free;
|
||||
@ -307,6 +314,7 @@ begin
|
||||
fSimAppsPath := UTF8Encode(xmlcfg.GetValue('SimAppPath', fSimAppsPath));
|
||||
fDefaultSDK := UTF8Encode(xmlcfg.GetValue('DefaultSDK', fDefaultSDK));
|
||||
fDefaultDeviceID := UTF8Encode(xmlcfg.GetValue('DefaultDevice', fDefaultDeviceID));
|
||||
fScriptTemplate := UTF8Encode(xmlcfg.GetValue('ScriptTemplate', fScriptTemplate));
|
||||
|
||||
RefreshVersions;
|
||||
if (fDefaultSDK = '') and (fVersions.Count>0) then
|
||||
@ -337,6 +345,8 @@ begin
|
||||
xmlcfg.SetValue('SimAppPath', UTF8Decode(fSimAppsPath));
|
||||
xmlcfg.SetValue('DefaultSDK', UTF8Decode(fDefaultSDK));
|
||||
xmlcfg.SetValue('DefaultDevice', UTF8Decode(fDefaultDeviceID));
|
||||
xmlcfg.SetValue('ScriptTemplate', UTF8Decode(fScriptTemplate));
|
||||
xmlcfg.Flush;
|
||||
finally
|
||||
xmlcfg.Free;
|
||||
end;
|
||||
@ -589,7 +599,6 @@ begin
|
||||
end;
|
||||
|
||||
initialization
|
||||
InitOptions;
|
||||
|
||||
finalization
|
||||
FreeOptions;
|
||||
|
@ -31,7 +31,7 @@
|
||||
<Description Value="iPhone Development Lazarus extension"/>
|
||||
<License Value="LGPL"/>
|
||||
<Version Minor="8"/>
|
||||
<Files Count="20">
|
||||
<Files Count="21">
|
||||
<Item1>
|
||||
<Filename Value="ideext.pas"/>
|
||||
<HasRegisterProc Value="True"/>
|
||||
@ -116,18 +116,25 @@
|
||||
<Filename Value="iphonelog_form.pas"/>
|
||||
<UnitName Value="iphonelog_form"/>
|
||||
</Item20>
|
||||
<Item21>
|
||||
<Filename Value="environment_buildscript.pas"/>
|
||||
<UnitName Value="environment_buildscript"/>
|
||||
</Item21>
|
||||
</Files>
|
||||
<RequiredPkgs Count="3">
|
||||
<RequiredPkgs Count="4">
|
||||
<Item1>
|
||||
<PackageName Value="LCL"/>
|
||||
<PackageName Value="SynEdit"/>
|
||||
</Item1>
|
||||
<Item2>
|
||||
<PackageName Value="IDEIntf"/>
|
||||
<PackageName Value="LCL"/>
|
||||
</Item2>
|
||||
<Item3>
|
||||
<PackageName Value="IDEIntf"/>
|
||||
</Item3>
|
||||
<Item4>
|
||||
<PackageName Value="FCL"/>
|
||||
<MinVersion Major="1" Valid="True"/>
|
||||
</Item3>
|
||||
</Item4>
|
||||
</RequiredPkgs>
|
||||
<UsageOptions>
|
||||
<UnitPath Value="$(PkgOutDir)"/>
|
||||
|
@ -4,13 +4,14 @@
|
||||
|
||||
unit iphonelazext;
|
||||
|
||||
{$warn 5023 off : no warning about unused units}
|
||||
interface
|
||||
|
||||
uses
|
||||
ideext, iPhoneExtStr, iPhoneBundle, environment_iphone_options,
|
||||
project_iphone_options, iPhoneExtOptions, xcodetemplate, LazFilesUtils,
|
||||
XcodeUtils, newXibDialog, xibfile, PlistFile, xcodeprojutils, iphonesimctrl,
|
||||
iphonelog_form, LazarusPackageIntf;
|
||||
iphonelog_form, environment_buildscript, LazarusPackageIntf;
|
||||
|
||||
implementation
|
||||
|
||||
|
Reference in New Issue
Block a user