Giter Club home page Giter Club logo

xchm's Introduction

xCHM

UNIX CHM viewer.

Screenshots

Python documentation

Prerequisites

In order to be able to compile the code you need to have wxWidgets and CHMLIB installed.

Get the GTK+ version (also known as wxGTK). xCHM currently compiles with all flavours of wxWidgets, but only works well and looks truly appealing with wxGTK, so I recommend against bothering to use it with anything else.

Installing

(If you've just cloned the code - as opposed to using a release tarball - you need to run ./bootstrap first.)

Type ./configure --help if you're interested in parameters you can pass to configure for compile switches. Most people will be perfectly happy doing a:

./configure && make

Once everything is built, type:

make install

and the executable should be somewhere in your $PATH (hopefully :)). Now you can just type

xchm

and start your session.

Built with

Generating documentation

If you'd like to generate developer documentation go to the root of the distribution and type:

doxygen

This of course implies that you have doxygen installed. The documentation will be generated in the doc directory in HTML and LaTex format.

Binaries

I am no longer providing Mac and Windows binaries, just the source code. Some Linux distributions already provide binaries (Debian, Arch, Gentoo, Ubuntu, etc.) For Mac, please see MacPorts. Windows users can (and should) just use the standard viewer (hh.exe).

Authors

Happy reading!

xchm's People

Contributors

eson57 avatar ohno9119 avatar oltolm avatar pinotree avatar rzvncj avatar tiseno9000 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

xchm's Issues

When moving to next page, show the top of the page

While I'm pleased with the software overall, when reading documentation that contains multiple long pages I need to use a shortcut to go to the top on every page. This is annoying and usability would be improved a lot but fixing this issue.

I'm using xchm 1.23 as packaged on debian 10 for i386.

Greek language code

Hi,

po/gr.po need to rename to po/el.po as per Greek's ISO language code. I've applied patch in Debian, but it is just simply renaming file and update in po/LINGUAS.

Thanks.

Add view option to hide tools

It would be nice if this tool could be hidden to make the best of screen realstate.

A logical place to search for this option is in the view menu.

2019-11-06-193947

Add Keywords entry in xchm.desktop

Maybe it file should look like, we had in Debian. But, it is fine to just add 'Keywords' as of now.

[Desktop Entry]
Name=xCHM
Comment=Compiled HTML Help (CHM) file viewer
Comment[fr]=Visionneuse de fichiers Compiled HTML Help (CHM)
Exec=xchm %f
TryExec=xchm
Terminal=false
Type=Application
Icon=xchm
Categories=Office;Viewer;GTK;
MimeType=application/x-chm;
Keywords=chm;view;document;

[Desktop Action View]
Exec=xchm %f

Crash on opening

Debian 10 x64
xCHM 1.23 (via apt/repo)

When opening attached file the following error is thrown:
`ASSERT INFO:
../src/common/unichar.cpp(65): assert "Assert failure" failed in ToHi8bit(): character cannot be converted to single byte

BACKTRACE:
[1] wxUniChar::ToHi8bit(unsigned int)
[2] wxURI::Unescape(wxString const&)
[3] wxFileSystem::URLToFileName(wxString const&)
[4] wxFileSystem::OpenFile(wxString const&, int)
[5] wxEvtHandler::ProcessEventIfMatchesId(wxEventTableEntryBase const&, wxEvtHandler*, wxEvent&)
[6] wxEventHashTable::HandleEvent(wxEvent&, wxEvtHandler*)
[7] wxEvtHandler::TryHereOnly(wxEvent&)
[8] wxEvtHandler::ProcessEventLocally(wxEvent&)
[9] wxEvtHandler::ProcessEvent(wxEvent&)
[10] wxWindowBase::TryAfter(wxEvent&)
[11] wxEvtHandler::SafelyProcessEvent(wxEvent&)
[12] wxToolBarBase::OnLeftClick(int, bool)
[13] g_closure_invoke
[14] g_signal_emit_valist
[15] g_signal_emit_by_name
[16] g_closure_invoke
[17] g_signal_emit_valist
[18] g_signal_emit
[19] g_closure_invoke
[20] g_signal_emit_valist
[21] g_signal_emit
[22] g_closure_invoke
[23] g_signal_emit_valist
[24] g_signal_emit
[25] gtk_propagate_event
[26] gtk_main_do_event
[27] g_main_context_dispatch
[28] g_main_loop_run
[29] gtk_main
[30] wxGUIEventLoop::DoRun()
[31] wxEventLoopBase::Run()
[32] wxAppConsoleBase::MainLoop()
[33] wxEntry(int&, wchar_t**)
[34] __libc_start_main

`
DATEV_Format_Pruefprogramm.zip

I am not quite sure if the file is corrupt itself - DATEV is known for shitty IT-business while being the german thing for payroll and taxes...

Compiling error with chm_lib.c

Hello thank you for this great project! I am very new to compiling projects with make. I try to build this project on my macbook with Apple A2 chip, macos: 14.2.1 (23C71).
I tried to installed the prerequest

  • wxWidgets from source make and install
  • chmlib : brew install chmlib

but when I try to compile this xchm project , it failed with following error:.

1. ./configure , with error

checking for chm_lib.h... no
configure: error: Can't find the CHMLIB header.

2. ./configure --enable-builtin-chmlib && make, with following error:

gcc -DHAVE_CONFIG_H -I. -I..  -I../art -I/usr/local/lib/wx/include/osx_cocoa-unicode-3.2 -I/usr/local/include/wx-3.2 -D_FILE_OFFSET_BITS=64 -DWXUSINGDLL -D__WXMAC__ -D__WXOSX__ -D__WXOSX_COCOA__  -g -O2  -MT chm_lib.o -MD -MP -MF .deps/chm_lib.Tpo -c -o chm_lib.o chm_lib.c
chm_lib.c:179:2: error: "Please define the sized types for your platform in chm_lib.c"
#error "Please define the sized types for your platform in chm_lib.c"
 ^
chm_lib.c:185:9: warning: 'memcpy' macro redefined [-Wmacro-redefined]
#define memcpy __builtin_memcpy
        ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/secure/_string.h:62:9: note: previous definition is here
#define memcpy(dest, ...) \
        ^
chm_lib.c:260:29: error: unknown type name 'Int32'
                            Int32 *dest)
                            ^
chm_lib.c:272:30: error: unknown type name 'UInt32'
                             UInt32 *dest)
                             ^
chm_lib.c:284:29: error: unknown type name 'Int64'
                            Int64 *dest)
                            ^
chm_lib.c:286:5: error: use of undeclared identifier 'Int64'
    Int64 temp;
    ^
chm_lib.c:290:5: error: use of undeclared identifier 'temp'
    temp=0;
    ^
chm_lib.c:293:9: error: use of undeclared identifier 'temp'
        temp <<= 8;
        ^
chm_lib.c:294:9: error: use of undeclared identifier 'temp'
        temp |= (*pData)[i-1];
        ^
chm_lib.c:296:13: error: use of undeclared identifier 'temp'; did you mean 'bcmp'?
    *dest = temp;
            ^~~~

3. I tried to modified the above error file src/chm_lib.c

remove the two blocks of data type definition for 32bit machines. the make and make install can work, but the program xchm has no repsonse.

any clue?

thanks,
CZ

Please keep settings in XDG_CONFIG_HOME/xchm/ directory

Thank you for your work on xCHM. It appears that xCHM is writing to a configuration file at $HOME/.xchm. To avoid cluttering $HOME/ with lots of dot-files for various applications, a specification has been made to define a standard place to store these. Could xCHM be changed to use this different location? I suggest $XDG_CONFIG_HOME/xchm/settings.ini or $XDG_CONFIG_HOME/xchm/config.ini.

You can see more information about this at https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html

We use xCHM to display help files for some cross-platform software. When bundling xCHM with the software in a Flatpak package, I found that because xCHM writes to $HOME/.xchm and even $HOME/.xchmXXXXXX, where XXXXXX are random characters (eg .xchm7R9qbG or .xchmfIaTpL), I needed to request for the flatpak application to have write access to the entire $HOME directory or xCHM would give errors. If xCHM only writes configuration files to the $XDG_CONFIG_HOME/xchm directory, I would just need to request permission for xCHM to write to $XDG_CONFIG_HOME/xchm -- much less significant than granting read-write access to the whole home directory.

When XDG_CONFIG_HOME is not set, a application can fall back to using the standard location of $HOME/.config.

The installation is not working

~/Desktop % git clone https://github.com/rzvncj/xCHM.git
Cloning into 'xCHM'...
remote: Enumerating objects: 5844, done.
remote: Counting objects: 100% (454/454), done.
remote: Compressing objects: 100% (142/142), done.
remote: Total 5844 (delta 323), reused 427 (delta 307), pack-reused 5390
Receiving objects: 100% (5844/5844), 2.95 MiB | 9.16 MiB/s, done.
Resolving deltas: 100% (4644/4644), done.
~/Desktop % cd xCHM 
~/Desktop/xCHM % ls
AUTHORS		Makefile.am	art		m4		rc
COPYING		NEWS		bootstrap	mac		src
ChangeLog	README		build.bat	make.bkl
Doxyfile	README.md	configure.ac	man
INSTALL		README.xmlrpc	data		po
~/Desktop/xCHM % ./configure && make
zsh: no such file or directory: ./configure
~/Desktop/xCHM % ls
AUTHORS		Makefile.am	art		m4		rc
COPYING		NEWS		bootstrap	mac		src
ChangeLog	README		build.bat	make.bkl
Doxyfile	README.md	configure.ac	man
INSTALL		README.xmlrpc	data		po
~/Desktop/xCHM % make install
make: Nothing to be done for `install'.

quite a few tile blocks instead of readable characters - it's distracting

good day, rzvncj - hope all is well.

I'm getting quite a few tile blocks instead of readable characters with some files (using serif font) is there a way to get around that? I tried a number of different fonts, but no luck. Is it a UTF-8 thing, by chance?

Thanks for your continued work on this project. It's the best chm reader available for Linux users, in my opinion.

xchm Search in the Left Panel contents section

Hello,
In Debian based Pardus operating system
In the chm extension ebook application downloaded from https://sbtransfer.saglik.gov.tr/index.php/s/E6q4pmkAHkF59eQ/download/ekitapV2.chm, Turkish language (ğ,ı,ü, etc.) cannot be searched in the left panel Contents section (For example, the word " broken "). . Is it possible to close all when the tabs are opened in the Contents section of the left panel? Can a Turkish version be added?

Thank you for your effort.

specify topic on command line?

Is it possible to specify the topic as well as the help file on the command line? I can't see any way to do that and a program I work on needs that functionality. We have been using chmsee for years, but that's no longer viable at all. xchm looks like it would work well, but always opening to the first page of the file doesn't really work for our user base.

Failed to compile on Windows

Windows 10 Pro 1909
MinGW msys gcc gcc.exe (MinGW.org GCC-6.3.0-1) 6.3.0

The first something happened while ./configure --enable-builtin-chmlib:

./configure: line 7294: top_srcdir: command not found
config.status: WARNING:  'po/Makefile.in.in' seems to ignore the --datarootdir setting

Then make
Normal log:

make  all-recursive
make[1]: Entering directory `/home/user/xchm-1.31'
Making all in m4
make[2]: Entering directory `/home/user/xchm-1.31/m4'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/home/user/xchm-1.31/m4'
Making all in po
make[2]: Entering directory `/home/user/xchm-1.31/po'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/home/user/xchm-1.31/po'
Making all in src
make[2]: Entering directory `/home/user/xchm-1.31/src'
g++ -DHAVE_CONFIG_H -I. -I..  -I../art -I/usr/local/lib/wx/include/msw-unicode-3.0 -I/usr/local/include/wx-3.0 -D_LARGEFILE_SOURCE=unknown -DWXUSINGDLL -D__WXMSW__  -std=c++14 -W -Wall -Wno-ignored-qualifiers -Wno-cast-function-type -MT chmapp.o -MD -MP -MF .deps/chmapp.Tpo -c -o chmapp.o chmapp.cpp
make[2]: Leaving directory `/home/user/xchm-1.31/src'
make[1]: Leaving directory `/home/user/xchm-1.31'

stderr log make >1.txt 2>2.txt:

In file included from C:/MinGW/msys/1.0/local/include/wx-3.0/wx/string.h:45:0,
                 from C:/MinGW/msys/1.0/local/include/wx-3.0/wx/cmdline.h:17,
                 from ./chmapp.h:27,
                 from chmapp.cpp:23:
C:/MinGW/msys/1.0/local/include/wx-3.0/wx/wxcrtbase.h: In function 'wchar_t* wxStrdup(const wchar_t*)':
C:/MinGW/msys/1.0/local/include/wx-3.0/wx/wxcrtbase.h:688:68: error: 'wcsdup' was not declared in this scope
 inline wchar_t* wxStrdup(const wchar_t *s) { return wxCRT_StrdupW(s); }
                                                                    ^
In file included from C:/MinGW/msys/1.0/local/include/wx-3.0/wx/crt.h:19:0,
                 from C:/MinGW/msys/1.0/local/include/wx-3.0/wx/string.h:4305,
                 from C:/MinGW/msys/1.0/local/include/wx-3.0/wx/cmdline.h:17,
                 from ./chmapp.h:27,
                 from chmapp.cpp:23:
C:/MinGW/msys/1.0/local/include/wx-3.0/wx/wxcrt.h: In function 'size_t wxStrnlen(const char*, size_t)':
C:/MinGW/msys/1.0/local/include/wx-3.0/wx/wxcrt.h:173:92: error: 'strnlen' was not declared in this scope
 inline size_t wxStrnlen(const char *str, size_t maxlen) { return wxCRT_StrnlenA(str, maxlen); }
                                                                                            ^
C:/MinGW/msys/1.0/local/include/wx-3.0/wx/wxcrt.h: In function 'size_t wxStrnlen(const wchar_t*, size_t)':
C:/MinGW/msys/1.0/local/include/wx-3.0/wx/wxcrt.h:187:95: error: 'wcsnlen' was not declared in this scope
 inline size_t wxStrnlen(const wchar_t *str, size_t maxlen) { return wxCRT_StrnlenW(str, maxlen); }
                                                                                               ^
In file included from C:/MinGW/msys/1.0/local/include/wx-3.0/wx/utils.h:20:0,
                 from C:/MinGW/msys/1.0/local/include/wx-3.0/wx/cursor.h:69,
                 from C:/MinGW/msys/1.0/local/include/wx-3.0/wx/event.h:21,
                 from C:/MinGW/msys/1.0/local/include/wx-3.0/wx/wx.h:24,
                 from ./chmapp.h:29,
                 from chmapp.cpp:23:
C:/MinGW/msys/1.0/local/include/wx-3.0/wx/filefn.h: In function 'int wxAccess(const wxString&, mode_t)':
C:/MinGW/msys/1.0/local/include/wx-3.0/wx/filefn.h:528:46: error: '_waccess' was not declared in this scope
     { return wxCRT_Access(path.fn_str(), mode); }
                                              ^
C:/MinGW/msys/1.0/local/include/wx-3.0/wx/filefn.h: In function 'int wxChmod(const wxString&, mode_t)':
C:/MinGW/msys/1.0/local/include/wx-3.0/wx/filefn.h:530:45: error: '_wchmod' was not declared in this scope
     { return wxCRT_Chmod(path.fn_str(), mode); }
                                             ^
C:/MinGW/msys/1.0/local/include/wx-3.0/wx/filefn.h: In function 'int wxOpen(const wxString&, int, mode_t)':
C:/MinGW/msys/1.0/local/include/wx-3.0/wx/filefn.h:532:51: error: '_wopen' was not declared in this scope
     { return wxCRT_Open(path.fn_str(), flags, mode); }
                                                   ^
C:/MinGW/msys/1.0/local/include/wx-3.0/wx/filefn.h: In function 'int wxStat(const wxString&, _stati64*)':
C:/MinGW/msys/1.0/local/include/wx-3.0/wx/filefn.h:537:43: error: '_wstati64' was not declared in this scope
     { return wxCRT_Stat(path.fn_str(), buf); }
                                           ^
C:/MinGW/msys/1.0/local/include/wx-3.0/wx/filefn.h: In function 'int wxLstat(const wxString&, _stati64*)':
C:/MinGW/msys/1.0/local/include/wx-3.0/wx/filefn.h:539:44: error: '_wstati64' was not declared in this scope
     { return wxCRT_Lstat(path.fn_str(), buf); }
                                            ^
At global scope:
cc1plus.exe: warning: unrecognized command line option '-Wno-cast-function-type'
make[2]: *** [chmapp.o] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

Crash when searching specific file, or no search results.

In Debian this bug report got created.
I think this affects upstream too.
Viewing old versions of the php chm files makes xchm crash.
Newer versions do not crash but do not show any search results.
Could you reproduce the issue with the files linked there?
And makes the patch attached there sense to you?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.