I understand that all of the dependencies have to be install first and I get how to do that.
I ran Slackware for 9 years so I am proficient in installing dependencies and in their order.
Before building Xiphos, please ensure that you have the platform specific
dependencies installed:
chmcmd Creates a Compressed HTML help file (chm)
CMake Cross-platform make system
Gtk+-2.0 or GTK+-3.0 The GIMP Toolkit
WebKit1 or Webkit2 Port to Gtk+ of the WebKit rendering engine
appstream-util Utility to validate AppStream metadata
biblesync Protocol to support Bible software shared co-navigation
dbus-glib API for use of D-Bus from GLib applications
desktop-file-validate Validates a desktop file
gcc GCC, the GNU Compiler Collection
gconfmm C++ wrappers for GConf
gtkhtml Lightweight HTML rendering/editing engine
intltool An internationalization tool
intltool Set of tools to centralize translation
itstool Translates XML documents with PO files
libgsf The G Structured File Library
libuuid universally unique identifier library
libxml2 XML C parser and toolkit
make A GNU tool which simplifies the build process for users
minizip Minizip contrib in zlib
sword >= 1.8.1 CrossWire Bible Society's Bible software
xmllint Validates an XML file against an XSD schema
yelp-build Creates HTML, EPUB, and other files from help files
Xiphos uses CMake to compile code.
CMake is a cross-platform tool for generating makefiles (as well as project files
used by IDEs).
The current version of the buildsystem is capable of building and packaging
Xiphos for the following platforms:
- Linux (GNU Makefiles, Ninja)
- Windows (Cross compiling on Fedora 30 only)
Should work, but actually untested:
- FreeBSD (GNU Makefiles)
### Out-of-source tree builds
While the legacy build systems typically used in-source builds, it's highly
recommended to use *out-of-source* builds with CMake.
The necessary runtime dependencies such as generated source files, static
libraries, translated files are copied over to the build directory automatically
during the build process.
Using a build tree that is separate from the source tree will prevent CMake from
generating any files in the source tree, keeping it clean.
To set-up an out-of-source build, create a completely separate directory, usually
as a sibling of the xiphos directory:
$ ls
xiphos
$ mkdir build
$ ls
build xiphos
$ cd build
The rest of the instructions is were I'm confused:
Configure CMake options
`CMAKE_INSTALL_PREFIX` Install directory. This variable defaults to `/usr/local`
on UNIX and `c:/Program Files/${PROJECT_NAME}` on Windows®.
For example, for setting up install in `/usr`, add: `-DCMAKE_INSTALL_PREFIX=/usr`
`CMAKE_BUILD_TYPE` defaults to `Release` (or to `Debug` if a .git dir exists)
Possible values are empty, `Debug`, `Release`, `RelWithDebInfo`, `MinSizeRel`.
For forcing to `Release`, add: `-DCMAKE_BUILD_TYPE=Release`
`CMAKE_GENERATOR` A CMake Generator is responsible for writing the input files
for a native build system:
- Makefiles for GNU Make: standard feature
- Ninja files for Ninja: `-GNinja`
For other options, see:
### Configure Xiphos Options
Xiphos supports a number of build options that can enable or disable certain
functionality. These options must be set when running CMake with
`-DENABLE_<OPTION>=<ON|OFF`. `ON` forcefully enables the dependency
and the CMake run will fail if the related dependency is not available.
This is mostly useful for packagers. `OFF` will disable the feature.
Example for forcefully enabling Gtk2 instead of Gtk3
$ cmake -DGTK2=ON ../xiphos
Example for building with WebKitGtk1 and the webkit editor:
$ cmake -DWEBKIT1=ON -DGTKHTML=OFF ../xiphos
List of options:
Option | Functionality | Default
-------- | ---------------------------------------------- | -------
GTK2 | Force UI build with Gtk2 instead of Gtk3. | OFF
GTKHTML | Force gtkhtml editor instead of webkit editor. | OFF
WEBKIT1 | Force webkit1 instead of webkit2. | OFF
DBUS | Use the Xiphos dbus API. | ON
CHATTY | Enable lots of tracing. | OFF
HELP | Creating help files. | ON
STRIP | Strip resulting binary (Release only). | OFF
DEBUG | Enable Xiphos g_str debugging functions. | OFF
DELINT | Build with: -Wall -Werror. | OFF
CONSOLE | Enable console window in win32. | ON
POSTINST | Enable post-install tasks. | ON
For more information and an updated list of options, please check the file
`cmake/XiphosOptions.cmake`
Build options
-------------
### Build with Makefiles
GNU/Make is the standard build automation tool that automatically builds executable programs and libraries from source code by reading Makefiles.
$ make -j$(nproc)
or:
$ make VERBOSE=1 -j$(nproc)
or:
$ cmake --build . -- VERBOSE=1 -j$(nproc)
### Build with Ninja
Ninja is an alternative build system with a focus on speed. Use `-G Ninja` to force CMake to generate Ninja build files during configuration process.
$ ninja -v all
or:
$ cmake --build . -- -v
Build Xiphos on *Fedora*, *Red Hat* or *CentOS*:
================================================
## 1. Clone Xiphos git
$ git https://github.com/crosswire/xiphos.git
## 2. Create and enter the build directory
Create a build directory as a sibling of the xiphos directory:
$ mkdir build
$ ls
build xiphos
$ cd build
## 3. Install dependencies
$ sudo dnf install cmake gcc-c++ intltool make gtk3-devel dbus-glib-devel gtkhtml3-devel webkitgtk4-devel libidn-devel libxml2-devel libgsf-devel minizip-devel sword-devel libuuid-devel biblesync-devel intltool libappstream-glib-devel desktop-file-utils itstool yelp yelp-tools
## 4. Configure build
$ cmake -DCMAKE_INSTALL_PREFIX=/usr -DGTKHTML=ON ../xiphos
## 5. Build and install, run xiphos
$ make -j$(nproc) && sudo make install
$ cd ~
$ xiphos
I ran Slackware for 9 years so I am proficient in installing dependencies and in their order.
Before building Xiphos, please ensure that you have the platform specific
dependencies installed:
chmcmd Creates a Compressed HTML help file (chm)
CMake Cross-platform make system
Gtk+-2.0 or GTK+-3.0 The GIMP Toolkit
WebKit1 or Webkit2 Port to Gtk+ of the WebKit rendering engine
appstream-util Utility to validate AppStream metadata
biblesync Protocol to support Bible software shared co-navigation
dbus-glib API for use of D-Bus from GLib applications
desktop-file-validate Validates a desktop file
gcc GCC, the GNU Compiler Collection
gconfmm C++ wrappers for GConf
gtkhtml Lightweight HTML rendering/editing engine
intltool An internationalization tool
intltool Set of tools to centralize translation
itstool Translates XML documents with PO files
libgsf The G Structured File Library
libuuid universally unique identifier library
libxml2 XML C parser and toolkit
make A GNU tool which simplifies the build process for users
minizip Minizip contrib in zlib
sword >= 1.8.1 CrossWire Bible Society's Bible software
xmllint Validates an XML file against an XSD schema
yelp-build Creates HTML, EPUB, and other files from help files
Xiphos uses CMake to compile code.
CMake is a cross-platform tool for generating makefiles (as well as project files
used by IDEs).
The current version of the buildsystem is capable of building and packaging
Xiphos for the following platforms:
- Linux (GNU Makefiles, Ninja)
- Windows (Cross compiling on Fedora 30 only)
Should work, but actually untested:
- FreeBSD (GNU Makefiles)
### Out-of-source tree builds
While the legacy build systems typically used in-source builds, it's highly
recommended to use *out-of-source* builds with CMake.
The necessary runtime dependencies such as generated source files, static
libraries, translated files are copied over to the build directory automatically
during the build process.
Using a build tree that is separate from the source tree will prevent CMake from
generating any files in the source tree, keeping it clean.
To set-up an out-of-source build, create a completely separate directory, usually
as a sibling of the xiphos directory:
$ ls
xiphos
$ mkdir build
$ ls
build xiphos
$ cd build
The rest of the instructions is were I'm confused:
Configure CMake options
`CMAKE_INSTALL_PREFIX` Install directory. This variable defaults to `/usr/local`
on UNIX and `c:/Program Files/${PROJECT_NAME}` on Windows®.
For example, for setting up install in `/usr`, add: `-DCMAKE_INSTALL_PREFIX=/usr`
`CMAKE_BUILD_TYPE` defaults to `Release` (or to `Debug` if a .git dir exists)
Possible values are empty, `Debug`, `Release`, `RelWithDebInfo`, `MinSizeRel`.
For forcing to `Release`, add: `-DCMAKE_BUILD_TYPE=Release`
`CMAKE_GENERATOR` A CMake Generator is responsible for writing the input files
for a native build system:
- Makefiles for GNU Make: standard feature
- Ninja files for Ninja: `-GNinja`
For other options, see:
### Configure Xiphos Options
Xiphos supports a number of build options that can enable or disable certain
functionality. These options must be set when running CMake with
`-DENABLE_<OPTION>=<ON|OFF`. `ON` forcefully enables the dependency
and the CMake run will fail if the related dependency is not available.
This is mostly useful for packagers. `OFF` will disable the feature.
Example for forcefully enabling Gtk2 instead of Gtk3
$ cmake -DGTK2=ON ../xiphos
Example for building with WebKitGtk1 and the webkit editor:
$ cmake -DWEBKIT1=ON -DGTKHTML=OFF ../xiphos
List of options:
Option | Functionality | Default
-------- | ---------------------------------------------- | -------
GTK2 | Force UI build with Gtk2 instead of Gtk3. | OFF
GTKHTML | Force gtkhtml editor instead of webkit editor. | OFF
WEBKIT1 | Force webkit1 instead of webkit2. | OFF
DBUS | Use the Xiphos dbus API. | ON
CHATTY | Enable lots of tracing. | OFF
HELP | Creating help files. | ON
STRIP | Strip resulting binary (Release only). | OFF
DEBUG | Enable Xiphos g_str debugging functions. | OFF
DELINT | Build with: -Wall -Werror. | OFF
CONSOLE | Enable console window in win32. | ON
POSTINST | Enable post-install tasks. | ON
For more information and an updated list of options, please check the file
`cmake/XiphosOptions.cmake`
Build options
-------------
### Build with Makefiles
GNU/Make is the standard build automation tool that automatically builds executable programs and libraries from source code by reading Makefiles.
$ make -j$(nproc)
or:
$ make VERBOSE=1 -j$(nproc)
or:
$ cmake --build . -- VERBOSE=1 -j$(nproc)
### Build with Ninja
Ninja is an alternative build system with a focus on speed. Use `-G Ninja` to force CMake to generate Ninja build files during configuration process.
$ ninja -v all
or:
$ cmake --build . -- -v
Build Xiphos on *Fedora*, *Red Hat* or *CentOS*:
================================================
## 1. Clone Xiphos git
$ git https://github.com/crosswire/xiphos.git
## 2. Create and enter the build directory
Create a build directory as a sibling of the xiphos directory:
$ mkdir build
$ ls
build xiphos
$ cd build
## 3. Install dependencies
$ sudo dnf install cmake gcc-c++ intltool make gtk3-devel dbus-glib-devel gtkhtml3-devel webkitgtk4-devel libidn-devel libxml2-devel libgsf-devel minizip-devel sword-devel libuuid-devel biblesync-devel intltool libappstream-glib-devel desktop-file-utils itstool yelp yelp-tools
## 4. Configure build
$ cmake -DCMAKE_INSTALL_PREFIX=/usr -DGTKHTML=ON ../xiphos
## 5. Build and install, run xiphos
$ make -j$(nproc) && sudo make install
$ cd ~
$ xiphos