Skip to content

Latest commit

 

History

History
151 lines (99 loc) · 6.22 KB

README.md

File metadata and controls

151 lines (99 loc) · 6.22 KB

Open Witness Library

Open Witness Library is a program to read publications that carries God's true name.

tag-version downloads-count build-status

This program is a alternative for JW Library app1 for OSes that doesn't support the app or had lost support through the years. You can read .jwpub files and study Bible.

Features

This program still is a work-in-progress, so it isn't full compatible with all publications and publication's features. You can track the features present on the program here.

Installation

See Building for more information.

Building

For testing the app, you need to setup a Rust development environment on your operational system. After installing every dependency and following the prerequisites below, you should install Rustup through the official site or from your package manager and download the latest Rust language version.

Windows

For Windows, see Windows prerequisites.

MacOS (Catalina (10.15) and later)

For MacOS, you will need to install CLang and MacOS development dependencies. To do this, run the following command in your terminal:

xcode-select --install

Linux

For Linux, you will need to install some packages in order to work, see the instruction on how to install based in your Linux distro.

UI Setup

After installing the dependencies, you'll need to setup Node and NPM for compiling the application UI and serving it locally.

Install Node.js and npm

  1. Download and install Node.js, which includes npm, from the official website. Choose the LTS version for stability.
  2. Verify the installation by running the following commands in your terminal or command prompt:
node -v
npm -v

Both commands should return version numbers.

Once npm is installed, navigate to the project root directory and install the dependencies for UI compilation:

cd ui
npm install

after installation, you are free to run cargo tauri dev for running the application.

Running on mobile (NOTE: Not well supported)

Open Witness Library also runs on Android and iOS, but it isn't fully supported. In the current state, the app will probably run fine, but it not tested, so you can have some problems, glitches and bugs. If you want to test it out on Android, you need to add the Android targets to your rustup installation by running the following command:

rustup target add aarch64-linux-android armv7-linux-androideabi i686-linux-android x86_64-linux-android

You will need to install Android Studio and setup it to your system.

Install the Android SDK and NDK. You can use the SDK Manager in Android Studio to install:

  1. Android SDK Platform
  2. Android SDK Platform-Tools
  3. NDK (Side by side)
  4. Android SDK Build-Tools
  5. Android SDK Command-line Tools

You will need to configure JDK too. Android Studio includes a JDK, you will just need to add it to your environment variables:

# On windows
[System.Environment]::SetEnvironmentVariable("JAVA_HOME", "C:\Program Files\Android\Android Studio\jbr", "User")
# On MacOS
export JAVA_HOME="/Applications/Android Studio.app/Contents/jbr/Contents/Home"

# On Linux
# Note that on older Android Studio installations the 
# jbr directory may still be called jre
export JAVA_HOME=/opt/android-studio/jbr

and finally, you need to set ANDROID_HOME and NDK_HOME environment variables:

# On Windows (change NDK_VERSION to the version located in the path without brackets)
[System.Environment]::SetEnvironmentVariable("ANDROID_HOME", "$env:LocalAppData\Android\Sdk", "User")
[System.Environment]::SetEnvironmentVariable("NDK_HOME", "$env:LocalAppData\Android\Sdk\ndk\{NDK_VERSION}", "User")
# On Linux (change NDK_VERSION to the version located in the path without brackets)
export ANDROID_HOME="$HOME/Android/Sdk"
export NDK_HOME="$ANDROID_HOME/ndk/{NDK_VERSION}"

# On MacOS (change NDK_VERSION to the version located in the path without brackets)
export ANDROID_HOME="$HOME/Library/Android/sdk"
export NDK_HOME="$ANDROID_HOME/ndk/{NDK_VERSION}"

To run in Android, you can run the following command:

cargo tauri android dev

Running in iOS

You can also run on iOS, but you will need a MacOS device. I don't know if it will run since I didn't have an iOS device or a MacOS computer/laptop, but you can test it. First, make sure Xcode is properly installed. Then, you should add the iOS target to your MacOS rustup installation:

rustup target add aarch64-apple-ios x86_64-apple-ios aarch64-apple-ios-sim

Then you can run your application on iOS with the following commmand:

cargo tauri ios dev

Contributing

Pull requests are welcome. For translations, take a look on i18n/ folder. For major changes, please open an issue first to discuss what you would like to change.

Disclaimer

This program don't have any relationship with JW Library developers or the Watch Tower Bible and Tract Society of Pennsylvania. This is a program maintened by the community. Any bug you have using this program should be issued there.

If your computer or mobile phone runs JW Library, please prefer to use the official app instead of this program.

Footnotes

  1. JW Library is a registered trademark of Watch Tower Bible and Tract Society of Pennsylvania.