forked from rustdesk/rustdesk
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
98 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
FROM debian | ||
|
||
WORKDIR / | ||
RUN apt update -y && apt install -y g++ gcc git curl wget nasm yasm libgtk-3-dev clang libxcb-randr0-dev libxdo-dev libxfixes-dev libxcb-shape0-dev libxcb-xfixes0-dev libasound2-dev libpulse-dev cmake unzip zip sudo | ||
|
||
RUN git clone https://github.com/microsoft/vcpkg --branch 2020.11-1 | ||
RUN /vcpkg/bootstrap-vcpkg.sh -disableMetrics | ||
RUN /vcpkg/vcpkg --disable-metrics install libvpx libyuv opus | ||
|
||
RUN groupadd -r user && useradd -r -g user user --home /home/user && mkdir -p /home/user && chown user /home/user | ||
WORKDIR /home/user | ||
RUN wget https://github.com/c-smile/sciter-sdk/raw/dc65744b66389cd5a0ff6bdb7c63a8b7b05a708b/bin.lnx/x64/libsciter-gtk.so | ||
USER user | ||
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs > rustup.sh | ||
RUN chmod +x rustup.sh | ||
RUN ./rustup.sh -y | ||
|
||
USER root | ||
COPY ./entrypoint / | ||
ENTRYPOINT ["/entrypoint"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
#!/bin/sh | ||
|
||
if [ "$(id -u)" != "${PUID:-1000}" ] || [ "$(id -g)" != "${PGID:-1000}" ]; then | ||
usermod -o -u "${PUID:-1000}" user | ||
groupmod -o -g "${PGID:-1000}" user | ||
chown -R user /home/user | ||
sudo -u user /entrypoint $@ | ||
exit 0 | ||
fi | ||
|
||
cd $HOME/rustdesk | ||
. $HOME/.cargo/env | ||
|
||
argv=$@ | ||
|
||
while test $# -gt 0; do | ||
case "$1" in | ||
--release) | ||
mkdir -p target/release | ||
test -f target/release/libsciter-gtk.so || cp $HOME/libsciter-gtk.so target/release/ | ||
release=1 | ||
shift | ||
;; | ||
--target) | ||
shift | ||
if test $# -gt 0; then | ||
rustup target add $1 | ||
shift | ||
fi | ||
;; | ||
*) | ||
shift | ||
;; | ||
esac | ||
done | ||
|
||
if [ -z $release ]; then | ||
mkdir -p target/debug | ||
test -f target/debug/libsciter-gtk.so || cp $HOME/libsciter-gtk.so target/debug/ | ||
fi | ||
|
||
VCPKG_ROOT=/vcpkg cargo build $argv |