JohnAustinDev / xulsword

Automatically exported from code.google.com/p/xulsword
17 stars 5 forks source link

A Bible reading and study tool

xulsword is a Bible reading and study tool intended to be easy to use, yet very powerful at the same time. It utilizes popular Open Source technologies such as Node.js, React and The SWORD Project, and will always be a free program. It is designed for full internationalization, including right-to-left languages, and is fully functional offline. Modules may be installed from the Internet however.

Distinctives include:


Build Instructions

The build has two parts: a Node.js project and a native libxulsword C++ library.

Important: Each time you open a shell to build xulsword, environment variables must be set by running source ./setenv.

  1. Install nvm on Linux, Windows or Mac. On Windows nvm for Windows is recommended.
  2. Use nvm to select Node version 20.12.2. On Windows, select the x86 architecture with: nvm install 20.12.2 followed by nvm use 20.12.2 32 to select it. Install yarn globally with: nvm -i global yarn. On Windows, administrator priviledge is required for these steps (subsequent steps do not require admin priviledge).
  3. Run source ./setenv to set environment variables. On Windows, the Git Bash shell that comes with Git for Windows can be used to run this, and subsequent command line steps.
  4. Build the native libxulsword C++ dynamic library for your system (this step only needs to be done once and won't be needed again until the rare occasion that xulsword/Cpp C++ source changes):
  1. Run yarn to install Node.js dependencies.
  2. Start xulsword with yarn start.

NOTE: In the very rare occasion that the libxulsword interface changes, the Node.js libxulsword.node addon will need to be recompiled on each operating system, and the addon committed to git. See libxulsword ReadMe.


Packaging Instructions

Packaged applications for each operating system are created with:

yarn package-linux
yarn package-32win
yarn package-64win

PECL extension: phpsword

The PHP extension brings libxulsword's API into php.

Compilation and use

Compile the extension by going to the xulsword/Cpp/phpsword directory and running:

$ phpize
$ ./configure
$ make
$ sudo make install

This will install the extension to your php shared extensions directory.

Next, to enable the extension you can add the following to your php.ini:

[PHP]
extension=phpsword.so

And then restart PHP:

$ sudo apache2ctl restart

Finally, to access phpsword from PHP, do something like this:

if (!extension_loaded("phpsword")) {
    header('Location: ' . $redirect_URL);
    exit;
}

$Sword = new phpsword($repository_path);

$My_modlist = $Sword->getModuleList();