<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type"/>
<title></title>
</head>
<body>
<p style="margin: 0px;"><span> </span></p>
<p style="margin: 0px;"></p>
<div style="margin: 5px 0px 5px 0px;">
<br/>
Darius Blaszyk <dhkblaszyk@zeelandnet.nl> hat am 5. Februar 2011 um 14:55 geschrieben:<br/>
<br/>
<blockquote style="margin-left: 0px; padding-left: 10px; border-left: solid 1px blue;" type="cite">
<div>
<blockquote type="cite">
<div>
<blockquote type="cite">
<blockquote type="cite">
1. get all the -Fu and -Fi folders so the package can search them and allow the user to include/exclude them from profiling, which method to use in LazIDEIntf?
</blockquote>
</blockquote><br/>
I added some info:<br/>
<br/>
<a href="http://wiki.lazarus.freepascal.org/Extending_the_IDE#Getting_the_search_paths_for_units_and_include_filesuses">http://wiki.lazarus.freepascal.org/Extending_the_IDE#Getting_the_search_paths_for_units_and_include_filesuses</a><br/>
CodeToolManager;<span style="color: #000000;"><span style="color: #144fae;"><br/>
</span></span>
</div>
</blockquote>
</div>
<div>
Again a couple of questions regarding the IDE interface;
</div>
<div>
</div>
<div>
1. Is it possible to (temporarily) suppress the check if a file on disk has changed?
</div>
</blockquote>
</div>
<p style="margin: 0px;"> </p>
<p style="margin: 0px;">No. </p>
<p style="margin: 0px;">I could add this, but maybe there are better ways than changing the source back and forth on disk.</p>
<p style="margin: 0px;">Basically you need a preprocessor for FPC.</p>
<p style="margin: 0px;">The first step is to extend FPC to not load files directly from disk. I tried some months ago and it was amazingly simple.</p>
<p style="margin: 0px;">It is quite simple to build your own custom compiler and it uses a central place to load source files. With a simple patch the central loading can be extended for an overload. This costs no performance and has very low maintenance cost for the FPC team, so there is a good chance the patch will be applied. At that time DoDi was working on the compiler, so I waited for the dust to settle and then I forgot to provide the patch. The patch is on another computer. I can search for it next week.</p>
<p style="margin: 0px;">A custom compiler can then add the file hook to feed fpc with preprocessed source files, for example your fpfprofile code.</p>
<p style="margin: 0px;">Of course eventually it would be nice if FPC could use an optional preprocessor without the need to compile your own compiler.</p>
<p style="margin: 0px;"> </p>
<p style="margin: 0px;">Another solution is to implement a ramdisk. That would work with any existing compilers, but requires one implementation per OS and can be tricky because of access rights.</p>
<p style="margin: 0px;"> </p>
<p style="margin: 0px;"> </p>
<p style="margin: 0px;"> </p>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 124px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">
if FileExistsUTF8(Filename) then
</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 124px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">
LazarusIDE.DoRevertEditorFile(Filename)
</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 124px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">
else
</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 124px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">
LazarusIDE.DoCloseEditorFile(Filename,[cfQuiet]);
</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 124px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">
</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 124px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">
</div>
<div>
</div>
<div style="margin: 5px 0px 5px 0px;">
<blockquote style="margin-left: 0px; padding-left: 10px; border-left: solid 1px blue;" type="cite">
<div>
2. I would like to add a unit search path to the project and later be able to remove it again. Is this possible?
</div>
</blockquote>
</div>
<p style="margin: 0px;"> </p>
<p style="margin: 0px;">Yes. </p>
<p style="margin: 0px;">LazarusIDE.ActiveProject.LazCompilerOptions.OtherUnitFiles</p>
<p style="margin: 0px;"> </p>
<p style="margin: 0px;">But the handling of the modified flags can be tricky.</p>
<p style="margin: 0px;"> </p>
<p style="margin: 0px;"> </p>
<p style="margin: 0px;">Mattias</p>
<p style="margin: 0px;"> </p>
</body>
</html>