mirror of
https://github.com/rustdesk/doc.rustdesk.com.git
synced 2025-06-26 20:51:52 +02:00
remove web dev
This commit is contained in:
parent
0fbad56b07
commit
728359b25b
@ -1,176 +0,0 @@
|
||||
---
|
||||
title: Web
|
||||
weight: 23
|
||||
---
|
||||
|
||||
### Auf Linux erstellen
|
||||
|
||||
Führen Sie die folgenden Schritte unter Linux oder Mac aus (funktioniert auch unter Windows, allerdings müssen Sie einige Befehle leicht abändern, z. B. `wget` in `curl.exe -O`):
|
||||
|
||||
```sh
|
||||
git clone https://github.com/JelleBuning/rustdesk.git
|
||||
cd rustdesk
|
||||
git switch fix_build
|
||||
cd flutter/web/js
|
||||
|
||||
# Zuerst protoc installieren, siehe https://google.github.io/proto-lens/installing-protoc.html
|
||||
npm install ts-proto
|
||||
# Funktioniert nur mit vite ≤ 2.8, siehe https://github.com/vitejs/vite/blob/main/docs/guide/build.md#chunking-strategy
|
||||
npm install vite@2.8
|
||||
|
||||
# Für die Erstellung von yarn erforderlich
|
||||
npm install yarn -g
|
||||
npm install typescript -g
|
||||
npm install protoc -g
|
||||
|
||||
yarn build
|
||||
|
||||
cd ..
|
||||
|
||||
# Für Details zum YUV-Konverter siehe https://github.com/rustdesk/rustdesk/issues/364#issuecomment-1023562050
|
||||
wget https://github.com/rustdesk/doc.rustdesk.com/releases/download/console/web_deps.tar.gz
|
||||
# In den aktuellen Ordner entpacken
|
||||
tar xzf web_deps.tar.gz
|
||||
|
||||
cd ..
|
||||
|
||||
# Viel Glück!
|
||||
flutter run -d chrome
|
||||
```
|
||||
|
||||
### Version auf Linux erstellen
|
||||
|
||||
Wenn Sie den Webclient hosten wollen, sollten Sie eine Version erstellen, bevor Sie ihn auf einem Webserver ausführen.
|
||||
Führen Sie dazu die oben beschriebenen Schritte aus, mit Ausnahme des Befehls `flutter run -d chrome`. Fahren Sie mit den folgenden Befehlen fort:
|
||||
|
||||
```sh
|
||||
flutter build web --release
|
||||
cd build/web
|
||||
# Sie können jeden beliebigen Server verwenden, hier nur ein Beispiel
|
||||
python -m http.server 8000
|
||||
```
|
||||
|
||||
Um die Erstellung auf HTTPS zu konfigurieren, empfehlen wir, dieser [Anleitung](https://medium.com/flutter-community/how-to-host-flutter-using-nginx-a71bcb11d96) zu folgen.
|
||||
|
||||
> Derzeit sind YUV-Konverter und VP9 der Engpass.
|
||||
|
||||
### Mit Docker erstellen
|
||||
|
||||
Führen Sie die folgenden Schritte unter Linux oder Mac aus:
|
||||
- Beginnen Sie mit der Installation von flutter für [Linux](https://docs.flutter.dev/get-started/install/linux#install-flutter-manually) oder [macOS](https://docs.flutter.dev/get-started/install/macos).
|
||||
- Flutter-App lokal einrichten:
|
||||
|
||||
```sh
|
||||
git clone https://github.com/JelleBuning/rustdesk.git
|
||||
cd rustdesk
|
||||
git switch fix_build
|
||||
cd flutter/web/js
|
||||
|
||||
# Zuerst protoc installieren, siehe https://google.github.io/proto-lens/installing-protoc.html
|
||||
npm install ts-proto
|
||||
# Funktioniert nur mit vite ≤ 2.8, siehe https://github.com/vitejs/vite/blob/main/docs/guide/build.md#chunking-strategy
|
||||
npm install vite@2.8
|
||||
|
||||
# Für die Erstellung von yarn erforderlich
|
||||
npm install yarn -g
|
||||
npm install typescript -g
|
||||
npm install protoc -g
|
||||
|
||||
yarn build
|
||||
```
|
||||
|
||||
- Erstellen Sie ein `Dockerfile` im Ordner `flutter` mit folgendem Inhalt:
|
||||
|
||||
```Dockerfile
|
||||
# Betriebssystem und Abhängigkeiten installieren
|
||||
FROM ubuntu:20.04
|
||||
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
RUN apt-get update
|
||||
RUN apt-get install -y curl git wget unzip libgconf-2-4 gdb libstdc++6 libglu1-mesa fonts-droid-fallback lib32stdc++6 python3 clang cmake ninja-build pkg-config libgtk-3-dev
|
||||
RUN apt-get clean
|
||||
|
||||
# Flutter SDK vom GitHub-Repository herunterladen
|
||||
RUN git clone https://github.com/flutter/flutter.git /usr/local/flutter
|
||||
|
||||
# Flutter-Umgebungspfad einstellen
|
||||
ENV PATH="/usr/local/flutter/bin:/usr/local/flutter/bin/cache/dart-sdk/bin:${PATH}"
|
||||
|
||||
# flutter doctor ausführen
|
||||
RUN flutter doctor
|
||||
|
||||
# flutter web aktivieren
|
||||
RUN flutter channel master
|
||||
RUN flutter upgrade
|
||||
RUN flutter config --enable-web
|
||||
|
||||
# Dateien in den Container kopieren und erstellen
|
||||
RUN mkdir /app/
|
||||
# Die Web-App kann nicht aus dem Dockerfile gebaut werden.
|
||||
# Stattdessen wird sie lokal gebaut und "flutter build web" wird auskommentiert.
|
||||
COPY . /app/
|
||||
WORKDIR /app/
|
||||
# RUN flutter build web
|
||||
|
||||
# Erfassung des offenen Ports
|
||||
EXPOSE 5000
|
||||
|
||||
# Startskript des Servers ausführbar machen und den Webserver starten
|
||||
RUN ["chmod", "+x", "/app/server/server.sh"]
|
||||
|
||||
ENTRYPOINT [ "/app/server/server.sh"]
|
||||
```
|
||||
|
||||
- Legen Sie den Ordner `server` unter `flutter` an.
|
||||
- Erstellen Sie eine Datei `server.sh` im Ordner `flutter/server` mit folgendem Inhalt:
|
||||
|
||||
```sh
|
||||
#!/bin/bash
|
||||
|
||||
# Port festlegen
|
||||
PORT=5000
|
||||
|
||||
# Anhalten aller Programme, die derzeit auf dem eingestellten Port laufen
|
||||
echo 'Vorbereitung des Ports' $PORT '...'
|
||||
fuser -k 5000/tcp
|
||||
|
||||
# Ordner wechseln
|
||||
cd build/web/
|
||||
|
||||
# Server starten
|
||||
echo 'Server startet auf Port' $PORT '...'
|
||||
python3 -m http.server $PORT
|
||||
```
|
||||
|
||||
- Das Docker-Image erstellen:
|
||||
|
||||
```sh
|
||||
docker build -t rustdesk-web-client .
|
||||
```
|
||||
|
||||
- Das Docker-Image ausführen:
|
||||
|
||||
```sh
|
||||
docker run -p 5000:5000 rustdesk-web-client
|
||||
```
|
||||
|
||||
- Öffnen Sie Ihren Browser und gehen Sie zu `localhost:5000`, um die Webanwendung zu sehen.
|
||||
|
||||
### RustDesk-Webclient mit vorhandenem Docker-Image
|
||||
|
||||
Wenn Sie das Docker-Image nicht selbst erstellen möchten, können Sie das Image auf [Docker Hub](https://hub.docker.com/r/keyurbhole/flutter_web_desk) verwenden.
|
||||
|
||||
- Das Image ziehen:
|
||||
|
||||
```sh
|
||||
docker pull keyurbhole/flutter_web_desk
|
||||
```
|
||||
|
||||
- Das Docker-Image ausführen:
|
||||
|
||||
```sh
|
||||
docker run -p 5000:5000 keyurbhole/flutter_web_desk
|
||||
```
|
||||
|
||||
- Öffnen Sie Ihren Browser und gehen Sie zu `localhost:5000`, um die Webanwendung zu sehen.
|
@ -1,176 +0,0 @@
|
||||
---
|
||||
title: Web
|
||||
weight: 23
|
||||
---
|
||||
|
||||
### How to build on Linux
|
||||
|
||||
Run below on Linux or Mac (works on Windows too, however you may need to slightly modify some commands, e.g. change `wget` to `curl.exe -O`):
|
||||
|
||||
```sh
|
||||
git clone https://github.com/JelleBuning/rustdesk.git
|
||||
cd rustdesk
|
||||
git switch fix_build
|
||||
cd flutter/web/js
|
||||
|
||||
# Install protoc first, see: https://google.github.io/proto-lens/installing-protoc.html
|
||||
npm install ts-proto
|
||||
# Only works with vite <= 2.8, see: https://github.com/vitejs/vite/blob/main/docs/guide/build.md#chunking-strategy
|
||||
npm install vite@2.8
|
||||
|
||||
# Required for yarn build
|
||||
npm install yarn -g
|
||||
npm install typescript -g
|
||||
npm install protoc -g
|
||||
|
||||
yarn build
|
||||
|
||||
cd ..
|
||||
|
||||
# About details of YUV converter, check this https://github.com/rustdesk/rustdesk/issues/364#issuecomment-1023562050
|
||||
wget https://github.com/rustdesk/doc.rustdesk.com/releases/download/console/web_deps.tar.gz
|
||||
# Decompress to the current directory
|
||||
tar xzf web_deps.tar.gz
|
||||
|
||||
cd ..
|
||||
|
||||
# Good Luck!
|
||||
flutter run -d chrome
|
||||
```
|
||||
|
||||
### How to build release on Linux
|
||||
|
||||
If you want to host the web client you should build a release before running it on a web server.
|
||||
To do so follow the steps shown above except the `flutter run -d chrome` command. Continue with the following commands:
|
||||
|
||||
```sh
|
||||
flutter build web --release
|
||||
cd build/web
|
||||
# You could use any server, just an example
|
||||
python -m http.server 8000
|
||||
```
|
||||
|
||||
To configure the build on HTTPS we would recommend following the instructions from the following [source](https://medium.com/flutter-community/how-to-host-flutter-using-nginx-a71bcb11d96).
|
||||
|
||||
> Currently, YUV converter and VP9 are the bottleneck.
|
||||
|
||||
### How to build with Docker
|
||||
|
||||
Run below on Linux or Mac:
|
||||
- Begin by installing flutter for [Linux](https://docs.flutter.dev/get-started/install/linux#install-flutter-manually) or [macOS](https://docs.flutter.dev/get-started/install/macos).
|
||||
- Setup the flutter app locally:
|
||||
|
||||
```sh
|
||||
git clone https://github.com/JelleBuning/rustdesk.git
|
||||
cd rustdesk
|
||||
git switch fix_build
|
||||
cd flutter/web/js
|
||||
|
||||
# Install protoc first, see: https://google.github.io/proto-lens/installing-protoc.html
|
||||
npm install ts-proto
|
||||
# Only works with vite <= 2.8, see: https://github.com/vitejs/vite/blob/main/docs/guide/build.md#chunking-strategy
|
||||
npm install vite@2.8
|
||||
|
||||
# Required for yarn build
|
||||
npm install yarn -g
|
||||
npm install typescript -g
|
||||
npm install protoc -g
|
||||
|
||||
yarn build
|
||||
```
|
||||
|
||||
- Create a `Dockerfile` with the following content under `flutter` directory:
|
||||
|
||||
```Dockerfile
|
||||
# Install operating system and dependencies
|
||||
FROM ubuntu:20.04
|
||||
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
RUN apt-get update
|
||||
RUN apt-get install -y curl git wget unzip libgconf-2-4 gdb libstdc++6 libglu1-mesa fonts-droid-fallback lib32stdc++6 python3 clang cmake ninja-build pkg-config libgtk-3-dev
|
||||
RUN apt-get clean
|
||||
|
||||
# Download Flutter SDK from Flutter GitHub repo
|
||||
RUN git clone https://github.com/flutter/flutter.git /usr/local/flutter
|
||||
|
||||
# Set flutter environment path
|
||||
ENV PATH="/usr/local/flutter/bin:/usr/local/flutter/bin/cache/dart-sdk/bin:${PATH}"
|
||||
|
||||
# Run flutter doctor
|
||||
RUN flutter doctor
|
||||
|
||||
# Enable flutter web
|
||||
RUN flutter channel master
|
||||
RUN flutter upgrade
|
||||
RUN flutter config --enable-web
|
||||
|
||||
# Copy files to container and build
|
||||
RUN mkdir /app/
|
||||
# I was unable to build web app from dockerfile
|
||||
# So instead I built it locally and commented the "flutter build web" in this file
|
||||
COPY . /app/
|
||||
WORKDIR /app/
|
||||
# RUN flutter build web
|
||||
|
||||
# Record the exposed port
|
||||
EXPOSE 5000
|
||||
|
||||
# Make server startup script executable and start the web server
|
||||
RUN ["chmod", "+x", "/app/server/server.sh"]
|
||||
|
||||
ENTRYPOINT [ "/app/server/server.sh"]
|
||||
```
|
||||
|
||||
- Create `server` directory under `flutter`.
|
||||
- Create a `server.sh` file with the following content under `flutter/server` directory:
|
||||
|
||||
```sh
|
||||
#!/bin/bash
|
||||
|
||||
# Set the port
|
||||
PORT=5000
|
||||
|
||||
# Stop any program currently running on the set port
|
||||
echo 'Preparing port' $PORT '...'
|
||||
fuser -k 5000/tcp
|
||||
|
||||
# Switch directory
|
||||
cd build/web/
|
||||
|
||||
# Start the server
|
||||
echo 'Server starting on port' $PORT '...'
|
||||
python3 -m http.server $PORT
|
||||
```
|
||||
|
||||
- Build the Docker image:
|
||||
|
||||
```sh
|
||||
docker build -t rustdesk-web-client .
|
||||
```
|
||||
|
||||
- Run the Docker image:
|
||||
|
||||
```sh
|
||||
docker run -p 5000:5000 rustdesk-web-client
|
||||
```
|
||||
|
||||
- Open your browser and go to `localhost:5000` to see the web app.
|
||||
|
||||
### RustDesk Web Client using existing Docker image
|
||||
|
||||
If you do not want to build the Docker image yourself, you can use the image I built and uploaded to [Docker Hub](https://hub.docker.com/r/keyurbhole/flutter_web_desk).
|
||||
|
||||
- Pull the image:
|
||||
|
||||
```sh
|
||||
docker pull keyurbhole/flutter_web_desk
|
||||
```
|
||||
|
||||
- Run the image:
|
||||
|
||||
```sh
|
||||
docker run -p 5000:5000 keyurbhole/flutter_web_desk
|
||||
```
|
||||
|
||||
- Open your browser and go to `localhost:5000` to see the web app.
|
@ -1,28 +0,0 @@
|
||||
---
|
||||
title: Web
|
||||
weight: 23
|
||||
---
|
||||
|
||||
Ejecutar a continuación en Linux o Mac
|
||||
|
||||
Actualmente, el converter yuv y vp9 son cuello de botella
|
||||
|
||||
```sh
|
||||
git clone https://github.com/rustdesk/rustdesk
|
||||
cd rustdesk/flutter/web/js
|
||||
|
||||
# instalar protoc primero http://google.github.io/proto-lens/installing-protoc.html
|
||||
npm install ts-proto
|
||||
yarn build
|
||||
|
||||
cd ..
|
||||
|
||||
# sobre los detalles del convertidor yuv, mira esto https://github.com/rustdesk/rustdesk/issues/364#issuecomment-1023562050
|
||||
wget https://github.com/rustdesk/doc.rustdesk.com/releases/download/console/web_deps.tar.gz
|
||||
tar xzf web_deps.tar.gz
|
||||
|
||||
cd ..
|
||||
|
||||
# Buena suerte!
|
||||
flutter run -d chrome
|
||||
```
|
@ -1,30 +0,0 @@
|
||||
---
|
||||
title: Web
|
||||
weight: 23
|
||||
---
|
||||
|
||||
Exécutez les commandes ci-dessous sur Linux ou Mac (fonctionne également sur Windows, mais vous devrez peut-être modifier légèrement certaines commandes, ex: changer `wget` par `curl.exe -O`):
|
||||
|
||||
```sh
|
||||
git clone https://github.com/rustdesk/rustdesk
|
||||
cd rustdesk/flutter/web/js
|
||||
|
||||
# installer ts-protoc http://google.github.io/proto-lens/installing-protoc.html
|
||||
npm install ts-proto
|
||||
# fonctionne seulement avec vite<=2.8, voir: https://github.com/vitejs/vite/blob/main/docs/guide/build.md#chunking-strategy
|
||||
yarn build
|
||||
|
||||
cd ..
|
||||
|
||||
# pour plus de détails sur yuv converter, se reporter à https://github.com/rustdesk/rustdesk/issues/364#issuecomment-1023562050
|
||||
wget https://github.com/rustdesk/doc.rustdesk.com/releases/download/console/web_deps.tar.gz
|
||||
# Décompressez vers le répertoire actuel
|
||||
tar xzf web_deps.tar.gz
|
||||
|
||||
cd ..
|
||||
|
||||
# Bonne chance!
|
||||
flutter run -d chrome
|
||||
```
|
||||
|
||||
> Actuellement, YUV Converter et VP9 sont le goulot d'étranglement
|
@ -1,6 +0,0 @@
|
||||
---
|
||||
title: Web
|
||||
weight: 23
|
||||
---
|
||||
|
||||
[English](/docs/en/dev/build/web)
|
@ -1,6 +0,0 @@
|
||||
---
|
||||
title: Web
|
||||
weight: 23
|
||||
---
|
||||
|
||||
[English](/docs/en/dev/build/web)
|
@ -1,30 +0,0 @@
|
||||
---
|
||||
title: Web
|
||||
weight: 23
|
||||
---
|
||||
|
||||
Voer het onderstaande uit op Linux of Mac (werkt ook op Windows, maar je moet sommige commando's enigszins aanpassen, *bijvoorbeeld* verander `wget` in `curl.exe -O`):
|
||||
|
||||
```sh
|
||||
git clone https://github.com/rustdesk/rustdesk
|
||||
cd rustdesk/flutter/web/js
|
||||
|
||||
# install protoc first http://google.github.io/proto-lens/installing-protoc.html
|
||||
npm install ts-proto
|
||||
# only works with vite<=2.8, see: https://github.com/vitejs/vite/blob/main/docs/guide/build.md#chunking-strategy
|
||||
yarn build
|
||||
|
||||
cd ..
|
||||
|
||||
# about details of yuv converter, check this https://github.com/rustdesk/rustdesk/issues/364#issuecomment-1023562050
|
||||
wget https://github.com/rustdesk/doc.rustdesk.com/releases/download/console/web_deps.tar.gz
|
||||
# decompress to the current directory
|
||||
tar xzf web_deps.tar.gz
|
||||
|
||||
cd ..
|
||||
|
||||
# Good Luck!
|
||||
flutter run -d chrome
|
||||
```
|
||||
|
||||
> Momenteel zijn yuv converter en vp9 de knelpunten...
|
@ -1,6 +0,0 @@
|
||||
---
|
||||
title: Web
|
||||
weight: 23
|
||||
---
|
||||
|
||||
[English](/docs/en/dev/build/web)
|
@ -1,28 +0,0 @@
|
||||
---
|
||||
title: Веб
|
||||
weight: 23
|
||||
---
|
||||
|
||||
Запустите нежописанное на Linux или Mac
|
||||
|
||||
В настоящее время конвертер yuv и vp9 являются "бутылочным горлышком"
|
||||
|
||||
```sh
|
||||
git clone https://github.com/rustdesk/rustdesk
|
||||
cd rustdesk/flutter/web/js
|
||||
|
||||
# сначала установим protoc http://google.github.io/proto-lens/installing-protoc.html
|
||||
npm install ts-proto
|
||||
yarn build
|
||||
|
||||
cd ..
|
||||
|
||||
# подробности о конвертере yuv смотрите здесь https://github.com/rustdesk/rustdesk/issues/364#issuecomment-1023562050
|
||||
wget https://github.com/rustdesk/doc.rustdesk.com/releases/download/console/web_deps.tar.gz
|
||||
tar xzf web_deps.tar.gz
|
||||
|
||||
cd ..
|
||||
|
||||
# Удачи!
|
||||
flutter run -d chrome
|
||||
```
|
@ -1,6 +0,0 @@
|
||||
---
|
||||
title: Web
|
||||
weight: 23
|
||||
---
|
||||
|
||||
[English](/docs/en/dev/build/web)
|
@ -1,6 +0,0 @@
|
||||
---
|
||||
title: Web
|
||||
weight: 23
|
||||
---
|
||||
|
||||
[English](/docs/en/dev/build/web)
|
Loading…
x
Reference in New Issue
Block a user