tachiyomi-extensions-inspector/CONTRIBUTING.md

53 lines
3.5 KiB
Markdown
Raw Normal View History

2021-05-07 15:47:55 +02:00
# Contributing
## Where should I start?
2021-05-07 17:02:32 +02:00
Checkout [This Kanban Board](https://github.com/Suwayomi/Tachidesk/projects/1) to see the rough development roadmap.
2021-05-07 17:05:11 +02:00
**Note to potential contributors:** Notify the developers on Suwayomi discord (#programming channel) or open a WIP pull request before starting if you decide to take on working on anything from/not from the roadmap in order to avoid parallel efforts on the same issue/feature.
2021-05-07 15:47:55 +02:00
## How does Tachidesk work?
This project has two components:
1. **server:** contains the implementation of [tachiyomi's extensions library](https://github.com/tachiyomiorg/extensions-lib) and uses an Android compatibility library to run apk extensions. All this concludes to serving a REST API to `webUI`.
2. **webUI:** A react SPA(`create-react-app`) project that works with the server to do the presentation.
2021-05-07 16:32:56 +02:00
## Why a web app?
This structure is chosen to
- Achieve the maximum multi-platform-ness
- Gives the ability to acces Tachidesk from a remote web browser e.g. your phone, tablet or smart TV
- Eaise development of alternative user intefaces for Tachidesk
## User Interfaces for Tachidesk server
2021-05-19 00:22:28 +02:00
Currently, there are three known interfaces for Tachidesk:
2021-05-07 16:32:56 +02:00
1. [webUI](https://github.com/Suwayomi/Tachidesk/tree/master/webUI/react): The react SPA that Tachidesk is traditionally shipped with.
2. [TachideskJUI](https://github.com/Suwayomi/TachideskJUI): A Jetbrains Compose Native app, re-uses components made for the upcoming Tachiyomi 1.x
3. [Equinox](https://github.com/Suwayomi/Equinox): A web user interface made with Vue.js, in super early stages of development.
2021-05-07 15:47:55 +02:00
## Building from source
2021-05-07 16:43:04 +02:00
### Prerequisites
You need these software packages installed in order to build the project
### Server
2021-05-07 15:47:55 +02:00
- Java Development Kit and Java Runtime Environment version 8 or newer(both Oracle JDK and OpenJDK works)
2021-05-07 16:43:04 +02:00
- Android stubs jar
- Manual download: Download [android.jar](https://raw.githubusercontent.com/Suwayomi/Tachidesk/android-jar/android.jar) and put it under `AndroidCompat/lib`.
2021-05-19 00:20:22 +02:00
- Automated download: Run `AndroidCompat/getAndroid.sh`(MacOS/Linux) or `AndroidCompat/getAndroid.ps1`(Windows) from project's root directory to download and rebuild the jar file from Google's repository.
2021-05-07 16:43:04 +02:00
### webUI
2021-05-07 15:47:55 +02:00
- Nodejs LTS or latest
- Yarn
- Git
### building the full-blown jar
Run `./gradlew :webUI:copyBuild server:shadowJar`, the resulting built jar file will be `server/build/Tachidesk-vX.Y.Z-rxxx.jar`.
### building without `webUI` bundled(server only)
Delete the `server/src/main/resources/react` directory if exists from previous runs, then run `./gradlew server:shadowJar`, the resulting built jar file will be `server/build/Tachidesk-vX.Y.Z-rxxx.jar`.
### building the Windows package
2021-05-19 00:17:48 +02:00
First Build the jar, then cd into the `scripts` directory and run `./windows<bits>-bundler.sh` (or `./windows<bits>-bundler.ps1` if you are on windows), the resulting built zip package file will be `server/build/Tachidesk-vX.Y.Z-rxxx-win64.zip`.
2021-05-07 16:35:11 +02:00
## Running in development mode
2021-05-19 00:19:10 +02:00
First satisfy [the prerequisites](#prerequisites)
2021-05-07 16:35:11 +02:00
### server
2021-05-07 16:43:04 +02:00
run `./gradlew :server:run --stacktrace` to run the server
2021-05-07 16:35:11 +02:00
### webUI
2021-05-07 15:47:55 +02:00
How to do it is described in `webUI/react/README.md` but for short,
first cd into `webUI/react` then run `yarn` to install the node modules(do this only once)
2021-05-19 00:51:47 +02:00
then `yarn start` to start the development server, if a new browser window doesn't get opened automatically,
2021-05-07 15:47:55 +02:00
then open `http://127.0.0.1:3000` in a modern browser. This is a `create-react-app` project
and supports HMR and all the other goodies you'll need.