From 1a0bd9deee3f37c9228035c81e1e5232636f4ad4 Mon Sep 17 00:00:00 2001 From: ingvar1995 Date: Mon, 6 Aug 2018 00:52:01 +0300 Subject: [PATCH] dockerfile for linux builds --- build/Dockerfile | 4 +++- build/build.sh | 16 +++++++++++++--- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/build/Dockerfile b/build/Dockerfile index 04c59e3..0b45358 100644 --- a/build/Dockerfile +++ b/build/Dockerfile @@ -7,5 +7,7 @@ cd toxcore && mkdir _build && cd _build && \ cmake .. && make && make install RUN apt-get install portaudio19-dev python3-pyqt5 python3-pyaudio python3-pip -y && \ -pip3 install --upgrade pip && \ pip3 install numpy pydenticon opencv-python pyinstaller + +RUN useradd -ms /bin/bash toxygen +USER toxygen diff --git a/build/build.sh b/build/build.sh index 97f8e60..b415054 100644 --- a/build/build.sh +++ b/build/build.sh @@ -1,19 +1,29 @@ #!/usr/bin/env bash + git clone https://github.com/toxygen-project/toxygen.git --branch=next_gen cd toxygen/toxygen -ln -sf /usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/ /usr/bin/ -pyinstaller --windowed --icon=images/icon.ico --hidden-import=PyQt5.uic.plugins main.py + +pyinstaller --windowed --icon=images/icon.ico main.py + cp -r styles dist/main/ cp -r plugins dist/main/ +mkdir -p dist/main/ui/views +cp -r ui/views dist/main/ui/ cp -r sounds dist/main/ cp -r smileys dist/main/ cp -r stickers dist/main/ cp -r bootstrap dist/main/ cp -r images dist/main/ +cp -r translations dist/main/ + cd dist mv main toxygen cd toxygen mv main toxygen +wget -O updater https://github.com/toxygen-project/toxygen_updater/releases/download/v0.1/toxygen_updater_linux_64 +echo "[Paths]" >> qt.conf +echo "Prefix = PyQt5/Qt" >> qt.conf cd .. -tar -zcvf toxygen_linux_64.tar.gz toxygen + +tar -zcvf toxygen_linux_64.tar.gz toxygen > /dev/null rm -rf toxygen