mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-10 18:17:18 +02:00
IDE: changed default conditionals to comments with examples
git-svn-id: trunk@41627 -
This commit is contained in:
parent
945a988824
commit
28699e981c
@ -44,7 +44,7 @@ interface
|
||||
uses
|
||||
typinfo, Classes, SysUtils, FileProcs, FileUtil, Laz2_XMLCfg, InterfaceBase,
|
||||
LCLProc, Forms, Controls, ExprEval, DefineTemplates, CodeToolsCfgScript,
|
||||
CodeToolManager, KeywordFuncLists,
|
||||
CodeToolManager, KeywordFuncLists, BasicCodeTools,
|
||||
// IDEIntf
|
||||
ProjectIntf, MacroIntf, IDEExternToolIntf, SrcEditorIntf, CompOptsIntf,
|
||||
IDEOptionsIntf,
|
||||
@ -116,6 +116,19 @@ type
|
||||
procedure Assign(Source: TLazBuildMacros);
|
||||
end;
|
||||
|
||||
const
|
||||
DefaultConditionals =
|
||||
'// example for adding linker options on Mac OS X'+LineEnding
|
||||
+'//if TargetOS=''darwin'' then'+LineEnding
|
||||
+'// LinkerOptions := '' -framework OpenGL'';'+LineEnding
|
||||
+LineEnding
|
||||
+'// example for adding a unit and include path on Windows'+LineEnding
|
||||
+'//if SrcOS=''win'' then begin'+LineEnding
|
||||
+'// UnitPath += '';win'';'+LineEnding
|
||||
+'// IncPath += '';win'';'+LineEnding
|
||||
+'//end;'+LineEnding
|
||||
;
|
||||
|
||||
type
|
||||
|
||||
{ TIDECfgScriptEngine }
|
||||
@ -1405,7 +1418,7 @@ begin
|
||||
SrcPath := sp(aXMLConfig.GetValue(p+'SrcPath/Value', ''));
|
||||
|
||||
{ Conditionals }
|
||||
FConditionals:=aXMLConfig.GetValue(Path+'Conditionals/Value','');
|
||||
FConditionals:=aXMLConfig.GetValue(Path+'Conditionals/Value',DefaultConditionals);
|
||||
TIDEBuildMacros(fBuildMacros).LoadFromXMLConfig(aXMLConfig,
|
||||
Path+'BuildMacros/',PathDelimChange);
|
||||
|
||||
@ -1642,7 +1655,10 @@ begin
|
||||
aXMLConfig.SetDeleteValue(p+'SrcPath/Value', f(SrcPath),'');
|
||||
|
||||
{ Conditionals }
|
||||
aXMLConfig.SetDeleteValue(Path+'Conditionals/Value',Conditionals,'');
|
||||
s:=Conditionals;
|
||||
if CompareTextIgnoringSpace(s,DefaultConditionals,true)=0 then
|
||||
s:='';
|
||||
aXMLConfig.SetDeleteValue(Path+'Conditionals/Value',s,'');
|
||||
TIDEBuildMacros(fBuildMacros).SaveToXMLConfig(aXMLConfig,
|
||||
Path+'BuildMacros/',UsePathDelim);
|
||||
|
||||
|
@ -27,7 +27,6 @@
|
||||
- add checkbox Show build modes
|
||||
- move conditionals to Other
|
||||
- move IDE macros only for package usage
|
||||
- set default conditionals to comments with examples
|
||||
- undo: combine changes while editing a cell
|
||||
}
|
||||
unit Compiler_ModeMatrix;
|
||||
|
Loading…
Reference in New Issue
Block a user