2019-03-07 14:30:53 +00:00
|
|
|
# Setup the develop environment on windows
|
|
|
|
## 1.0 Requirements
|
|
|
|
The following tools or applications are required to develop the web client:
|
|
|
|
- [1.1 IDE](#11-ide)
|
2020-04-18 20:30:02 +00:00
|
|
|
- [1.2 NodeJS](#12-nodejs)
|
|
|
|
- [1.2.2 NPM](#122-npm)
|
|
|
|
- [1.3 Git bash](#13-git-bash)
|
2019-03-07 14:30:53 +00:00
|
|
|
|
|
|
|
### 1.1 IDE
|
2019-12-02 13:19:29 +00:00
|
|
|
It does not matter which IDE you use,
|
|
|
|
you could even use a command line text editor for developing.
|
|
|
|
|
2020-04-18 20:30:02 +00:00
|
|
|
### 1.2 NodeJS
|
2019-12-02 13:19:29 +00:00
|
|
|
For building and serving you require `nodejs` grater than 8.
|
|
|
|
Nodejs is easily downloadable from [here]().
|
|
|
|
Ensure you've added `node.exe` to the environment path!
|
|
|
|
|
2020-04-18 20:30:02 +00:00
|
|
|
### 1.2.2 NPM
|
2019-12-02 13:19:29 +00:00
|
|
|
Normally NPM already comes with the NodeJS installer.
|
|
|
|
So you don't really have to worry about it.
|
2019-03-07 14:30:53 +00:00
|
|
|
NPM min 6.X is required to develop this project.
|
|
|
|
With NPM you could easily download all required dependencies by just typing `npm install`.
|
|
|
|
IMPORTANT: NPM must be available within the PATH environment variable!
|
|
|
|
|
2020-04-18 20:30:02 +00:00
|
|
|
### 1.3 Git bash
|
2019-03-07 14:30:53 +00:00
|
|
|
For using the `.sh` build scripts you require Git Bash.
|
2019-12-02 13:19:29 +00:00
|
|
|
A minimum of 4.2 is recommend, but in general every modern version should work.
|
|
|
|
|
|
|
|
## 2.0 Project initialization
|
|
|
|
|
|
|
|
### 2.1 Cloning the WebClient
|
|
|
|
To clone the WebClient simply use:
|
|
|
|
```shell script
|
|
|
|
git clone https://github.com/TeaSpeak/TeaWeb.git
|
|
|
|
```
|
|
|
|
After closing the project you've to update the submodules.
|
|
|
|
Simply execute:
|
|
|
|
```shell script
|
2020-09-02 09:50:01 +00:00
|
|
|
git submodule update --init --recursive
|
2019-12-02 13:19:29 +00:00
|
|
|
```
|
2020-04-18 20:30:02 +00:00
|
|
|
|
2020-09-02 09:50:01 +00:00
|
|
|
### 2.2 Initializing NPM
|
2019-12-02 13:21:33 +00:00
|
|
|
To download all required packages simply type:
|
|
|
|
```shell script
|
|
|
|
npm install
|
|
|
|
```
|
|
|
|
|
2020-09-02 09:50:01 +00:00
|
|
|
### 2.3 Installing required dependencies
|
|
|
|
In order to build the project you need some libraries and applications (`rustup` and `wasm-pack`).
|
|
|
|
To install them, just execute:
|
|
|
|
```shell script
|
|
|
|
./scripts/install_dependencies.sh
|
|
|
|
```
|
|
|
|
You may need to follow some additional steps, depending on the scripts output.
|
|
|
|
|
|
|
|
Attention: If you've not installed `rustup` or `wasm-pack`, you may need to restart the bash,
|
|
|
|
since the path variable needs to be updated. If you don't want to do so, you may just run:
|
|
|
|
```shell script
|
|
|
|
source ./scripts/install_dependencies.sh
|
|
|
|
```
|
|
|
|
Attention: On error it will close your bash session with an exit code of 1!
|
|
|
|
|
2020-04-18 20:30:02 +00:00
|
|
|
### 2.4 You're ready to go and start developing
|
2019-12-02 13:19:29 +00:00
|
|
|
To start the development environment which automatically compiles all your changed
|
|
|
|
scripts and style sheets you simply have to execute:
|
|
|
|
```shell script
|
2019-12-03 15:46:58 +00:00
|
|
|
npm start web
|
2019-12-02 13:19:29 +00:00
|
|
|
```
|
2019-12-03 16:09:11 +00:00
|
|
|
This will also spin up a temporary web server where you could test out your newest changes.
|
2019-12-02 13:19:29 +00:00
|
|
|
The server will by default listen on `http://localhost:8081`
|
2019-03-07 14:30:53 +00:00
|
|
|
|
2020-04-18 20:30:02 +00:00
|
|
|
### 2.5 Using your UI within the TeaClient
|
|
|
|
An explanation how this works will come later. Stay tuned!
|
|
|
|
|
|
|
|
### 2.6 Generate a release package
|
|
|
|
In order to build your own TeaWeb-Package just execute the `scripts/build.sh` script.
|
|
|
|
```shell script
|
2020-04-18 20:38:10 +00:00
|
|
|
./scripts/build.sh web rel # Build the web client
|
|
|
|
./scripts/web_package.sh rel # Bundle the webclient into one .zip archive
|
2020-04-18 20:30:02 +00:00
|
|
|
```
|
|
|
|
You could also create a debug packaged just by replacing `rel` with `dev`.
|