From bc8c4be7605148976fdc438e8b8b0286dc442ef4 Mon Sep 17 00:00:00 2001 From: mattias Date: Wed, 12 Jan 2005 23:28:16 +0000 Subject: [PATCH] implemented skipping debugger settings for publishing projects git-svn-id: trunk@6563 - --- ide/main.pp | 15 ++++++++++----- ide/project.pp | 11 ++++++++--- ide/projectdefs.pas | 9 ++++++++- 3 files changed, 26 insertions(+), 9 deletions(-) diff --git a/ide/main.pp b/ide/main.pp index e5136c2eb8..5c827e6331 100644 --- a/ide/main.pp +++ b/ide/main.pp @@ -521,7 +521,7 @@ type procedure OnLoadProjectInfoFromXMLConfig(TheProject: TProject; XMLConfig: TXMLConfig); procedure OnSaveProjectInfoToXMLConfig(TheProject: TProject; - XMLConfig: TXMLConfig); + XMLConfig: TXMLConfig; WriteFlags: TProjectWriteFlags); // methods for 'save project' procedure GetMainUnit(var MainUnitInfo: TUnitInfo; @@ -4243,9 +4243,10 @@ begin end; procedure TMainIDE.OnSaveProjectInfoToXMLConfig(TheProject: TProject; - XMLConfig: TXMLConfig); + XMLConfig: TXMLConfig; WriteFlags: TProjectWriteFlags); begin - if TheProject=Project1 then + if (TheProject=Project1) and (not (pwfSkipDebuggerSettings in WriteFlags)) + then DebugBoss.SaveProjectSpecificInfo(XMLConfig); end; @@ -7816,8 +7817,9 @@ begin CurProject:=TProject(TPublishProjectOptions(Options).Owner); NewProjectFilename:=DestDir+ExtractFilename(CurProject.ProjectInfoFile); DeleteFile(NewProjectFilename); - Result:=CurProject.WriteProject(CurProject.PublishOptions.WriteFlags, - NewProjectFilename); + Result:=CurProject.WriteProject(CurProject.PublishOptions.WriteFlags + +[pwfSkipDebuggerSettings,pwfSkipJumpPoints], + NewProjectFilename); if Result<>mrOk then begin debugln('TMainIDE.DoPublishModule CurProject.WriteProject failed'); exit; @@ -11373,6 +11375,9 @@ end. { ============================================================================= $Log$ + Revision 1.830 2005/01/12 23:28:16 mattias + implemented skipping debugger settings for publishing projects + Revision 1.829 2005/01/12 22:39:44 mattias fixed creating new item from new dialog diff --git a/ide/project.pp b/ide/project.pp index 144d9c91e8..233c3734ad 100644 --- a/ide/project.pp +++ b/ide/project.pp @@ -66,7 +66,7 @@ type TOnLoadProjectInfo = procedure(TheProject: TProject; XMLConfig: TXMLConfig) of object; TOnSaveProjectInfo = procedure(TheProject: TProject; - XMLConfig: TXMLConfig) of object; + XMLConfig: TXMLConfig; WriteFlags: TProjectWriteFlags) of object; TUnitInfoList = ( uilPartOfProject, @@ -1351,7 +1351,8 @@ begin xmlconfig.SetValue(Path+'General/TargetFileExt/Value' ,TargetFileExt); xmlconfig.SetDeleteValue(Path+'General/Title/Value', Title,''); - if not (pfSaveOnlyProjectUnits in Flags) then begin + if (not (pfSaveOnlyProjectUnits in Flags)) + and (not (pwfSkipJumpPoints in ProjectWriteFlags)) then begin fJumpHistory.DeleteInvalidPositions; fJumpHistory.SaveToXMLConfig(xmlconfig,Path); end; @@ -1371,7 +1372,8 @@ begin SavePkgDependencyList(XMLConfig,Path+'RequiredPackages/', FFirstRequiredDependency,pdlRequires); - if Assigned(OnSaveProjectInfo) then OnSaveProjectInfo(Self,XMLConfig); + if Assigned(OnSaveProjectInfo) then + OnSaveProjectInfo(Self,XMLConfig,ProjectWriteFlags); xmlconfig.Flush; Modified:=false; @@ -3154,6 +3156,9 @@ end. { $Log$ + Revision 1.174 2005/01/12 23:28:16 mattias + implemented skipping debugger settings for publishing projects + Revision 1.173 2004/12/30 11:24:05 mattias updated russian utf translation from Vasily diff --git a/ide/projectdefs.pas b/ide/projectdefs.pas index 74acde4aa2..8983d28244 100644 --- a/ide/projectdefs.pas +++ b/ide/projectdefs.pas @@ -46,10 +46,17 @@ type TProjectWriteFlag = ( pwfDontSaveClosedUnits, - pwfSaveOnlyProjectUnits + pwfSaveOnlyProjectUnits, + pwfSkipDebuggerSettings, + pwfSkipJumpPoints ); TProjectWriteFlags = set of TProjectWriteFlag; +const + pwfSkipSessionInfo = [pwfSaveOnlyProjectUnits,pwfSkipDebuggerSettings, + pwfSkipJumpPoints]; + +type TNewUnitType = ( nuEmpty, // no code nuUnit, // unit