📄 sourcecode.html
字号:
<p>You can also define <code>NOPNGSUPPORT</code> to disable using the PNG
library. There is no real reason to do that unless you are using
<em>Kylix</em>. Analogically the symbol <code>NOJPEGSUPPORT</code> can
be defined.</p>
<h2><a name="Kylix"><em>Kylix</em></a></h2>
<p>I now stopped supporting Kylix, you can't even register it with
Borland/CodeGear anymore. I still try to program compatibly but for some
GUI features it would be too much work to recreate components in Kylix.
So far only the component to show the messages of the generators is
Windows-specific. For the source code view several versions back I had
still took the time to write a simple replacement, but as said, I don't
want to invest that time again. The console version should still be able
to be compiled under Kylix - as I don't check everytime maybe a few
small things have to be fixed.</p>
<p>If you want to compile <em>DelphiDoc</em> with <b>Kylix</b>, most
changes on the running binary are how you expect them. No generated
documentation will be launched automatically after generation, because
there is no associated binary to launch them. Also Window help files are
not automatically compiled (what a surprise), although it is possible
to compile them with the help of
<a href="http://www.winehq.com/">Wine</a>. And no WMF (Windows Meta
File) files are created (WMF records GDI calls, of course there is no
Windows GDI in *nix).<br>
The wrong end-of-line character sequence may be used sometimes, i.e.
#13#10 instead of just #10, but that should never invalidate any
file.<br>
The tree views to select the objects for the generation is sorted after
the original class names, not the shown titles, it seems Qt always sorts
after the original specified text and doesn't care if it has been
changed meanwhile.</p>
<p>Finally, if you want to compile <em>DelphiDoc</em> from the sources you
have to make some changes. I added a script "ConvertForKylix.tcl"
to do this, but I will list the things anyway below, in case you want to
do it manually. If you got a *nix system without
<acronym title="Tool Command Language">TCL</acronym> you don't have a
proper *nix system :-P, but anyway you can
<a href="http://tcl.sourceforge.net/">read more about
<acronym title="Tool Command Language">TCL</acronym></a> and install
it.</p>
<p>As of version 1.7.1 this
<acronym title="Tool Command Language">TCL</acronym>-script is actually
a set of <acronym title="Tool Command Language">TCL</acronym> files
distributed in as a separate "ConvertForKylix.tcl.zip". The additional
scripts contain code to handle Delphi's <code>.dfm</code> files and
convert them for <em>Kylix</em>. They are called from the main file,
"ConvertForKylix.tcl", so if you don't want to, you don't have to care
about that, but there are also some files that can be called directly
from the shell (ending in <code>.sh.tcl</code>). By virtue of these new
files you don't have to open all forms and pages/frames in the Delphi
IDE to convert them (after all that's 41 files on last count). They can
actually do some more with DFM files and form data but there is no
documentation and only marginal comments, so you have to do a little
source-diving.</p>
<p>Just
<a href="http://sourceforge.net/project/showfiles.php?group_id=113456">download</a>
the additional file "ConvertForKylix.tcl.zip", unzip it (to any
directory), change to <em>DelphiDoc</em>'s base directory (containing
the <code>.dpr</code>'s) and start the file "ConvertForKylix.tcl"
(prepend the path to it if necessary), after the first confirmation the
general adjustments are done, then, after another confirmation, you need
to wait shortly while the dfm's are being converted.<p>
<p>Now you have to delete the declaration of the component
<code>UpDownFontSize: TUpDown;</code> from the UDiagramForm.pas (around
line 160), seems Kylix doesn't know that component.<br>
Finally you have to reload all image lists, it seems the transparent
color is not correctly imported, so some of the images look really weird
or empty. A list of the lists and images follows below, the images are
in the sub-directory "Resources/SmallImages/" and are named with a
prefix and their number within the image lists (for easier reloading),
remember to select the images from last to first, so the first is
selected and will really be the first one. For some of the images you
have to select the transparent color manually, it is mostly
<code>clFuchsia</code> or <code>clWhite</code>.</p>
<table>
<caption>TImageList's to be reloaded</caption>
<thead>
<tr>
<th>File</th>
<th>Prefix</th>
<th>Number</th>
</tr>
</thead>
<tbody>
<tr><td>UAbout.pas</td> <td>a</td> <td>11</td> </tr>
<tr><td>UCatExpert.pas</td> <td>o</td> <td> 3</td> </tr>
<tr><td>UDiagramForm.pas</td> <td>d</td> <td>29</td> </tr>
<tr><td>UMessageFilterForm.pas</td> <td>f</td> <td> 3</td> </tr>
<tr><td>UEditGUITopics.pas</td> <td>mi</td> <td>10</td> </tr>
</tbody>
</table>
<h3>What the Script does</h3>
<p>You must define a unit alias "Windows=Types" and lots of
aliases mapping the VCL-Units to the CLX-Units (i.e. to prepend a "Q",
use trial-and-error until all have been mapped),
this quick and dirty solution was simply the easiest way to include the
right units anywhere they are needed.<br>
You will also have to edit the options and the project file to
change several paths from using "\" (backslash) to
"/" (slash) and some separators from ";" to ":". I would have
really expected Kylix to do this on its own.<br>
The library for regular expressions will have two errors, just use the
not-optimized version as used for Free Pascal in the same lines to fix
it.<br>
<em>DelphiDoc</em> is now using templates. To keep it parsable by itself
the path to the included files are specified instead of only the
name, so again all backslashes have to be replaced with slashes.<br>
I don't compile regulary on <i>Kylix</i> now, but code with it in mind,
so you may need to tweak the code a bit to get it running. When I do, I
use the Borland Kylix Open Edition Version 3.0 (Build 4.186) without any
<a href="http://www.kylix-patch.de.vu/">unofficial patches</a> just the
official patch number 2.</p>
<p>You will also have to open all units with forms (and pages/frames) in
Kylix to convert the old <code>.dfm</code> files and to ignore a lot of
warnings during that. Just ignore everything, and when compiling another
one, that one field has no matching component.<br>
Before opening in Kylix it may be wise to set all Properties "Scaled" of
the forms to false, or better delete the property "PixelsPerInch" (if
that is possible).<br>
There are currently about forty forms (or pages/frames), so there are
lots of files to open and lots of messages to ignore, and it seems Kylix
chokes sometimes on these masses and sometimes it doesn't convert the
<code>.dfm</code> files, or at least does not remove the invalid
properties. The program compiles fine, but when the form or page is
shown an exception is raised talking about invalid properties. The
form/page has then to be opened again and converted again.</p>
<p>Furthermore the shortcuts are stored as a system dependent value, so
they are mixed up when loading them under <em>Kylix</em>, this concerns
all special keys like the function keys, e.g. F6, and the delete key and
have to be set again manually.</p>
<h2><a name="FinalRemarks">Final Remarks</a></h2>
<p>For anything else try generating a Windows Help file with
<em>DelphiDoc</em> about the sources and
<a href="manual.html#FormatWinHelp">integrate it into Delphi</a> to get
fast and simple help about all identifiers. That's a fast and powerful
solution to get acquainted with any Delphi program.</p>
<p>If you have further questions or want to contribute to the further
developing of <em>DelphiDoc</em> you may contact me on the email
addresse given on <a href="index.html#Contact">the main page</a> of this
documentation, or visit its
<a href="http://sourceforge.net/projects/delphidoc/">project
page</a>.</p>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -