GithubHelp home page GithubHelp logo

rustdesk-simple-build's Introduction

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.

rustdesk-simple-build's People

Contributors

danielmayost avatar

Watchers

 avatar

rustdesk-simple-build's Issues

Error on ./build

I'm always getting this error:

Invoke-WebRequest : The remote name could not be resolved: 'github.com'
At line:1 char:76
+ ... yContinue'; Invoke-WebRequest https://github.com/git-for-windows/git/ ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (System.Net.HttpWebRequest:Htt
   pWebRequest) [Invoke-WebRequest], WebException
    + FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShe
   ll.Commands.InvokeWebRequestCommand

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.