From 9f702339dddb76d5be7ed3d9751bffe4855927ac Mon Sep 17 00:00:00 2001 From: ingvar1995 Date: Sun, 5 Aug 2018 11:19:07 +0300 Subject: [PATCH] dockerfile for building - initial version --- build/Dockerfile | 11 +++++++++++ build/build.sh | 19 +++++++++++++++++++ toxygen/ui/items_factories.py | 2 +- 3 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 build/Dockerfile create mode 100644 build/build.sh diff --git a/build/Dockerfile b/build/Dockerfile new file mode 100644 index 0000000..04c59e3 --- /dev/null +++ b/build/Dockerfile @@ -0,0 +1,11 @@ +FROM ubuntu:16.04 + +RUN apt-get update && \ +apt-get install build-essential libtool autotools-dev automake checkinstall cmake check git yasm libsodium-dev libopus-dev libvpx-dev pkg-config -y && \ +git clone https://github.com/ingvar1995/toxcore.git --branch=ngc_rebase && \ +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 diff --git a/build/build.sh b/build/build.sh new file mode 100644 index 0000000..97f8e60 --- /dev/null +++ b/build/build.sh @@ -0,0 +1,19 @@ +#!/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 +cp -r styles dist/main/ +cp -r plugins dist/main/ +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/ +cd dist +mv main toxygen +cd toxygen +mv main toxygen +cd .. +tar -zcvf toxygen_linux_64.tar.gz toxygen +rm -rf toxygen diff --git a/toxygen/ui/items_factories.py b/toxygen/ui/items_factories.py index 2ea5660..df6c95d 100644 --- a/toxygen/ui/items_factories.py +++ b/toxygen/ui/items_factories.py @@ -11,7 +11,7 @@ class ContactItemsFactory: def create_contact_item(self): item = ContactItem(self._settings) elem = QtWidgets.QListWidgetItem(self._friends_list) - elem.setSizeHint(QtCore.QSize(250, item.height())) + elem.setSizeHint(QtCore.QSize(250, 40 if self._settings['compact_mode'] else 70)) self._friends_list.addItem(elem) self._friends_list.setItemWidget(elem, item)