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)
|
2019-12-02 13:19:29 +00:00
|
|
|
- [1.2 PHP](#12-php)
|
|
|
|
- [1.3 NodeJS](#13-nodejs)
|
|
|
|
- [1.3.2 NPM](#132-npm)
|
2019-03-07 14:30:53 +00:00
|
|
|
- [1.4 Git bash](#14-git-bash)
|
|
|
|
|
|
|
|
### 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.
|
|
|
|
|
|
|
|
### 1.2 PHP
|
|
|
|
For having a test environment you require an installation of PHP 5 or grater.
|
2019-12-03 15:46:58 +00:00
|
|
|
You could just download PHP from [here](https://windows.php.net/download#php-7.4).
|
2019-12-02 13:19:29 +00:00
|
|
|
Note:
|
|
|
|
`php.exe` must be accessible via the command line.
|
|
|
|
This means you'll have to add the `bin` folder to your `PATH` variable.
|
|
|
|
|
|
|
|
### 1.3 NodeJS
|
|
|
|
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!
|
|
|
|
|
|
|
|
### 1.3.2 NPM
|
|
|
|
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!
|
|
|
|
|
|
|
|
### 1.4 Git bash
|
|
|
|
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
|
|
|
|
git submodule update --init
|
|
|
|
```
|
|
|
|
|
|
|
|
### 2.2 Setting up native scripts
|
|
|
|
TeaWeb uses the Opus audio codec. Because almost no browser supports it out of the box
|
|
|
|
we've to implement our own de/encoder. For this we're using `emscripten` to compile the codec.
|
|
|
|
Because this is a quite time consuming task we already offer prebuild javascript and wasm files.
|
|
|
|
So we just need to download them. Just execute the `download_compiled_files.sh` shell script within the `asm` folder.
|
|
|
|
```shell script
|
|
|
|
./asm/download_compiled_files.sh
|
|
|
|
```
|
|
|
|
|
2019-12-02 13:21:33 +00:00
|
|
|
### 2.3 Initializing NPM
|
|
|
|
To download all required packages simply type:
|
|
|
|
```shell script
|
|
|
|
npm install
|
|
|
|
```
|
|
|
|
|
|
|
|
### 2.4 Initial client compilation
|
2019-12-02 13:19:29 +00:00
|
|
|
Before you could start ahead with developing you've to compile everything.
|
|
|
|
Just execute the `web_build.sh` script:
|
|
|
|
```shell script
|
2020-02-16 15:07:10 +00:00
|
|
|
./scripts/web_build.sh development
|
2019-12-02 13:19:29 +00:00
|
|
|
```
|
2019-03-07 14:30:53 +00:00
|
|
|
|
2019-12-02 13:21:33 +00:00
|
|
|
### 2.5 Starting the development environment
|
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
|
|
|
|
2019-12-02 13:21:33 +00:00
|
|
|
### 2.6 You're ready
|
2019-12-02 13:19:29 +00:00
|
|
|
Now you're ready to start ahead and implement your own great ideas.
|