Frequently
asked questions
Q: How
can I get xCHM with Unicode support? My chm documents look wrong
(I get squares for characters no matter what font face I choose).
A: This is not about xCHM, but about wxWidgets. You need to compile wxWidgets with Unicode support, and then re-configure and build xCHM. You can instruct wxGTK that you want it to use Unicode by issuing:
in the root wxGTK source directory.
If you received xCHM as part of a Linux or BSD distribution, you might try to ask your distribution maintainers to provide a Unicode-enabled xCHM package instead of the one you have.
A: This is not about xCHM, but about wxWidgets. You need to compile wxWidgets with Unicode support, and then re-configure and build xCHM. You can instruct wxGTK that you want it to use Unicode by issuing:
./configure --enable-gtk2 --enable-unicodein the root wxGTK source directory.
If you received xCHM as part of a Linux or BSD distribution, you might try to ask your distribution maintainers to provide a Unicode-enabled xCHM package instead of the one you have.
Q: Can I
copy/paste text? Can I search for a word in the page?
A: Yes, you can. Starting with xCHM 1.0 copy/paste support is available. Searching the the current page is also possible, with ^F.
If you're using an older version of xCHM, you can still have copy/paste/search-in-page support by linking it to wxGTK 2.6.x or higher.
A: Yes, you can. Starting with xCHM 1.0 copy/paste support is available. Searching the the current page is also possible, with ^F.
If you're using an older version of xCHM, you can still have copy/paste/search-in-page support by linking it to wxGTK 2.6.x or higher.
Q: Does xCHM support context-sensitive help?
A: Yes. Eamon Millman has contributed XMLRPC++ code that allows xCHM to act like an XMLRPC server if started with the -x <port> command line flag. The API is detailed in the README.xmlrpc file that you can find in the source tarball. To enable the XMLRPC++ code for xCHM at compile time, you need to run:
Make sure you have the XMLRPC++ library installed before trying to enable the XMLRPC code for xCHM.
A: Yes. Eamon Millman has contributed XMLRPC++ code that allows xCHM to act like an XMLRPC server if started with the -x <port> command line flag. The API is detailed in the README.xmlrpc file that you can find in the source tarball. To enable the XMLRPC++ code for xCHM at compile time, you need to run:
./configure --enable-xmlrpcMake sure you have the XMLRPC++ library installed before trying to enable the XMLRPC code for xCHM.
Q: How do I compile xCHM on Mac OS X?
A: Here's how I did it on Mac OS X 10.5, using XCode 3.1 (do this in a terminal, no superuser access required):
1. Download wxMac, unpack somewhere in your home directory (for example, in
2.
3.
4.
5.
6.
7. Download xchm and chmlib, unpack both.
8. Copy
9. Edit xchm's
And modify the
The above change adds "
10. Edit xchm's
11. From the xchm root directory, run '
12. Again from the xchm root directory, run:
13. Run '
14. At this point, you should have the xchm binary in
A: Here's how I did it on Mac OS X 10.5, using XCode 3.1 (do this in a terminal, no superuser access required):
1. Download wxMac, unpack somewhere in your home directory (for example, in
/Users/macuser/work/).2.
cd /Users/macuser/work/wxMac-version3.
mkdir build_mac4.
cd build_mac5.
../configure --enable-unicode --disable-shared --enable-universal_binary
--prefix=/Users/macuser/work/wxu6.
make install7. Download xchm and chmlib, unpack both.
8. Copy
lzx.c, lzx.h, chm_lib.c
and chm_lib.h to src/ in the xchm directory.9. Edit xchm's
configure.in. Comment out these lines (like the example):#AC_CHECK_HEADER(chm_lib.h,,AC_MSG_ERROR([Can't find the CHMLIB header.]))
#AC_CHECK_LIB(
# chm, chm_open,,
# AC_MSG_ERROR([Can't find/use -lchm. Please install CHMLIB first.])
#)And modify the
CFLAGS and CXXFLAGS thus:CXXFLAGS="$CXXFLAGS $WX_CXXFLAGS_ONLY -W -Wall -arch ppc -arch i386"
CFLAGS="$CFLAGS $WX_CFLAGS_ONLY -arch ppc -arch i386"The above change adds "
-arch ppc -arch i386" to both
CFLAGS and CXXFLAGS,
which is important for building a Mac Universal binary.10. Edit xchm's
src/Makefile.am file and add "lzx.c chm_lib.c" to
xchm_SOURCES, then add "lzx.h chm_lib.h"
to noinst_HEADERS.11. From the xchm root directory, run '
autoreconf'.12. Again from the xchm root directory, run:
./configure --enable-optimize --enable-debug=no --disable-dependency-tracking
--with-wx-config=/Users/macuser/work/wxu/bin/wx-config13. Run '
make'.14. At this point, you should have the xchm binary in
xchm/src/. Proceed to
add it to a DMG bundle using the Makefile provided here:
http://el-tramo.be/guides/fancy-dmg
Q: Why doesn't xCHM work well with my file? Will you correct the
problem?
A: Please take a look at the 'Limitations' section on the technical notes page. If your problem is listed there, then the answer is no, I will probably not fix the problem. xCHM is but a humble front-end for chmlib, and it's not meant for reading Windows help. Use
A: Please take a look at the 'Limitations' section on the technical notes page. If your problem is listed there, then the answer is no, I will probably not fix the problem. xCHM is but a humble front-end for chmlib, and it's not meant for reading Windows help. Use
hh.exe to read
Windows help. Of course, if you're set on writing a good patch I'll
have a look.
Q: What do I do if I get an "error while loading shared libraries" message after compiling xCHM?
A: The short answer is: run
A: The short answer is: run
ldconfig as root. The long answer is on
the forum.
Q: xCHM displays the HTML source code of the pages instead of properly rendering it.
Can I fix this?
A: That depends. The problem might be that an application such as Crossover Office has already registered the .chm extension in your
A: That depends. The problem might be that an application such as Crossover Office has already registered the .chm extension in your
~/.mime.types file. Most likely
that can be solved by commenting out the relevant lines (this solution has been received
from Marcelo Fernandez).
Forum
If nothing of the above answers your question, you might try the SourceForge help forum for xCHM. Please see if someone else already answered your question before posting.