You've already forked lazarus-ccr
iphonelazext: fixing project options saving. loading sdk list on lazarus start
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@1144 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@@ -170,8 +170,25 @@ var
|
|||||||
idx : Integer;
|
idx : Integer;
|
||||||
needfix : Boolean;
|
needfix : Boolean;
|
||||||
sdkuse : String;
|
sdkuse : String;
|
||||||
|
sdkver : String;
|
||||||
|
st : TStringList;
|
||||||
begin
|
begin
|
||||||
sdkuse:=EnvOptions.GetSDKFullPath(ProjOptions.SDK, not isRealDevice);
|
sdkver:=ProjOptions.SDK;
|
||||||
|
if sdkver='' then begin
|
||||||
|
st := TStringList.Create;
|
||||||
|
try
|
||||||
|
EnvOptions.GetSDKVersions(st);
|
||||||
|
if st.Count=0 then
|
||||||
|
IDEMessagesWindow.AddMsg(strWNoSDK, '', 0)
|
||||||
|
else begin
|
||||||
|
sdkver:=st[0];
|
||||||
|
ProjOptions.SDK:=sdkver;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
st.Free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
sdkuse:=EnvOptions.GetSDKFullPath(sdkver, not isRealDevice);
|
||||||
|
|
||||||
Result:=Options;
|
Result:=Options;
|
||||||
if FindParam(Result, '-XR', idx, rawprm) then begin
|
if FindParam(Result, '-XR', idx, rawprm) then begin
|
||||||
@@ -213,7 +230,6 @@ end;
|
|||||||
|
|
||||||
function TiPhoneExtension.ProjectBuilding(Sender: TObject): TModalResult;
|
function TiPhoneExtension.ProjectBuilding(Sender: TObject): TModalResult;
|
||||||
begin
|
begin
|
||||||
//writeln('project building: ', Sender.ClassName);
|
|
||||||
Result:=mrOk;
|
Result:=mrOk;
|
||||||
if not Assigned(LazarusIDE.ActiveProject) or not ProjOptions.isIPhoneApp then Exit;
|
if not Assigned(LazarusIDE.ActiveProject) or not ProjOptions.isIPhoneApp then Exit;
|
||||||
|
|
||||||
@@ -433,6 +449,7 @@ begin
|
|||||||
// IDE integration is done in constructor
|
// IDE integration is done in constructor
|
||||||
Extension := TiPhoneExtension.Create;
|
Extension := TiPhoneExtension.Create;
|
||||||
EnvOptions.Load;
|
EnvOptions.Load;
|
||||||
|
EnvOptions.RefreshVersions;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
initialization
|
initialization
|
||||||
|
@@ -32,6 +32,9 @@ resourcestring
|
|||||||
|
|
||||||
strXcodeUpdated = 'Xcode project updated';
|
strXcodeUpdated = 'Xcode project updated';
|
||||||
|
|
||||||
|
strWNoSDKSelected = 'Warning: SDK is not selected using %s';
|
||||||
|
strWNoSDK = 'Warning: No SDK available. Linking might fail.';
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
|
|
||||||
end.
|
end.
|
||||||
|
@@ -110,6 +110,7 @@ begin
|
|||||||
isIPhoneApp:=chkisPhone.Checked;
|
isIPhoneApp:=chkisPhone.Checked;
|
||||||
SDK:=cmbSDKs.Caption;
|
SDK:=cmbSDKs.Caption;
|
||||||
AppID:=edtAppID.Text;
|
AppID:=edtAppID.Text;
|
||||||
|
Save;
|
||||||
DoChanged;
|
DoChanged;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
Reference in New Issue
Block a user