Commit cba9794a authored by Kartik Mistry's avatar Kartik Mistry 🇮🇳

Update upstream source from tag 'upstream/1.30'

Update to upstream version '1.30'
with Debian dir fd9d11f30268847d4a737f5790c0387c1606f515
parents 6e8b2ea6 bbaedb73
matrix:
include:
# works on Precise and Trusty
- os: linux
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-7 autopoint libwxgtk3.0-dev libchm-dev
compiler: gcc
env:
- MATRIX_EVAL="CC=gcc-7 && CXX=g++-7"
- os: linux
dist: xenial
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- autopoint libwxgtk3.0-dev libchm-dev
compiler: clang
- os: osx
osx_image: xcode10.2
addons:
homebrew:
packages:
- chmlib
- wxmac
update: true
language: c++
before_install:
- eval "PATH=${PATH}:/usr/local/opt/gettext/bin"
- eval "${MATRIX_EVAL}"
script:
./bootstrap && ./configure && make
This diff is collapsed.
......@@ -369,3 +369,38 @@
+ renamed configure.in to configure.ac
+ modernized autotools syntax
+ minor fixes, code is now wxWidgets-2.9-friendly
* 1.24:
+ it is now possible to build xCHM without an external
chmlib library (by using ./configure --enable-builtin-chmlib)
+ added Mac icons and .plist
* 1.25:
+ updated some of the code for modern C++.
+ minor code cleanup.
+ cleared a few warnings.
* 1.26:
+ more C++ code cleanup.
+ now requiring at least wxWidgets 3.0.0 to build.
+ minor optimizations.
+ fixed scrolling on loading new pages.
+ fixed Mac build.
+ fixed just-broken new tab behaviour.
+ 1.27:
+ always display tabs.
+ display the loaded page title in the tab only (no longer in the main
window title bar).
+ fixed a title search bug.
+ 1.28:
+ fixed configure-time XMLRPCDIR detection.
+ added Ctrl-'=' and Ctrl-'-' as shortcuts for zoom-in/out.
+ 1.29:
+ added manpage (from Debian), Gnome files (from Arch).
+ more code cleanup.
+ 1.30:
+ install icons to $(datadir)/icons/hicolor/<RESOLUTION>/apps/.
This source diff could not be displayed because it is too large. You can view the blob instead.
SUBDIRS = m4 po src art
SUBDIRS = m4 po src art mac data man
EXTRA_DIST = config.rpath Doxyfile README.xmlrpc rc/xchm.rc rc/xchm.ico
ACLOCAL_AMFLAGS = -I m4
#-I /usr/local/share/aclocal
macbundle: all
mkdir -p $(top_srcdir)/xCHM.app/Contents/MacOS
mkdir -p $(top_srcdir)/xCHM.app/Contents/Resources
cp -f $(top_srcdir)/mac/Info.plist $(top_srcdir)/xCHM.app/Contents/
cp -f $(top_srcdir)/mac/xCHM.icns $(top_srcdir)/xCHM.app/Contents/Resources
clean-local:
-rm -rf $(top_srcdir)/xCHM.app
.PHONY: bundle
This diff is collapsed.
xCHM - the CHM viewer for UNIX
(c) 2003 - 2013 Razvan Cojocaru <rzvncj@gmail.com>
(c) 2003 - 2019 Razvan Cojocaru <rzvncj@gmail.com>
* Prerequisites
In order to be able to compile the code you need to have wxWidgets and
......@@ -21,7 +20,6 @@
After you've installed the above you're ready for the next phase.
* Installing
Type ./configure --help if you're interested in parameters you can pass
......@@ -40,7 +38,6 @@
xchm
and start your session.
* Generating documentation
......@@ -54,19 +51,4 @@
directory will be created in the process of creating the documentation so
it's ok that it's not present by default in the tarball.
* Legal stuff
As far as I know this is legal code. If you know that the code is in any
way illegal in your country, please drop me a note and stop using it / do
not install it.
* Contact
For bug reports and patches, please use the address above.
For everything else, count to 10 and if you still want to send the
message, go ahead. Can't promise I'll answer everything though.
* Happy reading!
# xCHM
UNIX CHM viewer.
## Screenshots
![Python documentation](./art/screenshot.png)
## 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
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
* [wxWidgets](http://www.wxwidgets.org) - GUI
* [CHMLIB](http://www.jedrea.com/chmlib/) - CHM access logic
## 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](https://packages.debian.org/search?searchon=names&keywords=xchm),
[Arch](https://www.archlinux.org/packages/community/x86_64/xchm/),
[Gentoo](https://packages.gentoo.org/packages/app-text/xchm),
[Ubuntu](https://packages.ubuntu.com/search?keywords=xchm), etc.)
For Mac, please see [MacPorts](https://www.macports.org/ports.php?by=name&substr=xchm).
Windows users can (and should) just use the standard viewer (hh.exe).
## Authors
* **Razvan Cojocaru** [rzvncj](https://github.com/rzvncj)
## Happy reading!
PIXMAPS = xchm-16.xpm xchm-32.xpm xchm-48.xpm xchm-128.xpm xchmdoc-16.xpm \
xchmdoc-32.xpm xchmdoc-48.xpm xchmdoc-128.xpm \
xchm-16.png xchm-32.png xchm-48.png xchm-128.png xchmdoc-16.png \
xchmdoc-32.png xchmdoc-48.png xchmdoc-128.png
EXTRA_DIST = *.xpm *.png
distpixmapdir = $(datadir)/pixmaps
distpixmap_DATA = $(PIXMAPS)
iconsdir = $(datadir)/icons/hicolor
nobase_dist_icons_DATA = \
16x16/apps/* 32x32/apps/* 48x48/apps/* 128x128/apps/*
This diff is collapsed.
#!/bin/sh
#aclocal \
#&& automake --gnu --add-missing \
#&& autoconf
autoreconf --install
nmake -f makefile.vc WX_DEBUG=0 WX_SHARED=0 WX_UNICODE=1 WXWIN="g:\tmp\xchm\wxMSW-2.8.11"
This diff is collapsed.
/* config.h.in. Generated from configure.ac by autoheader. */
/* Define to 1 if translation of program messages to the user's native
language is requested. */
#undef ENABLE_NLS
/* Define to 1 if you have the MacOS X function CFLocaleCopyCurrent in the
CoreFoundation framework. */
#undef HAVE_CFLOCALECOPYCURRENT
/* Define to 1 if you have the MacOS X function CFPreferencesCopyAppValue in
the CoreFoundation framework. */
#undef HAVE_CFPREFERENCESCOPYAPPVALUE
/* Define if the GNU dcgettext() function is already present or preinstalled.
*/
#undef HAVE_DCGETTEXT
/* Define if the GNU gettext() function is already present or preinstalled. */
#undef HAVE_GETTEXT
/* Define if you have the iconv() function and it works. */
#undef HAVE_ICONV
/* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H
/* Define to 1 if you have the `chm' library (-lchm). */
#undef HAVE_LIBCHM
/* Define to 1 if you have the <memory.h> header file. */
#undef HAVE_MEMORY_H
/* Define to 1 if you have the <stdint.h> header file. */
#undef HAVE_STDINT_H
/* Define to 1 if you have the <stdlib.h> header file. */
#undef HAVE_STDLIB_H
/* Define to 1 if you have the <strings.h> header file. */
#undef HAVE_STRINGS_H
/* Define to 1 if you have the <string.h> header file. */
#undef HAVE_STRING_H
/* Define to 1 if you have the <sys/stat.h> header file. */
#undef HAVE_SYS_STAT_H
/* Define to 1 if you have the <sys/types.h> header file. */
#undef HAVE_SYS_TYPES_H
/* Define to 1 if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H
/* Define to 1 if you have the <XmlRpc.h> header file. */
#undef HAVE_XMLRPC_H
/* Name of package */
#undef PACKAGE
/* Define to the address where bug reports for this package should be sent. */
#undef PACKAGE_BUGREPORT
/* Define to the full name of this package. */
#undef PACKAGE_NAME
/* Define to the full name and version of this package. */
#undef PACKAGE_STRING
/* Define to the one symbol short name of this package. */
#undef PACKAGE_TARNAME
/* Define to the home page for this package. */
#undef PACKAGE_URL
/* Define to the version of this package. */
#undef PACKAGE_VERSION
/* Define to 1 if you have the ANSI C header files. */
#undef STDC_HEADERS
/* Version number of package */
#undef VERSION
/* Compile with XmlRpc functionality. */
#undef WITH_LIBXMLRPC
/* Define to `short' if <sys/types.h> does not define. */
#undef int16_t
/* Define to `int' if <sys/types.h> does not define. */
#undef int32_t
/* Define to `unsigned short' if <sys/types.h> does not define. */
#undef uint16_t
/* Define to `unsigned int' if <sys/types.h> does not define. */
#undef uint32_t
/* Define to `unsigned long long' if <sys/types.h> does not define. */
#undef uint64_t
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
AC_INIT([xchm], [1.23])
AC_INIT([xchm], [1.30])
AC_CONFIG_SRCDIR(src/chmfile.cpp)
AC_CONFIG_HEADERS(config.h)
......@@ -8,7 +7,7 @@ AM_GNU_GETTEXT_VERSION([0.14.3])
AM_OPTIONS_WXCONFIG
AM_PATH_WXCONFIG(2.8.0, wxWin=1, wxWin=0, [std,aui])
AM_PATH_WXCONFIG(3.0.0, wxWin=1, wxWin=0, [std,aui])
if test "$wxWin" != 1; then
AC_MSG_ERROR([
wxWidgets must be installed on your system
......@@ -35,9 +34,9 @@ wx_config_minor_version=`echo $WX_VERSION | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
CPPFLAGS="$CPPFLAGS $WX_CPPFLAGS"
CXXFLAGS="$CXXFLAGS $WX_CXXFLAGS_ONLY -W -Wall"
CXXFLAGS="$CXXFLAGS $WX_CXXFLAGS_ONLY -std=c++14 -W -Wall -Wno-ignored-qualifiers -Wno-cast-function-type"
CFLAGS="$CFLAGS $WX_CFLAGS_ONLY"
XMLRPCDIR=""
AC_ARG_ENABLE(static,
[ --enable-static link statically to wxWidgets.],
......@@ -45,6 +44,15 @@ AC_ARG_ENABLE(static,
LINKOPT="$WX_LIBS")
AC_SUBST(LINKOPT)
AC_ARG_ENABLE(builtin-chmlib,
[ --enable-builtin-chmlib compile with included chmlib source.],
[case "${enableval}" in
yes) builtin_chmlib=true ;;
no) builtin_chmlib=false ;;
*) AC_MSG_ERROR([bad value ${enableval} for --enable-builtin-chmlib]) ;;
esac],[builtin_chmlib=false])
AM_CONDITIONAL([ENABLE_BUILTIN_CHMLIB], [test x$builtin_chmlib = xtrue])
AC_ARG_ENABLE(debug,
[ --enable-debug compile with gdb debug information.],
CXXFLAGS="$CXXFLAGS -g")
......@@ -52,11 +60,22 @@ AC_ARG_ENABLE(debug,
AC_ARG_ENABLE(optimize,
[ --enable-optimize optimize compiled code (-O2).],
CXXFLAGS="$CXXFLAGS -O2")
AC_ARG_ENABLE(xmlrpc,
[ --enable-xmlrpc Enable XmlRpc functionality in xchm.],
AC_ARG_ENABLE(xmlrpc,
[ --enable-xmlrpc enable XmlRpc functionality in xchm.],
[ enable_xmlrpc=yes ])
AC_ARG_WITH(xmlrpc-dir,
[ --with-xmlrpc-dir specify XMLRPC++ includes and libraries parent directory],
XMLRPCDIR="$withval")
if test -n "$XMLRPCDIR" ; then
CFLAGS="-I$XMLRPCDIR/include -I$XMLRPCDIR/include/xmlrpcpp $CFLAGS"
CXXFLAGS="-I$XMLRPCDIR/include -I$XMLRPCDIR/include/xmlrpcpp $CXXFLAGS"
CPPFLAGS="-I$XMLRPCDIR/include -I$XMLRPCDIR/include/xmlrpcpp $CPPFLAGS"
LDFLAGS="-L$XMLRPCDIR/lib -Wl,-rpath,$XMLRPCDIR/lib $LDFLAGS"
fi
AM_INIT_AUTOMAKE
AC_PROG_CXX
AC_PROG_INSTALL
......@@ -67,24 +86,29 @@ AC_CHECK_TYPE(uint16_t, unsigned short)
AC_CHECK_TYPE(uint32_t, unsigned int)
AC_CHECK_TYPE(uint64_t, unsigned long long)
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.])
if test x$builtin_chmlib = xtrue ; then
AC_DEFINE(ENABLE_BUILTIN_CHMLIB, 1, [Compile with included chmlib source.])
else
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.])
)
fi
if test "x$enable_xmlrpc" = "xyes" ; then
AC_LANG_PUSH(C++)
AC_CHECK_HEADERS(XmlRpc.h,,
AC_MSG_ERROR([Can't find the XmlRpc++ header.]))
AC_LANG_PUSH([C++])
AC_CHECK_HEADER(XmlRpc.h,,AC_MSG_ERROR([Can't find the XmlRpc++ header.]))
LIBS="$LIBS -lXmlRpc -lssl"
LIBS="$LIBS -lxmlrpcpp -lssl"
AC_TRY_LINK([#include<XmlRpc.h> ],
[XmlRpc::XmlRpcServer svr;],
[AC_DEFINE(WITH_LIBXMLRPC,1,[Compile with XmlRpc functionality.])],
[AC_DEFINE(WITH_LIBXMLRPC, 1, [Compile with XmlRpc functionality.])],
AC_MSG_ERROR([Can't find/use -lXmlRpc. Please install XmlRpc++ first.])
)
AC_LANG_POP()
AC_LANG_POP([C++])
fi
case "$host" in
......@@ -94,5 +118,6 @@ case "$host" in
;;
esac
AC_OUTPUT(Makefile src/Makefile art/Makefile po/Makefile.in m4/Makefile )
AC_OUTPUT(Makefile src/Makefile art/Makefile po/Makefile.in m4/Makefile
mac/Makefile data/Makefile man/Makefile)
EXTRA_DIST = xchm.appdata.xml xchm.desktop
applicationsdir = $(datadir)/applications
applications_DATA = xchm.desktop
metainfodir = $(datadir)/metainfo
metainfo_DATA = xchm.appdata.xml
<?xml version="1.0" encoding="UTF-8"?>
<component type="desktop-application">
<id>com.github.xchm</id>
<launchable type="desktop-id">xchm.desktop</launchable>
<name>xCHM</name>
<summary>View CHM files</summary>
<metadata_license>CC0-1.0</metadata_license>
<project_license>GPL-2.0</project_license>
<description>
<p>xCHM is a viewer for Compiled HTML Help (CHM) files. It can show the contents tree if one is available, print the current page and do the usual history stunts. It allows one to change fonts and search for text in all the pages of the file, or in the page's titles.</p>
</description>
<screenshots>
<screenshot type="default">
<image>https://raw.githubusercontent.com/rzvncj/xCHM/master/art/screenshot.png</image>
</screenshot>
</screenshots>
<url type="homepage">https://github.com/rzvncj/xCHM</url>
</component>
[Desktop Entry]
Name=xCHM
Comment=View CHM files
Exec=xchm %f
Terminal=false
Type=Application
Icon=xchm
Categories=Viewer;Utility;
MimeType=application/x-chm;application/vnd.ms-htmlhelp;
StartupNotify=true
This diff is collapsed.
#!/bin/sh
#
# install - install a program, script, or datafile
# This comes from X11R5 (mit/util/scripts/install.sh).
#
# Copyright 1991 by the Massachusetts Institute of Technology
#
# Permission to use, copy, modify, distribute, and sell this software and its
# documentation for any purpose is hereby granted without fee, provided that
# the above copyright notice appear in all copies and that both that
# copyright notice and this permission notice appear in supporting
# documentation, and that the name of M.I.T. not be used in advertising or
# publicity pertaining to distribution of the software without specific,
# written prior permission. M.I.T. makes no representations about the
# suitability of this software for any purpose. It is provided "as is"
# without express or implied warranty.
#
# Calling this script install-sh is preferred over install.sh, to prevent
# `make' implicit rules from creating a file called install from it
# when there is no Makefile.
#
# This script is compatible with the BSD install script, but was written
# from scratch. It can only install one file at a time, a restriction
# shared with many OS's install programs.
# set DOITPROG to echo to test this script
# Don't use :- since 4.3BSD and earlier shells don't like it.
doit="${DOITPROG-}"
# put in absolute paths if you don't have them in your path; or use env. vars.
mvprog="${MVPROG-mv}"
cpprog="${CPPROG-cp}"
chmodprog="${CHMODPROG-chmod}"
chownprog="${CHOWNPROG-chown}"
chgrpprog="${CHGRPPROG-chgrp}"
stripprog="${STRIPPROG-strip}"
rmprog="${RMPROG-rm}"
mkdirprog="${MKDIRPROG-mkdir}"
transformbasename=""
transform_arg=""
instcmd="$mvprog"
chmodcmd="$chmodprog 0755"
chowncmd=""
chgrpcmd=""
stripcmd=""
rmcmd="$rmprog -f"
mvcmd="$mvprog"
src=""
dst=""
dir_arg=""
while [ x"$1" != x ]; do
case $1 in
-c) instcmd=$cpprog
shift
continue;;
-d) dir_arg=true
shift
continue;;
-m) chmodcmd="$chmodprog $2"
shift
shift
continue;;
-o) chowncmd="$chownprog $2"
shift
shift
continue;;
-g) chgrpcmd="$chgrpprog $2"
shift
shift
continue;;
-s) stripcmd=$stripprog
shift
continue;;
-t=*) transformarg=`echo $1 | sed 's/-t=//'`
shift
continue;;
-b=*) transformbasename=`echo $1 | sed 's/-b=//'`
shift
continue;;
*) if [ x"$src" = x ]
then
src=$1
else
# this colon is to work around a 386BSD /bin/sh bug
:
dst=$1
fi
shift
continue;;
esac
done
if [ x"$src" = x ]
then
echo "$0: no input file specified" >&2
exit 1
else
:
fi
if [ x"$dir_arg" != x ]; then
dst=$src
src=""
if [ -d "$dst" ]; then
instcmd=:
chmodcmd=""
else
instcmd=$mkdirprog
fi
else
# Waiting for this to be detected by the "$instcmd $src $dsttmp" command
# might cause directories to be created, which would be especially bad
# if $src (and thus $dsttmp) contains '*'.
if [ -f "$src" ] || [ -d "$src" ]
then
:
else
echo "$0: $src does not exist" >&2
exit 1
fi
if [ x"$dst" = x ]
then
echo "$0: no destination specified" >&2
exit 1
else
:
fi
# If destination is a directory, append the input filename; if your system
# does not like double slashes in filenames, you may need to add some logic
if [ -d "$dst" ]
then
dst=$dst/`basename "$src"`
else
:
fi
fi
## this sed command emulates the dirname command
dstdir=`echo "$dst" | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
# Make sure that the destination directory exists.
# this part is taken from Noah Friedman's mkinstalldirs script
# Skip lots of stat calls in the usual case.
if [ ! -d "$dstdir" ]; then
defaultIFS='
'
IFS="${IFS-$defaultIFS}"
oIFS=$IFS
# Some sh's can't handle IFS=/ for some reason.
IFS='%'
set - `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'`
IFS=$oIFS
pathcomp=''
while [ $# -ne 0 ] ; do