Adding Kylix Help/zh CN

From Lazarus-ccr

Jump to: navigation, search

English (en) Français (fr) 中文(简体)(zh_CN)

Contents

[edit] 从 Kylix3 获得帮助文件

当我离开 Borland 并转向 Lazarus,我焦虑于找不到熟悉的帮助文档;当我需要输入一个函数或者关键字的时候, 按 CTRL-F1 可以调出帮助来浏览它的参数。 这儿告诉你怎么将Kylix帮助系统安装到lazarus中。

Kylix中的帮助文件位置:${HOME}/Kylix/help:

bin/           k3clx.hlp     k3dbd.cnt    k3.hlp
foo            k3.cnt        k3dbd.fts    k3indy.cnt
foo~           k3copts.cnt   k3dbd.hlp    k3indy.fts
hhintro.txt    k3copts.fts   k3dbx.cnt    k3indy.hlp
hoh.cnt        k3copts.hlp   k3dbx.fts    k3iota.cnt
hoh.fts        k3crtl.cnt    k3dbx.hlp    k3iota.fts
hoh.hlp        k3crtl.fts    k3derrs.cnt  k3iota.hlp
hyperhelp.sh*  k3crtl.hlp    k3derrs.fts  k3new.cnt
k3.als         k3ctools.cnt  k3derrs.hlp  k3new.fts
k3cerrs.cnt    k3ctools.fts  k3dlr.cnt    k3new.hlp
k3cerrs.fts    k3ctools.hlp  k3dlr.fts    k3prog.cnt
k3cerrs.hlp    k3cw.cnt      k3dlr.hlp    k3prog.fts
k3clr.cnt      k3cw.fts      k3dopts.cnt  k3prog.hlp
k3clr.fts      k3cw.hlp      k3dopts.fts  lib/
k3clr.hlp      k3dap.cnt     k3dopts.hlp
k3clx.cnt      k3dap.fts     k3.ftg
k3clx.fts      k3dap.hlp     k3.fts



上述许多文件不适合Lazarus, 如 k3c* 这些文件与C++有关, 不过它们在其中也无任何影响,可以保留它们做参考。

干净的帮助文件列表如下:

bin/           k3.als     k3clx.fts  k3.cnt  k3.fts  lib/
hyperhelp.sh*  k3clx.cnt  k3clx.hlp  k3.ftg  k3.hlp


[edit] The hyperhelp.sh script

We do need to dress up the default help script provided with Kylix so that it will work as a standalone app under X. Note that the last line of the script sets some missing rendering parameters? Also note the -geometry which positions the window and sets its size.


#!/bin/bash
HHHOME="${HOME}/Lazarus/DelphiHelp"
XPPATH="${HHHOME}/xprinter"
LANG=en_US
LC_ALL=en_US
locale=${LC_ALL:-${LC_CTYPE:-${LANG:-"C"}}}
LD_LIBRARY_PATH+="lib/locale/"${locale}":lib:"
XAPPLRESDIR="app-defaults"
NLSPATH="lib/locale/%L/%N.cat"
export XPPATH HHHOME LANG LC_ALL LD_LIBRARY_PATH XAPPLRESDIR NLSPATH
cd $HHHOME
bin/hyperhelp k3clx.hlp -m AL\($1,3,,main\)\
    -s 0 -d 32159 -display :0.0 -geometry 600x500+100+100 -w


[edit] my Directory tree

This is where I have placed the Kylix Help file directory. It is under my installation of Lazarus in the user home directory. The hyperhelp.sh script refers to these locations.

/home/tom/Lazarus/DelphiHelp/
|-- bin
`-- lib
   `-- locale
       |-- de_DE
       |-- fr_FR
       |-- ja_JP.SJIS
       |-- ja_JP.eucJP
       `-- ja_JP.eucjp

[edit] 在 IDE 内自定义工具设置

Finally, setup the new custom tool within Lazarus from then menu 'Tools|Configure custom tools|Add'. Replace '/home/tom/' with your user home directory path. This has to be an absolute path to the hyperhelp.sh script.

Image:edittool.png

[edit] 总结

Just place your cursor in the edit window on the word you want to find help for and press CTRL-F1. The Kylix help will then open up the context sensitive help page for that keyword.