Skip to content

danielmayost/rustdesk-simple-build

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Rustdesk Simple Build

Rustdesk compilation (especially for windows) is a complex process and requires a lot of dependencies and configurations.

In this repository I tried to simplify the process as much as possible so that it is possible to make changes in the code or in the configurations and compile without messing with all the dependencies and things around.

The only tool that needs to be installed is Docker.

Currently, it only compiles for Windows-x64, which is the most useful.

How it works?

The process is divided into two stages:

First, a Windows docker image is built with all the configuration dependencies needed for compilation, this is a one-time process, unless the source code dependencies change.

In the second step, we run the docker image with Rustdesk compilation instructions.

Local compilation

Unfortunately, the compilation cannot be done when the source code is connected to the container by Bind mounts, cargo encounters many errors in this situation, therefore the source code is copied every time into the container and there the compilation takes place.

Usage

Note: Please use Powershell, Otherwise, the commands will not execute properly.

  1. Start docker and switch to Windows containers.

  2. Go to the folder you want to clone Rustdesk and use Powershell to run the following commands:

git clone https://github.com/danielmayost/rustdesk-simple-build.git
cd rustdesk-simple-build
git clone https://github.com/rustdesk/rustdesk.git
cd Windows-x64
./build
  1. Then make changes to the code and run the following command:
./compile
  1. The output will be in the output folder.

Configration

If you want to define your ID_Server as default or your Public_Key, you can set the Environment variable within the container, for do that, insert this lines in the compile.bat file before the -v flags:

-e RENDEZVOUS_SERVER=YOUR_SERVER ^
-e RS_PUB_KEY=control-YOUR_PUB_KEY ^

Netfree

If you are Netfree user (some Internet censorship in our county) please run this build command:

./build -netfree

If you run the ./build command before without -netfree flag, you need to run this command:

./build -netfree -no-cache

Troubleshooting

If you encounter errors during the image build or compilation, verify the following:

  1. Make sure docker is configured on Windows container.
  2. The script tries to trace the flutter-build.yml file in the rustdesk project, make sure that the versions of the dependencies in the file match the dependencies in the Dockerfile, if not, change them.
  3. If you did a git pull to the source code, the dependencies may have changed, just change the RUSTDESK_COMMIT in Dockerfile and rebuild the image by ./build.